diff options
1349 files changed, 5977 insertions, 5549 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index c3e8d8d2b11..45bb3bd58aa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> +# Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/README.md b/README.md index 2feeee58043..6b078c2134d 100644 --- a/README.md +++ b/README.md @@ -27,8 +27,8 @@ website at [TrinityCore.org](http://www.trinitycore.org). + MySQL ≥ 5.1.0 (included for Windows) + CMake ≥ 2.8.0 + OpenSSL ≥ 1.0.0 -+ GCC ≥ 4.3 (Linux only) -+ MS Visual Studio ≥ 9 (2008) (Windows only) ++ GCC ≥ 4.7.2 (Linux only) ++ MS Visual Studio ≥ 12 (2013) (Windows only) ## Install diff --git a/cmake/genrev.cmake b/cmake/genrev.cmake index ceeed7bfac7..f4885f53e1c 100644 --- a/cmake/genrev.cmake +++ b/cmake/genrev.cmake @@ -1,4 +1,4 @@ -# Copyright (C) 2008-2013 Trinity <http://www.trinitycore.org/> +# Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/cmake/macros/CheckBuildDir.cmake b/cmake/macros/CheckBuildDir.cmake index 3cc56dae47b..aff1caf362d 100644 --- a/cmake/macros/CheckBuildDir.cmake +++ b/cmake/macros/CheckBuildDir.cmake @@ -1,4 +1,4 @@ -# Copyright (C) 2008-2013 Trinity <http://www.trinitycore.org/> +# Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/cmake/macros/FindGit.cmake b/cmake/macros/FindGit.cmake index c23601dbcd8..d8b82cb04fe 100644 --- a/cmake/macros/FindGit.cmake +++ b/cmake/macros/FindGit.cmake @@ -1,4 +1,4 @@ -# Copyright (C) 2008-2013 Trinity <http://www.trinitycore.org/> +# Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/cmake/options.cmake b/cmake/options.cmake index c159cce055a..d4fc2f3b2d0 100644 --- a/cmake/options.cmake +++ b/cmake/options.cmake @@ -1,4 +1,4 @@ -# Copyright (C) 2008-2013 Trinity <http://www.trinitycore.org/> +# Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/cmake/platform/unix/settings.cmake b/cmake/platform/unix/settings.cmake index b0c0d260623..42bfefa6994 100644 --- a/cmake/platform/unix/settings.cmake +++ b/cmake/platform/unix/settings.cmake @@ -33,7 +33,7 @@ add_custom_target(uninstall message(STATUS "UNIX: Created uninstall target") message(STATUS "UNIX: Detected compiler: ${CMAKE_C_COMPILER}") -if(CMAKE_C_COMPILER MATCHES "gcc") +if(CMAKE_C_COMPILER MATCHES "gcc" OR CMAKE_C_COMPILER_ID STREQUAL "GNU") include(${CMAKE_SOURCE_DIR}/cmake/compiler/gcc/settings.cmake) elseif(CMAKE_C_COMPILER MATCHES "icc") include(${CMAKE_SOURCE_DIR}/cmake/compiler/icc/settings.cmake) diff --git a/contrib/conf_merge/tc-conf-merger.pl b/contrib/conf_merge/tc-conf-merger.pl index e2ca3317920..bc0dd44e689 100644 --- a/contrib/conf_merge/tc-conf-merger.pl +++ b/contrib/conf_merge/tc-conf-merger.pl @@ -1,6 +1,6 @@ #!/usr/bin/perl -w -# Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> +# Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> # Author: leak # Date: 2010-12-06 # Note: Based on conf file format of rev 10507 diff --git a/dep/CMakeLists.txt b/dep/CMakeLists.txt index ad5e04cb321..35b3ead1f2d 100644 --- a/dep/CMakeLists.txt +++ b/dep/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> +# Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/dep/acelite/CMakeLists.txt b/dep/acelite/CMakeLists.txt index 371f3aaba21..db2915b2952 100644 --- a/dep/acelite/CMakeLists.txt +++ b/dep/acelite/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> +# Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/dep/acelite/ace-v6.1.4_hotfix1.diff b/dep/acelite/ace-v6.1.4_hotfix1.diff index 15b76eb29ce..ba3aca60fc0 100644 --- a/dep/acelite/ace-v6.1.4_hotfix1.diff +++ b/dep/acelite/ace-v6.1.4_hotfix1.diff @@ -4,7 +4,7 @@ index 0000000..acd3d5a --- /dev/null +++ b/dep/acelite/ace/CMakeLists.txt @@ -0,0 +1,348 @@ -+# Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> ++# Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> +# +# This file is free software; as a special exception the author gives +# unlimited permission to copy and/or distribute it, with or without diff --git a/dep/acelite/ace/CMakeLists.txt b/dep/acelite/ace/CMakeLists.txt index 7cd34112830..3de9f797938 100644 --- a/dep/acelite/ace/CMakeLists.txt +++ b/dep/acelite/ace/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> +# Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/dep/bzip2/CMakeLists.txt b/dep/bzip2/CMakeLists.txt index 834ab673d12..1a7082c42d8 100644 --- a/dep/bzip2/CMakeLists.txt +++ b/dep/bzip2/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> +# Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/dep/g3dlite/CMakeLists.txt b/dep/g3dlite/CMakeLists.txt index 2681b479bd3..7013e051535 100644 --- a/dep/g3dlite/CMakeLists.txt +++ b/dep/g3dlite/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> +# Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/dep/gsoap/CMakeLists.txt b/dep/gsoap/CMakeLists.txt index e7ebcc18db2..0897b60fa72 100644 --- a/dep/gsoap/CMakeLists.txt +++ b/dep/gsoap/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> +# Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/dep/jemalloc/CMakeLists.txt b/dep/jemalloc/CMakeLists.txt index 95c3cb05621..c197c45cf75 100644 --- a/dep/jemalloc/CMakeLists.txt +++ b/dep/jemalloc/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> +# Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/dep/libmpq/CMakeLists.txt b/dep/libmpq/CMakeLists.txt index cd14098c698..08377892061 100644 --- a/dep/libmpq/CMakeLists.txt +++ b/dep/libmpq/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> +# Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/dep/mysqllite/CMakeLists.txt b/dep/mysqllite/CMakeLists.txt index 23d04eb3c15..75210efc262 100644 --- a/dep/mysqllite/CMakeLists.txt +++ b/dep/mysqllite/CMakeLists.txt @@ -1,5 +1,5 @@ # Copyright (C) 2006 MySQL AB -# Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> +# Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/dep/recastnavigation/Detour/CMakeLists.txt b/dep/recastnavigation/Detour/CMakeLists.txt index 303a003dee2..b7c0853efc4 100644 --- a/dep/recastnavigation/Detour/CMakeLists.txt +++ b/dep/recastnavigation/Detour/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> +# Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/dep/recastnavigation/Recast/CMakeLists.txt b/dep/recastnavigation/Recast/CMakeLists.txt index 5f466a4b2e2..09f20b4ed2f 100644 --- a/dep/recastnavigation/Recast/CMakeLists.txt +++ b/dep/recastnavigation/Recast/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> +# Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/dep/zlib/CMakeLists.txt b/dep/zlib/CMakeLists.txt index af0bfe50645..fa3bde43e9f 100644 --- a/dep/zlib/CMakeLists.txt +++ b/dep/zlib/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> +# Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/doc/UnixInstall.txt b/doc/UnixInstall.txt index a5b412af0b8..94b25c58352 100644 --- a/doc/UnixInstall.txt +++ b/doc/UnixInstall.txt @@ -1,5 +1,5 @@ = TrinityCore -- Linux installation = -Copyright (C) 2008-2013 TrinityCore (http://www.trinitycore.org) +Copyright (C) 2008-2014 TrinityCore (http://www.trinitycore.org) ========================================================= WARNING: THIS DOCUMENTATION IS NOT ALWAYS UP TO DATE. diff --git a/revision.h.in.cmake b/revision.h.in.cmake index dbd2a8a878c..895575c1a6b 100644 --- a/revision.h.in.cmake +++ b/revision.h.in.cmake @@ -4,7 +4,7 @@ #define _DATE "@rev_date@" #define _BRANCH "@rev_branch@" #define VER_COMPANYNAME_STR "TrinityCore Developers" - #define VER_LEGALCOPYRIGHT_STR "(c)2008-2013 TrinityCore" + #define VER_LEGALCOPYRIGHT_STR "(c)2008-2014 TrinityCore" #define VER_FILEVERSION 0,0,0 #define VER_FILEVERSION_STR "@rev_hash@ @rev_date@ (@rev_branch@ branch)" #define VER_PRODUCTVERSION VER_FILEVERSION diff --git a/sql/base/characters_database.sql b/sql/base/characters_database.sql index f414424cfd3..f880f009893 100644 --- a/sql/base/characters_database.sql +++ b/sql/base/characters_database.sql @@ -1662,7 +1662,7 @@ CREATE TABLE `guild` ( `BorderStyle` tinyint(3) unsigned NOT NULL DEFAULT '0', `BorderColor` tinyint(3) unsigned NOT NULL DEFAULT '0', `BackgroundColor` tinyint(3) unsigned NOT NULL DEFAULT '0', - `info` text NOT NULL, + `info` VARCHAR(500) NOT NULL DEFAULT '', `motd` varchar(128) NOT NULL DEFAULT '', `createdate` int(10) unsigned NOT NULL DEFAULT '0', `BankMoney` bigint(20) unsigned NOT NULL DEFAULT '0', diff --git a/sql/updates/characters/2014_01_12_00_characters_guild.sql b/sql/updates/characters/2014_01_12_00_characters_guild.sql new file mode 100644 index 00000000000..23a2cada153 --- /dev/null +++ b/sql/updates/characters/2014_01_12_00_characters_guild.sql @@ -0,0 +1 @@ +ALTER TABLE `guild` CHANGE `info` `info` VARCHAR(500) NOT NULL DEFAULT ''; diff --git a/sql/updates/world/2013_12_29_00_world_creature_classlevelstats.sql b/sql/updates/world/2013_12_29_00_world_creature_classlevelstats.sql new file mode 100644 index 00000000000..778e76a4e04 --- /dev/null +++ b/sql/updates/world/2013_12_29_00_world_creature_classlevelstats.sql @@ -0,0 +1,71 @@ +UPDATE `creature_classlevelstats` SET `damage_exp2`=111.1744 WHERE `class`=1 AND `level`=67; +UPDATE `creature_classlevelstats` SET `damage_exp2`=115.2244 WHERE `class`=1 AND `level`=68; +UPDATE `creature_classlevelstats` SET `damage_exp2`=119.2744 WHERE `class`=1 AND `level`=69; +UPDATE `creature_classlevelstats` SET `damage_exp2`=123.3244 WHERE `class`=1 AND `level`=70; +UPDATE `creature_classlevelstats` SET `damage_exp2`=127.3744 WHERE `class`=1 AND `level`=71; +UPDATE `creature_classlevelstats` SET `damage_exp2`=131.4244 WHERE `class`=1 AND `level`=72; +UPDATE `creature_classlevelstats` SET `damage_exp2`=135.4744 WHERE `class`=1 AND `level`=73; +UPDATE `creature_classlevelstats` SET `damage_exp2`=139.5244 WHERE `class`=1 AND `level`=74; +UPDATE `creature_classlevelstats` SET `damage_exp2`=143.5744 WHERE `class`=1 AND `level`=75; +UPDATE `creature_classlevelstats` SET `damage_exp2`=147.6244 WHERE `class`=1 AND `level`=76; +UPDATE `creature_classlevelstats` SET `damage_exp2`=151.6744 WHERE `class`=1 AND `level`=77; +UPDATE `creature_classlevelstats` SET `damage_exp2`=155.7244 WHERE `class`=1 AND `level`=78; +UPDATE `creature_classlevelstats` SET `damage_exp2`=160.2582 WHERE `class`=1 AND `level`=79; +UPDATE `creature_classlevelstats` SET `damage_exp2`=164.9240 WHERE `class`=1 AND `level`=80; +UPDATE `creature_classlevelstats` SET `damage_exp2`=168.9740 WHERE `class`=1 AND `level`=81; +UPDATE `creature_classlevelstats` SET `damage_exp2`=173.0240 WHERE `class`=1 AND `level`=82; +UPDATE `creature_classlevelstats` SET `damage_exp2`=177.0740 WHERE `class`=1 AND `level`=83; + +UPDATE `creature_classlevelstats` SET `damage_exp2`=111.4876 WHERE `class`=2 AND `level`=67; +UPDATE `creature_classlevelstats` SET `damage_exp2`=115.4614 WHERE `class`=2 AND `level`=68; +UPDATE `creature_classlevelstats` SET `damage_exp2`=119.4352 WHERE `class`=2 AND `level`=69; +UPDATE `creature_classlevelstats` SET `damage_exp2`=123.4090 WHERE `class`=2 AND `level`=70; +UPDATE `creature_classlevelstats` SET `damage_exp2`=127.3828 WHERE `class`=2 AND `level`=71; +UPDATE `creature_classlevelstats` SET `damage_exp2`=131.2566 WHERE `class`=2 AND `level`=72; +UPDATE `creature_classlevelstats` SET `damage_exp2`=135.1304 WHERE `class`=2 AND `level`=73; +UPDATE `creature_classlevelstats` SET `damage_exp2`=139.0042 WHERE `class`=2 AND `level`=74; +UPDATE `creature_classlevelstats` SET `damage_exp2`=142.8780 WHERE `class`=2 AND `level`=75; +UPDATE `creature_classlevelstats` SET `damage_exp2`=146.8518 WHERE `class`=2 AND `level`=76; +UPDATE `creature_classlevelstats` SET `damage_exp2`=150.8256 WHERE `class`=2 AND `level`=77; +UPDATE `creature_classlevelstats` SET `damage_exp2`=154.7994 WHERE `class`=2 AND `level`=78; +UPDATE `creature_classlevelstats` SET `damage_exp2`=158.7732 WHERE `class`=2 AND `level`=79; +UPDATE `creature_classlevelstats` SET `damage_exp2`=162.7470 WHERE `class`=2 AND `level`=80; +UPDATE `creature_classlevelstats` SET `damage_exp2`=166.7208 WHERE `class`=2 AND `level`=81; +UPDATE `creature_classlevelstats` SET `damage_exp2`=170.6946 WHERE `class`=2 AND `level`=82; +UPDATE `creature_classlevelstats` SET `damage_exp2`=174.6684 WHERE `class`=2 AND `level`=83; + +UPDATE `creature_classlevelstats` SET `damage_exp2`=111.1744 WHERE `class`=4 AND `level`=67; +UPDATE `creature_classlevelstats` SET `damage_exp2`=115.2244 WHERE `class`=4 AND `level`=68; +UPDATE `creature_classlevelstats` SET `damage_exp2`=119.2744 WHERE `class`=4 AND `level`=69; +UPDATE `creature_classlevelstats` SET `damage_exp2`=123.3244 WHERE `class`=4 AND `level`=70; +UPDATE `creature_classlevelstats` SET `damage_exp2`=127.3744 WHERE `class`=4 AND `level`=71; +UPDATE `creature_classlevelstats` SET `damage_exp2`=131.4244 WHERE `class`=4 AND `level`=72; +UPDATE `creature_classlevelstats` SET `damage_exp2`=135.4744 WHERE `class`=4 AND `level`=73; +UPDATE `creature_classlevelstats` SET `damage_exp2`=139.5244 WHERE `class`=4 AND `level`=74; +UPDATE `creature_classlevelstats` SET `damage_exp2`=143.5744 WHERE `class`=4 AND `level`=75; +UPDATE `creature_classlevelstats` SET `damage_exp2`=147.6244 WHERE `class`=4 AND `level`=76; +UPDATE `creature_classlevelstats` SET `damage_exp2`=151.6744 WHERE `class`=4 AND `level`=77; +UPDATE `creature_classlevelstats` SET `damage_exp2`=155.7244 WHERE `class`=4 AND `level`=78; +UPDATE `creature_classlevelstats` SET `damage_exp2`=160.2582 WHERE `class`=4 AND `level`=79; +UPDATE `creature_classlevelstats` SET `damage_exp2`=164.9240 WHERE `class`=4 AND `level`=80; +UPDATE `creature_classlevelstats` SET `damage_exp2`=168.9740 WHERE `class`=4 AND `level`=81; +UPDATE `creature_classlevelstats` SET `damage_exp2`=173.0240 WHERE `class`=4 AND `level`=82; +UPDATE `creature_classlevelstats` SET `damage_exp2`=177.0740 WHERE `class`=4 AND `level`=83; + +UPDATE `creature_classlevelstats` SET `damage_exp2`=101.4332 WHERE `class`=8 AND `level`=67; +UPDATE `creature_classlevelstats` SET `damage_exp2`=105.3070 WHERE `class`=8 AND `level`=68; +UPDATE `creature_classlevelstats` SET `damage_exp2`=109.1808 WHERE `class`=8 AND `level`=69; +UPDATE `creature_classlevelstats` SET `damage_exp2`=113.0546 WHERE `class`=8 AND `level`=70; +UPDATE `creature_classlevelstats` SET `damage_exp2`=116.9284 WHERE `class`=8 AND `level`=71; +UPDATE `creature_classlevelstats` SET `damage_exp2`=120.8022 WHERE `class`=8 AND `level`=72; +UPDATE `creature_classlevelstats` SET `damage_exp2`=124.6760 WHERE `class`=8 AND `level`=73; +UPDATE `creature_classlevelstats` SET `damage_exp2`=128.5498 WHERE `class`=8 AND `level`=74; +UPDATE `creature_classlevelstats` SET `damage_exp2`=132.4236 WHERE `class`=8 AND `level`=75; +UPDATE `creature_classlevelstats` SET `damage_exp2`=136.2974 WHERE `class`=8 AND `level`=76; +UPDATE `creature_classlevelstats` SET `damage_exp2`=140.1712 WHERE `class`=8 AND `level`=77; +UPDATE `creature_classlevelstats` SET `damage_exp2`=144.0450 WHERE `class`=8 AND `level`=78; +UPDATE `creature_classlevelstats` SET `damage_exp2`=147.9188 WHERE `class`=8 AND `level`=79; +UPDATE `creature_classlevelstats` SET `damage_exp2`=152.5548 WHERE `class`=8 AND `level`=80; +UPDATE `creature_classlevelstats` SET `damage_exp2`=156.4286 WHERE `class`=8 AND `level`=81; +UPDATE `creature_classlevelstats` SET `damage_exp2`=160.3024 WHERE `class`=8 AND `level`=82; +UPDATE `creature_classlevelstats` SET `damage_exp2`=164.1762 WHERE `class`=8 AND `level`=83; diff --git a/sql/updates/world/2013_12_29_01_world_creature_classlevelstats.sql b/sql/updates/world/2013_12_29_01_world_creature_classlevelstats.sql new file mode 100644 index 00000000000..7d989f80072 --- /dev/null +++ b/sql/updates/world/2013_12_29_01_world_creature_classlevelstats.sql @@ -0,0 +1,71 @@ +UPDATE `creature_classlevelstats` SET `damage_exp1`=42.1353 WHERE `class`=1 AND `level`=57; +UPDATE `creature_classlevelstats` SET `damage_exp1`=46.9207 WHERE `class`=1 AND `level`=58; +UPDATE `creature_classlevelstats` SET `damage_exp1`=51.7061 WHERE `class`=1 AND `level`=59; +UPDATE `creature_classlevelstats` SET `damage_exp1`=56.4915 WHERE `class`=1 AND `level`=60; +UPDATE `creature_classlevelstats` SET `damage_exp1`=61.2769 WHERE `class`=1 AND `level`=61; +UPDATE `creature_classlevelstats` SET `damage_exp1`=66.0623 WHERE `class`=1 AND `level`=62; +UPDATE `creature_classlevelstats` SET `damage_exp1`=70.8477 WHERE `class`=1 AND `level`=63; +UPDATE `creature_classlevelstats` SET `damage_exp1`=75.6331 WHERE `class`=1 AND `level`=64; +UPDATE `creature_classlevelstats` SET `damage_exp1`=80.4185 WHERE `class`=1 AND `level`=65; +UPDATE `creature_classlevelstats` SET `damage_exp1`=85.2039 WHERE `class`=1 AND `level`=66; +UPDATE `creature_classlevelstats` SET `damage_exp1`=89.9893 WHERE `class`=1 AND `level`=67; +UPDATE `creature_classlevelstats` SET `damage_exp1`=94.7747 WHERE `class`=1 AND `level`=68; +UPDATE `creature_classlevelstats` SET `damage_exp1`=99.5601 WHERE `class`=1 AND `level`=69; +UPDATE `creature_classlevelstats` SET `damage_exp1`=104.3456 WHERE `class`=1 AND `level`=70; +UPDATE `creature_classlevelstats` SET `damage_exp1`=109.1310 WHERE `class`=1 AND `level`=71; +UPDATE `creature_classlevelstats` SET `damage_exp1`=113.9164 WHERE `class`=1 AND `level`=72; +UPDATE `creature_classlevelstats` SET `damage_exp1`=118.7018 WHERE `class`=1 AND `level`=73; + +UPDATE `creature_classlevelstats` SET `damage_exp1`=40.1830 WHERE `class`=2 AND `level`=57; +UPDATE `creature_classlevelstats` SET `damage_exp1`=44.7542 WHERE `class`=2 AND `level`=58; +UPDATE `creature_classlevelstats` SET `damage_exp1`=49.3254 WHERE `class`=2 AND `level`=59; +UPDATE `creature_classlevelstats` SET `damage_exp1`=53.8966 WHERE `class`=2 AND `level`=60; +UPDATE `creature_classlevelstats` SET `damage_exp1`=58.4678 WHERE `class`=2 AND `level`=61; +UPDATE `creature_classlevelstats` SET `damage_exp1`=63.4390 WHERE `class`=2 AND `level`=62; +UPDATE `creature_classlevelstats` SET `damage_exp1`=68.4102 WHERE `class`=2 AND `level`=63; +UPDATE `creature_classlevelstats` SET `damage_exp1`=73.3814 WHERE `class`=2 AND `level`=64; +UPDATE `creature_classlevelstats` SET `damage_exp1`=78.3526 WHERE `class`=2 AND `level`=65; +UPDATE `creature_classlevelstats` SET `damage_exp1`=83.3238 WHERE `class`=2 AND `level`=66; +UPDATE `creature_classlevelstats` SET `damage_exp1`=88.2950 WHERE `class`=2 AND `level`=67; +UPDATE `creature_classlevelstats` SET `damage_exp1`=93.2662 WHERE `class`=2 AND `level`=68; +UPDATE `creature_classlevelstats` SET `damage_exp1`=98.2376 WHERE `class`=2 AND `level`=69; +UPDATE `creature_classlevelstats` SET `damage_exp1`=103.0388 WHERE `class`=2 AND `level`=70; +UPDATE `creature_classlevelstats` SET `damage_exp1`=107.8400 WHERE `class`=2 AND `level`=71; +UPDATE `creature_classlevelstats` SET `damage_exp1`=112.6412 WHERE `class`=2 AND `level`=72; +UPDATE `creature_classlevelstats` SET `damage_exp1`=117.4424 WHERE `class`=2 AND `level`=73; + +UPDATE `creature_classlevelstats` SET `damage_exp1`=42.1353 WHERE `class`=4 AND `level`=57; +UPDATE `creature_classlevelstats` SET `damage_exp1`=46.9207 WHERE `class`=4 AND `level`=58; +UPDATE `creature_classlevelstats` SET `damage_exp1`=51.7061 WHERE `class`=4 AND `level`=59; +UPDATE `creature_classlevelstats` SET `damage_exp1`=56.4915 WHERE `class`=4 AND `level`=60; +UPDATE `creature_classlevelstats` SET `damage_exp1`=61.2769 WHERE `class`=4 AND `level`=61; +UPDATE `creature_classlevelstats` SET `damage_exp1`=66.0623 WHERE `class`=4 AND `level`=62; +UPDATE `creature_classlevelstats` SET `damage_exp1`=70.8477 WHERE `class`=4 AND `level`=63; +UPDATE `creature_classlevelstats` SET `damage_exp1`=75.6331 WHERE `class`=4 AND `level`=64; +UPDATE `creature_classlevelstats` SET `damage_exp1`=80.4185 WHERE `class`=4 AND `level`=65; +UPDATE `creature_classlevelstats` SET `damage_exp1`=85.2039 WHERE `class`=4 AND `level`=66; +UPDATE `creature_classlevelstats` SET `damage_exp1`=89.9893 WHERE `class`=4 AND `level`=67; +UPDATE `creature_classlevelstats` SET `damage_exp1`=94.7747 WHERE `class`=4 AND `level`=68; +UPDATE `creature_classlevelstats` SET `damage_exp1`=99.5601 WHERE `class`=4 AND `level`=69; +UPDATE `creature_classlevelstats` SET `damage_exp1`=104.3456 WHERE `class`=4 AND `level`=70; +UPDATE `creature_classlevelstats` SET `damage_exp1`=109.1310 WHERE `class`=4 AND `level`=71; +UPDATE `creature_classlevelstats` SET `damage_exp1`=113.9164 WHERE `class`=4 AND `level`=72; +UPDATE `creature_classlevelstats` SET `damage_exp1`=118.7018 WHERE `class`=4 AND `level`=73; + +UPDATE `creature_classlevelstats` SET `damage_exp1`=36.3127 WHERE `class`=8 AND `level`=57; +UPDATE `creature_classlevelstats` SET `damage_exp1`=40.8157 WHERE `class`=8 AND `level`=58; +UPDATE `creature_classlevelstats` SET `damage_exp1`=45.3187 WHERE `class`=8 AND `level`=59; +UPDATE `creature_classlevelstats` SET `damage_exp1`=49.8217 WHERE `class`=8 AND `level`=60; +UPDATE `creature_classlevelstats` SET `damage_exp1`=54.3247 WHERE `class`=8 AND `level`=61; +UPDATE `creature_classlevelstats` SET `damage_exp1`=58.8277 WHERE `class`=8 AND `level`=62; +UPDATE `creature_classlevelstats` SET `damage_exp1`=63.3307 WHERE `class`=8 AND `level`=63; +UPDATE `creature_classlevelstats` SET `damage_exp1`=67.8337 WHERE `class`=8 AND `level`=64; +UPDATE `creature_classlevelstats` SET `damage_exp1`=72.3367 WHERE `class`=8 AND `level`=65; +UPDATE `creature_classlevelstats` SET `damage_exp1`=76.8397 WHERE `class`=8 AND `level`=66; +UPDATE `creature_classlevelstats` SET `damage_exp1`=81.3427 WHERE `class`=8 AND `level`=67; +UPDATE `creature_classlevelstats` SET `damage_exp1`=85.8457 WHERE `class`=8 AND `level`=68; +UPDATE `creature_classlevelstats` SET `damage_exp1`=90.3487 WHERE `class`=8 AND `level`=69; +UPDATE `creature_classlevelstats` SET `damage_exp1`=94.8517 WHERE `class`=8 AND `level`=70; +UPDATE `creature_classlevelstats` SET `damage_exp1`=99.3547 WHERE `class`=8 AND `level`=71; +UPDATE `creature_classlevelstats` SET `damage_exp1`=103.8577 WHERE `class`=8 AND `level`=72; +UPDATE `creature_classlevelstats` SET `damage_exp1`=108.7978 WHERE `class`=8 AND `level`=73; diff --git a/sql/updates/world/2013_12_30_00_world_creature_classlevelstats.sql b/sql/updates/world/2013_12_30_00_world_creature_classlevelstats.sql new file mode 100644 index 00000000000..8974bcc025d --- /dev/null +++ b/sql/updates/world/2013_12_30_00_world_creature_classlevelstats.sql @@ -0,0 +1,479 @@ +UPDATE `creature_classlevelstats` SET `damage_base`=0.2500 WHERE `class`=1 AND `level`=1; +UPDATE `creature_classlevelstats` SET `damage_base`=0.5400 WHERE `class`=1 AND `level`=2; +UPDATE `creature_classlevelstats` SET `damage_base`=0.7400 WHERE `class`=1 AND `level`=3; +UPDATE `creature_classlevelstats` SET `damage_base`=0.9435 WHERE `class`=1 AND `level`=4; +UPDATE `creature_classlevelstats` SET `damage_base`=1.5000 WHERE `class`=1 AND `level`=5; +UPDATE `creature_classlevelstats` SET `damage_base`=2.2000 WHERE `class`=1 AND `level`=6; +UPDATE `creature_classlevelstats` SET `damage_base`=3.0000 WHERE `class`=1 AND `level`=7; +UPDATE `creature_classlevelstats` SET `damage_base`=4.3597 WHERE `class`=1 AND `level`=8; +UPDATE `creature_classlevelstats` SET `damage_base`=4.6993 WHERE `class`=1 AND `level`=9; +UPDATE `creature_classlevelstats` SET `damage_base`=4.8281 WHERE `class`=1 AND `level`=10; +UPDATE `creature_classlevelstats` SET `damage_base`=5.1609 WHERE `class`=1 AND `level`=11; +UPDATE `creature_classlevelstats` SET `damage_base`=5.6558 WHERE `class`=1 AND `level`=12; +UPDATE `creature_classlevelstats` SET `damage_base`=6.0221 WHERE `class`=1 AND `level`=13; +UPDATE `creature_classlevelstats` SET `damage_base`=6.6101 WHERE `class`=1 AND `level`=14; +UPDATE `creature_classlevelstats` SET `damage_base`=7.1981 WHERE `class`=1 AND `level`=15; +UPDATE `creature_classlevelstats` SET `damage_base`=7.7861 WHERE `class`=1 AND `level`=16; +UPDATE `creature_classlevelstats` SET `damage_base`=8.3741 WHERE `class`=1 AND `level`=17; +UPDATE `creature_classlevelstats` SET `damage_base`=8.9621 WHERE `class`=1 AND `level`=18; +UPDATE `creature_classlevelstats` SET `damage_base`=9.5501 WHERE `class`=1 AND `level`=19; +UPDATE `creature_classlevelstats` SET `damage_base`=10.1381 WHERE `class`=1 AND `level`=20; +UPDATE `creature_classlevelstats` SET `damage_base`=10.7261 WHERE `class`=1 AND `level`=21; +UPDATE `creature_classlevelstats` SET `damage_base`=11.3141 WHERE `class`=1 AND `level`=22; +UPDATE `creature_classlevelstats` SET `damage_base`=11.9021 WHERE `class`=1 AND `level`=23; +UPDATE `creature_classlevelstats` SET `damage_base`=12.4901 WHERE `class`=1 AND `level`=24; +UPDATE `creature_classlevelstats` SET `damage_base`=13.0781 WHERE `class`=1 AND `level`=25; +UPDATE `creature_classlevelstats` SET `damage_base`=13.6661 WHERE `class`=1 AND `level`=26; +UPDATE `creature_classlevelstats` SET `damage_base`=14.2541 WHERE `class`=1 AND `level`=27; +UPDATE `creature_classlevelstats` SET `damage_base`=14.8421 WHERE `class`=1 AND `level`=28; +UPDATE `creature_classlevelstats` SET `damage_base`=15.4301 WHERE `class`=1 AND `level`=29; +UPDATE `creature_classlevelstats` SET `damage_base`=16.0181 WHERE `class`=1 AND `level`=30; +UPDATE `creature_classlevelstats` SET `damage_base`=16.6061 WHERE `class`=1 AND `level`=31; +UPDATE `creature_classlevelstats` SET `damage_base`=17.1941 WHERE `class`=1 AND `level`=32; +UPDATE `creature_classlevelstats` SET `damage_base`=17.7821 WHERE `class`=1 AND `level`=33; +UPDATE `creature_classlevelstats` SET `damage_base`=18.3701 WHERE `class`=1 AND `level`=34; +UPDATE `creature_classlevelstats` SET `damage_base`=18.9581 WHERE `class`=1 AND `level`=35; +UPDATE `creature_classlevelstats` SET `damage_base`=19.5461 WHERE `class`=1 AND `level`=36; +UPDATE `creature_classlevelstats` SET `damage_base`=20.1341 WHERE `class`=1 AND `level`=37; +UPDATE `creature_classlevelstats` SET `damage_base`=20.7221 WHERE `class`=1 AND `level`=38; +UPDATE `creature_classlevelstats` SET `damage_base`=21.3101 WHERE `class`=1 AND `level`=39; +UPDATE `creature_classlevelstats` SET `damage_base`=21.8981 WHERE `class`=1 AND `level`=40; +UPDATE `creature_classlevelstats` SET `damage_base`=22.4861 WHERE `class`=1 AND `level`=41; +UPDATE `creature_classlevelstats` SET `damage_base`=23.0741 WHERE `class`=1 AND `level`=42; +UPDATE `creature_classlevelstats` SET `damage_base`=23.6621 WHERE `class`=1 AND `level`=43; +UPDATE `creature_classlevelstats` SET `damage_base`=24.2501 WHERE `class`=1 AND `level`=44; +UPDATE `creature_classlevelstats` SET `damage_base`=24.8381 WHERE `class`=1 AND `level`=45; +UPDATE `creature_classlevelstats` SET `damage_base`=25.4261 WHERE `class`=1 AND `level`=46; +UPDATE `creature_classlevelstats` SET `damage_base`=26.0141 WHERE `class`=1 AND `level`=47; +UPDATE `creature_classlevelstats` SET `damage_base`=26.6021 WHERE `class`=1 AND `level`=48; +UPDATE `creature_classlevelstats` SET `damage_base`=27.1901 WHERE `class`=1 AND `level`=49; +UPDATE `creature_classlevelstats` SET `damage_base`=27.7781 WHERE `class`=1 AND `level`=50; +UPDATE `creature_classlevelstats` SET `damage_base`=28.3661 WHERE `class`=1 AND `level`=51; +UPDATE `creature_classlevelstats` SET `damage_base`=28.9541 WHERE `class`=1 AND `level`=52; +UPDATE `creature_classlevelstats` SET `damage_base`=29.5421 WHERE `class`=1 AND `level`=53; +UPDATE `creature_classlevelstats` SET `damage_base`=30.1301 WHERE `class`=1 AND `level`=54; +UPDATE `creature_classlevelstats` SET `damage_base`=30.7177 WHERE `class`=1 AND `level`=55; +UPDATE `creature_classlevelstats` SET `damage_base`=31.3057 WHERE `class`=1 AND `level`=56; +UPDATE `creature_classlevelstats` SET `damage_base`=31.8937 WHERE `class`=1 AND `level`=57; +UPDATE `creature_classlevelstats` SET `damage_base`=32.4817 WHERE `class`=1 AND `level`=58; +UPDATE `creature_classlevelstats` SET `damage_base`=33.0697 WHERE `class`=1 AND `level`=59; +UPDATE `creature_classlevelstats` SET `damage_base`=33.6577 WHERE `class`=1 AND `level`=60; +UPDATE `creature_classlevelstats` SET `damage_base`=34.2457 WHERE `class`=1 AND `level`=61; +UPDATE `creature_classlevelstats` SET `damage_base`=34.8337 WHERE `class`=1 AND `level`=62; +UPDATE `creature_classlevelstats` SET `damage_base`=35.4217 WHERE `class`=1 AND `level`=63; +UPDATE `creature_classlevelstats` SET `damage_base`=36.0097 WHERE `class`=1 AND `level`=64; +UPDATE `creature_classlevelstats` SET `damage_base`=36.5977 WHERE `class`=1 AND `level`=65; +UPDATE `creature_classlevelstats` SET `damage_base`=37.1857 WHERE `class`=1 AND `level`=66; +UPDATE `creature_classlevelstats` SET `damage_base`=37.7737 WHERE `class`=1 AND `level`=67; +UPDATE `creature_classlevelstats` SET `damage_base`=38.3617 WHERE `class`=1 AND `level`=68; +UPDATE `creature_classlevelstats` SET `damage_base`=38.9497 WHERE `class`=1 AND `level`=69; +UPDATE `creature_classlevelstats` SET `damage_base`=39.5377 WHERE `class`=1 AND `level`=70; +UPDATE `creature_classlevelstats` SET `damage_base`=40.1257 WHERE `class`=1 AND `level`=71; +UPDATE `creature_classlevelstats` SET `damage_base`=40.7137 WHERE `class`=1 AND `level`=72; +UPDATE `creature_classlevelstats` SET `damage_base`=41.3017 WHERE `class`=1 AND `level`=73; +UPDATE `creature_classlevelstats` SET `damage_base`=41.8897 WHERE `class`=1 AND `level`=74; +UPDATE `creature_classlevelstats` SET `damage_base`=42.4777 WHERE `class`=1 AND `level`=75; +UPDATE `creature_classlevelstats` SET `damage_base`=43.0657 WHERE `class`=1 AND `level`=76; +UPDATE `creature_classlevelstats` SET `damage_base`=43.6537 WHERE `class`=1 AND `level`=77; +UPDATE `creature_classlevelstats` SET `damage_base`=44.2417 WHERE `class`=1 AND `level`=78; +UPDATE `creature_classlevelstats` SET `damage_base`=44.8297 WHERE `class`=1 AND `level`=79; +UPDATE `creature_classlevelstats` SET `damage_base`=45.4177 WHERE `class`=1 AND `level`=80; +UPDATE `creature_classlevelstats` SET `damage_base`=46.0057 WHERE `class`=1 AND `level`=81; +UPDATE `creature_classlevelstats` SET `damage_base`=46.5937 WHERE `class`=1 AND `level`=82; +UPDATE `creature_classlevelstats` SET `damage_base`=47.1817 WHERE `class`=1 AND `level`=83; + +UPDATE `creature_classlevelstats` SET `damage_base`=0.2500 WHERE `class`=2 AND `level`=1; +UPDATE `creature_classlevelstats` SET `damage_base`=0.5400 WHERE `class`=2 AND `level`=2; +UPDATE `creature_classlevelstats` SET `damage_base`=0.7400 WHERE `class`=2 AND `level`=3; +UPDATE `creature_classlevelstats` SET `damage_base`=0.9435 WHERE `class`=2 AND `level`=4; +UPDATE `creature_classlevelstats` SET `damage_base`=1.5000 WHERE `class`=2 AND `level`=5; +UPDATE `creature_classlevelstats` SET `damage_base`=2.2000 WHERE `class`=2 AND `level`=6; +UPDATE `creature_classlevelstats` SET `damage_base`=3.0000 WHERE `class`=2 AND `level`=7; +UPDATE `creature_classlevelstats` SET `damage_base`=4.3597 WHERE `class`=2 AND `level`=8; +UPDATE `creature_classlevelstats` SET `damage_base`=4.6993 WHERE `class`=2 AND `level`=9; +UPDATE `creature_classlevelstats` SET `damage_base`=4.8281 WHERE `class`=2 AND `level`=10; +UPDATE `creature_classlevelstats` SET `damage_base`=5.1609 WHERE `class`=2 AND `level`=11; +UPDATE `creature_classlevelstats` SET `damage_base`=5.6558 WHERE `class`=2 AND `level`=12; +UPDATE `creature_classlevelstats` SET `damage_base`=5.4575 WHERE `class`=2 AND `level`=13; +UPDATE `creature_classlevelstats` SET `damage_base`=5.9573 WHERE `class`=2 AND `level`=14; +UPDATE `creature_classlevelstats` SET `damage_base`=6.4571 WHERE `class`=2 AND `level`=15; +UPDATE `creature_classlevelstats` SET `damage_base`=6.9569 WHERE `class`=2 AND `level`=16; +UPDATE `creature_classlevelstats` SET `damage_base`=7.4567 WHERE `class`=2 AND `level`=17; +UPDATE `creature_classlevelstats` SET `damage_base`=7.9565 WHERE `class`=2 AND `level`=18; +UPDATE `creature_classlevelstats` SET `damage_base`=8.4563 WHERE `class`=2 AND `level`=19; +UPDATE `creature_classlevelstats` SET `damage_base`=8.9561 WHERE `class`=2 AND `level`=20; +UPDATE `creature_classlevelstats` SET `damage_base`=9.3521 WHERE `class`=2 AND `level`=21; +UPDATE `creature_classlevelstats` SET `damage_base`=9.7481 WHERE `class`=2 AND `level`=22; +UPDATE `creature_classlevelstats` SET `damage_base`=10.1441 WHERE `class`=2 AND `level`=23; +UPDATE `creature_classlevelstats` SET `damage_base`=10.5401 WHERE `class`=2 AND `level`=24; +UPDATE `creature_classlevelstats` SET `damage_base`=10.9361 WHERE `class`=2 AND `level`=25; +UPDATE `creature_classlevelstats` SET `damage_base`=11.3321 WHERE `class`=2 AND `level`=26; +UPDATE `creature_classlevelstats` SET `damage_base`=11.7281 WHERE `class`=2 AND `level`=27; +UPDATE `creature_classlevelstats` SET `damage_base`=12.1241 WHERE `class`=2 AND `level`=28; +UPDATE `creature_classlevelstats` SET `damage_base`=12.5201 WHERE `class`=2 AND `level`=29; +UPDATE `creature_classlevelstats` SET `damage_base`=12.9161 WHERE `class`=2 AND `level`=30; +UPDATE `creature_classlevelstats` SET `damage_base`=13.3121 WHERE `class`=2 AND `level`=31; +UPDATE `creature_classlevelstats` SET `damage_base`=13.7081 WHERE `class`=2 AND `level`=32; +UPDATE `creature_classlevelstats` SET `damage_base`=14.1041 WHERE `class`=2 AND `level`=33; +UPDATE `creature_classlevelstats` SET `damage_base`=14.5001 WHERE `class`=2 AND `level`=34; +UPDATE `creature_classlevelstats` SET `damage_base`=14.8961 WHERE `class`=2 AND `level`=35; +UPDATE `creature_classlevelstats` SET `damage_base`=15.2921 WHERE `class`=2 AND `level`=36; +UPDATE `creature_classlevelstats` SET `damage_base`=15.6881 WHERE `class`=2 AND `level`=37; +UPDATE `creature_classlevelstats` SET `damage_base`=16.0841 WHERE `class`=2 AND `level`=38; +UPDATE `creature_classlevelstats` SET `damage_base`=16.4801 WHERE `class`=2 AND `level`=39; +UPDATE `creature_classlevelstats` SET `damage_base`=16.8754 WHERE `class`=2 AND `level`=40; +UPDATE `creature_classlevelstats` SET `damage_base`=17.6408 WHERE `class`=2 AND `level`=41; +UPDATE `creature_classlevelstats` SET `damage_base`=18.4062 WHERE `class`=2 AND `level`=42; +UPDATE `creature_classlevelstats` SET `damage_base`=19.1716 WHERE `class`=2 AND `level`=43; +UPDATE `creature_classlevelstats` SET `damage_base`=19.9370 WHERE `class`=2 AND `level`=44; +UPDATE `creature_classlevelstats` SET `damage_base`=20.7024 WHERE `class`=2 AND `level`=45; +UPDATE `creature_classlevelstats` SET `damage_base`=21.4678 WHERE `class`=2 AND `level`=46; +UPDATE `creature_classlevelstats` SET `damage_base`=22.2332 WHERE `class`=2 AND `level`=47; +UPDATE `creature_classlevelstats` SET `damage_base`=22.9986 WHERE `class`=2 AND `level`=48; +UPDATE `creature_classlevelstats` SET `damage_base`=23.7640 WHERE `class`=2 AND `level`=49; +UPDATE `creature_classlevelstats` SET `damage_base`=24.5294 WHERE `class`=2 AND `level`=50; +UPDATE `creature_classlevelstats` SET `damage_base`=25.2948 WHERE `class`=2 AND `level`=51; +UPDATE `creature_classlevelstats` SET `damage_base`=26.0602 WHERE `class`=2 AND `level`=52; +UPDATE `creature_classlevelstats` SET `damage_base`=26.8256 WHERE `class`=2 AND `level`=53; +UPDATE `creature_classlevelstats` SET `damage_base`=27.5910 WHERE `class`=2 AND `level`=54; +UPDATE `creature_classlevelstats` SET `damage_base`=28.3567 WHERE `class`=2 AND `level`=55; +UPDATE `creature_classlevelstats` SET `damage_base`=28.9221 WHERE `class`=2 AND `level`=56; +UPDATE `creature_classlevelstats` SET `damage_base`=29.4875 WHERE `class`=2 AND `level`=57; +UPDATE `creature_classlevelstats` SET `damage_base`=30.0529 WHERE `class`=2 AND `level`=58; +UPDATE `creature_classlevelstats` SET `damage_base`=30.6183 WHERE `class`=2 AND `level`=59; +UPDATE `creature_classlevelstats` SET `damage_base`=31.1837 WHERE `class`=2 AND `level`=60; +UPDATE `creature_classlevelstats` SET `damage_base`=31.7491 WHERE `class`=2 AND `level`=61; +UPDATE `creature_classlevelstats` SET `damage_base`=32.3145 WHERE `class`=2 AND `level`=62; +UPDATE `creature_classlevelstats` SET `damage_base`=32.8799 WHERE `class`=2 AND `level`=63; +UPDATE `creature_classlevelstats` SET `damage_base`=33.4453 WHERE `class`=2 AND `level`=64; +UPDATE `creature_classlevelstats` SET `damage_base`=34.0107 WHERE `class`=2 AND `level`=65; +UPDATE `creature_classlevelstats` SET `damage_base`=34.5761 WHERE `class`=2 AND `level`=66; +UPDATE `creature_classlevelstats` SET `damage_base`=35.1415 WHERE `class`=2 AND `level`=67; +UPDATE `creature_classlevelstats` SET `damage_base`=35.7069 WHERE `class`=2 AND `level`=68; +UPDATE `creature_classlevelstats` SET `damage_base`=36.2723 WHERE `class`=2 AND `level`=69; +UPDATE `creature_classlevelstats` SET `damage_base`=36.8377 WHERE `class`=2 AND `level`=70; +UPDATE `creature_classlevelstats` SET `damage_base`=37.4031 WHERE `class`=2 AND `level`=71; +UPDATE `creature_classlevelstats` SET `damage_base`=37.9685 WHERE `class`=2 AND `level`=72; +UPDATE `creature_classlevelstats` SET `damage_base`=38.5339 WHERE `class`=2 AND `level`=73; +UPDATE `creature_classlevelstats` SET `damage_base`=39.0993 WHERE `class`=2 AND `level`=74; +UPDATE `creature_classlevelstats` SET `damage_base`=39.6647 WHERE `class`=2 AND `level`=75; +UPDATE `creature_classlevelstats` SET `damage_base`=40.2301 WHERE `class`=2 AND `level`=76; +UPDATE `creature_classlevelstats` SET `damage_base`=40.7955 WHERE `class`=2 AND `level`=77; +UPDATE `creature_classlevelstats` SET `damage_base`=41.3609 WHERE `class`=2 AND `level`=78; +UPDATE `creature_classlevelstats` SET `damage_base`=41.9263 WHERE `class`=2 AND `level`=79; +UPDATE `creature_classlevelstats` SET `damage_base`=42.4917 WHERE `class`=2 AND `level`=80; +UPDATE `creature_classlevelstats` SET `damage_base`=43.0571 WHERE `class`=2 AND `level`=81; +UPDATE `creature_classlevelstats` SET `damage_base`=43.6225 WHERE `class`=2 AND `level`=82; +UPDATE `creature_classlevelstats` SET `damage_base`=44.1879 WHERE `class`=2 AND `level`=83; + +UPDATE `creature_classlevelstats` SET `damage_base`=0.2500 WHERE `class`=4 AND `level`=1; +UPDATE `creature_classlevelstats` SET `damage_base`=0.5400 WHERE `class`=4 AND `level`=2; +UPDATE `creature_classlevelstats` SET `damage_base`=0.7400 WHERE `class`=4 AND `level`=3; +UPDATE `creature_classlevelstats` SET `damage_base`=0.9435 WHERE `class`=4 AND `level`=4; +UPDATE `creature_classlevelstats` SET `damage_base`=1.5000 WHERE `class`=4 AND `level`=5; +UPDATE `creature_classlevelstats` SET `damage_base`=2.2000 WHERE `class`=4 AND `level`=6; +UPDATE `creature_classlevelstats` SET `damage_base`=3.0000 WHERE `class`=4 AND `level`=7; +UPDATE `creature_classlevelstats` SET `damage_base`=4.3597 WHERE `class`=4 AND `level`=8; +UPDATE `creature_classlevelstats` SET `damage_base`=4.6993 WHERE `class`=4 AND `level`=9; +UPDATE `creature_classlevelstats` SET `damage_base`=4.8281 WHERE `class`=4 AND `level`=10; +UPDATE `creature_classlevelstats` SET `damage_base`=5.1609 WHERE `class`=4 AND `level`=11; +UPDATE `creature_classlevelstats` SET `damage_base`=5.6558 WHERE `class`=4 AND `level`=12; +UPDATE `creature_classlevelstats` SET `damage_base`=6.0221 WHERE `class`=4 AND `level`=13; +UPDATE `creature_classlevelstats` SET `damage_base`=6.6101 WHERE `class`=4 AND `level`=14; +UPDATE `creature_classlevelstats` SET `damage_base`=7.1981 WHERE `class`=4 AND `level`=15; +UPDATE `creature_classlevelstats` SET `damage_base`=7.7861 WHERE `class`=4 AND `level`=16; +UPDATE `creature_classlevelstats` SET `damage_base`=8.3741 WHERE `class`=4 AND `level`=17; +UPDATE `creature_classlevelstats` SET `damage_base`=8.9621 WHERE `class`=4 AND `level`=18; +UPDATE `creature_classlevelstats` SET `damage_base`=9.5501 WHERE `class`=4 AND `level`=19; +UPDATE `creature_classlevelstats` SET `damage_base`=10.1381 WHERE `class`=4 AND `level`=20; +UPDATE `creature_classlevelstats` SET `damage_base`=10.7261 WHERE `class`=4 AND `level`=21; +UPDATE `creature_classlevelstats` SET `damage_base`=11.3141 WHERE `class`=4 AND `level`=22; +UPDATE `creature_classlevelstats` SET `damage_base`=11.9021 WHERE `class`=4 AND `level`=23; +UPDATE `creature_classlevelstats` SET `damage_base`=12.4901 WHERE `class`=4 AND `level`=24; +UPDATE `creature_classlevelstats` SET `damage_base`=13.0781 WHERE `class`=4 AND `level`=25; +UPDATE `creature_classlevelstats` SET `damage_base`=13.6661 WHERE `class`=4 AND `level`=26; +UPDATE `creature_classlevelstats` SET `damage_base`=14.2541 WHERE `class`=4 AND `level`=27; +UPDATE `creature_classlevelstats` SET `damage_base`=14.8421 WHERE `class`=4 AND `level`=28; +UPDATE `creature_classlevelstats` SET `damage_base`=15.4301 WHERE `class`=4 AND `level`=29; +UPDATE `creature_classlevelstats` SET `damage_base`=16.0181 WHERE `class`=4 AND `level`=30; +UPDATE `creature_classlevelstats` SET `damage_base`=16.6061 WHERE `class`=4 AND `level`=31; +UPDATE `creature_classlevelstats` SET `damage_base`=17.1941 WHERE `class`=4 AND `level`=32; +UPDATE `creature_classlevelstats` SET `damage_base`=17.7821 WHERE `class`=4 AND `level`=33; +UPDATE `creature_classlevelstats` SET `damage_base`=18.3701 WHERE `class`=4 AND `level`=34; +UPDATE `creature_classlevelstats` SET `damage_base`=18.9581 WHERE `class`=4 AND `level`=35; +UPDATE `creature_classlevelstats` SET `damage_base`=19.5461 WHERE `class`=4 AND `level`=36; +UPDATE `creature_classlevelstats` SET `damage_base`=20.1341 WHERE `class`=4 AND `level`=37; +UPDATE `creature_classlevelstats` SET `damage_base`=20.7221 WHERE `class`=4 AND `level`=38; +UPDATE `creature_classlevelstats` SET `damage_base`=21.3101 WHERE `class`=4 AND `level`=39; +UPDATE `creature_classlevelstats` SET `damage_base`=21.8981 WHERE `class`=4 AND `level`=40; +UPDATE `creature_classlevelstats` SET `damage_base`=22.4861 WHERE `class`=4 AND `level`=41; +UPDATE `creature_classlevelstats` SET `damage_base`=23.0741 WHERE `class`=4 AND `level`=42; +UPDATE `creature_classlevelstats` SET `damage_base`=23.6621 WHERE `class`=4 AND `level`=43; +UPDATE `creature_classlevelstats` SET `damage_base`=24.2501 WHERE `class`=4 AND `level`=44; +UPDATE `creature_classlevelstats` SET `damage_base`=24.8381 WHERE `class`=4 AND `level`=45; +UPDATE `creature_classlevelstats` SET `damage_base`=25.4261 WHERE `class`=4 AND `level`=46; +UPDATE `creature_classlevelstats` SET `damage_base`=26.0141 WHERE `class`=4 AND `level`=47; +UPDATE `creature_classlevelstats` SET `damage_base`=26.6021 WHERE `class`=4 AND `level`=48; +UPDATE `creature_classlevelstats` SET `damage_base`=27.1901 WHERE `class`=4 AND `level`=49; +UPDATE `creature_classlevelstats` SET `damage_base`=27.7781 WHERE `class`=4 AND `level`=50; +UPDATE `creature_classlevelstats` SET `damage_base`=28.3661 WHERE `class`=4 AND `level`=51; +UPDATE `creature_classlevelstats` SET `damage_base`=28.9541 WHERE `class`=4 AND `level`=52; +UPDATE `creature_classlevelstats` SET `damage_base`=29.5421 WHERE `class`=4 AND `level`=53; +UPDATE `creature_classlevelstats` SET `damage_base`=30.1301 WHERE `class`=4 AND `level`=54; +UPDATE `creature_classlevelstats` SET `damage_base`=30.7177 WHERE `class`=4 AND `level`=55; +UPDATE `creature_classlevelstats` SET `damage_base`=31.3057 WHERE `class`=4 AND `level`=56; +UPDATE `creature_classlevelstats` SET `damage_base`=31.8937 WHERE `class`=4 AND `level`=57; +UPDATE `creature_classlevelstats` SET `damage_base`=32.4817 WHERE `class`=4 AND `level`=58; +UPDATE `creature_classlevelstats` SET `damage_base`=33.0697 WHERE `class`=4 AND `level`=59; +UPDATE `creature_classlevelstats` SET `damage_base`=33.6577 WHERE `class`=4 AND `level`=60; +UPDATE `creature_classlevelstats` SET `damage_base`=34.2457 WHERE `class`=4 AND `level`=61; +UPDATE `creature_classlevelstats` SET `damage_base`=34.8337 WHERE `class`=4 AND `level`=62; +UPDATE `creature_classlevelstats` SET `damage_base`=35.4217 WHERE `class`=4 AND `level`=63; +UPDATE `creature_classlevelstats` SET `damage_base`=36.0097 WHERE `class`=4 AND `level`=64; +UPDATE `creature_classlevelstats` SET `damage_base`=36.5977 WHERE `class`=4 AND `level`=65; +UPDATE `creature_classlevelstats` SET `damage_base`=37.1857 WHERE `class`=4 AND `level`=66; +UPDATE `creature_classlevelstats` SET `damage_base`=37.7737 WHERE `class`=4 AND `level`=67; +UPDATE `creature_classlevelstats` SET `damage_base`=38.3617 WHERE `class`=4 AND `level`=68; +UPDATE `creature_classlevelstats` SET `damage_base`=38.9497 WHERE `class`=4 AND `level`=69; +UPDATE `creature_classlevelstats` SET `damage_base`=39.5377 WHERE `class`=4 AND `level`=70; +UPDATE `creature_classlevelstats` SET `damage_base`=40.1257 WHERE `class`=4 AND `level`=71; +UPDATE `creature_classlevelstats` SET `damage_base`=40.7137 WHERE `class`=4 AND `level`=72; +UPDATE `creature_classlevelstats` SET `damage_base`=41.3017 WHERE `class`=4 AND `level`=73; +UPDATE `creature_classlevelstats` SET `damage_base`=41.8897 WHERE `class`=4 AND `level`=74; +UPDATE `creature_classlevelstats` SET `damage_base`=42.4777 WHERE `class`=4 AND `level`=75; +UPDATE `creature_classlevelstats` SET `damage_base`=43.0657 WHERE `class`=4 AND `level`=76; +UPDATE `creature_classlevelstats` SET `damage_base`=43.6537 WHERE `class`=4 AND `level`=77; +UPDATE `creature_classlevelstats` SET `damage_base`=44.2417 WHERE `class`=4 AND `level`=78; +UPDATE `creature_classlevelstats` SET `damage_base`=44.8297 WHERE `class`=4 AND `level`=79; +UPDATE `creature_classlevelstats` SET `damage_base`=45.4177 WHERE `class`=4 AND `level`=80; +UPDATE `creature_classlevelstats` SET `damage_base`=46.0057 WHERE `class`=4 AND `level`=81; +UPDATE `creature_classlevelstats` SET `damage_base`=46.5937 WHERE `class`=4 AND `level`=82; +UPDATE `creature_classlevelstats` SET `damage_base`=47.1817 WHERE `class`=4 AND `level`=83; + +UPDATE `creature_classlevelstats` SET `damage_base`=0.2500 WHERE `class`=8 AND `level`=1; +UPDATE `creature_classlevelstats` SET `damage_base`=0.5400 WHERE `class`=8 AND `level`=2; +UPDATE `creature_classlevelstats` SET `damage_base`=0.7400 WHERE `class`=8 AND `level`=3; +UPDATE `creature_classlevelstats` SET `damage_base`=0.9435 WHERE `class`=8 AND `level`=4; +UPDATE `creature_classlevelstats` SET `damage_base`=1.5000 WHERE `class`=8 AND `level`=5; +UPDATE `creature_classlevelstats` SET `damage_base`=2.2000 WHERE `class`=8 AND `level`=6; +UPDATE `creature_classlevelstats` SET `damage_base`=3.0000 WHERE `class`=8 AND `level`=7; +UPDATE `creature_classlevelstats` SET `damage_base`=4.3597 WHERE `class`=8 AND `level`=8; +UPDATE `creature_classlevelstats` SET `damage_base`=4.6993 WHERE `class`=8 AND `level`=9; +UPDATE `creature_classlevelstats` SET `damage_base`=4.8281 WHERE `class`=8 AND `level`=10; +UPDATE `creature_classlevelstats` SET `damage_base`=5.1609 WHERE `class`=8 AND `level`=11; +UPDATE `creature_classlevelstats` SET `damage_base`=5.6558 WHERE `class`=8 AND `level`=12; +UPDATE `creature_classlevelstats` SET `damage_base`=5.8075 WHERE `class`=8 AND `level`=13; +UPDATE `creature_classlevelstats` SET `damage_base`=6.0953 WHERE `class`=8 AND `level`=14; +UPDATE `creature_classlevelstats` SET `damage_base`=6.6583 WHERE `class`=8 AND `level`=15; +UPDATE `creature_classlevelstats` SET `damage_base`=7.0945 WHERE `class`=8 AND `level`=16; +UPDATE `creature_classlevelstats` SET `damage_base`=7.6058 WHERE `class`=8 AND `level`=17; +UPDATE `creature_classlevelstats` SET `damage_base`=7.9043 WHERE `class`=8 AND `level`=18; +UPDATE `creature_classlevelstats` SET `damage_base`=8.3806 WHERE `class`=8 AND `level`=19; +UPDATE `creature_classlevelstats` SET `damage_base`=8.9561 WHERE `class`=8 AND `level`=20; +UPDATE `creature_classlevelstats` SET `damage_base`=9.2202 WHERE `class`=8 AND `level`=21; +UPDATE `creature_classlevelstats` SET `damage_base`=9.5228 WHERE `class`=8 AND `level`=22; +UPDATE `creature_classlevelstats` SET `damage_base`=9.8254 WHERE `class`=8 AND `level`=23; +UPDATE `creature_classlevelstats` SET `damage_base`=10.1280 WHERE `class`=8 AND `level`=24; +UPDATE `creature_classlevelstats` SET `damage_base`=10.4306 WHERE `class`=8 AND `level`=25; +UPDATE `creature_classlevelstats` SET `damage_base`=10.7332 WHERE `class`=8 AND `level`=26; +UPDATE `creature_classlevelstats` SET `damage_base`=11.0358 WHERE `class`=8 AND `level`=27; +UPDATE `creature_classlevelstats` SET `damage_base`=11.3384 WHERE `class`=8 AND `level`=28; +UPDATE `creature_classlevelstats` SET `damage_base`=11.6410 WHERE `class`=8 AND `level`=29; +UPDATE `creature_classlevelstats` SET `damage_base`=11.9436 WHERE `class`=8 AND `level`=30; +UPDATE `creature_classlevelstats` SET `damage_base`=12.2462 WHERE `class`=8 AND `level`=31; +UPDATE `creature_classlevelstats` SET `damage_base`=12.5488 WHERE `class`=8 AND `level`=32; +UPDATE `creature_classlevelstats` SET `damage_base`=12.8514 WHERE `class`=8 AND `level`=33; +UPDATE `creature_classlevelstats` SET `damage_base`=13.1540 WHERE `class`=8 AND `level`=34; +UPDATE `creature_classlevelstats` SET `damage_base`=13.4567 WHERE `class`=8 AND `level`=35; +UPDATE `creature_classlevelstats` SET `damage_base`=14.0678 WHERE `class`=8 AND `level`=36; +UPDATE `creature_classlevelstats` SET `damage_base`=14.6789 WHERE `class`=8 AND `level`=37; +UPDATE `creature_classlevelstats` SET `damage_base`=15.2900 WHERE `class`=8 AND `level`=38; +UPDATE `creature_classlevelstats` SET `damage_base`=15.9011 WHERE `class`=8 AND `level`=39; +UPDATE `creature_classlevelstats` SET `damage_base`=16.5122 WHERE `class`=8 AND `level`=40; +UPDATE `creature_classlevelstats` SET `damage_base`=17.1233 WHERE `class`=8 AND `level`=41; +UPDATE `creature_classlevelstats` SET `damage_base`=17.7344 WHERE `class`=8 AND `level`=42; +UPDATE `creature_classlevelstats` SET `damage_base`=18.3455 WHERE `class`=8 AND `level`=43; +UPDATE `creature_classlevelstats` SET `damage_base`=18.9566 WHERE `class`=8 AND `level`=44; +UPDATE `creature_classlevelstats` SET `damage_base`=19.5677 WHERE `class`=8 AND `level`=45; +UPDATE `creature_classlevelstats` SET `damage_base`=20.1788 WHERE `class`=8 AND `level`=46; +UPDATE `creature_classlevelstats` SET `damage_base`=20.7899 WHERE `class`=8 AND `level`=47; +UPDATE `creature_classlevelstats` SET `damage_base`=21.4010 WHERE `class`=8 AND `level`=48; +UPDATE `creature_classlevelstats` SET `damage_base`=22.0121 WHERE `class`=8 AND `level`=49; +UPDATE `creature_classlevelstats` SET `damage_base`=22.6232 WHERE `class`=8 AND `level`=50; +UPDATE `creature_classlevelstats` SET `damage_base`=23.2343 WHERE `class`=8 AND `level`=51; +UPDATE `creature_classlevelstats` SET `damage_base`=23.8454 WHERE `class`=8 AND `level`=52; +UPDATE `creature_classlevelstats` SET `damage_base`=24.4565 WHERE `class`=8 AND `level`=53; +UPDATE `creature_classlevelstats` SET `damage_base`=25.0676 WHERE `class`=8 AND `level`=54; +UPDATE `creature_classlevelstats` SET `damage_base`=25.6787 WHERE `class`=8 AND `level`=55; +UPDATE `creature_classlevelstats` SET `damage_base`=26.2898 WHERE `class`=8 AND `level`=56; +UPDATE `creature_classlevelstats` SET `damage_base`=26.9009 WHERE `class`=8 AND `level`=57; +UPDATE `creature_classlevelstats` SET `damage_base`=27.5120 WHERE `class`=8 AND `level`=58; +UPDATE `creature_classlevelstats` SET `damage_base`=28.1234 WHERE `class`=8 AND `level`=59; +UPDATE `creature_classlevelstats` SET `damage_base`=28.7345 WHERE `class`=8 AND `level`=60; +UPDATE `creature_classlevelstats` SET `damage_base`=29.3456 WHERE `class`=8 AND `level`=61; +UPDATE `creature_classlevelstats` SET `damage_base`=29.9567 WHERE `class`=8 AND `level`=62; +UPDATE `creature_classlevelstats` SET `damage_base`=30.5678 WHERE `class`=8 AND `level`=63; +UPDATE `creature_classlevelstats` SET `damage_base`=31.1789 WHERE `class`=8 AND `level`=64; +UPDATE `creature_classlevelstats` SET `damage_base`=31.7900 WHERE `class`=8 AND `level`=65; +UPDATE `creature_classlevelstats` SET `damage_base`=32.4011 WHERE `class`=8 AND `level`=66; +UPDATE `creature_classlevelstats` SET `damage_base`=33.0122 WHERE `class`=8 AND `level`=67; +UPDATE `creature_classlevelstats` SET `damage_base`=33.6233 WHERE `class`=8 AND `level`=68; +UPDATE `creature_classlevelstats` SET `damage_base`=34.2344 WHERE `class`=8 AND `level`=69; +UPDATE `creature_classlevelstats` SET `damage_base`=34.8455 WHERE `class`=8 AND `level`=70; +UPDATE `creature_classlevelstats` SET `damage_base`=35.4566 WHERE `class`=8 AND `level`=71; +UPDATE `creature_classlevelstats` SET `damage_base`=36.0677 WHERE `class`=8 AND `level`=72; +UPDATE `creature_classlevelstats` SET `damage_base`=36.6788 WHERE `class`=8 AND `level`=73; +UPDATE `creature_classlevelstats` SET `damage_base`=37.2899 WHERE `class`=8 AND `level`=74; +UPDATE `creature_classlevelstats` SET `damage_base`=37.9010 WHERE `class`=8 AND `level`=75; +UPDATE `creature_classlevelstats` SET `damage_base`=38.5121 WHERE `class`=8 AND `level`=76; +UPDATE `creature_classlevelstats` SET `damage_base`=39.1232 WHERE `class`=8 AND `level`=77; +UPDATE `creature_classlevelstats` SET `damage_base`=39.7343 WHERE `class`=8 AND `level`=78; +UPDATE `creature_classlevelstats` SET `damage_base`=40.3454 WHERE `class`=8 AND `level`=79; +UPDATE `creature_classlevelstats` SET `damage_base`=40.9565 WHERE `class`=8 AND `level`=80; +UPDATE `creature_classlevelstats` SET `damage_base`=41.5676 WHERE `class`=8 AND `level`=81; +UPDATE `creature_classlevelstats` SET `damage_base`=42.1787 WHERE `class`=8 AND `level`=82; +UPDATE `creature_classlevelstats` SET `damage_base`=42.7898 WHERE `class`=8 AND `level`=83; + +UPDATE `creature_classlevelstats` SET `damage_exp1`=42.1353 WHERE `class`=1 AND `level`=57; +UPDATE `creature_classlevelstats` SET `damage_exp1`=46.9207 WHERE `class`=1 AND `level`=58; +UPDATE `creature_classlevelstats` SET `damage_exp1`=51.7061 WHERE `class`=1 AND `level`=59; +UPDATE `creature_classlevelstats` SET `damage_exp1`=56.4915 WHERE `class`=1 AND `level`=60; +UPDATE `creature_classlevelstats` SET `damage_exp1`=61.2769 WHERE `class`=1 AND `level`=61; +UPDATE `creature_classlevelstats` SET `damage_exp1`=66.0623 WHERE `class`=1 AND `level`=62; +UPDATE `creature_classlevelstats` SET `damage_exp1`=70.8477 WHERE `class`=1 AND `level`=63; +UPDATE `creature_classlevelstats` SET `damage_exp1`=75.6331 WHERE `class`=1 AND `level`=64; +UPDATE `creature_classlevelstats` SET `damage_exp1`=80.4185 WHERE `class`=1 AND `level`=65; +UPDATE `creature_classlevelstats` SET `damage_exp1`=85.2039 WHERE `class`=1 AND `level`=66; +UPDATE `creature_classlevelstats` SET `damage_exp1`=89.9893 WHERE `class`=1 AND `level`=67; +UPDATE `creature_classlevelstats` SET `damage_exp1`=94.7747 WHERE `class`=1 AND `level`=68; +UPDATE `creature_classlevelstats` SET `damage_exp1`=99.5601 WHERE `class`=1 AND `level`=69; +UPDATE `creature_classlevelstats` SET `damage_exp1`=104.3456 WHERE `class`=1 AND `level`=70; +UPDATE `creature_classlevelstats` SET `damage_exp1`=109.1310 WHERE `class`=1 AND `level`=71; +UPDATE `creature_classlevelstats` SET `damage_exp1`=113.9164 WHERE `class`=1 AND `level`=72; +UPDATE `creature_classlevelstats` SET `damage_exp1`=118.7018 WHERE `class`=1 AND `level`=73; + +UPDATE `creature_classlevelstats` SET `damage_exp1`=40.1830 WHERE `class`=2 AND `level`=57; +UPDATE `creature_classlevelstats` SET `damage_exp1`=44.7542 WHERE `class`=2 AND `level`=58; +UPDATE `creature_classlevelstats` SET `damage_exp1`=49.3254 WHERE `class`=2 AND `level`=59; +UPDATE `creature_classlevelstats` SET `damage_exp1`=53.8966 WHERE `class`=2 AND `level`=60; +UPDATE `creature_classlevelstats` SET `damage_exp1`=58.4678 WHERE `class`=2 AND `level`=61; +UPDATE `creature_classlevelstats` SET `damage_exp1`=63.4390 WHERE `class`=2 AND `level`=62; +UPDATE `creature_classlevelstats` SET `damage_exp1`=68.4102 WHERE `class`=2 AND `level`=63; +UPDATE `creature_classlevelstats` SET `damage_exp1`=73.3814 WHERE `class`=2 AND `level`=64; +UPDATE `creature_classlevelstats` SET `damage_exp1`=78.3526 WHERE `class`=2 AND `level`=65; +UPDATE `creature_classlevelstats` SET `damage_exp1`=83.3238 WHERE `class`=2 AND `level`=66; +UPDATE `creature_classlevelstats` SET `damage_exp1`=88.2950 WHERE `class`=2 AND `level`=67; +UPDATE `creature_classlevelstats` SET `damage_exp1`=93.2662 WHERE `class`=2 AND `level`=68; +UPDATE `creature_classlevelstats` SET `damage_exp1`=98.2376 WHERE `class`=2 AND `level`=69; +UPDATE `creature_classlevelstats` SET `damage_exp1`=103.0388 WHERE `class`=2 AND `level`=70; +UPDATE `creature_classlevelstats` SET `damage_exp1`=107.8400 WHERE `class`=2 AND `level`=71; +UPDATE `creature_classlevelstats` SET `damage_exp1`=112.6412 WHERE `class`=2 AND `level`=72; +UPDATE `creature_classlevelstats` SET `damage_exp1`=117.4424 WHERE `class`=2 AND `level`=73; + +UPDATE `creature_classlevelstats` SET `damage_exp1`=42.1353 WHERE `class`=4 AND `level`=57; +UPDATE `creature_classlevelstats` SET `damage_exp1`=46.9207 WHERE `class`=4 AND `level`=58; +UPDATE `creature_classlevelstats` SET `damage_exp1`=51.7061 WHERE `class`=4 AND `level`=59; +UPDATE `creature_classlevelstats` SET `damage_exp1`=56.4915 WHERE `class`=4 AND `level`=60; +UPDATE `creature_classlevelstats` SET `damage_exp1`=61.2769 WHERE `class`=4 AND `level`=61; +UPDATE `creature_classlevelstats` SET `damage_exp1`=66.0623 WHERE `class`=4 AND `level`=62; +UPDATE `creature_classlevelstats` SET `damage_exp1`=70.8477 WHERE `class`=4 AND `level`=63; +UPDATE `creature_classlevelstats` SET `damage_exp1`=75.6331 WHERE `class`=4 AND `level`=64; +UPDATE `creature_classlevelstats` SET `damage_exp1`=80.4185 WHERE `class`=4 AND `level`=65; +UPDATE `creature_classlevelstats` SET `damage_exp1`=85.2039 WHERE `class`=4 AND `level`=66; +UPDATE `creature_classlevelstats` SET `damage_exp1`=89.9893 WHERE `class`=4 AND `level`=67; +UPDATE `creature_classlevelstats` SET `damage_exp1`=94.7747 WHERE `class`=4 AND `level`=68; +UPDATE `creature_classlevelstats` SET `damage_exp1`=99.5601 WHERE `class`=4 AND `level`=69; +UPDATE `creature_classlevelstats` SET `damage_exp1`=104.3456 WHERE `class`=4 AND `level`=70; +UPDATE `creature_classlevelstats` SET `damage_exp1`=109.1310 WHERE `class`=4 AND `level`=71; +UPDATE `creature_classlevelstats` SET `damage_exp1`=113.9164 WHERE `class`=4 AND `level`=72; +UPDATE `creature_classlevelstats` SET `damage_exp1`=118.7018 WHERE `class`=4 AND `level`=73; + +UPDATE `creature_classlevelstats` SET `damage_exp1`=37.8665 WHERE `class`=8 AND `level`=57; +UPDATE `creature_classlevelstats` SET `damage_exp1`=38.7223 WHERE `class`=8 AND `level`=58; +UPDATE `creature_classlevelstats` SET `damage_exp1`=39.5781 WHERE `class`=8 AND `level`=59; +UPDATE `creature_classlevelstats` SET `damage_exp1`=40.4339 WHERE `class`=8 AND `level`=60; +UPDATE `creature_classlevelstats` SET `damage_exp1`=41.2897 WHERE `class`=8 AND `level`=61; +UPDATE `creature_classlevelstats` SET `damage_exp1`=42.1455 WHERE `class`=8 AND `level`=62; +UPDATE `creature_classlevelstats` SET `damage_exp1`=43.0013 WHERE `class`=8 AND `level`=63; +UPDATE `creature_classlevelstats` SET `damage_exp1`=43.8571 WHERE `class`=8 AND `level`=64; +UPDATE `creature_classlevelstats` SET `damage_exp1`=44.7129 WHERE `class`=8 AND `level`=65; +UPDATE `creature_classlevelstats` SET `damage_exp1`=45.5687 WHERE `class`=8 AND `level`=66; +UPDATE `creature_classlevelstats` SET `damage_exp1`=46.4245 WHERE `class`=8 AND `level`=67; +UPDATE `creature_classlevelstats` SET `damage_exp1`=47.2803 WHERE `class`=8 AND `level`=68; +UPDATE `creature_classlevelstats` SET `damage_exp1`=48.1361 WHERE `class`=8 AND `level`=69; +UPDATE `creature_classlevelstats` SET `damage_exp1`=48.9919 WHERE `class`=8 AND `level`=70; +UPDATE `creature_classlevelstats` SET `damage_exp1`=49.8477 WHERE `class`=8 AND `level`=71; +UPDATE `creature_classlevelstats` SET `damage_exp1`=50.7035 WHERE `class`=8 AND `level`=72; +UPDATE `creature_classlevelstats` SET `damage_exp1`=51.5593 WHERE `class`=8 AND `level`=73; + +UPDATE `creature_classlevelstats` SET `damage_exp2`=111.1744 WHERE `class`=1 AND `level`=67; +UPDATE `creature_classlevelstats` SET `damage_exp2`=115.2244 WHERE `class`=1 AND `level`=68; +UPDATE `creature_classlevelstats` SET `damage_exp2`=119.2744 WHERE `class`=1 AND `level`=69; +UPDATE `creature_classlevelstats` SET `damage_exp2`=123.3244 WHERE `class`=1 AND `level`=70; +UPDATE `creature_classlevelstats` SET `damage_exp2`=127.3744 WHERE `class`=1 AND `level`=71; +UPDATE `creature_classlevelstats` SET `damage_exp2`=131.4244 WHERE `class`=1 AND `level`=72; +UPDATE `creature_classlevelstats` SET `damage_exp2`=135.4744 WHERE `class`=1 AND `level`=73; +UPDATE `creature_classlevelstats` SET `damage_exp2`=139.5244 WHERE `class`=1 AND `level`=74; +UPDATE `creature_classlevelstats` SET `damage_exp2`=143.5744 WHERE `class`=1 AND `level`=75; +UPDATE `creature_classlevelstats` SET `damage_exp2`=147.6244 WHERE `class`=1 AND `level`=76; +UPDATE `creature_classlevelstats` SET `damage_exp2`=151.6744 WHERE `class`=1 AND `level`=77; +UPDATE `creature_classlevelstats` SET `damage_exp2`=155.7244 WHERE `class`=1 AND `level`=78; +UPDATE `creature_classlevelstats` SET `damage_exp2`=160.2582 WHERE `class`=1 AND `level`=79; +UPDATE `creature_classlevelstats` SET `damage_exp2`=164.9240 WHERE `class`=1 AND `level`=80; +UPDATE `creature_classlevelstats` SET `damage_exp2`=168.9740 WHERE `class`=1 AND `level`=81; +UPDATE `creature_classlevelstats` SET `damage_exp2`=173.0240 WHERE `class`=1 AND `level`=82; +UPDATE `creature_classlevelstats` SET `damage_exp2`=177.0740 WHERE `class`=1 AND `level`=83; + +UPDATE `creature_classlevelstats` SET `damage_exp2`=111.4876 WHERE `class`=2 AND `level`=67; +UPDATE `creature_classlevelstats` SET `damage_exp2`=115.4614 WHERE `class`=2 AND `level`=68; +UPDATE `creature_classlevelstats` SET `damage_exp2`=119.4352 WHERE `class`=2 AND `level`=69; +UPDATE `creature_classlevelstats` SET `damage_exp2`=123.4090 WHERE `class`=2 AND `level`=70; +UPDATE `creature_classlevelstats` SET `damage_exp2`=127.3828 WHERE `class`=2 AND `level`=71; +UPDATE `creature_classlevelstats` SET `damage_exp2`=131.2566 WHERE `class`=2 AND `level`=72; +UPDATE `creature_classlevelstats` SET `damage_exp2`=135.1304 WHERE `class`=2 AND `level`=73; +UPDATE `creature_classlevelstats` SET `damage_exp2`=139.0042 WHERE `class`=2 AND `level`=74; +UPDATE `creature_classlevelstats` SET `damage_exp2`=142.8780 WHERE `class`=2 AND `level`=75; +UPDATE `creature_classlevelstats` SET `damage_exp2`=146.8518 WHERE `class`=2 AND `level`=76; +UPDATE `creature_classlevelstats` SET `damage_exp2`=150.8256 WHERE `class`=2 AND `level`=77; +UPDATE `creature_classlevelstats` SET `damage_exp2`=154.7994 WHERE `class`=2 AND `level`=78; +UPDATE `creature_classlevelstats` SET `damage_exp2`=158.7732 WHERE `class`=2 AND `level`=79; +UPDATE `creature_classlevelstats` SET `damage_exp2`=162.7470 WHERE `class`=2 AND `level`=80; +UPDATE `creature_classlevelstats` SET `damage_exp2`=166.7208 WHERE `class`=2 AND `level`=81; +UPDATE `creature_classlevelstats` SET `damage_exp2`=170.6946 WHERE `class`=2 AND `level`=82; +UPDATE `creature_classlevelstats` SET `damage_exp2`=174.6684 WHERE `class`=2 AND `level`=83; + +UPDATE `creature_classlevelstats` SET `damage_exp2`=111.1744 WHERE `class`=4 AND `level`=67; +UPDATE `creature_classlevelstats` SET `damage_exp2`=115.2244 WHERE `class`=4 AND `level`=68; +UPDATE `creature_classlevelstats` SET `damage_exp2`=119.2744 WHERE `class`=4 AND `level`=69; +UPDATE `creature_classlevelstats` SET `damage_exp2`=123.3244 WHERE `class`=4 AND `level`=70; +UPDATE `creature_classlevelstats` SET `damage_exp2`=127.3744 WHERE `class`=4 AND `level`=71; +UPDATE `creature_classlevelstats` SET `damage_exp2`=131.4244 WHERE `class`=4 AND `level`=72; +UPDATE `creature_classlevelstats` SET `damage_exp2`=135.4744 WHERE `class`=4 AND `level`=73; +UPDATE `creature_classlevelstats` SET `damage_exp2`=139.5244 WHERE `class`=4 AND `level`=74; +UPDATE `creature_classlevelstats` SET `damage_exp2`=143.5744 WHERE `class`=4 AND `level`=75; +UPDATE `creature_classlevelstats` SET `damage_exp2`=147.6244 WHERE `class`=4 AND `level`=76; +UPDATE `creature_classlevelstats` SET `damage_exp2`=151.6744 WHERE `class`=4 AND `level`=77; +UPDATE `creature_classlevelstats` SET `damage_exp2`=155.7244 WHERE `class`=4 AND `level`=78; +UPDATE `creature_classlevelstats` SET `damage_exp2`=160.2582 WHERE `class`=4 AND `level`=79; +UPDATE `creature_classlevelstats` SET `damage_exp2`=164.9240 WHERE `class`=4 AND `level`=80; +UPDATE `creature_classlevelstats` SET `damage_exp2`=168.9740 WHERE `class`=4 AND `level`=81; +UPDATE `creature_classlevelstats` SET `damage_exp2`=173.0240 WHERE `class`=4 AND `level`=82; +UPDATE `creature_classlevelstats` SET `damage_exp2`=177.0740 WHERE `class`=4 AND `level`=83; + +UPDATE `creature_classlevelstats` SET `damage_exp2`=111.4876 WHERE `class`=8 AND `level`=67; +UPDATE `creature_classlevelstats` SET `damage_exp2`=115.4614 WHERE `class`=8 AND `level`=68; +UPDATE `creature_classlevelstats` SET `damage_exp2`=119.4352 WHERE `class`=8 AND `level`=69; +UPDATE `creature_classlevelstats` SET `damage_exp2`=123.4090 WHERE `class`=8 AND `level`=70; +UPDATE `creature_classlevelstats` SET `damage_exp2`=127.3828 WHERE `class`=8 AND `level`=71; +UPDATE `creature_classlevelstats` SET `damage_exp2`=131.2566 WHERE `class`=8 AND `level`=72; +UPDATE `creature_classlevelstats` SET `damage_exp2`=135.1304 WHERE `class`=8 AND `level`=73; +UPDATE `creature_classlevelstats` SET `damage_exp2`=139.0042 WHERE `class`=8 AND `level`=74; +UPDATE `creature_classlevelstats` SET `damage_exp2`=142.8780 WHERE `class`=8 AND `level`=75; +UPDATE `creature_classlevelstats` SET `damage_exp2`=146.8518 WHERE `class`=8 AND `level`=76; +UPDATE `creature_classlevelstats` SET `damage_exp2`=150.8256 WHERE `class`=8 AND `level`=77; +UPDATE `creature_classlevelstats` SET `damage_exp2`=154.7994 WHERE `class`=8 AND `level`=78; +UPDATE `creature_classlevelstats` SET `damage_exp2`=158.7732 WHERE `class`=8 AND `level`=79; +UPDATE `creature_classlevelstats` SET `damage_exp2`=162.7470 WHERE `class`=8 AND `level`=80; +UPDATE `creature_classlevelstats` SET `damage_exp2`=166.7208 WHERE `class`=8 AND `level`=81; +UPDATE `creature_classlevelstats` SET `damage_exp2`=170.6946 WHERE `class`=8 AND `level`=82; +UPDATE `creature_classlevelstats` SET `damage_exp2`=174.6684 WHERE `class`=8 AND `level`=83; diff --git a/sql/updates/world/2013_12_30_01_world_creature_classlevelstats.sql b/sql/updates/world/2013_12_30_01_world_creature_classlevelstats.sql new file mode 100644 index 00000000000..330545abf10 --- /dev/null +++ b/sql/updates/world/2013_12_30_01_world_creature_classlevelstats.sql @@ -0,0 +1,83 @@ +UPDATE `creature_classlevelstats` SET `damage_base`=0.7460, `attackpower`=1 WHERE `class`=2 AND `level`=1; +UPDATE `creature_classlevelstats` SET `damage_base`=0.7365, `attackpower`=3 WHERE `class`=2 AND `level`=2; +UPDATE `creature_classlevelstats` SET `damage_base`=0.6984, `attackpower`=7 WHERE `class`=2 AND `level`=3; +UPDATE `creature_classlevelstats` SET `damage_base`=1.2138, `attackpower`=18 WHERE `class`=2 AND `level`=4; +UPDATE `creature_classlevelstats` SET `damage_base`=1.8471, `attackpower`=19 WHERE `class`=2 AND `level`=5; +UPDATE `creature_classlevelstats` SET `damage_base`=2.6006, `attackpower`=24 WHERE `class`=2 AND `level`=6; +UPDATE `creature_classlevelstats` SET `damage_base`=3.5412, `attackpower`=28 WHERE `class`=2 AND `level`=7; +UPDATE `creature_classlevelstats` SET `damage_base`=4.1435, `attackpower`=32 WHERE `class`=2 AND `level`=8; +UPDATE `creature_classlevelstats` SET `damage_base`=4.7933, `attackpower`=36 WHERE `class`=2 AND `level`=9; +UPDATE `creature_classlevelstats` SET `damage_base`=5.0660, `attackpower`=38 WHERE `class`=2 AND `level`=10; +UPDATE `creature_classlevelstats` SET `damage_base`=5.3387, `attackpower`=40 WHERE `class`=2 AND `level`=11; +UPDATE `creature_classlevelstats` SET `damage_base`=5.6114, `attackpower`=42 WHERE `class`=2 AND `level`=12; +UPDATE `creature_classlevelstats` SET `damage_base`=5.8841, `attackpower`=44 WHERE `class`=2 AND `level`=13; +UPDATE `creature_classlevelstats` SET `damage_base`=6.1568, `attackpower`=46 WHERE `class`=2 AND `level`=14; +UPDATE `creature_classlevelstats` SET `damage_base`=6.8211, `attackpower`=48 WHERE `class`=2 AND `level`=15; +UPDATE `creature_classlevelstats` SET `damage_base`=7.1374, `attackpower`=52 WHERE `class`=2 AND `level`=16; +UPDATE `creature_classlevelstats` SET `damage_base`=7.6355, `attackpower`=56 WHERE `class`=2 AND `level`=17; +UPDATE `creature_classlevelstats` SET `damage_base`=8.1353, `attackpower`=58 WHERE `class`=2 AND `level`=18; +UPDATE `creature_classlevelstats` SET `damage_base`=8.6351, `attackpower`=60 WHERE `class`=2 AND `level`=19; +UPDATE `creature_classlevelstats` SET `damage_base`=9.0674, `attackpower`=64 WHERE `class`=2 AND `level`=20; +UPDATE `creature_classlevelstats` SET `damage_base`=9.3169, `attackpower`=68 WHERE `class`=2 AND `level`=21; +UPDATE `creature_classlevelstats` SET `damage_base`=9.7231, `attackpower`=72 WHERE `class`=2 AND `level`=22; +UPDATE `creature_classlevelstats` SET `damage_base`=10.0761, `attackpower`=74 WHERE `class`=2 AND `level`=23; +UPDATE `creature_classlevelstats` SET `damage_base`=10.4619, `attackpower`=78 WHERE `class`=2 AND `level`=24; +UPDATE `creature_classlevelstats` SET `damage_base`=10.8234, `attackpower`=80 WHERE `class`=2 AND `level`=25; +UPDATE `creature_classlevelstats` SET `damage_base`=11.1850, `attackpower`=84 WHERE `class`=2 AND `level`=26; +UPDATE `creature_classlevelstats` SET `damage_base`=11.7126, `attackpower`=86 WHERE `class`=2 AND `level`=27; +UPDATE `creature_classlevelstats` SET `damage_base`=11.9663, `attackpower`=90 WHERE `class`=2 AND `level`=28; +UPDATE `creature_classlevelstats` SET `damage_base`=12.3520, `attackpower`=94 WHERE `class`=2 AND `level`=29; +UPDATE `creature_classlevelstats` SET `damage_base`=13.0007, `attackpower`=94 WHERE `class`=2 AND `level`=30; +UPDATE `creature_classlevelstats` SET `damage_base`=13.2348, `attackpower`=98 WHERE `class`=2 AND `level`=31; +UPDATE `creature_classlevelstats` SET `damage_base`=13.6924, `attackpower`=100 WHERE `class`=2 AND `level`=32; +UPDATE `creature_classlevelstats` SET `damage_base`=13.9511, `attackpower`=104 WHERE `class`=2 AND `level`=33; +UPDATE `creature_classlevelstats` SET `damage_base`=14.4142, `attackpower`=106 WHERE `class`=2 AND `level`=34; +UPDATE `creature_classlevelstats` SET `damage_base`=14.7365, `attackpower`=110 WHERE `class`=2 AND `level`=35; +UPDATE `creature_classlevelstats` SET `damage_base`=15.1346, `attackpower`=112 WHERE `class`=2 AND `level`=36; +UPDATE `creature_classlevelstats` SET `damage_base`=15.5816, `attackpower`=116 WHERE `class`=2 AND `level`=37; +UPDATE `creature_classlevelstats` SET `damage_base`=15.9286, `attackpower`=120 WHERE `class`=2 AND `level`=38; +UPDATE `creature_classlevelstats` SET `damage_base`=16.4168, `attackpower`=124 WHERE `class`=2 AND `level`=39; +UPDATE `creature_classlevelstats` SET `damage_base`=16.9294, `attackpower`=128 WHERE `class`=2 AND `level`=40; +UPDATE `creature_classlevelstats` SET `damage_base`=17.8592, `attackpower`=132 WHERE `class`=2 AND `level`=41; +UPDATE `creature_classlevelstats` SET `damage_base`=18.8825, `attackpower`=142 WHERE `class`=2 AND `level`=42; +UPDATE `creature_classlevelstats` SET `damage_base`=20.1126, `attackpower`=152 WHERE `class`=2 AND `level`=43; +UPDATE `creature_classlevelstats` SET `damage_base`=21.6981, `attackpower`=166 WHERE `class`=2 AND `level`=44; +UPDATE `creature_classlevelstats` SET `damage_base`=22.9018, `attackpower`=172 WHERE `class`=2 AND `level`=45; +UPDATE `creature_classlevelstats` SET `damage_base`=23.3450, `attackpower`=176 WHERE `class`=2 AND `level`=46; +UPDATE `creature_classlevelstats` SET `damage_base`=23.9542, `attackpower`=180 WHERE `class`=2 AND `level`=47; +UPDATE `creature_classlevelstats` SET `damage_base`=24.4010, `attackpower`=184 WHERE `class`=2 AND `level`=48; +UPDATE `creature_classlevelstats` SET `damage_base`=24.9975, `attackpower`=188 WHERE `class`=2 AND `level`=49; +UPDATE `creature_classlevelstats` SET `damage_base`=25.5204, `attackpower`=194 WHERE `class`=2 AND `level`=50; +UPDATE `creature_classlevelstats` SET `damage_base`=26.0047, `attackpower`=198 WHERE `class`=2 AND `level`=51; +UPDATE `creature_classlevelstats` SET `damage_base`=26.6877, `attackpower`=202 WHERE `class`=2 AND `level`=52; +UPDATE `creature_classlevelstats` SET `damage_base`=27.1912, `attackpower`=206 WHERE `class`=2 AND `level`=53; +UPDATE `creature_classlevelstats` SET `damage_base`=27.8506, `attackpower`=210 WHERE `class`=2 AND `level`=54; +UPDATE `creature_classlevelstats` SET `damage_base`=28.3834, `attackpower`=214 WHERE `class`=2 AND `level`=55; +UPDATE `creature_classlevelstats` SET `damage_base`=28.9161, `attackpower`=220 WHERE `class`=2 AND `level`=56; +UPDATE `creature_classlevelstats` SET `damage_base`=29.5702, `attackpower`=224 WHERE `class`=2 AND `level`=57; +UPDATE `creature_classlevelstats` SET `damage_base`=30.1469, `attackpower`=228 WHERE `class`=2 AND `level`=58; +UPDATE `creature_classlevelstats` SET `damage_base`=30.7656, `attackpower`=234 WHERE `class`=2 AND `level`=59; +UPDATE `creature_classlevelstats` SET `damage_base`=31.3842, `attackpower`=238 WHERE `class`=2 AND `level`=60; +UPDATE `creature_classlevelstats` SET `damage_base`=31.9807, `attackpower`=244 WHERE `class`=2 AND `level`=61; +UPDATE `creature_classlevelstats` SET `damage_base`=32.5772, `attackpower`=246 WHERE `class`=2 AND `level`=62; +UPDATE `creature_classlevelstats` SET `damage_base`=33.1737, `attackpower`=249 WHERE `class`=2 AND `level`=63; +UPDATE `creature_classlevelstats` SET `damage_base`=33.7702, `attackpower`=252 WHERE `class`=2 AND `level`=64; +UPDATE `creature_classlevelstats` SET `damage_base`=34.3667, `attackpower`=262 WHERE `class`=2 AND `level`=65; +UPDATE `creature_classlevelstats` SET `damage_base`=34.9632, `attackpower`=266 WHERE `class`=2 AND `level`=66; +UPDATE `creature_classlevelstats` SET `damage_base`=35.5597, `attackpower`=272 WHERE `class`=2 AND `level`=67; +UPDATE `creature_classlevelstats` SET `damage_base`=36.1562, `attackpower`=276 WHERE `class`=2 AND `level`=68; +UPDATE `creature_classlevelstats` SET `damage_base`=36.7527, `attackpower`=282 WHERE `class`=2 AND `level`=69; +UPDATE `creature_classlevelstats` SET `damage_base`=37.3492, `attackpower`=286 WHERE `class`=2 AND `level`=70; +UPDATE `creature_classlevelstats` SET `damage_base`=37.9457, `attackpower`=290 WHERE `class`=2 AND `level`=71; +UPDATE `creature_classlevelstats` SET `damage_base`=38.5422, `attackpower`=296 WHERE `class`=2 AND `level`=72; +UPDATE `creature_classlevelstats` SET `damage_base`=39.1387, `attackpower`=302 WHERE `class`=2 AND `level`=73; +UPDATE `creature_classlevelstats` SET `damage_base`=39.7352, `attackpower`=334 WHERE `class`=2 AND `level`=74; +UPDATE `creature_classlevelstats` SET `damage_base`=40.3317, `attackpower`=370 WHERE `class`=2 AND `level`=75; +UPDATE `creature_classlevelstats` SET `damage_base`=40.9282, `attackpower`=408 WHERE `class`=2 AND `level`=76; +UPDATE `creature_classlevelstats` SET `damage_base`=41.5247, `attackpower`=452 WHERE `class`=2 AND `level`=77; +UPDATE `creature_classlevelstats` SET `damage_base`=42.1212, `attackpower`=500 WHERE `class`=2 AND `level`=78; +UPDATE `creature_classlevelstats` SET `damage_base`=42.7177, `attackpower`=550 WHERE `class`=2 AND `level`=79; +UPDATE `creature_classlevelstats` SET `damage_base`=43.3142, `attackpower`=608 WHERE `class`=2 AND `level`=80; +UPDATE `creature_classlevelstats` SET `damage_base`=43.9107, `attackpower`=670 WHERE `class`=2 AND `level`=81; +UPDATE `creature_classlevelstats` SET `damage_base`=44.5072, `attackpower`=726 WHERE `class`=2 AND `level`=82; +UPDATE `creature_classlevelstats` SET `damage_base`=45.1037, `attackpower`=783 WHERE `class`=2 AND `level`=83; diff --git a/sql/updates/world/2013_12_30_02_world_creature_classlevelstats.sql b/sql/updates/world/2013_12_30_02_world_creature_classlevelstats.sql new file mode 100644 index 00000000000..fe86d53ad04 --- /dev/null +++ b/sql/updates/world/2013_12_30_02_world_creature_classlevelstats.sql @@ -0,0 +1,35 @@ +UPDATE `creature_classlevelstats` SET `damage_exp1`=41.2575, `attackpower`=224 WHERE `class`=2 AND `level`=57; +UPDATE `creature_classlevelstats` SET `damage_exp1`=45.5251, `attackpower`=228 WHERE `class`=2 AND `level`=58; +UPDATE `creature_classlevelstats` SET `damage_exp1`=49.7927, `attackpower`=234 WHERE `class`=2 AND `level`=59; +UPDATE `creature_classlevelstats` SET `damage_exp1`=54.0603, `attackpower`=238 WHERE `class`=2 AND `level`=60; +UPDATE `creature_classlevelstats` SET `damage_exp1`=58.3279, `attackpower`=244 WHERE `class`=2 AND `level`=61; +UPDATE `creature_classlevelstats` SET `damage_exp1`=62.4676, `attackpower`=246 WHERE `class`=2 AND `level`=62; +UPDATE `creature_classlevelstats` SET `damage_exp1`=66.1210, `attackpower`=252 WHERE `class`=2 AND `level`=63; +UPDATE `creature_classlevelstats` SET `damage_exp1`=70.2568, `attackpower`=256 WHERE `class`=2 AND `level`=64; +UPDATE `creature_classlevelstats` SET `damage_exp1`=74.3252, `attackpower`=262 WHERE `class`=2 AND `level`=65; +UPDATE `creature_classlevelstats` SET `damage_exp1`=78.4720, `attackpower`=266 WHERE `class`=2 AND `level`=66; +UPDATE `creature_classlevelstats` SET `damage_exp1`=82.7944, `attackpower`=272 WHERE `class`=2 AND `level`=67; +UPDATE `creature_classlevelstats` SET `damage_exp1`=87.2676, `attackpower`=276 WHERE `class`=2 AND `level`=68; +UPDATE `creature_classlevelstats` SET `damage_exp1`=91.8915, `attackpower`=282 WHERE `class`=2 AND `level`=69; +UPDATE `creature_classlevelstats` SET `damage_exp1`=96.7365, `attackpower`=286 WHERE `class`=2 AND `level`=70; +UPDATE `creature_classlevelstats` SET `damage_exp1`=101.0041, `attackpower`=290 WHERE `class`=2 AND `level`=71; +UPDATE `creature_classlevelstats` SET `damage_exp1`=105.2717, `attackpower`=296 WHERE `class`=2 AND `level`=72; +UPDATE `creature_classlevelstats` SET `damage_exp1`=109.5393, `attackpower`=302 WHERE `class`=2 AND `level`=73; + +UPDATE `creature_classlevelstats` SET `damage_exp2`=110.6980, `attackpower`=272 WHERE `class`=2 AND `level`=67; +UPDATE `creature_classlevelstats` SET `damage_exp2`=114.8692, `attackpower`=276 WHERE `class`=2 AND `level`=68; +UPDATE `creature_classlevelstats` SET `damage_exp2`=119.0404, `attackpower`=282 WHERE `class`=2 AND `level`=69; +UPDATE `creature_classlevelstats` SET `damage_exp2`=123.2116, `attackpower`=286 WHERE `class`=2 AND `level`=70; +UPDATE `creature_classlevelstats` SET `damage_exp2`=127.3828, `attackpower`=290 WHERE `class`=2 AND `level`=71; +UPDATE `creature_classlevelstats` SET `damage_exp2`=131.0916, `attackpower`=296 WHERE `class`=2 AND `level`=72; +UPDATE `creature_classlevelstats` SET `damage_exp2`=134.9081, `attackpower`=302 WHERE `class`=2 AND `level`=73; +UPDATE `creature_classlevelstats` SET `damage_exp2`=138.8359, `attackpower`=334 WHERE `class`=2 AND `level`=74; +UPDATE `creature_classlevelstats` SET `damage_exp2`=142.8780, `attackpower`=370 WHERE `class`=2 AND `level`=75; +UPDATE `creature_classlevelstats` SET `damage_exp2`=147.0376, `attackpower`=408 WHERE `class`=2 AND `level`=76; +UPDATE `creature_classlevelstats` SET `damage_exp2`=151.3188, `attackpower`=452 WHERE `class`=2 AND `level`=77; +UPDATE `creature_classlevelstats` SET `damage_exp2`=155.7242, `attackpower`=500 WHERE `class`=2 AND `level`=78; +UPDATE `creature_classlevelstats` SET `damage_exp2`=160.2583, `attackpower`=550 WHERE `class`=2 AND `level`=79; +UPDATE `creature_classlevelstats` SET `damage_exp2`=164.9239, `attackpower`=608 WHERE `class`=2 AND `level`=80; +UPDATE `creature_classlevelstats` SET `damage_exp2`=169.0951, `attackpower`=670 WHERE `class`=2 AND `level`=81; +UPDATE `creature_classlevelstats` SET `damage_exp2`=173.2663, `attackpower`=726 WHERE `class`=2 AND `level`=82; +UPDATE `creature_classlevelstats` SET `damage_exp2`=177.4375, `attackpower`=783 WHERE `class`=2 AND `level`=83; diff --git a/sql/updates/world/2013_12_30_03_world_creature_classlevelstats.sql b/sql/updates/world/2013_12_30_03_world_creature_classlevelstats.sql new file mode 100644 index 00000000000..19e34107e32 --- /dev/null +++ b/sql/updates/world/2013_12_30_03_world_creature_classlevelstats.sql @@ -0,0 +1,119 @@ +UPDATE `creature_classlevelstats` SET `damage_base`=0.4564, `attackpower`=1 WHERE `class`=8 AND `level`=1; +UPDATE `creature_classlevelstats` SET `damage_base`=0.4564, `attackpower`=3 WHERE `class`=8 AND `level`=2; +UPDATE `creature_classlevelstats` SET `damage_base`=0.7334, `attackpower`=7 WHERE `class`=8 AND `level`=3; +UPDATE `creature_classlevelstats` SET `damage_base`=1.1235, `attackpower`=8 WHERE `class`=8 AND `level`=4; +UPDATE `creature_classlevelstats` SET `damage_base`=1.3456, `attackpower`=9 WHERE `class`=8 AND `level`=5; +UPDATE `creature_classlevelstats` SET `damage_base`=1.9557, `attackpower`=10 WHERE `class`=8 AND `level`=6; +UPDATE `creature_classlevelstats` SET `damage_base`=2.7876, `attackpower`=13 WHERE `class`=8 AND `level`=7; +UPDATE `creature_classlevelstats` SET `damage_base`=3.2334, `attackpower`=15 WHERE `class`=8 AND `level`=8; +UPDATE `creature_classlevelstats` SET `damage_base`=3.7654, `attackpower`=16 WHERE `class`=8 AND `level`=9; +UPDATE `creature_classlevelstats` SET `damage_base`=4.2456, `attackpower`=17 WHERE `class`=8 AND `level`=10; +UPDATE `creature_classlevelstats` SET `damage_base`=4.7654, `attackpower`=17 WHERE `class`=8 AND `level`=11; +UPDATE `creature_classlevelstats` SET `damage_base`=5.0345, `attackpower`=18 WHERE `class`=8 AND `level`=12; +UPDATE `creature_classlevelstats` SET `damage_base`=5.1990, `attackpower`=19 WHERE `class`=8 AND `level`=13; +UPDATE `creature_classlevelstats` SET `damage_base`=5.7241, `attackpower`=21 WHERE `class`=8 AND `level`=14; +UPDATE `creature_classlevelstats` SET `damage_base`=6.3298, `attackpower`=22 WHERE `class`=8 AND `level`=15; +UPDATE `creature_classlevelstats` SET `damage_base`=6.6051, `attackpower`=24 WHERE `class`=8 AND `level`=16; +UPDATE `creature_classlevelstats` SET `damage_base`=7.0485, `attackpower`=26 WHERE `class`=8 AND `level`=17; +UPDATE `creature_classlevelstats` SET `damage_base`=7.4083, `attackpower`=27 WHERE `class`=8 AND `level`=18; +UPDATE `creature_classlevelstats` SET `damage_base`=7.9334, `attackpower`=28 WHERE `class`=8 AND `level`=19; +UPDATE `creature_classlevelstats` SET `damage_base`=8.3382, `attackpower`=30 WHERE `class`=8 AND `level`=20; +UPDATE `creature_classlevelstats` SET `damage_base`=8.5517, `attackpower`=32 WHERE `class`=8 AND `level`=21; +UPDATE `creature_classlevelstats` SET `damage_base`=8.9102, `attackpower`=34 WHERE `class`=8 AND `level`=22; +UPDATE `creature_classlevelstats` SET `damage_base`=9.2280, `attackpower`=35 WHERE `class`=8 AND `level`=23; +UPDATE `creature_classlevelstats` SET `damage_base`=9.6818, `attackpower`=36 WHERE `class`=8 AND `level`=24; +UPDATE `creature_classlevelstats` SET `damage_base`=10.1014, `attackpower`=37 WHERE `class`=8 AND `level`=25; +UPDATE `creature_classlevelstats` SET `damage_base`=10.3246, `attackpower`=39 WHERE `class`=8 AND `level`=26; +UPDATE `creature_classlevelstats` SET `damage_base`=10.8040, `attackpower`=40 WHERE `class`=8 AND `level`=27; +UPDATE `creature_classlevelstats` SET `damage_base`=11.0214, `attackpower`=42 WHERE `class`=8 AND `level`=28; +UPDATE `creature_classlevelstats` SET `damage_base`=11.3608, `attackpower`=44 WHERE `class`=8 AND `level`=29; +UPDATE `creature_classlevelstats` SET `damage_base`=11.9607, `attackpower`=44 WHERE `class`=8 AND `level`=30; +UPDATE `creature_classlevelstats` SET `damage_base`=12.1600, `attackpower`=46 WHERE `class`=8 AND `level`=31; +UPDATE `creature_classlevelstats` SET `damage_base`=12.5746, `attackpower`=47 WHERE `class`=8 AND `level`=32; +UPDATE `creature_classlevelstats` SET `damage_base`=12.7966, `attackpower`=49 WHERE `class`=8 AND `level`=33; +UPDATE `creature_classlevelstats` SET `damage_base`=13.2162, `attackpower`=50 WHERE `class`=8 AND `level`=34; +UPDATE `creature_classlevelstats` SET `damage_base`=13.4970, `attackpower`=52 WHERE `class`=8 AND `level`=35; +UPDATE `creature_classlevelstats` SET `damage_base`=13.8566, `attackpower`=53 WHERE `class`=8 AND `level`=36; +UPDATE `creature_classlevelstats` SET `damage_base`=14.3670, `attackpower`=54 WHERE `class`=8 AND `level`=37; +UPDATE `creature_classlevelstats` SET `damage_base`=14.6707, `attackpower`=56 WHERE `class`=8 AND `level`=38; +UPDATE `creature_classlevelstats` SET `damage_base`=15.1049, `attackpower`=58 WHERE `class`=8 AND `level`=39; +UPDATE `creature_classlevelstats` SET `damage_base`=15.5617, `attackpower`=60 WHERE `class`=8 AND `level`=40; +UPDATE `creature_classlevelstats` SET `damage_base`=16.4044, `attackpower`=62 WHERE `class`=8 AND `level`=41; +UPDATE `creature_classlevelstats` SET `damage_base`=17.3076, `attackpower`=67 WHERE `class`=8 AND `level`=42; +UPDATE `creature_classlevelstats` SET `damage_base`=18.5165, `attackpower`=71 WHERE `class`=8 AND `level`=43; +UPDATE `creature_classlevelstats` SET `damage_base`=19.9224, `attackpower`=78 WHERE `class`=8 AND `level`=44; +UPDATE `creature_classlevelstats` SET `damage_base`=21.0097, `attackpower`=81 WHERE `class`=8 AND `level`=45; +UPDATE `creature_classlevelstats` SET `damage_base`=21.4023, `attackpower`=83 WHERE `class`=8 AND `level`=46; +UPDATE `creature_classlevelstats` SET `damage_base`=21.9484, `attackpower`=85 WHERE `class`=8 AND `level`=47; +UPDATE `creature_classlevelstats` SET `damage_base`=22.3444, `attackpower`=87 WHERE `class`=8 AND `level`=48; +UPDATE `creature_classlevelstats` SET `damage_base`=22.8788, `attackpower`=89 WHERE `class`=8 AND `level`=49; +UPDATE `creature_classlevelstats` SET `damage_base`=23.4508, `attackpower`=91 WHERE `class`=8 AND `level`=50; +UPDATE `creature_classlevelstats` SET `damage_base`=23.8815, `attackpower`=93 WHERE `class`=8 AND `level`=51; +UPDATE `creature_classlevelstats` SET `damage_base`=24.4958, `attackpower`=95 WHERE `class`=8 AND `level`=52; +UPDATE `creature_classlevelstats` SET `damage_base`=24.9442, `attackpower`=97 WHERE `class`=8 AND `level`=53; +UPDATE `creature_classlevelstats` SET `damage_base`=25.5368, `attackpower`=99 WHERE `class`=8 AND `level`=54; +UPDATE `creature_classlevelstats` SET `damage_base`=26.0790, `attackpower`=101 WHERE `class`=8 AND `level`=55; +UPDATE `creature_classlevelstats` SET `damage_base`=26.4791, `attackpower`=104 WHERE `class`=8 AND `level`=56; +UPDATE `creature_classlevelstats` SET `damage_base`=27.0667, `attackpower`=106 WHERE `class`=8 AND `level`=57; +UPDATE `creature_classlevelstats` SET `damage_base`=27.6972, `attackpower`=107 WHERE `class`=8 AND `level`=58; +UPDATE `creature_classlevelstats` SET `damage_base`=28.1686, `attackpower`=110 WHERE `class`=8 AND `level`=59; +UPDATE `creature_classlevelstats` SET `damage_base`=28.7983, `attackpower`=112 WHERE `class`=8 AND `level`=60; +UPDATE `creature_classlevelstats` SET `damage_base`=29.2976, `attackpower`=115 WHERE `class`=8 AND `level`=61; +UPDATE `creature_classlevelstats` SET `damage_base`=29.7969, `attackpower`=116 WHERE `class`=8 AND `level`=62; +UPDATE `creature_classlevelstats` SET `damage_base`=30.2962, `attackpower`=119 WHERE `class`=8 AND `level`=63; +UPDATE `creature_classlevelstats` SET `damage_base`=30.7955, `attackpower`=121 WHERE `class`=8 AND `level`=64; +UPDATE `creature_classlevelstats` SET `damage_base`=31.2948, `attackpower`=124 WHERE `class`=8 AND `level`=65; +UPDATE `creature_classlevelstats` SET `damage_base`=31.7941, `attackpower`=125 WHERE `class`=8 AND `level`=66; +UPDATE `creature_classlevelstats` SET `damage_base`=32.2934, `attackpower`=128 WHERE `class`=8 AND `level`=67; +UPDATE `creature_classlevelstats` SET `damage_base`=32.7927, `attackpower`=130 WHERE `class`=8 AND `level`=68; +UPDATE `creature_classlevelstats` SET `damage_base`=33.2920, `attackpower`=133 WHERE `class`=8 AND `level`=69; +UPDATE `creature_classlevelstats` SET `damage_base`=33.7913, `attackpower`=135 WHERE `class`=8 AND `level`=70; +UPDATE `creature_classlevelstats` SET `damage_base`=34.2906, `attackpower`=137 WHERE `class`=8 AND `level`=71; +UPDATE `creature_classlevelstats` SET `damage_base`=34.7899, `attackpower`=140 WHERE `class`=8 AND `level`=72; +UPDATE `creature_classlevelstats` SET `damage_base`=35.2892, `attackpower`=143 WHERE `class`=8 AND `level`=73; +UPDATE `creature_classlevelstats` SET `damage_base`=35.7885, `attackpower`=158 WHERE `class`=8 AND `level`=74; +UPDATE `creature_classlevelstats` SET `damage_base`=36.2878, `attackpower`=175 WHERE `class`=8 AND `level`=75; +UPDATE `creature_classlevelstats` SET `damage_base`=36.7871, `attackpower`=193 WHERE `class`=8 AND `level`=76; +UPDATE `creature_classlevelstats` SET `damage_base`=37.2864, `attackpower`=214 WHERE `class`=8 AND `level`=77; +UPDATE `creature_classlevelstats` SET `damage_base`=37.7857, `attackpower`=236 WHERE `class`=8 AND `level`=78; +UPDATE `creature_classlevelstats` SET `damage_base`=38.2850, `attackpower`=260 WHERE `class`=8 AND `level`=79; +UPDATE `creature_classlevelstats` SET `damage_base`=38.7843, `attackpower`=289 WHERE `class`=8 AND `level`=80; +UPDATE `creature_classlevelstats` SET `damage_base`=39.2836, `attackpower`=304 WHERE `class`=8 AND `level`=81; +UPDATE `creature_classlevelstats` SET `damage_base`=39.7829, `attackpower`=326 WHERE `class`=8 AND `level`=82; +UPDATE `creature_classlevelstats` SET `damage_base`=40.2822, `attackpower`=343 WHERE `class`=8 AND `level`=83; + +UPDATE `creature_classlevelstats` SET `damage_exp1`=39.5236 WHERE `class`=8 AND `level`=57; +UPDATE `creature_classlevelstats` SET `damage_exp1`=43.1021 WHERE `class`=8 AND `level`=58; +UPDATE `creature_classlevelstats` SET `damage_exp1`=46.5379 WHERE `class`=8 AND `level`=59; +UPDATE `creature_classlevelstats` SET `damage_exp1`=50.0450 WHERE `class`=8 AND `level`=60; +UPDATE `creature_classlevelstats` SET `damage_exp1`=53.4807 WHERE `class`=8 AND `level`=61; +UPDATE `creature_classlevelstats` SET `damage_exp1`=57.2713 WHERE `class`=8 AND `level`=62; +UPDATE `creature_classlevelstats` SET `damage_exp1`=60.5770 WHERE `class`=8 AND `level`=63; +UPDATE `creature_classlevelstats` SET `damage_exp1`=64.3364 WHERE `class`=8 AND `level`=64; +UPDATE `creature_classlevelstats` SET `damage_exp1`=68.0244 WHERE `class`=8 AND `level`=65; +UPDATE `creature_classlevelstats` SET `damage_exp1`=72.0499 WHERE `class`=8 AND `level`=66; +UPDATE `creature_classlevelstats` SET `damage_exp1`=75.9676 WHERE `class`=8 AND `level`=67; +UPDATE `creature_classlevelstats` SET `damage_exp1`=79.9198 WHERE `class`=8 AND `level`=68; +UPDATE `creature_classlevelstats` SET `damage_exp1`=83.8005 WHERE `class`=8 AND `level`=69; +UPDATE `creature_classlevelstats` SET `damage_exp1`=87.7526 WHERE `class`=8 AND `level`=70; +UPDATE `creature_classlevelstats` SET `damage_exp1`=91.7048 WHERE `class`=8 AND `level`=71; +UPDATE `creature_classlevelstats` SET `damage_exp1`=95.5855 WHERE `class`=8 AND `level`=72; +UPDATE `creature_classlevelstats` SET `damage_exp1`=99.4662 WHERE `class`=8 AND `level`=73; + +UPDATE `creature_classlevelstats` SET `damage_exp2`=87.7106 WHERE `class`=8 AND `level`=67; +UPDATE `creature_classlevelstats` SET `damage_exp2`=96.6868 WHERE `class`=8 AND `level`=68; +UPDATE `creature_classlevelstats` SET `damage_exp2`=105.5915 WHERE `class`=8 AND `level`=69; +UPDATE `creature_classlevelstats` SET `damage_exp2`=114.4956 WHERE `class`=8 AND `level`=70; +UPDATE `creature_classlevelstats` SET `damage_exp2`=117.8288 WHERE `class`=8 AND `level`=71; +UPDATE `creature_classlevelstats` SET `damage_exp2`=121.2595 WHERE `class`=8 AND `level`=72; +UPDATE `creature_classlevelstats` SET `damage_exp2`=124.7902 WHERE `class`=8 AND `level`=73; +UPDATE `creature_classlevelstats` SET `damage_exp2`=128.4233 WHERE `class`=8 AND `level`=74; +UPDATE `creature_classlevelstats` SET `damage_exp2`=132.1620 WHERE `class`=8 AND `level`=75; +UPDATE `creature_classlevelstats` SET `damage_exp2`=136.0098 WHERE `class`=8 AND `level`=76; +UPDATE `creature_classlevelstats` SET `damage_exp2`=139.9698 WHERE `class`=8 AND `level`=77; +UPDATE `creature_classlevelstats` SET `damage_exp2`=144.0449 WHERE `class`=8 AND `level`=78; +UPDATE `creature_classlevelstats` SET `damage_exp2`=148.2391 WHERE `class`=8 AND `level`=79; +UPDATE `creature_classlevelstats` SET `damage_exp2`=152.4116 WHERE `class`=8 AND `level`=80; +UPDATE `creature_classlevelstats` SET `damage_exp2`=157.5842 WHERE `class`=8 AND `level`=81; +UPDATE `creature_classlevelstats` SET `damage_exp2`=162.2568 WHERE `class`=8 AND `level`=82; +UPDATE `creature_classlevelstats` SET `damage_exp2`=167.2865 WHERE `class`=8 AND `level`=83; diff --git a/sql/updates/world/2013_12_31_00_world_creature_classlevelstats.sql b/sql/updates/world/2013_12_31_00_world_creature_classlevelstats.sql new file mode 100644 index 00000000000..8039fcd441e --- /dev/null +++ b/sql/updates/world/2013_12_31_00_world_creature_classlevelstats.sql @@ -0,0 +1,13 @@ +UPDATE `creature_classlevelstats` SET `damage_base`=0.0607, `attackpower`=10 WHERE `class`=1 AND `level`=1; +UPDATE `creature_classlevelstats` SET `damage_base`=0.3603, `attackpower`=10 WHERE `class`=1 AND `level`=2; +UPDATE `creature_classlevelstats` SET `damage_base`=0.6976, `attackpower`=11 WHERE `class`=1 AND `level`=3; +UPDATE `creature_classlevelstats` SET `damage_base`=1.0863, `attackpower`=13 WHERE `class`=1 AND `level`=4; +UPDATE `creature_classlevelstats` SET `damage_base`=1.4422, `attackpower`=17 WHERE `class`=1 AND `level`=5; +UPDATE `creature_classlevelstats` SET `damage_base`=2.1375, `attackpower`=19 WHERE `class`=1 AND `level`=6; +UPDATE `creature_classlevelstats` SET `damage_base`=2.9811, `attackpower`=21 WHERE `class`=1 AND `level`=7; +UPDATE `creature_classlevelstats` SET `damage_base`=3.4850, `attackpower`=24 WHERE `class`=1 AND `level`=8; +UPDATE `creature_classlevelstats` SET `damage_base`=3.0304, `attackpower`=28 WHERE `class`=1 AND `level`=9; +UPDATE `creature_classlevelstats` SET `damage_base`=3.2707, `attackpower`=32 WHERE `class`=1 AND `level`=10; +UPDATE `creature_classlevelstats` SET `damage_base`=4.8425, `attackpower`=36 WHERE `class`=1 AND `level`=11; +UPDATE `creature_classlevelstats` SET `damage_base`=5.6030, `attackpower`=40 WHERE `class`=1 AND `level`=12; +UPDATE `creature_classlevelstats` SET `damage_base`=6.0787, `attackpower`=44 WHERE `class`=1 AND `level`=13; diff --git a/sql/updates/world/2014_01_04_00_world_creature_classlevelstats.sql b/sql/updates/world/2014_01_04_00_world_creature_classlevelstats.sql new file mode 100644 index 00000000000..d55561bbe0e --- /dev/null +++ b/sql/updates/world/2014_01_04_00_world_creature_classlevelstats.sql @@ -0,0 +1,10 @@ +ALTER TABLE `creature_classlevelstats` + CHANGE `level` `level` TINYINT(3) UNSIGNED NOT NULL, + CHANGE `class` `class` TINYINT(3) UNSIGNED NOT NULL, + CHANGE `basehp0` `basehp0` SMALLINT(5) UNSIGNED DEFAULT 1 NOT NULL, + CHANGE `basehp1` `basehp1` SMALLINT(5) UNSIGNED DEFAULT 1 NOT NULL, + CHANGE `basehp2` `basehp2` SMALLINT(5) UNSIGNED DEFAULT 1 NOT NULL, + CHANGE `basemana` `basemana` SMALLINT(5) UNSIGNED DEFAULT 0 NOT NULL, + CHANGE `basearmor` `basearmor` SMALLINT(5) UNSIGNED DEFAULT 1 NOT NULL, + CHANGE `attackpower` `attackpower` SMALLINT(5) UNSIGNED DEFAULT 0 NOT NULL, + CHANGE `rangedattackpower` `rangedattackpower` SMALLINT(5) UNSIGNED DEFAULT 0 NOT NULL; diff --git a/sql/updates/world/2014_01_04_01_world_spelldifficulty_dbc.sql b/sql/updates/world/2014_01_04_01_world_spelldifficulty_dbc.sql new file mode 100644 index 00000000000..b32a5bce948 --- /dev/null +++ b/sql/updates/world/2014_01_04_01_world_spelldifficulty_dbc.sql @@ -0,0 +1,27 @@ +DELETE FROM `spelldifficulty_dbc` WHERE `spellid0` IN (36924,37162,48133,48849,49381,49518,49527,49528,49537,49544,49548,49555,50761,50830,50831,50834,51849,52469,52592,53472,54479,55959,56130,65868,67875,67883,68783,67881); +INSERT INTO `spelldifficulty_dbc` (`id`, `spellid0`, `spellid1`, `spellid2`, `spellid3`) VALUES +(36924,36924,39017,0,0), +(37162,37162,39019,0,0), +(48133,48133,59271,0,0), +(48849,48849,59422,0,0), +(49381,49381,59805,0,0), +(49518,49518,59971,0,0), +(49527,49527,59972,0,0), +(49528,49528,59973,0,0), +(49537,49537,59963,0,0), +(49544,49544,59965,0,0), +(49548,49548,59969,0,0), +(49555,49555,59807,0,0), +(50761,50761,59727,0,0), +(50830,50830,59844,0,0), +(50831,50831,59845,0,0), +(50834,50834,59846,0,0), +(51849,51849,59861,0,0), +(52469,52469,59364,0,0), +(52592,52592,59368,0,0), +(53472,53472,59433,0,0), +(54479,54479,59471,0,0), +(55959,55959,59513,0,0), +(56130,56130,59467,0,0); + +UPDATE `spelldifficulty_dbc` SET `id` = `spellid0`; diff --git a/sql/updates/world/2014_01_04_02_world_spelldifficulty_dbc.sql b/sql/updates/world/2014_01_04_02_world_spelldifficulty_dbc.sql new file mode 100644 index 00000000000..047d5cb937d --- /dev/null +++ b/sql/updates/world/2014_01_04_02_world_spelldifficulty_dbc.sql @@ -0,0 +1,6 @@ +DELETE FROM `spelldifficulty_dbc` WHERE `spellid0` IN (31956,36127,49380,59803,49381); +INSERT INTO `spelldifficulty_dbc` (`id`, `spellid0`, `spellid1`, `spellid2`, `spellid3`) VALUES +(31956,31956,38801,0,0), +(36127,36127,39005,0,0), +(49380,49380,59803,0,0), +(49381,49381,59805,0,0); diff --git a/sql/updates/world/2014_01_07_00_world_creature_template.sql b/sql/updates/world/2014_01_07_00_world_creature_template.sql new file mode 100644 index 00000000000..2b4bce350d9 --- /dev/null +++ b/sql/updates/world/2014_01_07_00_world_creature_template.sql @@ -0,0 +1,19 @@ +UPDATE `creature_template` SET `dmg_multiplier`=7.5 WHERE `entry` IN (32386,32358,32377,32398,32409,32400,32417,32429,32438,32422,32357,32471,32481,32475,32447,32495,32501); + +UPDATE `creature_template` SET `dmg_multiplier`=13 WHERE `entry` IN (31673,31674); + +UPDATE `creature_template` SET `exp`=2 WHERE `entry` IN (35543,35521,35539,35306,35541,35530,40420,31539,34918,35407,40424,40418,35529,35524,35537,35520,31540,35533,35401,35310,35308,35522,35538,35527,35534,35528,35542,35536,35535,35525,35519,35531,40422); + +UPDATE `creature_template` SET `faction_A`=1921, `faction_H`=1921 WHERE `entry`=25335; +UPDATE `creature_template` SET `faction_A`=1978, `faction_H`=1978 WHERE `entry`=25338; +UPDATE `creature_template` SET `faction_A`=1982, `faction_H`=1982 WHERE `entry`=25451; +UPDATE `creature_template` SET `faction_A`=634, `faction_H`=634 WHERE `entry`=26093; +UPDATE `creature_template` SET `faction_A`=29, `faction_H`=29 WHERE `entry` IN (26537,26539); +UPDATE `creature_template` SET `faction_A`=35, `faction_H`=35 WHERE `entry`=27135; +UPDATE `creature_template` SET `faction_A`=974, `faction_H`=974 WHERE `entry`=27860; +UPDATE `creature_template` SET `faction_A`=11, `faction_H`=11 WHERE `entry` IN (29292,29293,29294,29295); +UPDATE `creature_template` SET `faction_A`=21, `faction_H`=21 WHERE `entry`=32263; +UPDATE `creature_template` SET `faction_A`=16, `faction_H`=16 WHERE `entry`=32487; +UPDATE `creature_template` SET `faction_A`=14, `faction_H`=14 WHERE `entry`=33785; +UPDATE `creature_template` SET `faction_A`=68, `faction_H`=68 WHERE `entry`=33996; +UPDATE `creature_template` SET `faction_A`=1771, `faction_H`=1771 WHERE `entry` IN (37069,37549,36940,37550,36941,37551); diff --git a/sql/updates/world/2014_01_08_00_world_creature_template.sql b/sql/updates/world/2014_01_08_00_world_creature_template.sql new file mode 100644 index 00000000000..2d0e1c72976 --- /dev/null +++ b/sql/updates/world/2014_01_08_00_world_creature_template.sql @@ -0,0 +1,10 @@ +UPDATE `creature_template` SET `minlevel`=82,`maxlevel`=82, exp=2, `faction_A`=16, `faction_H`=16, `dmg_multiplier`=7.5, `baseattacktime`=2000, `rangeattacktime`=2000, `dynamicflags`=0, `mechanic_immune_mask`=8388624, `ScriptName`='npc_memory' WHERE `entry` IN ( +35052,35041,35033,35046,35043,35047,35044,35039,35034,35049,35030,34942,35050,35042,35045,35037,35031,35038,35029,35048,35032,35028,35040,35036,35051); + +UPDATE `creature_template` SET `minlevel`=82,`maxlevel`=82, exp=2, `faction_A`=16, `faction_H`=16, `dmg_multiplier`=13, `baseattacktime`=2000, `rangeattacktime`=2000, `dynamicflags`=0, `mechanic_immune_mask`=8388624 WHERE `entry` IN ( +35519,35520,35521,35522,35523,35524,35525,35527,35528,35529,35530,35531,35532,35533,35534,35535,35536,35537,35538,35539,35540,35541,35542,35543,35544); + +UPDATE `creature_template` SET `minlevel`=80, `maxlevel`=80, `faction_A`=16, `faction_H`=16, `baseattacktime`=2000, `rangeattacktime`=2000, `unit_flags`=32832, `dynamicflags`=0 WHERE `entry` IN (35305,35306,35307,35308,35309,35310); +UPDATE `creature_template` SET `dmg_multiplier`=13 WHERE `entry` IN (35306,35308,35310); + +UPDATE `creature_template` SET `exp`=2 WHERE `entry` IN (37531,38139,37532,38151); diff --git a/sql/updates/world/2014_01_09_00_world_misc.sql b/sql/updates/world/2014_01_09_00_world_misc.sql new file mode 100644 index 00000000000..0710932c589 --- /dev/null +++ b/sql/updates/world/2014_01_09_00_world_misc.sql @@ -0,0 +1,22 @@ +UPDATE `creature_template` SET `unit_flags`=33685504, `rangeattacktime`=2000, `spell1`=0 WHERE `entry` IN (16363,29379); + +UPDATE `creature_template` SET `minlevel`=60, `maxlevel`=60, `faction_A`=14, `faction_H`=14, `unit_flags`=33947648, `baseattacktime`=2000, `rangeattacktime`=2000, `spell1`=0, `InhabitType`=4, `flags_extra`=128 WHERE `entry` IN (17662,18602); +UPDATE `creature_template` SET `ScriptName`='npc_broggok_poison_cloud' WHERE `entry`=17662; + +DELETE FROM `spelldifficulty_dbc` WHERE `spellid0` IN (28157,28158,30913,30917,30914); +INSERT INTO `spelldifficulty_dbc` (`id`, `spellid0`, `spellid1`, `spellid2`, `spellid3`) VALUES +(28157,28157,54364,0,0), +(28158,28158,54362,0,0), +(30913,30913,38458,0,0), +(30917,30917,38459,0,0), +(30914,30914,38462,0,0); + +DELETE FROM `spell_script_names` WHERE `spell_id` IN (28169,28158,54362,30914,38462); +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(28169,'spell_grobbulus_mutating_injection'), +(28158,'spell_grobbulus_poison_cloud'), +(54362,'spell_grobbulus_poison_cloud'), +(30914,'spell_broggok_poison_cloud'), +(38462,'spell_broggok_poison_cloud'); + +DELETE FROM `spell_linked_spell` WHERE `spell_trigger`=-28169; diff --git a/sql/updates/world/2014_01_09_01_world_creature.sql b/sql/updates/world/2014_01_09_01_world_creature.sql new file mode 100644 index 00000000000..d41ee34fe24 --- /dev/null +++ b/sql/updates/world/2014_01_09_01_world_creature.sql @@ -0,0 +1,2 @@ +-- Delete dubble spawns +DELETE FROM `creature` WHERE `guid` IN (142975, 142976, 142977, 142978, 142979, 142980, 142981, 142982, 142983, 142984, 142985, 142986); diff --git a/sql/updates/world/2014_01_12_00_world_sai.sql b/sql/updates/world/2014_01_12_00_world_sai.sql new file mode 100644 index 00000000000..0d408155660 --- /dev/null +++ b/sql/updates/world/2014_01_12_00_world_sai.sql @@ -0,0 +1,207 @@ +UPDATE `creature_template` SET `ainame`='SmartAI',`ScriptName`='' WHERE `entry` IN(915,916,918,1234,1411,2122,2130,3155,3170,3327,3328,3594,3599,4163,4214,4215,4582,4583,4584,4794,5165,5166,5167,6707,13283,15285,16279,16684,16685,16686); +DELETE FROM `smart_scripts` WHERE `entryorguid`IN(915,916,918,1234,1411,2122,2130,3155,3170,3327,3328,3594,3599,4163,4214,4215,4582,4583,4584,4794,5165,5166,5167,6707,13283,15285,16279,16684,16685,16686) AND `source_type`=0; + +DELETE FROM `smart_scripts` WHERE `entryorguid`=7166; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`COMMENT`) VALUES +(5167,0,0,1,62,0,100,0,4561,4,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Fenthwick - On Gossip Select - Close gossip'), +(5167,0,1,0,61,0,100,0,0,0,0,0,11,21100,0,0,0,0,0,7,0,0,0,0,0,0,0,'Fenthwick - Linked with Previous Event - Cast Conjure Elegant Letter'), +(4163,0,0,1,62,0,100,0,4576,4,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Syurna - On Gossip Select - Close gossip'), +(4163,0,1,0,61,0,100,0,0,0,0,0,11,21100,0,0,0,0,0,7,0,0,0,0,0,0,0,'Syurna - Linked with Previous Event - Cast Conjure Elegant Letter'), +(4583,0,0,1,62,0,100,0,4540,4,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Miles Dexter - On Gossip Select - Close gossip'), +(4583,0,1,0,61,0,100,0,0,0,0,0,11,21100,0,0,0,0,0,7,0,0,0,0,0,0,0,'Miles Dexter - Linked with Previous Event - Cast Conjure Elegant Letter'), +(3328,0,0,1,62,0,100,0,4512,4,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Ormok - On Gossip Select - Close gossip'), +(3328,0,1,0,61,0,100,0,0,0,0,0,11,21100,0,0,0,0,0,7,0,0,0,0,0,0,0,'Ormok - Linked with Previous Event - Cast Conjure Elegant Letter'), +(5165,0,0,1,62,0,100,0,411,4,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Hulfdan Blackbeard - On Gossip Select - Close gossip'), +(5165,0,1,0,61,0,100,0,0,0,0,0,11,21100,0,0,0,0,0,7,0,0,0,0,0,0,0,'Hulfdan Blackbeard - Linked with Previous Event - Cast Conjure Elegant Letter'), +(13283,0,0,1,62,0,100,0,5061,4,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Lord Tony Romano - On Gossip Select - Close gossip'), +(13283,0,1,0,61,0,100,0,0,0,0,0,11,21100,0,0,0,0,0,7,0,0,0,0,0,0,0,'Lord Tony Romano - Linked with Previous Event - Cast Conjure Elegant Letter'), +(918,0,0,1,62,0,100,0,4502,4,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Osborne the Night Man - On Gossip Select - Close gossip'), +(918,0,1,0,61,0,100,0,0,0,0,0,11,21100,0,0,0,0,0,7,0,0,0,0,0,0,0,'Osborne the Night Man - Linked with Previous Event - Cast Conjure Elegant Letter'), +(16684,0,0,1,62,0,100,0,6650,4,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Zelanis - On Gossip Select - Close gossip'), +(16684,0,1,0,61,0,100,0,0,0,0,0,11,21100,0,0,0,0,0,7,0,0,0,0,0,0,0,'Zelanis - Linked with Previous Event - Cast Conjure Elegant Letter'), +(915,0,0,1,62,0,100,0,4659,4,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Jorik Kerridan - On Gossip Select - Close gossip'), +(915,0,1,0,61,0,100,0,0,0,0,0,11,21100,0,0,0,0,0,7,0,0,0,0,0,0,0,'Jorik Kerridan - Linked with Previous Event - Cast Conjure Elegant Letter'), +(916,0,0,1,62,0,100,0,4676,4,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Solm Hargrin - On Gossip Select - Close gossip'), +(916,0,1,0,61,0,100,0,0,0,0,0,11,21100,0,0,0,0,0,7,0,0,0,0,0,0,0,'Solm Hargrin - Linked with Previous Event - Cast Conjure Elegant Letter'), +(1234,0,0,1,62,0,100,0,411,4,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Hogral Bakkan - On Gossip Select - Close gossip'), +(1234,0,1,0,61,0,100,0,0,0,0,0,11,21100,0,0,0,0,0,7,0,0,0,0,0,0,0,'Hogral Bakkan - Linked with Previous Event - Cast Conjure Elegant Letter'), +(1411,0,0,1,62,0,100,0,4658,4,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Ian Strom - On Gossip Select - Close gossip'), +(1411,0,1,0,61,0,100,0,0,0,0,0,11,21100,0,0,0,0,0,7,0,0,0,0,0,0,0,'Ian Strom - Linked with Previous Event - Cast Conjure Elegant Letter'), +(2122,0,0,1,62,0,100,0,85,4,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'David Trias - On Gossip Select - Close gossip'), +(2122,0,1,0,61,0,100,0,0,0,0,0,11,21100,0,0,0,0,0,7,0,0,0,0,0,0,0,'David Trias - Linked with Previous Event - Cast Conjure Elegant Letter'), +(2130,0,0,1,62,0,100,0,85,4,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Marion Call - On Gossip Select - Close gossip'), +(2130,0,1,0,61,0,100,0,0,0,0,0,11,21100,0,0,0,0,0,7,0,0,0,0,0,0,0,'Marion Call - Linked with Previous Event - Cast Conjure Elegant Letter'), +(3155,0,0,1,62,0,100,0,141,4,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Rwag - On Gossip Select - Close gossip'), +(3155,0,1,0,61,0,100,0,0,0,0,0,11,21100,0,0,0,0,0,7,0,0,0,0,0,0,0,'Rwag - Linked with Previous Event - Cast Conjure Elegant Letter'), +(3170,0,0,1,62,0,100,0,141,4,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Kaplak - On Gossip Select - Close gossip'), +(3170,0,1,0,61,0,100,0,0,0,0,0,11,21100,0,0,0,0,0,7,0,0,0,0,0,0,0,'Kaplak - Linked with Previous Event - Cast Conjure Elegant Letter'), +(3327,0,0,1,62,0,100,0,4513,4,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Gest - On Gossip Select - Close gossip'), +(3327,0,1,0,61,0,100,0,0,0,0,0,11,21100,0,0,0,0,0,7,0,0,0,0,0,0,0,'Gest - Linked with Previous Event - Cast Conjure Elegant Letter'), +(3594,0,0,1,62,0,100,0,4690,4,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Frahun Shadewhisper - On Gossip Select - Close gossip'), +(3594,0,1,0,61,0,100,0,0,0,0,0,11,21100,0,0,0,0,0,7,0,0,0,0,0,0,0,'Frahun Shadewhisper - Linked with Previous Event - Cast Conjure Elegant Letter'), +(3599,0,0,1,62,0,100,0,436,4,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Jannok Breezesong - On Gossip Select - Close gossip'), +(3599,0,1,0,61,0,100,0,0,0,0,0,11,21100,0,0,0,0,0,7,0,0,0,0,0,0,0,'Jannok Breezesong - Linked with Previous Event - Cast Conjure Elegant Letter'), +(4214,0,0,1,62,0,100,0,4577,4,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Erion Shadewhisper - On Gossip Select - Close gossip'), +(4214,0,1,0,61,0,100,0,0,0,0,0,11,21100,0,0,0,0,0,7,0,0,0,0,0,0,0,'Erion Shadewhisper - Linked with Previous Event - Cast Conjure Elegant Letter'), +(4215,0,0,1,62,0,100,0,4575,4,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Anishar - On Gossip Select - Close gossip'), +(4215,0,1,0,61,0,100,0,0,0,0,0,11,21100,0,0,0,0,0,7,0,0,0,0,0,0,0,'Anishar - Linked with Previous Event - Cast Conjure Elegant Letter'), +(4582,0,0,1,62,0,100,0,4542,4,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Carolyn Ward - On Gossip Select - Close gossip'), +(4582,0,1,0,61,0,100,0,0,0,0,0,11,21100,0,0,0,0,0,7,0,0,0,0,0,0,0,'Carolyn Ward - Linked with Previous Event - Cast Conjure Elegant Letter'), +(4584,0,0,1,62,0,100,0,4541,4,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Gregory Charles - On Gossip Select - Close gossip'), +(4584,0,1,0,61,0,100,0,0,0,0,0,11,21100,0,0,0,0,0,7,0,0,0,0,0,0,0,'Gregory Charles - Linked with Previous Event - Cast Conjure Elegant Letter'), +(4794,0,0,1,62,0,100,0,4576,4,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Morgan Stern - On Gossip Select - Close gossip'), +(4794,0,1,0,61,0,100,0,0,0,0,0,11,21100,0,0,0,0,0,7,0,0,0,0,0,0,0,'Morgan Stern - Linked with Previous Event - Cast Conjure Elegant Letter'), +(5166,0,0,1,62,0,100,0,4562,4,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Ormyr Flinteye - On Gossip Select - Close gossip'), +(5166,0,1,0,61,0,100,0,0,0,0,0,11,21100,0,0,0,0,0,7,0,0,0,0,0,0,0,'Ormyr Flinteye - Linked with Previous Event - Cast Conjure Elegant Letter'), +(6707,0,0,1,62,0,100,0,3984,4,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Fahrad - On Gossip Select - Close gossip'), +(6707,0,1,0,61,0,100,0,0,0,0,0,11,21100,0,0,0,0,0,7,0,0,0,0,0,0,0,'Fahrad - Linked with Previous Event - Cast Conjure Elegant Letter'), +(15285,0,0,1,62,0,100,0,6650,4,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Pathstalker Kariel - On Gossip Select - Close gossip'), +(15285,0,1,0,61,0,100,0,0,0,0,0,11,21100,0,0,0,0,0,7,0,0,0,0,0,0,0,'Pathstalker Kariel - Linked with Previous Event - Cast Conjure Elegant Letter'), +(16279,0,0,1,62,0,100,0,6650,4,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Tannaria - On Gossip Select - Close gossip'), +(16279,0,1,0,61,0,100,0,0,0,0,0,11,21100,0,0,0,0,0,7,0,0,0,0,0,0,0,'Tannaria - Linked with Previous Event - Cast Conjure Elegant Letter'), +(16685,0,0,1,62,0,100,0,6650,4,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Elara - On Gossip Select - Close gossip'), +(16685,0,1,0,61,0,100,0,0,0,0,0,11,21100,0,0,0,0,0,7,0,0,0,0,0,0,0,'Elara - Linked with Previous Event - Cast Conjure Elegant Letter'), +(16686,0,0,1,62,0,100,0,6650,4,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Nerisen - On Gossip Select - Close gossip'), +(16686,0,1,0,61,0,100,0,0,0,0,0,11,21100,0,0,0,0,0,7,0,0,0,0,0,0,0,'Nerisen - Linked with Previous Event - Cast Conjure Elegant Letter'); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`IN(85,4562,4575,4576,4577,4658,4659,4676,4690,5061,4561,4542,4541,141,410,411,436,3984,4502,4512,4513,4540,6650) AND `SourceEntry`=4; + +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(15, 85, 4, 0, 0, 15, 0, 8, 0, 0, 0, 0, 0, '', 'Show gossip option if player is a rogue'), +(15, 85, 4, 0, 0, 27, 0, 24, 3, 0, 0, 0, 0, '', 'Show gossip option if player is at least level 24'), +(15, 85, 4, 0, 0, 2, 0, 17126, 1, 0, 1, 0, 0, '', 'Show gossip option if player does not have Elegant Letter'), +(15, 85, 4, 0, 0, 8, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player is not rewarded for quest 6681'), +(15, 85, 4, 0, 0, 9, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player does not have quest 6681 taken'), +(15, 85, 4, 0, 0, 28, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player does not have quest 6681 complete'), +(15, 4562, 4, 0, 0, 15, 0, 8, 0, 0, 0, 0, 0, '', 'Show gossip option if player is a rogue'), +(15, 4562, 4, 0, 0, 27, 0, 24, 3, 0, 0, 0, 0, '', 'Show gossip option if player is at least level 24'), +(15, 4562, 4, 0, 0, 2, 0, 17126, 1, 0, 1, 0, 0, '', 'Show gossip option if player does not have Elegant Letter'), +(15, 4562, 4, 0, 0, 8, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player is not rewarded for quest 6681'), +(15, 4562, 4, 0, 0, 9, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player does not have quest 6681 taken'), +(15, 4562, 4, 0, 0, 28, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player does not have quest 6681 complete'), +(15, 4575, 4, 0, 0, 15, 0, 8, 0, 0, 0, 0, 0, '', 'Show gossip option if player is a rogue'), +(15, 4575, 4, 0, 0, 27, 0, 24, 3, 0, 0, 0, 0, '', 'Show gossip option if player is at least level 24'), +(15, 4575, 4, 0, 0, 2, 0, 17126, 1, 0, 1, 0, 0, '', 'Show gossip option if player does not have Elegant Letter'), +(15, 4575, 4, 0, 0, 8, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player is not rewarded for quest 6681'), +(15, 4575, 4, 0, 0, 9, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player does not have quest 6681 taken'), +(15, 4575, 4, 0, 0, 28, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player does not have quest 6681 complete'), +(15, 4576, 4, 0, 0, 15, 0, 8, 0, 0, 0, 0, 0, '', 'Show gossip option if player is a rogue'), +(15, 4576, 4, 0, 0, 27, 0, 24, 3, 0, 0, 0, 0, '', 'Show gossip option if player is at least level 24'), +(15, 4576, 4, 0, 0, 2, 0, 17126, 1, 0, 1, 0, 0, '', 'Show gossip option if player does not have Elegant Letter'), +(15, 4576, 4, 0, 0, 8, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player is not rewarded for quest 6681'), +(15, 4576, 4, 0, 0, 9, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player does not have quest 6681 taken'), +(15, 4576, 4, 0, 0, 28, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player does not have quest 6681 complete'), +(15, 4577, 4, 0, 0, 15, 0, 8, 0, 0, 0, 0, 0, '', 'Show gossip option if player is a rogue'), +(15, 4577, 4, 0, 0, 27, 0, 24, 3, 0, 0, 0, 0, '', 'Show gossip option if player is at least level 24'), +(15, 4577, 4, 0, 0, 2, 0, 17126, 1, 0, 1, 0, 0, '', 'Show gossip option if player does not have Elegant Letter'), +(15, 4577, 4, 0, 0, 8, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player is not rewarded for quest 6681'), +(15, 4577, 4, 0, 0, 9, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player does not have quest 6681 taken'), +(15, 4577, 4, 0, 0, 28, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player does not have quest 6681 complete'), +(15, 4658, 4, 0, 0, 15, 0, 8, 0, 0, 0, 0, 0, '', 'Show gossip option if player is a rogue'), +(15, 4658, 4, 0, 0, 27, 0, 24, 3, 0, 0, 0, 0, '', 'Show gossip option if player is at least level 24'), +(15, 4658, 4, 0, 0, 2, 0, 17126, 1, 0, 1, 0, 0, '', 'Show gossip option if player does not have Elegant Letter'), +(15, 4658, 4, 0, 0, 8, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player is not rewarded for quest 6681'), +(15, 4658, 4, 0, 0, 9, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player does not have quest 6681 taken'), +(15, 4658, 4, 0, 0, 28, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player does not have quest 6681 complete'), +(15, 4659, 4, 0, 0, 15, 0, 8, 0, 0, 0, 0, 0, '', 'Show gossip option if player is a rogue'), +(15, 4659, 4, 0, 0, 27, 0, 24, 3, 0, 0, 0, 0, '', 'Show gossip option if player is at least level 24'), +(15, 4659, 4, 0, 0, 2, 0, 17126, 1, 0, 1, 0, 0, '', 'Show gossip option if player does not have Elegant Letter'), +(15, 4659, 4, 0, 0, 8, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player is not rewarded for quest 6681'), +(15, 4659, 4, 0, 0, 9, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player does not have quest 6681 taken'), +(15, 4659, 4, 0, 0, 28, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player does not have quest 6681 complete'), +(15, 4676, 4, 0, 0, 15, 0, 8, 0, 0, 0, 0, 0, '', 'Show gossip option if player is a rogue'), +(15, 4676, 4, 0, 0, 27, 0, 24, 3, 0, 0, 0, 0, '', 'Show gossip option if player is at least level 24'), +(15, 4676, 4, 0, 0, 2, 0, 17126, 1, 0, 1, 0, 0, '', 'Show gossip option if player does not have Elegant Letter'), +(15, 4676, 4, 0, 0, 8, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player is not rewarded for quest 6681'), +(15, 4676, 4, 0, 0, 9, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player does not have quest 6681 taken'), +(15, 4676, 4, 0, 0, 28, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player does not have quest 6681 complete'), +(15, 4690, 4, 0, 0, 15, 0, 8, 0, 0, 0, 0, 0, '', 'Show gossip option if player is a rogue'), +(15, 4690, 4, 0, 0, 27, 0, 24, 3, 0, 0, 0, 0, '', 'Show gossip option if player is at least level 24'), +(15, 4690, 4, 0, 0, 2, 0, 17126, 1, 0, 1, 0, 0, '', 'Show gossip option if player does not have Elegant Letter'), +(15, 4690, 4, 0, 0, 8, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player is not rewarded for quest 6681'), +(15, 4690, 4, 0, 0, 9, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player does not have quest 6681 taken'), +(15, 4690, 4, 0, 0, 28, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player does not have quest 6681 complete'), +(15, 5061, 4, 0, 0, 15, 0, 8, 0, 0, 0, 0, 0, '', 'Show gossip option if player is a rogue'), +(15, 5061, 4, 0, 0, 27, 0, 24, 3, 0, 0, 0, 0, '', 'Show gossip option if player is at least level 24'), +(15, 5061, 4, 0, 0, 2, 0, 17126, 1, 0, 1, 0, 0, '', 'Show gossip option if player does not have Elegant Letter'), +(15, 5061, 4, 0, 0, 8, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player is not rewarded for quest 6681'), +(15, 5061, 4, 0, 0, 9, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player does not have quest 6681 taken'), +(15, 5061, 4, 0, 0, 28, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player does not have quest 6681 complete'), +(15, 4561, 4, 0, 0, 15, 0, 8, 0, 0, 0, 0, 0, '', 'Show gossip option if player is a rogue'), +(15, 4561, 4, 0, 0, 27, 0, 24, 3, 0, 0, 0, 0, '', 'Show gossip option if player is at least level 24'), +(15, 4561, 4, 0, 0, 2, 0, 17126, 1, 0, 1, 0, 0, '', 'Show gossip option if player does not have Elegant Letter'), +(15, 4561, 4, 0, 0, 8, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player is not rewarded for quest 6681'), +(15, 4561, 4, 0, 0, 9, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player does not have quest 6681 taken'), +(15, 4561, 4, 0, 0, 28, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player does not have quest 6681 complete'), +(15, 4541, 4, 0, 0, 15, 0, 8, 0, 0, 0, 0, 0, '', 'Show gossip option if player is a rogue'), +(15, 4541, 4, 0, 0, 27, 0, 24, 3, 0, 0, 0, 0, '', 'Show gossip option if player is at least level 24'), +(15, 4541, 4, 0, 0, 2, 0, 17126, 1, 0, 1, 0, 0, '', 'Show gossip option if player does not have Elegant Letter'), +(15, 4541, 4, 0, 0, 8, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player is not rewarded for quest 6681'), +(15, 4541, 4, 0, 0, 9, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player does not have quest 6681 taken'), +(15, 4541, 4, 0, 0, 28, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player does not have quest 6681 complete'), +(15, 4542, 4, 0, 0, 15, 0, 8, 0, 0, 0, 0, 0, '', 'Show gossip option if player is a rogue'), +(15, 4542, 4, 0, 0, 27, 0, 24, 3, 0, 0, 0, 0, '', 'Show gossip option if player is at least level 24'), +(15, 4542, 4, 0, 0, 2, 0, 17126, 1, 0, 1, 0, 0, '', 'Show gossip option if player does not have Elegant Letter'), +(15, 4542, 4, 0, 0, 8, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player is not rewarded for quest 6681'), +(15, 4542, 4, 0, 0, 9, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player does not have quest 6681 taken'), +(15, 4542, 4, 0, 0, 28, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player does not have quest 6681 complete'), +(15, 141, 4, 0, 0, 15, 0, 8, 0, 0, 0, 0, 0, '', 'Show gossip option if player is a rogue'), +(15, 141, 4, 0, 0, 27, 0, 24, 3, 0, 0, 0, 0, '', 'Show gossip option if player is at least level 24'), +(15, 141, 4, 0, 0, 2, 0, 17126, 1, 0, 1, 0, 0, '', 'Show gossip option if player does not have Elegant Letter'), +(15, 141, 4, 0, 0, 8, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player is not rewarded for quest 6681'), +(15, 141, 4, 0, 0, 9, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player does not have quest 6681 taken'), +(15, 141, 4, 0, 0, 28, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player does not have quest 6681 complete'), +(15, 410, 4, 0, 0, 15, 0, 8, 0, 0, 0, 0, 0, '', 'Show gossip option if player is a rogue'), +(15, 410, 4, 0, 0, 27, 0, 24, 3, 0, 0, 0, 0, '', 'Show gossip option if player is at least level 24'), +(15, 410, 4, 0, 0, 2, 0, 17126, 1, 0, 1, 0, 0, '', 'Show gossip option if player does not have Elegant Letter'), +(15, 410, 4, 0, 0, 8, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player is not rewarded for quest 6681'), +(15, 410, 4, 0, 0, 9, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player does not have quest 6681 taken'), +(15, 410, 4, 0, 0, 28, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player does not have quest 6681 complete'), +(15, 411, 4, 0, 0, 15, 0, 8, 0, 0, 0, 0, 0, '', 'Show gossip option if player is a rogue'), +(15, 411, 4, 0, 0, 27, 0, 24, 3, 0, 0, 0, 0, '', 'Show gossip option if player is at least level 24'), +(15, 411, 4, 0, 0, 2, 0, 17126, 1, 0, 1, 0, 0, '', 'Show gossip option if player does not have Elegant Letter'), +(15, 411, 4, 0, 0, 8, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player is not rewarded for quest 6681'), +(15, 411, 4, 0, 0, 9, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player does not have quest 6681 taken'), +(15, 411, 4, 0, 0, 28, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player does not have quest 6681 complete'), +(15, 436, 4, 0, 0, 15, 0, 8, 0, 0, 0, 0, 0, '', 'Show gossip option if player is a rogue'), +(15, 436, 4, 0, 0, 27, 0, 24, 3, 0, 0, 0, 0, '', 'Show gossip option if player is at least level 24'), +(15, 436, 4, 0, 0, 2, 0, 17126, 1, 0, 1, 0, 0, '', 'Show gossip option if player does not have Elegant Letter'), +(15, 436, 4, 0, 0, 8, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player is not rewarded for quest 6681'), +(15, 436, 4, 0, 0, 9, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player does not have quest 6681 taken'), +(15, 436, 4, 0, 0, 28, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player does not have quest 6681 complete'), +(15, 3984, 4, 0, 0, 15, 0, 8, 0, 0, 0, 0, 0, '', 'Show gossip option if player is a rogue'), +(15, 3984, 4, 0, 0, 27, 0, 24, 3, 0, 0, 0, 0, '', 'Show gossip option if player is at least level 24'), +(15, 3984, 4, 0, 0, 2, 0, 17126, 1, 0, 1, 0, 0, '', 'Show gossip option if player does not have Elegant Letter'), +(15, 3984, 4, 0, 0, 8, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player is not rewarded for quest 6681'), +(15, 3984, 4, 0, 0, 9, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player does not have quest 6681 taken'), +(15, 3984, 4, 0, 0, 28, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player does not have quest 6681 complete'), +(15, 4502, 4, 0, 0, 15, 0, 8, 0, 0, 0, 0, 0, '', 'Show gossip option if player is a rogue'), +(15, 4502, 4, 0, 0, 27, 0, 24, 3, 0, 0, 0, 0, '', 'Show gossip option if player is at least level 24'), +(15, 4502, 4, 0, 0, 2, 0, 17126, 1, 0, 1, 0, 0, '', 'Show gossip option if player does not have Elegant Letter'), +(15, 4502, 4, 0, 0, 8, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player is not rewarded for quest 6681'), +(15, 4502, 4, 0, 0, 9, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player does not have quest 6681 taken'), +(15, 4502, 4, 0, 0, 28, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player does not have quest 6681 complete'), +(15, 4512, 4, 0, 0, 15, 0, 8, 0, 0, 0, 0, 0, '', 'Show gossip option if player is a rogue'), +(15, 4512, 4, 0, 0, 27, 0, 24, 3, 0, 0, 0, 0, '', 'Show gossip option if player is at least level 24'), +(15, 4512, 4, 0, 0, 2, 0, 17126, 1, 0, 1, 0, 0, '', 'Show gossip option if player does not have Elegant Letter'), +(15, 4512, 4, 0, 0, 8, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player is not rewarded for quest 6681'), +(15, 4512, 4, 0, 0, 9, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player does not have quest 6681 taken'), +(15, 4512, 4, 0, 0, 28, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player does not have quest 6681 complete'), +(15, 4513, 4, 0, 0, 15, 0, 8, 0, 0, 0, 0, 0, '', 'Show gossip option if player is a rogue'), +(15, 4513, 4, 0, 0, 27, 0, 24, 3, 0, 0, 0, 0, '', 'Show gossip option if player is at least level 24'), +(15, 4513, 4, 0, 0, 2, 0, 17126, 1, 0, 1, 0, 0, '', 'Show gossip option if player does not have Elegant Letter'), +(15, 4513, 4, 0, 0, 8, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player is not rewarded for quest 6681'), +(15, 4513, 4, 0, 0, 9, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player does not have quest 6681 taken'), +(15, 4513, 4, 0, 0, 28, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player does not have quest 6681 complete'), +(15, 4540, 4, 0, 0, 15, 0, 8, 0, 0, 0, 0, 0, '', 'Show gossip option if player is a rogue'), +(15, 4540, 4, 0, 0, 27, 0, 24, 3, 0, 0, 0, 0, '', 'Show gossip option if player is at least level 24'), +(15, 4540, 4, 0, 0, 2, 0, 17126, 1, 0, 1, 0, 0, '', 'Show gossip option if player does not have Elegant Letter'), +(15, 4540, 4, 0, 0, 8, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player is not rewarded for quest 6681'), +(15, 4540, 4, 0, 0, 9, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player does not have quest 6681 taken'), +(15, 4540, 4, 0, 0, 28, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player does not have quest 6681 complete'), +(15, 6650, 4, 0, 0, 15, 0, 8, 0, 0, 0, 0, 0, '', 'Show gossip option if player is a rogue'), +(15, 6650, 4, 0, 0, 27, 0, 24, 3, 0, 0, 0, 0, '', 'Show gossip option if player is at least level 24'), +(15, 6650, 4, 0, 0, 2, 0, 17126, 1, 0, 1, 0, 0, '', 'Show gossip option if player does not have Elegant Letter'), +(15, 6650, 4, 0, 0, 8, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player is not rewarded for quest 6681'), +(15, 6650, 4, 0, 0, 9, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player does not have quest 6681 taken'), +(15, 6650, 4, 0, 0, 28, 0, 6681, 0, 0, 1, 0, 0, '', 'Show gossip option if player does not have quest 6681 complete'); diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 11cd235f366..e7d7576c138 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> +# Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/src/genrev/CMakeLists.txt b/src/genrev/CMakeLists.txt index b54534af827..8acee875bc0 100644 --- a/src/genrev/CMakeLists.txt +++ b/src/genrev/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> +# Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/src/server/CMakeLists.txt b/src/server/CMakeLists.txt index 646b89b6f80..05cbe51b15d 100644 --- a/src/server/CMakeLists.txt +++ b/src/server/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> +# Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/src/server/authserver/Authentication/AuthCodes.cpp b/src/server/authserver/Authentication/AuthCodes.cpp index b47ef21b24b..1bf5dcad51f 100644 --- a/src/server/authserver/Authentication/AuthCodes.cpp +++ b/src/server/authserver/Authentication/AuthCodes.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/authserver/Authentication/AuthCodes.h b/src/server/authserver/Authentication/AuthCodes.h index df7de3ed684..5e6522f8981 100644 --- a/src/server/authserver/Authentication/AuthCodes.h +++ b/src/server/authserver/Authentication/AuthCodes.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/authserver/Authentication/TOTP.cpp b/src/server/authserver/Authentication/TOTP.cpp index 51a21822bc0..01842cfe234 100644 --- a/src/server/authserver/Authentication/TOTP.cpp +++ b/src/server/authserver/Authentication/TOTP.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/authserver/Authentication/TOTP.h b/src/server/authserver/Authentication/TOTP.h index 3080e7c7787..04b4a8c2110 100644 --- a/src/server/authserver/Authentication/TOTP.h +++ b/src/server/authserver/Authentication/TOTP.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/authserver/CMakeLists.txt b/src/server/authserver/CMakeLists.txt index ff3a4cdd67c..4391ac0450a 100644 --- a/src/server/authserver/CMakeLists.txt +++ b/src/server/authserver/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> +# Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/src/server/authserver/Main.cpp b/src/server/authserver/Main.cpp index c4a130e7aa1..28e9f324c19 100644 --- a/src/server/authserver/Main.cpp +++ b/src/server/authserver/Main.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/authserver/Realms/RealmList.cpp b/src/server/authserver/Realms/RealmList.cpp index 34120f75e88..4aeecfc0aaa 100644 --- a/src/server/authserver/Realms/RealmList.cpp +++ b/src/server/authserver/Realms/RealmList.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/authserver/Realms/RealmList.h b/src/server/authserver/Realms/RealmList.h index bf9493ad372..1d76c39e4f0 100644 --- a/src/server/authserver/Realms/RealmList.h +++ b/src/server/authserver/Realms/RealmList.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/authserver/Server/AuthSocket.cpp b/src/server/authserver/Server/AuthSocket.cpp index 41bc9089987..67d3975815f 100644 --- a/src/server/authserver/Server/AuthSocket.cpp +++ b/src/server/authserver/Server/AuthSocket.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/authserver/Server/AuthSocket.h b/src/server/authserver/Server/AuthSocket.h index c6513eaa5bf..5e04d459ba1 100644 --- a/src/server/authserver/Server/AuthSocket.h +++ b/src/server/authserver/Server/AuthSocket.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/authserver/Server/RealmAcceptor.h b/src/server/authserver/Server/RealmAcceptor.h index 39877f71538..e89135c4896 100644 --- a/src/server/authserver/Server/RealmAcceptor.h +++ b/src/server/authserver/Server/RealmAcceptor.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/authserver/Server/RealmSocket.cpp b/src/server/authserver/Server/RealmSocket.cpp index 13bc71f99a4..1013639cc50 100644 --- a/src/server/authserver/Server/RealmSocket.cpp +++ b/src/server/authserver/Server/RealmSocket.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/authserver/Server/RealmSocket.h b/src/server/authserver/Server/RealmSocket.h index 24f2a5dc109..c1190d638b3 100644 --- a/src/server/authserver/Server/RealmSocket.h +++ b/src/server/authserver/Server/RealmSocket.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/authserver/authserver.rc b/src/server/authserver/authserver.rc index acfed6323ae..6ceaa135b42 100644 --- a/src/server/authserver/authserver.rc +++ b/src/server/authserver/authserver.rc @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/collision/BoundingIntervalHierarchy.cpp b/src/server/collision/BoundingIntervalHierarchy.cpp index c5ae1f2a265..d90009c03f3 100644 --- a/src/server/collision/BoundingIntervalHierarchy.cpp +++ b/src/server/collision/BoundingIntervalHierarchy.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/collision/BoundingIntervalHierarchy.h b/src/server/collision/BoundingIntervalHierarchy.h index 997f9c99e5f..4d38bfc18c4 100644 --- a/src/server/collision/BoundingIntervalHierarchy.h +++ b/src/server/collision/BoundingIntervalHierarchy.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/collision/BoundingIntervalHierarchyWrapper.h b/src/server/collision/BoundingIntervalHierarchyWrapper.h index 8aafc023a20..955a394fb40 100644 --- a/src/server/collision/BoundingIntervalHierarchyWrapper.h +++ b/src/server/collision/BoundingIntervalHierarchyWrapper.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/collision/CMakeLists.txt b/src/server/collision/CMakeLists.txt index f254ffda94c..a83bb9dad1c 100644 --- a/src/server/collision/CMakeLists.txt +++ b/src/server/collision/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> +# Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/src/server/collision/DynamicTree.cpp b/src/server/collision/DynamicTree.cpp index 2f4985757db..f6d85df704a 100644 --- a/src/server/collision/DynamicTree.cpp +++ b/src/server/collision/DynamicTree.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/collision/DynamicTree.h b/src/server/collision/DynamicTree.h index 8e541fd453a..1657302de5d 100644 --- a/src/server/collision/DynamicTree.h +++ b/src/server/collision/DynamicTree.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/collision/Management/IVMapManager.h b/src/server/collision/Management/IVMapManager.h index 7269d2e05f4..02c2905345a 100644 --- a/src/server/collision/Management/IVMapManager.h +++ b/src/server/collision/Management/IVMapManager.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/collision/Management/MMapFactory.cpp b/src/server/collision/Management/MMapFactory.cpp index 6aa71d77ed8..b08cd92d638 100644 --- a/src/server/collision/Management/MMapFactory.cpp +++ b/src/server/collision/Management/MMapFactory.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/collision/Management/MMapFactory.h b/src/server/collision/Management/MMapFactory.h index 038d44a941c..837c893f038 100644 --- a/src/server/collision/Management/MMapFactory.h +++ b/src/server/collision/Management/MMapFactory.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/collision/Management/MMapManager.cpp b/src/server/collision/Management/MMapManager.cpp index 4e6b3bb6d10..cbb10923fe0 100644 --- a/src/server/collision/Management/MMapManager.cpp +++ b/src/server/collision/Management/MMapManager.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/collision/Management/MMapManager.h b/src/server/collision/Management/MMapManager.h index 9a04d638805..8b0d42b83cd 100644 --- a/src/server/collision/Management/MMapManager.h +++ b/src/server/collision/Management/MMapManager.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/collision/Management/VMapFactory.cpp b/src/server/collision/Management/VMapFactory.cpp index 4d3719cf288..f4b92060ba3 100644 --- a/src/server/collision/Management/VMapFactory.cpp +++ b/src/server/collision/Management/VMapFactory.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/collision/Management/VMapFactory.h b/src/server/collision/Management/VMapFactory.h index 1545a8f6977..d09f4c50259 100644 --- a/src/server/collision/Management/VMapFactory.h +++ b/src/server/collision/Management/VMapFactory.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/collision/Management/VMapManager2.cpp b/src/server/collision/Management/VMapManager2.cpp index 975c6777774..813a3c04288 100644 --- a/src/server/collision/Management/VMapManager2.cpp +++ b/src/server/collision/Management/VMapManager2.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/collision/Management/VMapManager2.h b/src/server/collision/Management/VMapManager2.h index 644e6004201..abddd5d7cc3 100644 --- a/src/server/collision/Management/VMapManager2.h +++ b/src/server/collision/Management/VMapManager2.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/collision/Maps/MapTree.cpp b/src/server/collision/Maps/MapTree.cpp index 8cb1e3d7064..bb57079c389 100644 --- a/src/server/collision/Maps/MapTree.cpp +++ b/src/server/collision/Maps/MapTree.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/collision/Maps/MapTree.h b/src/server/collision/Maps/MapTree.h index 1440ee0f250..90d61cbb88b 100644 --- a/src/server/collision/Maps/MapTree.h +++ b/src/server/collision/Maps/MapTree.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/collision/Maps/TileAssembler.cpp b/src/server/collision/Maps/TileAssembler.cpp index 5b38d9f4e18..f8326e0a8ec 100644 --- a/src/server/collision/Maps/TileAssembler.cpp +++ b/src/server/collision/Maps/TileAssembler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/collision/Maps/TileAssembler.h b/src/server/collision/Maps/TileAssembler.h index 715f228c3df..26a884551cd 100644 --- a/src/server/collision/Maps/TileAssembler.h +++ b/src/server/collision/Maps/TileAssembler.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/collision/Models/GameObjectModel.cpp b/src/server/collision/Models/GameObjectModel.cpp index 8bba2cf1b1b..d254a640279 100644 --- a/src/server/collision/Models/GameObjectModel.cpp +++ b/src/server/collision/Models/GameObjectModel.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/collision/Models/GameObjectModel.h b/src/server/collision/Models/GameObjectModel.h index 143337e88f9..06a74cc6eb0 100644 --- a/src/server/collision/Models/GameObjectModel.h +++ b/src/server/collision/Models/GameObjectModel.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/collision/Models/ModelInstance.cpp b/src/server/collision/Models/ModelInstance.cpp index 55759ea20c4..3262c154965 100644 --- a/src/server/collision/Models/ModelInstance.cpp +++ b/src/server/collision/Models/ModelInstance.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/collision/Models/ModelInstance.h b/src/server/collision/Models/ModelInstance.h index 8ea2792393b..3ea68f57ba4 100644 --- a/src/server/collision/Models/ModelInstance.h +++ b/src/server/collision/Models/ModelInstance.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/collision/Models/WorldModel.cpp b/src/server/collision/Models/WorldModel.cpp index fcb28e5e331..99f3782215d 100644 --- a/src/server/collision/Models/WorldModel.cpp +++ b/src/server/collision/Models/WorldModel.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/collision/Models/WorldModel.h b/src/server/collision/Models/WorldModel.h index 309b6d8051c..8778998a6b7 100644 --- a/src/server/collision/Models/WorldModel.h +++ b/src/server/collision/Models/WorldModel.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/collision/VMapDefinitions.h b/src/server/collision/VMapDefinitions.h index f51fdcc2d2b..0bc74df51ec 100644 --- a/src/server/collision/VMapDefinitions.h +++ b/src/server/collision/VMapDefinitions.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/collision/VMapTools.h b/src/server/collision/VMapTools.h index 5aefda6deb4..3951955a446 100644 --- a/src/server/collision/VMapTools.h +++ b/src/server/collision/VMapTools.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/AI/CoreAI/CombatAI.cpp b/src/server/game/AI/CoreAI/CombatAI.cpp index 4f015e3f016..da55a073679 100644 --- a/src/server/game/AI/CoreAI/CombatAI.cpp +++ b/src/server/game/AI/CoreAI/CombatAI.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/AI/CoreAI/CombatAI.h b/src/server/game/AI/CoreAI/CombatAI.h index 3fac2c78962..10716627e85 100644 --- a/src/server/game/AI/CoreAI/CombatAI.h +++ b/src/server/game/AI/CoreAI/CombatAI.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/AI/CoreAI/GameObjectAI.cpp b/src/server/game/AI/CoreAI/GameObjectAI.cpp index adc82d7b018..35f1c0ed7b8 100644 --- a/src/server/game/AI/CoreAI/GameObjectAI.cpp +++ b/src/server/game/AI/CoreAI/GameObjectAI.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/AI/CoreAI/GameObjectAI.h b/src/server/game/AI/CoreAI/GameObjectAI.h index 7c0e04aa957..36ca2c3253f 100644 --- a/src/server/game/AI/CoreAI/GameObjectAI.h +++ b/src/server/game/AI/CoreAI/GameObjectAI.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/AI/CoreAI/GuardAI.cpp b/src/server/game/AI/CoreAI/GuardAI.cpp index c38be3aa22a..6a87114171b 100644 --- a/src/server/game/AI/CoreAI/GuardAI.cpp +++ b/src/server/game/AI/CoreAI/GuardAI.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/AI/CoreAI/GuardAI.h b/src/server/game/AI/CoreAI/GuardAI.h index 1a8b220cb43..9af047e8906 100644 --- a/src/server/game/AI/CoreAI/GuardAI.h +++ b/src/server/game/AI/CoreAI/GuardAI.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/AI/CoreAI/PassiveAI.cpp b/src/server/game/AI/CoreAI/PassiveAI.cpp index e3f852d08eb..07987cf8cec 100644 --- a/src/server/game/AI/CoreAI/PassiveAI.cpp +++ b/src/server/game/AI/CoreAI/PassiveAI.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/AI/CoreAI/PassiveAI.h b/src/server/game/AI/CoreAI/PassiveAI.h index 58c9a348fe9..33bfde4f9f2 100644 --- a/src/server/game/AI/CoreAI/PassiveAI.h +++ b/src/server/game/AI/CoreAI/PassiveAI.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/AI/CoreAI/PetAI.cpp b/src/server/game/AI/CoreAI/PetAI.cpp index bc131724484..d6e749b942a 100644 --- a/src/server/game/AI/CoreAI/PetAI.cpp +++ b/src/server/game/AI/CoreAI/PetAI.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/AI/CoreAI/PetAI.h b/src/server/game/AI/CoreAI/PetAI.h index 6e24a079f9f..450f68443f0 100644 --- a/src/server/game/AI/CoreAI/PetAI.h +++ b/src/server/game/AI/CoreAI/PetAI.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/AI/CoreAI/ReactorAI.cpp b/src/server/game/AI/CoreAI/ReactorAI.cpp index d749ce91c05..0f94d18acce 100644 --- a/src/server/game/AI/CoreAI/ReactorAI.cpp +++ b/src/server/game/AI/CoreAI/ReactorAI.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/AI/CoreAI/ReactorAI.h b/src/server/game/AI/CoreAI/ReactorAI.h index 42f9c425ceb..417944f9ba2 100644 --- a/src/server/game/AI/CoreAI/ReactorAI.h +++ b/src/server/game/AI/CoreAI/ReactorAI.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/AI/CoreAI/TotemAI.cpp b/src/server/game/AI/CoreAI/TotemAI.cpp index 508554a7a32..245a47dbe64 100644 --- a/src/server/game/AI/CoreAI/TotemAI.cpp +++ b/src/server/game/AI/CoreAI/TotemAI.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/AI/CoreAI/TotemAI.h b/src/server/game/AI/CoreAI/TotemAI.h index 897cfea1c44..4d5f03566ba 100644 --- a/src/server/game/AI/CoreAI/TotemAI.h +++ b/src/server/game/AI/CoreAI/TotemAI.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/AI/CoreAI/UnitAI.cpp b/src/server/game/AI/CoreAI/UnitAI.cpp index 1b6cdee737c..8bf34527769 100644 --- a/src/server/game/AI/CoreAI/UnitAI.cpp +++ b/src/server/game/AI/CoreAI/UnitAI.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/AI/CoreAI/UnitAI.h b/src/server/game/AI/CoreAI/UnitAI.h index 33a09fd03b0..960d9f8903b 100644 --- a/src/server/game/AI/CoreAI/UnitAI.h +++ b/src/server/game/AI/CoreAI/UnitAI.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/AI/CreatureAI.cpp b/src/server/game/AI/CreatureAI.cpp index c8c456b772f..07c75eb424f 100644 --- a/src/server/game/AI/CreatureAI.cpp +++ b/src/server/game/AI/CreatureAI.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/AI/CreatureAI.h b/src/server/game/AI/CreatureAI.h index 3efc9a831cb..6357ac33f1e 100644 --- a/src/server/game/AI/CreatureAI.h +++ b/src/server/game/AI/CreatureAI.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/AI/CreatureAIFactory.h b/src/server/game/AI/CreatureAIFactory.h index 809c17cadb8..fc2d009e673 100644 --- a/src/server/game/AI/CreatureAIFactory.h +++ b/src/server/game/AI/CreatureAIFactory.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/AI/CreatureAIImpl.h b/src/server/game/AI/CreatureAIImpl.h index 6b190938596..7447e290ba9 100644 --- a/src/server/game/AI/CreatureAIImpl.h +++ b/src/server/game/AI/CreatureAIImpl.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/game/AI/CreatureAIRegistry.cpp b/src/server/game/AI/CreatureAIRegistry.cpp index 8b74db24a42..512ad124bc0 100644 --- a/src/server/game/AI/CreatureAIRegistry.cpp +++ b/src/server/game/AI/CreatureAIRegistry.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/AI/CreatureAIRegistry.h b/src/server/game/AI/CreatureAIRegistry.h index 5ffa171fedf..f8106cd0e1a 100644 --- a/src/server/game/AI/CreatureAIRegistry.h +++ b/src/server/game/AI/CreatureAIRegistry.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/AI/CreatureAISelector.cpp b/src/server/game/AI/CreatureAISelector.cpp index 597ad24d4e1..473af0d787e 100644 --- a/src/server/game/AI/CreatureAISelector.cpp +++ b/src/server/game/AI/CreatureAISelector.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/AI/CreatureAISelector.h b/src/server/game/AI/CreatureAISelector.h index f399b0985b1..6864c3ba405 100644 --- a/src/server/game/AI/CreatureAISelector.h +++ b/src/server/game/AI/CreatureAISelector.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp b/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp index d00f686a98a..36c1d384693 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp +++ b/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/AI/ScriptedAI/ScriptedCreature.h b/src/server/game/AI/ScriptedAI/ScriptedCreature.h index a111898e3e1..cee6ba3c379 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedCreature.h +++ b/src/server/game/AI/ScriptedAI/ScriptedCreature.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp index dbc8989c530..dcf5bd56fa6 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp +++ b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.h b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.h index 280990fd648..4aa00d74e4e 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.h +++ b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp b/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp index 5cc128fda5f..0fbfc2cebac 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp +++ b/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.h b/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.h index c1fa3275bb8..df435fa5c9a 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.h +++ b/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/AI/ScriptedAI/ScriptedGossip.h b/src/server/game/AI/ScriptedAI/ScriptedGossip.h index 5e76c1f83f4..d8797a688c0 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedGossip.h +++ b/src/server/game/AI/ScriptedAI/ScriptedGossip.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp index 8b914d7ca20..a203aeb6b97 100644 --- a/src/server/game/AI/SmartScripts/SmartAI.cpp +++ b/src/server/game/AI/SmartScripts/SmartAI.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -439,6 +439,8 @@ void SmartAI::EnterEvadeMode() me->LoadCreaturesAddon(); me->SetLootRecipient(NULL); me->ResetPlayerDamageReq(); + me->SetLastDamagedTime(0); + GetScript()->ProcessEventsFor(SMART_EVENT_EVADE);//must be after aura clear so we can cast spells from db SetRun(mRun); @@ -574,7 +576,7 @@ void SmartAI::JustReachedHome() GetScript()->ProcessEventsFor(SMART_EVENT_REACHED_HOME); if (!UpdateVictim() && me->GetMotionMaster()->GetCurrentMovementGeneratorType() == IDLE_MOTION_TYPE && me->GetWaypointPath()) - me->ToCreature()->GetMotionMaster()->MovePath(me->GetWaypointPath(), true); + me->GetMotionMaster()->MovePath(me->GetWaypointPath(), true); } mJustReset = false; @@ -904,12 +906,6 @@ bool SmartGameObjectAI::QuestReward(Player* player, Quest const* quest, uint32 o return false; } -// Called when the dialog status between a player and the gameobject is requested. -uint32 SmartGameObjectAI::GetDialogStatus(Player* /*player*/) -{ - return DIALOG_STATUS_SCRIPTED_NO_STATUS; -} - // Called when the gameobject is destroyed (destructible buildings only). void SmartGameObjectAI::Destroyed(Player* player, uint32 eventId) { diff --git a/src/server/game/AI/SmartScripts/SmartAI.h b/src/server/game/AI/SmartScripts/SmartAI.h index 5c56736a673..dcf64b657f8 100644 --- a/src/server/game/AI/SmartScripts/SmartAI.h +++ b/src/server/game/AI/SmartScripts/SmartAI.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -236,7 +236,7 @@ class SmartAI : public CreatureAI class SmartGameObjectAI : public GameObjectAI { public: - SmartGameObjectAI(GameObject* g) : GameObjectAI(g), go(g) { } + SmartGameObjectAI(GameObject* g) : GameObjectAI(g) { } ~SmartGameObjectAI() { } void UpdateAI(uint32 diff); @@ -250,7 +250,6 @@ class SmartGameObjectAI : public GameObjectAI bool GossipSelectCode(Player* /*player*/, uint32 /*sender*/, uint32 /*action*/, const char* /*code*/); bool QuestAccept(Player* player, Quest const* quest); bool QuestReward(Player* player, Quest const* quest, uint32 opt); - uint32 GetDialogStatus(Player* /*player*/); void Destroyed(Player* player, uint32 eventId); void SetData(uint32 id, uint32 value); void SetScript9(SmartScriptHolder& e, uint32 entry, Unit* invoker); @@ -258,8 +257,7 @@ class SmartGameObjectAI : public GameObjectAI void OnStateChanged(uint32 state, Unit* unit); void EventInform(uint32 eventId); - protected: - GameObject* const go; + private: SmartScript mScript; }; #endif diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp index 0069cd3dd45..bd51fe0a85b 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -2551,7 +2551,10 @@ ObjectList* SmartScript::GetTargets(SmartScriptHolder const& e, Unit* invoker /* { ObjectListMap::iterator itr = mTargetStorage->find(e.target.stored.id); if (itr != mTargetStorage->end()) - l->assign(itr->second->begin(), itr->second->end()); + { + ObjectList* objectList = itr->second->GetObjectList(); + l->assign(objectList->begin(), objectList->end()); + } return l; } diff --git a/src/server/game/AI/SmartScripts/SmartScript.h b/src/server/game/AI/SmartScripts/SmartScript.h index 77327d6229b..2e1068d1bff 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.h +++ b/src/server/game/AI/SmartScripts/SmartScript.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -99,13 +99,13 @@ class SmartScript if (mTargetStorage->find(id) != mTargetStorage->end()) { // check if already stored - if ((*mTargetStorage)[id] == targets) + if ((*mTargetStorage)[id]->Equals(targets)) return; delete (*mTargetStorage)[id]; } - (*mTargetStorage)[id] = targets; + (*mTargetStorage)[id] = new ObjectGuidList(targets, GetBaseObject()); } bool IsSmart(Creature* c = NULL) @@ -141,7 +141,7 @@ class SmartScript { ObjectListMap::iterator itr = mTargetStorage->find(id); if (itr != mTargetStorage->end()) - return (*itr).second; + return (*itr).second->GetObjectList(); return NULL; } diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp index 414e204ad5a..543cb9235d3 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.h b/src/server/game/AI/SmartScripts/SmartScriptMgr.h index f6ace2f9881..08ef71771e5 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.h +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -1321,7 +1321,56 @@ struct SmartScriptHolder typedef UNORDERED_MAP<uint32, WayPoint*> WPPath; typedef std::list<WorldObject*> ObjectList; -typedef UNORDERED_MAP<uint32, ObjectList*> ObjectListMap; +typedef std::list<uint64> GuidList; +class ObjectGuidList +{ + ObjectList* m_objectList; + GuidList* m_guidList; + WorldObject* m_baseObject; + +public: + ObjectGuidList(ObjectList* objectList, WorldObject* baseObject) + { + ASSERT(objectList != NULL); + ASSERT(baseObject != NULL); + m_objectList = objectList; + m_baseObject = baseObject; + m_guidList = new GuidList(); + + for (ObjectList::iterator itr = objectList->begin(); itr != objectList->end(); ++itr) + { + m_guidList->push_back((*itr)->GetGUID()); + } + } + + ObjectList* GetObjectList() + { + //sanitize list using m_guidList + m_objectList->clear(); + + for (GuidList::iterator itr = m_guidList->begin(); itr != m_guidList->end(); ++itr) + { + if (WorldObject* obj = ObjectAccessor::GetWorldObject(*m_baseObject, *itr)) + m_objectList->push_back(obj); + else + TC_LOG_DEBUG("scripts.ai", "SmartScript::mTargetStorage stores a guid to an invalid object: " UI64FMTD, *itr); + } + + return m_objectList; + } + + bool Equals(ObjectList* objectList) + { + return m_objectList == objectList; + } + + ~ObjectGuidList() + { + delete m_objectList; + delete m_guidList; + } +}; +typedef UNORDERED_MAP<uint32, ObjectGuidList*> ObjectListMap; class SmartWaypointMgr { diff --git a/src/server/game/Accounts/AccountMgr.cpp b/src/server/game/Accounts/AccountMgr.cpp index 4c71a044488..8a5c6937ca0 100644 --- a/src/server/game/Accounts/AccountMgr.cpp +++ b/src/server/game/Accounts/AccountMgr.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Accounts/AccountMgr.h b/src/server/game/Accounts/AccountMgr.h index 24bea5c15a9..b3012ace177 100644 --- a/src/server/game/Accounts/AccountMgr.h +++ b/src/server/game/Accounts/AccountMgr.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Accounts/RBAC.cpp b/src/server/game/Accounts/RBAC.cpp index 1d42ed819cd..058c6799d94 100644 --- a/src/server/game/Accounts/RBAC.cpp +++ b/src/server/game/Accounts/RBAC.cpp @@ -1,5 +1,5 @@ /*
- * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/src/server/game/Accounts/RBAC.h b/src/server/game/Accounts/RBAC.h index b18996f2af0..2a10da29c20 100644 --- a/src/server/game/Accounts/RBAC.h +++ b/src/server/game/Accounts/RBAC.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/game/Achievements/AchievementMgr.cpp b/src/server/game/Achievements/AchievementMgr.cpp index 191acdefcac..7d53f481fe8 100644 --- a/src/server/game/Achievements/AchievementMgr.cpp +++ b/src/server/game/Achievements/AchievementMgr.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Achievements/AchievementMgr.h b/src/server/game/Achievements/AchievementMgr.h index 65a936c3d40..1a6777d1055 100644 --- a/src/server/game/Achievements/AchievementMgr.h +++ b/src/server/game/Achievements/AchievementMgr.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Addons/AddonMgr.cpp b/src/server/game/Addons/AddonMgr.cpp index ec78a7565d4..802c649943f 100644 --- a/src/server/game/Addons/AddonMgr.cpp +++ b/src/server/game/Addons/AddonMgr.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Addons/AddonMgr.h b/src/server/game/Addons/AddonMgr.h index 35e24e965b5..5b98a1f9be6 100644 --- a/src/server/game/Addons/AddonMgr.h +++ b/src/server/game/Addons/AddonMgr.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp index ec2dec8df08..29d80f5fa6b 100644 --- a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp +++ b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/AuctionHouse/AuctionHouseMgr.h b/src/server/game/AuctionHouse/AuctionHouseMgr.h index 4892821cb94..506c4bea0c5 100644 --- a/src/server/game/AuctionHouse/AuctionHouseMgr.h +++ b/src/server/game/AuctionHouse/AuctionHouseMgr.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Battlefield/Battlefield.cpp b/src/server/game/Battlefield/Battlefield.cpp index 17c5b0cc85e..d8674ed476b 100644 --- a/src/server/game/Battlefield/Battlefield.cpp +++ b/src/server/game/Battlefield/Battlefield.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/game/Battlefield/Battlefield.h b/src/server/game/Battlefield/Battlefield.h index b43a5f28048..e0e223c9e56 100644 --- a/src/server/game/Battlefield/Battlefield.h +++ b/src/server/game/Battlefield/Battlefield.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/game/Battlefield/BattlefieldMgr.cpp b/src/server/game/Battlefield/BattlefieldMgr.cpp index 1585724334d..8aa58f0ac4b 100644 --- a/src/server/game/Battlefield/BattlefieldMgr.cpp +++ b/src/server/game/Battlefield/BattlefieldMgr.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -16,125 +16,130 @@ */ #include "BattlefieldMgr.h" -#include "Zones/BattlefieldWG.h" +#include "BattlefieldWG.h" #include "ObjectMgr.h" #include "Player.h" BattlefieldMgr::BattlefieldMgr() { - m_UpdateTimer = 0; - //TC_LOG_DEBUG("bg.battlefield", "Instantiating BattlefieldMgr"); + _updateTimer = 0; } BattlefieldMgr::~BattlefieldMgr() { - //TC_LOG_DEBUG("bg.battlefield", "Deleting BattlefieldMgr"); - for (BattlefieldSet::iterator itr = m_BattlefieldSet.begin(); itr != m_BattlefieldSet.end(); ++itr) + for (BattlefieldSet::iterator itr = _battlefieldSet.begin(); itr != _battlefieldSet.end(); ++itr) delete *itr; + + _battlefieldMap.clear(); } void BattlefieldMgr::InitBattlefield() { - Battlefield* pBf = new BattlefieldWG; + Battlefield* wg = new BattlefieldWG(); // respawn, init variables - if (!pBf->SetupBattlefield()) + if (!wg->SetupBattlefield()) { - TC_LOG_INFO("misc", "Battlefield : Wintergrasp init failed."); - delete pBf; + TC_LOG_INFO("bg.battlefield", "Battlefield: Wintergrasp init failed."); + delete wg; } else { - m_BattlefieldSet.push_back(pBf); - TC_LOG_INFO("misc", "Battlefield : Wintergrasp successfully initiated."); + _battlefieldSet.push_back(wg); + TC_LOG_INFO("bg.battlefield", "Battlefield: Wintergrasp successfully initiated."); } - /* For Cataclysm: Tol Barad - pBf = new BattlefieldTB; - // respawn, init variables - if (!pBf->SetupBattlefield()) - { - TC_LOG_DEBUG("bg.battlefield", "Battlefield : Tol Barad init failed."); - delete pBf; - } - else - { - m_BattlefieldSet.push_back(pBf); - TC_LOG_DEBUG("bg.battlefield", "Battlefield : Tol Barad successfully initiated."); - } */ + /* + For Cataclysm: Tol Barad + Battlefield* tb = new BattlefieldTB; + // respawn, init variables + if (!tb->SetupBattlefield()) + { + TC_LOG_DEBUG("bg.battlefield", "Battlefield: Tol Barad init failed."); + delete tb; + } + else + { + _battlefieldSet.push_back(tb); + TC_LOG_DEBUG("bg.battlefield", "Battlefield: Tol Barad successfully initiated."); + } + */ } -void BattlefieldMgr::AddZone(uint32 zoneid, Battlefield *handle) +void BattlefieldMgr::AddZone(uint32 zoneId, Battlefield* bf) { - m_BattlefieldMap[zoneid] = handle; + _battlefieldMap[zoneId] = bf; } -void BattlefieldMgr::HandlePlayerEnterZone(Player* player, uint32 zoneid) +void BattlefieldMgr::HandlePlayerEnterZone(Player* player, uint32 zoneId) { - BattlefieldMap::iterator itr = m_BattlefieldMap.find(zoneid); - if (itr == m_BattlefieldMap.end()) + BattlefieldMap::iterator itr = _battlefieldMap.find(zoneId); + if (itr == _battlefieldMap.end()) return; Battlefield* bf = itr->second; - if (bf->HasPlayer(player) || !bf->IsEnabled()) + if (!bf->IsEnabled() || bf->HasPlayer(player)) return; - bf->HandlePlayerEnterZone(player, zoneid); - TC_LOG_DEBUG("bg.battlefield", "Player %u entered outdoorpvp id %u", player->GetGUIDLow(), bf->GetTypeId()); + bf->HandlePlayerEnterZone(player, zoneId); + TC_LOG_DEBUG("bg.battlefield", "Player %u entered battlefield id %u", player->GetGUIDLow(), bf->GetTypeId()); } -void BattlefieldMgr::HandlePlayerLeaveZone(Player* player, uint32 zoneid) +void BattlefieldMgr::HandlePlayerLeaveZone(Player* player, uint32 zoneId) { - BattlefieldMap::iterator itr = m_BattlefieldMap.find(zoneid); - if (itr == m_BattlefieldMap.end()) + BattlefieldMap::iterator itr = _battlefieldMap.find(zoneId); + if (itr == _battlefieldMap.end()) return; // teleport: remove once in removefromworld, once in updatezone if (!itr->second->HasPlayer(player)) return; - itr->second->HandlePlayerLeaveZone(player, zoneid); - TC_LOG_DEBUG("bg.battlefield", "Player %u left outdoorpvp id %u", player->GetGUIDLow(), itr->second->GetTypeId()); + + itr->second->HandlePlayerLeaveZone(player, zoneId); + TC_LOG_DEBUG("bg.battlefield", "Player %u left battlefield id %u", player->GetGUIDLow(), itr->second->GetTypeId()); } -Battlefield *BattlefieldMgr::GetBattlefieldToZoneId(uint32 zoneid) +Battlefield* BattlefieldMgr::GetBattlefieldToZoneId(uint32 zoneId) { - BattlefieldMap::iterator itr = m_BattlefieldMap.find(zoneid); - if (itr == m_BattlefieldMap.end()) + BattlefieldMap::iterator itr = _battlefieldMap.find(zoneId); + if (itr == _battlefieldMap.end()) { // no handle for this zone, return return NULL; } + if (!itr->second->IsEnabled()) return NULL; + return itr->second; } -Battlefield *BattlefieldMgr::GetBattlefieldByBattleId(uint32 battleid) +Battlefield* BattlefieldMgr::GetBattlefieldByBattleId(uint32 battleId) { - for (BattlefieldSet::iterator itr = m_BattlefieldSet.begin(); itr != m_BattlefieldSet.end(); ++itr) + for (BattlefieldSet::iterator itr = _battlefieldSet.begin(); itr != _battlefieldSet.end(); ++itr) { - if ((*itr)->GetBattleId() == battleid) - return (*itr); + if ((*itr)->GetBattleId() == battleId) + return *itr; } return NULL; } +ZoneScript* BattlefieldMgr::GetZoneScript(uint32 zoneId) +{ + BattlefieldMap::iterator itr = _battlefieldMap.find(zoneId); + if (itr != _battlefieldMap.end()) + return itr->second; + + return NULL; +} + void BattlefieldMgr::Update(uint32 diff) { - m_UpdateTimer += diff; - if (m_UpdateTimer > BATTLEFIELD_OBJECTIVE_UPDATE_INTERVAL) + _updateTimer += diff; + if (_updateTimer > BATTLEFIELD_OBJECTIVE_UPDATE_INTERVAL) { - for (BattlefieldSet::iterator itr = m_BattlefieldSet.begin(); itr != m_BattlefieldSet.end(); ++itr) + for (BattlefieldSet::iterator itr = _battlefieldSet.begin(); itr != _battlefieldSet.end(); ++itr) if ((*itr)->IsEnabled()) - (*itr)->Update(m_UpdateTimer); - m_UpdateTimer = 0; + (*itr)->Update(_updateTimer); + _updateTimer = 0; } } - -ZoneScript* BattlefieldMgr::GetZoneScript(uint32 zoneId) -{ - BattlefieldMap::iterator itr = m_BattlefieldMap.find(zoneId); - if (itr != m_BattlefieldMap.end()) - return itr->second; - else - return NULL; -} diff --git a/src/server/game/Battlefield/BattlefieldMgr.h b/src/server/game/Battlefield/BattlefieldMgr.h index af1cea763df..bb8a076d5d0 100644 --- a/src/server/game/Battlefield/BattlefieldMgr.h +++ b/src/server/game/Battlefield/BattlefieldMgr.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -19,60 +19,51 @@ #define BATTLEFIELD_MGR_H_ #include "Battlefield.h" -#include "ace/Singleton.h" +#include <ace/Singleton.h> class Player; -class GameObject; -class Creature; class ZoneScript; -struct GossipMenuItems; // class to handle player enter / leave / areatrigger / GO use events class BattlefieldMgr { - public: - // ctor - BattlefieldMgr(); - // dtor - ~BattlefieldMgr(); + public: + // ctor + BattlefieldMgr(); + // dtor + ~BattlefieldMgr(); - // create battlefield events - void InitBattlefield(); - // called when a player enters an battlefield area - void HandlePlayerEnterZone(Player* player, uint32 areaflag); - // called when player leaves an battlefield area - void HandlePlayerLeaveZone(Player* player, uint32 areaflag); - // called when player resurrects - void HandlePlayerResurrects(Player* player, uint32 areaflag); - // return assigned battlefield - Battlefield* GetBattlefieldToZoneId(uint32 zoneid); - Battlefield* GetBattlefieldByBattleId(uint32 battleid); + // create battlefield events + void InitBattlefield(); - ZoneScript* GetZoneScript(uint32 zoneId); + // called when a player enters an battlefield area + void HandlePlayerEnterZone(Player* player, uint32 zoneId); + // called when player leaves an battlefield area + void HandlePlayerLeaveZone(Player* player, uint32 zoneId); - void AddZone(uint32 zoneid, Battlefield * handle); + // return assigned battlefield + Battlefield* GetBattlefieldToZoneId(uint32 zoneId); + Battlefield* GetBattlefieldByBattleId(uint32 battleId); - void Update(uint32 diff); + ZoneScript* GetZoneScript(uint32 zoneId); - void HandleGossipOption(Player* player, uint64 guid, uint32 gossipid); + void AddZone(uint32 zoneId, Battlefield* bf); - bool CanTalkTo(Player* player, Creature* creature, GossipMenuItems gso); + void Update(uint32 diff); - void HandleDropFlag(Player* player, uint32 spellId); - - typedef std::vector < Battlefield * >BattlefieldSet; - typedef std::map < uint32 /* zoneid */, Battlefield * >BattlefieldMap; - private: - // contains all initiated battlefield events - // used when initing / cleaning up - BattlefieldSet m_BattlefieldSet; - // maps the zone ids to an battlefield event - // used in player event handling - BattlefieldMap m_BattlefieldMap; - // update interval - uint32 m_UpdateTimer; + private: + typedef std::vector<Battlefield*> BattlefieldSet; + typedef std::map<uint32 /*zoneId*/, Battlefield*> BattlefieldMap; + // contains all initiated battlefield events + // used when initing / cleaning up + BattlefieldSet _battlefieldSet; + // maps the zone ids to an battlefield event + // used in player event handling + BattlefieldMap _battlefieldMap; + // update interval + uint32 _updateTimer; }; #define sBattlefieldMgr ACE_Singleton<BattlefieldMgr, ACE_Null_Mutex>::instance() -#endif +#endif // BATTLEFIELD_MGR_H_ diff --git a/src/server/game/Battlefield/Zones/BattlefieldWG.cpp b/src/server/game/Battlefield/Zones/BattlefieldWG.cpp index 67288e0fadb..7ec5a09508a 100644 --- a/src/server/game/Battlefield/Zones/BattlefieldWG.cpp +++ b/src/server/game/Battlefield/Zones/BattlefieldWG.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -30,14 +30,6 @@ #include "Vehicle.h" #include "WorldSession.h" -enum WGVehicles -{ - NPC_WG_SEIGE_ENGINE_ALLIANCE = 28312, - NPC_WG_SEIGE_ENGINE_HORDE = 32627, - NPC_WG_DEMOLISHER = 28094, - NPC_WG_CATAPULT = 27881 -}; - BattlefieldWG::~BattlefieldWG() { for (Workshop::const_iterator itr = WorkshopsList.begin(); itr != WorkshopsList.end(); ++itr) @@ -192,7 +184,7 @@ bool BattlefieldWG::SetupBattlefield() if (GameObject* go = SpawnGameObject(WGPortalDefenderData[i].entry, WGPortalDefenderData[i].x, WGPortalDefenderData[i].y, WGPortalDefenderData[i].z, WGPortalDefenderData[i].o)) { DefenderPortalList.insert(go->GetGUID()); - go->SetUInt32Value(GAMEOBJECT_FACTION, WintergraspFaction[GetDefenderTeam()]); + go->SetFaction(WintergraspFaction[GetDefenderTeam()]); } } @@ -222,7 +214,7 @@ void BattlefieldWG::OnBattleStart() if (GameObject* relic = SpawnGameObject(GO_WINTERGRASP_TITAN_S_RELIC, 5440.0f, 2840.8f, 430.43f, 0)) { // Update faction of relic, only attacker can click on - relic->SetUInt32Value(GAMEOBJECT_FACTION, WintergraspFaction[GetAttackerTeam()]); + relic->SetFaction(WintergraspFaction[GetAttackerTeam()]); // Set in use (not allow to click on before last door is broken) relic->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE); m_titansRelicGUID = relic->GetGUID(); @@ -360,7 +352,7 @@ void BattlefieldWG::OnBattleEnd(bool endByTimer) // Update portal defender faction for (GuidSet::const_iterator itr = DefenderPortalList.begin(); itr != DefenderPortalList.end(); ++itr) if (GameObject* portal = GetGameObject(*itr)) - portal->SetUInt32Value(GAMEOBJECT_FACTION, WintergraspFaction[GetDefenderTeam()]); + portal->SetFaction(WintergraspFaction[GetDefenderTeam()]); // Saving data for (GameObjectBuilding::const_iterator itr = BuildingsInZone.begin(); itr != BuildingsInZone.end(); ++itr) @@ -813,6 +805,9 @@ uint32 BattlefieldWG::GetData(uint32 data) const // Graveyards and Workshops are controlled by the same team. if (BfGraveyard const* graveyard = GetGraveyardById(GetSpiritGraveyardId(data))) return graveyard->GetControlTeamId(); + break; + default: + break; } return Battlefield::GetData(data); diff --git a/src/server/game/Battlefield/Zones/BattlefieldWG.h b/src/server/game/Battlefield/Zones/BattlefieldWG.h index 22a93e6a495..c54d8915a33 100644 --- a/src/server/game/Battlefield/Zones/BattlefieldWG.h +++ b/src/server/game/Battlefield/Zones/BattlefieldWG.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -1133,7 +1133,7 @@ struct BfWGGameObjectBuilding m_WG->SendUpdateWorldState(m_WorldState, m_State); } UpdateCreatureAndGo(); - build->SetUInt32Value(GAMEOBJECT_FACTION, WintergraspFaction[m_Team]); + build->SetFaction(WintergraspFaction[m_Team]); } } diff --git a/src/server/game/Battlegrounds/ArenaTeam.cpp b/src/server/game/Battlegrounds/ArenaTeam.cpp index 222a3f55387..2ca60534f30 100644 --- a/src/server/game/Battlegrounds/ArenaTeam.cpp +++ b/src/server/game/Battlegrounds/ArenaTeam.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Battlegrounds/ArenaTeam.h b/src/server/game/Battlegrounds/ArenaTeam.h index 0d37351583d..cd9e2be4318 100644 --- a/src/server/game/Battlegrounds/ArenaTeam.h +++ b/src/server/game/Battlegrounds/ArenaTeam.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Battlegrounds/ArenaTeamMgr.cpp b/src/server/game/Battlegrounds/ArenaTeamMgr.cpp index ac15440e564..dba891c96db 100644 --- a/src/server/game/Battlegrounds/ArenaTeamMgr.cpp +++ b/src/server/game/Battlegrounds/ArenaTeamMgr.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/game/Battlegrounds/ArenaTeamMgr.h b/src/server/game/Battlegrounds/ArenaTeamMgr.h index 589877a150d..123cbe2d41b 100644 --- a/src/server/game/Battlegrounds/ArenaTeamMgr.h +++ b/src/server/game/Battlegrounds/ArenaTeamMgr.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp index a6cc3ccfb6c..3fcfab81c73 100644 --- a/src/server/game/Battlegrounds/Battleground.cpp +++ b/src/server/game/Battlegrounds/Battleground.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -976,6 +976,8 @@ void Battleground::RemovePlayerAtLeave(uint64 guid, bool Transport, bool SendPac player->SpawnCorpseBones(); } } + else // try to resurrect the offline player. If he is alive nothing will happen + sObjectAccessor->ConvertCorpseForPlayer(guid); RemovePlayer(player, guid, team); // BG subclass specific code diff --git a/src/server/game/Battlegrounds/Battleground.h b/src/server/game/Battlegrounds/Battleground.h index eebf5bead25..a866f09639a 100644 --- a/src/server/game/Battlegrounds/Battleground.h +++ b/src/server/game/Battlegrounds/Battleground.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Battlegrounds/BattlegroundMgr.cpp b/src/server/game/Battlegrounds/BattlegroundMgr.cpp index 8b1d83c04c0..9d7a67ee0dc 100644 --- a/src/server/game/Battlegrounds/BattlegroundMgr.cpp +++ b/src/server/game/Battlegrounds/BattlegroundMgr.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Battlegrounds/BattlegroundMgr.h b/src/server/game/Battlegrounds/BattlegroundMgr.h index c66d9d64ab8..f10614baafc 100644 --- a/src/server/game/Battlegrounds/BattlegroundMgr.h +++ b/src/server/game/Battlegrounds/BattlegroundMgr.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Battlegrounds/BattlegroundQueue.cpp b/src/server/game/Battlegrounds/BattlegroundQueue.cpp index ae7a8d2e191..547d6e972c5 100644 --- a/src/server/game/Battlegrounds/BattlegroundQueue.cpp +++ b/src/server/game/Battlegrounds/BattlegroundQueue.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Battlegrounds/BattlegroundQueue.h b/src/server/game/Battlegrounds/BattlegroundQueue.h index 34c9e5ea1c7..37c7928b3de 100644 --- a/src/server/game/Battlegrounds/BattlegroundQueue.h +++ b/src/server/game/Battlegrounds/BattlegroundQueue.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp index e5d93dd9300..c05bd98b908 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAB.h b/src/server/game/Battlegrounds/Zones/BattlegroundAB.h index 81a2e899634..9ed34691adf 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundAB.h +++ b/src/server/game/Battlegrounds/Zones/BattlegroundAB.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp index 8edf5ea0bdb..6256f53f07b 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAV.h b/src/server/game/Battlegrounds/Zones/BattlegroundAV.h index 439fc656925..716e675a840 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundAV.h +++ b/src/server/game/Battlegrounds/Zones/BattlegroundAV.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundBE.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundBE.cpp index 264f421d9f7..c89fc57b8aa 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundBE.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundBE.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundBE.h b/src/server/game/Battlegrounds/Zones/BattlegroundBE.h index f9a3028ddf6..be801dfff2b 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundBE.h +++ b/src/server/game/Battlegrounds/Zones/BattlegroundBE.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundDS.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundDS.cpp index 567b3c248f7..3eb52945236 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundDS.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundDS.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundDS.h b/src/server/game/Battlegrounds/Zones/BattlegroundDS.h index 74c5e70a633..cb71300dc5d 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundDS.h +++ b/src/server/game/Battlegrounds/Zones/BattlegroundDS.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp index d4035f95cda..be2684631df 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundEY.h b/src/server/game/Battlegrounds/Zones/BattlegroundEY.h index 26c6d276311..baa75129c1e 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundEY.h +++ b/src/server/game/Battlegrounds/Zones/BattlegroundEY.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp index 0b04d81bd5b..590a07541fe 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -397,6 +397,9 @@ bool BattlegroundIC::SetupBattleground() return false; } + gunshipHorde->EnableMovement(false); + gunshipAlliance->EnableMovement(false); + // setting correct factions for Keep Cannons for (uint8 i = BG_IC_NPC_KEEP_CANNON_1; i < BG_IC_NPC_KEEP_CANNON_12; ++i) GetBGCreature(i)->setFaction(BG_IC_Factions[0]); diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundIC.h b/src/server/game/Battlegrounds/Zones/BattlegroundIC.h index acb5046444c..5238342ffcb 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundIC.h +++ b/src/server/game/Battlegrounds/Zones/BattlegroundIC.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundNA.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundNA.cpp index a2c1ca42406..70a940ec853 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundNA.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundNA.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundNA.h b/src/server/game/Battlegrounds/Zones/BattlegroundNA.h index e3633197253..dd21e44f593 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundNA.h +++ b/src/server/game/Battlegrounds/Zones/BattlegroundNA.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundRL.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundRL.cpp index 045e007bdb7..5f77c57c064 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundRL.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundRL.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundRL.h b/src/server/game/Battlegrounds/Zones/BattlegroundRL.h index 877e0626271..27974108168 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundRL.h +++ b/src/server/game/Battlegrounds/Zones/BattlegroundRL.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp index 79b732026cc..dd61b8b9e6f 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundRV.h b/src/server/game/Battlegrounds/Zones/BattlegroundRV.h index a836e4e1af3..454ea723f8b 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundRV.h +++ b/src/server/game/Battlegrounds/Zones/BattlegroundRV.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp index 323411ab93f..126077f7988 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundSA.h b/src/server/game/Battlegrounds/Zones/BattlegroundSA.h index c50721c4591..eb5e54231b5 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundSA.h +++ b/src/server/game/Battlegrounds/Zones/BattlegroundSA.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp index 98f143b6dae..92d56bbf5f0 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundWS.h b/src/server/game/Battlegrounds/Zones/BattlegroundWS.h index 4b95fcf6afd..c6c25ec52de 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundWS.h +++ b/src/server/game/Battlegrounds/Zones/BattlegroundWS.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/CMakeLists.txt b/src/server/game/CMakeLists.txt index be3997243e4..bf46c1fd7c6 100644 --- a/src/server/game/CMakeLists.txt +++ b/src/server/game/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> +# Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/src/server/game/Calendar/CalendarMgr.cpp b/src/server/game/Calendar/CalendarMgr.cpp index 5ac5e8fabee..f7a6864fb95 100644 --- a/src/server/game/Calendar/CalendarMgr.cpp +++ b/src/server/game/Calendar/CalendarMgr.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/game/Calendar/CalendarMgr.h b/src/server/game/Calendar/CalendarMgr.h index 402a8cb00df..da185d519d5 100644 --- a/src/server/game/Calendar/CalendarMgr.h +++ b/src/server/game/Calendar/CalendarMgr.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/game/Chat/Channels/Channel.cpp b/src/server/game/Chat/Channels/Channel.cpp index 1faa168b3a8..3f6a40d825d 100644 --- a/src/server/game/Chat/Channels/Channel.cpp +++ b/src/server/game/Chat/Channels/Channel.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Chat/Channels/Channel.h b/src/server/game/Chat/Channels/Channel.h index 295c8d5394d..9ad6877d929 100644 --- a/src/server/game/Chat/Channels/Channel.h +++ b/src/server/game/Chat/Channels/Channel.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Chat/Channels/ChannelMgr.cpp b/src/server/game/Chat/Channels/ChannelMgr.cpp index 96d28035b29..0975a690889 100644 --- a/src/server/game/Chat/Channels/ChannelMgr.cpp +++ b/src/server/game/Chat/Channels/ChannelMgr.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Chat/Channels/ChannelMgr.h b/src/server/game/Chat/Channels/ChannelMgr.h index 74a0d622e80..603eb52f589 100644 --- a/src/server/game/Chat/Channels/ChannelMgr.h +++ b/src/server/game/Chat/Channels/ChannelMgr.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Chat/Chat.cpp b/src/server/game/Chat/Chat.cpp index e446b18e78d..d90fd6f8443 100644 --- a/src/server/game/Chat/Chat.cpp +++ b/src/server/game/Chat/Chat.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Chat/Chat.h b/src/server/game/Chat/Chat.h index e6b5cb5f57b..f9000f636c5 100644 --- a/src/server/game/Chat/Chat.h +++ b/src/server/game/Chat/Chat.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Chat/ChatLink.cpp b/src/server/game/Chat/ChatLink.cpp index dd602ea07ab..66758930f7f 100644 --- a/src/server/game/Chat/ChatLink.cpp +++ b/src/server/game/Chat/ChatLink.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/game/Chat/ChatLink.h b/src/server/game/Chat/ChatLink.h index c77fcf7ad76..cc86cb538ea 100644 --- a/src/server/game/Chat/ChatLink.h +++ b/src/server/game/Chat/ChatLink.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -57,7 +57,7 @@ class ItemChatLink : public ChatLink { public: ItemChatLink() : ChatLink(), _item(NULL), _suffix(NULL), _property(NULL) - { + { memset(_data, 0, sizeof(_data)); } virtual bool Initialize(std::istringstream& iss); @@ -102,7 +102,7 @@ class AchievementChatLink : public ChatLink { public: AchievementChatLink() : ChatLink(), _guid(0), _achievement(NULL) - { + { memset(_data, 0, sizeof(_data)); } virtual bool Initialize(std::istringstream& iss); diff --git a/src/server/game/Combat/HostileRefManager.cpp b/src/server/game/Combat/HostileRefManager.cpp index 1e550596368..e359727ecb7 100644 --- a/src/server/game/Combat/HostileRefManager.cpp +++ b/src/server/game/Combat/HostileRefManager.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Combat/HostileRefManager.h b/src/server/game/Combat/HostileRefManager.h index 84c8db8bff0..495ef23d536 100644 --- a/src/server/game/Combat/HostileRefManager.h +++ b/src/server/game/Combat/HostileRefManager.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Combat/ThreatManager.cpp b/src/server/game/Combat/ThreatManager.cpp index ed23a72bee1..339ec579b1a 100644 --- a/src/server/game/Combat/ThreatManager.cpp +++ b/src/server/game/Combat/ThreatManager.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Combat/ThreatManager.h b/src/server/game/Combat/ThreatManager.h index 2d13d8b61e2..dd5904ae2ec 100644 --- a/src/server/game/Combat/ThreatManager.h +++ b/src/server/game/Combat/ThreatManager.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Combat/UnitEvents.h b/src/server/game/Combat/UnitEvents.h index 8bb7d95a384..50d4c3ad322 100644 --- a/src/server/game/Combat/UnitEvents.h +++ b/src/server/game/Combat/UnitEvents.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp index 2160fbdd173..e76ba18f1e2 100644 --- a/src/server/game/Conditions/ConditionMgr.cpp +++ b/src/server/game/Conditions/ConditionMgr.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Conditions/ConditionMgr.h b/src/server/game/Conditions/ConditionMgr.h index 9249ad1ef1f..876b922d243 100644 --- a/src/server/game/Conditions/ConditionMgr.h +++ b/src/server/game/Conditions/ConditionMgr.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Conditions/DisableMgr.cpp b/src/server/game/Conditions/DisableMgr.cpp index c32d4e4120e..b29959cac50 100644 --- a/src/server/game/Conditions/DisableMgr.cpp +++ b/src/server/game/Conditions/DisableMgr.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Conditions/DisableMgr.h b/src/server/game/Conditions/DisableMgr.h index 38751b8a89f..0930da78547 100644 --- a/src/server/game/Conditions/DisableMgr.h +++ b/src/server/game/Conditions/DisableMgr.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/DataStores/DBCEnums.h b/src/server/game/DataStores/DBCEnums.h index ec2ab308cd7..87397c6685b 100644 --- a/src/server/game/DataStores/DBCEnums.h +++ b/src/server/game/DataStores/DBCEnums.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/DataStores/DBCStores.cpp b/src/server/game/DataStores/DBCStores.cpp index 1fc2c3ee9f2..a4b3ded80e5 100644 --- a/src/server/game/DataStores/DBCStores.cpp +++ b/src/server/game/DataStores/DBCStores.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -482,7 +482,8 @@ void LoadDBCStores(const std::string& dataPath) continue; for (int x = 0; x < MAX_DIFFICULTY; ++x) - sSpellMgr->SetSpellDifficultyId(uint32(newEntry.SpellID[x]), spellDiff->ID); + if (newEntry.SpellID[x]) + sSpellMgr->SetSpellDifficultyId(uint32(newEntry.SpellID[x]), spellDiff->ID); } // create talent spells set diff --git a/src/server/game/DataStores/DBCStores.h b/src/server/game/DataStores/DBCStores.h index 808ebb78fa5..fe8fb35220b 100644 --- a/src/server/game/DataStores/DBCStores.h +++ b/src/server/game/DataStores/DBCStores.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/DataStores/DBCStructure.h b/src/server/game/DataStores/DBCStructure.h index 0c1f6af5506..7fb82ac8e03 100644 --- a/src/server/game/DataStores/DBCStructure.h +++ b/src/server/game/DataStores/DBCStructure.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/DataStores/DBCfmt.h b/src/server/game/DataStores/DBCfmt.h index 0066db2b049..a1ebaa70018 100644 --- a/src/server/game/DataStores/DBCfmt.h +++ b/src/server/game/DataStores/DBCfmt.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/DungeonFinding/LFG.cpp b/src/server/game/DungeonFinding/LFG.cpp index ce16ad5533e..0d4dbe9ea2f 100644 --- a/src/server/game/DungeonFinding/LFG.cpp +++ b/src/server/game/DungeonFinding/LFG.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/game/DungeonFinding/LFG.h b/src/server/game/DungeonFinding/LFG.h index 541e4d6bd43..0030dfa6c4b 100644 --- a/src/server/game/DungeonFinding/LFG.h +++ b/src/server/game/DungeonFinding/LFG.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/game/DungeonFinding/LFGGroupData.cpp b/src/server/game/DungeonFinding/LFGGroupData.cpp index f711514e26d..d7c9efeb70e 100644 --- a/src/server/game/DungeonFinding/LFGGroupData.cpp +++ b/src/server/game/DungeonFinding/LFGGroupData.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/game/DungeonFinding/LFGGroupData.h b/src/server/game/DungeonFinding/LFGGroupData.h index 47e562c37aa..b2bffd5a13b 100644 --- a/src/server/game/DungeonFinding/LFGGroupData.h +++ b/src/server/game/DungeonFinding/LFGGroupData.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/game/DungeonFinding/LFGMgr.cpp b/src/server/game/DungeonFinding/LFGMgr.cpp index f8a7e8bd649..2dcba7b6a76 100644 --- a/src/server/game/DungeonFinding/LFGMgr.cpp +++ b/src/server/game/DungeonFinding/LFGMgr.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/game/DungeonFinding/LFGMgr.h b/src/server/game/DungeonFinding/LFGMgr.h index 83b4142ae36..8e33ba0a2f6 100644 --- a/src/server/game/DungeonFinding/LFGMgr.h +++ b/src/server/game/DungeonFinding/LFGMgr.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/game/DungeonFinding/LFGPlayerData.cpp b/src/server/game/DungeonFinding/LFGPlayerData.cpp index 305263cb73d..0553d4ac4fe 100644 --- a/src/server/game/DungeonFinding/LFGPlayerData.cpp +++ b/src/server/game/DungeonFinding/LFGPlayerData.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/game/DungeonFinding/LFGPlayerData.h b/src/server/game/DungeonFinding/LFGPlayerData.h index a425ce77bad..e20e914a9c9 100644 --- a/src/server/game/DungeonFinding/LFGPlayerData.h +++ b/src/server/game/DungeonFinding/LFGPlayerData.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/game/DungeonFinding/LFGQueue.cpp b/src/server/game/DungeonFinding/LFGQueue.cpp index 14f09fc6161..67a9f0afc69 100644 --- a/src/server/game/DungeonFinding/LFGQueue.cpp +++ b/src/server/game/DungeonFinding/LFGQueue.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/game/DungeonFinding/LFGQueue.h b/src/server/game/DungeonFinding/LFGQueue.h index 128b2aa2f0b..b66121802c6 100644 --- a/src/server/game/DungeonFinding/LFGQueue.h +++ b/src/server/game/DungeonFinding/LFGQueue.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/game/DungeonFinding/LFGScripts.cpp b/src/server/game/DungeonFinding/LFGScripts.cpp index 5f4e5c664a0..1f182ce0761 100644 --- a/src/server/game/DungeonFinding/LFGScripts.cpp +++ b/src/server/game/DungeonFinding/LFGScripts.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/game/DungeonFinding/LFGScripts.h b/src/server/game/DungeonFinding/LFGScripts.h index bb1900cad93..c4e1cf0a203 100644 --- a/src/server/game/DungeonFinding/LFGScripts.h +++ b/src/server/game/DungeonFinding/LFGScripts.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/game/Entities/Corpse/Corpse.cpp b/src/server/game/Entities/Corpse/Corpse.cpp index 9d3ee045c61..e41426edb3d 100644 --- a/src/server/game/Entities/Corpse/Corpse.cpp +++ b/src/server/game/Entities/Corpse/Corpse.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Entities/Corpse/Corpse.h b/src/server/game/Entities/Corpse/Corpse.h index 1e9ee949c59..def84dd93a9 100644 --- a/src/server/game/Entities/Corpse/Corpse.h +++ b/src/server/game/Entities/Corpse/Corpse.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index d039ee385ec..e4bdc2d58fe 100644 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -182,8 +182,8 @@ void Creature::AddToWorld() ///- Register the creature for guid lookup if (!IsInWorld()) { - if (m_zoneScript) - m_zoneScript->OnCreatureCreate(this); + if (GetZoneScript()) + GetZoneScript()->OnCreatureCreate(this); sObjectAccessor->AddObject(this); Unit::AddToWorld(); SearchFormation(); @@ -197,8 +197,8 @@ void Creature::RemoveFromWorld() { if (IsInWorld()) { - if (m_zoneScript) - m_zoneScript->OnCreatureRemove(this); + if (GetZoneScript()) + GetZoneScript()->OnCreatureRemove(this); if (m_formation) sFormationMgr->RemoveCreatureFromGroup(m_formation, this); Unit::RemoveFromWorld(); @@ -312,7 +312,7 @@ bool Creature::InitEntry(uint32 entry, uint32 /*team*/, const CreatureData* data CreatureModelInfo const* minfo = sObjectMgr->GetCreatureModelRandomGender(&displayID); if (!minfo) // Cancel load if no model defined { - TC_LOG_ERROR("sql.sql", "Creature (Entry: %u) has no model defined in table `creature_template`, can't load. ", entry); + TC_LOG_ERROR("sql.sql", "Creature (Entry: %u) has invalid model %u defined in table `creature_template`, can't load.", entry, displayID); return false; } @@ -367,7 +367,6 @@ bool Creature::UpdateEntry(uint32 Entry, uint32 team, const CreatureData* data) if (!GetCreatureAddon()) SetSheath(SHEATH_STATE_MELEE); - SelectLevel(GetCreatureTemplate()); if (team == HORDE) setFaction(cInfo->faction_H); else @@ -381,10 +380,6 @@ bool Creature::UpdateEntry(uint32 Entry, uint32 team, const CreatureData* data) else SetUInt32Value(UNIT_NPC_FLAGS, npcflag); - SetAttackTime(BASE_ATTACK, cInfo->baseattacktime); - SetAttackTime(OFF_ATTACK, cInfo->baseattacktime); - SetAttackTime(RANGED_ATTACK, cInfo->rangeattacktime); - SetUInt32Value(UNIT_FIELD_FLAGS, unit_flags); SetUInt32Value(UNIT_FIELD_FLAGS_2, cInfo->unit_flags2); @@ -392,6 +387,12 @@ bool Creature::UpdateEntry(uint32 Entry, uint32 team, const CreatureData* data) RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IN_COMBAT); + SetAttackTime(BASE_ATTACK, cInfo->baseattacktime); + SetAttackTime(OFF_ATTACK, cInfo->baseattacktime); + SetAttackTime(RANGED_ATTACK, cInfo->rangeattacktime); + + SelectLevel(); + SetMeleeDamageSchool(SpellSchools(cInfo->dmgschool)); CreatureBaseStats const* stats = sObjectMgr->GetCreatureBaseStats(getLevel(), cInfo->unit_class); float armor = (float)stats->GenerateArmor(cInfo); /// @todo Why is this treated as uint32 when it's a float? @@ -1038,22 +1039,24 @@ void Creature::SaveToDB(uint32 mapid, uint8 spawnMask, uint32 phaseMask) WorldDatabase.CommitTransaction(trans); } -void Creature::SelectLevel(const CreatureTemplate* cinfo) +void Creature::SelectLevel() { - uint32 rank = IsPet()? 0 : cinfo->rank; + CreatureTemplate const* cInfo = GetCreatureTemplate(); + + uint32 rank = IsPet() ? 0 : cInfo->rank; // level - uint8 minlevel = std::min(cinfo->maxlevel, cinfo->minlevel); - uint8 maxlevel = std::max(cinfo->maxlevel, cinfo->minlevel); + uint8 minlevel = std::min(cInfo->maxlevel, cInfo->minlevel); + uint8 maxlevel = std::max(cInfo->maxlevel, cInfo->minlevel); uint8 level = minlevel == maxlevel ? minlevel : urand(minlevel, maxlevel); SetLevel(level); - CreatureBaseStats const* stats = sObjectMgr->GetCreatureBaseStats(level, cinfo->unit_class); + CreatureBaseStats const* stats = sObjectMgr->GetCreatureBaseStats(level, cInfo->unit_class); // health float healthmod = _GetHealthMod(rank); - uint32 basehp = stats->GenerateHealth(cinfo); + uint32 basehp = stats->GenerateHealth(cInfo); uint32 health = uint32(basehp * healthmod); SetCreateHealth(health); @@ -1062,10 +1065,10 @@ void Creature::SelectLevel(const CreatureTemplate* cinfo) ResetPlayerDamageReq(); // mana - uint32 mana = stats->GenerateMana(cinfo); + uint32 mana = stats->GenerateMana(cInfo); SetCreateMana(mana); - SetMaxPower(POWER_MANA, mana); //MAX Mana + SetMaxPower(POWER_MANA, mana); // MAX Mana SetPower(POWER_MANA, mana); /// @todo set UNIT_FIELD_POWER*, for some creature class case (energy, etc) @@ -1073,17 +1076,24 @@ void Creature::SelectLevel(const CreatureTemplate* cinfo) SetModifierValue(UNIT_MOD_HEALTH, BASE_VALUE, (float)health); SetModifierValue(UNIT_MOD_MANA, BASE_VALUE, (float)mana); - //damage - float damagemod = 1.0f;//_GetDamageMod(rank); + // damage - SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, cinfo->mindmg * damagemod); - SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, cinfo->maxdmg * damagemod); + float basedamage = stats->GenerateBaseDamage(cInfo); - SetFloatValue(UNIT_FIELD_MINRANGEDDAMAGE, cinfo->minrangedmg * damagemod); - SetFloatValue(UNIT_FIELD_MAXRANGEDDAMAGE, cinfo->maxrangedmg * damagemod); + float weaponBaseMinDamage = basedamage; + float weaponBaseMaxDamage = basedamage * 1.5; - SetModifierValue(UNIT_MOD_ATTACK_POWER, BASE_VALUE, cinfo->attackpower * damagemod); + SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, weaponBaseMinDamage); + SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, weaponBaseMaxDamage); + SetBaseWeaponDamage(OFF_ATTACK, MINDAMAGE, weaponBaseMinDamage); + SetBaseWeaponDamage(OFF_ATTACK, MAXDAMAGE, weaponBaseMaxDamage); + + SetBaseWeaponDamage(RANGED_ATTACK, MINDAMAGE, weaponBaseMinDamage); + SetBaseWeaponDamage(RANGED_ATTACK, MAXDAMAGE, weaponBaseMaxDamage); + + SetModifierValue(UNIT_MOD_ATTACK_POWER, BASE_VALUE, stats->AttackPower); + SetModifierValue(UNIT_MOD_ATTACK_POWER_RANGED, BASE_VALUE, stats->RangedAttackPower); } float Creature::_GetHealthMod(int32 Rank) @@ -1152,9 +1162,9 @@ float Creature::GetSpellDamageMod(int32 Rank) const bool Creature::CreateFromProto(uint32 guidlow, uint32 Entry, uint32 vehId, uint32 team, const CreatureData* data) { SetZoneScript(); - if (m_zoneScript && data) + if (GetZoneScript() && data) { - Entry = m_zoneScript->GetCreatureEntry(guidlow, data); + Entry = GetZoneScript()->GetCreatureEntry(guidlow, data); if (!Entry) return false; } @@ -1256,6 +1266,12 @@ bool Creature::LoadCreatureFromDB(uint32 guid, Map* map, bool addToMap) return true; } +void Creature::SetCanDualWield(bool value) +{ + Unit::SetCanDualWield(value); + UpdateDamagePhysical(OFF_ATTACK); +} + void Creature::LoadEquipment(int8 id, bool force /*= true*/) { if (id == 0) @@ -1477,7 +1493,7 @@ void Creature::setDeathState(DeathState s) CreatureTemplate const* cinfo = GetCreatureTemplate(); SetUInt32Value(UNIT_NPC_FLAGS, cinfo->npcflag); - ClearUnitState(uint32(UNIT_STATE_ALL_STATE)); + ClearUnitState(uint32(UNIT_STATE_ALL_STATE & ~UNIT_STATE_IGNORE_PATHFINDING)); SetMeleeDamageSchool(SpellSchools(cinfo->dmgschool)); LoadCreaturesAddon(true); Motion_Initialize(); @@ -1515,8 +1531,7 @@ void Creature::Respawn(bool force) if (m_originalEntry != GetEntry()) UpdateEntry(m_originalEntry); - CreatureTemplate const* cinfo = GetCreatureTemplate(); - SelectLevel(cinfo); + SelectLevel(); setDeathState(JUST_RESPAWNED); @@ -1963,7 +1978,7 @@ bool Creature::CanCreatureAttack(Unit const* victim, bool /*force*/) const if (IsAIEnabled && !AI()->CanAIAttack(victim)) return false; - if (sMapStore.LookupEntry(GetMapId())->IsDungeon()) + if (GetMap()->IsDungeon()) return true; //Use AttackDistance in distance check if threat radius is lower. This prevents creature bounce in and out of combat every update tick. @@ -2425,7 +2440,7 @@ void Creature::SetPosition(float x, float y, float z, float o) return; } - GetMap()->CreatureRelocation(ToCreature(), x, y, z, o); + GetMap()->CreatureRelocation(this, x, y, z, o); if (IsVehicle()) GetVehicleKit()->RelocatePassengers(); } diff --git a/src/server/game/Entities/Creature/Creature.h b/src/server/game/Entities/Creature/Creature.h index 90e8bd7edb1..737e3072091 100644 --- a/src/server/game/Entities/Creature/Creature.h +++ b/src/server/game/Entities/Creature/Creature.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -173,10 +173,6 @@ struct CreatureTemplate // Benchmarked: Faster than std::map (insert/find) typedef UNORDERED_MAP<uint32, CreatureTemplate> CreatureTemplateContainer; -// Represents max amount of expansions. -/// @todo: Add MAX_EXPANSION constant. -#define MAX_CREATURE_BASE_HP 3 - // GCC have alternative #pragma pack(N) syntax and old gcc version not support pack(push, N), also any gcc version not support it at some platform #if defined(__GNUC__) #pragma pack(1) @@ -184,12 +180,15 @@ typedef UNORDERED_MAP<uint32, CreatureTemplate> CreatureTemplateContainer; #pragma pack(push, 1) #endif -// Defines base stats for creatures (used to calculate HP/mana/armor). +// Defines base stats for creatures (used to calculate HP/mana/armor/attackpower/rangedattackpower/all damage). struct CreatureBaseStats { - uint32 BaseHealth[MAX_CREATURE_BASE_HP]; + uint32 BaseHealth[MAX_EXPANSIONS]; uint32 BaseMana; uint32 BaseArmor; + uint32 AttackPower; + uint32 RangedAttackPower; + float BaseDamage[MAX_EXPANSIONS]; // Helpers @@ -212,6 +211,11 @@ struct CreatureBaseStats return uint32(ceil(BaseArmor * info->ModArmor)); } + float GenerateBaseDamage(CreatureTemplate const* info) const + { + return BaseDamage[info->expansion]; + } + static CreatureBaseStats const* GetBaseStats(uint8 level, uint8 unitClass); }; @@ -435,7 +439,7 @@ class Creature : public Unit, public GridObject<Creature>, public MapObject bool Create(uint32 guidlow, Map* map, uint32 phaseMask, uint32 Entry, uint32 vehId, uint32 team, float x, float y, float z, float ang, const CreatureData* data = NULL); bool LoadCreaturesAddon(bool reload = false); - void SelectLevel(const CreatureTemplate* cinfo); + void SelectLevel(); void LoadEquipment(int8 id = 1, bool force = false); uint32 GetDBTableGUIDLow() const { return m_DBTableGuid; } @@ -512,8 +516,9 @@ class Creature : public Unit, public GridObject<Creature>, public MapObject void UpdateMaxHealth(); void UpdateMaxPower(Powers power); void UpdateAttackPowerAndDamage(bool ranged = false); - void UpdateDamagePhysical(WeaponAttackType attType); + void CalculateMinMaxDamage(WeaponAttackType attType, bool normalized, bool addTotalPct, float& minDamage, float& maxDamage) OVERRIDE; + void SetCanDualWield(bool value) OVERRIDE; int8 GetOriginalEquipmentId() const { return m_originalEquipmentId; } uint8 GetCurrentEquipmentId() { return m_equipmentId; } void SetCurrentEquipmentId(uint8 id) { m_equipmentId = id; } diff --git a/src/server/game/Entities/Creature/CreatureGroups.cpp b/src/server/game/Entities/Creature/CreatureGroups.cpp index fc56fc011d4..14a76ae07ce 100644 --- a/src/server/game/Entities/Creature/CreatureGroups.cpp +++ b/src/server/game/Entities/Creature/CreatureGroups.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Entities/Creature/CreatureGroups.h b/src/server/game/Entities/Creature/CreatureGroups.h index ea115bd2efd..846b05abc17 100644 --- a/src/server/game/Entities/Creature/CreatureGroups.h +++ b/src/server/game/Entities/Creature/CreatureGroups.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Entities/Creature/GossipDef.cpp b/src/server/game/Entities/Creature/GossipDef.cpp index 6c13b921d3e..ffb28849925 100644 --- a/src/server/game/Entities/Creature/GossipDef.cpp +++ b/src/server/game/Entities/Creature/GossipDef.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Entities/Creature/GossipDef.h b/src/server/game/Entities/Creature/GossipDef.h index 0c5b7e8c9eb..9a30fdeee2b 100644 --- a/src/server/game/Entities/Creature/GossipDef.h +++ b/src/server/game/Entities/Creature/GossipDef.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Entities/Creature/TemporarySummon.cpp b/src/server/game/Entities/Creature/TemporarySummon.cpp index 9fee6b8237d..d31117c8381 100644 --- a/src/server/game/Entities/Creature/TemporarySummon.cpp +++ b/src/server/game/Entities/Creature/TemporarySummon.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Entities/Creature/TemporarySummon.h b/src/server/game/Entities/Creature/TemporarySummon.h index 03fcd4cd74d..e93f66ed726 100644 --- a/src/server/game/Entities/Creature/TemporarySummon.h +++ b/src/server/game/Entities/Creature/TemporarySummon.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -95,7 +95,7 @@ class Guardian : public Minion void UpdateMaxHealth(); void UpdateMaxPower(Powers power); void UpdateAttackPowerAndDamage(bool ranged = false); - void UpdateDamagePhysical(WeaponAttackType attType); + void UpdateDamagePhysical(WeaponAttackType attType) OVERRIDE; int32 GetBonusDamage() const { return m_bonusSpellDamage; } void SetBonusDamage(int32 damage); diff --git a/src/server/game/Entities/DynamicObject/DynamicObject.cpp b/src/server/game/Entities/DynamicObject/DynamicObject.cpp index ec90ad7cb48..f4e956e8839 100644 --- a/src/server/game/Entities/DynamicObject/DynamicObject.cpp +++ b/src/server/game/Entities/DynamicObject/DynamicObject.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Entities/DynamicObject/DynamicObject.h b/src/server/game/Entities/DynamicObject/DynamicObject.h index c143827543c..5b68bf377b9 100644 --- a/src/server/game/Entities/DynamicObject/DynamicObject.h +++ b/src/server/game/Entities/DynamicObject/DynamicObject.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp index e4d69a1f690..21d5ba0d21a 100644 --- a/src/server/game/Entities/GameObject/GameObject.cpp +++ b/src/server/game/Entities/GameObject/GameObject.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Entities/GameObject/GameObject.h b/src/server/game/Entities/GameObject/GameObject.h index 7fca29e99bc..0ef03723cb4 100644 --- a/src/server/game/Entities/GameObject/GameObject.h +++ b/src/server/game/Entities/GameObject/GameObject.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -816,6 +816,9 @@ class GameObject : public WorldObject, public GridObject<GameObject>, public Map void SetDisplayId(uint32 displayid); uint32 GetDisplayId() const { return GetUInt32Value(GAMEOBJECT_DISPLAYID); } + uint32 GetFaction() const { return GetUInt32Value(GAMEOBJECT_FACTION); } + void SetFaction(uint32 faction) { SetUInt32Value(GAMEOBJECT_FACTION, faction); } + GameObjectModel* m_model; void GetRespawnPosition(float &x, float &y, float &z, float* ori = NULL) const; diff --git a/src/server/game/Entities/Item/Container/Bag.cpp b/src/server/game/Entities/Item/Container/Bag.cpp index 56c29c1d1c7..39f2c59fc29 100644 --- a/src/server/game/Entities/Item/Container/Bag.cpp +++ b/src/server/game/Entities/Item/Container/Bag.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Entities/Item/Container/Bag.h b/src/server/game/Entities/Item/Container/Bag.h index 259d22d1682..1e39e5a41ad 100644 --- a/src/server/game/Entities/Item/Container/Bag.h +++ b/src/server/game/Entities/Item/Container/Bag.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Entities/Item/Item.cpp b/src/server/game/Entities/Item/Item.cpp index b69c5f05714..ee389ed7311 100644 --- a/src/server/game/Entities/Item/Item.cpp +++ b/src/server/game/Entities/Item/Item.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Entities/Item/Item.h b/src/server/game/Entities/Item/Item.h index b18dfe694d6..a65579cc134 100644 --- a/src/server/game/Entities/Item/Item.h +++ b/src/server/game/Entities/Item/Item.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp b/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp index 527329a9d61..3e31347a496 100644 --- a/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp +++ b/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Entities/Item/ItemEnchantmentMgr.h b/src/server/game/Entities/Item/ItemEnchantmentMgr.h index c55537426db..a263ec0dae4 100644 --- a/src/server/game/Entities/Item/ItemEnchantmentMgr.h +++ b/src/server/game/Entities/Item/ItemEnchantmentMgr.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Entities/Item/ItemPrototype.h b/src/server/game/Entities/Item/ItemPrototype.h index 5fc49c99f0a..d411af218b1 100644 --- a/src/server/game/Entities/Item/ItemPrototype.h +++ b/src/server/game/Entities/Item/ItemPrototype.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Entities/Object/Object.cpp b/src/server/game/Entities/Object/Object.cpp index e88d84d4a18..8af48f277bd 100644 --- a/src/server/game/Entities/Object/Object.cpp +++ b/src/server/game/Entities/Object/Object.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -480,7 +480,10 @@ void Object::BuildMovementUpdate(ByteBuffer* data, uint16 flags) const { /// @todo Allow players to aquire this updateflag. *data << uint32(unit->GetVehicleKit()->GetVehicleInfo()->m_ID); - *data << float(unit->GetOrientation()); + if (unit->HasUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT)) + *data << float(unit->GetTransOffsetO()); + else + *data << float(unit->GetOrientation()); } // 0x200 @@ -1556,6 +1559,10 @@ void WorldObject::UpdateGroundPositionZ(float x, float y, float &z) const void WorldObject::UpdateAllowedPositionZ(float x, float y, float &z) const { + // TODO: Allow transports to be part of dynamic vmap tree + if (GetTransport()) + return; + switch (GetTypeId()) { case TYPEID_UNIT: diff --git a/src/server/game/Entities/Object/Object.h b/src/server/game/Entities/Object/Object.h index 4a09393ab76..8d3b1ff9554 100644 --- a/src/server/game/Entities/Object/Object.h +++ b/src/server/game/Entities/Object/Object.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -537,7 +537,7 @@ class MapObject protected: MapObject() : _moveState(MAP_OBJECT_CELL_MOVE_NONE) - { + { _newPosition.Relocate(0.0f, 0.0f, 0.0f, 0.0f); } diff --git a/src/server/game/Entities/Object/ObjectDefines.h b/src/server/game/Entities/Object/ObjectDefines.h index d0b9819b0a3..236f77caf5a 100644 --- a/src/server/game/Entities/Object/ObjectDefines.h +++ b/src/server/game/Entities/Object/ObjectDefines.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Entities/Object/ObjectPosSelector.cpp b/src/server/game/Entities/Object/ObjectPosSelector.cpp index 5ad3086c2b6..fa7c5dffafa 100644 --- a/src/server/game/Entities/Object/ObjectPosSelector.cpp +++ b/src/server/game/Entities/Object/ObjectPosSelector.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Entities/Object/ObjectPosSelector.h b/src/server/game/Entities/Object/ObjectPosSelector.h index d3f43654969..5bac179880f 100644 --- a/src/server/game/Entities/Object/ObjectPosSelector.h +++ b/src/server/game/Entities/Object/ObjectPosSelector.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Entities/Object/Updates/UpdateData.cpp b/src/server/game/Entities/Object/Updates/UpdateData.cpp index be04a38c2d0..e996db52c38 100644 --- a/src/server/game/Entities/Object/Updates/UpdateData.cpp +++ b/src/server/game/Entities/Object/Updates/UpdateData.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Entities/Object/Updates/UpdateData.h b/src/server/game/Entities/Object/Updates/UpdateData.h index 654db149ca0..16bdec46aba 100644 --- a/src/server/game/Entities/Object/Updates/UpdateData.h +++ b/src/server/game/Entities/Object/Updates/UpdateData.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Entities/Object/Updates/UpdateFieldFlags.cpp b/src/server/game/Entities/Object/Updates/UpdateFieldFlags.cpp index 64b5037048b..5629fef7d0c 100644 --- a/src/server/game/Entities/Object/Updates/UpdateFieldFlags.cpp +++ b/src/server/game/Entities/Object/Updates/UpdateFieldFlags.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/game/Entities/Object/Updates/UpdateFieldFlags.h b/src/server/game/Entities/Object/Updates/UpdateFieldFlags.h index 6053b361905..6d168cd56c4 100644 --- a/src/server/game/Entities/Object/Updates/UpdateFieldFlags.h +++ b/src/server/game/Entities/Object/Updates/UpdateFieldFlags.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/game/Entities/Object/Updates/UpdateFields.h b/src/server/game/Entities/Object/Updates/UpdateFields.h index 9e659c0f581..2838ee31d81 100644 --- a/src/server/game/Entities/Object/Updates/UpdateFields.h +++ b/src/server/game/Entities/Object/Updates/UpdateFields.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Entities/Object/Updates/UpdateMask.h b/src/server/game/Entities/Object/Updates/UpdateMask.h index 72c9e9945d0..3c5708fb117 100644 --- a/src/server/game/Entities/Object/Updates/UpdateMask.h +++ b/src/server/game/Entities/Object/Updates/UpdateMask.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Entities/Pet/Pet.cpp b/src/server/game/Entities/Pet/Pet.cpp index b019cd7e423..c218c3c645f 100644 --- a/src/server/game/Entities/Pet/Pet.cpp +++ b/src/server/game/Entities/Pet/Pet.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Entities/Pet/Pet.h b/src/server/game/Entities/Pet/Pet.h index e0afef2b8e3..ef5e792e939 100644 --- a/src/server/game/Entities/Pet/Pet.h +++ b/src/server/game/Entities/Pet/Pet.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -95,7 +95,7 @@ class Pet : public Guardian void UpdateMaxHealth(); void UpdateMaxPower(Powers power); void UpdateAttackPowerAndDamage(bool ranged = false); - void UpdateDamagePhysical(WeaponAttackType attType); + void UpdateDamagePhysical(WeaponAttackType attType) OVERRIDE; */ void ToggleAutocast(SpellInfo const* spellInfo, bool apply); diff --git a/src/server/game/Entities/Pet/PetDefines.h b/src/server/game/Entities/Pet/PetDefines.h index 34cde3af33a..f590bef233e 100644 --- a/src/server/game/Entities/Pet/PetDefines.h +++ b/src/server/game/Entities/Pet/PetDefines.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index c96861d9ef4..f2650575390 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -15092,11 +15092,11 @@ bool Player::CanRewardQuest(Quest const* quest, uint32 reward, bool msg) if (!CanRewardQuest(quest, msg)) return false; + ItemPosCountVec dest; if (quest->GetRewChoiceItemsCount() > 0) { if (quest->RewardChoiceItemId[reward]) { - ItemPosCountVec dest; InventoryResult res = CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, quest->RewardChoiceItemId[reward], quest->RewardChoiceItemCount[reward]); if (res != EQUIP_ERR_OK) { @@ -15112,7 +15112,6 @@ bool Player::CanRewardQuest(Quest const* quest, uint32 reward, bool msg) { if (quest->RewardItemId[i]) { - ItemPosCountVec dest; InventoryResult res = CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, quest->RewardItemId[i], quest->RewardItemIdCount[i]); if (res != EQUIP_ERR_OK) { @@ -17442,6 +17441,12 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder) m_atLoginFlags = fields[33].GetUInt16(); + if (HasAtLoginFlag(AT_LOGIN_RENAME)) + { + TC_LOG_ERROR("entities.player", "Player (GUID: %u) tried to login while forced to rename, can't load.'", GetGUIDLow()); + return false; + } + // Honor system // Update Honor kills data m_lastHonorUpdateTime = logoutTime; diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h index 44b35c9482f..f04f485fa1e 100644 --- a/src/server/game/Entities/Player/Player.h +++ b/src/server/game/Entities/Player/Player.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -1643,6 +1643,7 @@ class Player : public Unit, public GridObject<Player> void RemoveAllSpellCooldown(); void _LoadSpellCooldowns(PreparedQueryResult result); void _SaveSpellCooldowns(SQLTransaction& trans); + uint32 GetLastPotionId() { return m_lastPotionId; } void SetLastPotionId(uint32 item_id) { m_lastPotionId = item_id; } void UpdatePotionCooldown(Spell* spell = NULL); @@ -1747,14 +1748,13 @@ class Player : public Unit, public GridObject<Player> void ApplyFeralAPBonus(int32 amount, bool apply); void UpdateAttackPowerAndDamage(bool ranged = false); void UpdateShieldBlockValue(); - void UpdateDamagePhysical(WeaponAttackType attType); void ApplySpellPowerBonus(int32 amount, bool apply); void UpdateSpellDamageAndHealingBonus(); void ApplyRatingMod(CombatRating cr, int32 value, bool apply); void UpdateRating(CombatRating cr); void UpdateAllRatings(); - void CalculateMinMaxDamage(WeaponAttackType attType, bool normalized, bool addTotalPct, float& min_damage, float& max_damage); + void CalculateMinMaxDamage(WeaponAttackType attType, bool normalized, bool addTotalPct, float& minDamage, float& maxDamage) OVERRIDE; void UpdateDefenseBonusesMod(); inline void RecalculateRating(CombatRating cr) { ApplyRatingMod(cr, 0, true);} diff --git a/src/server/game/Entities/Player/SocialMgr.cpp b/src/server/game/Entities/Player/SocialMgr.cpp index e7cc8f92ce2..8c8e470f80b 100644 --- a/src/server/game/Entities/Player/SocialMgr.cpp +++ b/src/server/game/Entities/Player/SocialMgr.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Entities/Player/SocialMgr.h b/src/server/game/Entities/Player/SocialMgr.h index 4f2a4fdde72..910c9164738 100644 --- a/src/server/game/Entities/Player/SocialMgr.h +++ b/src/server/game/Entities/Player/SocialMgr.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Entities/Totem/Totem.cpp b/src/server/game/Entities/Totem/Totem.cpp index ddea24c6439..b8f5fd1833d 100644 --- a/src/server/game/Entities/Totem/Totem.cpp +++ b/src/server/game/Entities/Totem/Totem.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Entities/Totem/Totem.h b/src/server/game/Entities/Totem/Totem.h index 48cb71c4918..6364157982e 100644 --- a/src/server/game/Entities/Totem/Totem.h +++ b/src/server/game/Entities/Totem/Totem.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -53,7 +53,7 @@ class Totem : public Minion void UpdateMaxHealth() { } void UpdateMaxPower(Powers /*power*/) { } void UpdateAttackPowerAndDamage(bool /*ranged*/) { } - void UpdateDamagePhysical(WeaponAttackType /*attType*/) { } + void UpdateDamagePhysical(WeaponAttackType /*attType*/) OVERRIDE { } bool IsImmunedToSpellEffect(SpellInfo const* spellInfo, uint32 index) const; diff --git a/src/server/game/Entities/Transport/Transport.cpp b/src/server/game/Entities/Transport/Transport.cpp index 860a84d5e83..f8c38d32390 100644 --- a/src/server/game/Entities/Transport/Transport.cpp +++ b/src/server/game/Entities/Transport/Transport.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -90,8 +90,7 @@ bool Transport::Create(uint32 guidlow, uint32 entry, uint32 mapid, float x, floa SetPeriod(tInfo->pathTime); SetEntry(goinfo->entry); SetDisplayId(goinfo->displayId); - SetGoState(GO_STATE_READY); - _pendingStop = goinfo->moTransport.canBeStopped != 0; + SetGoState(!goinfo->moTransport.canBeStopped ? GO_STATE_READY : GO_STATE_ACTIVE); SetGoType(GAMEOBJECT_TYPE_MO_TRANSPORT); SetGoAnimProgress(animprogress); SetName(goinfo->name); @@ -111,7 +110,8 @@ void Transport::Update(uint32 diff) if (GetKeyFrames().size() <= 1) return; - m_goValue.Transport.PathProgress += diff; + if (IsMoving() || !_pendingStop) + m_goValue.Transport.PathProgress += diff; uint32 timer = m_goValue.Transport.PathProgress % GetPeriod(); @@ -132,31 +132,23 @@ void Transport::Update(uint32 diff) if (timer < _currentFrame->DepartureTime) { SetMoving(false); - if (_pendingStop) + if (_pendingStop && GetGoState() != GO_STATE_READY) + { SetGoState(GO_STATE_READY); + m_goValue.Transport.PathProgress = (m_goValue.Transport.PathProgress / GetPeriod()); + m_goValue.Transport.PathProgress *= GetPeriod(); + m_goValue.Transport.PathProgress += _currentFrame->ArriveTime; + } break; // its a stop frame and we are waiting } } - if (_pendingStop && timer >= _currentFrame->DepartureTime && GetGoState() == GO_STATE_READY) - { - m_goValue.Transport.PathProgress = (m_goValue.Transport.PathProgress / GetPeriod()); - m_goValue.Transport.PathProgress *= GetPeriod(); - m_goValue.Transport.PathProgress += _currentFrame->ArriveTime; - break; - } - if (timer >= _currentFrame->DepartureTime && !_triggeredDepartureEvent) { DoEventIfAny(*_currentFrame, true); // departure event _triggeredDepartureEvent = true; } - if (timer >= _currentFrame->DepartureTime && timer < _currentFrame->NextArriveTime) - break; // found current waypoint - - MoveToNextWaypoint(); - // not waiting anymore SetMoving(true); @@ -164,13 +156,18 @@ void Transport::Update(uint32 diff) if (GetGOInfo()->moTransport.canBeStopped) SetGoState(GO_STATE_ACTIVE); + if (timer >= _currentFrame->DepartureTime && timer < _currentFrame->NextArriveTime) + break; // found current waypoint + + MoveToNextWaypoint(); + sScriptMgr->OnRelocate(this, _currentFrame->Node->index, _currentFrame->Node->mapid, _currentFrame->Node->x, _currentFrame->Node->y, _currentFrame->Node->z); TC_LOG_DEBUG("entities.transport", "Transport %u (%s) moved to node %u %u %f %f %f", GetEntry(), GetName().c_str(), _currentFrame->Node->index, _currentFrame->Node->mapid, _currentFrame->Node->x, _currentFrame->Node->y, _currentFrame->Node->z); // Departure event if (_currentFrame->IsTeleportFrame()) - if (TeleportTransport(_nextFrame->Node->mapid, _nextFrame->Node->x, _nextFrame->Node->y, _nextFrame->Node->z)) + if (TeleportTransport(_nextFrame->Node->mapid, _nextFrame->Node->x, _nextFrame->Node->y, _nextFrame->Node->z, _nextFrame->InitialOrientation)) return; // Update more in new map thread } @@ -185,7 +182,18 @@ void Transport::Update(uint32 diff) G3D::Vector3 pos, dir; _currentFrame->Spline->evaluate_percent(_currentFrame->Index, t, pos); _currentFrame->Spline->evaluate_derivative(_currentFrame->Index, t, dir); - UpdatePosition(pos.x, pos.y, pos.z, atan2(dir.x, dir.y)); + UpdatePosition(pos.x, pos.y, pos.z, atan2(dir.y, dir.x) + M_PI); + } + else + { + /* There are four possible scenarios that trigger loading/unloading passengers: + 1. transport moves from inactive to active grid + 2. the grid that transport is currently in becomes active + 3. transport moves from active to inactive grid + 4. the grid that transport is currently in unloads + */ + if (_staticPassengers.empty() && GetMap()->IsGridLoaded(GetPositionX(), GetPositionY())) // 2. + LoadStaticPassengers(); } } @@ -314,7 +322,7 @@ void Transport::UpdatePosition(float x, float y, float z, float o) 3. transport moves from active to inactive grid 4. the grid that transport is currently in unloads */ - if (_staticPassengers.empty() && newActive) // 1. and 2. + if (_staticPassengers.empty() && newActive) // 1. LoadStaticPassengers(); else if (!_staticPassengers.empty() && !newActive && Cell(x, y).DiffGrid(Cell(GetPositionX(), GetPositionY()))) // 3. UnloadStaticPassengers(); @@ -404,7 +412,7 @@ float Transport::CalculateSegmentPos(float now) return segmentPos / frame.NextDistFromPrev; } -bool Transport::TeleportTransport(uint32 newMapid, float x, float y, float z) +bool Transport::TeleportTransport(uint32 newMapid, float x, float y, float z, float o) { Map const* oldMap = GetMap(); @@ -421,7 +429,7 @@ bool Transport::TeleportTransport(uint32 newMapid, float x, float y, float z) float destX, destY, destZ, destO; obj->m_movementInfo.transport.pos.GetPosition(destX, destY, destZ, destO); - TransportBase::CalculatePassengerPosition(destX, destY, destZ, &destO, x, y, z, GetOrientation()); + TransportBase::CalculatePassengerPosition(destX, destY, destZ, &destO, x, y, z, o); switch (obj->GetTypeId()) { @@ -447,7 +455,7 @@ bool Transport::TeleportTransport(uint32 newMapid, float x, float y, float z) } } - Relocate(x, y, z, GetOrientation()); + Relocate(x, y, z, o); GetMap()->AddToMap<Transport>(this); return true; } @@ -460,13 +468,13 @@ bool Transport::TeleportTransport(uint32 newMapid, float x, float y, float z) { float destX, destY, destZ, destO; (*itr)->m_movementInfo.transport.pos.GetPosition(destX, destY, destZ, destO); - TransportBase::CalculatePassengerPosition(destX, destY, destZ, &destO, x, y, z, GetOrientation()); + TransportBase::CalculatePassengerPosition(destX, destY, destZ, &destO, x, y, z, o); (*itr)->ToUnit()->NearTeleportTo(destX, destY, destZ, destO); } } - UpdatePosition(x, y, z, GetOrientation()); + UpdatePosition(x, y, z, o); return false; } } diff --git a/src/server/game/Entities/Transport/Transport.h b/src/server/game/Entities/Transport/Transport.h index e290a5d5e00..55f4daddecc 100644 --- a/src/server/game/Entities/Transport/Transport.h +++ b/src/server/game/Entities/Transport/Transport.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -78,7 +78,7 @@ class Transport : public GameObject, public TransportBase private: void MoveToNextWaypoint(); float CalculateSegmentPos(float perc); - bool TeleportTransport(uint32 newMapid, float x, float y, float z); + bool TeleportTransport(uint32 newMapid, float x, float y, float z, float o); void UpdatePassengerPositions(std::set<WorldObject*>& passengers); void DoEventIfAny(KeyFrame const& node, bool departure); diff --git a/src/server/game/Entities/Unit/StatSystem.cpp b/src/server/game/Entities/Unit/StatSystem.cpp index d2b7fc6d8af..3afa6b016d2 100644 --- a/src/server/game/Entities/Unit/StatSystem.cpp +++ b/src/server/game/Entities/Unit/StatSystem.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -48,6 +48,43 @@ inline bool _ModifyUInt32(bool apply, uint32& baseValue, int32& amount) /*####################################### ######## ######## +######## UNIT STAT SYSTEM ######## +######## ######## +#######################################*/ + +void Unit::UpdateAllResistances() +{ + for (uint8 i = SPELL_SCHOOL_NORMAL; i < MAX_SPELL_SCHOOL; ++i) + UpdateResistances(i); +} + +void Unit::UpdateDamagePhysical(WeaponAttackType attType) +{ + float minDamage = 0.0f; + float maxDamage = 0.0f; + + CalculateMinMaxDamage(attType, false, true, minDamage, maxDamage); + + switch (attType) + { + case BASE_ATTACK: + default: + SetStatFloatValue(UNIT_FIELD_MINDAMAGE, minDamage); + SetStatFloatValue(UNIT_FIELD_MAXDAMAGE, maxDamage); + break; + case OFF_ATTACK: + SetStatFloatValue(UNIT_FIELD_MINOFFHANDDAMAGE, minDamage); + SetStatFloatValue(UNIT_FIELD_MAXOFFHANDDAMAGE, maxDamage); + break; + case RANGED_ATTACK: + SetStatFloatValue(UNIT_FIELD_MINRANGEDDAMAGE, minDamage); + SetStatFloatValue(UNIT_FIELD_MAXRANGEDDAMAGE, maxDamage); + break; + } +} + +/*####################################### +######## ######## ######## PLAYERS STAT SYSTEM ######## ######## ######## #######################################*/ @@ -178,8 +215,7 @@ bool Player::UpdateAllStats() UpdateExpertise(BASE_ATTACK); UpdateExpertise(OFF_ATTACK); RecalculateRating(CR_ARMOR_PENETRATION); - for (int i = SPELL_SCHOOL_NORMAL; i < MAX_SPELL_SCHOOL; ++i) - UpdateResistances(i); + UpdateAllResistances(); return true; } @@ -477,7 +513,7 @@ void Player::UpdateShieldBlockValue() SetUInt32Value(PLAYER_SHIELD_BLOCK, GetShieldBlockValue()); } -void Player::CalculateMinMaxDamage(WeaponAttackType attType, bool normalized, bool addTotalPct, float& min_damage, float& max_damage) +void Player::CalculateMinMaxDamage(WeaponAttackType attType, bool normalized, bool addTotalPct, float& minDamage, float& maxDamage) { UnitMods unitMod; @@ -495,70 +531,45 @@ void Player::CalculateMinMaxDamage(WeaponAttackType attType, bool normalized, bo break; } - float att_speed = GetAPMultiplier(attType, normalized); + float attackSpeedMod = GetAPMultiplier(attType, normalized); - float base_value = GetModifierValue(unitMod, BASE_VALUE) + GetTotalAttackPowerValue(attType)/ 14.0f * att_speed; - float base_pct = GetModifierValue(unitMod, BASE_PCT); - float total_value = GetModifierValue(unitMod, TOTAL_VALUE); - float total_pct = addTotalPct ? GetModifierValue(unitMod, TOTAL_PCT) : 1.0f; + float baseValue = GetModifierValue(unitMod, BASE_VALUE) + GetTotalAttackPowerValue(attType) / 14.0f * attackSpeedMod; + float basePct = GetModifierValue(unitMod, BASE_PCT); + float totalValue = GetModifierValue(unitMod, TOTAL_VALUE); + float totalPct = addTotalPct ? GetModifierValue(unitMod, TOTAL_PCT) : 1.0f; - float weapon_mindamage = GetWeaponDamageRange(attType, MINDAMAGE); - float weapon_maxdamage = GetWeaponDamageRange(attType, MAXDAMAGE); + float weaponMinDamage = GetWeaponDamageRange(attType, MINDAMAGE); + float weaponMaxDamage = GetWeaponDamageRange(attType, MAXDAMAGE); - if (IsInFeralForm()) //check if player is druid and in cat or bear forms + if (IsInFeralForm()) // check if player is druid and in cat or bear forms { uint8 lvl = getLevel(); if (lvl > 60) lvl = 60; - weapon_mindamage = lvl*0.85f*att_speed; - weapon_maxdamage = lvl*1.25f*att_speed; + weaponMinDamage = lvl * 0.85f * attackSpeedMod; + weaponMaxDamage = lvl * 1.25f * attackSpeedMod; } - else if (!CanUseAttackType(attType)) //check if player not in form but still can't use (disarm case) + else if (!CanUseAttackType(attType)) // check if player not in form but still can't use (disarm case) { - //cannot use ranged/off attack, set values to 0 + // cannot use ranged/off attack, set values to 0 if (attType != BASE_ATTACK) { - min_damage = 0; - max_damage = 0; + minDamage = 0; + maxDamage = 0; return; } - weapon_mindamage = BASE_MINDAMAGE; - weapon_maxdamage = BASE_MAXDAMAGE; + weaponMinDamage = BASE_MINDAMAGE; + weaponMaxDamage = BASE_MAXDAMAGE; } - else if (attType == RANGED_ATTACK) //add ammo DPS to ranged damage + else if (attType == RANGED_ATTACK) // add ammo DPS to ranged damage { - weapon_mindamage += GetAmmoDPS() * att_speed; - weapon_maxdamage += GetAmmoDPS() * att_speed; + weaponMinDamage += GetAmmoDPS() * attackSpeedMod; + weaponMaxDamage += GetAmmoDPS() * attackSpeedMod; } - min_damage = ((base_value + weapon_mindamage) * base_pct + total_value) * total_pct; - max_damage = ((base_value + weapon_maxdamage) * base_pct + total_value) * total_pct; -} - -void Player::UpdateDamagePhysical(WeaponAttackType attType) -{ - float mindamage; - float maxdamage; - - CalculateMinMaxDamage(attType, false, true, mindamage, maxdamage); - - switch (attType) - { - case BASE_ATTACK: - default: - SetStatFloatValue(UNIT_FIELD_MINDAMAGE, mindamage); - SetStatFloatValue(UNIT_FIELD_MAXDAMAGE, maxdamage); - break; - case OFF_ATTACK: - SetStatFloatValue(UNIT_FIELD_MINOFFHANDDAMAGE, mindamage); - SetStatFloatValue(UNIT_FIELD_MAXOFFHANDDAMAGE, maxdamage); - break; - case RANGED_ATTACK: - SetStatFloatValue(UNIT_FIELD_MINRANGEDDAMAGE, mindamage); - SetStatFloatValue(UNIT_FIELD_MAXRANGEDDAMAGE, maxdamage); - break; - } + minDamage = ((weaponMinDamage + baseValue) * basePct + totalValue) * totalPct; + maxDamage = ((weaponMaxDamage + baseValue) * basePct + totalValue) * totalPct; } void Player::UpdateDefenseBonusesMod() @@ -841,9 +852,14 @@ void Player::UpdateExpertise(WeaponAttackType attack) switch (attack) { - case BASE_ATTACK: SetUInt32Value(PLAYER_EXPERTISE, expertise); break; - case OFF_ATTACK: SetUInt32Value(PLAYER_OFFHAND_EXPERTISE, expertise); break; - default: break; + case BASE_ATTACK: + SetUInt32Value(PLAYER_EXPERTISE, expertise); + break; + case OFF_ATTACK: + SetUInt32Value(PLAYER_OFFHAND_EXPERTISE, expertise); + break; + default: + break; } } @@ -950,8 +966,7 @@ bool Creature::UpdateAllStats() for (uint8 i = POWER_MANA; i < MAX_POWERS; ++i) UpdateMaxPower(Powers(i)); - for (int8 i = SPELL_SCHOOL_NORMAL; i < MAX_SPELL_SCHOOL; ++i) - UpdateResistances(i); + UpdateAllResistances(); return true; } @@ -976,7 +991,7 @@ void Creature::UpdateArmor() void Creature::UpdateMaxHealth() { float value = GetTotalAuraModValue(UNIT_MOD_HEALTH); - SetMaxHealth((uint32)value); + SetMaxHealth(uint32(value)); } void Creature::UpdateMaxPower(Powers power) @@ -992,25 +1007,25 @@ void Creature::UpdateAttackPowerAndDamage(bool ranged) UnitMods unitMod = ranged ? UNIT_MOD_ATTACK_POWER_RANGED : UNIT_MOD_ATTACK_POWER; uint16 index = UNIT_FIELD_ATTACK_POWER; - uint16 index_mod = UNIT_FIELD_ATTACK_POWER_MODS; - uint16 index_mult = UNIT_FIELD_ATTACK_POWER_MULTIPLIER; + uint16 indexMod = UNIT_FIELD_ATTACK_POWER_MODS; + uint16 indexMulti = UNIT_FIELD_ATTACK_POWER_MULTIPLIER; if (ranged) { index = UNIT_FIELD_RANGED_ATTACK_POWER; - index_mod = UNIT_FIELD_RANGED_ATTACK_POWER_MODS; - index_mult = UNIT_FIELD_RANGED_ATTACK_POWER_MULTIPLIER; + indexMod = UNIT_FIELD_RANGED_ATTACK_POWER_MODS; + indexMulti = UNIT_FIELD_RANGED_ATTACK_POWER_MULTIPLIER; } - float base_attPower = GetModifierValue(unitMod, BASE_VALUE) * GetModifierValue(unitMod, BASE_PCT); - float attPowerMod = GetModifierValue(unitMod, TOTAL_VALUE); - float attPowerMultiplier = GetModifierValue(unitMod, TOTAL_PCT) - 1.0f; + float baseAttackPower = GetModifierValue(unitMod, BASE_VALUE) * GetModifierValue(unitMod, BASE_PCT); + float attackPowerMod = GetModifierValue(unitMod, TOTAL_VALUE); + float attackPowerMultiplier = GetModifierValue(unitMod, TOTAL_PCT) - 1.0f; - SetInt32Value(index, (uint32)base_attPower); //UNIT_FIELD_(RANGED)_ATTACK_POWER field - SetInt32Value(index_mod, (uint32)attPowerMod); //UNIT_FIELD_(RANGED)_ATTACK_POWER_MODS field - SetFloatValue(index_mult, attPowerMultiplier); //UNIT_FIELD_(RANGED)_ATTACK_POWER_MULTIPLIER field + SetInt32Value(index, uint32(baseAttackPower)); // UNIT_FIELD_(RANGED)_ATTACK_POWER + SetInt32Value(indexMod, uint32(attackPowerMod)); // UNIT_FIELD_(RANGED)_ATTACK_POWER_MODS + SetFloatValue(indexMulti, attackPowerMultiplier); // UNIT_FIELD_(RANGED)_ATTACK_POWER_MULTIPLIER - //automatically update weapon damage after attack power modification + // automatically update weapon damage after attack power modification if (ranged) UpdateDamagePhysical(RANGED_ATTACK); else @@ -1020,7 +1035,7 @@ void Creature::UpdateAttackPowerAndDamage(bool ranged) } } -void Creature::UpdateDamagePhysical(WeaponAttackType attType) +void Creature::CalculateMinMaxDamage(WeaponAttackType attType, bool normalized, bool addTotalPct, float& minDamage, float& maxDamage) { UnitMods unitMod; switch (attType) @@ -1037,44 +1052,32 @@ void Creature::UpdateDamagePhysical(WeaponAttackType attType) break; } - //float att_speed = float(GetAttackTime(attType))/1000.0f; - - float weapon_mindamage = GetWeaponDamageRange(attType, MINDAMAGE); - float weapon_maxdamage = GetWeaponDamageRange(attType, MAXDAMAGE); - - /* difference in AP between current attack power and base value from DB */ - float att_pwr_change = GetTotalAttackPowerValue(attType) - GetCreatureTemplate()->attackpower; - float base_value = GetModifierValue(unitMod, BASE_VALUE) + (att_pwr_change * GetAPMultiplier(attType, false) / 14.0f); - float base_pct = GetModifierValue(unitMod, BASE_PCT); - float total_value = GetModifierValue(unitMod, TOTAL_VALUE); - float total_pct = GetModifierValue(unitMod, TOTAL_PCT); - float dmg_multiplier = GetCreatureTemplate()->dmg_multiplier; - - if (!CanUseAttackType(attType)) + if (attType == OFF_ATTACK && !haveOffhandWeapon()) { - weapon_mindamage = 0; - weapon_maxdamage = 0; + minDamage = 0.0f; + maxDamage = 0.0f; + return; } - float mindamage = ((base_value + weapon_mindamage) * dmg_multiplier * base_pct + total_value) * total_pct; - float maxdamage = ((base_value + weapon_maxdamage) * dmg_multiplier * base_pct + total_value) * total_pct; + float weaponMinDamage = GetWeaponDamageRange(attType, MINDAMAGE); + float weaponMaxDamage = GetWeaponDamageRange(attType, MAXDAMAGE); - switch (attType) + if (!CanUseAttackType(attType)) // disarm case { - case BASE_ATTACK: - default: - SetStatFloatValue(UNIT_FIELD_MINDAMAGE, mindamage); - SetStatFloatValue(UNIT_FIELD_MAXDAMAGE, maxdamage); - break; - case OFF_ATTACK: - SetStatFloatValue(UNIT_FIELD_MINOFFHANDDAMAGE, mindamage); - SetStatFloatValue(UNIT_FIELD_MAXOFFHANDDAMAGE, maxdamage); - break; - case RANGED_ATTACK: - SetStatFloatValue(UNIT_FIELD_MINRANGEDDAMAGE, mindamage); - SetStatFloatValue(UNIT_FIELD_MAXRANGEDDAMAGE, maxdamage); - break; + weaponMinDamage = 0.0f; + weaponMaxDamage = 0.0f; } + + float attackPower = GetTotalAttackPowerValue(attType); + float attackSpeedMulti = GetAPMultiplier(attType, normalized); + float baseValue = GetModifierValue(unitMod, BASE_VALUE) + (attackPower / 14.0f); + float basePct = GetModifierValue(unitMod, BASE_PCT) * attackSpeedMulti; + float totalValue = GetModifierValue(unitMod, TOTAL_VALUE); + float totalPct = addTotalPct ? GetModifierValue(unitMod, TOTAL_PCT) : 1.0f; + float dmgMultiplier = GetCreatureTemplate()->dmg_multiplier; // = dmg_multiplier * _GetDamageMod(rank); + + minDamage = ((weaponMinDamage + baseValue) * dmgMultiplier * basePct + totalValue) * totalPct; + maxDamage = ((weaponMaxDamage + baseValue) * dmgMultiplier * basePct + totalValue) * totalPct; } /*####################################### @@ -1197,8 +1200,7 @@ bool Guardian::UpdateAllStats() for (uint8 i = POWER_MANA; i < MAX_POWERS; ++i) UpdateMaxPower(Powers(i)); - for (uint8 i = SPELL_SCHOOL_NORMAL; i < MAX_SPELL_SCHOOL; ++i) - UpdateResistances(i); + UpdateAllResistances(); return true; } @@ -1436,6 +1438,7 @@ void Guardian::UpdateDamagePhysical(WeaponAttackType attType) } } + /// @todo: remove this Unit::AuraEffectList const& mDummy = GetAuraEffectsByType(SPELL_AURA_MOD_ATTACKSPEED); for (Unit::AuraEffectList::const_iterator itr = mDummy.begin(); itr != mDummy.end(); ++itr) { diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index ea6eb49e99a..099adb0b659 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -368,10 +368,10 @@ void Unit::Update(uint32 p_time) bool Unit::haveOffhandWeapon() const { - if (GetTypeId() == TYPEID_PLAYER) - return ToPlayer()->GetWeaponForAttack(OFF_ATTACK, true); - else - return m_canDualWield; + if (Player const* player = ToPlayer()) + return player->GetWeaponForAttack(OFF_ATTACK, true); + + return CanDualWield(); } void Unit::MonsterMoveWithSpeed(float x, float y, float z, float speed, bool generatePath, bool forceDestination) @@ -405,7 +405,7 @@ void Unit::UpdateSplinePosition() m_movesplineTimer.Reset(positionUpdateDelay); Movement::Location loc = movespline->ComputePosition(); - if (HasUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT)) + if (movespline->onTransport) { Position& pos = m_movementInfo.transport.pos; pos.m_positionX = loc.x; @@ -2160,41 +2160,39 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst (const Unit* victim, WeaponAttackT uint32 Unit::CalculateDamage(WeaponAttackType attType, bool normalized, bool addTotalPct) { - float min_damage, max_damage; + float minDamage = 0.0f; + float maxDamage = 0.0f; - if (GetTypeId() == TYPEID_PLAYER && (normalized || !addTotalPct)) - ToPlayer()->CalculateMinMaxDamage(attType, normalized, addTotalPct, min_damage, max_damage); + if (normalized || !addTotalPct) + CalculateMinMaxDamage(attType, normalized, addTotalPct, minDamage, maxDamage); else { switch (attType) { case RANGED_ATTACK: - min_damage = GetFloatValue(UNIT_FIELD_MINRANGEDDAMAGE); - max_damage = GetFloatValue(UNIT_FIELD_MAXRANGEDDAMAGE); + minDamage = GetFloatValue(UNIT_FIELD_MINRANGEDDAMAGE); + maxDamage = GetFloatValue(UNIT_FIELD_MAXRANGEDDAMAGE); break; case BASE_ATTACK: - min_damage = GetFloatValue(UNIT_FIELD_MINDAMAGE); - max_damage = GetFloatValue(UNIT_FIELD_MAXDAMAGE); + minDamage = GetFloatValue(UNIT_FIELD_MINDAMAGE); + maxDamage = GetFloatValue(UNIT_FIELD_MAXDAMAGE); break; case OFF_ATTACK: - min_damage = GetFloatValue(UNIT_FIELD_MINOFFHANDDAMAGE); - max_damage = GetFloatValue(UNIT_FIELD_MAXOFFHANDDAMAGE); + minDamage = GetFloatValue(UNIT_FIELD_MINOFFHANDDAMAGE); + maxDamage = GetFloatValue(UNIT_FIELD_MAXOFFHANDDAMAGE); break; - // Just for good manner default: - min_damage = 0.0f; - max_damage = 0.0f; break; } } - if (min_damage > max_damage) - std::swap(min_damage, max_damage); + if (minDamage > maxDamage) + std::swap(minDamage, maxDamage); - if (max_damage == 0.0f) - max_damage = 5.0f; + if (maxDamage == 0.0f) + maxDamage = 5.0f; - return urand((uint32)min_damage, (uint32)max_damage); + return urand(uint32(minDamage), uint32(maxDamage)); } float Unit::CalculateLevelPenalty(SpellInfo const* spellProto) const @@ -15526,7 +15524,7 @@ void Unit::SetStunned(bool apply) // Creature specific if (GetTypeId() != TYPEID_PLAYER) - ToCreature()->StopMoving(); + StopMoving(); else SetStandState(UNIT_STAND_STATE_STAND); @@ -15584,7 +15582,7 @@ void Unit::SetRooted(bool apply) WorldPacket data(SMSG_SPLINE_MOVE_ROOT, 8); data.append(GetPackGUID()); SendMessageToSet(&data, true); - ToCreature()->StopMoving(); + StopMoving(); } } else @@ -17205,7 +17203,7 @@ void Unit::OutDebugInfo() const { TC_LOG_ERROR("entities.unit", "Unit::OutDebugInfo"); TC_LOG_INFO("entities.unit", "GUID " UI64FMTD ", entry %u, type %u, name %s", GetGUID(), GetEntry(), (uint32)GetTypeId(), GetName().c_str()); - TC_LOG_INFO("entities.unit", "OwnerGUID " UI64FMTD ", MinionGUID " UI64FMTD ", CharmerGUID " UI64FMTD ", CharmedGUID "UI64FMTD, GetOwnerGUID(), GetMinionGUID(), GetCharmerGUID(), GetCharmGUID()); + TC_LOG_INFO("entities.unit", "OwnerGUID " UI64FMTD ", MinionGUID " UI64FMTD ", CharmerGUID " UI64FMTD ", CharmedGUID " UI64FMTD, GetOwnerGUID(), GetMinionGUID(), GetCharmerGUID(), GetCharmGUID()); TC_LOG_INFO("entities.unit", "In world %u, unit type mask %u", (uint32)(IsInWorld() ? 1 : 0), m_unitTypeMask); if (IsInWorld()) TC_LOG_INFO("entities.unit", "Mapid %u", GetMapId()); diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h index 4508b1f0090..9cfdbbc77eb 100644 --- a/src/server/game/Entities/Unit/Unit.h +++ b/src/server/game/Entities/Unit/Unit.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -1292,7 +1292,7 @@ class Unit : public WorldObject bool isAttackReady(WeaponAttackType type = BASE_ATTACK) const { return m_attackTimer[type] == 0; } bool haveOffhandWeapon() const; bool CanDualWield() const { return m_canDualWield; } - void SetCanDualWield(bool value) { m_canDualWield = value; } + virtual void SetCanDualWield(bool value) { m_canDualWield = value; } float GetCombatReach() const { return m_floatValues[UNIT_FIELD_COMBATREACH]; } float GetMeleeReach() const; bool IsWithinCombatRange(const Unit* obj, float dist2compare) const; @@ -1870,14 +1870,18 @@ class Unit : public WorldObject virtual bool UpdateStats(Stats stat) = 0; virtual bool UpdateAllStats() = 0; virtual void UpdateResistances(uint32 school) = 0; + virtual void UpdateAllResistances(); virtual void UpdateArmor() = 0; virtual void UpdateMaxHealth() = 0; virtual void UpdateMaxPower(Powers power) = 0; virtual void UpdateAttackPowerAndDamage(bool ranged = false) = 0; - virtual void UpdateDamagePhysical(WeaponAttackType attType) = 0; + virtual void UpdateDamagePhysical(WeaponAttackType attType); float GetTotalAttackPowerValue(WeaponAttackType attType) const; float GetWeaponDamageRange(WeaponAttackType attType, WeaponDamageRange type) const; void SetBaseWeaponDamage(WeaponAttackType attType, WeaponDamageRange damageRange, float value) { m_weaponDamage[attType][damageRange] = value; } + virtual void CalculateMinMaxDamage(WeaponAttackType attType, bool normalized, bool addTotalPct, float& minDamage, float& maxDamage) = 0; + uint32 CalculateDamage(WeaponAttackType attType, bool normalized, bool addTotalPct); + float GetAPMultiplier(WeaponAttackType attType, bool normalized); bool isInFrontInMap(Unit const* target, float distance, float arc = M_PI) const; bool isInBackInMap(Unit const* target, float distance, float arc = M_PI) const; @@ -1935,8 +1939,6 @@ class Unit : public WorldObject void RemoveGameObject(uint32 spellid, bool del); void RemoveAllGameObjects(); - uint32 CalculateDamage(WeaponAttackType attType, bool normalized, bool addTotalPct); - float GetAPMultiplier(WeaponAttackType attType, bool normalized); void ModifyAuraState(AuraStateType flag, bool apply); uint32 BuildAuraStateUpdateForTarget(Unit* target) const; bool HasAuraState(AuraStateType flag, SpellInfo const* spellProto = NULL, Unit const* Caster = NULL) const; @@ -1956,7 +1958,6 @@ class Unit : public WorldObject uint32 MeleeDamageBonusDone(Unit* pVictim, uint32 damage, WeaponAttackType attType, SpellInfo const* spellProto = NULL); uint32 MeleeDamageBonusTaken(Unit* attacker, uint32 pdamage, WeaponAttackType attType, SpellInfo const* spellProto = NULL); - bool isSpellBlocked(Unit* victim, SpellInfo const* spellProto, WeaponAttackType attackType = BASE_ATTACK); bool isBlockCritical(); bool isSpellCrit(Unit* victim, SpellInfo const* spellProto, SpellSchoolMask schoolMask, WeaponAttackType attackType = BASE_ATTACK) const; diff --git a/src/server/game/Entities/Vehicle/Vehicle.cpp b/src/server/game/Entities/Vehicle/Vehicle.cpp index 28ec4fb9569..fae4f0c6b6a 100755 --- a/src/server/game/Entities/Vehicle/Vehicle.cpp +++ b/src/server/game/Entities/Vehicle/Vehicle.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -521,8 +521,13 @@ Vehicle* Vehicle::RemovePassenger(Unit* unit) if (_me->IsInWorld()) { - unit->RemoveUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT); - unit->m_movementInfo.transport.Reset(); + if (!_me->GetTransport()) + { + unit->RemoveUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT); + unit->m_movementInfo.transport.Reset(); + } + else + unit->m_movementInfo.transport = _me->m_movementInfo.transport; } // only for flyable vehicles diff --git a/src/server/game/Entities/Vehicle/Vehicle.h b/src/server/game/Entities/Vehicle/Vehicle.h index 7dc9c36ecef..36119fa0027 100644 --- a/src/server/game/Entities/Vehicle/Vehicle.h +++ b/src/server/game/Entities/Vehicle/Vehicle.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Entities/Vehicle/VehicleDefines.h b/src/server/game/Entities/Vehicle/VehicleDefines.h index 0290ecf7859..4acd1fe209a 100644 --- a/src/server/game/Entities/Vehicle/VehicleDefines.h +++ b/src/server/game/Entities/Vehicle/VehicleDefines.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Events/GameEventMgr.cpp b/src/server/game/Events/GameEventMgr.cpp index 55550dc019b..95d4c7e2503 100644 --- a/src/server/game/Events/GameEventMgr.cpp +++ b/src/server/game/Events/GameEventMgr.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Events/GameEventMgr.h b/src/server/game/Events/GameEventMgr.h index 73d86e869bf..ea6f9359ea3 100644 --- a/src/server/game/Events/GameEventMgr.h +++ b/src/server/game/Events/GameEventMgr.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Globals/ObjectAccessor.cpp b/src/server/game/Globals/ObjectAccessor.cpp index cf1a813d287..ca173865570 100644 --- a/src/server/game/Globals/ObjectAccessor.cpp +++ b/src/server/game/Globals/ObjectAccessor.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Globals/ObjectAccessor.h b/src/server/game/Globals/ObjectAccessor.h index 4e5c12104ed..4943c648b93 100644 --- a/src/server/game/Globals/ObjectAccessor.h +++ b/src/server/game/Globals/ObjectAccessor.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index e4d20cbc391..04f3395653d 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -638,6 +638,24 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo) if (!ok2) continue; + if (cInfo->expansion > difficultyInfo->expansion) + { + TC_LOG_ERROR("sql.sql", "Creature (Entry: %u, expansion %u) has different `expansion` in difficulty %u mode (Entry: %u, expansion %u).", + cInfo->Entry, cInfo->expansion, diff + 1, cInfo->DifficultyEntry[diff], difficultyInfo->expansion); + } + + if (cInfo->faction_A != difficultyInfo->faction_A) + { + TC_LOG_ERROR("sql.sql", "Creature (Entry: %u, faction_A %u) has different `faction_A` in difficulty %u mode (Entry: %u, faction_A %u).", + cInfo->Entry, cInfo->faction_A, diff + 1, cInfo->DifficultyEntry[diff], difficultyInfo->faction_A); + } + + if (cInfo->faction_H != difficultyInfo->faction_H) + { + TC_LOG_ERROR("sql.sql", "Creature (Entry: %u, faction_H %u) has different `faction_H` in difficulty %u mode (Entry: %u, faction_H %u).", + cInfo->Entry, cInfo->faction_H, diff + 1, cInfo->DifficultyEntry[diff], difficultyInfo->faction_H); + } + if (cInfo->unit_class != difficultyInfo->unit_class) { TC_LOG_ERROR("sql.sql", "Creature (Entry: %u, class %u) has different `unit_class` in difficulty %u mode (Entry: %u, class %u).", @@ -651,6 +669,12 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo) continue; } + if (cInfo->family != difficultyInfo->family) + { + TC_LOG_ERROR("sql.sql", "Creature (Entry: %u, family %u) has different `family` in difficulty %u mode (Entry: %u, family %u).", + cInfo->Entry, cInfo->family, diff + 1, cInfo->DifficultyEntry[diff], difficultyInfo->family); + } + if (cInfo->trainer_class != difficultyInfo->trainer_class) { TC_LOG_ERROR("sql.sql", "Creature (Entry: %u) has different `trainer_class` in difficulty %u mode (Entry: %u).", cInfo->Entry, diff + 1, cInfo->DifficultyEntry[diff]); @@ -675,6 +699,24 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo) continue; } + if (cInfo->type != difficultyInfo->type) + { + TC_LOG_ERROR("sql.sql", "Creature (Entry: %u, type %u) has different `type` in difficulty %u mode (Entry: %u, type %u).", + cInfo->Entry, cInfo->type, diff + 1, cInfo->DifficultyEntry[diff], difficultyInfo->type); + } + + if (cInfo->type_flags != difficultyInfo->type_flags) + { + TC_LOG_ERROR("sql.sql", "Creature (Entry: %u, type_flags %u) has different `type_flags` in difficulty %u mode (Entry: %u, type_flags %u).", + cInfo->Entry, cInfo->type_flags, diff + 1, cInfo->DifficultyEntry[diff], difficultyInfo->type_flags); + } + + if (!cInfo->VehicleId && difficultyInfo->VehicleId) + { + TC_LOG_ERROR("sql.sql", "Creature (Entry: %u, VehicleId %u) has different `VehicleId` in difficulty %u mode (Entry: %u, VehicleId %u).", + cInfo->Entry, cInfo->VehicleId, diff + 1, cInfo->DifficultyEntry[diff], difficultyInfo->VehicleId); + } + if (!difficultyInfo->AIName.empty()) { TC_LOG_ERROR("sql.sql", "Creature (Entry: %u) lists difficulty %u mode entry %u with `AIName` filled in. `AIName` of difficulty 0 mode creature is always used instead.", @@ -883,7 +925,7 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo) const_cast<CreatureTemplate*>(cInfo)->scale = 1.0f; } - if (cInfo->expansion > (MAX_CREATURE_BASE_HP - 1)) + if (cInfo->expansion > (MAX_EXPANSIONS - 1)) { TC_LOG_ERROR("sql.sql", "Table `creature_template` lists creature (Entry: %u) with expansion %u. Ignored and set to 0.", cInfo->Entry, cInfo->expansion); const_cast<CreatureTemplate*>(cInfo)->expansion = 0; @@ -1601,7 +1643,8 @@ void ObjectMgr::LoadCreatures() continue; } - if (data.spawnMask & ~spawnMasks[data.mapid]) + // Skip spawnMask check for transport maps + if (!_transportMaps.count(data.mapid) && data.spawnMask & ~spawnMasks[data.mapid]) TC_LOG_ERROR("sql.sql", "Table `creature` have creature (GUID: %u) that have wrong spawn mask %u including not supported difficulty modes for map (Id: %u).", guid, data.spawnMask, data.mapid); bool ok = true; @@ -1771,7 +1814,7 @@ bool ObjectMgr::MoveCreData(uint32 guid, uint32 mapId, const Position& pos) // We use spawn coords to spawn if (!map->Instanceable() && map->IsGridLoaded(data.posX, data.posY)) { - Creature* creature = new Creature; + Creature* creature = new Creature(); if (!creature->LoadCreatureFromDB(guid, map)) { TC_LOG_ERROR("misc", "MoveCreData: Cannot add creature guid %u to map", guid); @@ -1823,7 +1866,7 @@ uint32 ObjectMgr::AddCreData(uint32 entry, uint32 /*team*/, uint32 mapId, float // We use spawn coords to spawn if (!map->Instanceable() && !map->IsRemovalGrid(x, y)) { - Creature* creature = new Creature; + Creature* creature = new Creature(); if (!creature->LoadCreatureFromDB(guid, map)) { TC_LOG_ERROR("misc", "AddCreature: Cannot add creature entry %u to map", entry); @@ -1936,7 +1979,7 @@ void ObjectMgr::LoadGameobjects() data.spawnMask = fields[14].GetUInt8(); - if (data.spawnMask & ~spawnMasks[data.mapid]) + if (!_transportMaps.count(data.mapid) && data.spawnMask & ~spawnMasks[data.mapid]) TC_LOG_ERROR("sql.sql", "Table `gameobject` has gameobject (GUID: %u Entry: %u) that has wrong spawn mask %u including not supported difficulty modes for map (Id: %u), skip", guid, data.id, data.spawnMask, data.mapid); data.phaseMask = fields[15].GetUInt32(); @@ -3043,8 +3086,8 @@ void ObjectMgr::LoadPetLevelInfo() { if (pInfo[level].health == 0) { - TC_LOG_ERROR("sql.sql", "Creature %u has no data for Level %i pet stats data, using data of Level %i.", itr->first, level+1, level); - pInfo[level] = pInfo[level-1]; + TC_LOG_ERROR("sql.sql", "Creature %u has no data for Level %i pet stats data, using data of Level %i.", itr->first, level + 1, level); + pInfo[level] = pInfo[level - 1]; } } } @@ -3265,7 +3308,7 @@ void ObjectMgr::LoadPlayerInfo() if (!result) { - TC_LOG_ERROR("server.loading", ">> Loaded 0 player create spells. DB table `%s` is empty.", sWorld->getBoolConfig(CONFIG_START_ALL_SPELLS) ? "playercreateinfo_spell_custom" : "playercreateinfo_spell"); + TC_LOG_ERROR("server.loading", ">> Loaded 0 player create spells. DB table `%s` is empty.", tableName.c_str()); } else { @@ -3280,13 +3323,13 @@ void ObjectMgr::LoadPlayerInfo() if (raceMask != 0 && !(raceMask & RACEMASK_ALL_PLAYABLE)) { - TC_LOG_ERROR("sql.sql", "Wrong race mask %u in `playercreateinfo_spell` table, ignoring.", raceMask); + TC_LOG_ERROR("sql.sql", "Wrong race mask %u in `%s` table, ignoring.", raceMask, tableName.c_str()); continue; } if (classMask != 0 && !(classMask & CLASSMASK_ALL_PLAYABLE)) { - TC_LOG_ERROR("sql.sql", "Wrong class mask %u in `playercreateinfo_spell` table, ignoring.", classMask); + TC_LOG_ERROR("sql.sql", "Wrong class mask %u in `%s` table, ignoring.", classMask, tableName.c_str()); continue; } @@ -3306,7 +3349,7 @@ void ObjectMgr::LoadPlayerInfo() // We need something better here, the check is not accounting for spells used by multiple races/classes but not all of them. // Either split the masks per class, or per race, which kind of kills the point yet. // else if (raceMask != 0 && classMask != 0) - // TC_LOG_ERROR("sql.sql", "Racemask/classmask (%u/%u) combination was found containing an invalid race/class combination (%u/%u) in `playercreateinfo_spell` (Spell %u), ignoring.", raceMask, classMask, raceIndex, classIndex, spellId); + // TC_LOG_ERROR("sql.sql", "Racemask/classmask (%u/%u) combination was found containing an invalid race/class combination (%u/%u) in `%s` (Spell %u), ignoring.", raceMask, classMask, raceIndex, classIndex, tableName.c_str(), spellId); } } } @@ -3373,7 +3416,7 @@ void ObjectMgr::LoadPlayerInfo() if (!result) { - TC_LOG_ERROR("server.loading", ">> Loaded 0 level health/mana definitions. DB table `game_event_condition` is empty."); + TC_LOG_ERROR("server.loading", ">> Loaded 0 level health/mana definitions. DB table `player_classlevelstats` is empty."); exit(1); } @@ -3436,8 +3479,8 @@ void ObjectMgr::LoadPlayerInfo() { if (pClassInfo->levelInfo[level].basehealth == 0) { - TC_LOG_ERROR("sql.sql", "Class %i Level %i does not have health/mana data. Using stats data of level %i.", class_, level+1, level); - pClassInfo->levelInfo[level] = pClassInfo->levelInfo[level-1]; + TC_LOG_ERROR("sql.sql", "Class %i Level %i does not have health/mana data. Using stats data of level %i.", class_, level + 1, level); + pClassInfo->levelInfo[level] = pClassInfo->levelInfo[level - 1]; } } } @@ -3497,9 +3540,9 @@ void ObjectMgr::LoadPlayerInfo() if (!info->levelInfo) info->levelInfo = new PlayerLevelInfo[sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)]; - PlayerLevelInfo& levelInfo = info->levelInfo[current_level-1]; + PlayerLevelInfo& levelInfo = info->levelInfo[current_level - 1]; for (int i = 0; i < MAX_STATS; i++) - levelInfo.stats[i] = fields[i+3].GetUInt8(); + levelInfo.stats[i] = fields[i + 3].GetUInt8(); } ++count; @@ -3524,11 +3567,11 @@ void ObjectMgr::LoadPlayerInfo() continue; // skip expansion races if not playing with expansion - if (sWorld->getIntConfig(CONFIG_EXPANSION) < 1 && (race == RACE_BLOODELF || race == RACE_DRAENEI)) + if (sWorld->getIntConfig(CONFIG_EXPANSION) < EXPANSION_THE_BURNING_CRUSADE && (race == RACE_BLOODELF || race == RACE_DRAENEI)) continue; // skip expansion classes if not playing with expansion - if (sWorld->getIntConfig(CONFIG_EXPANSION) < 2 && class_ == CLASS_DEATH_KNIGHT) + if (sWorld->getIntConfig(CONFIG_EXPANSION) < EXPANSION_WRATH_OF_THE_LICH_KING && class_ == CLASS_DEATH_KNIGHT) continue; // fatal error if no level 1 data @@ -3543,8 +3586,8 @@ void ObjectMgr::LoadPlayerInfo() { if (info->levelInfo[level].stats[0] == 0) { - TC_LOG_ERROR("sql.sql", "Race %i Class %i Level %i does not have stats data. Using stats data of level %i.", race, class_, level+1, level); - info->levelInfo[level] = info->levelInfo[level-1]; + TC_LOG_ERROR("sql.sql", "Race %i Class %i Level %i does not have stats data. Using stats data of level %i.", race, class_, level + 1, level); + info->levelInfo[level] = info->levelInfo[level - 1]; } } } @@ -3602,8 +3645,8 @@ void ObjectMgr::LoadPlayerInfo() { if (_playerXPperLevel[level] == 0) { - TC_LOG_ERROR("sql.sql", "Level %i does not have XP for level data. Using data of level [%i] + 100.", level+1, level); - _playerXPperLevel[level] = _playerXPperLevel[level-1]+100; + TC_LOG_ERROR("sql.sql", "Level %i does not have XP for level data. Using data of level [%i] + 100.", level + 1, level); + _playerXPperLevel[level] = _playerXPperLevel[level - 1] + 100; } } @@ -6480,6 +6523,8 @@ void ObjectMgr::LoadGameObjectTemplate() TC_LOG_ERROR("sql.sql", "GameObject (Entry: %u GoType: %u) have data0=%u but TaxiPath (Id: %u) not exist.", entry, got.type, got.moTransport.taxiPathId, got.moTransport.taxiPathId); } + if (uint32 transportMap = got.moTransport.mapID) + _transportMaps.insert(transportMap); break; } case GAMEOBJECT_TYPE_SUMMONING_RITUAL: //18 @@ -7046,9 +7091,13 @@ void ObjectMgr::LoadQuestPOI() uint32 unk4 = fields[7].GetUInt32(); QuestPOI POI(id, objIndex, mapId, WorldMapAreaId, FloorId, unk3, unk4); - POI.points = POIs[questId][id]; - - _questPOIStore[questId].push_back(POI); + if (questId < POIs.size() && id < POIs[questId].size()) + { + POI.points = POIs[questId][id]; + _questPOIStore[questId].push_back(POI); + } + else + TC_LOG_ERROR("server.loading", "Table quest_poi references unknown quest points for quest %u POI id %u", questId, id); ++count; } while (result->NextRow()); @@ -7461,9 +7510,9 @@ void ObjectMgr::LoadGameObjectForQuests() { switch (itr->second.type) { - // scan GO chest with loot including quest items case GAMEOBJECT_TYPE_CHEST: { + // scan GO chest with loot including quest items uint32 loot_id = (itr->second.GetLootId()); // find quest loot for GO @@ -7479,7 +7528,7 @@ void ObjectMgr::LoadGameObjectForQuests() if (itr->second._generic.questID > 0) //quests objects { _gameObjectForQuestStore.insert(itr->second.entry); - count++; + ++count; } break; } @@ -7488,7 +7537,7 @@ void ObjectMgr::LoadGameObjectForQuests() if (itr->second.goober.questId > 0) //quests objects { _gameObjectForQuestStore.insert(itr->second.entry); - count++; + ++count; } break; } @@ -8512,20 +8561,25 @@ CreatureBaseStats const* ObjectMgr::GetCreatureBaseStats(uint8 level, uint8 unit DefaultCreatureBaseStats() { BaseArmor = 1; - for (uint8 j = 0; j < MAX_CREATURE_BASE_HP; ++j) + for (uint8 j = 0; j < MAX_EXPANSIONS; ++j) + { BaseHealth[j] = 1; + BaseDamage[j] = 0.0f; + } BaseMana = 0; + AttackPower = 0; + RangedAttackPower = 0; } }; - static const DefaultCreatureBaseStats def_stats; - return &def_stats; + static const DefaultCreatureBaseStats defStats; + return &defStats; } void ObjectMgr::LoadCreatureClassLevelStats() { uint32 oldMSTime = getMSTime(); - QueryResult result = WorldDatabase.Query("SELECT level, class, basehp0, basehp1, basehp2, basemana, basearmor FROM creature_classlevelstats"); + QueryResult result = WorldDatabase.Query("SELECT level, class, basehp0, basehp1, basehp2, basemana, basearmor, attackpower, rangedattackpower, damage_base, damage_exp1, damage_exp2 FROM creature_classlevelstats"); if (!result) { @@ -8538,29 +8592,38 @@ void ObjectMgr::LoadCreatureClassLevelStats() { Field* fields = result->Fetch(); - uint8 Level = fields[0].GetInt8(); - uint8 Class = fields[1].GetInt8(); - - CreatureBaseStats stats; - - for (uint8 i = 0; i < MAX_CREATURE_BASE_HP; ++i) - stats.BaseHealth[i] = fields[i + 2].GetInt16(); - - stats.BaseMana = fields[5].GetInt16(); - stats.BaseArmor = fields[6].GetInt16(); + uint8 Level = fields[0].GetUInt8(); + uint8 Class = fields[1].GetUInt8(); if (!Class || ((1 << (Class - 1)) & CLASSMASK_ALL_CREATURES) == 0) TC_LOG_ERROR("sql.sql", "Creature base stats for level %u has invalid class %u", Level, Class); - for (uint8 i = 0; i < MAX_CREATURE_BASE_HP; ++i) + CreatureBaseStats stats; + + for (uint8 i = 0; i < MAX_EXPANSIONS; ++i) { - if (stats.BaseHealth[i] < 1) + stats.BaseHealth[i] = fields[2 + i].GetUInt16(); + + if (stats.BaseHealth[i] == 0) { TC_LOG_ERROR("sql.sql", "Creature base stats for class %u, level %u has invalid zero base HP[%u] - set to 1", Class, Level, i); stats.BaseHealth[i] = 1; } + + stats.BaseDamage[i] = fields[9 + i].GetFloat(); + if (stats.BaseDamage[i] < 0.0f) + { + TC_LOG_ERROR("sql.sql", "Creature base stats for class %u, level %u has invalid negative base damage[%u] - set to 0.0", Class, Level, i); + stats.BaseDamage[i] = 0.0f; + } } + stats.BaseMana = fields[5].GetUInt16(); + stats.BaseArmor = fields[6].GetUInt16(); + + stats.AttackPower = fields[7].GetUInt16(); + stats.RangedAttackPower = fields[8].GetUInt16(); + _creatureBaseStatsStore[MAKE_PAIR16(Level, Class)] = stats; ++count; diff --git a/src/server/game/Globals/ObjectMgr.h b/src/server/game/Globals/ObjectMgr.h index bf835ed6c4e..b1f80af0567 100644 --- a/src/server/game/Globals/ObjectMgr.h +++ b/src/server/game/Globals/ObjectMgr.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -1384,6 +1384,8 @@ class ObjectMgr GO_TO_GO, GO_TO_CREATURE // GO is dependant on creature }; + + std::set<uint32> _transportMaps; // Helper container storing map ids that are for transports only, loaded from gameobject_template }; #define sObjectMgr ACE_Singleton<ObjectMgr, ACE_Null_Mutex>::instance() diff --git a/src/server/game/Grids/Cells/Cell.h b/src/server/game/Grids/Cells/Cell.h index ecfdfd6ce05..b1a13558d3d 100644 --- a/src/server/game/Grids/Cells/Cell.h +++ b/src/server/game/Grids/Cells/Cell.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Grids/Cells/CellImpl.h b/src/server/game/Grids/Cells/CellImpl.h index b399155b476..ac015c382ea 100644 --- a/src/server/game/Grids/Cells/CellImpl.h +++ b/src/server/game/Grids/Cells/CellImpl.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Grids/Grid.h b/src/server/game/Grids/Grid.h index 57f79538e2b..2d5ca74b818 100644 --- a/src/server/game/Grids/Grid.h +++ b/src/server/game/Grids/Grid.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Grids/GridDefines.h b/src/server/game/Grids/GridDefines.h index 7ddb4647afe..5279f437f89 100644 --- a/src/server/game/Grids/GridDefines.h +++ b/src/server/game/Grids/GridDefines.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Grids/GridLoader.h b/src/server/game/Grids/GridLoader.h index 2c10118fcad..3ec8a5a60b4 100644 --- a/src/server/game/Grids/GridLoader.h +++ b/src/server/game/Grids/GridLoader.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Grids/GridRefManager.h b/src/server/game/Grids/GridRefManager.h index 61f476577e0..1d79cd770e4 100644 --- a/src/server/game/Grids/GridRefManager.h +++ b/src/server/game/Grids/GridRefManager.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Grids/GridReference.h b/src/server/game/Grids/GridReference.h index 18403e27a45..57929bc2de1 100644 --- a/src/server/game/Grids/GridReference.h +++ b/src/server/game/Grids/GridReference.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Grids/GridStates.cpp b/src/server/game/Grids/GridStates.cpp index cc6ceae6996..8b57c382cd7 100644 --- a/src/server/game/Grids/GridStates.cpp +++ b/src/server/game/Grids/GridStates.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Grids/GridStates.h b/src/server/game/Grids/GridStates.h index 38728d11757..016df4dc3d4 100644 --- a/src/server/game/Grids/GridStates.h +++ b/src/server/game/Grids/GridStates.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Grids/NGrid.h b/src/server/game/Grids/NGrid.h index 2e244ecbc62..2590e85e5d3 100644 --- a/src/server/game/Grids/NGrid.h +++ b/src/server/game/Grids/NGrid.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Grids/Notifiers/GridNotifiers.cpp b/src/server/game/Grids/Notifiers/GridNotifiers.cpp index 00b1e82a0ea..472497ea5f2 100644 --- a/src/server/game/Grids/Notifiers/GridNotifiers.cpp +++ b/src/server/game/Grids/Notifiers/GridNotifiers.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Grids/Notifiers/GridNotifiers.h b/src/server/game/Grids/Notifiers/GridNotifiers.h index 24c44eb0c56..f5138845012 100644 --- a/src/server/game/Grids/Notifiers/GridNotifiers.h +++ b/src/server/game/Grids/Notifiers/GridNotifiers.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Grids/Notifiers/GridNotifiersImpl.h b/src/server/game/Grids/Notifiers/GridNotifiersImpl.h index 44de663b169..77b49fdfc8b 100644 --- a/src/server/game/Grids/Notifiers/GridNotifiersImpl.h +++ b/src/server/game/Grids/Notifiers/GridNotifiersImpl.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Grids/ObjectGridLoader.cpp b/src/server/game/Grids/ObjectGridLoader.cpp index 5c4366e0c25..51a1f2215f8 100644 --- a/src/server/game/Grids/ObjectGridLoader.cpp +++ b/src/server/game/Grids/ObjectGridLoader.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Grids/ObjectGridLoader.h b/src/server/game/Grids/ObjectGridLoader.h index da3baa9c03c..2ddc51848a8 100644 --- a/src/server/game/Grids/ObjectGridLoader.h +++ b/src/server/game/Grids/ObjectGridLoader.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Groups/Group.cpp b/src/server/game/Groups/Group.cpp index 272fd89f0a6..354f00a9e91 100644 --- a/src/server/game/Groups/Group.cpp +++ b/src/server/game/Groups/Group.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -1960,7 +1960,7 @@ void Group::ResetInstances(uint8 method, bool isRaid, Player* SendMsgTo) if (isEmpty || method == INSTANCE_RESET_GROUP_DISBAND || method == INSTANCE_RESET_CHANGE_DIFFICULTY) { // do not reset the instance, just unbind if others are permanently bound to it - if (instanceSave->CanReset()) + if (isEmpty && instanceSave->CanReset()) instanceSave->DeleteFromDB(); else { diff --git a/src/server/game/Groups/Group.h b/src/server/game/Groups/Group.h index 0f55aba464c..6336a1bb30c 100644 --- a/src/server/game/Groups/Group.h +++ b/src/server/game/Groups/Group.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Groups/GroupMgr.cpp b/src/server/game/Groups/GroupMgr.cpp index 762199f21d5..20e6a0671a5 100644 --- a/src/server/game/Groups/GroupMgr.cpp +++ b/src/server/game/Groups/GroupMgr.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/game/Groups/GroupMgr.h b/src/server/game/Groups/GroupMgr.h index 3b3371bb17e..a805b7514da 100644 --- a/src/server/game/Groups/GroupMgr.h +++ b/src/server/game/Groups/GroupMgr.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/game/Groups/GroupRefManager.h b/src/server/game/Groups/GroupRefManager.h index 99fdcd31cd7..d286a19cbfd 100644 --- a/src/server/game/Groups/GroupRefManager.h +++ b/src/server/game/Groups/GroupRefManager.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Groups/GroupReference.cpp b/src/server/game/Groups/GroupReference.cpp index c2f3332f408..4dda580bd5f 100644 --- a/src/server/game/Groups/GroupReference.cpp +++ b/src/server/game/Groups/GroupReference.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Groups/GroupReference.h b/src/server/game/Groups/GroupReference.h index 6e323eefa27..df5683b3edf 100644 --- a/src/server/game/Groups/GroupReference.h +++ b/src/server/game/Groups/GroupReference.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Guilds/Guild.cpp b/src/server/game/Guilds/Guild.cpp index 312e1f38a68..239c0b17e72 100644 --- a/src/server/game/Guilds/Guild.cpp +++ b/src/server/game/Guilds/Guild.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Guilds/Guild.h b/src/server/game/Guilds/Guild.h index c695d141afe..aa4c002433a 100644 --- a/src/server/game/Guilds/Guild.h +++ b/src/server/game/Guilds/Guild.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Guilds/GuildMgr.cpp b/src/server/game/Guilds/GuildMgr.cpp index 66a763110c1..b9cb7d6dce9 100644 --- a/src/server/game/Guilds/GuildMgr.cpp +++ b/src/server/game/Guilds/GuildMgr.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/game/Guilds/GuildMgr.h b/src/server/game/Guilds/GuildMgr.h index 0c99fde2ecc..3d07059000b 100644 --- a/src/server/game/Guilds/GuildMgr.h +++ b/src/server/game/Guilds/GuildMgr.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/game/Handlers/AddonHandler.cpp b/src/server/game/Handlers/AddonHandler.cpp index 3a5a5ba8bf0..3c9a66bedb5 100644 --- a/src/server/game/Handlers/AddonHandler.cpp +++ b/src/server/game/Handlers/AddonHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Handlers/AddonHandler.h b/src/server/game/Handlers/AddonHandler.h index 33afe989da1..97a541753d0 100644 --- a/src/server/game/Handlers/AddonHandler.h +++ b/src/server/game/Handlers/AddonHandler.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Handlers/ArenaTeamHandler.cpp b/src/server/game/Handlers/ArenaTeamHandler.cpp index 824c5631da0..f3aedeeeb48 100644 --- a/src/server/game/Handlers/ArenaTeamHandler.cpp +++ b/src/server/game/Handlers/ArenaTeamHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Handlers/AuctionHouseHandler.cpp b/src/server/game/Handlers/AuctionHouseHandler.cpp index 1e5c35cf3ff..d9e4feb7f85 100644 --- a/src/server/game/Handlers/AuctionHouseHandler.cpp +++ b/src/server/game/Handlers/AuctionHouseHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Handlers/AuthHandler.cpp b/src/server/game/Handlers/AuthHandler.cpp index 880937c2c39..70b0d541e6c 100644 --- a/src/server/game/Handlers/AuthHandler.cpp +++ b/src/server/game/Handlers/AuthHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/game/Handlers/BattleGroundHandler.cpp b/src/server/game/Handlers/BattleGroundHandler.cpp index a88c2e146a1..0dfe396b65a 100644 --- a/src/server/game/Handlers/BattleGroundHandler.cpp +++ b/src/server/game/Handlers/BattleGroundHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Handlers/BattlefieldHandler.cpp b/src/server/game/Handlers/BattlefieldHandler.cpp index c81822152d8..b0580681f91 100644 --- a/src/server/game/Handlers/BattlefieldHandler.cpp +++ b/src/server/game/Handlers/BattlefieldHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -15,136 +15,173 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "Common.h" #include "ObjectAccessor.h" #include "ObjectMgr.h" +#include "Opcodes.h" +#include "Player.h" #include "WorldPacket.h" #include "WorldSession.h" #include "Battlefield.h" #include "BattlefieldMgr.h" -#include "Opcodes.h" -#include "Player.h" -//This send to player windows for invite player to join the war -//Param1:(BattleId) the BattleId of Bf -//Param2:(ZoneId) the zone where the battle is (4197 for wg) -//Param3:(time) Time in second that the player have for accept -void WorldSession::SendBfInvitePlayerToWar(uint32 BattleId, uint32 ZoneId, uint32 p_time) +/** + * @fn void WorldSession::SendBfInvitePlayerToWar(uint32 battleId, uint32 zoneId, uint32 acceptTime) + * + * @brief This send to player windows for invite player to join the war. + * + * @param battleId The BattleId of Bf + * @param zoneId The zone where the battle is (4197 for wg) + * @param acceptTime Time in second that the player have for accept + */ +void WorldSession::SendBfInvitePlayerToWar(uint32 battleId, uint32 zoneId, uint32 acceptTime) { - //Send packet WorldPacket data(SMSG_BATTLEFIELD_MGR_ENTRY_INVITE, 12); - data << uint32(BattleId); - data << uint32(ZoneId); - data << uint32((time(NULL) + p_time)); - - //Sending the packet to player + data << uint32(battleId); + data << uint32(zoneId); + data << uint32(time(NULL) + acceptTime); SendPacket(&data); } -//This send invitation to player to join the queue -//Param1:(BattleId) the BattleId of Bf -void WorldSession::SendBfInvitePlayerToQueue(uint32 BattleId) +/** + * @fn void WorldSession::SendBfInvitePlayerToQueue(uint32 battleId) + * + * @brief This send invitation to player to join the queue. + * + * @param battleId The BattleId of Bf + */ +void WorldSession::SendBfInvitePlayerToQueue(uint32 battleId) { WorldPacket data(SMSG_BATTLEFIELD_MGR_QUEUE_INVITE, 5); - - data << uint32(BattleId); - data << uint8(1); //warmup ? used ? - - //Sending packet to player + data << uint32(battleId); + data << uint8(1); // warmup ? used ? SendPacket(&data); } -//This send packet for inform player that he join queue -//Param1:(BattleId) the BattleId of Bf -//Param2:(ZoneId) the zone where the battle is (4197 for wg) -//Param3:(CanQueue) if able to queue -//Param4:(Full) on log in is full -void WorldSession::SendBfQueueInviteResponse(uint32 BattleId, uint32 ZoneId, bool CanQueue, bool Full) +/** + * @fn void WorldSession::SendBfQueueInviteResponse(uint32 battleId, uint32 zoneId, bool canQueue, bool full) + * + * @brief This send packet for inform player that he join queue. + * + * @param battleId The BattleId of Bf + * @param zoneId The zone where the battle is (4197 for wg) + * @param canQueue if able to queue + * @param full on log in is full + */ +void WorldSession::SendBfQueueInviteResponse(uint32 battleId, uint32 zoneId, bool canQueue, bool full) { WorldPacket data(SMSG_BATTLEFIELD_MGR_QUEUE_REQUEST_RESPONSE, 11); - data << uint32(BattleId); - data << uint32(ZoneId); - data << uint8((CanQueue ? 1 : 0)); //Accepted //0 you cannot queue wg //1 you are queued - data << uint8((Full ? 0 : 1)); //Logging In //0 wg full //1 queue for upcoming - data << uint8(1); //Warmup + data << uint32(battleId); + data << uint32(zoneId); + data << uint8(canQueue ? 1 : 0); // Accepted // 0 you cannot queue wg // 1 you are queued + data << uint8(full ? 0 : 1); // Logging In // 0 wg full // 1 queue for upcoming + data << uint8(1); // Warmup SendPacket(&data); } -//This is call when player accept to join war -//Param1:(BattleId) the BattleId of Bf -void WorldSession::SendBfEntered(uint32 BattleId) +/** + * @fn void WorldSession::SendBfEntered(uint32 battleId) + * + * @brief This is call when player accept to join war. + * + * @param battleId The BattleId of Bf + */ +void WorldSession::SendBfEntered(uint32 battleId) { -// m_PlayerInWar[player->GetTeamId()].insert(player->GetGUID()); WorldPacket data(SMSG_BATTLEFIELD_MGR_ENTERED, 7); - data << uint32(BattleId); - data << uint8(1); //unk - data << uint8(1); //unk - data << uint8(_player->isAFK() ? 1 : 0); //Clear AFK + data << uint32(battleId); + data << uint8(1); // unk + data << uint8(1); // unk + data << uint8(_player->isAFK() ? 1 : 0); // Clear AFK SendPacket(&data); } -void WorldSession::SendBfLeaveMessage(uint32 BattleId, BFLeaveReason reason) +/** + * @fn void WorldSession::SendBfLeaveMessage(uint32 battleId, BFLeaveReason reason) + * + * @brief This is call when player leave battlefield zone. + * + * @param battleId The BattleId of Bf + * @param reason Reason why player left battlefield + */ +void WorldSession::SendBfLeaveMessage(uint32 battleId, BFLeaveReason reason /*= BF_LEAVE_REASON_EXITED*/) { WorldPacket data(SMSG_BATTLEFIELD_MGR_EJECTED, 7); - data << uint32(BattleId); - data << uint8(reason);//byte Reason - data << uint8(2);//byte BattleStatus - data << uint8(0);//bool Relocated + data << uint32(battleId); + data << uint8(reason); // byte Reason + data << uint8(2); // byte BattleStatus + data << uint8(0); // bool Relocated SendPacket(&data); } -//Send by client when he click on accept for queue -void WorldSession::HandleBfQueueInviteResponse(WorldPacket & recvData) +/** + * @fn void WorldSession::HandleBfQueueInviteResponse(WorldPacket& recvData) + * + * @brief Send by client when he click on accept for queue. + */ +void WorldSession::HandleBfQueueInviteResponse(WorldPacket& recvData) { - uint32 BattleId; - uint8 Accepted; + uint32 battleId; + uint8 accepted; + + recvData >> battleId >> accepted; - recvData >> BattleId >> Accepted; - TC_LOG_DEBUG("misc", "HandleQueueInviteResponse: BattleID:%u Accepted:%u", BattleId, Accepted); - Battlefield* Bf = sBattlefieldMgr->GetBattlefieldByBattleId(BattleId); - if (!Bf) + TC_LOG_DEBUG("misc", "HandleBfQueueInviteResponse: BattleID:%u Accepted:%u", battleId, accepted); + + Battlefield* bf = sBattlefieldMgr->GetBattlefieldByBattleId(battleId); + if (!bf) return; - if (Accepted) - { - Bf->PlayerAcceptInviteToQueue(_player); - } + if (accepted) + bf->PlayerAcceptInviteToQueue(_player); } -//Send by client on clicking in accept or refuse of invitation windows for join game -void WorldSession::HandleBfEntryInviteResponse(WorldPacket & recvData) +/** + * @fn void WorldSession::HandleBfEntryInviteResponse(WorldPacket& recvData) + * + * @brief Send by client on clicking in accept or refuse of invitation windows for join game. + */ +void WorldSession::HandleBfEntryInviteResponse(WorldPacket& recvData) { - uint32 BattleId; - uint8 Accepted; + uint32 battleId; + uint8 accepted; + + recvData >> battleId >> accepted; + + TC_LOG_DEBUG("misc", "HandleBfEntryInviteResponse: battleId: %u, accepted: %u", battleId, accepted); - recvData >> BattleId >> Accepted; - TC_LOG_DEBUG("misc", "HandleBattlefieldInviteResponse: BattleID:%u Accepted:%u", BattleId, Accepted); - Battlefield* Bf = sBattlefieldMgr->GetBattlefieldByBattleId(BattleId); - if (!Bf) + Battlefield* bf = sBattlefieldMgr->GetBattlefieldByBattleId(battleId); + if (!bf) return; - //If player accept invitation - if (Accepted) + // If player accept invitation + if (accepted) { - Bf->PlayerAcceptInviteToWar(_player); + bf->PlayerAcceptInviteToWar(_player); } else { - if (_player->GetZoneId() == Bf->GetZoneId()) - Bf->KickPlayerFromBattlefield(_player->GetGUID()); + if (_player->GetZoneId() == bf->GetZoneId()) + bf->KickPlayerFromBattlefield(_player->GetGUID()); } } -void WorldSession::HandleBfExitRequest(WorldPacket & recvData) +/** + * @fn void WorldSession::HandleBfExitRequest(WorldPacket& recvData) + * + * @brief Send by client when exited battlefield + */ +void WorldSession::HandleBfExitRequest(WorldPacket& recvData) { - uint32 BattleId; + uint32 battleId; + + recvData >> battleId; + + TC_LOG_DEBUG("misc", "HandleBfExitRequest: battleId: %u ", battleId); - recvData >> BattleId; - TC_LOG_DEBUG("misc", "HandleBfExitRequest: BattleID:%u ", BattleId); - Battlefield* Bf = sBattlefieldMgr->GetBattlefieldByBattleId(BattleId); - if (!Bf) + Battlefield* bf = sBattlefieldMgr->GetBattlefieldByBattleId(battleId); + if (!bf) return; - Bf->AskToLeaveQueue(_player); + bf->AskToLeaveQueue(_player); } diff --git a/src/server/game/Handlers/CalendarHandler.cpp b/src/server/game/Handlers/CalendarHandler.cpp index b5887ea7c00..fba575ee84e 100644 --- a/src/server/game/Handlers/CalendarHandler.cpp +++ b/src/server/game/Handlers/CalendarHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Handlers/ChannelHandler.cpp b/src/server/game/Handlers/ChannelHandler.cpp index 12f6b52bf0a..c95eadc7d90 100644 --- a/src/server/game/Handlers/ChannelHandler.cpp +++ b/src/server/game/Handlers/ChannelHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Handlers/CharacterHandler.cpp b/src/server/game/Handlers/CharacterHandler.cpp index 25164b82936..6d790919633 100644 --- a/src/server/game/Handlers/CharacterHandler.cpp +++ b/src/server/game/Handlers/CharacterHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Handlers/ChatHandler.cpp b/src/server/game/Handlers/ChatHandler.cpp index d6d21820515..b45840ab190 100644 --- a/src/server/game/Handlers/ChatHandler.cpp +++ b/src/server/game/Handlers/ChatHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Handlers/CombatHandler.cpp b/src/server/game/Handlers/CombatHandler.cpp index 3c5bdfd1f58..47ffc2578bd 100644 --- a/src/server/game/Handlers/CombatHandler.cpp +++ b/src/server/game/Handlers/CombatHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Handlers/DuelHandler.cpp b/src/server/game/Handlers/DuelHandler.cpp index 01c2257c3dc..b07df587fbf 100644 --- a/src/server/game/Handlers/DuelHandler.cpp +++ b/src/server/game/Handlers/DuelHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Handlers/GroupHandler.cpp b/src/server/game/Handlers/GroupHandler.cpp index 4333f4f75d4..b6b4ca84263 100644 --- a/src/server/game/Handlers/GroupHandler.cpp +++ b/src/server/game/Handlers/GroupHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Handlers/GuildHandler.cpp b/src/server/game/Handlers/GuildHandler.cpp index 96f1ce49d47..9df633a4c5e 100644 --- a/src/server/game/Handlers/GuildHandler.cpp +++ b/src/server/game/Handlers/GuildHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -43,19 +43,10 @@ void WorldSession::HandleGuildQueryOpcode(WorldPacket& recvPacket) void WorldSession::HandleGuildCreateOpcode(WorldPacket& recvPacket) { - TC_LOG_DEBUG("network", "WORLD: Received CMSG_GUILD_CREATE"); - std::string name; recvPacket >> name; - if (!GetPlayer()->GetGuildId()) // Player cannot be in guild - { - Guild* guild = new Guild(); - if (guild->Create(GetPlayer(), name)) - sGuildMgr->AddGuild(guild); - else - delete guild; - } + TC_LOG_ERROR("guild", "CMSG_GUILD_CREATE: Possible hacking-attempt: %s tried to create a guild [Name: %s] using cheats", GetPlayerInfo().c_str(), name.c_str()); } void WorldSession::HandleGuildInviteOpcode(WorldPacket& recvPacket) diff --git a/src/server/game/Handlers/ItemHandler.cpp b/src/server/game/Handlers/ItemHandler.cpp index ad99c009a4f..477b6ddfc77 100644 --- a/src/server/game/Handlers/ItemHandler.cpp +++ b/src/server/game/Handlers/ItemHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Handlers/LFGHandler.cpp b/src/server/game/Handlers/LFGHandler.cpp index b0780873e87..a984c033872 100644 --- a/src/server/game/Handlers/LFGHandler.cpp +++ b/src/server/game/Handlers/LFGHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/game/Handlers/LootHandler.cpp b/src/server/game/Handlers/LootHandler.cpp index 94578b83c20..4fd912298ec 100644 --- a/src/server/game/Handlers/LootHandler.cpp +++ b/src/server/game/Handlers/LootHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -419,6 +419,13 @@ void WorldSession::HandleLootMasterGiveOpcode(WorldPacket& recvData) if (_player->GetLootGUID() != lootguid) return; + if (!_player->IsInRaidWith(target) || !_player->IsInMap(target)) + { + TC_LOG_INFO("loot", "MasterLootItem: Player %s tried to give an item to ineligible player %s !", GetPlayer()->GetName().c_str(), target->GetName().c_str()); + return; + } + + Loot* loot = NULL; if (IS_CRE_OR_VEH_GUID(GetPlayer()->GetLootGUID())) diff --git a/src/server/game/Handlers/MailHandler.cpp b/src/server/game/Handlers/MailHandler.cpp index 6fde51b7189..5ab24f44a22 100644 --- a/src/server/game/Handlers/MailHandler.cpp +++ b/src/server/game/Handlers/MailHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/game/Handlers/MiscHandler.cpp b/src/server/game/Handlers/MiscHandler.cpp index 4da0d829bae..8b92706bd06 100644 --- a/src/server/game/Handlers/MiscHandler.cpp +++ b/src/server/game/Handlers/MiscHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -1721,7 +1721,7 @@ void WorldSession::HandleHearthAndResurrect(WorldPacket& /*recvData*/) return; _player->BuildPlayerRepop(); - _player->ResurrectPlayer(100); + _player->ResurrectPlayer(1.0f); _player->TeleportTo(_player->m_homebindMapId, _player->m_homebindX, _player->m_homebindY, _player->m_homebindZ, _player->GetOrientation()); } diff --git a/src/server/game/Handlers/MovementHandler.cpp b/src/server/game/Handlers/MovementHandler.cpp index 4b53dedc363..08dc8602351 100644 --- a/src/server/game/Handlers/MovementHandler.cpp +++ b/src/server/game/Handlers/MovementHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Handlers/NPCHandler.cpp b/src/server/game/Handlers/NPCHandler.cpp index 39489e75ab3..df6703980d1 100644 --- a/src/server/game/Handlers/NPCHandler.cpp +++ b/src/server/game/Handlers/NPCHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Handlers/NPCHandler.h b/src/server/game/Handlers/NPCHandler.h index bc7cc93a3c7..8aa34eaafa7 100644 --- a/src/server/game/Handlers/NPCHandler.h +++ b/src/server/game/Handlers/NPCHandler.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Handlers/PetHandler.cpp b/src/server/game/Handlers/PetHandler.cpp index d57308d359a..550cb74cffa 100644 --- a/src/server/game/Handlers/PetHandler.cpp +++ b/src/server/game/Handlers/PetHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Handlers/PetitionsHandler.cpp b/src/server/game/Handlers/PetitionsHandler.cpp index 23cd0bdfd94..d02b8986e08 100644 --- a/src/server/game/Handlers/PetitionsHandler.cpp +++ b/src/server/game/Handlers/PetitionsHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Handlers/QueryHandler.cpp b/src/server/game/Handlers/QueryHandler.cpp index 01dbf201a82..e30260d34e2 100644 --- a/src/server/game/Handlers/QueryHandler.cpp +++ b/src/server/game/Handlers/QueryHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Handlers/QuestHandler.cpp b/src/server/game/Handlers/QuestHandler.cpp index c73a4c845bb..e8d43b55fd8 100644 --- a/src/server/game/Handlers/QuestHandler.cpp +++ b/src/server/game/Handlers/QuestHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Handlers/ReferAFriendHandler.cpp b/src/server/game/Handlers/ReferAFriendHandler.cpp index 9e0b877f64b..3b348b6e214 100644 --- a/src/server/game/Handlers/ReferAFriendHandler.cpp +++ b/src/server/game/Handlers/ReferAFriendHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/game/Handlers/SkillHandler.cpp b/src/server/game/Handlers/SkillHandler.cpp index 7e2bc11e1b2..bbbe1a4987f 100644 --- a/src/server/game/Handlers/SkillHandler.cpp +++ b/src/server/game/Handlers/SkillHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Handlers/SpellHandler.cpp b/src/server/game/Handlers/SpellHandler.cpp index 62c4dfe5497..75a98247186 100644 --- a/src/server/game/Handlers/SpellHandler.cpp +++ b/src/server/game/Handlers/SpellHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Handlers/TaxiHandler.cpp b/src/server/game/Handlers/TaxiHandler.cpp index 6b42c1a8011..4487ae7b15f 100644 --- a/src/server/game/Handlers/TaxiHandler.cpp +++ b/src/server/game/Handlers/TaxiHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Handlers/TicketHandler.cpp b/src/server/game/Handlers/TicketHandler.cpp index ceeac75e34e..b9949ac631d 100644 --- a/src/server/game/Handlers/TicketHandler.cpp +++ b/src/server/game/Handlers/TicketHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Handlers/TradeHandler.cpp b/src/server/game/Handlers/TradeHandler.cpp index 7acd599eda3..28a511ad9d3 100644 --- a/src/server/game/Handlers/TradeHandler.cpp +++ b/src/server/game/Handlers/TradeHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Handlers/VehicleHandler.cpp b/src/server/game/Handlers/VehicleHandler.cpp index a0beadc644c..3973b23eab4 100644 --- a/src/server/game/Handlers/VehicleHandler.cpp +++ b/src/server/game/Handlers/VehicleHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/game/Handlers/VoiceChatHandler.cpp b/src/server/game/Handlers/VoiceChatHandler.cpp index 456848bf6cc..af2d8e20757 100644 --- a/src/server/game/Handlers/VoiceChatHandler.cpp +++ b/src/server/game/Handlers/VoiceChatHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Instances/InstanceSaveMgr.cpp b/src/server/game/Instances/InstanceSaveMgr.cpp index ee962621048..e37e6847bdd 100644 --- a/src/server/game/Instances/InstanceSaveMgr.cpp +++ b/src/server/game/Instances/InstanceSaveMgr.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -161,6 +161,12 @@ void InstanceSaveManager::RemoveInstanceSave(uint32 InstanceId) } } +void InstanceSaveManager::UnloadInstanceSave(uint32 InstanceId) +{ + if (InstanceSave* save = GetInstanceSave(InstanceId)) + save->UnloadIfEmpty(); +} + InstanceSave::InstanceSave(uint16 MapId, uint32 InstanceId, Difficulty difficulty, time_t resetTime, bool canReset) : m_resetTime(resetTime), m_instanceid(InstanceId), m_mapid(MapId), m_difficulty(difficulty), m_canReset(canReset), m_toDelete(false) { } @@ -232,6 +238,11 @@ bool InstanceSave::UnloadIfEmpty() { if (m_playerList.empty() && m_groupList.empty()) { + // don't remove the save if there are still players inside the map + if (Map* map = sMapMgr->FindMap(GetMapId(), GetInstanceId())) + if (map->HavePlayers()) + return true; + if (!sInstanceSaveMgr->lock_instLists) sInstanceSaveMgr->RemoveInstanceSave(GetInstanceId()); diff --git a/src/server/game/Instances/InstanceSaveMgr.h b/src/server/game/Instances/InstanceSaveMgr.h index 5dda4eb620e..7a89e6488f0 100644 --- a/src/server/game/Instances/InstanceSaveMgr.h +++ b/src/server/game/Instances/InstanceSaveMgr.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -195,6 +195,7 @@ class InstanceSaveManager InstanceSave* AddInstanceSave(uint32 mapId, uint32 instanceId, Difficulty difficulty, time_t resetTime, bool canReset, bool load = false); void RemoveInstanceSave(uint32 InstanceId); + void UnloadInstanceSave(uint32 InstanceId); static void DeleteInstanceFromDB(uint32 instanceid); InstanceSave* GetInstanceSave(uint32 InstanceId); diff --git a/src/server/game/Instances/InstanceScript.cpp b/src/server/game/Instances/InstanceScript.cpp index 2e5ed1d487e..d21ebca9a91 100644 --- a/src/server/game/Instances/InstanceScript.cpp +++ b/src/server/game/Instances/InstanceScript.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Instances/InstanceScript.h b/src/server/game/Instances/InstanceScript.h index acc8012bbbc..3050443edc0 100644 --- a/src/server/game/Instances/InstanceScript.h +++ b/src/server/game/Instances/InstanceScript.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -243,6 +243,16 @@ AI* GetInstanceAI(T* obj, char const* scriptName) return new AI(obj); return NULL; -} +}; + +template<class AI, class T> +AI* GetInstanceAI(T* obj) +{ + if (InstanceMap* instance = obj->GetMap()->ToInstanceMap()) + if (instance->GetInstanceScript()) + return new AI(obj); + + return NULL; +}; #endif // TRINITY_INSTANCE_DATA_H diff --git a/src/server/game/Loot/LootMgr.cpp b/src/server/game/Loot/LootMgr.cpp index 9f5697271aa..bb7f679b7cd 100644 --- a/src/server/game/Loot/LootMgr.cpp +++ b/src/server/game/Loot/LootMgr.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Loot/LootMgr.h b/src/server/game/Loot/LootMgr.h index 9f7a08c3c6c..96af1919e90 100644 --- a/src/server/game/Loot/LootMgr.h +++ b/src/server/game/Loot/LootMgr.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Mails/Mail.cpp b/src/server/game/Mails/Mail.cpp index 2b47348e5f6..8c82ef8f45b 100644 --- a/src/server/game/Mails/Mail.cpp +++ b/src/server/game/Mails/Mail.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Mails/Mail.h b/src/server/game/Mails/Mail.h index d4553233b64..e3fc42f3f9e 100644 --- a/src/server/game/Mails/Mail.h +++ b/src/server/game/Mails/Mail.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index 3723fc4ab45..21e282cfcf4 100644 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -2863,6 +2863,7 @@ void InstanceMap::RemovePlayerFromMap(Player* player, bool remove) Map::RemovePlayerFromMap(player, remove); // for normal instances schedule the reset after all players have left SetResetSchedule(true); + sInstanceSaveMgr->UnloadInstanceSave(GetInstanceId()); } void InstanceMap::CreateInstanceData(bool load) diff --git a/src/server/game/Maps/Map.h b/src/server/game/Maps/Map.h index 932f3e213ae..8e7886dc5d2 100644 --- a/src/server/game/Maps/Map.h +++ b/src/server/game/Maps/Map.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Maps/MapInstanced.cpp b/src/server/game/Maps/MapInstanced.cpp index 667f94fb53a..e914a5c3eee 100644 --- a/src/server/game/Maps/MapInstanced.cpp +++ b/src/server/game/Maps/MapInstanced.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Maps/MapInstanced.h b/src/server/game/Maps/MapInstanced.h index 0955acc1432..aa2b5f95d3f 100644 --- a/src/server/game/Maps/MapInstanced.h +++ b/src/server/game/Maps/MapInstanced.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Maps/MapManager.cpp b/src/server/game/Maps/MapManager.cpp index 3ac965acbb4..2e10fdc374b 100644 --- a/src/server/game/Maps/MapManager.cpp +++ b/src/server/game/Maps/MapManager.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Maps/MapManager.h b/src/server/game/Maps/MapManager.h index 48537558057..98a5f8c7180 100644 --- a/src/server/game/Maps/MapManager.h +++ b/src/server/game/Maps/MapManager.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Maps/MapRefManager.h b/src/server/game/Maps/MapRefManager.h index 0ef57b5e238..a04b76c8dc0 100644 --- a/src/server/game/Maps/MapRefManager.h +++ b/src/server/game/Maps/MapRefManager.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Maps/MapReference.h b/src/server/game/Maps/MapReference.h index 25c4b3870c5..fe5ceb714c5 100644 --- a/src/server/game/Maps/MapReference.h +++ b/src/server/game/Maps/MapReference.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Maps/TransportMgr.cpp b/src/server/game/Maps/TransportMgr.cpp index 11798201397..28869d264c4 100644 --- a/src/server/game/Maps/TransportMgr.cpp +++ b/src/server/game/Maps/TransportMgr.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -87,28 +87,60 @@ void TransportMgr::LoadTransportTemplates() TC_LOG_INFO("server.loading", ">> Loaded %u transport templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } +class SplineRawInitializer +{ +public: + SplineRawInitializer(Movement::PointsArray& points) : _points(points) { } + + void operator()(uint8& mode, bool& cyclic, Movement::PointsArray& points, int& lo, int& hi) const + { + mode = Movement::SplineBase::ModeCatmullrom; + cyclic = false; + points.assign(_points.begin(), _points.end()); + lo = 1; + hi = points.size() - 2; + } + + Movement::PointsArray& _points; +}; + void TransportMgr::GeneratePath(GameObjectTemplate const* goInfo, TransportTemplate* transport) { uint32 pathId = goInfo->moTransport.taxiPathId; TaxiPathNodeList const& path = sTaxiPathNodesByPath[pathId]; std::vector<KeyFrame>& keyFrames = transport->keyFrames; - Movement::PointsArray splinePath; + Movement::PointsArray splinePath, allPoints; bool mapChange = false; - bool cyclic = true; + for (size_t i = 0; i < path.size(); ++i) + allPoints.push_back(G3D::Vector3(path[i].x, path[i].y, path[i].z)); + + // Add extra points to allow derivative calculations for all path nodes + allPoints.insert(allPoints.begin(), allPoints.front().lerp(allPoints[1], -0.2f)); + allPoints.push_back(allPoints.back().lerp(allPoints[allPoints.size() - 2], -0.2f)); + allPoints.push_back(allPoints.back().lerp(allPoints[allPoints.size() - 2], -1.0f)); + + SplineRawInitializer initer(allPoints); + TransportSpline orientationSpline; + orientationSpline.init_spline_custom(initer); + orientationSpline.initLengths(); + for (size_t i = 0; i < path.size(); ++i) { if (!mapChange) { TaxiPathNodeEntry const& node_i = path[i]; - if (i != path.size() - 1 && (node_i.actionFlag == 1 || node_i.mapid != path[i + 1].mapid)) + if (i != path.size() - 1 && (node_i.actionFlag & 1 || node_i.mapid != path[i + 1].mapid)) { - cyclic = false; keyFrames.back().Teleport = true; mapChange = true; } else { KeyFrame k(node_i); + G3D::Vector3 h; + orientationSpline.evaluate_derivative(i + 1, 0.0f, h); + k.InitialOrientation = Position::NormalizeOrientation(atan2(h.y, h.x) + M_PI); + keyFrames.push_back(k); splinePath.push_back(G3D::Vector3(node_i.x, node_i.y, node_i.z)); transport->mapsUsed.insert(k.Node->mapid); @@ -118,16 +150,15 @@ void TransportMgr::GeneratePath(GameObjectTemplate const* goInfo, TransportTempl mapChange = false; } - // Not sure if data8 means the transport can be stopped or that its path in dbc does not contain extra spline points - if (!goInfo->moTransport.canBeStopped && splinePath.size() >= 2) + if (splinePath.size() >= 2) { // Remove special catmull-rom spline points - splinePath.erase(splinePath.begin()); - keyFrames.erase(keyFrames.begin()); - splinePath.pop_back(); - keyFrames.pop_back(); - // Cyclic spline has one more extra point - if (cyclic && !splinePath.empty()) + if (!keyFrames.front().IsStopFrame() && !keyFrames.front().Node->arrivalEventID && !keyFrames.front().Node->departureEventID) + { + splinePath.erase(splinePath.begin()); + keyFrames.erase(keyFrames.begin()); + } + if (!keyFrames.back().IsStopFrame() && !keyFrames.back().Node->arrivalEventID && !keyFrames.back().Node->departureEventID) { splinePath.pop_back(); keyFrames.pop_back(); @@ -170,67 +201,41 @@ void TransportMgr::GeneratePath(GameObjectTemplate const* goInfo, TransportTempl // find the rest of the distances between key points // Every path segment has its own spline - if (cyclic) - { - TransportSpline* spline = new TransportSpline(); - spline->init_cyclic_spline(&splinePath[0], splinePath.size(), Movement::SplineBase::ModeCatmullrom, 0); - spline->initLengths(); - keyFrames[0].DistFromPrev = spline->length(spline->last() - 2, spline->last() - 1); - keyFrames[0].Spline = spline; - for (size_t i = 0; i < keyFrames.size(); ++i) - { - keyFrames[i].Index = i + 1; - keyFrames[i].DistFromPrev = spline->length(i, i + 1); - if (i > 0) - keyFrames[i - 1].NextDistFromPrev = keyFrames[i].DistFromPrev; - keyFrames[i].Spline = spline; - if (keyFrames[i].IsStopFrame()) - { - // remember first stop frame - if (firstStop == -1) - firstStop = i; - lastStop = i; - } - } - } - else + size_t start = 0; + for (size_t i = 1; i < keyFrames.size(); ++i) { - size_t start = 0; - for (size_t i = 1; i < keyFrames.size(); ++i) + if (keyFrames[i - 1].Teleport || i + 1 == keyFrames.size()) { - if (keyFrames[i - 1].Teleport || i + 1 == keyFrames.size()) + size_t extra = !keyFrames[i - 1].Teleport ? 1 : 0; + TransportSpline* spline = new TransportSpline(); + spline->init_spline(&splinePath[start], i - start + extra, Movement::SplineBase::ModeCatmullrom); + spline->initLengths(); + for (size_t j = start; j < i + extra; ++j) { - size_t extra = !keyFrames[i - 1].Teleport ? 1 : 0; - TransportSpline* spline = new TransportSpline(); - spline->init_spline(&splinePath[start], i - start + extra, Movement::SplineBase::ModeCatmullrom); - spline->initLengths(); - for (size_t j = start; j < i + extra; ++j) - { - keyFrames[j].Index = j - start + 1; - keyFrames[j].DistFromPrev = spline->length(j - start, j + 1 - start); - if (j > 0) - keyFrames[j - 1].NextDistFromPrev = keyFrames[j].DistFromPrev; - keyFrames[j].Spline = spline; - } - - if (keyFrames[i - 1].Teleport) - { - keyFrames[i].Index = i - start + 1; - keyFrames[i].DistFromPrev = 0.0f; - keyFrames[i - 1].NextDistFromPrev = 0.0f; - keyFrames[i].Spline = spline; - } - - start = i; + keyFrames[j].Index = j - start + 1; + keyFrames[j].DistFromPrev = spline->length(j - start, j + 1 - start); + if (j > 0) + keyFrames[j - 1].NextDistFromPrev = keyFrames[j].DistFromPrev; + keyFrames[j].Spline = spline; } - if (keyFrames[i].IsStopFrame()) + if (keyFrames[i - 1].Teleport) { - // remember first stop frame - if (firstStop == -1) - firstStop = i; - lastStop = i; + keyFrames[i].Index = i - start + 1; + keyFrames[i].DistFromPrev = 0.0f; + keyFrames[i - 1].NextDistFromPrev = 0.0f; + keyFrames[i].Spline = spline; } + + start = i; + } + + if (keyFrames[i].IsStopFrame()) + { + // remember first stop frame + if (firstStop == -1) + firstStop = i; + lastStop = i; } } @@ -373,7 +378,7 @@ Transport* TransportMgr::CreateTransport(uint32 entry, uint32 guid /*= 0*/, Map* float x = startNode->x; float y = startNode->y; float z = startNode->z; - float o = 0.0f; + float o = tInfo->keyFrames.begin()->InitialOrientation; // initialize the gameobject base uint32 guidLow = guid ? guid : sObjectMgr->GenerateLowGuid(HIGHGUID_MO_TRANSPORT); diff --git a/src/server/game/Maps/TransportMgr.h b/src/server/game/Maps/TransportMgr.h index 205a614eabb..a207522c4df 100644 --- a/src/server/game/Maps/TransportMgr.h +++ b/src/server/game/Maps/TransportMgr.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -38,7 +38,7 @@ typedef UNORDERED_MAP<uint32, std::set<uint32> > TransportInstanceMap; struct KeyFrame { - explicit KeyFrame(TaxiPathNodeEntry const& _node) : Index(0), Node(&_node), + explicit KeyFrame(TaxiPathNodeEntry const& _node) : Index(0), Node(&_node), InitialOrientation(0.0f), DistSinceStop(-1.0f), DistUntilStop(-1.0f), DistFromPrev(-1.0f), TimeFrom(0.0f), TimeTo(0.0f), Teleport(false), ArriveTime(0), DepartureTime(0), Spline(NULL), NextDistFromPrev(0.0f), NextArriveTime(0) { @@ -46,6 +46,7 @@ struct KeyFrame uint32 Index; TaxiPathNodeEntry const* Node; + float InitialOrientation; float DistSinceStop; float DistUntilStop; float DistFromPrev; diff --git a/src/server/game/Maps/ZoneScript.h b/src/server/game/Maps/ZoneScript.h index a745b94f466..5925806db75 100644 --- a/src/server/game/Maps/ZoneScript.h +++ b/src/server/game/Maps/ZoneScript.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/game/Miscellaneous/Formulas.h b/src/server/game/Miscellaneous/Formulas.h index 715a1f5f2c0..8d0e97dc765 100644 --- a/src/server/game/Miscellaneous/Formulas.h +++ b/src/server/game/Miscellaneous/Formulas.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Miscellaneous/Language.h b/src/server/game/Miscellaneous/Language.h index 327d7ed69fd..6f380d42fda 100644 --- a/src/server/game/Miscellaneous/Language.h +++ b/src/server/game/Miscellaneous/Language.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Miscellaneous/SharedDefines.h b/src/server/game/Miscellaneous/SharedDefines.h index cb5156b2b64..e5d3a5312de 100644 --- a/src/server/game/Miscellaneous/SharedDefines.h +++ b/src/server/game/Miscellaneous/SharedDefines.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -44,6 +44,14 @@ enum LootModes LOOT_MODE_HARD_MODE_4 = 0x10 }; +enum Expansions +{ + EXPANSION_CLASSIC = 0, + EXPANSION_THE_BURNING_CRUSADE = 1, + EXPANSION_WRATH_OF_THE_LICH_KING = 2, + MAX_EXPANSIONS = 3 +}; + enum Gender { GENDER_MALE = 0, diff --git a/src/server/game/Movement/FollowerRefManager.h b/src/server/game/Movement/FollowerRefManager.h index 92904f8e4af..136b5703fc9 100644 --- a/src/server/game/Movement/FollowerRefManager.h +++ b/src/server/game/Movement/FollowerRefManager.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Movement/FollowerReference.cpp b/src/server/game/Movement/FollowerReference.cpp index 84c6c266cea..e46abf3285c 100644 --- a/src/server/game/Movement/FollowerReference.cpp +++ b/src/server/game/Movement/FollowerReference.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Movement/FollowerReference.h b/src/server/game/Movement/FollowerReference.h index 43ad7e7fa58..a97104ce72c 100644 --- a/src/server/game/Movement/FollowerReference.h +++ b/src/server/game/Movement/FollowerReference.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Movement/MotionMaster.cpp b/src/server/game/Movement/MotionMaster.cpp index e75e9dea6a8..d224c21efe8 100644 --- a/src/server/game/Movement/MotionMaster.cpp +++ b/src/server/game/Movement/MotionMaster.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Movement/MotionMaster.h b/src/server/game/Movement/MotionMaster.h index f7ec1d8c169..aabb117ef50 100644 --- a/src/server/game/Movement/MotionMaster.h +++ b/src/server/game/Movement/MotionMaster.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -96,11 +96,11 @@ class MotionMaster //: private std::stack<MovementGenerator *> } void push(_Ty _Val) { ++_top; Impl[_top] = _Val; } - bool needInitTop() const - { + bool needInitTop() const + { if (empty()) return false; - return _needInit[_top]; + return _needInit[_top]; } void InitTop(); public: @@ -120,15 +120,15 @@ class MotionMaster //: private std::stack<MovementGenerator *> bool empty() const { return (_top < 0); } int size() const { return _top + 1; } - _Ty top() const - { + _Ty top() const + { ASSERT(!empty()); - return Impl[_top]; + return Impl[_top]; } - _Ty GetMotionSlot(int slot) const - { + _Ty GetMotionSlot(int slot) const + { ASSERT(slot >= 0); - return Impl[slot]; + return Impl[slot]; } void DirectDelete(_Ty curr); diff --git a/src/server/game/Movement/MovementGenerator.cpp b/src/server/game/Movement/MovementGenerator.cpp index b102f554c2f..930669e8cf1 100644 --- a/src/server/game/Movement/MovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerator.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Movement/MovementGenerator.h b/src/server/game/Movement/MovementGenerator.h index 92195037e23..f545f9fd314 100755 --- a/src/server/game/Movement/MovementGenerator.h +++ b/src/server/game/Movement/MovementGenerator.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Movement/MovementGeneratorImpl.h b/src/server/game/Movement/MovementGeneratorImpl.h index b77db7b5b9d..2c3d9bdeea0 100644 --- a/src/server/game/Movement/MovementGeneratorImpl.h +++ b/src/server/game/Movement/MovementGeneratorImpl.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.cpp index ef24b112253..61f3a04bc5d 100755 --- a/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.h b/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.h index ac5e2428652..923c1475718 100755 --- a/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.h +++ b/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp index f78411fc547..572d65b07c7 100644 --- a/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -25,6 +25,7 @@ #include "MoveSplineInit.h" #include "MoveSpline.h" #include "Player.h" +#include "VMapFactory.h" #define MIN_QUIET_DISTANCE 28.0f #define MAX_QUIET_DISTANCE 43.0f @@ -43,6 +44,20 @@ void FleeingMovementGenerator<T>::_setTargetLocation(T* owner) float x, y, z; _getPoint(owner, x, y, z); + // Add LOS check for target point + Position mypos; + owner->GetPosition(&mypos); + bool isInLOS = VMAP::VMapFactory::createOrGetVMapManager()->isInLineOfSight(owner->GetMapId(), + mypos.m_positionX, + mypos.m_positionY, + mypos.m_positionZ + 2.0f, + x, y, z + 2.0f); + if (!isInLOS) + { + i_nextCheckTime.Reset(200); + return; + } + PathGenerator path(owner); path.SetPathLengthLimit(30.0f); bool result = path.CalculatePath(x, y, z); diff --git a/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.h b/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.h index b44bebdbfdf..ba8e228873f 100755 --- a/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.h +++ b/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.cpp index 2d9fe4dd27f..986014e1095 100644 --- a/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -60,7 +60,7 @@ void HomeMovementGenerator<Creature>::_setTargetLocation(Creature* owner) arrived = false; - owner->ClearUnitState(uint32(UNIT_STATE_ALL_STATE & ~UNIT_STATE_EVADE)); + owner->ClearUnitState(uint32(UNIT_STATE_ALL_STATE & ~(UNIT_STATE_EVADE | UNIT_STATE_IGNORE_PATHFINDING))); } bool HomeMovementGenerator<Creature>::DoUpdate(Creature* owner, const uint32 /*time_diff*/) diff --git a/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.h b/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.h index c5bf8879b7b..abe97e21536 100644 --- a/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.h +++ b/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Movement/MovementGenerators/IdleMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/IdleMovementGenerator.cpp index 3cba9068139..0a8a9f267dd 100755 --- a/src/server/game/Movement/MovementGenerators/IdleMovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/IdleMovementGenerator.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Movement/MovementGenerators/IdleMovementGenerator.h b/src/server/game/Movement/MovementGenerators/IdleMovementGenerator.h index 3c5b9c6d20f..bdf9d52b93a 100755 --- a/src/server/game/Movement/MovementGenerators/IdleMovementGenerator.h +++ b/src/server/game/Movement/MovementGenerators/IdleMovementGenerator.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp index f4968b21bd8..0f69ed3b8f7 100755 --- a/src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Movement/MovementGenerators/PointMovementGenerator.h b/src/server/game/Movement/MovementGenerators/PointMovementGenerator.h index 35e4afacb1a..c596b406cf3 100644 --- a/src/server/game/Movement/MovementGenerators/PointMovementGenerator.h +++ b/src/server/game/Movement/MovementGenerators/PointMovementGenerator.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp index 24fd38a3a8f..95c342b70b3 100644 --- a/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.h b/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.h index beb6f09194c..a4a8137546d 100644 --- a/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.h +++ b/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp index f71eddd2f89..f1656592000 100644 --- a/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.h b/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.h index 6358aa19cde..1a465097170 100755 --- a/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.h +++ b/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp index a7674755bce..c181750a414 100755 --- a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -193,8 +193,7 @@ bool WaypointMovementGenerator<Creature>::DoUpdate(Creature* creature, uint32 di { if (creature->IsStopped()) Stop(STOP_TIME_FOR_PLAYER); - // Checking just before reaching waypoint gives smother movement than using FinalDestination - else if (creature->movespline->timeElapsed() < 150) + else if (creature->movespline->Finalized()) { OnArrived(creature); return StartMove(creature); diff --git a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.h b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.h index 357fbd0307c..9b5fe14b9d6 100755 --- a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.h +++ b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Movement/Spline/MoveSpline.h b/src/server/game/Movement/Spline/MoveSpline.h index 5a788201e7f..209f978d658 100644 --- a/src/server/game/Movement/Spline/MoveSpline.h +++ b/src/server/game/Movement/Spline/MoveSpline.h @@ -79,10 +79,10 @@ namespace Movement UpdateResult _updateState(int32& ms_time_diff); int32 next_timestamp() const { return spline.length(point_Idx + 1); } int32 segment_time_elapsed() const { return next_timestamp() - time_passed; } + int32 timeElapsed() const { return Duration() - time_passed; } int32 timePassed() const { return time_passed; } public: - int32 timeElapsed() const { return Duration() - time_passed; } int32 Duration() const { return spline.length(); } MySpline const& _Spline() const { return spline; } int32 _currentSplineIdx() const { return point_Idx; } diff --git a/src/server/game/Movement/Spline/MoveSplineInit.cpp b/src/server/game/Movement/Spline/MoveSplineInit.cpp index f6ef219522c..87d8e4a0c34 100644 --- a/src/server/game/Movement/Spline/MoveSplineInit.cpp +++ b/src/server/game/Movement/Spline/MoveSplineInit.cpp @@ -60,23 +60,27 @@ namespace Movement { MoveSpline& move_spline = *unit->movespline; - bool transport = false; - Location real_position(unit->GetPositionX(), unit->GetPositionY(), unit->GetPositionZMinusOffset(), unit->GetOrientation()); - // Elevators also use MOVEMENTFLAG_ONTRANSPORT but we do not keep track of their position changes - if (unit->HasUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT) && unit->GetTransGUID()) - { - transport = true; - real_position.x = unit->GetTransOffsetX(); - real_position.y = unit->GetTransOffsetY(); - real_position.z = unit->GetTransOffsetZ(); - real_position.orientation = unit->GetTransOffsetO(); - } - + // Elevators also use MOVEMENTFLAG_ONTRANSPORT but we do not keep track of their position changes (movementInfo.transport.guid is 0 in that case) + bool transport = unit->HasUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT) && unit->GetTransGUID(); + Location real_position; // there is a big chance that current position is unknown if current state is not finalized, need compute it // this also allows CalculatePath spline position and update map position in much greater intervals // Don't compute for transport movement if the unit is in a motion between two transports if (!move_spline.Finalized() && move_spline.onTransport == transport) real_position = move_spline.ComputePosition(); + else + { + Position const* pos; + if (!transport) + pos = unit; + else + pos = &unit->m_movementInfo.transport.pos; + + real_position.x = pos->GetPositionX(); + real_position.y = pos->GetPositionY(); + real_position.z = pos->GetPositionZ(); + real_position.orientation = unit->GetOrientation(); + } // should i do the things that user should do? - no. if (args.path.empty()) @@ -135,14 +139,32 @@ namespace Movement if (move_spline.Finalized()) return; - Location loc = move_spline.ComputePosition(); + bool transport = unit->HasUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT) && unit->GetTransGUID(); + Location loc; + if (move_spline.onTransport == transport) + loc = move_spline.ComputePosition(); + else + { + Position const* pos; + if (!transport) + pos = unit; + else + pos = &unit->m_movementInfo.transport.pos; + + loc.x = pos->GetPositionX(); + loc.y = pos->GetPositionY(); + loc.z = pos->GetPositionZ(); + loc.orientation = unit->GetOrientation(); + } + args.flags = MoveSplineFlag::Done; unit->m_movementInfo.RemoveMovementFlag(MOVEMENTFLAG_FORWARD | MOVEMENTFLAG_SPLINE_ENABLED); + move_spline.onTransport = transport; move_spline.Initialize(args); WorldPacket data(SMSG_MONSTER_MOVE, 64); data.append(unit->GetPackGUID()); - if (unit->HasUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT) && unit->GetTransGUID()) + if (transport) { data.SetOpcode(SMSG_MONSTER_MOVE_TRANSPORT); data.appendPackGUID(unit->GetTransGUID()); diff --git a/src/server/game/Movement/Spline/MovementPacketBuilder.cpp b/src/server/game/Movement/Spline/MovementPacketBuilder.cpp index ae62dc8b447..51932877666 100644 --- a/src/server/game/Movement/Spline/MovementPacketBuilder.cpp +++ b/src/server/game/Movement/Spline/MovementPacketBuilder.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify diff --git a/src/server/game/Movement/Spline/MovementPacketBuilder.h b/src/server/game/Movement/Spline/MovementPacketBuilder.h index 3643abd2eca..d1ad3d61eec 100644 --- a/src/server/game/Movement/Spline/MovementPacketBuilder.h +++ b/src/server/game/Movement/Spline/MovementPacketBuilder.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify diff --git a/src/server/game/Movement/Spline/Spline.cpp b/src/server/game/Movement/Spline/Spline.cpp index 887541e2289..6424afc5d6e 100644 --- a/src/server/game/Movement/Spline/Spline.cpp +++ b/src/server/game/Movement/Spline/Spline.cpp @@ -156,7 +156,7 @@ float SplineBase::SegLengthLinear(index_type index) const return (points[index] - points[index+1]).length(); } -float SplineBase::SegLengthCatmullRom( index_type index ) const +float SplineBase::SegLengthCatmullRom(index_type index) const { ASSERT(index >= index_lo && index < index_hi); diff --git a/src/server/game/Movement/Spline/Spline.h b/src/server/game/Movement/Spline/Spline.h index dab31e957f1..1444b2872d1 100644 --- a/src/server/game/Movement/Spline/Spline.h +++ b/src/server/game/Movement/Spline/Spline.h @@ -118,7 +118,7 @@ public: /** As i can see there are a lot of ways how spline can be initialized would be no harm to have some custom initializers. */ - template<class Init> inline void init_spline(Init& initializer) + template<class Init> inline void init_spline_custom(Init& initializer) { initializer(m_mode, cyclic, points, index_lo, index_hi); } diff --git a/src/server/game/Movement/Waypoints/Path.h b/src/server/game/Movement/Waypoints/Path.h index 9814d1c65e1..4c275cbc15d 100644 --- a/src/server/game/Movement/Waypoints/Path.h +++ b/src/server/game/Movement/Waypoints/Path.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Movement/Waypoints/WaypointManager.cpp b/src/server/game/Movement/Waypoints/WaypointManager.cpp index 7fc8ae1a63c..f7cb147a148 100644 --- a/src/server/game/Movement/Waypoints/WaypointManager.cpp +++ b/src/server/game/Movement/Waypoints/WaypointManager.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Movement/Waypoints/WaypointManager.h b/src/server/game/Movement/Waypoints/WaypointManager.h index b17714f1a51..fe7ca5ec931 100644 --- a/src/server/game/Movement/Waypoints/WaypointManager.h +++ b/src/server/game/Movement/Waypoints/WaypointManager.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/OutdoorPvP/OutdoorPvP.cpp b/src/server/game/OutdoorPvP/OutdoorPvP.cpp index cf14cc2eb56..01ee5238789 100644 --- a/src/server/game/OutdoorPvP/OutdoorPvP.cpp +++ b/src/server/game/OutdoorPvP/OutdoorPvP.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/game/OutdoorPvP/OutdoorPvP.h b/src/server/game/OutdoorPvP/OutdoorPvP.h index 30b9d5c58fc..9ea81ded055 100644 --- a/src/server/game/OutdoorPvP/OutdoorPvP.h +++ b/src/server/game/OutdoorPvP/OutdoorPvP.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp b/src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp index c5e441e079d..2b05f7255f6 100644 --- a/src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp +++ b/src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/game/OutdoorPvP/OutdoorPvPMgr.h b/src/server/game/OutdoorPvP/OutdoorPvPMgr.h index 2d8acb56252..54ea2f3ba1d 100644 --- a/src/server/game/OutdoorPvP/OutdoorPvPMgr.h +++ b/src/server/game/OutdoorPvP/OutdoorPvPMgr.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/game/Pools/PoolMgr.cpp b/src/server/game/Pools/PoolMgr.cpp index 1eed9feb289..b12b5f187ad 100644 --- a/src/server/game/Pools/PoolMgr.cpp +++ b/src/server/game/Pools/PoolMgr.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Pools/PoolMgr.h b/src/server/game/Pools/PoolMgr.h index c5ded289215..2bc404b3a36 100644 --- a/src/server/game/Pools/PoolMgr.h +++ b/src/server/game/Pools/PoolMgr.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://www.mangosproject.org/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Quests/QuestDef.cpp b/src/server/game/Quests/QuestDef.cpp index f2e80bdb996..9b3732d232b 100644 --- a/src/server/game/Quests/QuestDef.cpp +++ b/src/server/game/Quests/QuestDef.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Quests/QuestDef.h b/src/server/game/Quests/QuestDef.h index f763777fe15..995396c37f5 100644 --- a/src/server/game/Quests/QuestDef.h +++ b/src/server/game/Quests/QuestDef.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Reputation/ReputationMgr.cpp b/src/server/game/Reputation/ReputationMgr.cpp index 272e1bd7a1e..69e677bd89d 100644 --- a/src/server/game/Reputation/ReputationMgr.cpp +++ b/src/server/game/Reputation/ReputationMgr.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Reputation/ReputationMgr.h b/src/server/game/Reputation/ReputationMgr.h index e02cc5b62e0..4164dd8ff11 100644 --- a/src/server/game/Reputation/ReputationMgr.h +++ b/src/server/game/Reputation/ReputationMgr.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Scripting/MapScripts.cpp b/src/server/game/Scripting/MapScripts.cpp index b9765bbbdc2..58ad725d570 100644 --- a/src/server/game/Scripting/MapScripts.cpp +++ b/src/server/game/Scripting/MapScripts.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Scripting/ScriptLoader.cpp b/src/server/game/Scripting/ScriptLoader.cpp index 3b340f8d147..8da94ef2852 100644 --- a/src/server/game/Scripting/ScriptLoader.cpp +++ b/src/server/game/Scripting/ScriptLoader.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/game/Scripting/ScriptLoader.h b/src/server/game/Scripting/ScriptLoader.h index 79e2454518f..db4c5b0cf46 100644 --- a/src/server/game/Scripting/ScriptLoader.h +++ b/src/server/game/Scripting/ScriptLoader.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/game/Scripting/ScriptMgr.cpp b/src/server/game/Scripting/ScriptMgr.cpp index 6a1ab28efed..d7a2c147edb 100644 --- a/src/server/game/Scripting/ScriptMgr.cpp +++ b/src/server/game/Scripting/ScriptMgr.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Scripting/ScriptMgr.h b/src/server/game/Scripting/ScriptMgr.h index 18ed549029d..a0724ac47fb 100644 --- a/src/server/game/Scripting/ScriptMgr.h +++ b/src/server/game/Scripting/ScriptMgr.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Scripting/ScriptSystem.cpp b/src/server/game/Scripting/ScriptSystem.cpp index 921ae7cbda6..8094da2e105 100644 --- a/src/server/game/Scripting/ScriptSystem.cpp +++ b/src/server/game/Scripting/ScriptSystem.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Server/Protocol/Opcodes.cpp b/src/server/game/Server/Protocol/Opcodes.cpp index 065b80cb08f..97e81de7ecf 100644 --- a/src/server/game/Server/Protocol/Opcodes.cpp +++ b/src/server/game/Server/Protocol/Opcodes.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -526,7 +526,7 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] = /*0x1F1*/ { "MSG_SAVE_GUILD_EMBLEM", STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleSaveGuildEmblemOpcode }, /*0x1F2*/ { "MSG_TABARDVENDOR_ACTIVATE", STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleTabardVendorActivateOpcode}, /*0x1F3*/ { "SMSG_PLAY_SPELL_VISUAL", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide }, - /*0x1F4*/ { "CMSG_ZONEUPDATE", STATUS_LOGGEDIN, PROCESS_THREADSAFE, &WorldSession::HandleZoneUpdateOpcode }, + /*0x1F4*/ { "CMSG_ZONEUPDATE", STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleZoneUpdateOpcode }, /*0x1F5*/ { "SMSG_PARTYKILLLOG", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide }, /*0x1F6*/ { "SMSG_COMPRESSED_UPDATE_OBJECT", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide }, /*0x1F7*/ { "SMSG_PLAY_SPELL_IMPACT", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide }, diff --git a/src/server/game/Server/Protocol/Opcodes.h b/src/server/game/Server/Protocol/Opcodes.h index 254f9fe5350..e581d7d1544 100644 --- a/src/server/game/Server/Protocol/Opcodes.h +++ b/src/server/game/Server/Protocol/Opcodes.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Server/Protocol/PacketLog.cpp b/src/server/game/Server/Protocol/PacketLog.cpp index aeeb0a285a4..ed5a3b52871 100644 --- a/src/server/game/Server/Protocol/PacketLog.cpp +++ b/src/server/game/Server/Protocol/PacketLog.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/game/Server/Protocol/PacketLog.h b/src/server/game/Server/Protocol/PacketLog.h index 2c2e0a8766c..9c60655e627 100644 --- a/src/server/game/Server/Protocol/PacketLog.h +++ b/src/server/game/Server/Protocol/PacketLog.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/game/Server/WorldSession.cpp b/src/server/game/Server/WorldSession.cpp index 696d29ce7f8..58e7ba02f47 100644 --- a/src/server/game/Server/WorldSession.cpp +++ b/src/server/game/Server/WorldSession.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Server/WorldSession.h b/src/server/game/Server/WorldSession.h index 4aef02206c4..8b00cb9432e 100644 --- a/src/server/game/Server/WorldSession.h +++ b/src/server/game/Server/WorldSession.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -757,6 +757,16 @@ class WorldSession void HandleBattlemasterJoinArena(WorldPacket& recvData); void HandleReportPvPAFK(WorldPacket& recvData); + // Battlefield + void SendBfInvitePlayerToWar(uint32 battleId, uint32 zoneId, uint32 time); + void SendBfInvitePlayerToQueue(uint32 battleId); + void SendBfQueueInviteResponse(uint32 battleId, uint32 zoneId, bool canQueue = true, bool full = false); + void SendBfEntered(uint32 battleId); + void SendBfLeaveMessage(uint32 battleId, BFLeaveReason reason = BF_LEAVE_REASON_EXITED); + void HandleBfQueueInviteResponse(WorldPacket& recvData); + void HandleBfEntryInviteResponse(WorldPacket& recvData); + void HandleBfExitRequest(WorldPacket& recvData); + void HandleWardenDataOpcode(WorldPacket& recvData); void HandleWorldTeleportOpcode(WorldPacket& recvData); void HandleMinimapPingOpcode(WorldPacket& recvData); @@ -773,16 +783,6 @@ class WorldSession void HandleHearthAndResurrect(WorldPacket& recvData); void HandleInstanceLockResponse(WorldPacket& recvPacket); - // Battlefield - void SendBfInvitePlayerToWar(uint32 battleId, uint32 zoneId, uint32 time); - void SendBfInvitePlayerToQueue(uint32 battleId); - void SendBfQueueInviteResponse(uint32 battleId, uint32 zoneId, bool canQueue = true, bool full = false); - void SendBfEntered(uint32 battleId); - void SendBfLeaveMessage(uint32 battleId, BFLeaveReason reason = BF_LEAVE_REASON_EXITED); - void HandleBfQueueInviteResponse(WorldPacket& recvData); - void HandleBfEntryInviteResponse(WorldPacket& recvData); - void HandleBfExitRequest(WorldPacket& recvData); - // Looking for Dungeon/Raid void HandleLfgSetCommentOpcode(WorldPacket& recvData); void HandleLfgPlayerLockInfoRequestOpcode(WorldPacket& recvData); diff --git a/src/server/game/Server/WorldSocket.cpp b/src/server/game/Server/WorldSocket.cpp index 1384ba3cc4b..605b863bfa1 100644 --- a/src/server/game/Server/WorldSocket.cpp +++ b/src/server/game/Server/WorldSocket.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Server/WorldSocket.h b/src/server/game/Server/WorldSocket.h index 2d5762ef60e..103d60346e8 100644 --- a/src/server/game/Server/WorldSocket.h +++ b/src/server/game/Server/WorldSocket.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Server/WorldSocketAcceptor.h b/src/server/game/Server/WorldSocketAcceptor.h index 518cf90d17f..0b07196a0cd 100644 --- a/src/server/game/Server/WorldSocketAcceptor.h +++ b/src/server/game/Server/WorldSocketAcceptor.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/game/Server/WorldSocketMgr.cpp b/src/server/game/Server/WorldSocketMgr.cpp index 5b7b24666e2..7880552ffa1 100644 --- a/src/server/game/Server/WorldSocketMgr.cpp +++ b/src/server/game/Server/WorldSocketMgr.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2008 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Server/WorldSocketMgr.h b/src/server/game/Server/WorldSocketMgr.h index d7adc79bef8..fb8ddb42b9e 100644 --- a/src/server/game/Server/WorldSocketMgr.h +++ b/src/server/game/Server/WorldSocketMgr.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Skills/SkillDiscovery.cpp b/src/server/game/Skills/SkillDiscovery.cpp index d911a20081a..5e272edb531 100644 --- a/src/server/game/Skills/SkillDiscovery.cpp +++ b/src/server/game/Skills/SkillDiscovery.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Skills/SkillDiscovery.h b/src/server/game/Skills/SkillDiscovery.h index 84c17665f45..42c7eabf5fc 100644 --- a/src/server/game/Skills/SkillDiscovery.h +++ b/src/server/game/Skills/SkillDiscovery.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Skills/SkillExtraItems.cpp b/src/server/game/Skills/SkillExtraItems.cpp index fec0c1c7c88..a979e2fa58f 100644 --- a/src/server/game/Skills/SkillExtraItems.cpp +++ b/src/server/game/Skills/SkillExtraItems.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Skills/SkillExtraItems.h b/src/server/game/Skills/SkillExtraItems.h index 507d513dd02..d1cc4acbbd2 100644 --- a/src/server/game/Skills/SkillExtraItems.h +++ b/src/server/game/Skills/SkillExtraItems.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Spells/Auras/SpellAuraDefines.h b/src/server/game/Spells/Auras/SpellAuraDefines.h index 3969dfbab98..aa1f6a49413 100644 --- a/src/server/game/Spells/Auras/SpellAuraDefines.h +++ b/src/server/game/Spells/Auras/SpellAuraDefines.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index 9ac1862c016..5cb86244aa1 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -2214,26 +2214,26 @@ void AuraEffect::HandleAuraModDisarm(AuraApplication const* aurApp, uint8 mode, WeaponAttackType attType; switch (type) { - case SPELL_AURA_MOD_DISARM: - field=UNIT_FIELD_FLAGS; - flag=UNIT_FLAG_DISARMED; - slot=EQUIPMENT_SLOT_MAINHAND; - attType=BASE_ATTACK; - break; - case SPELL_AURA_MOD_DISARM_OFFHAND: - field=UNIT_FIELD_FLAGS_2; - flag=UNIT_FLAG2_DISARM_OFFHAND; - slot=EQUIPMENT_SLOT_OFFHAND; - attType=OFF_ATTACK; - break; - case SPELL_AURA_MOD_DISARM_RANGED: - field=UNIT_FIELD_FLAGS_2; - flag=UNIT_FLAG2_DISARM_RANGED; - slot=EQUIPMENT_SLOT_RANGED; - attType=RANGED_ATTACK; - break; - default: - return; + case SPELL_AURA_MOD_DISARM: + field = UNIT_FIELD_FLAGS; + flag = UNIT_FLAG_DISARMED; + slot = EQUIPMENT_SLOT_MAINHAND; + attType = BASE_ATTACK; + break; + case SPELL_AURA_MOD_DISARM_OFFHAND: + field = UNIT_FIELD_FLAGS_2; + flag = UNIT_FLAG2_DISARM_OFFHAND; + slot = EQUIPMENT_SLOT_OFFHAND; + attType = OFF_ATTACK; + break; + case SPELL_AURA_MOD_DISARM_RANGED: + field = UNIT_FIELD_FLAGS_2; + flag = UNIT_FLAG2_DISARM_RANGED; + slot = EQUIPMENT_SLOT_RANGED; + attType = RANGED_ATTACK; + break; + default: + return; } // if disarm aura is to be removed, remove the flag first to reapply damage/aura mods @@ -4112,7 +4112,7 @@ void AuraEffect::HandleModAttackSpeed(AuraApplication const* aurApp, uint8 mode, Unit* target = aurApp->GetTarget(); - target->ApplyAttackTimePercentMod(BASE_ATTACK, (float)GetAmount(), apply); + target->ApplyAttackTimePercentMod(BASE_ATTACK, float(GetAmount()), apply); target->UpdateDamagePhysical(BASE_ATTACK); } @@ -4123,8 +4123,8 @@ void AuraEffect::HandleModMeleeSpeedPct(AuraApplication const* aurApp, uint8 mod Unit* target = aurApp->GetTarget(); - target->ApplyAttackTimePercentMod(BASE_ATTACK, (float)GetAmount(), apply); - target->ApplyAttackTimePercentMod(OFF_ATTACK, (float)GetAmount(), apply); + target->ApplyAttackTimePercentMod(BASE_ATTACK, float(GetAmount()), apply); + target->ApplyAttackTimePercentMod(OFF_ATTACK, float(GetAmount()), apply); } void AuraEffect::HandleAuraModRangedHaste(AuraApplication const* aurApp, uint8 mode, bool apply) const @@ -4371,9 +4371,9 @@ void AuraEffect::HandleModDamagePercentDone(AuraApplication const* aurApp, uint8 if ((GetMiscValue() & SPELL_SCHOOL_MASK_NORMAL) && (GetSpellInfo()->EquippedItemClass == -1 || target->GetTypeId() != TYPEID_PLAYER)) { - target->HandleStatModifier(UNIT_MOD_DAMAGE_MAINHAND, TOTAL_PCT, float (GetAmount()), apply); - target->HandleStatModifier(UNIT_MOD_DAMAGE_OFFHAND, TOTAL_PCT, float (GetAmount()), apply); - target->HandleStatModifier(UNIT_MOD_DAMAGE_RANGED, TOTAL_PCT, float (GetAmount()), apply); + target->HandleStatModifier(UNIT_MOD_DAMAGE_MAINHAND, TOTAL_PCT, float(GetAmount()), apply); + target->HandleStatModifier(UNIT_MOD_DAMAGE_OFFHAND, TOTAL_PCT, float(GetAmount()), apply); + target->HandleStatModifier(UNIT_MOD_DAMAGE_RANGED, TOTAL_PCT, float(GetAmount()), apply); if (target->GetTypeId() == TYPEID_PLAYER) target->ToPlayer()->ApplyPercentModFloatValue(PLAYER_FIELD_MOD_DAMAGE_DONE_PCT, float (GetAmount()), apply); @@ -5684,9 +5684,6 @@ void AuraEffect::HandlePeriodicTriggerSpellAuraTick(Unit* target, Unit* caster) case 46284: target->CastCustomSpell(triggerSpellId, SPELLVALUE_MAX_TARGETS, m_tickNumber / 10 + 1, NULL, true, NULL, this); return; - // Poison (Grobbulus) - case 28158: - case 54362: // Slime Pool (Dreadscale & Acidmaw) case 66882: target->CastCustomSpell(triggerSpellId, SPELLVALUE_RADIUS_MOD, (int32)((((float)m_tickNumber / 60) * 0.9f + 0.1f) * 10000 * 2 / 3), NULL, true, NULL, this); diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.h b/src/server/game/Spells/Auras/SpellAuraEffects.h index ddd6c1127e1..0887ce123e2 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.h +++ b/src/server/game/Spells/Auras/SpellAuraEffects.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp index 90679ad17b6..9c7fff612b7 100644 --- a/src/server/game/Spells/Auras/SpellAuras.cpp +++ b/src/server/game/Spells/Auras/SpellAuras.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Spells/Auras/SpellAuras.h b/src/server/game/Spells/Auras/SpellAuras.h index 123ad9d5a8a..f62b1ff47b4 100644 --- a/src/server/game/Spells/Auras/SpellAuras.h +++ b/src/server/game/Spells/Auras/SpellAuras.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index c969c97abf1..49eed70f57d 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -4760,6 +4760,10 @@ SpellCastResult Spell::CheckCast(bool strict) else return SPELL_FAILED_NOT_READY; } + + // check if we are using a potion in combat for the 2nd+ time. Cooldown is added only after caster gets out of combat + if (m_caster->ToPlayer()->GetLastPotionId() && m_CastItem && (m_CastItem->IsPotion() || m_spellInfo->IsCooldownStartedOnEvent())) + return SPELL_FAILED_NOT_READY; } if (m_spellInfo->AttributesEx7 & SPELL_ATTR7_IS_CHEAT_SPELL && !m_caster->HasFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_ALLOW_CHEAT_SPELLS)) diff --git a/src/server/game/Spells/Spell.h b/src/server/game/Spells/Spell.h index 6fc0c9b749d..5653bc1194f 100644 --- a/src/server/game/Spells/Spell.h +++ b/src/server/game/Spells/Spell.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index 90334281a8a..b8e5b3ff742 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -2326,7 +2326,7 @@ void Spell::EffectSummonType(SpellEffIndex effIndex) if (!summon || !summon->HasUnitTypeMask(UNIT_MASK_MINION)) return; - summon->SelectLevel(summon->GetCreatureTemplate()); // some summoned creaters have different from 1 DB data for level/hp + summon->SelectLevel(); // some summoned creaters have different from 1 DB data for level/hp summon->SetUInt32Value(UNIT_NPC_FLAGS, summon->GetCreatureTemplate()->npcflag); summon->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC); @@ -2538,8 +2538,6 @@ void Spell::EffectDualWield(SpellEffIndex /*effIndex*/) return; unitTarget->SetCanDualWield(true); - if (unitTarget->GetTypeId() == TYPEID_UNIT) - unitTarget->ToCreature()->UpdateDamagePhysical(OFF_ATTACK); } void Spell::EffectPull(SpellEffIndex effIndex) @@ -5003,8 +5001,6 @@ void Spell::EffectPullTowards(SpellEffIndex effIndex) if (!unitTarget) return; - float speedZ = (float)(m_spellInfo->Effects[effIndex].CalcValue() / 10); - float speedXY = (float)(m_spellInfo->Effects[effIndex].MiscValue/10); Position pos; if (m_spellInfo->Effects[effIndex].Effect == SPELL_EFFECT_PULL_TOWARDS_DEST) { @@ -5018,6 +5014,9 @@ void Spell::EffectPullTowards(SpellEffIndex effIndex) pos.Relocate(m_caster); } + float speedXY = float(m_spellInfo->Effects[effIndex].MiscValue) * 0.1f; + float speedZ = unitTarget->GetDistance(pos) / speedXY * 0.5f * Movement::gravity; + unitTarget->GetMotionMaster()->MoveJump(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), speedXY, speedZ); } @@ -5818,11 +5817,11 @@ void Spell::SummonGuardian(uint32 i, uint32 entry, SummonPropertiesEntry const* { if (uint32 weapon = m_caster->GetUInt32Value(PLAYER_VISIBLE_ITEM_16_ENTRYID)) { - summon->SetDisplayId(11686); + summon->SetDisplayId(11686); // modelid2 summon->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID, weapon); } else - summon->SetDisplayId(1126); + summon->SetDisplayId(1126); // modelid1 } summon->AI()->EnterEvadeMode(); diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp index bd10f484f64..21c36510a32 100644 --- a/src/server/game/Spells/SpellInfo.cpp +++ b/src/server/game/Spells/SpellInfo.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/game/Spells/SpellInfo.h b/src/server/game/Spells/SpellInfo.h index 9cb8879a1b8..562e0371fe1 100644 --- a/src/server/game/Spells/SpellInfo.h +++ b/src/server/game/Spells/SpellInfo.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index ff9c57d8521..132bb29e446 100644 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -455,6 +455,8 @@ uint32 SpellMgr::GetSpellDifficultyId(uint32 spellId) const void SpellMgr::SetSpellDifficultyId(uint32 spellId, uint32 id) { + if (uint32 i = GetSpellDifficultyId(spellId)) + TC_LOG_ERROR("spells", "SpellMgr::SetSpellDifficultyId: Spell %u has already spellDifficultyId %u. Will override with spellDifficultyId %u.", spellId, i, id); mSpellDifficultySearcherMap[spellId] = id; } @@ -480,7 +482,7 @@ uint32 SpellMgr::GetSpellIdForDifficulty(uint32 spellId, Unit const* caster) con SpellDifficultyEntry const* difficultyEntry = sSpellDifficultyStore.LookupEntry(difficultyId); if (!difficultyEntry) { - TC_LOG_DEBUG("spells", "SpellMgr::GetSpellIdForDifficulty: SpellDifficultyEntry not found for spell %u. This should never happen.", spellId); + TC_LOG_ERROR("spells", "SpellMgr::GetSpellIdForDifficulty: SpellDifficultyEntry not found for spell %u. This should never happen.", spellId); return spellId; //return source spell } @@ -3042,6 +3044,9 @@ void SpellMgr::LoadSpellInfoCorrections() case 42730: spellInfo->Effects[EFFECT_1].TriggerSpell = 42739; break; + case 42436: // Drink! (Brewfest) + spellInfo->Effects[EFFECT_0].TargetA = SpellImplicitTargetInfo(TARGET_UNIT_TARGET_ANY); + break; case 59735: spellInfo->Effects[EFFECT_1].TriggerSpell = 59736; break; @@ -3690,6 +3695,9 @@ void SpellMgr::LoadSpellInfoCorrections() // // RUBY SANCTUM SPELLS // + case 74799: // Soul Consumption + spellInfo->Effects[EFFECT_1].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_12_YARDS); + break; case 74769: // Twilight Cutter case 77844: // Twilight Cutter case 77845: // Twilight Cutter diff --git a/src/server/game/Spells/SpellMgr.h b/src/server/game/Spells/SpellMgr.h index 677a6e2f758..01fe7708db2 100644 --- a/src/server/game/Spells/SpellMgr.h +++ b/src/server/game/Spells/SpellMgr.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Spells/SpellScript.cpp b/src/server/game/Spells/SpellScript.cpp index 3eae3f3d698..7301e693978 100644 --- a/src/server/game/Spells/SpellScript.cpp +++ b/src/server/game/Spells/SpellScript.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/game/Spells/SpellScript.h b/src/server/game/Spells/SpellScript.h index 4c25adb0476..75cf63b495b 100644 --- a/src/server/game/Spells/SpellScript.h +++ b/src/server/game/Spells/SpellScript.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/game/Texts/CreatureTextMgr.cpp b/src/server/game/Texts/CreatureTextMgr.cpp index e0f37624a7a..46cb7a46773 100644 --- a/src/server/game/Texts/CreatureTextMgr.cpp +++ b/src/server/game/Texts/CreatureTextMgr.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/game/Texts/CreatureTextMgr.h b/src/server/game/Texts/CreatureTextMgr.h index f2f7a229e50..12236844828 100644 --- a/src/server/game/Texts/CreatureTextMgr.h +++ b/src/server/game/Texts/CreatureTextMgr.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/game/Tickets/TicketMgr.cpp b/src/server/game/Tickets/TicketMgr.cpp index 528f17bd259..83c049363d4 100644 --- a/src/server/game/Tickets/TicketMgr.cpp +++ b/src/server/game/Tickets/TicketMgr.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Tickets/TicketMgr.h b/src/server/game/Tickets/TicketMgr.h index 91ef98dda23..3dd048189d7 100644 --- a/src/server/game/Tickets/TicketMgr.h +++ b/src/server/game/Tickets/TicketMgr.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/game/Tools/CharacterDatabaseCleaner.cpp b/src/server/game/Tools/CharacterDatabaseCleaner.cpp index 9f3787e5943..758c78b685d 100644 --- a/src/server/game/Tools/CharacterDatabaseCleaner.cpp +++ b/src/server/game/Tools/CharacterDatabaseCleaner.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Tools/CharacterDatabaseCleaner.h b/src/server/game/Tools/CharacterDatabaseCleaner.h index 83ac25cdf11..94d17d45c47 100644 --- a/src/server/game/Tools/CharacterDatabaseCleaner.h +++ b/src/server/game/Tools/CharacterDatabaseCleaner.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Tools/PlayerDump.cpp b/src/server/game/Tools/PlayerDump.cpp index 087233c5c80..55d70514594 100644 --- a/src/server/game/Tools/PlayerDump.cpp +++ b/src/server/game/Tools/PlayerDump.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Tools/PlayerDump.h b/src/server/game/Tools/PlayerDump.h index 4fd411d02ac..ece2c0693e2 100644 --- a/src/server/game/Tools/PlayerDump.h +++ b/src/server/game/Tools/PlayerDump.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Warden/Modules/WardenModuleMac.h b/src/server/game/Warden/Modules/WardenModuleMac.h index 8a71606cd4d..5489d9ce5fd 100644 --- a/src/server/game/Warden/Modules/WardenModuleMac.h +++ b/src/server/game/Warden/Modules/WardenModuleMac.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Warden/Modules/WardenModuleWin.h b/src/server/game/Warden/Modules/WardenModuleWin.h index fd369802bf6..9efd60b1daa 100644 --- a/src/server/game/Warden/Modules/WardenModuleWin.h +++ b/src/server/game/Warden/Modules/WardenModuleWin.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Warden/Warden.cpp b/src/server/game/Warden/Warden.cpp index 6ff2f0f562f..4611a4da884 100644 --- a/src/server/game/Warden/Warden.cpp +++ b/src/server/game/Warden/Warden.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -32,7 +32,7 @@ Warden::Warden() : _session(NULL), _inputCrypto(16), _outputCrypto(16), _checkTimer(10000/*10 sec*/), _clientResponseTimer(0), _dataSent(false), _previousTimestamp(0), _module(NULL), _initialized(false) -{ +{ memset(_inputKey, 0, sizeof(_inputKey)); memset(_outputKey, 0, sizeof(_outputKey)); memset(_seed, 0, sizeof(_seed)); diff --git a/src/server/game/Warden/Warden.h b/src/server/game/Warden/Warden.h index b9470b0c8a7..ec5bfba85cc 100644 --- a/src/server/game/Warden/Warden.h +++ b/src/server/game/Warden/Warden.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Warden/WardenCheckMgr.cpp b/src/server/game/Warden/WardenCheckMgr.cpp index 0aac3711137..44bab1d31b3 100644 --- a/src/server/game/Warden/WardenCheckMgr.cpp +++ b/src/server/game/Warden/WardenCheckMgr.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Warden/WardenCheckMgr.h b/src/server/game/Warden/WardenCheckMgr.h index d2d6236fc65..8f2fa37400d 100644 --- a/src/server/game/Warden/WardenCheckMgr.h +++ b/src/server/game/Warden/WardenCheckMgr.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Warden/WardenMac.cpp b/src/server/game/Warden/WardenMac.cpp index a232a0e0b39..092bb19de07 100644 --- a/src/server/game/Warden/WardenMac.cpp +++ b/src/server/game/Warden/WardenMac.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Warden/WardenMac.h b/src/server/game/Warden/WardenMac.h index 2cfb7c66df7..3ea509c75ef 100644 --- a/src/server/game/Warden/WardenMac.h +++ b/src/server/game/Warden/WardenMac.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Warden/WardenWin.cpp b/src/server/game/Warden/WardenWin.cpp index d3225fe445b..18bf2897358 100644 --- a/src/server/game/Warden/WardenWin.cpp +++ b/src/server/game/Warden/WardenWin.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Warden/WardenWin.h b/src/server/game/Warden/WardenWin.h index 1b1cc6746f4..47487ba65a2 100644 --- a/src/server/game/Warden/WardenWin.h +++ b/src/server/game/Warden/WardenWin.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Weather/Weather.cpp b/src/server/game/Weather/Weather.cpp index 5c03c816e6d..b9133c9d0b1 100644 --- a/src/server/game/Weather/Weather.cpp +++ b/src/server/game/Weather/Weather.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Weather/Weather.h b/src/server/game/Weather/Weather.h index 2645d3f2067..0bdd6af6dc5 100644 --- a/src/server/game/Weather/Weather.h +++ b/src/server/game/Weather/Weather.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Weather/WeatherMgr.cpp b/src/server/game/Weather/WeatherMgr.cpp index 1b36bc4653c..e327836fa4a 100644 --- a/src/server/game/Weather/WeatherMgr.cpp +++ b/src/server/game/Weather/WeatherMgr.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/Weather/WeatherMgr.h b/src/server/game/Weather/WeatherMgr.h index 3f680b383b5..9c03fa513d0 100644 --- a/src/server/game/Weather/WeatherMgr.h +++ b/src/server/game/Weather/WeatherMgr.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp index 7e9482317d1..3658130db3d 100644 --- a/src/server/game/World/World.cpp +++ b/src/server/game/World/World.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -431,27 +431,27 @@ void World::LoadConfigSettings(bool reload) m_int_configs[CONFIG_ENABLE_SINFO_LOGIN] = sConfigMgr->GetIntDefault("Server.LoginInfo", 0); ///- Read all rates from the config file - rate_values[RATE_HEALTH] = sConfigMgr->GetFloatDefault("Rate.Health", 1); + rate_values[RATE_HEALTH] = sConfigMgr->GetFloatDefault("Rate.Health", 1.0f); if (rate_values[RATE_HEALTH] < 0) { TC_LOG_ERROR("server.loading", "Rate.Health (%f) must be > 0. Using 1 instead.", rate_values[RATE_HEALTH]); rate_values[RATE_HEALTH] = 1; } - rate_values[RATE_POWER_MANA] = sConfigMgr->GetFloatDefault("Rate.Mana", 1); + rate_values[RATE_POWER_MANA] = sConfigMgr->GetFloatDefault("Rate.Mana", 1.0f); if (rate_values[RATE_POWER_MANA] < 0) { TC_LOG_ERROR("server.loading", "Rate.Mana (%f) must be > 0. Using 1 instead.", rate_values[RATE_POWER_MANA]); rate_values[RATE_POWER_MANA] = 1; } - rate_values[RATE_POWER_RAGE_INCOME] = sConfigMgr->GetFloatDefault("Rate.Rage.Income", 1); - rate_values[RATE_POWER_RAGE_LOSS] = sConfigMgr->GetFloatDefault("Rate.Rage.Loss", 1); + rate_values[RATE_POWER_RAGE_INCOME] = sConfigMgr->GetFloatDefault("Rate.Rage.Income", 1.0f); + rate_values[RATE_POWER_RAGE_LOSS] = sConfigMgr->GetFloatDefault("Rate.Rage.Loss", 1.0f); if (rate_values[RATE_POWER_RAGE_LOSS] < 0) { TC_LOG_ERROR("server.loading", "Rate.Rage.Loss (%f) must be > 0. Using 1 instead.", rate_values[RATE_POWER_RAGE_LOSS]); rate_values[RATE_POWER_RAGE_LOSS] = 1; } - rate_values[RATE_POWER_RUNICPOWER_INCOME] = sConfigMgr->GetFloatDefault("Rate.RunicPower.Income", 1); - rate_values[RATE_POWER_RUNICPOWER_LOSS] = sConfigMgr->GetFloatDefault("Rate.RunicPower.Loss", 1); + rate_values[RATE_POWER_RUNICPOWER_INCOME] = sConfigMgr->GetFloatDefault("Rate.RunicPower.Income", 1.0f); + rate_values[RATE_POWER_RUNICPOWER_LOSS] = sConfigMgr->GetFloatDefault("Rate.RunicPower.Loss", 1.0f); if (rate_values[RATE_POWER_RUNICPOWER_LOSS] < 0) { TC_LOG_ERROR("server.loading", "Rate.RunicPower.Loss (%f) must be > 0. Using 1 instead.", rate_values[RATE_POWER_RUNICPOWER_LOSS]); @@ -645,8 +645,8 @@ void World::LoadConfigSettings(bool reload) m_float_configs[CONFIG_MAX_RECRUIT_A_FRIEND_DISTANCE] = sConfigMgr->GetFloatDefault("MaxRecruitAFriendBonusDistance", 100.0f); /// @todo Add MonsterSight and GuarderSight (with meaning) in worldserver.conf or put them as define - m_float_configs[CONFIG_SIGHT_MONSTER] = sConfigMgr->GetFloatDefault("MonsterSight", 50); - m_float_configs[CONFIG_SIGHT_GUARDER] = sConfigMgr->GetFloatDefault("GuarderSight", 50); + m_float_configs[CONFIG_SIGHT_MONSTER] = sConfigMgr->GetFloatDefault("MonsterSight", 50.0f); + m_float_configs[CONFIG_SIGHT_GUARDER] = sConfigMgr->GetFloatDefault("GuarderSight", 50.0f); if (reload) { @@ -947,12 +947,12 @@ void World::LoadConfigSettings(bool reload) if (reload) { - uint32 val = sConfigMgr->GetIntDefault("Expansion", 1); + uint32 val = sConfigMgr->GetIntDefault("Expansion", 2); if (val != m_int_configs[CONFIG_EXPANSION]) TC_LOG_ERROR("server.loading", "Expansion option can't be changed at worldserver.conf reload, using current value (%u).", m_int_configs[CONFIG_EXPANSION]); } else - m_int_configs[CONFIG_EXPANSION] = sConfigMgr->GetIntDefault("Expansion", 1); + m_int_configs[CONFIG_EXPANSION] = sConfigMgr->GetIntDefault("Expansion", 2); m_int_configs[CONFIG_CHATFLOOD_MESSAGE_COUNT] = sConfigMgr->GetIntDefault("ChatFlood.MessageCount", 10); m_int_configs[CONFIG_CHATFLOOD_MESSAGE_DELAY] = sConfigMgr->GetIntDefault("ChatFlood.MessageDelay", 1); @@ -3167,6 +3167,10 @@ void World::UpdateCharacterNameData(uint32 guid, std::string const& name, uint8 if (race != RACE_NONE) itr->second.m_race = race; + + WorldPacket data(SMSG_INVALIDATE_PLAYER, 8); + data << MAKE_NEW_GUID(guid, 0, HIGHGUID_PLAYER); + SendGlobalMessage(&data); } void World::UpdateCharacterNameDataLevel(uint32 guid, uint8 level) diff --git a/src/server/game/World/World.h b/src/server/game/World/World.h index 9422566b707..080c9d9006b 100644 --- a/src/server/game/World/World.h +++ b/src/server/game/World/World.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/CMakeLists.txt b/src/server/scripts/CMakeLists.txt index 20e4c4c7fdd..c1a9435de52 100644 --- a/src/server/scripts/CMakeLists.txt +++ b/src/server/scripts/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> +# Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/src/server/scripts/Commands/CMakeLists.txt b/src/server/scripts/Commands/CMakeLists.txt index c38789ed90a..6f969030606 100644 --- a/src/server/scripts/Commands/CMakeLists.txt +++ b/src/server/scripts/Commands/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> +# Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/src/server/scripts/Commands/cs_account.cpp b/src/server/scripts/Commands/cs_account.cpp index 6e9dbea8b21..ec3d34332b0 100644 --- a/src/server/scripts/Commands/cs_account.cpp +++ b/src/server/scripts/Commands/cs_account.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Commands/cs_achievement.cpp b/src/server/scripts/Commands/cs_achievement.cpp index 86c5e1c51c2..041b6c86881 100644 --- a/src/server/scripts/Commands/cs_achievement.cpp +++ b/src/server/scripts/Commands/cs_achievement.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Commands/cs_arena.cpp b/src/server/scripts/Commands/cs_arena.cpp index 42cfa50bc05..e3e726eb348 100644 --- a/src/server/scripts/Commands/cs_arena.cpp +++ b/src/server/scripts/Commands/cs_arena.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Commands/cs_ban.cpp b/src/server/scripts/Commands/cs_ban.cpp index 477f8e0ed72..c32a03f9bd8 100644 --- a/src/server/scripts/Commands/cs_ban.cpp +++ b/src/server/scripts/Commands/cs_ban.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Commands/cs_bf.cpp b/src/server/scripts/Commands/cs_bf.cpp index 65c4d3d23f9..2bc962f0768 100644 --- a/src/server/scripts/Commands/cs_bf.cpp +++ b/src/server/scripts/Commands/cs_bf.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Commands/cs_cast.cpp b/src/server/scripts/Commands/cs_cast.cpp index 7ba44b6a558..545ae405c20 100644 --- a/src/server/scripts/Commands/cs_cast.cpp +++ b/src/server/scripts/Commands/cs_cast.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Commands/cs_character.cpp b/src/server/scripts/Commands/cs_character.cpp index e35b7f08444..f9ef827e8c3 100644 --- a/src/server/scripts/Commands/cs_character.cpp +++ b/src/server/scripts/Commands/cs_character.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Commands/cs_cheat.cpp b/src/server/scripts/Commands/cs_cheat.cpp index 3490145c044..bf51141ba4f 100644 --- a/src/server/scripts/Commands/cs_cheat.cpp +++ b/src/server/scripts/Commands/cs_cheat.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Commands/cs_debug.cpp b/src/server/scripts/Commands/cs_debug.cpp index d3e6f3e8430..597823abc13 100644 --- a/src/server/scripts/Commands/cs_debug.cpp +++ b/src/server/scripts/Commands/cs_debug.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -1382,7 +1382,10 @@ public: } else { + Position pos; + transport->GetPosition(&pos); handler->PSendSysMessage("Transport %s is %s", transport->GetName().c_str(), transport->GetGoState() == GO_STATE_READY ? "stopped" : "moving"); + handler->PSendSysMessage("Transport position: %s", pos.ToString().c_str()); return true; } diff --git a/src/server/scripts/Commands/cs_deserter.cpp b/src/server/scripts/Commands/cs_deserter.cpp index 2a052c00459..5a9c799a4a8 100644 --- a/src/server/scripts/Commands/cs_deserter.cpp +++ b/src/server/scripts/Commands/cs_deserter.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Commands/cs_disable.cpp b/src/server/scripts/Commands/cs_disable.cpp index 27990597656..5d7296ca495 100644 --- a/src/server/scripts/Commands/cs_disable.cpp +++ b/src/server/scripts/Commands/cs_disable.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Commands/cs_event.cpp b/src/server/scripts/Commands/cs_event.cpp index 0fb57a3315a..849a8b5634e 100644 --- a/src/server/scripts/Commands/cs_event.cpp +++ b/src/server/scripts/Commands/cs_event.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Commands/cs_gm.cpp b/src/server/scripts/Commands/cs_gm.cpp index 6884db18b98..55e22a8c99a 100644 --- a/src/server/scripts/Commands/cs_gm.cpp +++ b/src/server/scripts/Commands/cs_gm.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Commands/cs_go.cpp b/src/server/scripts/Commands/cs_go.cpp index 5bc59bb74d3..fecb4edf968 100644 --- a/src/server/scripts/Commands/cs_go.cpp +++ b/src/server/scripts/Commands/cs_go.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -112,7 +112,7 @@ public: { std::string name = param1; WorldDatabase.EscapeString(name); - whereClause << ", creature_template WHERE creature.id = creature_template.entry AND creature_template.name "_LIKE_" '" << name << '\''; + whereClause << ", creature_template WHERE creature.id = creature_template.entry AND creature_template.name " _LIKE_" '" << name << '\''; } else whereClause << "WHERE guid = '" << guid << '\''; diff --git a/src/server/scripts/Commands/cs_gobject.cpp b/src/server/scripts/Commands/cs_gobject.cpp index 6bb927fec5e..423a47eb3c8 100644 --- a/src/server/scripts/Commands/cs_gobject.cpp +++ b/src/server/scripts/Commands/cs_gobject.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -238,7 +238,7 @@ public: WorldDatabase.EscapeString(name); result = WorldDatabase.PQuery( "SELECT guid, id, position_x, position_y, position_z, orientation, map, phaseMask, (POW(position_x - %f, 2) + POW(position_y - %f, 2) + POW(position_z - %f, 2)) AS order_ " - "FROM gameobject, gameobject_template WHERE gameobject_template.entry = gameobject.id AND map = %i AND name "_LIKE_" "_CONCAT3_("'%%'", "'%s'", "'%%'")" ORDER BY order_ ASC LIMIT 1", + "FROM gameobject, gameobject_template WHERE gameobject_template.entry = gameobject.id AND map = %i AND name " _LIKE_" " _CONCAT3_("'%%'", "'%s'", "'%%'")" ORDER BY order_ ASC LIMIT 1", player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), player->GetMapId(), name.c_str()); } } diff --git a/src/server/scripts/Commands/cs_group.cpp b/src/server/scripts/Commands/cs_group.cpp index fda34586f0c..c236af40e45 100644 --- a/src/server/scripts/Commands/cs_group.cpp +++ b/src/server/scripts/Commands/cs_group.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Commands/cs_guild.cpp b/src/server/scripts/Commands/cs_guild.cpp index f9d5d101838..4627f6b022e 100644 --- a/src/server/scripts/Commands/cs_guild.cpp +++ b/src/server/scripts/Commands/cs_guild.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Commands/cs_honor.cpp b/src/server/scripts/Commands/cs_honor.cpp index 76561cc9d84..40663ca5a10 100644 --- a/src/server/scripts/Commands/cs_honor.cpp +++ b/src/server/scripts/Commands/cs_honor.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Commands/cs_instance.cpp b/src/server/scripts/Commands/cs_instance.cpp index 6c576c2c368..93cabaeeca7 100644 --- a/src/server/scripts/Commands/cs_instance.cpp +++ b/src/server/scripts/Commands/cs_instance.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Commands/cs_learn.cpp b/src/server/scripts/Commands/cs_learn.cpp index 48d809097ca..113f6da2e31 100644 --- a/src/server/scripts/Commands/cs_learn.cpp +++ b/src/server/scripts/Commands/cs_learn.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Commands/cs_lfg.cpp b/src/server/scripts/Commands/cs_lfg.cpp index 707ac79ccc3..2c6534be8a2 100644 --- a/src/server/scripts/Commands/cs_lfg.cpp +++ b/src/server/scripts/Commands/cs_lfg.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Commands/cs_list.cpp b/src/server/scripts/Commands/cs_list.cpp index 9037999d71a..1ee92625735 100644 --- a/src/server/scripts/Commands/cs_list.cpp +++ b/src/server/scripts/Commands/cs_list.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Commands/cs_lookup.cpp b/src/server/scripts/Commands/cs_lookup.cpp index f2ce4ed8a85..f2b4f54363b 100644 --- a/src/server/scripts/Commands/cs_lookup.cpp +++ b/src/server/scripts/Commands/cs_lookup.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Commands/cs_message.cpp b/src/server/scripts/Commands/cs_message.cpp index 51f711894ed..dd1366ac09c 100644 --- a/src/server/scripts/Commands/cs_message.cpp +++ b/src/server/scripts/Commands/cs_message.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp index 3eba91cdab5..796416b4031 100644 --- a/src/server/scripts/Commands/cs_misc.cpp +++ b/src/server/scripts/Commands/cs_misc.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Commands/cs_mmaps.cpp b/src/server/scripts/Commands/cs_mmaps.cpp index 690988ebac1..61598bf0945 100644 --- a/src/server/scripts/Commands/cs_mmaps.cpp +++ b/src/server/scripts/Commands/cs_mmaps.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Commands/cs_modify.cpp b/src/server/scripts/Commands/cs_modify.cpp index 4aa7c19fea6..c2d6bf47154 100644 --- a/src/server/scripts/Commands/cs_modify.cpp +++ b/src/server/scripts/Commands/cs_modify.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Commands/cs_npc.cpp b/src/server/scripts/Commands/cs_npc.cpp index 12d0d4ea4f2..a5b13301403 100644 --- a/src/server/scripts/Commands/cs_npc.cpp +++ b/src/server/scripts/Commands/cs_npc.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -275,7 +275,11 @@ public: uint32 db_guid = creature->GetDBTableGUIDLow(); - // To call _LoadGoods(); _LoadQuests(); CreateTrainerSpells(); + // To call _LoadGoods(); _LoadQuests(); CreateTrainerSpells() + // current "creature" variable is deleted and created fresh new, otherwise old values might trigger asserts or cause undefined behavior + creature->CleanupsBeforeDelete(); + delete creature; + creature = new Creature(); if (!creature->LoadCreatureFromDB(db_guid, map)) { delete creature; @@ -740,7 +744,7 @@ public: for (uint8 i = 0; i < NPCFLAG_COUNT; i++) if (npcflags & npcFlagTexts[i].Value) - handler->PSendSysMessage(npcFlagTexts[i].Name); + handler->PSendSysMessage(npcFlagTexts[i].Name, npcFlagTexts[i].Value); handler->PSendSysMessage(LANG_NPCINFO_MECHANIC_IMMUNE, mechanicImmuneMask); for (uint8 i = 0; i < MAX_MECHANIC; ++i) diff --git a/src/server/scripts/Commands/cs_pet.cpp b/src/server/scripts/Commands/cs_pet.cpp index 9a61250d193..1a5df88f144 100644 --- a/src/server/scripts/Commands/cs_pet.cpp +++ b/src/server/scripts/Commands/cs_pet.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Commands/cs_quest.cpp b/src/server/scripts/Commands/cs_quest.cpp index cdae7a88387..01e28b0910d 100644 --- a/src/server/scripts/Commands/cs_quest.cpp +++ b/src/server/scripts/Commands/cs_quest.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Commands/cs_rbac.cpp b/src/server/scripts/Commands/cs_rbac.cpp index 1f946fe80ad..df4ce993433 100644 --- a/src/server/scripts/Commands/cs_rbac.cpp +++ b/src/server/scripts/Commands/cs_rbac.cpp @@ -1,5 +1,5 @@ /*
- * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/src/server/scripts/Commands/cs_reload.cpp b/src/server/scripts/Commands/cs_reload.cpp index 59477c6684f..7e759a788f5 100644 --- a/src/server/scripts/Commands/cs_reload.cpp +++ b/src/server/scripts/Commands/cs_reload.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Commands/cs_reset.cpp b/src/server/scripts/Commands/cs_reset.cpp index 2b27fcf56fd..4299e690989 100644 --- a/src/server/scripts/Commands/cs_reset.cpp +++ b/src/server/scripts/Commands/cs_reset.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Commands/cs_send.cpp b/src/server/scripts/Commands/cs_send.cpp index 7ac0940ec77..58970a91e20 100644 --- a/src/server/scripts/Commands/cs_send.cpp +++ b/src/server/scripts/Commands/cs_send.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Commands/cs_server.cpp b/src/server/scripts/Commands/cs_server.cpp index a43f3bccf8d..4cd5e1f6274 100644 --- a/src/server/scripts/Commands/cs_server.cpp +++ b/src/server/scripts/Commands/cs_server.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Commands/cs_tele.cpp b/src/server/scripts/Commands/cs_tele.cpp index ca9f4a59045..f6618227ae6 100644 --- a/src/server/scripts/Commands/cs_tele.cpp +++ b/src/server/scripts/Commands/cs_tele.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Commands/cs_ticket.cpp b/src/server/scripts/Commands/cs_ticket.cpp index 304bec9fee9..2f0b53bff68 100644 --- a/src/server/scripts/Commands/cs_ticket.cpp +++ b/src/server/scripts/Commands/cs_ticket.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Commands/cs_titles.cpp b/src/server/scripts/Commands/cs_titles.cpp index 7654336533a..20bffdbb792 100644 --- a/src/server/scripts/Commands/cs_titles.cpp +++ b/src/server/scripts/Commands/cs_titles.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Commands/cs_wp.cpp b/src/server/scripts/Commands/cs_wp.cpp index 52a080ea16b..9b20383e94a 100644 --- a/src/server/scripts/Commands/cs_wp.cpp +++ b/src/server/scripts/Commands/cs_wp.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Custom/CMakeLists.txt b/src/server/scripts/Custom/CMakeLists.txt index 99cf026f776..78db719ae6e 100644 --- a/src/server/scripts/Custom/CMakeLists.txt +++ b/src/server/scripts/Custom/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> +# Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/alterac_valley.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/alterac_valley.cpp index 7bc08b9a7c6..3859555a90c 100644 --- a/src/server/scripts/EasternKingdoms/AlteracValley/alterac_valley.cpp +++ b/src/server/scripts/EasternKingdoms/AlteracValley/alterac_valley.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp index 2b1b04cb654..ab135a2fd78 100644 --- a/src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp +++ b/src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/boss_drekthar.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/boss_drekthar.cpp index 7559d71bf78..2f48ca4a3b6 100644 --- a/src/server/scripts/EasternKingdoms/AlteracValley/boss_drekthar.cpp +++ b/src/server/scripts/EasternKingdoms/AlteracValley/boss_drekthar.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/boss_galvangar.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/boss_galvangar.cpp index 4f91e57be50..aa852ffd30c 100644 --- a/src/server/scripts/EasternKingdoms/AlteracValley/boss_galvangar.cpp +++ b/src/server/scripts/EasternKingdoms/AlteracValley/boss_galvangar.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/boss_vanndar.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/boss_vanndar.cpp index 0e5370f0f07..4e7c2abcdcc 100644 --- a/src/server/scripts/EasternKingdoms/AlteracValley/boss_vanndar.cpp +++ b/src/server/scripts/EasternKingdoms/AlteracValley/boss_vanndar.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.cpp index ee8f22ca66c..55a89d062e8 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -117,7 +117,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_grimstoneAI(creature); + return GetInstanceAI<npc_grimstoneAI>(creature); } struct npc_grimstoneAI : public npc_escortAI @@ -207,12 +207,9 @@ public: Event_Timer = 5000; break; case 5: - if (instance) - { - instance->UpdateEncounterState(ENCOUNTER_CREDIT_KILL_CREATURE, NPC_GRIMSTONE, me); - instance->SetData(TYPE_RING_OF_LAW, DONE); - TC_LOG_DEBUG("scripts", "npc_grimstone: event reached end and set complete."); - } + instance->UpdateEncounterState(ENCOUNTER_CREDIT_KILL_CREATURE, NPC_GRIMSTONE, me); + instance->SetData(TYPE_RING_OF_LAW, DONE); + TC_LOG_DEBUG("scripts", "npc_grimstone: event reached end and set complete."); break; } } @@ -224,9 +221,6 @@ public: void UpdateAI(uint32 diff) OVERRIDE { - if (!instance) - return; - if (MobDeath_Timer) { if (MobDeath_Timer <= diff) @@ -1237,7 +1231,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_rocknotAI(creature); + return GetInstanceAI<npc_rocknotAI>(creature); } struct npc_rocknotAI : public npc_escortAI @@ -1269,9 +1263,6 @@ public: void WaypointReached(uint32 waypointId) OVERRIDE { - if (!instance) - return; - switch (waypointId) { case 1: @@ -1295,9 +1286,6 @@ public: void UpdateAI(uint32 diff) OVERRIDE { - if (!instance) - return; - if (BreakKeg_Timer) { if (BreakKeg_Timer <= diff) diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.h b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.h index b279012bbf7..ea3fd59490a 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.h +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_ambassador_flamelash.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_ambassador_flamelash.cpp index 75f85ace2bd..5201e06aa17 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_ambassador_flamelash.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_ambassador_flamelash.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_anubshiah.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_anubshiah.cpp index 84964ba375a..33e0484c0d5 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_anubshiah.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_anubshiah.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp index dcf5ef56848..845db0cac1c 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -39,7 +39,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_draganthaurissanAI(creature); + return GetInstanceAI<boss_draganthaurissanAI>(creature); } struct boss_draganthaurissanAI : public ScriptedAI diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_general_angerforge.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_general_angerforge.cpp index 869479a7ae0..258dfd5db07 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_general_angerforge.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_general_angerforge.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_gorosh_the_dervish.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_gorosh_the_dervish.cpp index f865a6f6742..acc739425ee 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_gorosh_the_dervish.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_gorosh_the_dervish.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_grizzle.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_grizzle.cpp index 1c2953a6a22..9bd36203dd2 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_grizzle.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_grizzle.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_high_interrogator_gerstahn.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_high_interrogator_gerstahn.cpp index 86748977749..65a3fd35d48 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_high_interrogator_gerstahn.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_high_interrogator_gerstahn.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_magmus.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_magmus.cpp index f4c63f630c3..ce3a11d817b 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_magmus.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_magmus.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_moira_bronzebeard.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_moira_bronzebeard.cpp index c647737bea9..21c887ac7d6 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_moira_bronzebeard.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_moira_bronzebeard.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_tomb_of_seven.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_tomb_of_seven.cpp index 55e6862bda7..f432d71ff68 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_tomb_of_seven.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_tomb_of_seven.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -140,7 +140,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_doomrelAI(creature); + return GetInstanceAI<boss_doomrelAI>(creature); } struct boss_doomrelAI : public ScriptedAI @@ -170,13 +170,10 @@ public: // was set before event start, so set again me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); - if (instance) - { - if (instance->GetData(DATA_GHOSTKILL) >= 7) - me->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE); - else - me->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); - } + if (instance->GetData(DATA_GHOSTKILL) >= 7) + me->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE); + else + me->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); } void EnterCombat(Unit* /*who*/) OVERRIDE @@ -192,14 +189,12 @@ public: if (me->IsAlive()) me->GetMotionMaster()->MoveTargetedHome(); me->SetLootRecipient(NULL); - if (instance) - instance->SetData64(DATA_EVENSTARTER, 0); + instance->SetData64(DATA_EVENSTARTER, 0); } void JustDied(Unit* /*killer*/) OVERRIDE { - if (instance) - instance->SetData(DATA_GHOSTKILL, 1); + instance->SetData(DATA_GHOSTKILL, 1); } void UpdateAI(uint32 diff) OVERRIDE diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp index f1ccf35e490..42c7c046d48 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/blackrock_spire.h b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/blackrock_spire.h index e2295521a5b..2199e52129c 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/blackrock_spire.h +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/blackrock_spire.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_drakkisath.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_drakkisath.cpp index 009c22e40b3..32b87a94ae4 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_drakkisath.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_drakkisath.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_gizrul_the_slavener.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_gizrul_the_slavener.cpp index 9f22c2c1e85..1c6c0a5aa62 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_gizrul_the_slavener.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_gizrul_the_slavener.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_gyth.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_gyth.cpp index dbc3056b1ff..96582fdf6fe 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_gyth.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_gyth.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -162,7 +162,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_gythAI(creature); + return GetInstanceAI<boss_gythAI>(creature); } }; diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_halycon.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_halycon.cpp index b79a6e4733e..482cc9cf81a 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_halycon.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_halycon.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_highlord_omokk.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_highlord_omokk.cpp index 5b5e9bc082a..590c025388b 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_highlord_omokk.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_highlord_omokk.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_lord_valthalak.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_lord_valthalak.cpp index 26540eb38a6..41e0fb61018 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_lord_valthalak.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_lord_valthalak.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -64,8 +64,7 @@ public: void JustDied(Unit* /*killer*/) OVERRIDE { - if (instance) - instance->SetData(DATA_LORD_VALTHALAK, DONE); + instance->SetData(DATA_LORD_VALTHALAK, DONE); } void UpdateAI(uint32 diff) OVERRIDE @@ -128,7 +127,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_lord_valthalakAI(creature); + return GetInstanceAI<boss_lord_valthalakAI>(creature); } }; diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_mother_smolderweb.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_mother_smolderweb.cpp index f9b0441af77..ed1916b90d6 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_mother_smolderweb.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_mother_smolderweb.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_overlord_wyrmthalak.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_overlord_wyrmthalak.cpp index 2a448898813..8db2065b3ea 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_overlord_wyrmthalak.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_overlord_wyrmthalak.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_pyroguard_emberseer.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_pyroguard_emberseer.cpp index 1c40385c0fd..7f5cd93a5b1 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_pyroguard_emberseer.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_pyroguard_emberseer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -79,23 +79,20 @@ public: void Reset() OVERRIDE { - if (instance) - { - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NOT_SELECTABLE); - events.Reset(); - // Apply auras on spawn and reset - // DoCast(me, SPELL_FIRE_SHIELD_TRIGGER); // Need to find this in old DBC if possible - me->RemoveAura(SPELL_EMBERSEER_FULL_STRENGTH); - me->RemoveAura(SPELL_EMBERSEER_GROWING); - me->RemoveAura(SPELL_EMBERSEER_GROWING_TRIGGER); - events.ScheduleEvent(EVENT_RESPAWN, 5000); - // Hack for missing trigger spell - events.ScheduleEvent(EVENT_FIRE_SHIELD, 3000); - - // Open doors on reset - if (instance->GetBossState(DATA_PYROGAURD_EMBERSEER) == IN_PROGRESS) - OpenDoors(false); // Opens 2 entrance doors - } + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NOT_SELECTABLE); + events.Reset(); + // Apply auras on spawn and reset + // DoCast(me, SPELL_FIRE_SHIELD_TRIGGER); // Need to find this in old DBC if possible + me->RemoveAura(SPELL_EMBERSEER_FULL_STRENGTH); + me->RemoveAura(SPELL_EMBERSEER_GROWING); + me->RemoveAura(SPELL_EMBERSEER_GROWING_TRIGGER); + events.ScheduleEvent(EVENT_RESPAWN, 5000); + // Hack for missing trigger spell + events.ScheduleEvent(EVENT_FIRE_SHIELD, 3000); + + // Open doors on reset + if (instance->GetBossState(DATA_PYROGAURD_EMBERSEER) == IN_PROGRESS) + OpenDoors(false); // Opens 2 entrance doors } void SetData(uint32 /*type*/, uint32 data) OVERRIDE @@ -132,15 +129,12 @@ public: void JustDied(Unit* /*killer*/) OVERRIDE { - if (instance) - { - // Activate all the runes - UpdateRunes(GO_STATE_READY); - // Opens all 3 doors - OpenDoors(true); - // Complete encounter - instance->SetBossState(DATA_PYROGAURD_EMBERSEER, DONE); - } + // Activate all the runes + UpdateRunes(GO_STATE_READY); + // Opens all 3 doors + OpenDoors(true); + // Complete encounter + instance->SetBossState(DATA_PYROGAURD_EMBERSEER, DONE); } void SpellHit(Unit* /*caster*/, SpellInfo const* spell) OVERRIDE @@ -185,24 +179,21 @@ public: void UpdateRunes(GOState state) { - if (instance) - { - // update all runes - if (GameObject* rune1 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_1))) - rune1->SetGoState(state); - if (GameObject* rune2 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_2))) - rune2->SetGoState(state); - if (GameObject* rune3 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_3))) - rune3->SetGoState(state); - if (GameObject* rune4 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_4))) - rune4->SetGoState(state); - if (GameObject* rune5 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_5))) - rune5->SetGoState(state); - if (GameObject* rune6 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_6))) - rune6->SetGoState(state); - if (GameObject* rune7 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_7))) - rune7->SetGoState(state); - } + // update all runes + if (GameObject* rune1 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_1))) + rune1->SetGoState(state); + if (GameObject* rune2 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_2))) + rune2->SetGoState(state); + if (GameObject* rune3 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_3))) + rune3->SetGoState(state); + if (GameObject* rune4 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_4))) + rune4->SetGoState(state); + if (GameObject* rune5 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_5))) + rune5->SetGoState(state); + if (GameObject* rune6 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_6))) + rune6->SetGoState(state); + if (GameObject* rune7 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_7))) + rune7->SetGoState(state); } void UpdateAI(uint32 diff) OVERRIDE @@ -316,7 +307,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_pyroguard_emberseerAI(creature); + return GetInstanceAI<boss_pyroguard_emberseerAI>(creature); } }; diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_quartermaster_zigris.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_quartermaster_zigris.cpp index 4dbade9e07b..27229b6ba71 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_quartermaster_zigris.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_quartermaster_zigris.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_rend_blackhand.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_rend_blackhand.cpp index ff839e3cacb..fe38377341b 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_rend_blackhand.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_rend_blackhand.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -438,7 +438,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_rend_blackhandAI(creature); + return GetInstanceAI<boss_rend_blackhandAI>(creature); } }; diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_shadow_hunter_voshgajin.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_shadow_hunter_voshgajin.cpp index 7fcb201a5ad..dac7e8f50ba 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_shadow_hunter_voshgajin.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_shadow_hunter_voshgajin.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_the_beast.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_the_beast.cpp index 8cb0dfbce64..0c9c66b83f3 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_the_beast.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_the_beast.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_urok_doomhowl.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_urok_doomhowl.cpp index 76b673eed06..a525e0395d1 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_urok_doomhowl.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_urok_doomhowl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_warmaster_voone.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_warmaster_voone.cpp index ccd74b204ce..dc84aba0ee3 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_warmaster_voone.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_warmaster_voone.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -23,11 +23,11 @@ enum Spells { SPELL_SNAPKICK = 15618, - SPELL_CLEAVE = 15579, + SPELL_CLEAVE = 15284, SPELL_UPPERCUT = 10966, SPELL_MORTALSTRIKE = 16856, SPELL_PUMMEL = 15615, - SPELL_THROWAXE = 16075, + SPELL_THROWAXE = 16075 }; enum Events @@ -37,7 +37,7 @@ enum Events EVENT_UPPERCUT = 3, EVENT_MORTAL_STRIKE = 4, EVENT_PUMMEL = 5, - EVENT_THROW_AXE = 6, + EVENT_THROW_AXE = 6 }; class boss_warmaster_voone : public CreatureScript @@ -45,11 +45,6 @@ class boss_warmaster_voone : public CreatureScript public: boss_warmaster_voone() : CreatureScript("boss_warmaster_voone") { } - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return new boss_warmastervooneAI(creature); - } - struct boss_warmastervooneAI : public BossAI { boss_warmastervooneAI(Creature* creature) : BossAI(creature, DATA_WARMASTER_VOONE) { } @@ -119,6 +114,10 @@ public: } }; + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new boss_warmastervooneAI(creature); + } }; void AddSC_boss_warmastervoone() diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/instance_blackrock_spire.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/instance_blackrock_spire.cpp index a1bbad7ee1c..d335ebccb6c 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/instance_blackrock_spire.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/instance_blackrock_spire.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/blackwing_lair.h b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/blackwing_lair.h index acdbf0cd483..e07d1d987fc 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/blackwing_lair.h +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/blackwing_lair.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_broodlord_lashlayer.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_broodlord_lashlayer.cpp index c9dc3d8f134..307f5e24619 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_broodlord_lashlayer.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_broodlord_lashlayer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -116,7 +116,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_broodlordAI(creature); + return GetInstanceAI<boss_broodlordAI>(creature); } }; diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_chromaggus.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_chromaggus.cpp index 05effabe557..d292e5f7701 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_chromaggus.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_chromaggus.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -282,7 +282,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_chromaggusAI(creature); + return GetInstanceAI<boss_chromaggusAI>(creature); } }; diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_ebonroc.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_ebonroc.cpp index 0d79f3faeee..b8a3c157c52 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_ebonroc.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_ebonroc.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -92,7 +92,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_ebonrocAI(creature); + return GetInstanceAI<boss_ebonrocAI>(creature); } }; diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_firemaw.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_firemaw.cpp index 369e4e02f5a..706f376e882 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_firemaw.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_firemaw.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -94,7 +94,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_firemawAI(creature); + return GetInstanceAI<boss_firemawAI>(creature); } }; diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_flamegor.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_flamegor.cpp index 060bfeb60b3..e262cba1978 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_flamegor.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_flamegor.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -100,7 +100,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_flamegorAI(creature); + return GetInstanceAI<boss_flamegorAI>(creature); } }; diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp index 0d3774e1b58..945d8b40d32 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -170,11 +170,12 @@ public: void Reset() OVERRIDE { + SpawnedAdds = 0; + if (me->GetMapId() == 469) { if (!me->FindNearestCreature(NPC_NEFARIAN, 1000.0f, true)) _Reset(); - SpawnedAdds = 0; me->SetVisible(true); me->SetPhaseMask(1, true); @@ -376,7 +377,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_victor_nefariusAI(creature); + return GetInstanceAI<boss_victor_nefariusAI>(creature); } }; @@ -443,8 +444,7 @@ public: { if (canDespawn && DespawnTimer <= diff) { - if (instance) - instance->SetBossState(BOSS_NEFARIAN, FAIL); + instance->SetBossState(BOSS_NEFARIAN, FAIL); std::list<Creature*> constructList; me->GetCreatureListWithEntryInGrid(constructList, NPC_BONE_CONSTRUCT, 500.0f); @@ -572,7 +572,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_nefarianAI(creature); + return GetInstanceAI<boss_nefarianAI>(creature); } }; diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_razorgore.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_razorgore.cpp index caf2719eff9..b1bc34b0437 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_razorgore.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_razorgore.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -75,8 +75,7 @@ public: _Reset(); secondPhase = false; - if (instance) - instance->SetData(DATA_EGG_EVENT, NOT_STARTED); + instance->SetData(DATA_EGG_EVENT, NOT_STARTED); } void JustDied(Unit* /*killer*/) OVERRIDE @@ -84,8 +83,7 @@ public: _JustDied(); Talk(SAY_DEATH); - if (instance) - instance->SetData(DATA_EGG_EVENT, NOT_STARTED); + instance->SetData(DATA_EGG_EVENT, NOT_STARTED); } void DoChangePhase() @@ -156,7 +154,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_razorgoreAI(creature); + return GetInstanceAI<boss_razorgoreAI>(creature); } }; diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_vaelastrasz.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_vaelastrasz.cpp index bcca6246cd8..f8e00e4ed74 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_vaelastrasz.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_vaelastrasz.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp index 0c85e89ec4a..39d2a6d87d5 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_baron_geddon.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_baron_geddon.cpp index e9ac15147f9..334f055b748 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_baron_geddon.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_baron_geddon.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_garr.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_garr.cpp index 420c9fcc290..da72f9f5b5c 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_garr.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_garr.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_gehennas.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_gehennas.cpp index 15079953a34..b1ee30b1cf2 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_gehennas.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_gehennas.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_golemagg.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_golemagg.cpp index 0fdb88923b3..57922d7f7d9 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_golemagg.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_golemagg.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -179,7 +179,7 @@ class npc_core_rager : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_core_ragerAI(creature); + return GetInstanceAI<npc_core_ragerAI>(creature); } }; diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_lucifron.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_lucifron.cpp index 31f4e40552f..fa6f5bab928 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_lucifron.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_lucifron.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_magmadar.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_magmadar.cpp index 7d40b9630ae..d674ab876f0 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_magmadar.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_magmadar.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_majordomo_executus.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_majordomo_executus.cpp index 1001516d42e..294b662aea7 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_majordomo_executus.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_majordomo_executus.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -161,8 +161,7 @@ class boss_majordomo : public CreatureScript me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); break; case EVENT_OUTRO_2: - if (instance) - instance->instance->SummonCreature(NPC_RAGNAROS, RagnarosSummonPos); + instance->instance->SummonCreature(NPC_RAGNAROS, RagnarosSummonPos); break; case EVENT_OUTRO_3: Talk(SAY_ARRIVAL2_MAJ); @@ -207,7 +206,7 @@ class boss_majordomo : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_majordomoAI(creature); + return GetInstanceAI<boss_majordomoAI>(creature); } }; diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_ragnaros.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_ragnaros.cpp index d03f756f366..4e135ad513a 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_ragnaros.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_ragnaros.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -147,9 +147,8 @@ class boss_ragnaros : public CreatureScript break; case EVENT_INTRO_4: Talk(SAY_ARRIVAL5_RAG); - if (instance) - if (Creature* executus = Unit::GetCreature(*me, instance->GetData64(BOSS_MAJORDOMO_EXECUTUS))) - me->Kill(executus); + if (Creature* executus = Unit::GetCreature(*me, instance->GetData64(BOSS_MAJORDOMO_EXECUTUS))) + me->Kill(executus); break; case EVENT_INTRO_5: me->SetReactState(REACT_AGGRESSIVE); @@ -163,29 +162,26 @@ class boss_ragnaros : public CreatureScript } else { - if (instance) + if (_isBanished && ((_emergeTimer <= diff) || (instance->GetData(DATA_RAGNAROS_ADDS)) > 8)) { - if (_isBanished && ((_emergeTimer <= diff) || (instance->GetData(DATA_RAGNAROS_ADDS)) > 8)) - { - //Become unbanished again - me->SetReactState(REACT_AGGRESSIVE); - me->setFaction(14); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - me->SetUInt32Value(UNIT_NPC_EMOTESTATE, 0); - me->HandleEmoteCommand(EMOTE_ONESHOT_EMERGE); - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) - AttackStart(target); - instance->SetData(DATA_RAGNAROS_ADDS, 0); - - //DoCast(me, SPELL_RAGEMERGE); //"phase spells" didnt worked correctly so Ive commented them and wrote solution witch doesnt need core support - _isBanished = false; - } - else if (_isBanished) - { - _emergeTimer -= diff; - //Do nothing while banished - return; - } + //Become unbanished again + me->SetReactState(REACT_AGGRESSIVE); + me->setFaction(14); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + me->SetUInt32Value(UNIT_NPC_EMOTESTATE, 0); + me->HandleEmoteCommand(EMOTE_ONESHOT_EMERGE); + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) + AttackStart(target); + instance->SetData(DATA_RAGNAROS_ADDS, 0); + + //DoCast(me, SPELL_RAGEMERGE); //"phase spells" didnt worked correctly so Ive commented them and wrote solution witch doesnt need core support + _isBanished = false; + } + else if (_isBanished) + { + _emergeTimer -= diff; + //Do nothing while banished + return; } //Return since we have no target @@ -306,7 +302,7 @@ class boss_ragnaros : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_ragnarosAI(creature); + return GetInstanceAI<boss_ragnarosAI>(creature); } }; @@ -324,8 +320,7 @@ class npc_son_of_flame : public CreatureScript void JustDied(Unit* /*killer*/) OVERRIDE { - if (instance) - instance->SetData(DATA_RAGNAROS_ADDS, 1); + instance->SetData(DATA_RAGNAROS_ADDS, 1); } void UpdateAI(uint32 /*diff*/) OVERRIDE @@ -342,7 +337,7 @@ class npc_son_of_flame : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_son_of_flameAI(creature); + return GetInstanceAI<npc_son_of_flameAI>(creature); } }; diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_shazzrah.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_shazzrah.cpp index 7c1d1af7d29..4ca66a1c856 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_shazzrah.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_shazzrah.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_sulfuron_harbinger.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_sulfuron_harbinger.cpp index 681f4f72bc6..ddb079b7b3d 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_sulfuron_harbinger.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_sulfuron_harbinger.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/instance_molten_core.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/instance_molten_core.cpp index 73ea15be261..587ea51fc76 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/instance_molten_core.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/instance_molten_core.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/molten_core.h b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/molten_core.h index 407e3ee5204..39d6cf40a8a 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/molten_core.h +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/molten_core.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/CMakeLists.txt b/src/server/scripts/EasternKingdoms/CMakeLists.txt index 8622949b3fe..4adb087921b 100644 --- a/src/server/scripts/EasternKingdoms/CMakeLists.txt +++ b/src/server/scripts/EasternKingdoms/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> +# Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/src/server/scripts/EasternKingdoms/Deadmines/boss_mr_smite.cpp b/src/server/scripts/EasternKingdoms/Deadmines/boss_mr_smite.cpp index 8a7836b310e..af8d1253dd8 100644 --- a/src/server/scripts/EasternKingdoms/Deadmines/boss_mr_smite.cpp +++ b/src/server/scripts/EasternKingdoms/Deadmines/boss_mr_smite.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -45,7 +45,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_mr_smiteAI(creature); + return GetInstanceAI<boss_mr_smiteAI>(creature); } struct boss_mr_smiteAI : public ScriptedAI @@ -127,12 +127,11 @@ public: ++uiHealth; DoCastAOE(SPELL_SMITE_STOMP, false); SetCombatMovement(false); - if (instance) - if (GameObject* go = GameObject::GetGameObject(*me, instance->GetData64(DATA_SMITE_CHEST))) - { - me->GetMotionMaster()->Clear(); - me->GetMotionMaster()->MovePoint(1, go->GetPositionX() - 3.0f, go->GetPositionY(), go->GetPositionZ()); - } + if (GameObject* go = GameObject::GetGameObject(*me, instance->GetData64(DATA_SMITE_CHEST))) + { + me->GetMotionMaster()->Clear(); + me->GetMotionMaster()->MovePoint(1, go->GetPositionX() - 3.0f, go->GetPositionY(), go->GetPositionZ()); + } } if (uiPhase) diff --git a/src/server/scripts/EasternKingdoms/Deadmines/deadmines.cpp b/src/server/scripts/EasternKingdoms/Deadmines/deadmines.cpp index 38d10107094..f48314ea220 100644 --- a/src/server/scripts/EasternKingdoms/Deadmines/deadmines.cpp +++ b/src/server/scripts/EasternKingdoms/Deadmines/deadmines.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/Deadmines/deadmines.h b/src/server/scripts/EasternKingdoms/Deadmines/deadmines.h index ee3b710df4e..c3b09c76c68 100644 --- a/src/server/scripts/EasternKingdoms/Deadmines/deadmines.h +++ b/src/server/scripts/EasternKingdoms/Deadmines/deadmines.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp b/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp index 122a66356db..a2369f290f1 100644 --- a/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp +++ b/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp b/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp index 46683442a60..d26458be82e 100644 --- a/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp +++ b/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -90,7 +90,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_blastmaster_emi_shortfuseAI(creature); + return GetInstanceAI<npc_blastmaster_emi_shortfuseAI>(creature); } bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE @@ -186,20 +186,15 @@ public: if (bBool) { - if (instance) - if (GameObject* go = GameObject::GetGameObject(*me, instance->GetData64(DATA_GO_CAVE_IN_RIGHT))) - instance->HandleGameObject(0, false, go); + if (GameObject* go = GameObject::GetGameObject(*me, instance->GetData64(DATA_GO_CAVE_IN_RIGHT))) + instance->HandleGameObject(0, false, go); }else - if (instance) - if (GameObject* go = GameObject::GetGameObject(*me, instance->GetData64(DATA_GO_CAVE_IN_LEFT))) - instance->HandleGameObject(0, false, go); + if (GameObject* go = GameObject::GetGameObject(*me, instance->GetData64(DATA_GO_CAVE_IN_LEFT))) + instance->HandleGameObject(0, false, go); } void SetInFace(bool bBool) { - if (!instance) - return; - if (bBool) { if (GameObject* go = GameObject::GetGameObject(*me, instance->GetData64(DATA_GO_CAVE_IN_RIGHT))) @@ -211,9 +206,6 @@ public: void RestoreAll() { - if (!instance) - return; - if (GameObject* go = GameObject::GetGameObject(*me, instance->GetData64(DATA_GO_CAVE_IN_RIGHT))) instance->HandleGameObject(0, false, go); @@ -318,9 +310,6 @@ public: NextStep(2000, true); break; case 2: - if (!instance) - return; - switch (uiValue) { case 1: @@ -441,9 +430,8 @@ public: SetInFace(true); Talk(SAY_BLASTMASTER_5); Summon(1); - if (instance) - if (GameObject* go = GameObject::GetGameObject(*me, instance->GetData64(DATA_GO_CAVE_IN_RIGHT))) - instance->HandleGameObject(0, true, go); + if (GameObject* go = GameObject::GetGameObject(*me, instance->GetData64(DATA_GO_CAVE_IN_RIGHT))) + instance->HandleGameObject(0, true, go); NextStep(3000, true); break; case 7: @@ -488,9 +476,8 @@ public: case 16: Talk(SAY_BLASTMASTER_14); SetInFace(false); - if (instance) - if (GameObject* go = GameObject::GetGameObject(*me, instance->GetData64(DATA_GO_CAVE_IN_LEFT))) - instance->HandleGameObject(0, true, go); + if (GameObject* go = GameObject::GetGameObject(*me, instance->GetData64(DATA_GO_CAVE_IN_LEFT))) + instance->HandleGameObject(0, true, go); NextStep(2000, true); break; case 17: diff --git a/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.h b/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.h index c0d4f1d57cf..096b8910d5a 100644 --- a/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.h +++ b/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/EasternKingdoms/Gnomeregan/instance_gnomeregan.cpp b/src/server/scripts/EasternKingdoms/Gnomeregan/instance_gnomeregan.cpp index bd24c87539e..9dde2d91d1a 100644 --- a/src/server/scripts/EasternKingdoms/Gnomeregan/instance_gnomeregan.cpp +++ b/src/server/scripts/EasternKingdoms/Gnomeregan/instance_gnomeregan.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp index 04b9ebffbf7..a16cec93da7 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_maiden_of_virtue.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_maiden_of_virtue.cpp index a04953cb3f5..5ac7cedd6af 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_maiden_of_virtue.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_maiden_of_virtue.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp index 30416aca1b5..14cc3083d59 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -82,6 +82,7 @@ public: void Reset() OVERRIDE { ResetTimer = 0; + Midnight = 0; } void EnterEvadeMode() OVERRIDE diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp index fc37c42be85..36bb2e32cb6 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -98,7 +98,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_moroesAI(creature); + return GetInstanceAI<boss_moroesAI>(creature); } struct boss_moroesAI : public ScriptedAI @@ -138,14 +138,12 @@ public: if (me->IsAlive()) SpawnAdds(); - if (instance) - instance->SetData(TYPE_MOROES, NOT_STARTED); + instance->SetData(TYPE_MOROES, NOT_STARTED); } void StartEvent() { - if (instance) - instance->SetData(TYPE_MOROES, IN_PROGRESS); + instance->SetData(TYPE_MOROES, IN_PROGRESS); DoZoneInCombat(); } @@ -168,14 +166,12 @@ public: { Talk(SAY_DEATH); - if (instance) - instance->SetData(TYPE_MOROES, DONE); + instance->SetData(TYPE_MOROES, DONE); DeSpawnAdds(); //remove aura from spell Garrote when Moroes dies - if (instance) - instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_GARROTE); + instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_GARROTE); } void SpawnAdds() @@ -349,15 +345,11 @@ struct boss_moroes_guestAI : public ScriptedAI void Reset() OVERRIDE { - if (instance) - instance->SetData(TYPE_MOROES, NOT_STARTED); + instance->SetData(TYPE_MOROES, NOT_STARTED); } void AcquireGUID() { - if (!instance) - return; - if (Creature* Moroes = Unit::GetCreature(*me, instance->GetData64(DATA_MOROES))) for (uint8 i = 0; i < 4; ++i) if (uint64 GUID = CAST_AI(boss_moroes::boss_moroesAI, Moroes->AI())->AddGUID[i]) @@ -393,7 +385,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_baroness_dorothea_millstipeAI(creature); + return GetInstanceAI<boss_baroness_dorothea_millstipeAI>(creature); } struct boss_baroness_dorothea_millstipeAI : public boss_moroes_guestAI @@ -456,7 +448,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_baron_rafe_dreugerAI(creature); + return GetInstanceAI<boss_baron_rafe_dreugerAI>(creature); } struct boss_baron_rafe_dreugerAI : public boss_moroes_guestAI @@ -513,7 +505,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_lady_catriona_von_indiAI(creature); + return GetInstanceAI<boss_lady_catriona_von_indiAI>(creature); } struct boss_lady_catriona_von_indiAI : public boss_moroes_guestAI @@ -583,7 +575,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_lady_keira_berrybuckAI(creature); + return GetInstanceAI<boss_lady_keira_berrybuckAI>(creature); } struct boss_lady_keira_berrybuckAI : public boss_moroes_guestAI @@ -657,7 +649,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_lord_robin_darisAI(creature); + return GetInstanceAI<boss_lord_robin_darisAI>(creature); } struct boss_lord_robin_darisAI : public boss_moroes_guestAI @@ -713,7 +705,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_lord_crispin_ferenceAI(creature); + return GetInstanceAI<boss_lord_crispin_ferenceAI>(creature); } struct boss_lord_crispin_ferenceAI : public boss_moroes_guestAI diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp index 7111056cc69..1b9ef055b8c 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -71,7 +71,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_netherspiteAI(creature); + return GetInstanceAI<boss_netherspiteAI>(creature); } struct boss_netherspiteAI : public ScriptedAI diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp index 984ef902f05..fe0bd23c755 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -71,7 +71,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_nightbaneAI(creature); + return GetInstanceAI<boss_nightbaneAI>(creature); } struct boss_nightbaneAI : public ScriptedAI @@ -131,13 +131,10 @@ public: me->SetWalk(false); me->setActive(true); - if (instance) - { - if (instance->GetData(TYPE_NIGHTBANE) == DONE || instance->GetData(TYPE_NIGHTBANE) == IN_PROGRESS) - me->DisappearAndDie(); - else - instance->SetData(TYPE_NIGHTBANE, NOT_STARTED); - } + if (instance->GetData(TYPE_NIGHTBANE) == DONE || instance->GetData(TYPE_NIGHTBANE) == IN_PROGRESS) + me->DisappearAndDie(); + else + instance->SetData(TYPE_NIGHTBANE, NOT_STARTED); HandleTerraceDoors(true); @@ -153,17 +150,13 @@ public: void HandleTerraceDoors(bool open) { - if (instance) - { - instance->HandleGameObject(instance->GetData64(DATA_MASTERS_TERRACE_DOOR_1), open); - instance->HandleGameObject(instance->GetData64(DATA_MASTERS_TERRACE_DOOR_2), open); - } + instance->HandleGameObject(instance->GetData64(DATA_MASTERS_TERRACE_DOOR_1), open); + instance->HandleGameObject(instance->GetData64(DATA_MASTERS_TERRACE_DOOR_2), open); } void EnterCombat(Unit* /*who*/) OVERRIDE { - if (instance) - instance->SetData(TYPE_NIGHTBANE, IN_PROGRESS); + instance->SetData(TYPE_NIGHTBANE, IN_PROGRESS); HandleTerraceDoors(false); Talk(YELL_AGGRO); @@ -177,8 +170,7 @@ public: void JustDied(Unit* /*killer*/) OVERRIDE { - if (instance) - instance->SetData(TYPE_NIGHTBANE, DONE); + instance->SetData(TYPE_NIGHTBANE, DONE); HandleTerraceDoors(true); } diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp index 9f7db5813d4..bde326a5c37 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -179,7 +179,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_malchezaarAI(creature); + return GetInstanceAI<boss_malchezaarAI>(creature); } struct boss_malchezaarAI : public ScriptedAI @@ -239,8 +239,7 @@ public: SunderArmorTimer = urand(5000, 10000); phase = 1; - if (instance) - instance->HandleGameObject(instance->GetData64(DATA_GO_NETHER_DOOR), true); + instance->HandleGameObject(instance->GetData64(DATA_GO_NETHER_DOOR), true); } void KilledUnit(Unit* /*victim*/) OVERRIDE @@ -260,16 +259,14 @@ public: for (uint8 i = 0; i < TOTAL_INFERNAL_POINTS; ++i) positions.push_back(&InfernalPoints[i]); - if (instance) - instance->HandleGameObject(instance->GetData64(DATA_GO_NETHER_DOOR), true); + instance->HandleGameObject(instance->GetData64(DATA_GO_NETHER_DOOR), true); } void EnterCombat(Unit* /*who*/) OVERRIDE { Talk(SAY_AGGRO); - if (instance) - instance->HandleGameObject(instance->GetData64(DATA_GO_NETHER_DOOR), false); // Open the door leading further in + instance->HandleGameObject(instance->GetData64(DATA_GO_NETHER_DOOR), false); // Open the door leading further in } void InfernalCleanup() @@ -300,12 +297,7 @@ public: void ClearWeapons() { SetEquipmentSlots(false, EQUIP_UNEQUIP, EQUIP_UNEQUIP, EQUIP_NO_CHANGE); - - //damage - const CreatureTemplate* cinfo = me->GetCreatureTemplate(); - me->SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, cinfo->mindmg); - me->SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, cinfo->maxdmg); - me->UpdateDamagePhysical(BASE_ATTACK); + me->SetCanDualWield(false); } void EnfeebleHealthEffect() @@ -422,19 +414,8 @@ public: //models SetEquipmentSlots(false, EQUIP_ID_AXE, EQUIP_ID_AXE, EQUIP_NO_CHANGE); - //damage - const CreatureTemplate* cinfo = me->GetCreatureTemplate(); - me->SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, 2*cinfo->mindmg); - me->SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, 2*cinfo->maxdmg); - me->UpdateDamagePhysical(BASE_ATTACK); - - me->SetBaseWeaponDamage(OFF_ATTACK, MINDAMAGE, cinfo->mindmg); - me->SetBaseWeaponDamage(OFF_ATTACK, MAXDAMAGE, cinfo->maxdmg); - //Sigh, updating only works on main attack, do it manually .... - me->SetFloatValue(UNIT_FIELD_MINOFFHANDDAMAGE, cinfo->mindmg); - me->SetFloatValue(UNIT_FIELD_MAXOFFHANDDAMAGE, cinfo->maxdmg); - me->SetAttackTime(OFF_ATTACK, (me->GetAttackTime(BASE_ATTACK)*150)/100); + me->SetCanDualWield(true); } } else if (phase == 2) diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp index 2036d083f6b..69f852f158c 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -86,7 +86,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_aranAI(creature); + return GetInstanceAI<boss_aranAI>(creature); } struct boss_aranAI : public ScriptedAI @@ -147,12 +147,9 @@ public: Drinking = false; DrinkInturrupted = false; - if (instance) - { - // Not in progress - instance->SetData(TYPE_ARAN, NOT_STARTED); - instance->HandleGameObject(instance->GetData64(DATA_GO_LIBRARY_DOOR), true); - } + // Not in progress + instance->SetData(TYPE_ARAN, NOT_STARTED); + instance->HandleGameObject(instance->GetData64(DATA_GO_LIBRARY_DOOR), true); } void KilledUnit(Unit* /*victim*/) OVERRIDE @@ -164,22 +161,16 @@ public: { Talk(SAY_DEATH); - if (instance) - { - instance->SetData(TYPE_ARAN, DONE); - instance->HandleGameObject(instance->GetData64(DATA_GO_LIBRARY_DOOR), true); - } + instance->SetData(TYPE_ARAN, DONE); + instance->HandleGameObject(instance->GetData64(DATA_GO_LIBRARY_DOOR), true); } void EnterCombat(Unit* /*who*/) OVERRIDE { Talk(SAY_AGGRO); - if (instance) - { - instance->SetData(TYPE_ARAN, IN_PROGRESS); - instance->HandleGameObject(instance->GetData64(DATA_GO_LIBRARY_DOOR), false); - } + instance->SetData(TYPE_ARAN, IN_PROGRESS); + instance->HandleGameObject(instance->GetData64(DATA_GO_LIBRARY_DOOR), false); } void FlameWreathEffect() @@ -226,11 +217,8 @@ public: { if (CloseDoorTimer <= diff) { - if (instance) - { - instance->HandleGameObject(instance->GetData64(DATA_GO_LIBRARY_DOOR), false); - CloseDoorTimer = 0; - } + instance->HandleGameObject(instance->GetData64(DATA_GO_LIBRARY_DOOR), false); + CloseDoorTimer = 0; } else CloseDoorTimer -= diff; } diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp index 9e7897cd56a..22398314a41 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -72,7 +72,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_kilrekAI(creature); + return GetInstanceAI<npc_kilrekAI>(creature); } struct npc_kilrekAI : public ScriptedAI @@ -96,25 +96,17 @@ public: void EnterCombat(Unit* /*who*/) OVERRIDE { - if (!instance) - { - ERROR_INST_DATA(me); - return; - } } void JustDied(Unit* /*killer*/) OVERRIDE { - if (instance) + uint64 TerestianGUID = instance->GetData64(DATA_TERESTIAN); + if (TerestianGUID) { - uint64 TerestianGUID = instance->GetData64(DATA_TERESTIAN); - if (TerestianGUID) - { - Unit* Terestian = Unit::GetUnit(*me, TerestianGUID); - if (Terestian && Terestian->IsAlive()) - DoCast(Terestian, SPELL_BROKEN_PACT, true); - } - } else ERROR_INST_DATA(me); + Unit* Terestian = Unit::GetUnit(*me, TerestianGUID); + if (Terestian && Terestian->IsAlive()) + DoCast(Terestian, SPELL_BROKEN_PACT, true); + } } void UpdateAI(uint32 diff) OVERRIDE @@ -257,7 +249,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_terestianAI(creature); + return GetInstanceAI<boss_terestianAI>(creature); } struct boss_terestianAI : public ScriptedAI @@ -307,8 +299,7 @@ public: SummonedPortals = false; Berserk = false; - if (instance) - instance->SetData(TYPE_TERESTIAN, NOT_STARTED); + instance->SetData(TYPE_TERESTIAN, NOT_STARTED); me->RemoveAurasDueToSpell(SPELL_BROKEN_PACT); @@ -363,8 +354,7 @@ public: Talk(SAY_DEATH); - if (instance) - instance->SetData(TYPE_TERESTIAN, DONE); + instance->SetData(TYPE_TERESTIAN, DONE); } void UpdateAI(uint32 diff) OVERRIDE diff --git a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp index da14ab8646e..108aceebb90 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -118,7 +118,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_dorotheeAI(creature); + return GetInstanceAI<boss_dorotheeAI>(creature); } struct boss_dorotheeAI : public ScriptedAI @@ -167,8 +167,7 @@ public: { Talk(SAY_DOROTHEE_DEATH); - if (instance) - SummonCroneIfReady(instance, me); + SummonCroneIfReady(instance, me); } void AttackStart(Unit* who) OVERRIDE @@ -299,7 +298,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_strawmanAI(creature); + return GetInstanceAI<boss_strawmanAI>(creature); } struct boss_strawmanAI : public ScriptedAI @@ -366,8 +365,7 @@ public: { Talk(SAY_STRAWMAN_DEATH); - if (instance) - SummonCroneIfReady(instance, me); + SummonCroneIfReady(instance, me); } void KilledUnit(Unit* /*victim*/) OVERRIDE @@ -414,7 +412,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_tinheadAI(creature); + return GetInstanceAI<boss_tinheadAI>(creature); } struct boss_tinheadAI : public ScriptedAI @@ -472,8 +470,7 @@ public: { Talk(SAY_TINHEAD_DEATH); - if (instance) - SummonCroneIfReady(instance, me); + SummonCroneIfReady(instance, me); } void KilledUnit(Unit* /*victim*/) OVERRIDE @@ -524,7 +521,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_roarAI(creature); + return GetInstanceAI<boss_roarAI>(creature); } struct boss_roarAI : public ScriptedAI @@ -580,8 +577,7 @@ public: { Talk(SAY_ROAR_DEATH); - if (instance) - SummonCroneIfReady(instance, me); + SummonCroneIfReady(instance, me); } void KilledUnit(Unit* /*victim*/) OVERRIDE @@ -633,7 +629,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_croneAI(creature); + return GetInstanceAI<boss_croneAI>(creature); } struct boss_croneAI : public ScriptedAI @@ -675,15 +671,12 @@ public: { Talk(SAY_CRONE_DEATH); - if (instance) - { - instance->SetData(TYPE_OPERA, DONE); - instance->HandleGameObject(instance->GetData64(DATA_GO_STAGEDOORLEFT), true); - instance->HandleGameObject(instance->GetData64(DATA_GO_STAGEDOORRIGHT), true); + instance->SetData(TYPE_OPERA, DONE); + instance->HandleGameObject(instance->GetData64(DATA_GO_STAGEDOORLEFT), true); + instance->HandleGameObject(instance->GetData64(DATA_GO_STAGEDOORRIGHT), true); - if (GameObject* pSideEntrance = instance->instance->GetGameObject(instance->GetData64(DATA_GO_SIDE_ENTRANCE_DOOR))) - pSideEntrance->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED); - } + if (GameObject* pSideEntrance = instance->instance->GetGameObject(instance->GetData64(DATA_GO_SIDE_ENTRANCE_DOOR))) + pSideEntrance->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED); } void UpdateAI(uint32 diff) OVERRIDE @@ -813,7 +806,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_bigbadwolfAI(creature); + return GetInstanceAI<boss_bigbadwolfAI>(creature); } struct boss_bigbadwolfAI : public ScriptedAI @@ -865,15 +858,12 @@ public: { DoPlaySoundToSet(me, SOUND_WOLF_DEATH); - if (instance) - { - instance->SetData(TYPE_OPERA, DONE); - instance->HandleGameObject(instance->GetData64(DATA_GO_STAGEDOORLEFT), true); - instance->HandleGameObject(instance->GetData64(DATA_GO_STAGEDOORRIGHT), true); + instance->SetData(TYPE_OPERA, DONE); + instance->HandleGameObject(instance->GetData64(DATA_GO_STAGEDOORLEFT), true); + instance->HandleGameObject(instance->GetData64(DATA_GO_STAGEDOORRIGHT), true); - if (GameObject* pSideEntrance = instance->instance->GetGameObject(instance->GetData64(DATA_GO_SIDE_ENTRANCE_DOOR))) - pSideEntrance->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED); - } + if (GameObject* pSideEntrance = instance->instance->GetGameObject(instance->GetData64(DATA_GO_SIDE_ENTRANCE_DOOR))) + pSideEntrance->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED); } void UpdateAI(uint32 diff) OVERRIDE @@ -1015,7 +1005,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_julianneAI(creature); + return GetInstanceAI<boss_julianneAI>(creature); } struct boss_julianneAI : public ScriptedAI @@ -1112,14 +1102,11 @@ public: { Talk(SAY_JULIANNE_DEATH02); - if (instance) - { - instance->SetData(TYPE_OPERA, DONE); - instance->HandleGameObject(instance->GetData64(DATA_GO_STAGEDOORLEFT), true); - instance->HandleGameObject(instance->GetData64(DATA_GO_STAGEDOORRIGHT), true); - if (GameObject* pSideEntrance = instance->instance->GetGameObject(instance->GetData64(DATA_GO_SIDE_ENTRANCE_DOOR))) - pSideEntrance->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED); - } + instance->SetData(TYPE_OPERA, DONE); + instance->HandleGameObject(instance->GetData64(DATA_GO_STAGEDOORLEFT), true); + instance->HandleGameObject(instance->GetData64(DATA_GO_STAGEDOORRIGHT), true); + if (GameObject* pSideEntrance = instance->instance->GetGameObject(instance->GetData64(DATA_GO_SIDE_ENTRANCE_DOOR))) + pSideEntrance->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED); } void KilledUnit(Unit* /*victim*/) OVERRIDE @@ -1138,7 +1125,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_romuloAI(creature); + return GetInstanceAI<boss_romuloAI>(creature); } struct boss_romuloAI : public ScriptedAI @@ -1267,15 +1254,12 @@ public: { Talk(SAY_ROMULO_DEATH); - if (instance) - { - instance->SetData(TYPE_OPERA, DONE); - instance->HandleGameObject(instance->GetData64(DATA_GO_STAGEDOORLEFT), true); - instance->HandleGameObject(instance->GetData64(DATA_GO_STAGEDOORRIGHT), true); + instance->SetData(TYPE_OPERA, DONE); + instance->HandleGameObject(instance->GetData64(DATA_GO_STAGEDOORLEFT), true); + instance->HandleGameObject(instance->GetData64(DATA_GO_STAGEDOORRIGHT), true); - if (GameObject* pSideEntrance = instance->instance->GetGameObject(instance->GetData64(DATA_GO_SIDE_ENTRANCE_DOOR))) - pSideEntrance->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED); - } + if (GameObject* pSideEntrance = instance->instance->GetGameObject(instance->GetData64(DATA_GO_SIDE_ENTRANCE_DOOR))) + pSideEntrance->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED); } void KilledUnit(Unit* /*victim*/) OVERRIDE diff --git a/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp b/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp index bf213e68f10..2e4f1eaca10 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp index e59889d24aa..f667394f29c 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -158,15 +158,11 @@ public: PerformanceReady = false; - if (instance) - m_uiEventId = instance->GetData(DATA_OPERA_PERFORMANCE); + m_uiEventId = instance->GetData(DATA_OPERA_PERFORMANCE); } void StartEvent() { - if (!instance) - return; - instance->SetData(TYPE_OPERA, IN_PROGRESS); //resets count for this event, in case earlier failed @@ -180,9 +176,6 @@ public: void WaypointReached(uint32 waypointId) OVERRIDE { - if (!instance) - return; - switch (waypointId) { case 0: @@ -412,7 +405,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_barnesAI(creature); + return GetInstanceAI<npc_barnesAI>(creature); } }; @@ -476,7 +469,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_image_of_medivhAI(creature); + return GetInstanceAI<npc_image_of_medivhAI>(creature); } struct npc_image_of_medivhAI : public ScriptedAI @@ -500,6 +493,8 @@ public: void Reset() OVERRIDE { ArcanagosGUID = 0; + EventStarted = false; + YellTimer = 0; if (instance && instance->GetData64(DATA_IMAGE_OF_MEDIVH) == 0) { diff --git a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.h b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.h index f47d2aa46fb..3812e06b442 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.h +++ b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp index 074ad3f1b96..6c15fdc77fa 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -96,7 +96,7 @@ public: CreatureAI* GetAI(Creature* c) const OVERRIDE { - return new boss_felblood_kaelthasAI(c); + return GetInstanceAI<boss_felblood_kaelthasAI>(c); } struct boss_felblood_kaelthasAI : public ScriptedAI @@ -150,17 +150,13 @@ public: Phase = 0; - if (instance) - instance->SetData(DATA_KAELTHAS_EVENT, NOT_STARTED); + instance->SetData(DATA_KAELTHAS_EVENT, NOT_STARTED); } void JustDied(Unit* /*killer*/) OVERRIDE { Talk(SAY_DEATH); - if (!instance) - return; - instance->SetData(DATA_KAELTHAS_EVENT, DONE); // Enable the Translocation Orb Exit @@ -176,9 +172,6 @@ public: void EnterCombat(Unit* /*who*/) OVERRIDE { - if (!instance) - return; - instance->SetData(DATA_KAELTHAS_EVENT, IN_PROGRESS); } @@ -371,8 +364,7 @@ public: Talk(SAY_GRAVITY_LAPSE); FirstGravityLapse = false; - if (instance) - instance->SetData(DATA_KAELTHAS_STATUES, 1); + instance->SetData(DATA_KAELTHAS_STATUES, 1); } else Talk(SAY_RECAST_GRAVITY); @@ -482,7 +474,7 @@ public: CreatureAI* GetAI(Creature* c) const OVERRIDE { - return new npc_felkael_phoenixAI(c); + return GetInstanceAI<npc_felkael_phoenixAI>(c); } struct npc_felkael_phoenixAI : public ScriptedAI diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp index af78b250ae1..8592120f94a 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -110,7 +110,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_priestess_delrissaAI(creature); + return GetInstanceAI<boss_priestess_delrissaAI>(creature); } struct boss_priestess_delrissaAI : public ScriptedAI @@ -153,8 +153,7 @@ public: //this mean she at some point evaded void JustReachedHome() OVERRIDE { - if (instance) - instance->SetData(DATA_DELRISSA_EVENT, FAIL); + instance->SetData(DATA_DELRISSA_EVENT, FAIL); } void EnterCombat(Unit* who) OVERRIDE @@ -173,8 +172,7 @@ public: } } - if (instance) - instance->SetData(DATA_DELRISSA_EVENT, IN_PROGRESS); + instance->SetData(DATA_DELRISSA_EVENT, IN_PROGRESS); } void InitializeLackeys() @@ -241,9 +239,6 @@ public: { Talk(SAY_DEATH); - if (!instance) - return; - if (instance->GetData(DATA_DELRISSA_DEATH_COUNT) == MAX_ACTIVE_LACKEY) instance->SetData(DATA_DELRISSA_EVENT, DONE); else @@ -393,36 +388,30 @@ struct boss_priestess_lackey_commonAI : public ScriptedAI if (!who) return; - if (instance) + for (uint8 i = 0; i < MAX_ACTIVE_LACKEY; ++i) { - for (uint8 i = 0; i < MAX_ACTIVE_LACKEY; ++i) + if (Unit* pAdd = Unit::GetUnit(*me, m_auiLackeyGUIDs[i])) { - if (Unit* pAdd = Unit::GetUnit(*me, m_auiLackeyGUIDs[i])) + if (!pAdd->GetVictim() && pAdd != me) { - if (!pAdd->GetVictim() && pAdd != me) - { - who->SetInCombatWith(pAdd); - pAdd->AddThreat(who, 0.0f); - } + who->SetInCombatWith(pAdd); + pAdd->AddThreat(who, 0.0f); } } + } - if (Creature* pDelrissa = Unit::GetCreature(*me, instance->GetData64(DATA_DELRISSA))) + if (Creature* pDelrissa = Unit::GetCreature(*me, instance->GetData64(DATA_DELRISSA))) + { + if (pDelrissa->IsAlive() && !pDelrissa->GetVictim()) { - if (pDelrissa->IsAlive() && !pDelrissa->GetVictim()) - { - who->SetInCombatWith(pDelrissa); - pDelrissa->AddThreat(who, 0.0f); - } + who->SetInCombatWith(pDelrissa); + pDelrissa->AddThreat(who, 0.0f); } } } void JustDied(Unit* /*killer*/) OVERRIDE { - if (!instance) - return; - Creature* pDelrissa = Unit::GetCreature(*me, instance->GetData64(DATA_DELRISSA)); uint32 uiLackeyDeathCount = instance->GetData(DATA_DELRISSA_DEATH_COUNT); @@ -452,18 +441,12 @@ struct boss_priestess_lackey_commonAI : public ScriptedAI void KilledUnit(Unit* victim) OVERRIDE { - if (!instance) - return; - if (Creature* Delrissa = Unit::GetCreature(*me, instance->GetData64(DATA_DELRISSA))) Delrissa->AI()->KilledUnit(victim); } void AcquireGUIDs() { - if (!instance) - return; - if (Creature* Delrissa = (Unit::GetCreature(*me, instance->GetData64(DATA_DELRISSA)))) { for (uint8 i = 0; i < MAX_ACTIVE_LACKEY; ++i) @@ -504,7 +487,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_kagani_nightstrikeAI(creature); + return GetInstanceAI<boss_kagani_nightstrikeAI>(creature); } struct boss_kagani_nightstrikeAI : public boss_priestess_lackey_commonAI @@ -608,7 +591,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_ellris_duskhallowAI(creature); + return GetInstanceAI<boss_ellris_duskhallowAI>(creature); } struct boss_ellris_duskhallowAI : public boss_priestess_lackey_commonAI @@ -699,7 +682,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_eramas_brightblazeAI(creature); + return GetInstanceAI<boss_eramas_brightblazeAI>(creature); } struct boss_eramas_brightblazeAI : public boss_priestess_lackey_commonAI @@ -760,7 +743,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_yazzaiAI(creature); + return GetInstanceAI<boss_yazzaiAI>(creature); } struct boss_yazzaiAI : public boss_priestess_lackey_commonAI @@ -890,7 +873,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_warlord_salarisAI(creature); + return GetInstanceAI<boss_warlord_salarisAI>(creature); } struct boss_warlord_salarisAI : public boss_priestess_lackey_commonAI @@ -1010,7 +993,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_garaxxasAI(creature); + return GetInstanceAI<boss_garaxxasAI>(creature); } struct boss_garaxxasAI : public boss_priestess_lackey_commonAI @@ -1121,7 +1104,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_apokoAI(creature); + return GetInstanceAI<boss_apokoAI>(creature); } struct boss_apokoAI : public boss_priestess_lackey_commonAI @@ -1219,7 +1202,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_zelfanAI(creature); + return GetInstanceAI<boss_zelfanAI>(creature); } struct boss_zelfanAI : public boss_priestess_lackey_commonAI diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp index d2dbc85f52a..758ecb996f4 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -66,7 +66,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_selin_fireheartAI(creature); + return GetInstanceAI<boss_selin_fireheartAI>(creature); }; struct boss_selin_fireheartAI : public ScriptedAI @@ -77,16 +77,13 @@ public: Crystals.clear(); //GUIDs per instance is static, so we only need to load them once. - if (instance) + uint32 size = instance->GetData(DATA_FEL_CRYSTAL_SIZE); + for (uint8 i = 0; i < size; ++i) { - uint32 size = instance->GetData(DATA_FEL_CRYSTAL_SIZE); - for (uint8 i = 0; i < size; ++i) - { - instance->SetData64(DATA_FEL_CRYSTAL, i); - uint64 guid = instance->GetData64(DATA_FEL_CRYSTAL); - TC_LOG_DEBUG("scripts", "Selin: Adding Fel Crystal " UI64FMTD " to list", guid); - Crystals.push_back(guid); - } + instance->SetData64(DATA_FEL_CRYSTAL, i); + uint64 guid = instance->GetData64(DATA_FEL_CRYSTAL); + TC_LOG_DEBUG("scripts", "Selin: Adding Fel Crystal " UI64FMTD " to list", guid); + Crystals.push_back(guid); } } @@ -107,25 +104,22 @@ public: void Reset() OVERRIDE { - if (instance) + //for (uint8 i = 0; i < CRYSTALS_NUMBER; ++i) + for (std::list<uint64>::const_iterator itr = Crystals.begin(); itr != Crystals.end(); ++itr) { - //for (uint8 i = 0; i < CRYSTALS_NUMBER; ++i) - for (std::list<uint64>::const_iterator itr = Crystals.begin(); itr != Crystals.end(); ++itr) + //Unit* unit = Unit::GetUnit(*me, FelCrystals[i]); + if (Creature* creature = Unit::GetCreature(*me, *itr)) { - //Unit* unit = Unit::GetUnit(*me, FelCrystals[i]); - if (Creature* creature = Unit::GetCreature(*me, *itr)) - { - if (!creature->IsAlive()) - creature->Respawn(); // Let the core handle setting death state, etc. + if (!creature->IsAlive()) + creature->Respawn(); // Let the core handle setting death state, etc. - // Only need to set unselectable flag. You can't attack unselectable units so non_attackable flag is not necessary here. - creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - } + // Only need to set unselectable flag. You can't attack unselectable units so non_attackable flag is not necessary here. + creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } + } - // Set Inst data for encounter - instance->SetData(DATA_SELIN_EVENT, NOT_STARTED); - } else TC_LOG_ERROR("scripts", ERROR_INST_DATA); + // Set Inst data for encounter + instance->SetData(DATA_SELIN_EVENT, NOT_STARTED); DrainLifeTimer = urand(3000, 7000); DrainManaTimer = DrainLifeTimer + 5000; @@ -200,8 +194,7 @@ public: void EnterCombat(Unit* /*who*/) OVERRIDE { Talk(SAY_AGGRO); - if (instance) - instance->SetData(DATA_SELIN_EVENT, IN_PROGRESS); + instance->SetData(DATA_SELIN_EVENT, IN_PROGRESS); } void KilledUnit(Unit* /*victim*/) OVERRIDE @@ -235,9 +228,6 @@ public: { Talk(SAY_DEATH); - if (!instance) - return; - instance->SetData(DATA_SELIN_EVENT, DONE); // Encounter complete! ShatterRemainingCrystals(); } diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp index 24b48112bb6..95bfcb93878 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -76,7 +76,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_vexallusAI(creature); + return GetInstanceAI<boss_vexallusAI>(creature); }; struct boss_vexallusAI : public BossAI @@ -103,8 +103,7 @@ public: IntervalHealthAmount = 1; Enraged = false; - if (instance) - instance->SetData(DATA_VEXALLUS_EVENT, NOT_STARTED); + instance->SetData(DATA_VEXALLUS_EVENT, NOT_STARTED); } void KilledUnit(Unit* /*victim*/) OVERRIDE @@ -115,16 +114,14 @@ public: void JustDied(Unit* /*killer*/) OVERRIDE { summons.DespawnAll(); - if (instance) - instance->SetData(DATA_VEXALLUS_EVENT, DONE); + instance->SetData(DATA_VEXALLUS_EVENT, DONE); } void EnterCombat(Unit* /*who*/) OVERRIDE { Talk(SAY_AGGRO); - if (instance) - instance->SetData(DATA_VEXALLUS_EVENT, IN_PROGRESS); + instance->SetData(DATA_VEXALLUS_EVENT, IN_PROGRESS); } void JustSummoned(Creature* summoned) OVERRIDE diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp index 41261549e38..5183efea521 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.cpp index c9e530bce56..ed5d9d4ec6f 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.h b/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.h index e010eb91522..ddfaa91bc98 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.h +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp index 4141b1a3aaa..a3d4d6669a3 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp index c1c103fbab3..153e995e590 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp index 97359ba65a9..75ed7b82406 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/zone_the_scarlet_enclave.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/zone_the_scarlet_enclave.cpp index 6234d7341e1..cdc37b40521 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/zone_the_scarlet_enclave.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/zone_the_scarlet_enclave.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_arcanist_doan.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_arcanist_doan.cpp index 7389d9afbff..5370adf8384 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_arcanist_doan.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_arcanist_doan.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_azshir_the_sleepless.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_azshir_the_sleepless.cpp index 274be80b7b0..edcc78ca8fe 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_azshir_the_sleepless.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_azshir_the_sleepless.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_bloodmage_thalnos.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_bloodmage_thalnos.cpp index b3375d9448f..a7db667ecfd 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_bloodmage_thalnos.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_bloodmage_thalnos.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp index 442dcf91f32..31219e18121 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -374,7 +374,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_headless_horsemanAI(creature); + return GetInstanceAI<boss_headless_horsemanAI>(creature); } struct boss_headless_horsemanAI : public ScriptedAI @@ -382,6 +382,7 @@ public: boss_headless_horsemanAI(Creature* creature) : ScriptedAI(creature) { instance = creature->GetInstanceScript(); + headGUID = 0; } InstanceScript* instance; @@ -434,8 +435,7 @@ public: } me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); - //if (instance) - // instance->SetData(DATA_HORSEMAN_EVENT, NOT_STARTED); + //instance->SetData(DATA_HORSEMAN_EVENT, NOT_STARTED); } void FlyMode() @@ -471,8 +471,7 @@ public: break; } case 6: - if (instance) - instance->SetData(GAMEOBJECT_PUMPKIN_SHRINE, 0); //hide gameobject + instance->SetData(GAMEOBJECT_PUMPKIN_SHRINE, 0); //hide gameobject break; case 19: me->SetDisableGravity(false); @@ -494,8 +493,7 @@ public: void EnterCombat(Unit* /*who*/) OVERRIDE { - if (instance) - instance->SetData(DATA_HORSEMAN_EVENT, IN_PROGRESS); + instance->SetData(DATA_HORSEMAN_EVENT, IN_PROGRESS); DoZoneInCombat(); } @@ -569,8 +567,7 @@ public: flame->CastSpell(flame, SPELL_BODY_FLAME, false); if (Creature* wisp = DoSpawnCreature(WISP_INVIS, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 60000)) CAST_AI(npc_wisp_invis::npc_wisp_invisAI, wisp->AI())->SetType(4); - if (instance) - instance->SetData(DATA_HORSEMAN_EVENT, DONE); + instance->SetData(DATA_HORSEMAN_EVENT, DONE); Map::PlayerList const& players = me->GetMap()->GetPlayers(); if (!players.isEmpty()) @@ -800,8 +797,8 @@ public: float x, y, z; me->GetPosition(x, y, z); //this visual aura some under ground me->SetPosition(x, y, z + 0.35f, 0.0f); - Despawn(); debuffGUID = 0; + Despawn(); Creature* debuff = DoSpawnCreature(HELPER, 0, 0, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 14500); if (debuff) { diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_herod.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_herod.cpp index e4974ef7eb0..da9d8345e77 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_herod.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_herod.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_high_inquisitor_fairbanks.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_high_inquisitor_fairbanks.cpp index ea624576dbc..ee5ac9b0620 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_high_inquisitor_fairbanks.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_high_inquisitor_fairbanks.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_houndmaster_loksey.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_houndmaster_loksey.cpp index 4a0d8ff4796..c8afa26ca4f 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_houndmaster_loksey.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_houndmaster_loksey.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_interrogator_vishas.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_interrogator_vishas.cpp index a57c237c21a..60164977735 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_interrogator_vishas.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_interrogator_vishas.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -48,7 +48,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_interrogator_vishasAI(creature); + return GetInstanceAI<boss_interrogator_vishasAI>(creature); } struct boss_interrogator_vishasAI : public ScriptedAI @@ -67,6 +67,8 @@ public: void Reset() OVERRIDE { ShadowWordPain_Timer = 5000; + Yell60 = false; + Yell30 = false; } void EnterCombat(Unit* /*who*/) OVERRIDE @@ -81,9 +83,6 @@ public: void JustDied(Unit* /*killer*/) OVERRIDE { - if (!instance) - return; - //Any other Actions to do with vorrel? setStandState? if (Creature* vorrel = Creature::GetCreature(*me, instance->GetData64(DATA_VORREL))) vorrel->AI()->Talk(SAY_TRIGGER_VORREL); diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp index 6e71729ab50..0d62d47a5d6 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -65,7 +65,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_scarlet_commander_mograineAI(creature); + return GetInstanceAI<boss_scarlet_commander_mograineAI>(creature); } struct boss_scarlet_commander_mograineAI : public ScriptedAI @@ -94,9 +94,8 @@ public: me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); me->SetStandState(UNIT_STAND_STATE_STAND); - if (instance) - if (me->IsAlive()) - instance->SetData(TYPE_MOGRAINE_AND_WHITE_EVENT, NOT_STARTED); + if (me->IsAlive()) + instance->SetData(TYPE_MOGRAINE_AND_WHITE_EVENT, NOT_STARTED); _bHasDied = false; _bHeal = false; @@ -105,11 +104,8 @@ public: void JustReachedHome() OVERRIDE { - if (instance) - { - if (instance->GetData(TYPE_MOGRAINE_AND_WHITE_EVENT) != NOT_STARTED) - instance->SetData(TYPE_MOGRAINE_AND_WHITE_EVENT, FAIL); - } + if (instance->GetData(TYPE_MOGRAINE_AND_WHITE_EVENT) != NOT_STARTED) + instance->SetData(TYPE_MOGRAINE_AND_WHITE_EVENT, FAIL); } void EnterCombat(Unit* /*who*/) OVERRIDE @@ -130,9 +126,6 @@ public: if (damage < me->GetHealth() || _bHasDied || _bFakeDeath) return; - if (!instance) - return; - //On first death, fake death and open door, as well as initiate whitemane if exist if (Unit* Whitemane = Unit::GetUnit(*me, instance->GetData64(DATA_WHITEMANE))) { @@ -170,8 +163,7 @@ public: Talk(SAY_MO_RESSURECTED); _bFakeDeath = false; - if (instance) - instance->SetData(TYPE_MOGRAINE_AND_WHITE_EVENT, SPECIAL); + instance->SetData(TYPE_MOGRAINE_AND_WHITE_EVENT, SPECIAL); } } @@ -231,7 +223,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_high_inquisitor_whitemaneAI(creature); + return GetInstanceAI<boss_high_inquisitor_whitemaneAI>(creature); } struct boss_high_inquisitor_whitemaneAI : public ScriptedAI @@ -261,9 +253,8 @@ public: _bCanResurrectCheck = false; _bCanResurrect = false; - if (instance) - if (me->IsAlive()) - instance->SetData(TYPE_MOGRAINE_AND_WHITE_EVENT, NOT_STARTED); + if (me->IsAlive()) + instance->SetData(TYPE_MOGRAINE_AND_WHITE_EVENT, NOT_STARTED); } void AttackStart(Unit* who) OVERRIDE @@ -334,14 +325,11 @@ public: if (!HealthAbovePct(75)) target = me; - if (instance) + if (Creature* mograine = Unit::GetCreature((*me), instance->GetData64(DATA_MOGRAINE))) { - if (Creature* mograine = Unit::GetCreature((*me), instance->GetData64(DATA_MOGRAINE))) - { - // checking _bCanResurrectCheck prevents her healing Mograine while he is "faking death" - if (_bCanResurrectCheck && mograine->IsAlive() && !mograine->HealthAbovePct(75)) - target = mograine; - } + // checking _bCanResurrectCheck prevents her healing Mograine while he is "faking death" + if (_bCanResurrectCheck && mograine->IsAlive() && !mograine->HealthAbovePct(75)) + target = mograine; } if (target) diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_scorn.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_scorn.cpp index b2289f324f3..5215fbda633 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_scorn.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_scorn.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp index b91a54e5afc..4de9c2c80bf 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/scarlet_monastery.h b/src/server/scripts/EasternKingdoms/ScarletMonastery/scarlet_monastery.h index fbbca46738c..cd5a74ee478 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/scarlet_monastery.h +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/scarlet_monastery.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp index 2277c53ae6b..37484f1c210 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -128,7 +128,7 @@ class boss_darkmaster_gandling : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_darkmaster_gandlingAI(creature); + return GetInstanceAI<boss_darkmaster_gandlingAI>(creature); } }; diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_death_knight_darkreaver.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_death_knight_darkreaver.cpp index 108dcc92f22..d2e4601c244 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_death_knight_darkreaver.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_death_knight_darkreaver.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_doctor_theolen_krastinov.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_doctor_theolen_krastinov.cpp index bcf5e82bc66..931e21f98bf 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_doctor_theolen_krastinov.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_doctor_theolen_krastinov.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_illucia_barov.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_illucia_barov.cpp index c3255ba9c65..9d3c862a3ad 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_illucia_barov.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_illucia_barov.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_instructor_malicia.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_instructor_malicia.cpp index 0f3929bda36..6e0c2aab115 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_instructor_malicia.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_instructor_malicia.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_jandice_barov.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_jandice_barov.cpp index 2663146317a..448ceaa3371 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_jandice_barov.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_jandice_barov.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -32,7 +32,7 @@ enum Spells //SPELL_ILLUSION = 17773, // Spells of Illusion of Jandice Barov - SPELL_CLEAVE = 15584 + SPELL_CLEAVE = 15284 }; class boss_jandice_barov : public CreatureScript diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_kirtonos_the_herald.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_kirtonos_the_herald.cpp index 2433390f8f5..369ee3842d9 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_kirtonos_the_herald.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_kirtonos_the_herald.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -253,7 +253,7 @@ class boss_kirtonos_the_herald : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_kirtonos_the_heraldAI(creature); + return GetInstanceAI<boss_kirtonos_the_heraldAI>(creature); } }; diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_kormok.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_kormok.cpp index 57cfeb7dc33..334e7935183 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_kormok.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_kormok.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_lord_alexei_barov.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_lord_alexei_barov.cpp index 17524ddf2b2..c167f7d8641 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_lord_alexei_barov.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_lord_alexei_barov.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_lorekeeper_polkelt.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_lorekeeper_polkelt.cpp index f41f456d24a..2005ac58446 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_lorekeeper_polkelt.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_lorekeeper_polkelt.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_ras_frostwhisper.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_ras_frostwhisper.cpp index f93f0a94414..68d70e63ca6 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_ras_frostwhisper.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_ras_frostwhisper.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_the_ravenian.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_the_ravenian.cpp index 9af473d4b4c..3df675edd3e 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_the_ravenian.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_the_ravenian.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_vectus.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_vectus.cpp index 395581b3562..a91b1aef13c 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_vectus.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_vectus.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/Scholomance/instance_scholomance.cpp b/src/server/scripts/EasternKingdoms/Scholomance/instance_scholomance.cpp index ad0ae3998f1..a3d9ff4bb22 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/instance_scholomance.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/instance_scholomance.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/EasternKingdoms/Scholomance/scholomance.h b/src/server/scripts/EasternKingdoms/Scholomance/scholomance.h index 5c38cc39e3d..9eb7c5e8f86 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/scholomance.h +++ b/src/server/scripts/EasternKingdoms/Scholomance/scholomance.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp b/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp index 8c022c98ba7..6f0ea518fd2 100644 --- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp +++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp b/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp index 8d89592090e..eb7295f72d0 100644 --- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp +++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -72,7 +72,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_shadowfang_prisonerAI(creature); + return GetInstanceAI<npc_shadowfang_prisonerAI>(creature); } bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE @@ -135,8 +135,7 @@ public: else Talk(SAY_POST1_DOOR_AD); - if (instance) - instance->SetData(TYPE_FREE_NPC, DONE); + instance->SetData(TYPE_FREE_NPC, DONE); break; case 13: if (me->GetEntry() != NPC_ASH) @@ -158,7 +157,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_arugal_voidwalkerAI(creature); + return GetInstanceAI<npc_arugal_voidwalkerAI>(creature); } struct npc_arugal_voidwalkerAI : public ScriptedAI @@ -196,8 +195,7 @@ public: void JustDied(Unit* /*killer*/) OVERRIDE { - if (instance) - instance->SetData(TYPE_FENRUS, instance->GetData(TYPE_FENRUS) + 1); + instance->SetData(TYPE_FENRUS, instance->GetData(TYPE_FENRUS) + 1); } }; diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.h b/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.h index 1823d24ab2e..0b399dc4050 100644 --- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.h +++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_baron_rivendare.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_baron_rivendare.cpp index 16ec442d963..fe0e3a050c8 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_baron_rivendare.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_baron_rivendare.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -68,7 +68,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_baron_rivendareAI(creature); + return GetInstanceAI<boss_baron_rivendareAI>(creature); } struct boss_baron_rivendareAI : public ScriptedAI @@ -99,8 +99,8 @@ public: void AttackStart(Unit* who) OVERRIDE { - if (instance)//can't use entercombat(), boss' dmg aura sets near players in combat, before entering the room's door - instance->SetData(TYPE_BARON, IN_PROGRESS); + //can't use entercombat(), boss' dmg aura sets near players in combat, before entering the room's door + instance->SetData(TYPE_BARON, IN_PROGRESS); ScriptedAI::AttackStart(who); } @@ -110,11 +110,10 @@ public: summoned->AI()->AttackStart(target); } - void JustDied(Unit* /*killer*/) OVERRIDE - { - if (instance) - instance->SetData(TYPE_BARON, DONE); - } + void JustDied(Unit* /*killer*/) OVERRIDE + { + instance->SetData(TYPE_BARON, DONE); + } void UpdateAI(uint32 diff) OVERRIDE { diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_baroness_anastari.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_baroness_anastari.cpp index 1812e2efd8d..6a0794ec586 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_baroness_anastari.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_baroness_anastari.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -42,7 +42,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_baroness_anastariAI(creature); + return GetInstanceAI<boss_baroness_anastariAI>(creature); } struct boss_baroness_anastariAI : public ScriptedAI @@ -71,11 +71,10 @@ public: { } - void JustDied(Unit* /*killer*/) OVERRIDE - { - if (instance) - instance->SetData(TYPE_BARONESS, IN_PROGRESS); - } + void JustDied(Unit* /*killer*/) OVERRIDE + { + instance->SetData(TYPE_BARONESS, IN_PROGRESS); + } void UpdateAI(uint32 diff) OVERRIDE { diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_cannon_master_willey.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_cannon_master_willey.cpp index 42714c3f12e..dd5d2f7347c 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_cannon_master_willey.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_cannon_master_willey.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_dathrohan_balnazzar.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_dathrohan_balnazzar.cpp index 951cb8e2659..44e641bc9b8 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_dathrohan_balnazzar.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_dathrohan_balnazzar.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_magistrate_barthilas.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_magistrate_barthilas.cpp index 150d134da07..eb552c503eb 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_magistrate_barthilas.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_magistrate_barthilas.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_maleki_the_pallid.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_maleki_the_pallid.cpp index 0f8340891a8..ae07d5347b9 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_maleki_the_pallid.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_maleki_the_pallid.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -43,7 +43,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_maleki_the_pallidAI(creature); + return GetInstanceAI<boss_maleki_the_pallidAI>(creature); } struct boss_maleki_the_pallidAI : public ScriptedAI @@ -72,8 +72,7 @@ public: void JustDied(Unit* /*killer*/) OVERRIDE { - if (instance) - instance->SetData(TYPE_PALLID, IN_PROGRESS); + instance->SetData(TYPE_PALLID, IN_PROGRESS); } void UpdateAI(uint32 diff) OVERRIDE diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_nerubenkan.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_nerubenkan.cpp index 2cacf80e27c..9bc263f36e7 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_nerubenkan.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_nerubenkan.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -42,7 +42,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_nerubenkanAI(creature); + return GetInstanceAI<boss_nerubenkanAI>(creature); } struct boss_nerubenkanAI : public ScriptedAI @@ -73,8 +73,7 @@ public: void JustDied(Unit* /*killer*/) OVERRIDE { - if (instance) - instance->SetData(TYPE_NERUB, IN_PROGRESS); + instance->SetData(TYPE_NERUB, IN_PROGRESS); } void RaiseUndeadScarab(Unit* victim) diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_order_of_silver_hand.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_order_of_silver_hand.cpp index 706c2e7b6fb..c26754c483b 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_order_of_silver_hand.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_order_of_silver_hand.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -58,7 +58,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_silver_hand_bossesAI(creature); + return GetInstanceAI<boss_silver_hand_bossesAI>(creature); } struct boss_silver_hand_bossesAI : public ScriptedAI @@ -78,26 +78,23 @@ public: HolyLight_Timer = 20000; DivineShield_Timer = 20000; - if (instance) + switch (me->GetEntry()) { - switch (me->GetEntry()) - { - case SH_AELMAR: - instance->SetData(TYPE_SH_AELMAR, 0); - break; - case SH_CATHELA: - instance->SetData(TYPE_SH_CATHELA, 0); - break; - case SH_GREGOR: - instance->SetData(TYPE_SH_GREGOR, 0); - break; - case SH_NEMAS: - instance->SetData(TYPE_SH_NEMAS, 0); - break; - case SH_VICAR: - instance->SetData(TYPE_SH_VICAR, 0); - break; - } + case SH_AELMAR: + instance->SetData(TYPE_SH_AELMAR, 0); + break; + case SH_CATHELA: + instance->SetData(TYPE_SH_CATHELA, 0); + break; + case SH_GREGOR: + instance->SetData(TYPE_SH_GREGOR, 0); + break; + case SH_NEMAS: + instance->SetData(TYPE_SH_NEMAS, 0); + break; + case SH_VICAR: + instance->SetData(TYPE_SH_VICAR, 0); + break; } } @@ -107,9 +104,6 @@ public: void JustDied(Unit* killer) OVERRIDE { - if (!instance) - return; - switch (me->GetEntry()) { case SH_AELMAR: diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_postmaster_malown.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_postmaster_malown.cpp index b67c039ec74..1f6b823de70 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_postmaster_malown.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_postmaster_malown.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_ramstein_the_gorger.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_ramstein_the_gorger.cpp index 79b8dd7dfe2..ad4d8787f01 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_ramstein_the_gorger.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_ramstein_the_gorger.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -45,7 +45,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_ramstein_the_gorgerAI(creature); + return GetInstanceAI<boss_ramstein_the_gorgerAI>(creature); } struct boss_ramstein_the_gorgerAI : public ScriptedAI @@ -78,8 +78,7 @@ public: mob->AI()->AttackStart(me->SelectNearestTarget(100.0f)); } - if (instance) - instance->SetData(TYPE_RAMSTEIN, DONE); + instance->SetData(TYPE_RAMSTEIN, DONE); } void UpdateAI(uint32 diff) OVERRIDE diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_timmy_the_cruel.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_timmy_the_cruel.cpp index 6d4ba8a1631..f0e3bdf7668 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_timmy_the_cruel.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_timmy_the_cruel.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp b/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp index 732cdd0d4f4..d8518085b26 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp b/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp index 1b15f30353b..3b622885ce7 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/Stratholme/stratholme.h b/src/server/scripts/EasternKingdoms/Stratholme/stratholme.h index fc7630d7403..9e4c88f5856 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/stratholme.h +++ b/src/server/scripts/EasternKingdoms/Stratholme/stratholme.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/SunkenTemple/instance_sunken_temple.cpp b/src/server/scripts/EasternKingdoms/SunkenTemple/instance_sunken_temple.cpp index b2afee86774..d395bfd6e0c 100644 --- a/src/server/scripts/EasternKingdoms/SunkenTemple/instance_sunken_temple.cpp +++ b/src/server/scripts/EasternKingdoms/SunkenTemple/instance_sunken_temple.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.cpp b/src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.cpp index ac0c3a556f3..80a9f1600b6 100644 --- a/src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.cpp +++ b/src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.h b/src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.h index 57d073380bc..394b1e3e8ae 100644 --- a/src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.h +++ b/src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp index 5fc27b971a0..a52ddcea3b0 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp index d80196f79ee..73e218a6e35 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp index a52c008a16c..02913f361e5 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp index 28f4bae9f0f..294443da0e7 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -441,7 +441,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_kalecAI(creature); + return GetInstanceAI<boss_kalecAI>(creature); } struct boss_kalecAI : public ScriptedAI @@ -464,8 +464,7 @@ public: void Reset() OVERRIDE { - if (instance) - SathGUID = instance->GetData64(DATA_SATHROVARR); + SathGUID = instance->GetData64(DATA_SATHROVARR); RevitalizeTimer = 5000; HeroicStrikeTimer = 3000; @@ -575,7 +574,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_sathrovarrAI(creature); + return GetInstanceAI<boss_sathrovarrAI>(creature); } struct boss_sathrovarrAI : public ScriptedAI @@ -605,11 +604,8 @@ public: { me->SetFullHealth();//dunno why it does not resets health at evade.. me->setActive(true); - if (instance) - { - KalecgosGUID = instance->GetData64(DATA_KALECGOS_DRAGON); - instance->SetBossState(DATA_KALECGOS, NOT_STARTED); - } + KalecgosGUID = instance->GetData64(DATA_KALECGOS_DRAGON); + instance->SetBossState(DATA_KALECGOS, NOT_STARTED); if (KalecGUID) { if (Creature* Kalec = ObjectAccessor::GetCreature(*me, KalecGUID)) @@ -674,8 +670,7 @@ public: CAST_AI(boss_kalecgos::boss_kalecgosAI, Kalecgos->AI())->isFriendly = true; } - if (instance) - instance->SetBossState(DATA_KALECGOS, DONE); + instance->SetBossState(DATA_KALECGOS, DONE); } void TeleportAllPlayersBack() diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp index 5db7e182ea1..9d073cd7ef8 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -236,7 +236,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_kalecgos_kjAI(creature); + return GetInstanceAI<boss_kalecgos_kjAI>(creature); } struct boss_kalecgos_kjAI : public ScriptedAI @@ -265,9 +265,6 @@ public: GameObject* GetOrb(int32 index) { - if (!instance) - return NULL; - switch (index) { case 0: @@ -389,7 +386,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_kiljaeden_controllerAI(creature); + return GetInstanceAI<npc_kiljaeden_controllerAI>(creature); } struct npc_kiljaeden_controllerAI : public ScriptedAI @@ -424,9 +421,8 @@ public: { phase = PHASE_DECEIVERS; - if (instance) - if (Creature* pKalecKJ = ObjectAccessor::GetCreature((*me), instance->GetData64(DATA_KALECGOS_KJ))) - CAST_AI(boss_kalecgos_kj::boss_kalecgos_kjAI, pKalecKJ->AI())->ResetOrbs(); + if (Creature* pKalecKJ = ObjectAccessor::GetCreature((*me), instance->GetData64(DATA_KALECGOS_KJ))) + CAST_AI(boss_kalecgos_kj::boss_kalecgos_kjAI, pKalecKJ->AI())->ResetOrbs(); deceiverDeathCount = 0; bSummonedDeceivers = false; bKiljaedenDeath = false; @@ -927,9 +923,6 @@ public: void JustDied(Unit* /*killer*/) OVERRIDE { - if (!instance) - return; - if (Creature* pControl = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_KILJAEDEN_CONTROLLER))) ++(CAST_AI(npc_kiljaeden_controller::npc_kiljaeden_controllerAI, pControl->AI())->deceiverDeathCount); } @@ -1150,7 +1143,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_shield_orbAI(creature); + return GetInstanceAI<npc_shield_orbAI>(creature); } struct npc_shield_orbAI : public ScriptedAI diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp index 8da162bae14..426771e6db6 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -371,7 +371,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_muru_portalAI(creature); + return GetInstanceAI<npc_muru_portalAI>(creature); } struct npc_muru_portalAI : public ScriptedAI @@ -405,9 +405,8 @@ public: void JustSummoned(Creature* summoned) OVERRIDE { - if (instance) - if (Player* Target = ObjectAccessor::GetPlayer(*me, instance->GetData64(DATA_PLAYER_GUID))) - summoned->AI()->AttackStart(Target); + if (Player* Target = ObjectAccessor::GetPlayer(*me, instance->GetData64(DATA_PLAYER_GUID))) + summoned->AI()->AttackStart(Target); Summons.Summon(summoned); } @@ -571,7 +570,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_blackholeAI(creature); + return GetInstanceAI<npc_blackholeAI>(creature); } struct npc_blackholeAI : public ScriptedAI @@ -593,6 +592,7 @@ public: DespawnTimer = 15000; SpellTimer = 5000; Phase = 0; + NeedForAHack = 0; me->AddUnitState(UNIT_STATE_STUNNED); DoCastAOE(SPELL_BLACKHOLE_SPAWN, true); diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp index 4bc42921402..38f63d106ee 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/sunwell_plateau.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/sunwell_plateau.cpp index 4b190f04a70..69c48e40d88 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/sunwell_plateau.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/sunwell_plateau.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/sunwell_plateau.h b/src/server/scripts/EasternKingdoms/SunwellPlateau/sunwell_plateau.h index d2025a7b2b9..d32cdb037b2 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/sunwell_plateau.h +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/sunwell_plateau.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/EasternKingdoms/TheStockade/instance_the_stockade.cpp b/src/server/scripts/EasternKingdoms/TheStockade/instance_the_stockade.cpp index 50d4f0d1578..6d5d9ab4939 100644 --- a/src/server/scripts/EasternKingdoms/TheStockade/instance_the_stockade.cpp +++ b/src/server/scripts/EasternKingdoms/TheStockade/instance_the_stockade.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp b/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp index 69ee53f0762..496be57932e 100644 --- a/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp +++ b/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2007 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -86,8 +86,7 @@ class boss_archaedas : public CreatureScript bGuardiansAwake = false; bVaultWalkersAwake = false; - if (instance) - instance->SetData(0, 5); // respawn any dead minions + instance->SetData(0, 5); // respawn any dead minions me->setFaction(35); me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE); @@ -132,8 +131,6 @@ class boss_archaedas : public CreatureScript void UpdateAI(uint32 uiDiff) OVERRIDE { - if (!instance) - return; // we're still doing awaken animation if (bWakingUp && iAwakenTimer >= 0) { @@ -196,17 +193,14 @@ class boss_archaedas : public CreatureScript void JustDied (Unit* /*killer*/) { - if (instance) - { - instance->SetData(DATA_ANCIENT_DOOR, DONE); // open the vault door - instance->SetData(DATA_MINIONS, SPECIAL); // deactivate his minions - } + instance->SetData(DATA_ANCIENT_DOOR, DONE); // open the vault door + instance->SetData(DATA_MINIONS, SPECIAL); // deactivate his minions } }; CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_archaedasAI(creature); + return GetInstanceAI<boss_archaedasAI>(creature); } }; @@ -305,7 +299,7 @@ class npc_archaedas_minions : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_archaedas_minionsAI(creature); + return GetInstanceAI<npc_archaedas_minionsAI>(creature); } }; @@ -361,14 +355,13 @@ class npc_stonekeepers : public CreatureScript void JustDied(Unit* /*attacker*/) OVERRIDE { DoCast (me, SPELL_SELF_DESTRUCT, true); - if (instance) - instance->SetData(DATA_STONE_KEEPERS, IN_PROGRESS); // activate next stonekeeper + instance->SetData(DATA_STONE_KEEPERS, IN_PROGRESS); // activate next stonekeeper } }; CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_stonekeepersAI(creature); + return GetInstanceAI<npc_stonekeepersAI>(creature); } }; diff --git a/src/server/scripts/EasternKingdoms/Uldaman/boss_ironaya.cpp b/src/server/scripts/EasternKingdoms/Uldaman/boss_ironaya.cpp index 8ab31cc08fa..d883cc136eb 100644 --- a/src/server/scripts/EasternKingdoms/Uldaman/boss_ironaya.cpp +++ b/src/server/scripts/EasternKingdoms/Uldaman/boss_ironaya.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp b/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp index f221355b1c8..39e47d109c6 100644 --- a/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp +++ b/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2007 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/Uldaman/uldaman.cpp b/src/server/scripts/EasternKingdoms/Uldaman/uldaman.cpp index 1dfb48f746f..cd79f90cf58 100644 --- a/src/server/scripts/EasternKingdoms/Uldaman/uldaman.cpp +++ b/src/server/scripts/EasternKingdoms/Uldaman/uldaman.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/Uldaman/uldaman.h b/src/server/scripts/EasternKingdoms/Uldaman/uldaman.h index 15583312f5a..6f17fae0162 100644 --- a/src/server/scripts/EasternKingdoms/Uldaman/uldaman.h +++ b/src/server/scripts/EasternKingdoms/Uldaman/uldaman.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp index f436b3c89ab..eca840dbeb2 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -116,8 +116,7 @@ class boss_akilzon : public CreatureScript Talk(SAY_AGGRO); //DoZoneInCombat(); - if (instance) - instance->SetData(DATA_AKILZONEVENT, IN_PROGRESS); + instance->SetData(DATA_AKILZONEVENT, IN_PROGRESS); } void JustDied(Unit* /*killer*/) OVERRIDE @@ -229,10 +228,14 @@ class boss_akilzon : public CreatureScript case EVENT_STATIC_DISRUPTION: { Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1); - if (!target) target = me->GetVictim(); - TargetGUID = target->GetGUID(); - DoCast(target, SPELL_STATIC_DISRUPTION, false); - me->SetInFront(me->GetVictim()); + if (!target) + target = me->GetVictim(); + if (target) + { + TargetGUID = target->GetGUID(); + DoCast(target, SPELL_STATIC_DISRUPTION, false); + me->SetInFront(me->GetVictim()); + } /*if (float dist = me->IsWithinDist3d(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 5.0f) dist = 5.0f; SDisruptAOEVisual_Timer = 1000 + floor(dist / 30 * 1000.0f);*/ events.ScheduleEvent(EVENT_STATIC_DISRUPTION, urand(10000, 18000)); @@ -241,8 +244,10 @@ class boss_akilzon : public CreatureScript case EVENT_GUST_OF_WIND: { Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1); - if (!target) target = me->GetVictim(); - DoCast(target, SPELL_GUST_OF_WIND); + if (!target) + target = me->GetVictim(); + if (target) + DoCast(target, SPELL_GUST_OF_WIND); events.ScheduleEvent(EVENT_GUST_OF_WIND, urand(20000, 30000)); break; } @@ -363,7 +368,7 @@ class boss_akilzon : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_akilzonAI(creature); + return GetInstanceAI<boss_akilzonAI>(creature); } }; diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp index 594cc3d2918..4e354b47be5 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -111,8 +111,7 @@ class boss_halazzi : public CreatureScript void Reset() OVERRIDE { - if (instance) - instance->SetData(DATA_HALAZZIEVENT, NOT_STARTED); + instance->SetData(DATA_HALAZZIEVENT, NOT_STARTED); LynxGUID = 0; TransformCount = 0; @@ -127,8 +126,7 @@ class boss_halazzi : public CreatureScript void EnterCombat(Unit* /*who*/) OVERRIDE { - if (instance) - instance->SetData(DATA_HALAZZIEVENT, IN_PROGRESS); + instance->SetData(DATA_HALAZZIEVENT, IN_PROGRESS); me->MonsterYell(YELL_AGGRO, LANG_UNIVERSAL, NULL); DoPlaySoundToSet(me, SOUND_AGGRO); @@ -333,8 +331,7 @@ class boss_halazzi : public CreatureScript void JustDied(Unit* /*killer*/) OVERRIDE { - if (instance) - instance->SetData(DATA_HALAZZIEVENT, DONE); + instance->SetData(DATA_HALAZZIEVENT, DONE); me->MonsterYell(YELL_DEATH, LANG_UNIVERSAL, NULL); DoPlaySoundToSet(me, SOUND_DEATH); @@ -343,7 +340,7 @@ class boss_halazzi : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_halazziAI(creature); + return GetInstanceAI<boss_halazziAI>(creature); } }; diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp index 78c1395d82d..04e3d9f3450 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2007 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -278,8 +278,7 @@ class boss_hexlord_malacrass : public CreatureScript void Reset() OVERRIDE { - if (instance) - instance->SetData(DATA_HEXLORDEVENT, NOT_STARTED); + instance->SetData(DATA_HEXLORDEVENT, NOT_STARTED); SpiritBolts_Timer = 20000; DrainPower_Timer = 60000; @@ -296,8 +295,7 @@ class boss_hexlord_malacrass : public CreatureScript void EnterCombat(Unit* /*who*/) OVERRIDE { - if (instance) - instance->SetData(DATA_HEXLORDEVENT, IN_PROGRESS); + instance->SetData(DATA_HEXLORDEVENT, IN_PROGRESS); DoZoneInCombat(); me->MonsterYell(YELL_AGGRO, LANG_UNIVERSAL, NULL); @@ -333,8 +331,7 @@ class boss_hexlord_malacrass : public CreatureScript void JustDied(Unit* /*killer*/) OVERRIDE { - if (instance) - instance->SetData(DATA_HEXLORDEVENT, DONE); + instance->SetData(DATA_HEXLORDEVENT, DONE); me->MonsterYell(YELL_DEATH, LANG_UNIVERSAL, NULL); DoPlaySoundToSet(me, SOUND_YELL_DEATH); @@ -510,7 +507,7 @@ class boss_hexlord_malacrass : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_hex_lord_malacrassAI(creature); + return GetInstanceAI<boss_hex_lord_malacrassAI>(creature); } }; @@ -567,7 +564,7 @@ class boss_thurg : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_thurgAI(creature); + return GetInstanceAI<boss_thurgAI>(creature); } }; @@ -664,7 +661,7 @@ class boss_alyson_antille : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_alyson_antilleAI(creature); + return GetInstanceAI<boss_alyson_antilleAI>(creature); } }; @@ -757,7 +754,7 @@ class boss_lord_raadan : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_lord_raadanAI(creature); + return GetInstanceAI<boss_lord_raadanAI>(creature); } }; @@ -798,7 +795,7 @@ class boss_darkheart : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_darkheartAI(creature); + return GetInstanceAI<boss_darkheartAI>(creature); } }; @@ -857,7 +854,7 @@ class boss_slither : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_slitherAI(creature); + return GetInstanceAI<boss_slitherAI>(creature); } }; @@ -900,7 +897,7 @@ class boss_fenstalker : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_fenstalkerAI(creature); + return GetInstanceAI<boss_fenstalkerAI>(creature); } }; @@ -950,7 +947,7 @@ class boss_koragg : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_koraggAI(creature); + return GetInstanceAI<boss_koraggAI>(creature); } }; diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp index cc5acbf8ab3..caf54313fe7 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -143,8 +143,7 @@ class boss_janalai : public CreatureScript void Reset() OVERRIDE { - if (instance) - instance->SetData(DATA_JANALAIEVENT, NOT_STARTED); + instance->SetData(DATA_JANALAIEVENT, NOT_STARTED); FireBreathTimer = 8000; BombTimer = 30000; @@ -169,8 +168,7 @@ class boss_janalai : public CreatureScript { Talk(SAY_DEATH); - if (instance) - instance->SetData(DATA_JANALAIEVENT, DONE); + instance->SetData(DATA_JANALAIEVENT, DONE); } void KilledUnit(Unit* /*victim*/) OVERRIDE @@ -180,8 +178,7 @@ class boss_janalai : public CreatureScript void EnterCombat(Unit* /*who*/) OVERRIDE { - if (instance) - instance->SetData(DATA_JANALAIEVENT, IN_PROGRESS); + instance->SetData(DATA_JANALAIEVENT, IN_PROGRESS); Talk(SAY_AGGRO); // DoZoneInCombat(); @@ -442,7 +439,7 @@ class boss_janalai : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_janalaiAI(creature); + return GetInstanceAI<boss_janalaiAI>(creature); } }; @@ -612,7 +609,7 @@ class npc_janalai_hatcher : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_janalai_hatcherAI(creature); + return GetInstanceAI<npc_janalai_hatcherAI>(creature); } }; @@ -671,7 +668,7 @@ class npc_janalai_hatchling : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_janalai_hatchlingAI(creature); + return GetInstanceAI<npc_janalai_hatchlingAI>(creature); } }; diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp index 25fa16b974c..5bd78006f95 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -148,8 +148,7 @@ class boss_nalorakk : public CreatureScript (*me).GetMotionMaster()->MovePoint(0, NalorakkWay[7][0], NalorakkWay[7][1], NalorakkWay[7][2]); } - if (instance) - instance->SetData(DATA_NALORAKKEVENT, NOT_STARTED); + instance->SetData(DATA_NALORAKKEVENT, NOT_STARTED); Surge_Timer = urand(15000, 20000); BrutalSwipe_Timer = urand(7000, 12000); @@ -275,8 +274,7 @@ class boss_nalorakk : public CreatureScript void EnterCombat(Unit* /*who*/) OVERRIDE { - if (instance) - instance->SetData(DATA_NALORAKKEVENT, IN_PROGRESS); + instance->SetData(DATA_NALORAKKEVENT, IN_PROGRESS); me->MonsterYell(YELL_AGGRO, LANG_UNIVERSAL, NULL); DoPlaySoundToSet(me, SOUND_YELL_AGGRO); @@ -285,8 +283,7 @@ class boss_nalorakk : public CreatureScript void JustDied(Unit* /*killer*/) OVERRIDE { - if (instance) - instance->SetData(DATA_NALORAKKEVENT, DONE); + instance->SetData(DATA_NALORAKKEVENT, DONE); me->MonsterYell(YELL_DEATH, LANG_UNIVERSAL, NULL); DoPlaySoundToSet(me, SOUND_YELL_DEATH); @@ -453,7 +450,7 @@ class boss_nalorakk : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_nalorakkAI(creature); + return GetInstanceAI<boss_nalorakkAI>(creature); } }; diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp index ef47fa8877a..dbdc0b8e5c7 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -169,8 +169,7 @@ class boss_zuljin : public CreatureScript void Reset() OVERRIDE { - if (instance) - instance->SetData(DATA_ZULJINEVENT, NOT_STARTED); + instance->SetData(DATA_ZULJINEVENT, NOT_STARTED); Phase = 0; @@ -206,8 +205,7 @@ class boss_zuljin : public CreatureScript void EnterCombat(Unit* /*who*/) OVERRIDE { - if (instance) - instance->SetData(DATA_ZULJINEVENT, IN_PROGRESS); + instance->SetData(DATA_ZULJINEVENT, IN_PROGRESS); DoZoneInCombat(); @@ -226,8 +224,7 @@ class boss_zuljin : public CreatureScript void JustDied(Unit* /*killer*/) OVERRIDE { - if (instance) - instance->SetData(DATA_ZULJINEVENT, DONE); + instance->SetData(DATA_ZULJINEVENT, DONE); Talk(YELL_DEATH); Summons.DespawnEntry(CREATURE_COLUMN_OF_FIRE); @@ -555,7 +552,7 @@ class boss_zuljin : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_zuljinAI(creature); + return GetInstanceAI<boss_zuljinAI>(creature); } }; diff --git a/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp b/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp index 854679339c3..2347de4fa66 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp index a4176322288..e51bcfc70ba 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -74,33 +74,30 @@ class npc_forest_frog : public CreatureScript void DoSpawnRandom() { - if (instance) + uint32 cEntry = 0; + switch (rand()%10) { - uint32 cEntry = 0; - switch (rand()%10) - { - case 0: cEntry = 24397; break; //Mannuth - case 1: cEntry = 24403; break; //Deez - case 2: cEntry = 24404; break; //Galathryn - case 3: cEntry = 24405; break; //Adarrah - case 4: cEntry = 24406; break; //Fudgerick - case 5: cEntry = 24407; break; //Darwen - case 6: cEntry = 24445; break; //Mitzi - case 7: cEntry = 24448; break; //Christian - case 8: cEntry = 24453; break; //Brennan - case 9: cEntry = 24455; break; //Hollee - } + case 0: cEntry = 24397; break; //Mannuth + case 1: cEntry = 24403; break; //Deez + case 2: cEntry = 24404; break; //Galathryn + case 3: cEntry = 24405; break; //Adarrah + case 4: cEntry = 24406; break; //Fudgerick + case 5: cEntry = 24407; break; //Darwen + case 6: cEntry = 24445; break; //Mitzi + case 7: cEntry = 24448; break; //Christian + case 8: cEntry = 24453; break; //Brennan + case 9: cEntry = 24455; break; //Hollee + } - if (!instance->GetData(TYPE_RAND_VENDOR_1)) - if (rand()%10 == 1) cEntry = 24408; //Gunter - if (!instance->GetData(TYPE_RAND_VENDOR_2)) - if (rand()%10 == 1) cEntry = 24409; //Kyren + if (!instance->GetData(TYPE_RAND_VENDOR_1)) + if (rand()%10 == 1) cEntry = 24408; //Gunter + if (!instance->GetData(TYPE_RAND_VENDOR_2)) + if (rand()%10 == 1) cEntry = 24409; //Kyren - if (cEntry) me->UpdateEntry(cEntry); + if (cEntry) me->UpdateEntry(cEntry); - if (cEntry == 24408) instance->SetData(TYPE_RAND_VENDOR_1, DONE); - if (cEntry == 24409) instance->SetData(TYPE_RAND_VENDOR_2, DONE); - } + if (cEntry == 24408) instance->SetData(TYPE_RAND_VENDOR_1, DONE); + if (cEntry == 24409) instance->SetData(TYPE_RAND_VENDOR_2, DONE); } void SpellHit(Unit* caster, const SpellInfo* spell) OVERRIDE @@ -116,7 +113,7 @@ class npc_forest_frog : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_forest_frogAI(creature); + return GetInstanceAI<npc_forest_frogAI>(creature); } }; @@ -320,8 +317,7 @@ class npc_harrison_jones : public CreatureScript me->SetTarget(0); me->SetByteValue(UNIT_FIELD_BYTES_1, 0, UNIT_STAND_STATE_DEAD); me->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_DEAD); - if (instance) - instance->SetData(DATA_GONGEVENT, DONE); + instance->SetData(DATA_GONGEVENT, DONE); } } @@ -331,9 +327,6 @@ class npc_harrison_jones : public CreatureScript { if (_gongTimer <= diff) { - if (!instance) - return; - switch (_gongEvent) { case GONG_EVENT_1: @@ -460,7 +453,7 @@ class npc_harrison_jones : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_harrison_jonesAI(creature); + return GetInstanceAI<npc_harrison_jonesAI>(creature); } }; diff --git a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.h b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.h index c3386f8c996..4d5938d7253 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.h +++ b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp index 3b7d773b0eb..5b943fd57f2 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -96,30 +96,21 @@ class boss_arlokk : public CreatureScript void Reset() OVERRIDE { + if (events.IsInPhase(PHASE_TWO)) + me->HandleStatModifier(UNIT_MOD_DAMAGE_MAINHAND, TOTAL_PCT, 35.0f, false); // hack + _Reset(); _summonCountA = 0; _summonCountB = 0; - me->RemoveAllAuras(); me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 0, uint32(WEAPON_DAGGER)); me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 1, uint32(WEAPON_DAGGER)); - if (instance) - { - if (GameObject* gate = me->GetMap()->GetGameObject(instance->GetData64(GO_FORCEFIELD))) - gate->SetGoState(GO_STATE_READY); - me->SetWalk(false); - me->GetMotionMaster()->MovePoint(0, PosMoveOnSpawn[0]); - } + me->SetWalk(false); + me->GetMotionMaster()->MovePoint(0, PosMoveOnSpawn[0]); } void JustDied(Unit* /*killer*/) OVERRIDE { + _JustDied(); Talk(SAY_DEATH); - me->RemoveAllAuras(); - if (instance) - { - if (GameObject* gate = me->GetMap()->GetGameObject(instance->GetData64(GO_FORCEFIELD))) - gate->SetGoState(GO_STATE_ACTIVE); - instance->SetBossState(DATA_ARLOKK, DONE); - } } void EnterCombat(Unit* /*who*/) OVERRIDE @@ -127,8 +118,7 @@ class boss_arlokk : public CreatureScript _EnterCombat(); events.ScheduleEvent(EVENT_SHADOW_WORD_PAIN, urand(7000, 9000), 0, PHASE_ONE); events.ScheduleEvent(EVENT_GOUGE, urand(12000, 15000), 0, PHASE_ONE); - if (instance) - events.ScheduleEvent(EVENT_SUMMON_PROWLERS, 6000, 0, PHASE_ALL); + events.ScheduleEvent(EVENT_SUMMON_PROWLERS, 6000, 0, PHASE_ALL); events.ScheduleEvent(EVENT_MARK_OF_ARLOKK, urand(9000, 11000), 0, PHASE_ALL); events.ScheduleEvent(EVENT_TRANSFORM, urand(15000, 20000), 0, PHASE_ONE); Talk(SAY_AGGRO); @@ -161,14 +151,9 @@ class boss_arlokk : public CreatureScript void EnterEvadeMode() OVERRIDE { - if (instance) - { - if (GameObject* object = me->GetMap()->GetGameObject(instance->GetData64(GO_FORCEFIELD))) - object->SetGoState(GO_STATE_ACTIVE); - if (GameObject* object = me->GetMap()->GetGameObject(instance->GetData64(GO_GONG_OF_BETHEKK))) - object->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); - instance->SetBossState(DATA_ARLOKK, NOT_STARTED); - } + BossAI::EnterEvadeMode(); + if (GameObject* object = ObjectAccessor::GetGameObject(*me, instance->GetData64(GO_GONG_OF_BETHEKK))) + object->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); me->DespawnOrUnsummon(4000); } @@ -204,7 +189,7 @@ class boss_arlokk : public CreatureScript case EVENT_SUMMON_PROWLERS: if (_summonCountA < MAX_PROWLERS_PER_SIDE) { - if (Unit* trigger = me->GetUnit(*me, _triggersSideAGUID[urand(0, 4)])) + if (Unit* trigger = ObjectAccessor::GetUnit(*me, _triggersSideAGUID[urand(0, 4)])) { trigger->CastSpell(trigger, SPELL_SUMMON_PROWLER); ++_summonCountA; @@ -212,7 +197,7 @@ class boss_arlokk : public CreatureScript } if (_summonCountB < MAX_PROWLERS_PER_SIDE) { - if (Unit* trigger = me->GetUnit(*me, _triggersSideBGUID[urand(0, 4)])) + if (Unit* trigger = ObjectAccessor::GetUnit(*me, _triggersSideBGUID[urand(0, 4)])) { trigger->CastSpell(trigger, SPELL_SUMMON_PROWLER); ++_summonCountB; @@ -235,13 +220,15 @@ class boss_arlokk : public CreatureScript } case EVENT_TRANSFORM: { - DoCast(me, SPELL_PANTHER_TRANSFORM); + DoCast(me, SPELL_PANTHER_TRANSFORM); // SPELL_AURA_TRANSFORM me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 0, uint32(EQUIP_UNEQUIP)); me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 1, uint32(EQUIP_UNEQUIP)); + /* const CreatureTemplate* cinfo = me->GetCreatureTemplate(); me->SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, (cinfo->mindmg +((cinfo->mindmg/100) * 35))); me->SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, (cinfo->maxdmg +((cinfo->maxdmg/100) * 35))); me->UpdateDamagePhysical(BASE_ATTACK); + */ me->AttackStop(); DoResetThreat(); me->SetReactState(REACT_PASSIVE); @@ -254,8 +241,7 @@ class boss_arlokk : public CreatureScript case EVENT_VANISH: DoCast(me, SPELL_SUPER_INVIS); me->SetWalk(false); - if (instance) - me->GetMotionMaster()->MovePoint(0, frand(-11551.0f, -11508.0f), frand(-1638.0f, -1617.0f), me->GetPositionZ()); + me->GetMotionMaster()->MovePoint(0, frand(-11551.0f, -11508.0f), frand(-1638.0f, -1617.0f), me->GetPositionZ()); events.ScheduleEvent(EVENT_VANISH_2, 9000, 0, PHASE_ONE); break; case EVENT_VANISH_2: @@ -273,6 +259,7 @@ class boss_arlokk : public CreatureScript events.ScheduleEvent(EVENT_RAVAGE, urand(10000, 14000), 0, PHASE_TWO); events.ScheduleEvent(EVENT_TRANSFORM_BACK, urand(15000, 18000), 0, PHASE_TWO); events.SetPhase(PHASE_TWO); + me->HandleStatModifier(UNIT_MOD_DAMAGE_MAINHAND, TOTAL_PCT, 35.0f, true); // hack break; case EVENT_RAVAGE: DoCastVictim(SPELL_RAVAGE, true); @@ -280,14 +267,17 @@ class boss_arlokk : public CreatureScript break; case EVENT_TRANSFORM_BACK: { - me->RemoveAura(SPELL_PANTHER_TRANSFORM); + me->RemoveAura(SPELL_PANTHER_TRANSFORM); // SPELL_AURA_TRANSFORM DoCast(me, SPELL_VANISH_VISUAL); me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 0, uint32(WEAPON_DAGGER)); me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 1, uint32(WEAPON_DAGGER)); + /* const CreatureTemplate* cinfo = me->GetCreatureTemplate(); me->SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, (cinfo->mindmg)); me->SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, (cinfo->maxdmg)); me->UpdateDamagePhysical(BASE_ATTACK); + */ + me->HandleStatModifier(UNIT_MOD_DAMAGE_MAINHAND, TOTAL_PCT, 35.0f, false); // hack events.ScheduleEvent(EVENT_SHADOW_WORD_PAIN, urand(4000, 7000), 0, PHASE_ONE); events.ScheduleEvent(EVENT_GOUGE, urand(12000, 15000), 0, PHASE_ONE); events.ScheduleEvent(EVENT_TRANSFORM, urand(16000, 20000), 0, PHASE_ONE); diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_gahzranka.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_gahzranka.cpp index 017730f1186..ef188dd9261 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_gahzranka.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_gahzranka.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_grilek.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_grilek.cpp index 6d21e6015fe..120961a087e 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_grilek.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_grilek.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp index b25daf85a7c..84ebc313b12 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -169,7 +169,7 @@ class boss_hakkar : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_hakkarAI(creature); + return GetInstanceAI<boss_hakkarAI>(creature); } }; diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_hazzarah.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_hazzarah.cpp index f988a43f728..232c9059b47 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_hazzarah.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_hazzarah.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp index 50b7d277a70..e6ef90d1638 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -267,14 +267,11 @@ class npc_batrider : public CreatureScript //Check_Timer if (Check_Timer <= diff) { - if (instance) + if (instance->GetBossState(DATA_JEKLIK) == DONE) { - if (instance->GetBossState(DATA_JEKLIK) == DONE) - { - me->setDeathState(JUST_DIED); - me->RemoveCorpse(); - return; - } + me->setDeathState(JUST_DIED); + me->RemoveCorpse(); + return; } Check_Timer = 1000; @@ -286,7 +283,7 @@ class npc_batrider : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_batriderAI(creature); + return GetInstanceAI<npc_batriderAI>(creature); } }; diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp index 4a37f3cf597..b4ba1ef71fb 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -217,12 +217,9 @@ class npc_healing_ward : public CreatureScript //Heal_Timer if (Heal_Timer <= diff) { - if (instance) - { - Unit* pJindo = Unit::GetUnit(*me, instance->GetData64(DATA_JINDO)); - if (pJindo) - DoCast(pJindo, SPELL_HEAL); - } + Unit* pJindo = Unit::GetUnit(*me, instance->GetData64(DATA_JINDO)); + if (pJindo) + DoCast(pJindo, SPELL_HEAL); Heal_Timer = 3000; } else Heal_Timer -= diff; @@ -232,7 +229,7 @@ class npc_healing_ward : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_healing_wardAI(creature); + return GetInstanceAI<npc_healing_wardAI>(creature); } }; diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp index 121de7d9cf5..d307303f4f4 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -393,7 +393,7 @@ class npc_vilebranch_speaker : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_vilebranch_speakerAI(creature); + return GetInstanceAI<npc_vilebranch_speakerAI>(creature); } }; diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp index 3edbe6ff721..efd79d89a2b 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -64,11 +64,6 @@ enum Phases PHASE_THREE = 3 }; -enum ModelId -{ - MODEL_MARLI = 15220 -}; - class boss_marli : public CreatureScript { public: boss_marli() : CreatureScript("boss_marli") { } @@ -79,6 +74,8 @@ class boss_marli : public CreatureScript void Reset() OVERRIDE { + if (events.IsInPhase(PHASE_THREE)) + me->HandleStatModifier(UNIT_MOD_DAMAGE_MAINHAND, TOTAL_PCT, 35.0f, false); // hack _Reset(); } @@ -155,11 +152,14 @@ class boss_marli : public CreatureScript case EVENT_TRANSFORM: { Talk(SAY_TRANSFORM); - DoCast(me, SPELL_SPIDER_FORM); + DoCast(me, SPELL_SPIDER_FORM); // SPELL_AURA_TRANSFORM + /* CreatureTemplate const* cinfo = me->GetCreatureTemplate(); me->SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, (cinfo->mindmg +((cinfo->mindmg/100) * 35))); me->SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, (cinfo->maxdmg +((cinfo->maxdmg/100) * 35))); me->UpdateDamagePhysical(BASE_ATTACK); + */ + me->HandleStatModifier(UNIT_MOD_DAMAGE_MAINHAND, TOTAL_PCT, 35.0f, true); // hack DoCastVictim(SPELL_ENVOLWINGWEB); if (DoGetThreat(me->GetVictim())) DoModifyThreatPercent(me->GetVictim(), -100); @@ -188,11 +188,14 @@ class boss_marli : public CreatureScript } case EVENT_TRANSFORM_BACK: { - me->SetDisplayId(MODEL_MARLI); + me->RemoveAura(SPELL_SPIDER_FORM); + /* CreatureTemplate const* cinfo = me->GetCreatureTemplate(); me->SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, (cinfo->mindmg +((cinfo->mindmg/100) * 1))); me->SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, (cinfo->maxdmg +((cinfo->maxdmg/100) * 1))); me->UpdateDamagePhysical(BASE_ATTACK); + */ + me->HandleStatModifier(UNIT_MOD_DAMAGE_MAINHAND, TOTAL_PCT, 35.0f, false); // hack events.ScheduleEvent(EVENT_ASPECT_OF_MARLI, 12000, 0, PHASE_TWO); events.ScheduleEvent(EVENT_TRANSFORM, 45000, 0, PHASE_TWO); events.ScheduleEvent(EVENT_POISON_VOLLEY, 15000); diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_renataki.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_renataki.cpp index 581f1de5013..87a8e647f53 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_renataki.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_renataki.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp index d20414705cf..a70dd5e0a30 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -89,6 +89,8 @@ class boss_thekal : public CreatureScript void Reset() OVERRIDE { + if (events.IsInPhase(PHASE_TWO)) + me->HandleStatModifier(UNIT_MOD_DAMAGE_MAINHAND, TOTAL_PCT, 35.0f, false); // hack _Reset(); Enraged = false; WasDead = false; @@ -112,8 +114,7 @@ class boss_thekal : public CreatureScript void JustReachedHome() OVERRIDE { - if (instance) - instance->SetBossState(DATA_THEKAL, NOT_STARTED); + instance->SetBossState(DATA_THEKAL, NOT_STARTED); } void UpdateAI(uint32 diff) OVERRIDE @@ -142,15 +143,17 @@ class boss_thekal : public CreatureScript //Thekal will transform to Tiger if he died and was not resurrected after 10 seconds. if (WasDead) { - DoCast(me, SPELL_TIGER_FORM); + DoCast(me, SPELL_TIGER_FORM); // SPELL_AURA_TRANSFORM me->SetObjectScale(2.00f); me->SetStandState(UNIT_STAND_STATE_STAND); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - me->SetFullHealth(); + /* const CreatureTemplate* cinfo = me->GetCreatureTemplate(); me->SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, (cinfo->mindmg +((cinfo->mindmg/100) * 40))); me->SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, (cinfo->maxdmg +((cinfo->maxdmg/100) * 40))); me->UpdateDamagePhysical(BASE_ATTACK); + */ + me->HandleStatModifier(UNIT_MOD_DAMAGE_MAINHAND, TOTAL_PCT, 40.0f, true); // hack DoResetThreat(); events.ScheduleEvent(EVENT_FRENZY, 30000, 0, PHASE_TWO); // Phase 2 events.ScheduleEvent(EVENT_FORCEPUNCH, 4000, 0, PHASE_TWO); // Phase 2 @@ -165,32 +168,29 @@ class boss_thekal : public CreatureScript //Check_Timer for the death of LorKhan and Zath. if (!WasDead) { - if (instance) + if (instance->GetBossState(DATA_LORKHAN) == SPECIAL) { - if (instance->GetBossState(DATA_LORKHAN) == SPECIAL) + //Resurrect LorKhan + if (Unit* pLorKhan = Unit::GetUnit(*me, instance->GetData64(DATA_LORKHAN))) { - //Resurrect LorKhan - if (Unit* pLorKhan = Unit::GetUnit(*me, instance->GetData64(DATA_LORKHAN))) - { - pLorKhan->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); - pLorKhan->setFaction(14); - pLorKhan->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - pLorKhan->SetFullHealth(); - instance->SetData(DATA_LORKHAN, DONE); - } + pLorKhan->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); + pLorKhan->setFaction(14); + pLorKhan->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + pLorKhan->SetFullHealth(); + instance->SetData(DATA_LORKHAN, DONE); } + } - if (instance->GetBossState(DATA_ZATH) == SPECIAL) + if (instance->GetBossState(DATA_ZATH) == SPECIAL) + { + //Resurrect Zath + if (Unit* pZath = Unit::GetUnit(*me, instance->GetData64(DATA_ZATH))) { - //Resurrect Zath - if (Unit* pZath = Unit::GetUnit(*me, instance->GetData64(DATA_ZATH))) - { - pZath->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); - pZath->setFaction(14); - pZath->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - pZath->SetFullHealth(); - instance->SetBossState(DATA_ZATH, DONE); - } + pZath->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); + pZath->setFaction(14); + pZath->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + pZath->SetFullHealth(); + instance->SetBossState(DATA_ZATH, DONE); } } } @@ -240,8 +240,7 @@ class boss_thekal : public CreatureScript me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); me->SetStandState(UNIT_STAND_STATE_SLEEP); me->AttackStop(); - if (instance) - instance->SetBossState(DATA_THEKAL, SPECIAL); + instance->SetBossState(DATA_THEKAL, SPECIAL); WasDead=true; } } @@ -251,7 +250,7 @@ class boss_thekal : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_thekalAI(creature); + return GetInstanceAI<boss_thekalAI>(creature); } }; @@ -287,8 +286,7 @@ class npc_zealot_lorkhan : public CreatureScript FakeDeath = false; - if (instance) - instance->SetBossState(DATA_LORKHAN, NOT_STARTED); + instance->SetBossState(DATA_LORKHAN, NOT_STARTED); me->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); @@ -320,25 +318,22 @@ class npc_zealot_lorkhan : public CreatureScript //Casting Greaterheal to Thekal or Zath if they are in meele range. if (GreaterHeal_Timer <= diff) { - if (instance) - { - Unit* pThekal = Unit::GetUnit(*me, instance->GetData64(DATA_THEKAL)); - Unit* pZath = Unit::GetUnit(*me, instance->GetData64(DATA_ZATH)); + Unit* pThekal = Unit::GetUnit(*me, instance->GetData64(DATA_THEKAL)); + Unit* pZath = Unit::GetUnit(*me, instance->GetData64(DATA_ZATH)); - if (!pThekal || !pZath) - return; + if (!pThekal || !pZath) + return; - switch (urand(0, 1)) - { - case 0: - if (me->IsWithinMeleeRange(pThekal)) - DoCast(pThekal, SPELL_GREATERHEAL); - break; - case 1: - if (me->IsWithinMeleeRange(pZath)) - DoCast(pZath, SPELL_GREATERHEAL); - break; - } + switch (urand(0, 1)) + { + case 0: + if (me->IsWithinMeleeRange(pThekal)) + DoCast(pThekal, SPELL_GREATERHEAL); + break; + case 1: + if (me->IsWithinMeleeRange(pZath)) + DoCast(pZath, SPELL_GREATERHEAL); + break; } GreaterHeal_Timer = 15000+rand()%5000; @@ -354,30 +349,27 @@ class npc_zealot_lorkhan : public CreatureScript //Check_Timer for the death of LorKhan and Zath. if (!FakeDeath && Check_Timer <= diff) { - if (instance) + if (instance->GetBossState(DATA_THEKAL) == SPECIAL) { - if (instance->GetBossState(DATA_THEKAL) == SPECIAL) + //Resurrect Thekal + if (Unit* pThekal = Unit::GetUnit(*me, instance->GetData64(DATA_THEKAL))) { - //Resurrect Thekal - if (Unit* pThekal = Unit::GetUnit(*me, instance->GetData64(DATA_THEKAL))) - { - pThekal->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); - pThekal->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - pThekal->setFaction(14); - pThekal->SetFullHealth(); - } + pThekal->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); + pThekal->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + pThekal->setFaction(14); + pThekal->SetFullHealth(); } + } - if (instance->GetBossState(DATA_ZATH) == SPECIAL) + if (instance->GetBossState(DATA_ZATH) == SPECIAL) + { + //Resurrect Zath + if (Unit* pZath = Unit::GetUnit(*me, instance->GetData64(DATA_ZATH))) { - //Resurrect Zath - if (Unit* pZath = Unit::GetUnit(*me, instance->GetData64(DATA_ZATH))) - { - pZath->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); - pZath->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - pZath->setFaction(14); - pZath->SetFullHealth(); - } + pZath->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); + pZath->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + pZath->setFaction(14); + pZath->SetFullHealth(); } } @@ -394,8 +386,7 @@ class npc_zealot_lorkhan : public CreatureScript me->setFaction(35); me->AttackStop(); - if (instance) - instance->SetBossState(DATA_LORKHAN, SPECIAL); + instance->SetBossState(DATA_LORKHAN, SPECIAL); FakeDeath = true; } @@ -406,7 +397,7 @@ class npc_zealot_lorkhan : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_zealot_lorkhanAI(creature); + return GetInstanceAI<npc_zealot_lorkhanAI>(creature); } }; @@ -449,8 +440,7 @@ class npc_zealot_zath : public CreatureScript FakeDeath = false; - if (instance) - instance->SetBossState(DATA_ZATH, NOT_STARTED); + instance->SetBossState(DATA_ZATH, NOT_STARTED); me->SetStandState(UNIT_STAND_STATE_STAND); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); @@ -507,30 +497,27 @@ class npc_zealot_zath : public CreatureScript //Check_Timer for the death of LorKhan and Zath. if (!FakeDeath && Check_Timer <= diff) { - if (instance) + if (instance->GetBossState(DATA_LORKHAN) == SPECIAL) { - if (instance->GetBossState(DATA_LORKHAN) == SPECIAL) + //Resurrect LorKhan + if (Unit* pLorKhan = Unit::GetUnit(*me, instance->GetData64(DATA_LORKHAN))) { - //Resurrect LorKhan - if (Unit* pLorKhan = Unit::GetUnit(*me, instance->GetData64(DATA_LORKHAN))) - { - pLorKhan->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); - pLorKhan->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - pLorKhan->setFaction(14); - pLorKhan->SetFullHealth(); - } + pLorKhan->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); + pLorKhan->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + pLorKhan->setFaction(14); + pLorKhan->SetFullHealth(); } + } - if (instance->GetBossState(DATA_THEKAL) == SPECIAL) + if (instance->GetBossState(DATA_THEKAL) == SPECIAL) + { + //Resurrect Thekal + if (Unit* pThekal = Unit::GetUnit(*me, instance->GetData64(DATA_THEKAL))) { - //Resurrect Thekal - if (Unit* pThekal = Unit::GetUnit(*me, instance->GetData64(DATA_THEKAL))) - { - pThekal->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); - pThekal->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - pThekal->setFaction(14); - pThekal->SetFullHealth(); - } + pThekal->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); + pThekal->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + pThekal->setFaction(14); + pThekal->SetFullHealth(); } } @@ -547,8 +534,7 @@ class npc_zealot_zath : public CreatureScript me->setFaction(35); me->AttackStop(); - if (instance) - instance->SetBossState(DATA_ZATH, SPECIAL); + instance->SetBossState(DATA_ZATH, SPECIAL); FakeDeath = true; } @@ -559,7 +545,7 @@ class npc_zealot_zath : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_zealot_zathAI(creature); + return GetInstanceAI<npc_zealot_zathAI>(creature); } }; diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_venoxis.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_venoxis.cpp index 0d3548ae253..e131ed7ad12 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_venoxis.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_venoxis.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_wushoolay.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_wushoolay.cpp index 8778a306230..a4bd38b8fa7 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_wushoolay.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_wushoolay.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp index e9a2172040a..67d40abaea3 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -27,6 +27,12 @@ EndScriptData */ #include "InstanceScript.h" #include "zulgurub.h" +DoorData const doorData[] = +{ + { GO_FORCEFIELD, DATA_ARLOKK, DOOR_TYPE_ROOM, BOUNDARY_NONE }, + { 0, 0, DOOR_TYPE_ROOM, BOUNDARY_NONE } // END +}; + class instance_zulgurub : public InstanceMapScript { public: instance_zulgurub(): InstanceMapScript(ZGScriptName, 309) { } @@ -36,6 +42,7 @@ class instance_zulgurub : public InstanceMapScript instance_zulgurub_InstanceMapScript(Map* map) : InstanceScript(map) { SetBossNumber(EncounterCount); + LoadDoorData(doorData); } void Initialize() OVERRIDE @@ -46,7 +53,6 @@ class instance_zulgurub : public InstanceMapScript _jindoTheHexxerGUID = 0; _vilebranchSpeakerGUID = 0; _arlokkGUID = 0; - _goForcefieldGUID = 0; _goGongOfBethekkGUID = 0; } @@ -86,7 +92,7 @@ class instance_zulgurub : public InstanceMapScript switch (go->GetEntry()) { case GO_FORCEFIELD: - _goForcefieldGUID = go->GetGUID(); + AddDoor(go, true); break; case GO_GONG_OF_BETHEKK: _goGongOfBethekkGUID = go->GetGUID(); @@ -100,6 +106,18 @@ class instance_zulgurub : public InstanceMapScript } } + void OnGameObjectRemove(GameObject* go) OVERRIDE + { + switch (go->GetEntry()) + { + case GO_FORCEFIELD: + AddDoor(go, false); + break; + default: + break; + } + } + uint64 GetData64(uint32 uiData) const OVERRIDE { switch (uiData) @@ -119,9 +137,6 @@ class instance_zulgurub : public InstanceMapScript case NPC_ARLOKK: return _arlokkGUID; break; - case GO_FORCEFIELD: - return _goForcefieldGUID; - break; case GO_GONG_OF_BETHEKK: return _goGongOfBethekkGUID; break; @@ -181,7 +196,6 @@ class instance_zulgurub : public InstanceMapScript uint64 _jindoTheHexxerGUID; uint64 _vilebranchSpeakerGUID; uint64 _arlokkGUID; - uint64 _goForcefieldGUID; uint64 _goGongOfBethekkGUID; }; diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/zulgurub.h b/src/server/scripts/EasternKingdoms/ZulGurub/zulgurub.h index 77767153a96..c92e8b8724d 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/zulgurub.h +++ b/src/server/scripts/EasternKingdoms/ZulGurub/zulgurub.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/EasternKingdoms/boss_kruul.cpp b/src/server/scripts/EasternKingdoms/boss_kruul.cpp index 5ac197aa7db..faed1a3cc34 100644 --- a/src/server/scripts/EasternKingdoms/boss_kruul.cpp +++ b/src/server/scripts/EasternKingdoms/boss_kruul.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/zone_alterac_mountains.cpp b/src/server/scripts/EasternKingdoms/zone_alterac_mountains.cpp index 9b9af494554..3df4fddf69f 100644 --- a/src/server/scripts/EasternKingdoms/zone_alterac_mountains.cpp +++ b/src/server/scripts/EasternKingdoms/zone_alterac_mountains.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/zone_arathi_highlands.cpp b/src/server/scripts/EasternKingdoms/zone_arathi_highlands.cpp index f5fe9b4046c..7a2c1cb09db 100644 --- a/src/server/scripts/EasternKingdoms/zone_arathi_highlands.cpp +++ b/src/server/scripts/EasternKingdoms/zone_arathi_highlands.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/zone_blasted_lands.cpp b/src/server/scripts/EasternKingdoms/zone_blasted_lands.cpp index c212592d49b..3fcd3c093b7 100644 --- a/src/server/scripts/EasternKingdoms/zone_blasted_lands.cpp +++ b/src/server/scripts/EasternKingdoms/zone_blasted_lands.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/EasternKingdoms/zone_burning_steppes.cpp b/src/server/scripts/EasternKingdoms/zone_burning_steppes.cpp index c5e0c5a1391..b991ab3c7a2 100644 --- a/src/server/scripts/EasternKingdoms/zone_burning_steppes.cpp +++ b/src/server/scripts/EasternKingdoms/zone_burning_steppes.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/zone_duskwood.cpp b/src/server/scripts/EasternKingdoms/zone_duskwood.cpp index 7c9e33c98b7..0332727fa4c 100644 --- a/src/server/scripts/EasternKingdoms/zone_duskwood.cpp +++ b/src/server/scripts/EasternKingdoms/zone_duskwood.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/zone_eastern_plaguelands.cpp b/src/server/scripts/EasternKingdoms/zone_eastern_plaguelands.cpp index ed14875b36d..23b218897b7 100644 --- a/src/server/scripts/EasternKingdoms/zone_eastern_plaguelands.cpp +++ b/src/server/scripts/EasternKingdoms/zone_eastern_plaguelands.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/zone_eversong_woods.cpp b/src/server/scripts/EasternKingdoms/zone_eversong_woods.cpp index 6bc9aab3d6f..dcfa576e7fe 100644 --- a/src/server/scripts/EasternKingdoms/zone_eversong_woods.cpp +++ b/src/server/scripts/EasternKingdoms/zone_eversong_woods.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/zone_ghostlands.cpp b/src/server/scripts/EasternKingdoms/zone_ghostlands.cpp index 1d4769cd716..a4f75ea23d4 100644 --- a/src/server/scripts/EasternKingdoms/zone_ghostlands.cpp +++ b/src/server/scripts/EasternKingdoms/zone_ghostlands.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/zone_hinterlands.cpp b/src/server/scripts/EasternKingdoms/zone_hinterlands.cpp index 718e69f78f0..9db6a6b4d19 100644 --- a/src/server/scripts/EasternKingdoms/zone_hinterlands.cpp +++ b/src/server/scripts/EasternKingdoms/zone_hinterlands.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/zone_ironforge.cpp b/src/server/scripts/EasternKingdoms/zone_ironforge.cpp index 90271c5658c..e50bbb9f3e0 100644 --- a/src/server/scripts/EasternKingdoms/zone_ironforge.cpp +++ b/src/server/scripts/EasternKingdoms/zone_ironforge.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/EasternKingdoms/zone_isle_of_queldanas.cpp b/src/server/scripts/EasternKingdoms/zone_isle_of_queldanas.cpp index 50b230b836d..65c070ffcf1 100644 --- a/src/server/scripts/EasternKingdoms/zone_isle_of_queldanas.cpp +++ b/src/server/scripts/EasternKingdoms/zone_isle_of_queldanas.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/zone_loch_modan.cpp b/src/server/scripts/EasternKingdoms/zone_loch_modan.cpp index afdfa496f7c..af0ec5aa4f5 100644 --- a/src/server/scripts/EasternKingdoms/zone_loch_modan.cpp +++ b/src/server/scripts/EasternKingdoms/zone_loch_modan.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/zone_redridge_mountains.cpp b/src/server/scripts/EasternKingdoms/zone_redridge_mountains.cpp index 8369c3c5560..08028cc5872 100644 --- a/src/server/scripts/EasternKingdoms/zone_redridge_mountains.cpp +++ b/src/server/scripts/EasternKingdoms/zone_redridge_mountains.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp b/src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp index 37fd32566e1..b7ab4227e5e 100644 --- a/src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp +++ b/src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp b/src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp index e4eca2c387f..4bfbff50dd5 100644 --- a/src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp +++ b/src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/zone_stranglethorn_vale.cpp b/src/server/scripts/EasternKingdoms/zone_stranglethorn_vale.cpp index 91bf802abf7..6cfef015450 100644 --- a/src/server/scripts/EasternKingdoms/zone_stranglethorn_vale.cpp +++ b/src/server/scripts/EasternKingdoms/zone_stranglethorn_vale.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/zone_swamp_of_sorrows.cpp b/src/server/scripts/EasternKingdoms/zone_swamp_of_sorrows.cpp index 740200d3fdc..9232a7962e3 100644 --- a/src/server/scripts/EasternKingdoms/zone_swamp_of_sorrows.cpp +++ b/src/server/scripts/EasternKingdoms/zone_swamp_of_sorrows.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/zone_tirisfal_glades.cpp b/src/server/scripts/EasternKingdoms/zone_tirisfal_glades.cpp index 7cf7b69a0bc..925d0d73a70 100644 --- a/src/server/scripts/EasternKingdoms/zone_tirisfal_glades.cpp +++ b/src/server/scripts/EasternKingdoms/zone_tirisfal_glades.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/zone_undercity.cpp b/src/server/scripts/EasternKingdoms/zone_undercity.cpp index d205fe8cb40..652189a8eea 100644 --- a/src/server/scripts/EasternKingdoms/zone_undercity.cpp +++ b/src/server/scripts/EasternKingdoms/zone_undercity.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/zone_western_plaguelands.cpp b/src/server/scripts/EasternKingdoms/zone_western_plaguelands.cpp index f7577d49114..56961d2fb02 100644 --- a/src/server/scripts/EasternKingdoms/zone_western_plaguelands.cpp +++ b/src/server/scripts/EasternKingdoms/zone_western_plaguelands.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/zone_westfall.cpp b/src/server/scripts/EasternKingdoms/zone_westfall.cpp index 2dd5c1fbb3b..350ceead706 100644 --- a/src/server/scripts/EasternKingdoms/zone_westfall.cpp +++ b/src/server/scripts/EasternKingdoms/zone_westfall.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/EasternKingdoms/zone_wetlands.cpp b/src/server/scripts/EasternKingdoms/zone_wetlands.cpp index dc4154c3d3e..a7feb2b7c43 100644 --- a/src/server/scripts/EasternKingdoms/zone_wetlands.cpp +++ b/src/server/scripts/EasternKingdoms/zone_wetlands.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Events/CMakeLists.txt b/src/server/scripts/Events/CMakeLists.txt index 8f40bbd75a9..e45bc585007 100644 --- a/src/server/scripts/Events/CMakeLists.txt +++ b/src/server/scripts/Events/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> +# Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/src/server/scripts/Events/childrens_week.cpp b/src/server/scripts/Events/childrens_week.cpp index 75c5ef797e1..92e70cd028b 100644 --- a/src/server/scripts/Events/childrens_week.cpp +++ b/src/server/scripts/Events/childrens_week.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Examples/CMakeLists.txt b/src/server/scripts/Examples/CMakeLists.txt index f69182dd0f4..2688fe4174d 100644 --- a/src/server/scripts/Examples/CMakeLists.txt +++ b/src/server/scripts/Examples/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> +# Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/src/server/scripts/Examples/example_commandscript.cpp b/src/server/scripts/Examples/example_commandscript.cpp index 0c10cec5155..eb87a58be77 100644 --- a/src/server/scripts/Examples/example_commandscript.cpp +++ b/src/server/scripts/Examples/example_commandscript.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Examples/example_creature.cpp b/src/server/scripts/Examples/example_creature.cpp index 3a675389d1e..1ef0290af53 100644 --- a/src/server/scripts/Examples/example_creature.cpp +++ b/src/server/scripts/Examples/example_creature.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Examples/example_escort.cpp b/src/server/scripts/Examples/example_escort.cpp index e6afc690faf..57fe27ad041 100644 --- a/src/server/scripts/Examples/example_escort.cpp +++ b/src/server/scripts/Examples/example_escort.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Examples/example_gossip_codebox.cpp b/src/server/scripts/Examples/example_gossip_codebox.cpp index 90aae21f807..4ab39f429b1 100644 --- a/src/server/scripts/Examples/example_gossip_codebox.cpp +++ b/src/server/scripts/Examples/example_gossip_codebox.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Examples/example_misc.cpp b/src/server/scripts/Examples/example_misc.cpp index 980d52c729c..938a5f9e623 100644 --- a/src/server/scripts/Examples/example_misc.cpp +++ b/src/server/scripts/Examples/example_misc.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Examples/example_spell.cpp b/src/server/scripts/Examples/example_spell.cpp index af028d539f0..9bf91d08ac0 100644 --- a/src/server/scripts/Examples/example_spell.cpp +++ b/src/server/scripts/Examples/example_spell.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp b/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp index e74ed93bc66..c7ef191cf8f 100644 --- a/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp +++ b/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -73,7 +73,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_blackfathom_deeps_eventAI(creature); + return GetInstanceAI<npc_blackfathom_deeps_eventAI>(creature); } struct npc_blackfathom_deeps_eventAI : public ScriptedAI @@ -182,8 +182,7 @@ public: void JustDied(Unit* /*killer*/) OVERRIDE { if (me->IsSummon()) //we are not a normal spawn. - if (instance) - instance->SetData(DATA_EVENT, instance->GetData(DATA_EVENT) + 1); + instance->SetData(DATA_EVENT, instance->GetData(DATA_EVENT) + 1); } }; }; diff --git a/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.h b/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.h index 46deda8e4c8..07a388043a6 100644 --- a/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.h +++ b/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_aku_mai.cpp b/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_aku_mai.cpp index 579bb7a8e95..dfff92b8f05 100644 --- a/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_aku_mai.cpp +++ b/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_aku_mai.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_gelihast.cpp b/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_gelihast.cpp index 139eed963c1..8d2ced59276 100644 --- a/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_gelihast.cpp +++ b/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_gelihast.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -31,7 +31,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_gelihastAI(creature); + return GetInstanceAI<boss_gelihastAI>(creature); } struct boss_gelihastAI : public ScriptedAI @@ -48,20 +48,17 @@ public: void Reset() OVERRIDE { netTimer = urand(2000, 4000); - if (instance) - instance->SetData(TYPE_GELIHAST, NOT_STARTED); + instance->SetData(TYPE_GELIHAST, NOT_STARTED); } void EnterCombat(Unit* /*who*/) OVERRIDE { - if (instance) - instance->SetData(TYPE_GELIHAST, IN_PROGRESS); + instance->SetData(TYPE_GELIHAST, IN_PROGRESS); } void JustDied(Unit* /*killer*/) OVERRIDE { - if (instance) - instance->SetData(TYPE_GELIHAST, DONE); + instance->SetData(TYPE_GELIHAST, DONE); } void UpdateAI(uint32 diff) OVERRIDE diff --git a/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_kelris.cpp b/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_kelris.cpp index 8eeedb6e15f..3ded27bd42a 100644 --- a/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_kelris.cpp +++ b/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_kelris.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -36,7 +36,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_kelrisAI(creature); + return GetInstanceAI<boss_kelrisAI>(creature); } struct boss_kelrisAI : public ScriptedAI @@ -55,22 +55,19 @@ public: { mindBlastTimer = urand(2000, 5000); sleepTimer = urand(9000, 12000); - if (instance) - instance->SetData(TYPE_KELRIS, NOT_STARTED); + instance->SetData(TYPE_KELRIS, NOT_STARTED); } void EnterCombat(Unit* /*who*/) OVERRIDE { Talk(SAY_AGGRO); - if (instance) - instance->SetData(TYPE_KELRIS, IN_PROGRESS); + instance->SetData(TYPE_KELRIS, IN_PROGRESS); } void JustDied(Unit* /*killer*/) OVERRIDE { Talk(SAY_DEATH); - if (instance) - instance->SetData(TYPE_KELRIS, DONE); + instance->SetData(TYPE_KELRIS, DONE); } void UpdateAI(uint32 diff) OVERRIDE diff --git a/src/server/scripts/Kalimdor/BlackfathomDeeps/instance_blackfathom_deeps.cpp b/src/server/scripts/Kalimdor/BlackfathomDeeps/instance_blackfathom_deeps.cpp index b1d3dba105e..2c9c94d9724 100644 --- a/src/server/scripts/Kalimdor/BlackfathomDeeps/instance_blackfathom_deeps.cpp +++ b/src/server/scripts/Kalimdor/BlackfathomDeeps/instance_blackfathom_deeps.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/CMakeLists.txt b/src/server/scripts/Kalimdor/CMakeLists.txt index c02e896a87d..1adc8a53271 100644 --- a/src/server/scripts/Kalimdor/CMakeLists.txt +++ b/src/server/scripts/Kalimdor/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> +# Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp index d61fbc153e9..a4f9a364684 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -47,7 +47,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_anetheronAI(creature); + return GetInstanceAI<boss_anetheronAI>(creature); } struct boss_anetheronAI : public hyjal_trashAI @@ -116,19 +116,16 @@ public: if (!go) { go = true; - if (instance) - { - AddWaypoint(0, 4896.08f, -1576.35f, 1333.65f); - AddWaypoint(1, 4898.68f, -1615.02f, 1329.48f); - AddWaypoint(2, 4907.12f, -1667.08f, 1321.00f); - AddWaypoint(3, 4963.18f, -1699.35f, 1340.51f); - AddWaypoint(4, 4989.16f, -1716.67f, 1335.74f); - AddWaypoint(5, 5026.27f, -1736.89f, 1323.02f); - AddWaypoint(6, 5037.77f, -1770.56f, 1324.36f); - AddWaypoint(7, 5067.23f, -1789.95f, 1321.17f); - Start(false, true); - SetDespawnAtEnd(false); - } + AddWaypoint(0, 4896.08f, -1576.35f, 1333.65f); + AddWaypoint(1, 4898.68f, -1615.02f, 1329.48f); + AddWaypoint(2, 4907.12f, -1667.08f, 1321.00f); + AddWaypoint(3, 4963.18f, -1699.35f, 1340.51f); + AddWaypoint(4, 4989.16f, -1716.67f, 1335.74f); + AddWaypoint(5, 5026.27f, -1736.89f, 1323.02f); + AddWaypoint(6, 5037.77f, -1770.56f, 1324.36f); + AddWaypoint(7, 5067.23f, -1789.95f, 1321.17f); + Start(false, true); + SetDespawnAtEnd(false); } } @@ -180,17 +177,15 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_towering_infernalAI(creature); + return GetInstanceAI<npc_towering_infernalAI>(creature); } struct npc_towering_infernalAI : public ScriptedAI { npc_towering_infernalAI(Creature* creature) : ScriptedAI(creature) { - AnetheronGUID = 0; instance = creature->GetInstanceScript(); - if (instance) - AnetheronGUID = instance->GetData64(DATA_ANETHERON); + AnetheronGUID = instance->GetData64(DATA_ANETHERON); } uint32 ImmolationTimer; diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp index 41cc1d0241d..4fa9af466b1 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -83,7 +83,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_ancient_wispAI(creature); + return GetInstanceAI<npc_ancient_wispAI>(creature); } struct npc_ancient_wispAI : public ScriptedAI @@ -102,8 +102,7 @@ public: { CheckTimer = 1000; - if (instance) - ArchimondeGUID = instance->GetData64(DATA_ARCHIMONDE); + ArchimondeGUID = instance->GetData64(DATA_ARCHIMONDE); me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); } @@ -239,7 +238,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_archimondeAI(creature); + return GetInstanceAI<boss_archimondeAI>(creature); } struct boss_archimondeAI : public hyjal_trashAI @@ -275,8 +274,7 @@ public: void Reset() OVERRIDE { - if (instance) - instance->SetData(DATA_ARCHIMONDEEVENT, NOT_STARTED); + instance->SetData(DATA_ARCHIMONDEEVENT, NOT_STARTED); DoomfireSpiritGUID = 0; damageTaken = 0; @@ -308,8 +306,7 @@ public: Talk(SAY_AGGRO); DoZoneInCombat(); - if (instance) - instance->SetData(DATA_ARCHIMONDEEVENT, IN_PROGRESS); + instance->SetData(DATA_ARCHIMONDEEVENT, IN_PROGRESS); } void KilledUnit(Unit* victim) OVERRIDE @@ -350,8 +347,7 @@ public: hyjal_trashAI::JustDied(killer); Talk(SAY_DEATH); - if (instance) - instance->SetData(DATA_ARCHIMONDEEVENT, DONE); + instance->SetData(DATA_ARCHIMONDEEVENT, DONE); } bool CanUseFingerOfDeath() @@ -471,19 +467,16 @@ public: { if (!me->IsInCombat()) { - if (instance) + // Do not let the raid skip straight to Archimonde. Visible and hostile ONLY if Azagalor is finished. + if ((instance->GetData(DATA_AZGALOREVENT) < DONE) && (me->IsVisible() || (me->getFaction() != 35))) { - // Do not let the raid skip straight to Archimonde. Visible and hostile ONLY if Azagalor is finished. - if ((instance->GetData(DATA_AZGALOREVENT) < DONE) && (me->IsVisible() || (me->getFaction() != 35))) - { - me->SetVisible(false); - me->setFaction(35); - } - else if ((instance->GetData(DATA_AZGALOREVENT) >= DONE) && (!me->IsVisible() || (me->getFaction() == 35))) - { - me->setFaction(1720); - me->SetVisible(true); - } + me->SetVisible(false); + me->setFaction(35); + } + else if ((instance->GetData(DATA_AZGALOREVENT) >= DONE) && (!me->IsVisible() || (me->getFaction() == 35))) + { + me->setFaction(1720); + me->SetVisible(true); } if (DrainNordrassilTimer <= diff) diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp index dd486df16ed..6d296945659 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -48,7 +48,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_azgalorAI(creature); + return GetInstanceAI<boss_azgalorAI>(creature); } struct boss_azgalorAI : public hyjal_trashAI @@ -121,19 +121,16 @@ public: if (!go) { go = true; - if (instance) - { - AddWaypoint(0, 5492.91f, -2404.61f, 1462.63f); - AddWaypoint(1, 5531.76f, -2460.87f, 1469.55f); - AddWaypoint(2, 5554.58f, -2514.66f, 1476.12f); - AddWaypoint(3, 5554.16f, -2567.23f, 1479.90f); - AddWaypoint(4, 5540.67f, -2625.99f, 1480.89f); - AddWaypoint(5, 5508.16f, -2659.2f, 1480.15f); - AddWaypoint(6, 5489.62f, -2704.05f, 1482.18f); - AddWaypoint(7, 5457.04f, -2726.26f, 1485.10f); - Start(false, true); - SetDespawnAtEnd(false); - } + AddWaypoint(0, 5492.91f, -2404.61f, 1462.63f); + AddWaypoint(1, 5531.76f, -2460.87f, 1469.55f); + AddWaypoint(2, 5554.58f, -2514.66f, 1476.12f); + AddWaypoint(3, 5554.16f, -2567.23f, 1479.90f); + AddWaypoint(4, 5540.67f, -2625.99f, 1480.89f); + AddWaypoint(5, 5508.16f, -2659.2f, 1480.15f); + AddWaypoint(6, 5489.62f, -2704.05f, 1482.18f); + AddWaypoint(7, 5457.04f, -2726.26f, 1485.10f); + Start(false, true); + SetDespawnAtEnd(false); } } @@ -186,17 +183,15 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_lesser_doomguardAI(creature); + return GetInstanceAI<npc_lesser_doomguardAI>(creature); } struct npc_lesser_doomguardAI : public hyjal_trashAI { npc_lesser_doomguardAI(Creature* creature) : hyjal_trashAI(creature) { - AzgalorGUID = 0; instance = creature->GetInstanceScript(); - if (instance) - AzgalorGUID = instance->GetData64(DATA_AZGALOR); + AzgalorGUID = instance->GetData64(DATA_AZGALOR); } uint32 CrippleTimer; diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_kazrogal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_kazrogal.cpp index 66e276d25b6..7a5870809f7 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_kazrogal.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_kazrogal.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -49,7 +49,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_kazrogalAI(creature); + return GetInstanceAI<boss_kazrogalAI>(creature); } struct boss_kazrogalAI : public hyjal_trashAI @@ -117,19 +117,16 @@ public: if (!go) { go = true; - if (instance) - { - AddWaypoint(0, 5492.91f, -2404.61f, 1462.63f); - AddWaypoint(1, 5531.76f, -2460.87f, 1469.55f); - AddWaypoint(2, 5554.58f, -2514.66f, 1476.12f); - AddWaypoint(3, 5554.16f, -2567.23f, 1479.90f); - AddWaypoint(4, 5540.67f, -2625.99f, 1480.89f); - AddWaypoint(5, 5508.16f, -2659.2f, 1480.15f); - AddWaypoint(6, 5489.62f, -2704.05f, 1482.18f); - AddWaypoint(7, 5457.04f, -2726.26f, 1485.10f); - Start(false, true); - SetDespawnAtEnd(false); - } + AddWaypoint(0, 5492.91f, -2404.61f, 1462.63f); + AddWaypoint(1, 5531.76f, -2460.87f, 1469.55f); + AddWaypoint(2, 5554.58f, -2514.66f, 1476.12f); + AddWaypoint(3, 5554.16f, -2567.23f, 1479.90f); + AddWaypoint(4, 5540.67f, -2625.99f, 1480.89f); + AddWaypoint(5, 5508.16f, -2659.2f, 1480.15f); + AddWaypoint(6, 5489.62f, -2704.05f, 1482.18f); + AddWaypoint(7, 5457.04f, -2726.26f, 1485.10f); + Start(false, true); + SetDespawnAtEnd(false); } } diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_rage_winterchill.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_rage_winterchill.cpp index c163e7c0f1f..4d6a94b6e73 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_rage_winterchill.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_rage_winterchill.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -44,7 +44,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_rage_winterchillAI(creature); + return GetInstanceAI<boss_rage_winterchillAI>(creature); } struct boss_rage_winterchillAI : public hyjal_trashAI @@ -112,19 +112,16 @@ public: if (!go) { go = true; - if (instance) - { - AddWaypoint(0, 4896.08f, -1576.35f, 1333.65f); - AddWaypoint(1, 4898.68f, -1615.02f, 1329.48f); - AddWaypoint(2, 4907.12f, -1667.08f, 1321.00f); - AddWaypoint(3, 4963.18f, -1699.35f, 1340.51f); - AddWaypoint(4, 4989.16f, -1716.67f, 1335.74f); - AddWaypoint(5, 5026.27f, -1736.89f, 1323.02f); - AddWaypoint(6, 5037.77f, -1770.56f, 1324.36f); - AddWaypoint(7, 5067.23f, -1789.95f, 1321.17f); - Start(false, true); - SetDespawnAtEnd(false); - } + AddWaypoint(0, 4896.08f, -1576.35f, 1333.65f); + AddWaypoint(1, 4898.68f, -1615.02f, 1329.48f); + AddWaypoint(2, 4907.12f, -1667.08f, 1321.00f); + AddWaypoint(3, 4963.18f, -1699.35f, 1340.51f); + AddWaypoint(4, 4989.16f, -1716.67f, 1335.74f); + AddWaypoint(5, 5026.27f, -1736.89f, 1323.02f); + AddWaypoint(6, 5037.77f, -1770.56f, 1324.36f); + AddWaypoint(7, 5067.23f, -1789.95f, 1321.17f); + Start(false, true); + SetDespawnAtEnd(false); } } diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.cpp index f4d3f559585..4419973902a 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -102,6 +102,9 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { + if (!creature->GetInstanceScript()) + return NULL; + hyjalAI* ai = new hyjalAI(creature); ai->Reset(); @@ -184,6 +187,9 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { + if (!creature->GetInstanceScript()) + return NULL; + hyjalAI* ai = new hyjalAI(creature); ai->Reset(); @@ -209,6 +215,9 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { + if (!creature->GetInstanceScript()) + return NULL; + hyjalAI* ai = new hyjalAI(creature); ai->Reset(); ai->EnterEvadeMode(); diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.h b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.h index 1f510ebec73..7ea09d2cda1 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.h +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp index 0b84911bb96..3b3cacf7d3f 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -397,17 +397,14 @@ void hyjalAI::Reset() memset(Spells, 0, sizeof(Spell) * HYJAL_AI_MAX_SPELLS); //Reset Instance Data for trash count - if (instance) + if ((!instance->GetData(DATA_ALLIANCE_RETREAT) && me->GetEntry() == JAINA) || (instance->GetData(DATA_ALLIANCE_RETREAT) && me->GetEntry() == THRALL)) { - if ((!instance->GetData(DATA_ALLIANCE_RETREAT) && me->GetEntry() == JAINA) || (instance->GetData(DATA_ALLIANCE_RETREAT) && me->GetEntry() == THRALL)) - { - //Reset World States - instance->DoUpdateWorldState(WORLD_STATE_WAVES, 0); - instance->DoUpdateWorldState(WORLD_STATE_ENEMY, 0); - instance->DoUpdateWorldState(WORLD_STATE_ENEMYCOUNT, 0); - instance->SetData(DATA_RESET_TRASH_COUNT, 0); - } - } else TC_LOG_ERROR("scripts", ERROR_INST_DATA); + //Reset World States + instance->DoUpdateWorldState(WORLD_STATE_WAVES, 0); + instance->DoUpdateWorldState(WORLD_STATE_ENEMY, 0); + instance->DoUpdateWorldState(WORLD_STATE_ENEMYCOUNT, 0); + instance->SetData(DATA_RESET_TRASH_COUNT, 0); + } //Visibility DoHide = true; @@ -517,11 +514,8 @@ void hyjalAI::SummonCreature(uint32 entry, float Base[4][3]) CAST_AI(hyjal_trashAI, creature->AI())->IsEvent = true; break; } - if (instance) - { - if (instance->GetData(DATA_RAIDDAMAGE) < MINRAIDDAMAGE) - creature->SetDisableReputationGain(true);//no repu for solo farming - } + if (instance->GetData(DATA_RAIDDAMAGE) < MINRAIDDAMAGE) + creature->SetDisableReputationGain(true);//no repu for solo farming // Check if Creature is a boss. if (creature->isWorldBoss()) { @@ -538,11 +532,6 @@ void hyjalAI::SummonNextWave(const Wave wave[18], uint32 Count, float Base[4][3] if (rand()%4 == 0) Talk(RALLY); - if (!instance) - { - TC_LOG_ERROR("scripts", ERROR_INST_DATA); - return; - } InfernalCount = 0;//reset infernal count every new wave EnemyCount = instance->GetData(DATA_TRASH); @@ -612,41 +601,34 @@ void hyjalAI::StartEvent(Player* player) uint32 hyjalAI::GetInstanceData(uint32 Event) { - if (instance) - return instance->GetData(Event); - else TC_LOG_ERROR("scripts", ERROR_INST_DATA); - - return 0; + return instance->GetData(Event); } void hyjalAI::Retreat() { - if (instance) - { - instance->SetData(TYPE_RETREAT, SPECIAL); + instance->SetData(TYPE_RETREAT, SPECIAL); - if (Faction == 0) - { - instance->SetData(DATA_ALLIANCE_RETREAT, 1); - AddWaypoint(0, JainaWPs[0][0], JainaWPs[0][1], JainaWPs[0][2]); - AddWaypoint(1, JainaWPs[1][0], JainaWPs[1][1], JainaWPs[1][2]); - Start(false, false); - SetDespawnAtEnd(false);//move to center of alliance base - } - if (Faction == 1) + if (Faction == 0) + { + instance->SetData(DATA_ALLIANCE_RETREAT, 1); + AddWaypoint(0, JainaWPs[0][0], JainaWPs[0][1], JainaWPs[0][2]); + AddWaypoint(1, JainaWPs[1][0], JainaWPs[1][1], JainaWPs[1][2]); + Start(false, false); + SetDespawnAtEnd(false);//move to center of alliance base + } + if (Faction == 1) + { + instance->SetData(DATA_HORDE_RETREAT, 1); + Creature* JainaDummy = me->SummonCreature(JAINA, JainaDummySpawn[0][0], JainaDummySpawn[0][1], JainaDummySpawn[0][2], JainaDummySpawn[0][3], TEMPSUMMON_TIMED_DESPAWN, 60000); + if (JainaDummy) { - instance->SetData(DATA_HORDE_RETREAT, 1); - Creature* JainaDummy = me->SummonCreature(JAINA, JainaDummySpawn[0][0], JainaDummySpawn[0][1], JainaDummySpawn[0][2], JainaDummySpawn[0][3], TEMPSUMMON_TIMED_DESPAWN, 60000); - if (JainaDummy) - { - JainaDummy->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); - CAST_AI(hyjalAI, JainaDummy->AI())->IsDummy = true; - DummyGuid = JainaDummy->GetGUID(); - } - AddWaypoint(0, JainaDummySpawn[1][0], JainaDummySpawn[1][1], JainaDummySpawn[1][2]); - Start(false, false); - SetDespawnAtEnd(false);//move to center of alliance base + JainaDummy->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + CAST_AI(hyjalAI, JainaDummy->AI())->IsDummy = true; + DummyGuid = JainaDummy->GetGUID(); } + AddWaypoint(0, JainaDummySpawn[1][0], JainaDummySpawn[1][1], JainaDummySpawn[1][2]); + Start(false, false); + SetDespawnAtEnd(false);//move to center of alliance base } SpawnVeins(); Overrun = true; @@ -681,8 +663,6 @@ void hyjalAI::SpawnVeins() void hyjalAI::DeSpawnVeins() { - if (!instance) - return; if (Faction == 1) { Creature* unit=Unit::GetCreature((*me), instance->GetData64(DATA_JAINAPROUDMOORE)); @@ -841,8 +821,7 @@ void hyjalAI::UpdateAI(uint32 diff) CheckTimer = 0; me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); BossGUID[i] = 0; - if (instance) - instance->DoUpdateWorldState(WORLD_STATE_ENEMY, 0); // Reset world state for enemies to disable it + instance->DoUpdateWorldState(WORLD_STATE_ENEMY, 0); // Reset world state for enemies to disable it } } } @@ -899,18 +878,16 @@ void hyjalAI::JustDied(Unit* /*killer*/) RespawnTimer = 120000; Talk(DEATH); Summons.DespawnAll();//despawn all wave's summons - if (instance) - {//reset encounter if boss is despawned (ex: thrall is killed, boss despawns, event stucks at inprogress) - if (instance->GetData(DATA_RAGEWINTERCHILLEVENT) == IN_PROGRESS) - instance->SetData(DATA_RAGEWINTERCHILLEVENT, NOT_STARTED); - if (instance->GetData(DATA_ANETHERONEVENT) == IN_PROGRESS) - instance->SetData(DATA_ANETHERONEVENT, NOT_STARTED); - if (instance->GetData(DATA_KAZROGALEVENT) == IN_PROGRESS) - instance->SetData(DATA_KAZROGALEVENT, NOT_STARTED); - if (instance->GetData(DATA_AZGALOREVENT) == IN_PROGRESS) - instance->SetData(DATA_AZGALOREVENT, NOT_STARTED); - instance->SetData(DATA_RESET_RAIDDAMAGE, 0);//reset damage on die - } + //reset encounter if boss is despawned (ex: thrall is killed, boss despawns, event stucks at inprogress) + if (instance->GetData(DATA_RAGEWINTERCHILLEVENT) == IN_PROGRESS) + instance->SetData(DATA_RAGEWINTERCHILLEVENT, NOT_STARTED); + if (instance->GetData(DATA_ANETHERONEVENT) == IN_PROGRESS) + instance->SetData(DATA_ANETHERONEVENT, NOT_STARTED); + if (instance->GetData(DATA_KAZROGALEVENT) == IN_PROGRESS) + instance->SetData(DATA_KAZROGALEVENT, NOT_STARTED); + if (instance->GetData(DATA_AZGALOREVENT) == IN_PROGRESS) + instance->SetData(DATA_AZGALOREVENT, NOT_STARTED); + instance->SetData(DATA_RESET_RAIDDAMAGE, 0);//reset damage on die } void hyjalAI::HideNearPos(float x, float y) diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.h b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.h index 90dd277346a..c91414eba9d 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.h +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp index 9245a0c648f..2688fbbdaff 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -195,8 +195,7 @@ void hyjal_trashAI::DamageTaken(Unit* done_by, uint32 &damage) if (done_by->GetTypeId() == TYPEID_PLAYER || done_by->IsPet()) { damageTaken += damage; - if (instance) - instance->SetData(DATA_RAIDDAMAGE, damage);//store raid's damage + instance->SetData(DATA_RAIDDAMAGE, damage);//store raid's damage } } @@ -399,9 +398,6 @@ void hyjal_trashAI::UpdateAI(uint32 /*diff*/) void hyjal_trashAI::JustDied(Unit* /*killer*/) { - if (!instance) - return; - if (IsEvent && !me->isWorldBoss()) instance->SetData(DATA_TRASH, 0);//signal trash is dead @@ -488,16 +484,13 @@ public: me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); me->SetDisplayId(me->GetUInt32Value(UNIT_FIELD_NATIVEDISPLAYID)); CanMove = true; - if (instance) + if (instance->GetData(DATA_ALLIANCE_RETREAT) && !instance->GetData(DATA_HORDE_RETREAT)) { - if (instance->GetData(DATA_ALLIANCE_RETREAT) && !instance->GetData(DATA_HORDE_RETREAT)) - { - Unit* target = Unit::GetUnit(*me, instance->GetData64(DATA_THRALL)); - if (target && target->IsAlive()) - me->AddThreat(target, 0.0f); - } else if (instance->GetData(DATA_ALLIANCE_RETREAT) && instance->GetData(DATA_HORDE_RETREAT)){ - //do overrun - } + Unit* target = Unit::GetUnit(*me, instance->GetData64(DATA_THRALL)); + if (target && target->IsAlive()) + me->AddThreat(target, 0.0f); + } else if (instance->GetData(DATA_ALLIANCE_RETREAT) && instance->GetData(DATA_HORDE_RETREAT)){ + //do overrun } } else spawnTimer -= diff; } @@ -510,12 +503,9 @@ public: if (!go) { go = true; - if (instance) - { - AddWaypoint(0, HordeWPs[7][0]+irand(-3, 3), HordeWPs[7][1]+irand(-3, 3), HordeWPs[7][2]);//HordeWPs[7] infront of thrall - Start(true, true); - SetDespawnAtEnd(false); - } + AddWaypoint(0, HordeWPs[7][0]+irand(-3, 3), HordeWPs[7][1]+irand(-3, 3), HordeWPs[7][2]);//HordeWPs[7] infront of thrall + Start(true, true); + SetDespawnAtEnd(false); } } @@ -537,7 +527,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_giant_infernalAI(creature); + return GetInstanceAI<npc_giant_infernalAI>(creature); } }; @@ -548,7 +538,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_abominationAI(creature); + return GetInstanceAI<npc_abominationAI>(creature); } struct npc_abominationAI : public hyjal_trashAI @@ -606,21 +596,18 @@ public: if (!go) { go = true; - if (instance) + if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, use horde WPs + { + for (uint8 i = 0; i < 8; ++i) + AddWaypoint(i, HordeWPs[i][0]+irand(-3, 3), HordeWPs[i][1]+irand(-3, 3), HordeWPs[i][2]); + Start(false, true); + SetDespawnAtEnd(false); + }else//use alliance WPs { - if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, use horde WPs - { - for (uint8 i = 0; i < 8; ++i) - AddWaypoint(i, HordeWPs[i][0]+irand(-3, 3), HordeWPs[i][1]+irand(-3, 3), HordeWPs[i][2]); - Start(false, true); - SetDespawnAtEnd(false); - }else//use alliance WPs - { - for (uint8 i = 0; i < 8; ++i) - AddWaypoint(i, AllianceWPs[i][0]+irand(-3, 3), AllianceWPs[i][1]+irand(-3, 3), AllianceWPs[i][2]); - Start(false, true); - SetDespawnAtEnd(false); - } + for (uint8 i = 0; i < 8; ++i) + AddWaypoint(i, AllianceWPs[i][0]+irand(-3, 3), AllianceWPs[i][1]+irand(-3, 3), AllianceWPs[i][2]); + Start(false, true); + SetDespawnAtEnd(false); } } } @@ -646,7 +633,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_ghoulAI(creature); + return GetInstanceAI<npc_ghoulAI>(creature); } struct npc_ghoulAI : public hyjal_trashAI @@ -709,21 +696,18 @@ public: if (!go) { go = true; - if (instance) + if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, use horde WPs { - if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, use horde WPs - { - for (uint8 i = 0; i < 8; ++i) - AddWaypoint(i, HordeWPs[i][0]+irand(-3, 3), HordeWPs[i][1]+irand(-3, 3), HordeWPs[i][2]); - Start(false, true); - SetDespawnAtEnd(false); - }else//use alliance WPs - { - for (uint8 i = 0; i < 8; ++i) - AddWaypoint(i, AllianceWPs[i][0]+irand(-3, 3), AllianceWPs[i][1]+irand(-3, 3), AllianceWPs[i][2]); - Start(false, true); - SetDespawnAtEnd(false); - } + for (uint8 i = 0; i < 8; ++i) + AddWaypoint(i, HordeWPs[i][0]+irand(-3, 3), HordeWPs[i][1]+irand(-3, 3), HordeWPs[i][2]); + Start(false, true); + SetDespawnAtEnd(false); + }else//use alliance WPs + { + for (uint8 i = 0; i < 8; ++i) + AddWaypoint(i, AllianceWPs[i][0]+irand(-3, 3), AllianceWPs[i][1]+irand(-3, 3), AllianceWPs[i][2]); + Start(false, true); + SetDespawnAtEnd(false); } } } @@ -748,7 +732,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_necromancerAI(creature); + return GetInstanceAI<npc_necromancerAI>(creature); } struct npc_necromancerAI : public hyjal_trashAI @@ -834,21 +818,18 @@ public: if (!go) { go = true; - if (instance) + if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, use horde WPs + { + for (uint8 i = 0; i < 8; ++i) + AddWaypoint(i, HordeWPs[i][0]+irand(-3, 3), HordeWPs[i][1]+irand(-3, 3), HordeWPs[i][2]); + Start(true, true); + SetDespawnAtEnd(false); + }else//use alliance WPs { - if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, use horde WPs - { - for (uint8 i = 0; i < 8; ++i) - AddWaypoint(i, HordeWPs[i][0]+irand(-3, 3), HordeWPs[i][1]+irand(-3, 3), HordeWPs[i][2]); - Start(true, true); - SetDespawnAtEnd(false); - }else//use alliance WPs - { - for (uint8 i = 0; i < 8; ++i) - AddWaypoint(i, AllianceWPs[i][0]+irand(-3, 3), AllianceWPs[i][1]+irand(-3, 3), AllianceWPs[i][2]); - Start(true, true); - SetDespawnAtEnd(false); - } + for (uint8 i = 0; i < 8; ++i) + AddWaypoint(i, AllianceWPs[i][0]+irand(-3, 3), AllianceWPs[i][1]+irand(-3, 3), AllianceWPs[i][2]); + Start(true, true); + SetDespawnAtEnd(false); } } } @@ -875,7 +856,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_bansheeAI(creature); + return GetInstanceAI<npc_bansheeAI>(creature); } struct npc_bansheeAI : public hyjal_trashAI @@ -930,21 +911,18 @@ public: if (!go) { go = true; - if (instance) + if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, use horde WPs { - if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, use horde WPs - { - for (uint8 i = 0; i < 8; ++i) - AddWaypoint(i, HordeWPs[i][0]+irand(-3, 3), HordeWPs[i][1]+irand(-3, 3), HordeWPs[i][2]); - Start(false, true); - SetDespawnAtEnd(false); - }else//use alliance WPs - { - for (uint8 i = 0; i < 8; ++i) - AddWaypoint(i, AllianceWPs[i][0]+irand(-3, 3), AllianceWPs[i][1]+irand(-3, 3), AllianceWPs[i][2]); - Start(false, true); - SetDespawnAtEnd(false); - } + for (uint8 i = 0; i < 8; ++i) + AddWaypoint(i, HordeWPs[i][0]+irand(-3, 3), HordeWPs[i][1]+irand(-3, 3), HordeWPs[i][2]); + Start(false, true); + SetDespawnAtEnd(false); + }else//use alliance WPs + { + for (uint8 i = 0; i < 8; ++i) + AddWaypoint(i, AllianceWPs[i][0]+irand(-3, 3), AllianceWPs[i][1]+irand(-3, 3), AllianceWPs[i][2]); + Start(false, true); + SetDespawnAtEnd(false); } } } @@ -978,7 +956,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_crypt_fiendAI(creature); + return GetInstanceAI<npc_crypt_fiendAI>(creature); } struct npc_crypt_fiendAI : public hyjal_trashAI @@ -1029,22 +1007,18 @@ public: if (!go) { go = true; - if (instance) + if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, use horde WPs { - if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, use horde WPs - { - for (uint8 i = 0; i < 8; ++i) - AddWaypoint(i, HordeWPs[i][0]+irand(-3, 3), HordeWPs[i][1]+irand(-3, 3), HordeWPs[i][2]); - Start(false, true); - SetDespawnAtEnd(false); - }else//use alliance WPs - { - for (uint8 i = 0; i < 8; ++i) - AddWaypoint(i, AllianceWPs[i][0]+irand(-3, 3), AllianceWPs[i][1]+irand(-3, 3), AllianceWPs[i][2]); - Start(false, true); - SetDespawnAtEnd(false); - } - + for (uint8 i = 0; i < 8; ++i) + AddWaypoint(i, HordeWPs[i][0]+irand(-3, 3), HordeWPs[i][1]+irand(-3, 3), HordeWPs[i][2]); + Start(false, true); + SetDespawnAtEnd(false); + }else//use alliance WPs + { + for (uint8 i = 0; i < 8; ++i) + AddWaypoint(i, AllianceWPs[i][0]+irand(-3, 3), AllianceWPs[i][1]+irand(-3, 3), AllianceWPs[i][2]); + Start(false, true); + SetDespawnAtEnd(false); } } } @@ -1068,7 +1042,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_fel_stalkerAI(creature); + return GetInstanceAI<npc_fel_stalkerAI>(creature); } struct npc_fel_stalkerAI : public hyjal_trashAI @@ -1119,22 +1093,18 @@ public: if (!go) { go = true; - if (instance) + if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, use horde WPs { - if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, use horde WPs - { - for (uint8 i = 0; i < 8; ++i) - AddWaypoint(i, HordeWPs[i][0]+irand(-3, 3), HordeWPs[i][1]+irand(-3, 3), HordeWPs[i][2]); - Start(false, true); - SetDespawnAtEnd(false); - }else//use alliance WPs - { - for (uint8 i = 0; i < 8; ++i) - AddWaypoint(i, AllianceWPs[i][0]+irand(-3, 3), AllianceWPs[i][1]+irand(-3, 3), AllianceWPs[i][2]); - Start(false, true); - SetDespawnAtEnd(false); - } - + for (uint8 i = 0; i < 8; ++i) + AddWaypoint(i, HordeWPs[i][0]+irand(-3, 3), HordeWPs[i][1]+irand(-3, 3), HordeWPs[i][2]); + Start(false, true); + SetDespawnAtEnd(false); + }else//use alliance WPs + { + for (uint8 i = 0; i < 8; ++i) + AddWaypoint(i, AllianceWPs[i][0]+irand(-3, 3), AllianceWPs[i][1]+irand(-3, 3), AllianceWPs[i][2]); + Start(false, true); + SetDespawnAtEnd(false); } } } @@ -1158,7 +1128,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_frost_wyrmAI(creature); + return GetInstanceAI<npc_frost_wyrmAI>(creature); } struct npc_frost_wyrmAI : public hyjal_trashAI @@ -1221,20 +1191,17 @@ public: if (!go) { go = true; - if (instance) + if (!useFlyPath) { - if (!useFlyPath) - { - for (uint8 i = 0; i < 3; ++i) - AddWaypoint(i, FrostWyrmWPs[i][0], FrostWyrmWPs[i][1], FrostWyrmWPs[i][2]); - Start(false, true); - SetDespawnAtEnd(false); - }else{//fly path FlyPathWPs - for (uint8 i = 0; i < 3; ++i) - AddWaypoint(i, FlyPathWPs[i][0]+irand(-10, 10), FlyPathWPs[i][1]+irand(-10, 10), FlyPathWPs[i][2]); - Start(false, true); - SetDespawnAtEnd(false); - } + for (uint8 i = 0; i < 3; ++i) + AddWaypoint(i, FrostWyrmWPs[i][0], FrostWyrmWPs[i][1], FrostWyrmWPs[i][2]); + Start(false, true); + SetDespawnAtEnd(false); + }else{//fly path FlyPathWPs + for (uint8 i = 0; i < 3; ++i) + AddWaypoint(i, FlyPathWPs[i][0]+irand(-10, 10), FlyPathWPs[i][1]+irand(-10, 10), FlyPathWPs[i][2]); + Start(false, true); + SetDespawnAtEnd(false); } } } @@ -1270,7 +1237,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_gargoyleAI(creature); + return GetInstanceAI<npc_gargoyleAI>(creature); } struct npc_gargoyleAI : public hyjal_trashAI @@ -1334,20 +1301,17 @@ public: if (!go) { go = true; - if (instance) + if (!useFlyPath) { - if (!useFlyPath) - { - for (uint8 i = 0; i < 3; ++i) - AddWaypoint(i, GargoyleWPs[i][0]+irand(-10, 10), GargoyleWPs[i][1]+irand(-10, 10), GargoyleWPs[i][2]); - Start(false, true); - SetDespawnAtEnd(false); - }else{//fly path FlyPathWPs - for (uint8 i = 0; i < 3; ++i) - AddWaypoint(i, FlyPathWPs[i][0]+irand(-10, 10), FlyPathWPs[i][1]+irand(-10, 10), FlyPathWPs[i][2]); - Start(false, true); - SetDespawnAtEnd(false); - } + for (uint8 i = 0; i < 3; ++i) + AddWaypoint(i, GargoyleWPs[i][0]+irand(-10, 10), GargoyleWPs[i][1]+irand(-10, 10), GargoyleWPs[i][2]); + Start(false, true); + SetDespawnAtEnd(false); + }else{//fly path FlyPathWPs + for (uint8 i = 0; i < 3; ++i) + AddWaypoint(i, FlyPathWPs[i][0]+irand(-10, 10), FlyPathWPs[i][1]+irand(-10, 10), FlyPathWPs[i][2]); + Start(false, true); + SetDespawnAtEnd(false); } } } diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.h b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.h index 01ae6244b4a..18122ba2b0c 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.h +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp index 97aadae3f98..0c3f33dea55 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_chrono_lord_epoch.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_chrono_lord_epoch.cpp index c049be0309b..a03bfb3082b 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_chrono_lord_epoch.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_chrono_lord_epoch.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -52,7 +52,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_epochAI(creature); + return GetInstanceAI<boss_epochAI>(creature); } struct boss_epochAI : public ScriptedAI @@ -81,16 +81,14 @@ public: uiTimeStopTimer = 21300; uiWoundingStrikeTimer = 5300; - if (instance) - instance->SetData(DATA_EPOCH_EVENT, NOT_STARTED); + instance->SetData(DATA_EPOCH_EVENT, NOT_STARTED); } void EnterCombat(Unit* /*who*/) OVERRIDE { Talk(SAY_AGGRO); - if (instance) - instance->SetData(DATA_EPOCH_EVENT, IN_PROGRESS); + instance->SetData(DATA_EPOCH_EVENT, IN_PROGRESS); } void UpdateAI(uint32 diff) OVERRIDE @@ -132,8 +130,7 @@ public: { Talk(SAY_DEATH); - if (instance) - instance->SetData(DATA_EPOCH_EVENT, DONE); + instance->SetData(DATA_EPOCH_EVENT, DONE); } void KilledUnit(Unit* victim) OVERRIDE diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_infinite_corruptor.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_infinite_corruptor.cpp index 54438e3b8a9..c3427c99fbb 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_infinite_corruptor.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_infinite_corruptor.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -39,7 +39,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_infinite_corruptorAI(creature); + return GetInstanceAI<boss_infinite_corruptorAI>(creature); } struct boss_infinite_corruptorAI : public ScriptedAI @@ -53,15 +53,13 @@ public: void Reset() OVERRIDE { - if (instance) - instance->SetData(DATA_INFINITE_EVENT, NOT_STARTED); + instance->SetData(DATA_INFINITE_EVENT, NOT_STARTED); } void EnterCombat(Unit* /*who*/) OVERRIDE { Talk(SAY_AGGRO); - if (instance) - instance->SetData(DATA_INFINITE_EVENT, IN_PROGRESS); + instance->SetData(DATA_INFINITE_EVENT, IN_PROGRESS); } void UpdateAI(uint32 /*diff*/) OVERRIDE @@ -76,8 +74,7 @@ public: void JustDied(Unit* /*killer*/) OVERRIDE { Talk(SAY_DEATH); - if (instance) - instance->SetData(DATA_INFINITE_EVENT, DONE); + instance->SetData(DATA_INFINITE_EVENT, DONE); } }; diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_mal_ganis.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_mal_ganis.cpp index e16ed882171..e4f1324d19c 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_mal_ganis.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_mal_ganis.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -66,7 +66,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_mal_ganisAI(creature); + return GetInstanceAI<boss_mal_ganisAI>(creature); } struct boss_mal_ganisAI : public ScriptedAI @@ -102,15 +102,13 @@ public: uiSleepTimer = urand(15000, 20000); uiOutroTimer = 1000; - if (instance) - instance->SetData(DATA_MAL_GANIS_EVENT, NOT_STARTED); + instance->SetData(DATA_MAL_GANIS_EVENT, NOT_STARTED); } void EnterCombat(Unit* /*who*/) OVERRIDE { Talk(SAY_AGGRO); - if (instance) - instance->SetData(DATA_MAL_GANIS_EVENT, IN_PROGRESS); + instance->SetData(DATA_MAL_GANIS_EVENT, IN_PROGRESS); } void DamageTaken(Unit* done_by, uint32 &damage) OVERRIDE @@ -154,8 +152,7 @@ public: { EnterEvadeMode(); me->DisappearAndDie(); - if (instance) - instance->SetData(DATA_MAL_GANIS_EVENT, FAIL); + instance->SetData(DATA_MAL_GANIS_EVENT, FAIL); } if (uiCarrionSwarmTimer < diff) @@ -228,13 +225,10 @@ public: void JustDied(Unit* /*killer*/) OVERRIDE { - if (instance) - { - instance->SetData(DATA_MAL_GANIS_EVENT, DONE); - DoCastAOE(SPELL_MAL_GANIS_KILL_CREDIT); - // give achievement credit and LFG rewards to players. criteria use spell 58630 which doesn't exist, but it was created in spell_dbc - DoCastAOE(SPELL_KILL_CREDIT); - } + instance->SetData(DATA_MAL_GANIS_EVENT, DONE); + DoCastAOE(SPELL_MAL_GANIS_KILL_CREDIT); + // give achievement credit and LFG rewards to players. criteria use spell 58630 which doesn't exist, but it was created in spell_dbc + DoCastAOE(SPELL_KILL_CREDIT); } void KilledUnit(Unit* victim) OVERRIDE diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_meathook.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_meathook.cpp index aff076f4763..b4bf6a30140 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_meathook.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_meathook.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -51,7 +51,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_meathookAI(creature); + return GetInstanceAI<boss_meathookAI>(creature); } struct boss_meathookAI : public ScriptedAI @@ -59,8 +59,7 @@ public: boss_meathookAI(Creature* creature) : ScriptedAI(creature) { instance = creature->GetInstanceScript(); - if (instance) - Talk(SAY_SPAWN); + Talk(SAY_SPAWN); } uint32 uiChainTimer; @@ -75,16 +74,14 @@ public: uiDiseaseTimer = urand(2000, 4000); //approx 3s uiFrenzyTimer = urand(21000, 26000); //made it up - if (instance) - instance->SetData(DATA_MEATHOOK_EVENT, NOT_STARTED); + instance->SetData(DATA_MEATHOOK_EVENT, NOT_STARTED); } void EnterCombat(Unit* /*who*/) OVERRIDE { Talk(SAY_AGGRO); - if (instance) - instance->SetData(DATA_MEATHOOK_EVENT, IN_PROGRESS); + instance->SetData(DATA_MEATHOOK_EVENT, IN_PROGRESS); } void UpdateAI(uint32 diff) OVERRIDE @@ -119,8 +116,7 @@ public: { Talk(SAY_DEATH); - if (instance) - instance->SetData(DATA_MEATHOOK_EVENT, DONE); + instance->SetData(DATA_MEATHOOK_EVENT, DONE); } void KilledUnit(Unit* victim) OVERRIDE diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm_the_fleshcrafter.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm_the_fleshcrafter.cpp index fc5b3c4a8b0..5d9477a1b45 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm_the_fleshcrafter.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm_the_fleshcrafter.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -56,7 +56,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_salrammAI(creature); + return GetInstanceAI<boss_salrammAI>(creature); } struct boss_salrammAI : public ScriptedAI @@ -64,8 +64,7 @@ public: boss_salrammAI(Creature* creature) : ScriptedAI(creature) { instance = creature->GetInstanceScript(); - if (instance) - Talk(SAY_SPAWN); + Talk(SAY_SPAWN); } uint32 uiCurseFleshTimer; @@ -84,16 +83,14 @@ public: uiStealFleshTimer = 12345; uiSummonGhoulsTimer = urand(19000, 24000); //on a video approx 24s after aggro - if (instance) - instance->SetData(DATA_SALRAMM_EVENT, NOT_STARTED); + instance->SetData(DATA_SALRAMM_EVENT, NOT_STARTED); } void EnterCombat(Unit* /*who*/) OVERRIDE { Talk(SAY_AGGRO); - if (instance) - instance->SetData(DATA_SALRAMM_EVENT, IN_PROGRESS); + instance->SetData(DATA_SALRAMM_EVENT, IN_PROGRESS); } void UpdateAI(uint32 diff) OVERRIDE @@ -142,8 +139,7 @@ public: { Talk(SAY_DEATH); - if (instance) - instance->SetData(DATA_SALRAMM_EVENT, DONE); + instance->SetData(DATA_SALRAMM_EVENT, DONE); } void KilledUnit(Unit* victim) OVERRIDE diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp index dbead663cff..60352f7d55c 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -344,7 +344,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_arthasAI(creature); + return GetInstanceAI<npc_arthasAI>(creature); } struct npc_arthasAI : public npc_escortAI @@ -399,22 +399,20 @@ public: malganisGUID = 0; infiniteGUID = 0; - if (instance) { - instance->SetData(DATA_ARTHAS_EVENT, NOT_STARTED); - switch (instance->GetData(DATA_ARTHAS_EVENT)) - { - case NOT_STARTED: - bStepping = true; - step = 0; - me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); - bossEvent = DATA_MEATHOOK_EVENT; - gossipStep = 0; - break; - } - phaseTimer = 1000; - exorcismTimer = 7300; - wave = 0; + instance->SetData(DATA_ARTHAS_EVENT, NOT_STARTED); + switch (instance->GetData(DATA_ARTHAS_EVENT)) + { + case NOT_STARTED: + bStepping = true; + step = 0; + me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + bossEvent = DATA_MEATHOOK_EVENT; + gossipStep = 0; + break; } + phaseTimer = 1000; + exorcismTimer = 7300; + wave = 0; } void EnterCombat(Unit* /*who*/) OVERRIDE @@ -424,8 +422,7 @@ public: void JustDied(Unit* /*killer*/) OVERRIDE { - if (instance) - instance->SetData(DATA_ARTHAS_EVENT, FAIL); + instance->SetData(DATA_ARTHAS_EVENT, FAIL); } void SpawnTimeRift(uint32 timeRiftID, uint64* guidVector) @@ -559,9 +556,8 @@ public: Talk(SAY_PHASE403); break; case 36: - if (instance) - if (GameObject* pGate = instance->instance->GetGameObject(instance->GetData64(DATA_SHKAF_GATE))) - pGate->SetGoState(GO_STATE_ACTIVE); + if (GameObject* pGate = instance->instance->GetGameObject(instance->GetData64(DATA_SHKAF_GATE))) + pGate->SetGoState(GO_STATE_ACTIVE); break; case 45: SetRun(true); @@ -888,8 +884,7 @@ public: Talk(SAY_PHASE209); bossEvent = DATA_MEATHOOK_EVENT; - if (instance) - instance->SetData(DATA_ARTHAS_EVENT, IN_PROGRESS); + instance->SetData(DATA_ARTHAS_EVENT, IN_PROGRESS); me->SetReactState(REACT_DEFENSIVE); SetDespawnAtFar(false); @@ -961,25 +956,22 @@ public: break; case 50: //Wait Boss death case 60: - if (instance) + if (instance->GetData(bossEvent) == DONE) { - if (instance->GetData(bossEvent) == DONE) + JumpToNextStep(1000); + if (bossEvent == DATA_MEATHOOK_EVENT) + bossEvent = DATA_SALRAMM_EVENT; + else if (bossEvent == DATA_SALRAMM_EVENT) { - JumpToNextStep(1000); - if (bossEvent == DATA_MEATHOOK_EVENT) - bossEvent = DATA_SALRAMM_EVENT; - else if (bossEvent == DATA_SALRAMM_EVENT) - { - SetHoldState(false); - bStepping = false; - bossEvent = DATA_EPOCH_EVENT; - } + SetHoldState(false); + bStepping = false; + bossEvent = DATA_EPOCH_EVENT; } - else if (instance->GetData(bossEvent) == FAIL) - npc_escortAI::EnterEvadeMode(); - else - phaseTimer = 10000; } + else if (instance->GetData(bossEvent) == FAIL) + npc_escortAI::EnterEvadeMode(); + else + phaseTimer = 10000; break; //After Gossip 2 (waypoint 22) case 61: @@ -1096,53 +1088,47 @@ public: JumpToNextStep(1000); break; case 80: - if (instance) - if (instance->GetData(DATA_EPOCH_EVENT) != DONE) - { - SpawnTimeRift(17, &epochGUID); - if (Creature* epoch = Unit::GetCreature(*me, epochGUID)) - epoch->AI()->Talk(SAY_PHASE314); - me->SetTarget(epochGUID); - } + if (instance->GetData(DATA_EPOCH_EVENT) != DONE) + { + SpawnTimeRift(17, &epochGUID); + if (Creature* epoch = Unit::GetCreature(*me, epochGUID)) + epoch->AI()->Talk(SAY_PHASE314); + me->SetTarget(epochGUID); + } JumpToNextStep(18000); break; case 81: - if (instance) - if (instance->GetData(DATA_EPOCH_EVENT) != DONE) - Talk(SAY_PHASE315); + if (instance->GetData(DATA_EPOCH_EVENT) != DONE) + Talk(SAY_PHASE315); JumpToNextStep(6000); break; case 82: - if (instance) - if (instance->GetData(DATA_EPOCH_EVENT) != DONE) + if (instance->GetData(DATA_EPOCH_EVENT) != DONE) + { + if (Creature* epoch = Unit::GetCreature(*me, epochGUID)) { - if (Creature* epoch = Unit::GetCreature(*me, epochGUID)) - { - //Make Epoch attackable - epoch->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC); - epoch->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - epoch->SetReactState(REACT_AGGRESSIVE); - } - + //Make Epoch attackable + epoch->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC); + epoch->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + epoch->SetReactState(REACT_AGGRESSIVE); } + + } JumpToNextStep(1000); break; case 83: - if (instance) + if (instance->GetData(DATA_EPOCH_EVENT) == DONE) { - if (instance->GetData(DATA_EPOCH_EVENT) == DONE) - { - gossipStep = 3; - me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); - bStepping = false; - bossEvent = DATA_MAL_GANIS_EVENT; - JumpToNextStep(15000); - } - else if (instance->GetData(DATA_EPOCH_EVENT) == FAIL) - npc_escortAI::EnterEvadeMode(); - else - phaseTimer = 10000; + gossipStep = 3; + me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + bStepping = false; + bossEvent = DATA_MAL_GANIS_EVENT; + JumpToNextStep(15000); } + else if (instance->GetData(DATA_EPOCH_EVENT) == FAIL) + npc_escortAI::EnterEvadeMode(); + else + phaseTimer = 10000; break; //After Gossip 4 case 84: @@ -1158,9 +1144,8 @@ public: malganisGUID = malganis->GetGUID(); malganis->SetReactState(REACT_PASSIVE); } - if (instance) - if (GameObject* pGate = instance->instance->GetGameObject(instance->GetData64(DATA_MAL_GANIS_GATE_1))) - pGate->SetGoState(GO_STATE_ACTIVE); + if (GameObject* pGate = instance->instance->GetGameObject(instance->GetData64(DATA_MAL_GANIS_GATE_1))) + pGate->SetGoState(GO_STATE_ACTIVE); SetHoldState(false); bStepping = false; JumpToNextStep(0); @@ -1180,18 +1165,15 @@ public: JumpToNextStep(1000); break; case 88: - if (instance) + if (instance->GetData(DATA_MAL_GANIS_EVENT) == DONE) { - if (instance->GetData(DATA_MAL_GANIS_EVENT) == DONE) - { - SetHoldState(false); - JumpToNextStep(1000); - } - else if (instance->GetData(DATA_MAL_GANIS_EVENT) == FAIL) - npc_escortAI::EnterEvadeMode(); - else - phaseTimer = 10000; + SetHoldState(false); + JumpToNextStep(1000); } + else if (instance->GetData(DATA_MAL_GANIS_EVENT) == FAIL) + npc_escortAI::EnterEvadeMode(); + else + phaseTimer = 10000; break; //After waypoint 56 case 89: @@ -1201,11 +1183,8 @@ public: JumpToNextStep(7000); break; case 90: - if (instance) - { - instance->SetData(DATA_ARTHAS_EVENT, DONE); //Rewards: Achiev & Chest ;D - me->SetTarget(instance->GetData64(DATA_MAL_GANIS_GATE_2)); //Look behind - } + instance->SetData(DATA_ARTHAS_EVENT, DONE); //Rewards: Achiev & Chest ;D + me->SetTarget(instance->GetData64(DATA_MAL_GANIS_GATE_2)); //Look behind Talk(SAY_PHASE504); bStepping = false; break; diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.h b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.h index bd6549d40be..649d9dbf803 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.h +++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/instance_culling_of_stratholme.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/instance_culling_of_stratholme.cpp index 6264f02f6c9..9e192d2e1a2 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/instance_culling_of_stratholme.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/instance_culling_of_stratholme.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_captain_skarloc.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_captain_skarloc.cpp index 3b51f6d0f8f..061c7fdfc62 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_captain_skarloc.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_captain_skarloc.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -54,7 +54,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_captain_skarlocAI(creature); + return GetInstanceAI<boss_captain_skarlocAI>(creature); } struct boss_captain_skarlocAI : public ScriptedAI diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_epoch_hunter.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_epoch_hunter.cpp index 5cbe76671a4..cb25d96acf3 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_epoch_hunter.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_epoch_hunter.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -52,7 +52,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_epoch_hunterAI(creature); + return GetInstanceAI<boss_epoch_hunterAI>(creature); } struct boss_epoch_hunterAI : public ScriptedAI diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_leutenant_drake.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_leutenant_drake.cpp index c623ff40a10..7ca850e8754 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_leutenant_drake.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_leutenant_drake.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp index 8250f1ec3c0..47317b0a13e 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp index bdf7d71a497..6e4ef814dbe 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -188,7 +188,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_thrall_old_hillsbradAI(creature); + return GetInstanceAI<npc_thrall_old_hillsbradAI>(creature); } bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE @@ -291,9 +291,6 @@ public: void WaypointReached(uint32 waypointId) OVERRIDE { - if (!instance) - return; - switch (waypointId) { case 8: @@ -526,8 +523,7 @@ public: } void JustDied(Unit* slayer) OVERRIDE { - if (instance) - instance->SetData(TYPE_THRALL_EVENT, FAIL); + instance->SetData(TYPE_THRALL_EVENT, FAIL); // Don't do a yell if he kills self (if player goes too far or at the end). if (slayer == me) @@ -573,7 +569,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_tarethaAI(creature); + return GetInstanceAI<npc_tarethaAI>(creature); } bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.h b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.h index 7d8b06f1b02..57b0a1fce85 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.h +++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/boss_aeonus.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/boss_aeonus.cpp index 3817c2628e3..bf11d781a0c 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/boss_aeonus.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/boss_aeonus.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -90,11 +90,8 @@ public: { Talk(SAY_DEATH); - if (instance) - { - instance->SetData(TYPE_RIFT, DONE); - instance->SetData(TYPE_MEDIVH, DONE); // FIXME: later should be removed - } + instance->SetData(TYPE_RIFT, DONE); + instance->SetData(TYPE_MEDIVH, DONE); // FIXME: later should be removed } void KilledUnit(Unit* who) OVERRIDE @@ -141,7 +138,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_aeonusAI(creature); + return GetInstanceAI<boss_aeonusAI>(creature); } }; diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/boss_chrono_lord_deja.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/boss_chrono_lord_deja.cpp index fe91f3ab712..251c1b14e9b 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/boss_chrono_lord_deja.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/boss_chrono_lord_deja.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -98,8 +98,7 @@ public: { Talk(SAY_DEATH); - if (instance) - instance->SetData(TYPE_RIFT, SPECIAL); + instance->SetData(TYPE_RIFT, SPECIAL); } void UpdateAI(uint32 diff) OVERRIDE @@ -145,7 +144,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_chrono_lord_dejaAI(creature); + return GetInstanceAI<boss_chrono_lord_dejaAI>(creature); } }; diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/boss_temporus.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/boss_temporus.cpp index 4d94edf7339..fcd3cc92604 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/boss_temporus.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/boss_temporus.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -81,8 +81,7 @@ public: { Talk(SAY_DEATH); - if (instance) - instance->SetData(TYPE_RIFT, SPECIAL); + instance->SetData(TYPE_RIFT, SPECIAL); } void MoveInLineOfSight(Unit* who) OVERRIDE @@ -143,7 +142,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_temporusAI(creature); + return GetInstanceAI<boss_temporusAI>(creature); } }; diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/instance_the_black_morass.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/instance_the_black_morass.cpp index d0178f4874a..e5920084033 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/instance_the_black_morass.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/instance_the_black_morass.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/the_black_morass.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/the_black_morass.cpp index 4fa7e007a7c..f1406a5a008 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/the_black_morass.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/the_black_morass.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -70,7 +70,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_medivh_bmAI(creature); + return GetInstanceAI<npc_medivh_bmAI>(creature); } struct npc_medivh_bmAI : public ScriptedAI @@ -97,9 +97,6 @@ public: Life50 = true; Life25 = true; - if (!instance) - return; - if (instance->GetData(TYPE_MEDIVH) == IN_PROGRESS) DoCast(me, SPELL_CHANNEL, true); else if (me->HasAura(SPELL_CHANNEL)) @@ -109,11 +106,7 @@ public: } void MoveInLineOfSight(Unit* who) OVERRIDE - { - if (!instance) - return; - if (who->GetTypeId() == TYPEID_PLAYER && me->IsWithinDistInMap(who, 10.0f)) { if (instance->GetData(TYPE_MEDIVH) == IN_PROGRESS || instance->GetData(TYPE_MEDIVH) == DONE) @@ -175,9 +168,6 @@ public: void UpdateAI(uint32 diff) OVERRIDE { - if (!instance) - return; - if (SpellCorrupt_Timer) { if (SpellCorrupt_Timer <= diff) @@ -268,7 +258,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_time_riftAI(creature); + return GetInstanceAI<npc_time_riftAI>(creature); } struct npc_time_riftAI : public ScriptedAI @@ -291,9 +281,6 @@ public: TimeRiftWave_Timer = 15000; mRiftWaveCount = 0; - if (!instance) - return; - mPortalCount = instance->GetData(DATA_PORTAL_COUNT); if (mPortalCount < 6) @@ -349,9 +336,6 @@ public: void UpdateAI(uint32 diff) OVERRIDE { - if (!instance) - return; - if (TimeRiftWave_Timer <= diff) { DoSelectSummon(); diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/the_black_morass.h b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/the_black_morass.h index 729eb42e9c5..25f10f22907 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/the_black_morass.h +++ b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/the_black_morass.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/DireMaul/instance_dire_maul.cpp b/src/server/scripts/Kalimdor/DireMaul/instance_dire_maul.cpp index e28e65b6911..160495a8dc2 100644 --- a/src/server/scripts/Kalimdor/DireMaul/instance_dire_maul.cpp +++ b/src/server/scripts/Kalimdor/DireMaul/instance_dire_maul.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Kalimdor/Maraudon/boss_celebras_the_cursed.cpp b/src/server/scripts/Kalimdor/Maraudon/boss_celebras_the_cursed.cpp index 2a00565e4bd..ec8596e4fc0 100644 --- a/src/server/scripts/Kalimdor/Maraudon/boss_celebras_the_cursed.cpp +++ b/src/server/scripts/Kalimdor/Maraudon/boss_celebras_the_cursed.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/Maraudon/boss_landslide.cpp b/src/server/scripts/Kalimdor/Maraudon/boss_landslide.cpp index 723070fd18d..3b9ad0bfb79 100644 --- a/src/server/scripts/Kalimdor/Maraudon/boss_landslide.cpp +++ b/src/server/scripts/Kalimdor/Maraudon/boss_landslide.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/Maraudon/boss_noxxion.cpp b/src/server/scripts/Kalimdor/Maraudon/boss_noxxion.cpp index 6478c6eae75..6b425c4c0fe 100644 --- a/src/server/scripts/Kalimdor/Maraudon/boss_noxxion.cpp +++ b/src/server/scripts/Kalimdor/Maraudon/boss_noxxion.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/Maraudon/boss_princess_theradras.cpp b/src/server/scripts/Kalimdor/Maraudon/boss_princess_theradras.cpp index 654ef986a17..035ababd3b9 100644 --- a/src/server/scripts/Kalimdor/Maraudon/boss_princess_theradras.cpp +++ b/src/server/scripts/Kalimdor/Maraudon/boss_princess_theradras.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/Maraudon/instance_maraudon.cpp b/src/server/scripts/Kalimdor/Maraudon/instance_maraudon.cpp index 53b04c9b4e7..e5653df8f64 100644 --- a/src/server/scripts/Kalimdor/Maraudon/instance_maraudon.cpp +++ b/src/server/scripts/Kalimdor/Maraudon/instance_maraudon.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Kalimdor/OnyxiasLair/boss_onyxia.cpp b/src/server/scripts/Kalimdor/OnyxiasLair/boss_onyxia.cpp index f16441ba72b..7381594a1ce 100644 --- a/src/server/scripts/Kalimdor/OnyxiasLair/boss_onyxia.cpp +++ b/src/server/scripts/Kalimdor/OnyxiasLair/boss_onyxia.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -145,12 +145,9 @@ public: SummonWhelpCount = 0; IsMoving = false; - if (instance) - { - instance->SetBossState(DATA_ONYXIA, NOT_STARTED); - instance->SetData(DATA_ONYXIA_PHASE, Phase); - instance->DoStopTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT); - } + instance->SetBossState(DATA_ONYXIA, NOT_STARTED); + instance->SetData(DATA_ONYXIA_PHASE, Phase); + instance->DoStopTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT); } void EnterCombat(Unit* /*who*/) OVERRIDE @@ -163,17 +160,13 @@ public: events.ScheduleEvent(EVENT_CLEAVE, urand (2000, 5000)); events.ScheduleEvent(EVENT_WING_BUFFET, urand (10000, 20000)); - if (instance) - { - instance->SetBossState(DATA_ONYXIA, IN_PROGRESS); - instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT); - } + instance->SetBossState(DATA_ONYXIA, IN_PROGRESS); + instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT); } void JustDied(Unit* /*killer*/) OVERRIDE { - if (instance) - instance->SetBossState(DATA_ONYXIA, DONE); + instance->SetBossState(DATA_ONYXIA, DONE); Summons.DespawnAll(); } @@ -246,8 +239,7 @@ public: me->GetMotionMaster()->MovePoint(11, Phase2Location.GetPositionX(), Phase2Location.GetPositionY(), Phase2Location.GetPositionZ()+25); me->SetSpeed(MOVE_FLIGHT, 1.0f); Talk(SAY_PHASE_2_TRANS); - if (instance) - instance->SetData(DATA_ONYXIA_PHASE, Phase); + instance->SetData(DATA_ONYXIA_PHASE, Phase); events.ScheduleEvent(EVENT_WHELP_SPAWN, 5000); events.ScheduleEvent(EVENT_LAIR_GUARD, 15000); break; @@ -280,10 +272,7 @@ public: (Spell->Id >= 22267 && Spell->Id <= 22268)) && (target->GetTypeId() == TYPEID_PLAYER)) { - if (instance) - { instance->SetData(DATA_SHE_DEEP_BREATH_MORE, FAIL); - } } } @@ -383,8 +372,7 @@ public: if (HealthBelowPct(40)) { Phase = PHASE_END; - if (instance) - instance->SetData(DATA_ONYXIA_PHASE, PHASE_END); + instance->SetData(DATA_ONYXIA_PHASE, PHASE_END); Talk(SAY_PHASE_3_TRANS); SetCombatMovement(true); @@ -469,7 +457,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_onyxiaAI(creature); + return GetInstanceAI<boss_onyxiaAI>(creature); } }; diff --git a/src/server/scripts/Kalimdor/OnyxiasLair/instance_onyxias_lair.cpp b/src/server/scripts/Kalimdor/OnyxiasLair/instance_onyxias_lair.cpp index fcb6a484a9b..e028fab67e5 100644 --- a/src/server/scripts/Kalimdor/OnyxiasLair/instance_onyxias_lair.cpp +++ b/src/server/scripts/Kalimdor/OnyxiasLair/instance_onyxias_lair.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Kalimdor/OnyxiasLair/onyxias_lair.h b/src/server/scripts/Kalimdor/OnyxiasLair/onyxias_lair.h index bf5010e4658..cacbd8b2787 100644 --- a/src/server/scripts/Kalimdor/OnyxiasLair/onyxias_lair.h +++ b/src/server/scripts/Kalimdor/OnyxiasLair/onyxias_lair.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Kalimdor/RagefireChasm/instance_ragefire_chasm.cpp b/src/server/scripts/Kalimdor/RagefireChasm/instance_ragefire_chasm.cpp index 2205845e6f8..8d5173ff266 100644 --- a/src/server/scripts/Kalimdor/RagefireChasm/instance_ragefire_chasm.cpp +++ b/src/server/scripts/Kalimdor/RagefireChasm/instance_ragefire_chasm.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Kalimdor/RazorfenDowns/boss_amnennar_the_coldbringer.cpp b/src/server/scripts/Kalimdor/RazorfenDowns/boss_amnennar_the_coldbringer.cpp index 952ed5679f9..bfc8c468af6 100644 --- a/src/server/scripts/Kalimdor/RazorfenDowns/boss_amnennar_the_coldbringer.cpp +++ b/src/server/scripts/Kalimdor/RazorfenDowns/boss_amnennar_the_coldbringer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Kalimdor/RazorfenDowns/boss_glutton.cpp b/src/server/scripts/Kalimdor/RazorfenDowns/boss_glutton.cpp index b75fcad64a5..d29831b8cde 100644 --- a/src/server/scripts/Kalimdor/RazorfenDowns/boss_glutton.cpp +++ b/src/server/scripts/Kalimdor/RazorfenDowns/boss_glutton.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Kalimdor/RazorfenDowns/boss_mordresh_fire_eye.cpp b/src/server/scripts/Kalimdor/RazorfenDowns/boss_mordresh_fire_eye.cpp index 1f45de3c4c6..6026991f253 100644 --- a/src/server/scripts/Kalimdor/RazorfenDowns/boss_mordresh_fire_eye.cpp +++ b/src/server/scripts/Kalimdor/RazorfenDowns/boss_mordresh_fire_eye.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Kalimdor/RazorfenDowns/boss_tuten_kash.cpp b/src/server/scripts/Kalimdor/RazorfenDowns/boss_tuten_kash.cpp index 5cf8a2992a3..0c76da22625 100644 --- a/src/server/scripts/Kalimdor/RazorfenDowns/boss_tuten_kash.cpp +++ b/src/server/scripts/Kalimdor/RazorfenDowns/boss_tuten_kash.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Kalimdor/RazorfenDowns/instance_razorfen_downs.cpp b/src/server/scripts/Kalimdor/RazorfenDowns/instance_razorfen_downs.cpp index 097f340891a..a4ab03d6611 100644 --- a/src/server/scripts/Kalimdor/RazorfenDowns/instance_razorfen_downs.cpp +++ b/src/server/scripts/Kalimdor/RazorfenDowns/instance_razorfen_downs.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.cpp b/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.cpp index abd76ebe508..3b4defeca56 100644 --- a/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.cpp +++ b/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -321,7 +321,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_belnistraszAI(creature); + return GetInstanceAI<npc_belnistraszAI>(creature); } }; @@ -341,9 +341,6 @@ public: void SetData(uint32 /*type*/, uint32 data) OVERRIDE { - if (!instance) - return; - if (data < 7) { me->SummonCreature(NPC_WITHERED_BATTLE_BOAR, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation()); @@ -362,7 +359,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_idol_room_spawnerAI(creature); + return GetInstanceAI<npc_idol_room_spawnerAI>(creature); } }; @@ -397,8 +394,7 @@ public: void JustDied(Unit* /*killer*/) OVERRIDE { - if (instance) - instance->SetData(DATA_WAVE, me->GetEntry()); + instance->SetData(DATA_WAVE, me->GetEntry()); } void EnterCombat(Unit* /*who*/) OVERRIDE @@ -433,7 +429,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_tomb_creatureAI(creature); + return GetInstanceAI<npc_tomb_creatureAI>(creature); } }; diff --git a/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.h b/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.h index 9fe5314fda0..4778677e067 100644 --- a/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.h +++ b/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp b/src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp index 59a24032d5f..9900ba9e3b3 100644 --- a/src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp +++ b/src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp b/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp index 1715bd693b4..f04b71d1da9 100644 --- a/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp +++ b/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2013 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.h b/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.h index eaf6ef69267..236d06fee52 100644 --- a/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.h +++ b/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ayamiss.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ayamiss.cpp index 327fe0d1358..e0771b0ebe2 100644 --- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ayamiss.cpp +++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ayamiss.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -232,7 +232,7 @@ class boss_ayamiss : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_ayamissAI(creature); + return GetInstanceAI<boss_ayamissAI>(creature); } }; @@ -286,7 +286,7 @@ class npc_hive_zara_larva : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_hive_zara_larvaAI(creature); + return GetInstanceAI<npc_hive_zara_larvaAI>(creature); } }; diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp index 0890a9804f9..e62f1781f13 100644 --- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp +++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -236,7 +236,7 @@ class npc_buru_egg : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_buru_eggAI(creature); + return GetInstanceAI<npc_buru_eggAI>(creature); } }; diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_kurinnaxx.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_kurinnaxx.cpp index 0b58ded0b1c..84003576a2a 100644 --- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_kurinnaxx.cpp +++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_kurinnaxx.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -127,7 +127,7 @@ class boss_kurinnaxx : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_kurinnaxxAI(creature); + return GetInstanceAI<boss_kurinnaxxAI>(creature); } }; diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_moam.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_moam.cpp index 6a1891e5c62..9dd82bf157e 100644 --- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_moam.cpp +++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_moam.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ossirian.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ossirian.cpp index 366f74f469e..3852802f43d 100644 --- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ossirian.cpp +++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ossirian.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -136,26 +136,23 @@ class boss_ossirian : public CreatureScript DoCast(me, SPELL_SUPREME); Talk(SAY_AGGRO); - if (instance) - { - Map* map = me->GetMap(); - if (!map->IsDungeon()) - return; + Map* map = me->GetMap(); + if (!map->IsDungeon()) + return; - WorldPacket data(SMSG_WEATHER, (4+4+4)); - data << uint32(WEATHER_STATE_HEAVY_SANDSTORM) << float(1) << uint8(0); - map->SendToPlayers(&data); + WorldPacket data(SMSG_WEATHER, (4+4+4)); + data << uint32(WEATHER_STATE_HEAVY_SANDSTORM) << float(1) << uint8(0); + map->SendToPlayers(&data); - for (uint8 i = 0; i < NUM_TORNADOS; ++i) - { - Position Point; - me->GetRandomPoint(RoomCenter, RoomRadius, Point); - if (Creature* Tornado = me->GetMap()->SummonCreature(NPC_SAND_VORTEX, Point)) - Tornado->CastSpell(Tornado, SPELL_SAND_STORM, true); - } - - SpawnNextCrystal(); + for (uint8 i = 0; i < NUM_TORNADOS; ++i) + { + Position Point; + me->GetRandomPoint(RoomCenter, RoomRadius, Point); + if (Creature* Tornado = me->GetMap()->SummonCreature(NPC_SAND_VORTEX, Point)) + Tornado->CastSpell(Tornado, SPELL_SAND_STORM, true); } + + SpawnNextCrystal(); } void KilledUnit(Unit* /*victim*/) OVERRIDE @@ -273,7 +270,7 @@ class boss_ossirian : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_ossirianAI(creature); + return GetInstanceAI<boss_ossirianAI>(creature); } }; diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp index b8d91065d05..b2aedfb5c99 100644 --- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp +++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/instance_ruins_of_ahnqiraj.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/instance_ruins_of_ahnqiraj.cpp index 0cf56df50e3..761ca60f714 100644 --- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/instance_ruins_of_ahnqiraj.cpp +++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/instance_ruins_of_ahnqiraj.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/ruins_of_ahnqiraj.h b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/ruins_of_ahnqiraj.h index 419aaf1c303..8d32bd61740 100644 --- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/ruins_of_ahnqiraj.h +++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/ruins_of_ahnqiraj.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_bug_trio.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_bug_trio.cpp index 63d43dcfb4b..c1897ff48ad 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_bug_trio.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_bug_trio.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -48,7 +48,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_kriAI(creature); + return GetInstanceAI<boss_kriAI>(creature); } struct boss_kriAI : public ScriptedAI @@ -83,14 +83,10 @@ public: void JustDied(Unit* /*killer*/) OVERRIDE { - if (instance) - { - if (instance->GetData(DATA_BUG_TRIO_DEATH) < 2) - // Unlootable if death - me->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + if (instance->GetData(DATA_BUG_TRIO_DEATH) < 2)// Unlootable if death + me->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); - instance->SetData(DATA_BUG_TRIO_DEATH, 1); - } + instance->SetData(DATA_BUG_TRIO_DEATH, 1); } void UpdateAI(uint32 diff) OVERRIDE { @@ -145,7 +141,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_vemAI(creature); + return GetInstanceAI<boss_vemAI>(creature); } struct boss_vemAI : public ScriptedAI @@ -174,14 +170,10 @@ public: void JustDied(Unit* /*killer*/) OVERRIDE { - if (instance) - { - instance->SetData(DATA_VEM_DEATH, 0); - if (instance->GetData(DATA_BUG_TRIO_DEATH) < 2) - // Unlootable if death - me->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); - instance->SetData(DATA_BUG_TRIO_DEATH, 1); - } + instance->SetData(DATA_VEM_DEATH, 0); + if (instance->GetData(DATA_BUG_TRIO_DEATH) < 2)// Unlootable if death + me->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + instance->SetData(DATA_BUG_TRIO_DEATH, 1); } void EnterCombat(Unit* /*who*/) OVERRIDE @@ -238,7 +230,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_yaujAI(creature); + return GetInstanceAI<boss_yaujAI>(creature); } struct boss_yaujAI : public ScriptedAI @@ -267,13 +259,9 @@ public: void JustDied(Unit* /*killer*/) OVERRIDE { - if (instance) - { - if (instance->GetData(DATA_BUG_TRIO_DEATH) < 2) - // Unlootable if death - me->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); - instance->SetData(DATA_BUG_TRIO_DEATH, 1); - } + if (instance->GetData(DATA_BUG_TRIO_DEATH) < 2)// Unlootable if death + me->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + instance->SetData(DATA_BUG_TRIO_DEATH, 1); for (uint8 i = 0; i < 10; ++i) { @@ -306,22 +294,19 @@ public: //Casting Heal to other twins or herself. if (Heal_Timer <= diff) { - if (instance) + switch (urand(0, 2)) { - switch (urand(0, 2)) - { - case 0: - if (Creature* kri = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_KRI))) - DoCast(kri, SPELL_HEAL); - break; - case 1: - if (Creature* vem = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_VEM))) - DoCast(vem, SPELL_HEAL); - break; - case 2: - DoCast(me, SPELL_HEAL); - break; - } + case 0: + if (Creature* kri = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_KRI))) + DoCast(kri, SPELL_HEAL); + break; + case 1: + if (Creature* vem = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_VEM))) + DoCast(vem, SPELL_HEAL); + break; + case 2: + DoCast(me, SPELL_HEAL); + break; } Heal_Timer = 15000+rand()%15000; @@ -332,13 +317,10 @@ public: { if (!VemDead) { - if (instance) + if (instance->GetData(DATA_VEMISDEAD)) { - if (instance->GetData(DATA_VEMISDEAD)) - { - DoCast(me, SPELL_ENRAGE); - VemDead = true; - } + DoCast(me, SPELL_ENRAGE); + VemDead = true; } } Check_Timer = 2000; diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp index d2b5b5eaf8c..9e3244cccdb 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -153,7 +153,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new eye_of_cthunAI(creature); + return GetInstanceAI<eye_of_cthunAI>(creature); } struct eye_of_cthunAI : public ScriptedAI @@ -161,8 +161,6 @@ public: eye_of_cthunAI(Creature* creature) : ScriptedAI(creature) { instance = creature->GetInstanceScript(); - if (!instance) - TC_LOG_ERROR("scripts", "No Instance eye_of_cthunAI"); SetCombatMovement(false); } @@ -206,8 +204,7 @@ public: me->SetVisible(true); //Reset Phase - if (instance) - instance->SetData(DATA_CTHUN_PHASE, PHASE_NOT_STARTED); + instance->SetData(DATA_CTHUN_PHASE, PHASE_NOT_STARTED); //to avoid having a following void zone Creature* pPortal= me->FindNearestCreature(NPC_CTHUN_PORTAL, 10); @@ -218,8 +215,7 @@ public: void EnterCombat(Unit* /*who*/) OVERRIDE { DoZoneInCombat(); - if (instance) - instance->SetData(DATA_CTHUN_PHASE, PHASE_EYE_GREEN_BEAM); + instance->SetData(DATA_CTHUN_PHASE, PHASE_EYE_GREEN_BEAM); } void SpawnEyeTentacle(float x, float y) @@ -236,10 +232,6 @@ public: if (!UpdateVictim()) return; - //No instance - if (!instance) - return; - uint32 currentPhase = instance->GetData(DATA_CTHUN_PHASE); if (currentPhase == PHASE_EYE_GREEN_BEAM || currentPhase == PHASE_EYE_RED_BEAM) { @@ -404,10 +396,6 @@ public: void DamageTaken(Unit* /*done_by*/, uint32 &damage) OVERRIDE { - //No instance - if (!instance) - return; - switch (instance->GetData(DATA_CTHUN_PHASE)) { case PHASE_EYE_GREEN_BEAM: @@ -459,7 +447,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new cthunAI(creature); + return GetInstanceAI<cthunAI>(creature); } struct cthunAI : public ScriptedAI @@ -469,8 +457,6 @@ public: SetCombatMovement(false); instance = creature->GetInstanceScript(); - if (!instance) - TC_LOG_ERROR("scripts", "No Instance eye_of_cthunAI"); } InstanceScript* instance; @@ -528,8 +514,7 @@ public: me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE); me->SetVisible(false); - if (instance) - instance->SetData(DATA_CTHUN_PHASE, PHASE_NOT_STARTED); + instance->SetData(DATA_CTHUN_PHASE, PHASE_NOT_STARTED); } void EnterCombat(Unit* /*who*/) OVERRIDE @@ -615,10 +600,6 @@ public: me->SetTarget(0); - //No instance - if (!instance) - return; - uint32 currentPhase = instance->GetData(DATA_CTHUN_PHASE); if (currentPhase == PHASE_CTHUN_STOMACH || currentPhase == PHASE_CTHUN_WEAK) { @@ -861,16 +842,11 @@ public: void JustDied(Unit* /*killer*/) OVERRIDE { - if (instance) - instance->SetData(DATA_CTHUN_PHASE, PHASE_CTHUN_DONE); + instance->SetData(DATA_CTHUN_PHASE, PHASE_CTHUN_DONE); } void DamageTaken(Unit* /*done_by*/, uint32 &damage) OVERRIDE { - //No instance - if (!instance) - return; - switch (instance->GetData(DATA_CTHUN_PHASE)) { case PHASE_CTHUN_STOMACH: diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_fankriss.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_fankriss.cpp index bc6f03517b8..910b09ec278 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_fankriss.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_fankriss.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_huhuran.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_huhuran.cpp index 2104d7f5837..34dc224214e 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_huhuran.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_huhuran.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_ouro.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_ouro.cpp index 33c3f29b94e..233dc12de4f 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_ouro.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_ouro.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_sartura.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_sartura.cpp index f640173efb2..b8042e8e106 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_sartura.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_sartura.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp index 1921cd77ce6..4708a563098 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp index 76665f649b3..81171eef580 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -103,10 +103,7 @@ struct boss_twinemperorsAI : public ScriptedAI Creature* GetOtherBoss() { - if (instance) - return Unit::GetCreature(*me, instance->GetData64(IAmVeklor() ? DATA_VEKNILASH : DATA_VEKLOR)); - else - return NULL; + return Unit::GetCreature(*me, instance->GetData64(IAmVeklor() ? DATA_VEKNILASH : DATA_VEKLOR)); } void DamageTaken(Unit* /*done_by*/, uint32 &damage) OVERRIDE @@ -210,9 +207,6 @@ struct boss_twinemperorsAI : public ScriptedAI void TeleportToMyBrother() { - if (!instance) - return; - Teleport_Timer = TELEPORTTIME; if (IAmVeklor()) @@ -394,7 +388,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_veknilashAI(creature); + return GetInstanceAI<boss_veknilashAI>(creature); } struct boss_veknilashAI : public boss_twinemperorsAI @@ -480,7 +474,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_veklorAI(creature); + return GetInstanceAI<boss_veklorAI>(creature); } struct boss_veklorAI : public boss_twinemperorsAI diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_viscidus.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_viscidus.cpp index 115d9d0d12c..44c70075a94 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_viscidus.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_viscidus.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -263,8 +263,6 @@ class npc_glob_of_viscidus : public CreatureScript void JustDied(Unit* /*killer*/) OVERRIDE { InstanceScript* Instance = me->GetInstanceScript(); - if (!Instance) - return; if (Creature* Viscidus = me->GetMap()->GetCreature(Instance->GetData64(DATA_VISCIDUS))) { @@ -289,14 +287,15 @@ class npc_glob_of_viscidus : public CreatureScript if (id == ROOM_CENTER) { DoCast(me, SPELL_REJOIN_VISCIDUS); - ((TempSummon*)me)->UnSummon(); + if (TempSummon* summon = me->ToTempSummon()) + summon->UnSummon(); } } }; CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_glob_of_viscidusAI(creature); + return GetInstanceAI<npc_glob_of_viscidusAI>(creature); } }; diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp index 0a5733f1c7f..b1402f95135 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/mob_anubisath_sentinel.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/mob_anubisath_sentinel.cpp index d78f8bd609d..7fc6af08d9d 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/mob_anubisath_sentinel.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/mob_anubisath_sentinel.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.h b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.h index 1a7ba226135..fc858ced774 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.h +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/WailingCaverns/instance_wailing_caverns.cpp b/src/server/scripts/Kalimdor/WailingCaverns/instance_wailing_caverns.cpp index 522345c4fd4..f903d1b6da8 100644 --- a/src/server/scripts/Kalimdor/WailingCaverns/instance_wailing_caverns.cpp +++ b/src/server/scripts/Kalimdor/WailingCaverns/instance_wailing_caverns.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp b/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp index a985f353976..72ced3d3399 100644 --- a/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp +++ b/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -81,7 +81,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_disciple_of_naralexAI(creature); + return GetInstanceAI<npc_disciple_of_naralexAI>(creature); } bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE @@ -152,9 +152,6 @@ public: void WaypointReached(uint32 waypointId) OVERRIDE { - if (!instance) - return; - switch (waypointId) { case 4: @@ -194,13 +191,10 @@ public: void JustDied(Unit* /*slayer*/) OVERRIDE { - if (instance) - { - instance->SetData(TYPE_NARALEX_EVENT, FAIL); - instance->SetData(TYPE_NARALEX_PART1, FAIL); - instance->SetData(TYPE_NARALEX_PART2, FAIL); - instance->SetData(TYPE_NARALEX_PART3, FAIL); - } + instance->SetData(TYPE_NARALEX_EVENT, FAIL); + instance->SetData(TYPE_NARALEX_PART1, FAIL); + instance->SetData(TYPE_NARALEX_PART2, FAIL); + instance->SetData(TYPE_NARALEX_PART3, FAIL); } void JustSummoned(Creature* summoned) OVERRIDE @@ -213,8 +207,6 @@ public: if (currentEvent != TYPE_NARALEX_PART3) npc_escortAI::UpdateAI(diff); - if (!instance) - return; if (eventTimer <= diff) { eventTimer = 0; diff --git a/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.h b/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.h index 0a1848acbf9..c331d5f43c1 100644 --- a/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.h +++ b/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/ZulFarrak/boss_zum_rah.cpp b/src/server/scripts/Kalimdor/ZulFarrak/boss_zum_rah.cpp index bc31fd118be..2ddd60ca442 100644 --- a/src/server/scripts/Kalimdor/ZulFarrak/boss_zum_rah.cpp +++ b/src/server/scripts/Kalimdor/ZulFarrak/boss_zum_rah.cpp @@ -1,5 +1,5 @@ /* -* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> +* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -78,8 +78,7 @@ public: void JustDied(Unit* /*killer*/) OVERRIDE { - if (instance) - instance->SetData(DATA_ZUM_RAH, DONE); + instance->SetData(DATA_ZUM_RAH, DONE); } void KilledUnit(Unit* /*victim*/) OVERRIDE @@ -150,7 +149,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_zum_rahAI(creature); + return GetInstanceAI<boss_zum_rahAI>(creature); } }; diff --git a/src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp b/src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp index 8cb1cfebd15..8a7b5effa67 100644 --- a/src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp +++ b/src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp b/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp index a2f98b21589..4b95d33a81e 100644 --- a/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp +++ b/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -97,7 +97,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_sergeant_blyAI(creature); + return GetInstanceAI<npc_sergeant_blyAI>(creature); } struct npc_sergeant_blyAI : public ScriptedAI @@ -148,12 +148,9 @@ public: if (Player* target = ObjectAccessor::GetPlayer(*me, PlayerGUID)) AttackStart(target); - if (instance) - { - switchFactionIfAlive(instance, ENTRY_RAVEN); - switchFactionIfAlive(instance, ENTRY_ORO); - switchFactionIfAlive(instance, ENTRY_MURTA); - } + switchFactionIfAlive(instance, ENTRY_RAVEN); + switchFactionIfAlive(instance, ENTRY_ORO); + switchFactionIfAlive(instance, ENTRY_MURTA); } postGossipStep++; } @@ -296,7 +293,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_weegli_blastfuseAI(creature); + return GetInstanceAI<npc_weegli_blastfuseAI>(creature); } struct npc_weegli_blastfuseAI : public ScriptedAI @@ -316,8 +313,7 @@ public: void Reset() OVERRIDE { - /*if (instance) - instance->SetData(0, NOT_STARTED);*/ + /*instance->SetData(0, NOT_STARTED);*/ } void AttackStart(Unit* victim) OVERRIDE @@ -327,8 +323,7 @@ public: void JustDied(Unit* /*killer*/) OVERRIDE { - /*if (instance) - instance->SetData(0, DONE);*/ + /*instance->SetData(0, DONE);*/ } void UpdateAI(uint32 diff) OVERRIDE @@ -358,22 +353,19 @@ public: void MovementInform(uint32 /*type*/, uint32 /*id*/) OVERRIDE { - if (instance) + if (instance->GetData(EVENT_PYRAMID) == PYRAMID_CAGES_OPEN) { - if (instance->GetData(EVENT_PYRAMID) == PYRAMID_CAGES_OPEN) - { - instance->SetData(EVENT_PYRAMID, PYRAMID_ARRIVED_AT_STAIR); - Talk(SAY_WEEGLI_OHNO); - me->SetHomePosition(1882.69f, 1272.28f, 41.87f, 0); - } - else - if (destroyingDoor) - { - instance->DoUseDoorOrButton(instance->GetData64(GO_END_DOOR)); - /// @todo leave the area... - me->DespawnOrUnsummon(); - }; + instance->SetData(EVENT_PYRAMID, PYRAMID_ARRIVED_AT_STAIR); + Talk(SAY_WEEGLI_OHNO); + me->SetHomePosition(1882.69f, 1272.28f, 41.87f, 0); } + else + if (destroyingDoor) + { + instance->DoUseDoorOrButton(instance->GetData64(GO_END_DOOR)); + /// @todo leave the area... + me->DespawnOrUnsummon(); + }; } void DoAction(int32 /*param*/) OVERRIDE diff --git a/src/server/scripts/Kalimdor/boss_azuregos.cpp b/src/server/scripts/Kalimdor/boss_azuregos.cpp index e433884c24a..3eceb2adcf7 100644 --- a/src/server/scripts/Kalimdor/boss_azuregos.cpp +++ b/src/server/scripts/Kalimdor/boss_azuregos.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/zone_ashenvale.cpp b/src/server/scripts/Kalimdor/zone_ashenvale.cpp index 8304f5ba9e4..41c0441bca5 100644 --- a/src/server/scripts/Kalimdor/zone_ashenvale.cpp +++ b/src/server/scripts/Kalimdor/zone_ashenvale.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/zone_azshara.cpp b/src/server/scripts/Kalimdor/zone_azshara.cpp index 5d28c7f018e..edc13c8d446 100644 --- a/src/server/scripts/Kalimdor/zone_azshara.cpp +++ b/src/server/scripts/Kalimdor/zone_azshara.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp b/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp index 2d588508b3f..38bc321d2af 100644 --- a/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp +++ b/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp b/src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp index f71c07b5c7d..c935a83b3ee 100644 --- a/src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp +++ b/src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/zone_darkshore.cpp b/src/server/scripts/Kalimdor/zone_darkshore.cpp index 5bb1a937035..ae98fbc4072 100644 --- a/src/server/scripts/Kalimdor/zone_darkshore.cpp +++ b/src/server/scripts/Kalimdor/zone_darkshore.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/zone_desolace.cpp b/src/server/scripts/Kalimdor/zone_desolace.cpp index 07609dac61f..58322963c6e 100644 --- a/src/server/scripts/Kalimdor/zone_desolace.cpp +++ b/src/server/scripts/Kalimdor/zone_desolace.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/zone_durotar.cpp b/src/server/scripts/Kalimdor/zone_durotar.cpp index 2074598e304..08f4f2ebfdf 100644 --- a/src/server/scripts/Kalimdor/zone_durotar.cpp +++ b/src/server/scripts/Kalimdor/zone_durotar.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp b/src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp index 5ee0a60e95a..6030ce9f8fc 100644 --- a/src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp +++ b/src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/zone_felwood.cpp b/src/server/scripts/Kalimdor/zone_felwood.cpp index 45ef955ccbb..2d322a7c079 100644 --- a/src/server/scripts/Kalimdor/zone_felwood.cpp +++ b/src/server/scripts/Kalimdor/zone_felwood.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/zone_feralas.cpp b/src/server/scripts/Kalimdor/zone_feralas.cpp index 3402722e2d7..11e95f325c2 100644 --- a/src/server/scripts/Kalimdor/zone_feralas.cpp +++ b/src/server/scripts/Kalimdor/zone_feralas.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/zone_moonglade.cpp b/src/server/scripts/Kalimdor/zone_moonglade.cpp index cf326752112..3b77a2c7a0b 100644 --- a/src/server/scripts/Kalimdor/zone_moonglade.cpp +++ b/src/server/scripts/Kalimdor/zone_moonglade.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/zone_mulgore.cpp b/src/server/scripts/Kalimdor/zone_mulgore.cpp index 2cc6f4bfb5b..f70460ec7b6 100644 --- a/src/server/scripts/Kalimdor/zone_mulgore.cpp +++ b/src/server/scripts/Kalimdor/zone_mulgore.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/zone_orgrimmar.cpp b/src/server/scripts/Kalimdor/zone_orgrimmar.cpp index f1887b9f55a..4b6670043bf 100644 --- a/src/server/scripts/Kalimdor/zone_orgrimmar.cpp +++ b/src/server/scripts/Kalimdor/zone_orgrimmar.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/zone_silithus.cpp b/src/server/scripts/Kalimdor/zone_silithus.cpp index 50c1056e349..b002bbe8a48 100644 --- a/src/server/scripts/Kalimdor/zone_silithus.cpp +++ b/src/server/scripts/Kalimdor/zone_silithus.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/zone_stonetalon_mountains.cpp b/src/server/scripts/Kalimdor/zone_stonetalon_mountains.cpp index 891879f2ea6..92fd5a3fd47 100644 --- a/src/server/scripts/Kalimdor/zone_stonetalon_mountains.cpp +++ b/src/server/scripts/Kalimdor/zone_stonetalon_mountains.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/zone_tanaris.cpp b/src/server/scripts/Kalimdor/zone_tanaris.cpp index 4ba246a18aa..204a2960611 100644 --- a/src/server/scripts/Kalimdor/zone_tanaris.cpp +++ b/src/server/scripts/Kalimdor/zone_tanaris.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/zone_teldrassil.cpp b/src/server/scripts/Kalimdor/zone_teldrassil.cpp index 96326febcac..a94813f2b0f 100644 --- a/src/server/scripts/Kalimdor/zone_teldrassil.cpp +++ b/src/server/scripts/Kalimdor/zone_teldrassil.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/zone_the_barrens.cpp b/src/server/scripts/Kalimdor/zone_the_barrens.cpp index 5b057f27a48..7b08baa0511 100644 --- a/src/server/scripts/Kalimdor/zone_the_barrens.cpp +++ b/src/server/scripts/Kalimdor/zone_the_barrens.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/zone_thousand_needles.cpp b/src/server/scripts/Kalimdor/zone_thousand_needles.cpp index a4af7c75e6a..f027fd05f8b 100644 --- a/src/server/scripts/Kalimdor/zone_thousand_needles.cpp +++ b/src/server/scripts/Kalimdor/zone_thousand_needles.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/zone_thunder_bluff.cpp b/src/server/scripts/Kalimdor/zone_thunder_bluff.cpp index fee15608884..10538fb2387 100644 --- a/src/server/scripts/Kalimdor/zone_thunder_bluff.cpp +++ b/src/server/scripts/Kalimdor/zone_thunder_bluff.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/zone_ungoro_crater.cpp b/src/server/scripts/Kalimdor/zone_ungoro_crater.cpp index 2d29ed361e9..dd165f807b2 100644 --- a/src/server/scripts/Kalimdor/zone_ungoro_crater.cpp +++ b/src/server/scripts/Kalimdor/zone_ungoro_crater.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Kalimdor/zone_winterspring.cpp b/src/server/scripts/Kalimdor/zone_winterspring.cpp index c9a526c6306..3ae8bc38120 100644 --- a/src/server/scripts/Kalimdor/zone_winterspring.cpp +++ b/src/server/scripts/Kalimdor/zone_winterspring.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/ahnkahet.h b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/ahnkahet.h index 5b8cf0a4d44..3830ba3c8aa 100644 --- a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/ahnkahet.h +++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/ahnkahet.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_amanitar.cpp b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_amanitar.cpp index 977aa97a974..8f71ae47bcb 100644 --- a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_amanitar.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_amanitar.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_elder_nadox.cpp b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_elder_nadox.cpp index 40c65374bd3..84c9181e495 100644 --- a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_elder_nadox.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_elder_nadox.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -232,7 +232,6 @@ public: npc_nadox_eggsAI(Creature* creature) : ScriptedAI(creature) { creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE); - creature->UpdateAllStats(); } void Reset() OVERRIDE { } diff --git a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_herald_volazj.cpp b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_herald_volazj.cpp index a5997dc4cf8..7555ba39206 100644 --- a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_herald_volazj.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_herald_volazj.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -149,11 +149,8 @@ public: uiShadowBoltVolleyTimer = 5*IN_MILLISECONDS; uiShiverTimer = 15*IN_MILLISECONDS; - if (instance) - { - instance->SetBossState(DATA_HERALD_VOLAZJ, NOT_STARTED); - instance->DoStopTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_QUICK_DEMISE_START_EVENT); - } + instance->SetBossState(DATA_HERALD_VOLAZJ, NOT_STARTED); + instance->DoStopTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_QUICK_DEMISE_START_EVENT); // Visible for all players in insanity me->SetPhaseMask((1|16|32|64|128|256), true); @@ -172,11 +169,8 @@ public: { Talk(SAY_AGGRO); - if (instance) - { - instance->SetBossState(DATA_HERALD_VOLAZJ, IN_PROGRESS); - instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_QUICK_DEMISE_START_EVENT); - } + instance->SetBossState(DATA_HERALD_VOLAZJ, IN_PROGRESS); + instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_QUICK_DEMISE_START_EVENT); } void JustSummoned(Creature* summon) OVERRIDE @@ -295,8 +289,7 @@ public: { Talk(SAY_DEATH); - if (instance) - instance->SetBossState(DATA_HERALD_VOLAZJ, DONE); + instance->SetBossState(DATA_HERALD_VOLAZJ, DONE); Summons.DespawnAll(); ResetPlayersPhaseMask(); @@ -311,7 +304,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_volazjAI(creature); + return GetInstanceAI<boss_volazjAI>(creature); } }; diff --git a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_jedoga_shadowseeker.cpp b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_jedoga_shadowseeker.cpp index fcd4d4d73b3..1890dfb4ff8 100644 --- a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_jedoga_shadowseeker.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_jedoga_shadowseeker.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -101,15 +101,12 @@ public: bCanDown = false; volunteerWork = true; - if (instance) - { - if (!bFirstTime) - instance->SetBossState(DATA_JEDOGA_SHADOWSEEKER, FAIL); + if (!bFirstTime) + instance->SetBossState(DATA_JEDOGA_SHADOWSEEKER, FAIL); - instance->SetData64(DATA_PL_JEDOGA_TARGET, 0); - instance->SetData64(DATA_ADD_JEDOGA_OPFER, 0); - instance->SetData(DATA_JEDOGA_RESET_INITIANDS, 0); - } + instance->SetData64(DATA_PL_JEDOGA_TARGET, 0); + instance->SetData64(DATA_ADD_JEDOGA_OPFER, 0); + instance->SetData(DATA_JEDOGA_RESET_INITIANDS, 0); MoveUp(); bFirstTime = false; @@ -144,8 +141,7 @@ public: void JustDied(Unit* /*killer*/) OVERRIDE { Talk(TEXT_DEATH); - if (instance) - instance->SetBossState(DATA_JEDOGA_SHADOWSEEKER, DONE); + instance->SetBossState(DATA_JEDOGA_SHADOWSEEKER, DONE); } void DoAction(int32 action) OVERRIDE @@ -197,9 +193,6 @@ public: void MoveDown() { - if (!instance) - return; - bOpFerokFail = false; instance->SetData(DATA_JEDOGA_TRIGGER_SWITCH, 0); @@ -233,9 +226,6 @@ public: void MoveUp() { - if (!instance) - return; - me->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, true); me->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_MAGIC, true); me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE + UNIT_FLAG_NON_ATTACKABLE); @@ -255,9 +245,6 @@ public: void OpferRufen() { - if (!instance) - return; - uint64 opfer = instance->GetData64(DATA_ADD_JEDOGA_INITIAND); if (opfer) @@ -281,9 +268,6 @@ public: void UpdateAI(uint32 diff) OVERRIDE { - if (!instance) - return; - if (instance->GetBossState(DATA_JEDOGA_SHADOWSEEKER) != IN_PROGRESS && instance->GetData(DATA_ALL_INITIAND_DEAD)) MoveDown(); @@ -337,7 +321,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_jedoga_shadowseekerAI(creature); + return GetInstanceAI<boss_jedoga_shadowseekerAI>(creature); } }; @@ -361,9 +345,6 @@ public: void Reset() OVERRIDE { - if (!instance) - return; - bWalking = false; bCheckTimer = 2*IN_MILLISECONDS; @@ -503,7 +484,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_jedoga_initiandAI(creature); + return GetInstanceAI<npc_jedoga_initiandAI>(creature); } }; @@ -549,9 +530,6 @@ public: void UpdateAI(uint32 /*diff*/) OVERRIDE { - if (!instance) - return; - if (!bRemoved && me->GetPositionX() > 440.0f) { if (instance->GetBossState(DATA_PRINCE_TALDARAM) == DONE) @@ -589,7 +567,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_jedogas_aufseher_triggerAI(creature); + return GetInstanceAI<npc_jedogas_aufseher_triggerAI>(creature); } }; diff --git a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp index e0098570923..77d3ce21d0c 100644 --- a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/instance_ahnkahet.cpp b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/instance_ahnkahet.cpp index 7207bbd3aab..6f03228ad76 100644 --- a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/instance_ahnkahet.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/instance_ahnkahet.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/azjol_nerub.h b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/azjol_nerub.h index 5087ed0cec3..674e5cf36bb 100644 --- a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/azjol_nerub.h +++ b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/azjol_nerub.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp index 81530265617..8a9fc2993a8 100644 --- a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -130,11 +130,8 @@ public: Summons.DespawnAll(); - if (instance) - { - instance->SetBossState(DATA_ANUBARAK, NOT_STARTED); - instance->DoStopTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT); - } + instance->SetBossState(DATA_ANUBARAK, NOT_STARTED); + instance->DoStopTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT); } Creature* DoSummonImpaleTarget(Unit* target) @@ -158,14 +155,12 @@ public: { Talk(SAY_AGGRO); DelayTimer = 0; - if (instance) - instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT); + instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT); } void DelayEventStart() { - if (instance) - instance->SetBossState(DATA_ANUBARAK, IN_PROGRESS); + instance->SetBossState(DATA_ANUBARAK, IN_PROGRESS); } void UpdateAI(uint32 diff) OVERRIDE @@ -335,8 +330,7 @@ public: { Talk(SAY_DEATH); Summons.DespawnAll(); - if (instance) - instance->SetBossState(DATA_ANUBARAK, DONE); + instance->SetBossState(DATA_ANUBARAK, DONE); } void KilledUnit(Unit* victim) OVERRIDE @@ -355,7 +349,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_anub_arakAI(creature); + return GetInstanceAI<boss_anub_arakAI>(creature); } }; diff --git a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_hadronox.cpp b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_hadronox.cpp index 1664a1375ae..7534e747ee0 100644 --- a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_hadronox.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_hadronox.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -102,14 +102,12 @@ public: void JustDied(Unit* /*killer*/) OVERRIDE { - if (instance) - instance->SetBossState(DATA_HADRONOX, DONE); + instance->SetBossState(DATA_HADRONOX, DONE); } void EnterCombat(Unit* /*who*/) OVERRIDE { - if (instance) - instance->SetBossState(DATA_HADRONOX, IN_PROGRESS); + instance->SetBossState(DATA_HADRONOX, IN_PROGRESS); me->SetInCombatWithZone(); } @@ -192,7 +190,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_hadronoxAI(creature); + return GetInstanceAI<boss_hadronoxAI>(creature); } }; diff --git a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_krikthir_the_gatewatcher.cpp b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_krikthir_the_gatewatcher.cpp index 143ccc29e0d..2fe619a5367 100644 --- a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_krikthir_the_gatewatcher.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_krikthir_the_gatewatcher.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -104,8 +104,7 @@ public: uiMindFlayTimer = 15*IN_MILLISECONDS; uiCurseFatigueTimer = 12*IN_MILLISECONDS; - if (instance) - instance->SetBossState(DATA_KRIKTHIR_THE_GATEWATCHER, NOT_STARTED); + instance->SetBossState(DATA_KRIKTHIR_THE_GATEWATCHER, NOT_STARTED); } void EnterCombat(Unit* /*who*/) OVERRIDE @@ -114,8 +113,7 @@ public: Summon(); uiSummonTimer = 15*IN_MILLISECONDS; - if (instance) - instance->SetBossState(DATA_KRIKTHIR_THE_GATEWATCHER, IN_PROGRESS); + instance->SetBossState(DATA_KRIKTHIR_THE_GATEWATCHER, IN_PROGRESS); } void Summon() @@ -175,8 +173,7 @@ public: { Talk(SAY_DEATH); - if (instance) - instance->SetBossState(DATA_KRIKTHIR_THE_GATEWATCHER, DONE); + instance->SetBossState(DATA_KRIKTHIR_THE_GATEWATCHER, DONE); } void KilledUnit(Unit* victim) OVERRIDE @@ -195,7 +192,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_krik_thirAI(creature); + return GetInstanceAI<boss_krik_thirAI>(creature); } }; diff --git a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/instance_azjol_nerub.cpp b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/instance_azjol_nerub.cpp index b20a28b7a75..0b641eea3bc 100644 --- a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/instance_azjol_nerub.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/instance_azjol_nerub.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/CMakeLists.txt b/src/server/scripts/Northrend/CMakeLists.txt index 285f8f866cb..42a7ee15bb6 100644 --- a/src/server/scripts/Northrend/CMakeLists.txt +++ b/src/server/scripts/Northrend/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> +# Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp index 9c5415375b7..045564ce570 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp +++ b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -340,40 +340,37 @@ public: void CallDragon(uint32 dataId) { - if (instance) + if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(dataId))) { - if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(dataId))) + if (temp->IsAlive() && !temp->GetVictim()) { - if (temp->IsAlive() && !temp->GetVictim()) - { - temp->SetWalk(false); + temp->SetWalk(false); - if (temp->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) - temp->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + if (temp->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) + temp->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - uint8 textId = 0; + uint8 textId = 0; - switch (temp->GetEntry()) - { - case NPC_TENEBRON: - textId = SAY_SARTHARION_CALL_TENEBRON; - temp->AddAura(SPELL_POWER_OF_TENEBRON, temp); - temp->GetMotionMaster()->MovePoint(POINT_ID_LAND, TenebronPositions[1]); - break; - case NPC_SHADRON: - textId = SAY_SARTHARION_CALL_SHADRON; - temp->AddAura(SPELL_POWER_OF_SHADRON, temp); - temp->GetMotionMaster()->MovePoint(POINT_ID_LAND, ShadronPositions[1]); - break; - case NPC_VESPERON: - textId = SAY_SARTHARION_CALL_VESPERON; - temp->AddAura(SPELL_POWER_OF_VESPERON, temp); - temp->GetMotionMaster()->MovePoint(POINT_ID_LAND, VesperonPositions[1]); - break; - } - - Talk(textId); + switch (temp->GetEntry()) + { + case NPC_TENEBRON: + textId = SAY_SARTHARION_CALL_TENEBRON; + temp->AddAura(SPELL_POWER_OF_TENEBRON, temp); + temp->GetMotionMaster()->MovePoint(POINT_ID_LAND, TenebronPositions[1]); + break; + case NPC_SHADRON: + textId = SAY_SARTHARION_CALL_SHADRON; + temp->AddAura(SPELL_POWER_OF_SHADRON, temp); + temp->GetMotionMaster()->MovePoint(POINT_ID_LAND, ShadronPositions[1]); + break; + case NPC_VESPERON: + textId = SAY_SARTHARION_CALL_VESPERON; + temp->AddAura(SPELL_POWER_OF_VESPERON, temp); + temp->GetMotionMaster()->MovePoint(POINT_ID_LAND, VesperonPositions[1]); + break; } + + Talk(textId); } } } @@ -470,7 +467,7 @@ public: CallDragon(DATA_TENEBRON); break; case EVENT_CALL_SHADRON: - CallDragon(DATA_SHADRON); + CallDragon(DATA_SHADRON); break; case EVENT_CALL_VESPERON: CallDragon(DATA_VESPERON); diff --git a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/instance_obsidian_sanctum.cpp b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/instance_obsidian_sanctum.cpp index ad1346e7f37..be5a42517b5 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/instance_obsidian_sanctum.cpp +++ b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/instance_obsidian_sanctum.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/obsidian_sanctum.cpp b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/obsidian_sanctum.cpp index 9476f4161aa..dd699911786 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/obsidian_sanctum.cpp +++ b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/obsidian_sanctum.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -350,22 +350,19 @@ struct dummy_dragonAI : public ScriptedAI Talk(SAY_DEATH); me->RemoveAurasDueToSpell(spellId); - if (instance) - { - instance->DoRemoveAurasDueToSpellOnPlayers(spellId); + instance->DoRemoveAurasDueToSpellOnPlayers(spellId); - // not if solo mini-boss fight - if (instance->GetBossState(DATA_SARTHARION) != IN_PROGRESS) - return; + // not if solo mini-boss fight + if (instance->GetBossState(DATA_SARTHARION) != IN_PROGRESS) + return; - // Twilight Revenge to main boss - if (Unit* sartharion = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_SARTHARION))) - if (sartharion->IsAlive()) - { - sartharion->RemoveAurasDueToSpell(spellId); - DoCast(sartharion, SPELL_TWILIGHT_REVENGE, true); - } - } + // Twilight Revenge to main boss + if (Unit* sartharion = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_SARTHARION))) + if (sartharion->IsAlive()) + { + sartharion->RemoveAurasDueToSpell(spellId); + DoCast(sartharion, SPELL_TWILIGHT_REVENGE, true); + } } void UpdateAI(uint32 diff) OVERRIDE diff --git a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/obsidian_sanctum.h b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/obsidian_sanctum.h index d8f49a06578..f26ad3a45ed 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/obsidian_sanctum.h +++ b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/obsidian_sanctum.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_baltharus_the_warborn.cpp b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_baltharus_the_warborn.cpp index a92df96113c..91c1563b494 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_baltharus_the_warborn.cpp +++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_baltharus_the_warborn.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_general_zarithrian.cpp b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_general_zarithrian.cpp index 175a64f49a5..d0b0db2e1ab 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_general_zarithrian.cpp +++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_general_zarithrian.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp index 3b706cdef25..0f583d54a13 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp +++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_saviana_ragefire.cpp b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_saviana_ragefire.cpp index 9f20cb4062a..bd5ab3d1a6e 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_saviana_ragefire.cpp +++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_saviana_ragefire.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/instance_ruby_sanctum.cpp b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/instance_ruby_sanctum.cpp index d6c71889962..1f8656853a2 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/instance_ruby_sanctum.cpp +++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/instance_ruby_sanctum.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/ruby_sanctum.cpp b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/ruby_sanctum.cpp index 9794d8c729f..d0a46b01bd4 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/ruby_sanctum.cpp +++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/ruby_sanctum.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/ruby_sanctum.h b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/ruby_sanctum.h index f50b10fb513..016d541cec9 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/ruby_sanctum.h +++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/ruby_sanctum.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp index f6fd1c14a9b..773009b06d6 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -196,8 +196,7 @@ public: if (MovementType != POINT_MOTION_TYPE) return; - if (instance) - instance->SetData(BOSS_ARGENT_CHALLENGE_E, DONE); + instance->SetData(BOSS_ARGENT_CHALLENGE_E, DONE); me->DisappearAndDie(); } @@ -248,7 +247,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_eadricAI(creature); + return GetInstanceAI<boss_eadricAI>(creature); } }; @@ -320,8 +319,7 @@ public: if (MovementType != POINT_MOTION_TYPE || Point != 0) return; - if (instance) - instance->SetData(BOSS_ARGENT_CHALLENGE_P, DONE); + instance->SetData(BOSS_ARGENT_CHALLENGE_P, DONE); me->DisappearAndDie(); } @@ -406,7 +404,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_paletressAI(creature); + return GetInstanceAI<boss_paletressAI>(creature); } }; @@ -582,14 +580,13 @@ public: void JustDied(Unit* /*killer*/) OVERRIDE { - if (instance) - instance->SetData(DATA_ARGENT_SOLDIER_DEFEATED, instance->GetData(DATA_ARGENT_SOLDIER_DEFEATED) + 1); + instance->SetData(DATA_ARGENT_SOLDIER_DEFEATED, instance->GetData(DATA_ARGENT_SOLDIER_DEFEATED) + 1); } }; CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_argent_soldierAI(creature); + return GetInstanceAI<npc_argent_soldierAI>(creature); } }; diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_black_knight.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_black_knight.cpp index 1922ad26060..5a0cd7cc3d2 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_black_knight.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_black_knight.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -293,14 +293,13 @@ public: { DoCast(me, SPELL_KILL_CREDIT); - if (instance) - instance->SetData(BOSS_BLACK_KNIGHT, DONE); + instance->SetData(BOSS_BLACK_KNIGHT, DONE); } }; CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_black_knightAI(creature); + return GetInstanceAI<boss_black_knightAI>(creature); } }; diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_grand_champions.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_grand_champions.cpp index 8bff123af75..3b1b5d4fd24 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_grand_champions.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_grand_champions.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -207,9 +207,6 @@ public: void WaypointReached(uint32 waypointId) OVERRIDE { - if (!instance) - return; - switch (waypointId) { case 2: @@ -300,7 +297,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new generic_vehicleAI_toc5AI(creature); + return GetInstanceAI<generic_vehicleAI_toc5AI>(creature); } }; @@ -426,14 +423,13 @@ public: void JustDied(Unit* /*killer*/) OVERRIDE { - if (instance) - instance->SetData(BOSS_GRAND_CHAMPIONS, DONE); + instance->SetData(BOSS_GRAND_CHAMPIONS, DONE); } }; CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_warrior_toc5AI(creature); + return GetInstanceAI<boss_warrior_toc5AI>(creature); } }; @@ -507,8 +503,7 @@ public: else if (instance && me->GetGUID() == instance->GetData64(DATA_GRAND_CHAMPION_3)) me->SetHomePosition(754.34f, 660.70f, 412.39f, 4.79f); - if (instance) - instance->SetData(BOSS_GRAND_CHAMPIONS, IN_PROGRESS); + instance->SetData(BOSS_GRAND_CHAMPIONS, IN_PROGRESS); EnterEvadeMode(); bHome = true; @@ -565,14 +560,13 @@ public: void JustDied(Unit* /*killer*/) OVERRIDE { - if (instance) - instance->SetData(BOSS_GRAND_CHAMPIONS, DONE); + instance->SetData(BOSS_GRAND_CHAMPIONS, DONE); } }; CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_mage_toc5AI(creature); + return GetInstanceAI<boss_mage_toc5AI>(creature); } }; @@ -652,8 +646,7 @@ public: else if (instance && me->GetGUID() == instance->GetData64(DATA_GRAND_CHAMPION_3)) me->SetHomePosition(754.34f, 660.70f, 412.39f, 4.79f); - if (instance) - instance->SetData(BOSS_GRAND_CHAMPIONS, IN_PROGRESS); + instance->SetData(BOSS_GRAND_CHAMPIONS, IN_PROGRESS); EnterEvadeMode(); bHome = true; @@ -712,14 +705,13 @@ public: void JustDied(Unit* /*killer*/) OVERRIDE { - if (instance) - instance->SetData(BOSS_GRAND_CHAMPIONS, DONE); + instance->SetData(BOSS_GRAND_CHAMPIONS, DONE); } }; CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_shaman_toc5AI(creature); + return GetInstanceAI<boss_shaman_toc5AI>(creature); } }; @@ -798,8 +790,7 @@ public: else if (instance && me->GetGUID() == instance->GetData64(DATA_GRAND_CHAMPION_3)) me->SetHomePosition(754.34f, 660.70f, 412.39f, 4.79f); - if (instance) - instance->SetData(BOSS_GRAND_CHAMPIONS, IN_PROGRESS); + instance->SetData(BOSS_GRAND_CHAMPIONS, IN_PROGRESS); EnterEvadeMode(); bHome = true; @@ -868,14 +859,13 @@ public: void JustDied(Unit* /*killer*/) OVERRIDE { - if (instance) - instance->SetData(BOSS_GRAND_CHAMPIONS, DONE); + instance->SetData(BOSS_GRAND_CHAMPIONS, DONE); } }; CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_hunter_toc5AI(creature); + return GetInstanceAI<boss_hunter_toc5AI>(creature); } }; @@ -946,8 +936,7 @@ public: else if (instance && me->GetGUID() == instance->GetData64(DATA_GRAND_CHAMPION_3)) me->SetHomePosition(754.34f, 660.70f, 412.39f, 4.79f); - if (instance) - instance->SetData(BOSS_GRAND_CHAMPIONS, IN_PROGRESS); + instance->SetData(BOSS_GRAND_CHAMPIONS, IN_PROGRESS); EnterEvadeMode(); bHome = true; @@ -989,14 +978,13 @@ public: void JustDied(Unit* /*killer*/) OVERRIDE { - if (instance) - instance->SetData(BOSS_GRAND_CHAMPIONS, DONE); + instance->SetData(BOSS_GRAND_CHAMPIONS, DONE); } }; CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_rouge_toc5AI(creature); + return GetInstanceAI<boss_rouge_toc5AI>(creature); } }; diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/instance_trial_of_the_champion.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/instance_trial_of_the_champion.cpp index 2a203b49764..1f8b281b807 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/instance_trial_of_the_champion.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/instance_trial_of_the_champion.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.cpp index 00b312aa407..ab21393fce3 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -236,11 +236,8 @@ public: if (Vehicle* pVehicle = pBoss->GetVehicleKit()) if (Unit* unit = pVehicle->GetPassenger(0)) uiGrandChampionBoss1 = unit->GetGUID(); - if (instance) - { - instance->SetData64(DATA_GRAND_CHAMPION_VEHICLE_1, uiVehicle1GUID); - instance->SetData64(DATA_GRAND_CHAMPION_1, uiGrandChampionBoss1); - } + instance->SetData64(DATA_GRAND_CHAMPION_VEHICLE_1, uiVehicle1GUID); + instance->SetData64(DATA_GRAND_CHAMPION_1, uiGrandChampionBoss1); pBoss->AI()->SetData(1, 0); break; } @@ -251,11 +248,8 @@ public: if (Vehicle* pVehicle = pBoss->GetVehicleKit()) if (Unit* unit = pVehicle->GetPassenger(0)) uiGrandChampionBoss2 = unit->GetGUID(); - if (instance) - { - instance->SetData64(DATA_GRAND_CHAMPION_VEHICLE_2, uiVehicle2GUID); - instance->SetData64(DATA_GRAND_CHAMPION_2, uiGrandChampionBoss2); - } + instance->SetData64(DATA_GRAND_CHAMPION_VEHICLE_2, uiVehicle2GUID); + instance->SetData64(DATA_GRAND_CHAMPION_2, uiGrandChampionBoss2); pBoss->AI()->SetData(2, 0); break; } @@ -266,11 +260,8 @@ public: if (Vehicle* pVehicle = pBoss->GetVehicleKit()) if (Unit* unit = pVehicle->GetPassenger(0)) uiGrandChampionBoss3 = unit->GetGUID(); - if (instance) - { - instance->SetData64(DATA_GRAND_CHAMPION_VEHICLE_3, uiVehicle3GUID); - instance->SetData64(DATA_GRAND_CHAMPION_3, uiGrandChampionBoss3); - } + instance->SetData64(DATA_GRAND_CHAMPION_VEHICLE_3, uiVehicle3GUID); + instance->SetData64(DATA_GRAND_CHAMPION_3, uiGrandChampionBoss3); pBoss->AI()->SetData(3, 0); break; } @@ -359,9 +350,6 @@ public: void StartEncounter() { - if (!instance) - return; - me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); if (instance->GetData(BOSS_BLACK_KNIGHT) == NOT_STARTED) @@ -472,7 +460,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_announcer_toc5AI(creature); + return GetInstanceAI<npc_announcer_toc5AI>(creature); } bool OnGossipHello(Player* player, Creature* creature) OVERRIDE diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.h b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.h index 8812b578827..2b69fcbcc08 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.h +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp index 32a8a2fe379..0b9b9f2543f 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2010 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -201,8 +201,7 @@ class boss_anubarak_trial : public CreatureScript if (who->GetTypeId() == TYPEID_PLAYER) { Talk(SAY_KILL_PLAYER); - if (instance) - instance->SetData(DATA_TRIBUTE_TO_IMMORTALITY_ELIGIBLE, 0); + instance->SetData(DATA_TRIBUTE_TO_IMMORTALITY_ELIGIBLE, 0); } } @@ -218,8 +217,7 @@ class boss_anubarak_trial : public CreatureScript void JustReachedHome() OVERRIDE { - if (instance) - instance->SetBossState(BOSS_ANUBARAK, FAIL); + instance->SetBossState(BOSS_ANUBARAK, FAIL); //Summon Scarab Swarms neutral at random places for (int i = 0; i < 10; i++) if (Creature* temp = me->SummonCreature(NPC_SCARAB, AnubarakLoc[1].GetPositionX()+urand(0, 50)-25, AnubarakLoc[1].GetPositionY()+urand(0, 50)-25, AnubarakLoc[1].GetPositionZ())) @@ -245,7 +243,6 @@ class boss_anubarak_trial : public CreatureScript void JustSummoned(Creature* summoned) OVERRIDE { - Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true); switch (summoned->GetEntry()) { case NPC_BURROW: @@ -255,9 +252,12 @@ class boss_anubarak_trial : public CreatureScript summoned->SetDisplayId(summoned->GetCreatureTemplate()->Modelid2); break; case NPC_SPIKE: - summoned->CombatStart(target); summoned->SetDisplayId(summoned->GetCreatureTemplate()->Modelid1); - Talk(EMOTE_SPIKE, target); + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true)) + { + summoned->CombatStart(target); + Talk(EMOTE_SPIKE, target); + } break; default: break; @@ -423,7 +423,7 @@ class boss_anubarak_trial : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_anubarak_trialAI(creature); + return GetInstanceAI<boss_anubarak_trialAI>(creature); }; }; @@ -495,7 +495,7 @@ class npc_swarm_scarab : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_swarm_scarabAI(creature); + return GetInstanceAI<npc_swarm_scarabAI>(creature); }; }; @@ -583,7 +583,7 @@ class npc_nerubian_burrower : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_nerubian_burrowerAI(creature); + return GetInstanceAI<npc_nerubian_burrowerAI>(creature); }; }; diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp index 4c73d1a5f55..44a6ddb368f 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -539,7 +539,7 @@ class boss_toc_champion_controller : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_toc_champion_controllerAI(creature); + return GetInstanceAI<boss_toc_champion_controllerAI>(creature); } }; @@ -559,9 +559,8 @@ struct boss_faction_championsAI : public BossAI void JustReachedHome() OVERRIDE { - if (instance) - if (Creature* pChampionController = Unit::GetCreature((*me), instance->GetData64(NPC_CHAMPIONS_CONTROLLER))) - pChampionController->AI()->SetData(2, FAIL); + if (Creature* pChampionController = Unit::GetCreature((*me), instance->GetData64(NPC_CHAMPIONS_CONTROLLER))) + pChampionController->AI()->SetData(2, FAIL); me->DespawnOrUnsummon(); } @@ -610,18 +609,16 @@ struct boss_faction_championsAI : public BossAI void JustDied(Unit* /*killer*/) OVERRIDE { if (_aiType != AI_PET) - if (instance) - if (Creature* pChampionController = Unit::GetCreature((*me), instance->GetData64(NPC_CHAMPIONS_CONTROLLER))) - pChampionController->AI()->SetData(2, DONE); + if (Creature* pChampionController = Unit::GetCreature((*me), instance->GetData64(NPC_CHAMPIONS_CONTROLLER))) + pChampionController->AI()->SetData(2, DONE); } void EnterCombat(Unit* /*who*/) OVERRIDE { DoCast(me, SPELL_ANTI_AOE, true); _EnterCombat(); - if (instance) - if (Creature* pChampionController = Unit::GetCreature((*me), instance->GetData64(NPC_CHAMPIONS_CONTROLLER))) - pChampionController->AI()->SetData(2, IN_PROGRESS); + if (Creature* pChampionController = Unit::GetCreature((*me), instance->GetData64(NPC_CHAMPIONS_CONTROLLER))) + pChampionController->AI()->SetData(2, IN_PROGRESS); } void KilledUnit(Unit* who) OVERRIDE @@ -635,20 +632,17 @@ struct boss_faction_championsAI : public BossAI if (Player* player = players.begin()->GetSource()) TeamInInstance = player->GetTeam(); - if (instance) + if (TeamInInstance == ALLIANCE) { - if (TeamInInstance == ALLIANCE) - { - if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(NPC_VARIAN))) - temp->AI()->Talk(SAY_KILL_PLAYER); - } - else - if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(NPC_GARROSH))) - temp->AI()->Talk(SAY_KILL_PLAYER); + if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(NPC_VARIAN))) + temp->AI()->Talk(SAY_KILL_PLAYER); + } + else + if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(NPC_GARROSH))) + temp->AI()->Talk(SAY_KILL_PLAYER); - instance->SetData(DATA_TRIBUTE_TO_IMMORTALITY_ELIGIBLE, 0); - } + instance->SetData(DATA_TRIBUTE_TO_IMMORTALITY_ELIGIBLE, 0); } } @@ -839,7 +833,7 @@ class npc_toc_druid : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_toc_druidAI(creature); + return GetInstanceAI<npc_toc_druidAI>(creature); } }; @@ -932,7 +926,7 @@ class npc_toc_shaman : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_toc_shamanAI(creature); + return GetInstanceAI<npc_toc_shamanAI>(creature); } }; @@ -1036,7 +1030,7 @@ class npc_toc_paladin : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_toc_paladinAI(creature); + return GetInstanceAI<npc_toc_paladinAI>(creature); } }; @@ -1121,7 +1115,7 @@ class npc_toc_priest : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_toc_priestAI(creature); + return GetInstanceAI<npc_toc_priestAI>(creature); } }; @@ -1219,7 +1213,7 @@ class npc_toc_shadow_priest : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_toc_shadow_priestAI(creature); + return GetInstanceAI<npc_toc_shadow_priestAI>(creature); } }; @@ -1310,7 +1304,7 @@ class npc_toc_warlock : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_toc_warlockAI(creature); + return GetInstanceAI<npc_toc_warlockAI>(creature); } }; @@ -1404,7 +1398,7 @@ class npc_toc_mage : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_toc_mageAI(creature); + return GetInstanceAI<npc_toc_mageAI>(creature); } }; @@ -1506,7 +1500,7 @@ class npc_toc_hunter : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_toc_hunterAI(creature); + return GetInstanceAI<npc_toc_hunterAI>(creature); } }; @@ -1598,7 +1592,7 @@ class npc_toc_boomkin : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_toc_boomkinAI(creature); + return GetInstanceAI<npc_toc_boomkinAI>(creature); } }; @@ -1702,7 +1696,7 @@ class npc_toc_warrior : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_toc_warriorAI(creature); + return GetInstanceAI<npc_toc_warriorAI>(creature); } }; @@ -1798,7 +1792,7 @@ class npc_toc_dk : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_toc_dkAI(creature); + return GetInstanceAI<npc_toc_dkAI>(creature); } }; @@ -1903,7 +1897,7 @@ class npc_toc_rogue : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_toc_rogueAI(creature); + return GetInstanceAI<npc_toc_rogueAI>(creature); } }; @@ -2029,7 +2023,7 @@ class npc_toc_enh_shaman : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_toc_enh_shamanAI(creature); + return GetInstanceAI<npc_toc_enh_shamanAI>(creature); } }; @@ -2135,7 +2129,7 @@ class npc_toc_retro_paladin : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_toc_retro_paladinAI(creature); + return GetInstanceAI<npc_toc_retro_paladinAI>(creature); } }; @@ -2187,7 +2181,7 @@ class npc_toc_pet_warlock : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_toc_pet_warlockAI(creature); + return GetInstanceAI<npc_toc_pet_warlockAI>(creature); } }; @@ -2227,7 +2221,7 @@ class npc_toc_pet_hunter : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_toc_pet_hunterAI(creature); + return GetInstanceAI<npc_toc_pet_hunterAI>(creature); } }; diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp index 3fa9ac7387f..99423a4b7ae 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2010 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -116,8 +116,7 @@ class boss_jaraxxus : public CreatureScript void JustReachedHome() OVERRIDE { _JustReachedHome(); - if (instance) - instance->SetBossState(BOSS_JARAXXUS, FAIL); + instance->SetBossState(BOSS_JARAXXUS, FAIL); DoCast(me, SPELL_JARAXXUS_CHAINS); me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); } @@ -127,8 +126,7 @@ class boss_jaraxxus : public CreatureScript if (who->GetTypeId() == TYPEID_PLAYER) { Talk(SAY_KILL_PLAYER); - if (instance) - instance->SetData(DATA_TRIBUTE_TO_IMMORTALITY_ELIGIBLE, 0); + instance->SetData(DATA_TRIBUTE_TO_IMMORTALITY_ELIGIBLE, 0); } } @@ -214,7 +212,7 @@ class boss_jaraxxus : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_jaraxxusAI(creature); + return GetInstanceAI<boss_jaraxxusAI>(creature); } }; @@ -250,7 +248,7 @@ class npc_legion_flame : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_legion_flameAI(creature); + return GetInstanceAI<npc_legion_flameAI>(creature); } }; @@ -355,7 +353,7 @@ class npc_fel_infernal : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_fel_infernalAI(creature); + return GetInstanceAI<npc_fel_infernalAI>(creature); } }; @@ -488,7 +486,7 @@ class npc_mistress_of_pain : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_mistress_of_painAI(creature); + return GetInstanceAI<npc_mistress_of_painAI>(creature); } }; diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp index 5b90676fffc..a11a74250f5 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2010 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -195,17 +195,14 @@ class boss_gormok : public CreatureScript void JustDied(Unit* /*killer*/) OVERRIDE { - if (instance) - instance->SetData(TYPE_NORTHREND_BEASTS, GORMOK_DONE); + instance->SetData(TYPE_NORTHREND_BEASTS, GORMOK_DONE); } void JustReachedHome() OVERRIDE { - if (instance) - { - instance->DoUseDoorOrButton(instance->GetData64(GO_MAIN_GATE_DOOR)); - instance->SetData(TYPE_NORTHREND_BEASTS, FAIL); - } + instance->DoUseDoorOrButton(instance->GetData64(GO_MAIN_GATE_DOOR)); + instance->SetData(TYPE_NORTHREND_BEASTS, FAIL); + me->DespawnOrUnsummon(); } @@ -284,7 +281,7 @@ class boss_gormok : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_gormokAI(creature); + return GetInstanceAI<boss_gormokAI>(creature); } }; @@ -454,7 +451,7 @@ class npc_snobold_vassal : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_snobold_vassalAI(creature); + return GetInstanceAI<npc_snobold_vassalAI>(creature); } }; @@ -490,7 +487,7 @@ class npc_firebomb : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_firebombAI(creature); + return GetInstanceAI<npc_firebombAI>(creature); } }; @@ -514,20 +511,17 @@ struct boss_jormungarAI : public BossAI void JustDied(Unit* /*killer*/) OVERRIDE { - if (instance) + if (Creature* otherWorm = Unit::GetCreature(*me, instance->GetData64(OtherWormEntry))) { - if (Creature* otherWorm = Unit::GetCreature(*me, instance->GetData64(OtherWormEntry))) + if (!otherWorm->IsAlive()) { - if (!otherWorm->IsAlive()) - { - instance->SetData(TYPE_NORTHREND_BEASTS, SNAKES_DONE); + instance->SetData(TYPE_NORTHREND_BEASTS, SNAKES_DONE); - me->DespawnOrUnsummon(); - otherWorm->DespawnOrUnsummon(); - } - else - instance->SetData(TYPE_NORTHREND_BEASTS, SNAKES_SPECIAL); + me->DespawnOrUnsummon(); + otherWorm->DespawnOrUnsummon(); } + else + instance->SetData(TYPE_NORTHREND_BEASTS, SNAKES_SPECIAL); } } @@ -543,16 +537,14 @@ struct boss_jormungarAI : public BossAI void KilledUnit(Unit* who) OVERRIDE { if (who->GetTypeId() == TYPEID_PLAYER) - if (instance) - instance->SetData(DATA_TRIBUTE_TO_IMMORTALITY_ELIGIBLE, 0); + instance->SetData(DATA_TRIBUTE_TO_IMMORTALITY_ELIGIBLE, 0); } void EnterCombat(Unit* /*who*/) OVERRIDE { _EnterCombat(); me->SetInCombatWithZone(); - if (instance) - instance->SetData(TYPE_NORTHREND_BEASTS, SNAKES_IN_PROGRESS); + instance->SetData(TYPE_NORTHREND_BEASTS, SNAKES_IN_PROGRESS); } void UpdateAI(uint32 diff) OVERRIDE @@ -712,7 +704,7 @@ class boss_acidmaw : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_acidmawAI(creature); + return GetInstanceAI<boss_acidmawAI>(creature); } }; @@ -770,8 +762,7 @@ class boss_dreadscale : public CreatureScript void JustReachedHome() OVERRIDE { - if (instance) - instance->DoUseDoorOrButton(instance->GetData64(GO_MAIN_GATE_DOOR)); + instance->DoUseDoorOrButton(instance->GetData64(GO_MAIN_GATE_DOOR)); boss_jormungarAI::JustReachedHome(); } @@ -779,7 +770,7 @@ class boss_dreadscale : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_dreadscaleAI(creature); + return GetInstanceAI<boss_dreadscaleAI>(creature); } }; @@ -820,7 +811,7 @@ class npc_slime_pool : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_slime_poolAI(creature); + return GetInstanceAI<npc_slime_poolAI>(creature); } }; @@ -884,8 +875,7 @@ class boss_icehowl : public CreatureScript void JustDied(Unit* /*killer*/) OVERRIDE { _JustDied(); - if (instance) - instance->SetData(TYPE_NORTHREND_BEASTS, ICEHOWL_DONE); + instance->SetData(TYPE_NORTHREND_BEASTS, ICEHOWL_DONE); } void MovementInform(uint32 type, uint32 pointId) OVERRIDE @@ -933,11 +923,8 @@ class boss_icehowl : public CreatureScript void JustReachedHome() OVERRIDE { - if (instance) - { - instance->DoUseDoorOrButton(instance->GetData64(GO_MAIN_GATE_DOOR)); - instance->SetData(TYPE_NORTHREND_BEASTS, FAIL); - } + instance->DoUseDoorOrButton(instance->GetData64(GO_MAIN_GATE_DOOR)); + instance->SetData(TYPE_NORTHREND_BEASTS, FAIL); me->DespawnOrUnsummon(); } @@ -945,16 +932,14 @@ class boss_icehowl : public CreatureScript { if (who->GetTypeId() == TYPEID_PLAYER) { - if (instance) - instance->SetData(DATA_TRIBUTE_TO_IMMORTALITY_ELIGIBLE, 0); + instance->SetData(DATA_TRIBUTE_TO_IMMORTALITY_ELIGIBLE, 0); } } void EnterCombat(Unit* /*who*/) OVERRIDE { _EnterCombat(); - if (instance) - instance->SetData(TYPE_NORTHREND_BEASTS, ICEHOWL_IN_PROGRESS); + instance->SetData(TYPE_NORTHREND_BEASTS, ICEHOWL_IN_PROGRESS); } void SpellHitTarget(Unit* target, SpellInfo const* spell) OVERRIDE @@ -1137,7 +1122,7 @@ class boss_icehowl : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_icehowlAI(creature); + return GetInstanceAI<boss_icehowlAI>(creature); } }; diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp index 0674696a033..0d7dc9062ad 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2010 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -165,8 +165,7 @@ struct boss_twin_baseAI : public BossAI void JustReachedHome() OVERRIDE { - if (instance) - instance->SetBossState(BOSS_VALKIRIES, FAIL); + instance->SetBossState(BOSS_VALKIRIES, FAIL); summons.DespawnAll(); me->DespawnOrUnsummon(); @@ -193,8 +192,7 @@ struct boss_twin_baseAI : public BossAI if (who->GetTypeId() == TYPEID_PLAYER) { Talk(SAY_KILL_PLAYER); - if (instance) - instance->SetData(DATA_TRIBUTE_TO_IMMORTALITY_ELIGIBLE, 0); + instance->SetData(DATA_TRIBUTE_TO_IMMORTALITY_ELIGIBLE, 0); } } @@ -227,21 +225,18 @@ struct boss_twin_baseAI : public BossAI void JustDied(Unit* /*killer*/) OVERRIDE { Talk(SAY_DEATH); - if (instance) + if (Creature* pSister = GetSister()) { - if (Creature* pSister = GetSister()) + if (!pSister->IsAlive()) { - if (!pSister->IsAlive()) - { - me->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); - pSister->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); - _JustDied(); - } - else - { - me->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); - instance->SetBossState(BOSS_VALKIRIES, SPECIAL); - } + me->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + pSister->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + _JustDied(); + } + else + { + me->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + instance->SetBossState(BOSS_VALKIRIES, SPECIAL); } } summons.DespawnAll(); @@ -256,15 +251,12 @@ struct boss_twin_baseAI : public BossAI void EnterCombat(Unit* /*who*/) OVERRIDE { me->SetInCombatWithZone(); - if (instance) + if (Creature* pSister = GetSister()) { - if (Creature* pSister = GetSister()) - { - me->AddAura(MyEmphatySpellId, pSister); - pSister->SetInCombatWithZone(); - } - instance->SetBossState(BOSS_VALKIRIES, IN_PROGRESS); + me->AddAura(MyEmphatySpellId, pSister); + pSister->SetInCombatWithZone(); } + instance->SetBossState(BOSS_VALKIRIES, IN_PROGRESS); Talk(SAY_AGGRO); DoCast(me, SurgeSpellId); @@ -289,7 +281,6 @@ struct boss_twin_baseAI : public BossAI { SetEquipmentSlots(false, Weapon, mode ? Weapon : int32(EQUIP_UNEQUIP), EQUIP_UNEQUIP); me->SetCanDualWield(mode); - me->UpdateDamagePhysical(mode ? OFF_ATTACK : BASE_ATTACK); } void UpdateAI(uint32 diff) OVERRIDE @@ -420,15 +411,13 @@ class boss_fjola : public CreatureScript TouchSpellId = SPELL_LIGHT_TOUCH; SpikeSpellId = SPELL_LIGHT_TWIN_SPIKE; - if (instance) - instance->DoStopTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, EVENT_START_TWINS_FIGHT); + instance->DoStopTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, EVENT_START_TWINS_FIGHT); boss_twin_baseAI::Reset(); } void EnterCombat(Unit* who) OVERRIDE { - if (instance) - instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, EVENT_START_TWINS_FIGHT); + instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, EVENT_START_TWINS_FIGHT); me->SummonCreature(NPC_BULLET_CONTROLLER, ToCCommonLoc[1].GetPositionX(), ToCCommonLoc[1].GetPositionY(), ToCCommonLoc[1].GetPositionZ(), 0.0f, TEMPSUMMON_MANUAL_DESPAWN); boss_twin_baseAI::EnterCombat(who); @@ -442,8 +431,7 @@ class boss_fjola : public CreatureScript void JustReachedHome() OVERRIDE { - if (instance) - instance->DoUseDoorOrButton(instance->GetData64(GO_MAIN_GATE_DOOR)); + instance->DoUseDoorOrButton(instance->GetData64(GO_MAIN_GATE_DOOR)); boss_twin_baseAI::JustReachedHome(); } @@ -451,7 +439,7 @@ class boss_fjola : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_fjolaAI(creature); + return GetInstanceAI<boss_fjolaAI>(creature); } }; @@ -486,7 +474,7 @@ class boss_eydis : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_eydisAI(creature); + return GetInstanceAI<boss_eydisAI>(creature); } }; diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp index a72d3917004..c0e49fa43fb 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp index 36cf9432d96..cb0ec2acc38 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -357,7 +357,7 @@ class boss_lich_king_toc : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_lich_king_tocAI(creature); + return GetInstanceAI<boss_lich_king_tocAI>(creature); } }; @@ -531,7 +531,7 @@ class npc_fizzlebang_toc : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_fizzlebang_tocAI(creature); + return GetInstanceAI<npc_fizzlebang_tocAI>(creature); } }; @@ -819,7 +819,7 @@ class npc_tirion_toc : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_tirion_tocAI(creature); + return GetInstanceAI<npc_tirion_tocAI>(creature); } }; @@ -903,7 +903,7 @@ class npc_garrosh_toc : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_garrosh_tocAI(creature); + return GetInstanceAI<npc_garrosh_tocAI>(creature); } }; @@ -987,7 +987,7 @@ class npc_varian_toc : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_varian_tocAI(creature); + return GetInstanceAI<npc_varian_tocAI>(creature); } }; diff --git a/src/server/scripts/Northrend/DraktharonKeep/boss_king_dred.cpp b/src/server/scripts/Northrend/DraktharonKeep/boss_king_dred.cpp index 42f408861e1..7b55452105b 100644 --- a/src/server/scripts/Northrend/DraktharonKeep/boss_king_dred.cpp +++ b/src/server/scripts/Northrend/DraktharonKeep/boss_king_dred.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp b/src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp index 71386167d5d..09db3f89c26 100644 --- a/src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp +++ b/src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/DraktharonKeep/boss_tharon_ja.cpp b/src/server/scripts/Northrend/DraktharonKeep/boss_tharon_ja.cpp index 78399749fe6..8022c19180c 100644 --- a/src/server/scripts/Northrend/DraktharonKeep/boss_tharon_ja.cpp +++ b/src/server/scripts/Northrend/DraktharonKeep/boss_tharon_ja.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp b/src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp index d0cec8a4f43..4fc8f532c47 100644 --- a/src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp +++ b/src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/DraktharonKeep/drak_tharon_keep.h b/src/server/scripts/Northrend/DraktharonKeep/drak_tharon_keep.h index c2d957b7c0a..b5e7be25d73 100644 --- a/src/server/scripts/Northrend/DraktharonKeep/drak_tharon_keep.h +++ b/src/server/scripts/Northrend/DraktharonKeep/drak_tharon_keep.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/DraktharonKeep/instance_drak_tharon_keep.cpp b/src/server/scripts/Northrend/DraktharonKeep/instance_drak_tharon_keep.cpp index d9e34ee2af3..112afe732b6 100644 --- a/src/server/scripts/Northrend/DraktharonKeep/instance_drak_tharon_keep.cpp +++ b/src/server/scripts/Northrend/DraktharonKeep/instance_drak_tharon_keep.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -170,7 +170,7 @@ class instance_drak_tharon_keep : public InstanceMapScript return saveStream.str(); } - void Load(char const* str) OVERRIDE OVERRIDE + void Load(char const* str) OVERRIDE { if (!str) { diff --git a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_bronjahm.cpp b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_bronjahm.cpp index 2dedc986b0c..2e0466d19d0 100644 --- a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_bronjahm.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_bronjahm.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -188,7 +188,7 @@ class boss_bronjahm : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_bronjahmAI(creature); + return GetInstanceAI<boss_bronjahmAI>(creature); } }; @@ -209,19 +209,16 @@ class npc_corrupted_soul_fragment : public CreatureScript if (type != CHASE_MOTION_TYPE) return; - if (instance) + if (TempSummon* summ = me->ToTempSummon()) { - if (TempSummon* summ = me->ToTempSummon()) - { - uint64 BronjahmGUID = instance->GetData64(DATA_BRONJAHM); - if (GUID_LOPART(BronjahmGUID) != id) - return; + uint64 BronjahmGUID = instance->GetData64(DATA_BRONJAHM); + if (GUID_LOPART(BronjahmGUID) != id) + return; - if (Creature* bronjahm = ObjectAccessor::GetCreature(*me, BronjahmGUID)) - me->CastSpell(bronjahm, SPELL_CONSUME_SOUL, true); + if (Creature* bronjahm = ObjectAccessor::GetCreature(*me, BronjahmGUID)) + me->CastSpell(bronjahm, SPELL_CONSUME_SOUL, true); - summ->UnSummon(); - } + summ->UnSummon(); } } @@ -231,7 +228,7 @@ class npc_corrupted_soul_fragment : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_corrupted_soul_fragmentAI(creature); + return GetInstanceAI<npc_corrupted_soul_fragmentAI>(creature); } }; diff --git a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp index f3ed568fe23..8ef6abf2f47 100644 --- a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -345,7 +345,7 @@ class boss_devourer_of_souls : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_devourer_of_soulsAI(creature); + return GetInstanceAI<boss_devourer_of_soulsAI>(creature); } }; diff --git a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.cpp b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.cpp index cfa149c134f..3e901bfd0d4 100644 --- a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -113,9 +113,6 @@ public: { if (phase == PHASE_INTRO) { - if (!instance) - return; - events.Update(diff); switch (events.ExecuteEvent()) { @@ -193,7 +190,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_sylvanas_fosAI(creature); + return GetInstanceAI<npc_sylvanas_fosAI>(creature); } }; @@ -239,9 +236,6 @@ public: { if (phase == PHASE_INTRO) { - if (!instance) - return; - events.Update(diff); switch (events.ExecuteEvent()) { @@ -330,7 +324,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_jaina_fosAI(creature); + return GetInstanceAI<npc_jaina_fosAI>(creature); } }; diff --git a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.h b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.h index d404f9daf9c..14220e26cdd 100644 --- a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.h +++ b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/instance_forge_of_souls.cpp b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/instance_forge_of_souls.cpp index b1339b13119..cb03842cf3f 100644 --- a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/instance_forge_of_souls.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/instance_forge_of_souls.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_falric.cpp b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_falric.cpp index e2d285f7306..2ba47d354f9 100644 --- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_falric.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_falric.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -52,7 +52,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_falricAI(creature); + return GetInstanceAI<boss_falricAI>(creature); } struct boss_falricAI : public boss_horAI @@ -67,15 +67,13 @@ public: uiHopelessnessCount = 0; - if (instance) - instance->SetBossState(DATA_FALRIC_EVENT, NOT_STARTED); + instance->SetBossState(DATA_FALRIC_EVENT, NOT_STARTED); } void EnterCombat(Unit* /*who*/) OVERRIDE { Talk(SAY_AGGRO); - if (instance) - instance->SetBossState(DATA_FALRIC_EVENT, IN_PROGRESS); + instance->SetBossState(DATA_FALRIC_EVENT, IN_PROGRESS); events.ScheduleEvent(EVENT_QUIVERING_STRIKE, 23000); events.ScheduleEvent(EVENT_IMPENDING_DESPAIR, 9000); @@ -86,8 +84,7 @@ public: { Talk(SAY_DEATH); - if (instance) - instance->SetBossState(DATA_FALRIC_EVENT, DONE); + instance->SetBossState(DATA_FALRIC_EVENT, DONE); } void KilledUnit(Unit* /*victim*/) OVERRIDE diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_marwyn.cpp b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_marwyn.cpp index a87b7b6d93d..c6f692e7ff5 100644 --- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_marwyn.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_marwyn.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -51,7 +51,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_marwynAI(creature); + return GetInstanceAI<boss_marwynAI>(creature); } struct boss_marwynAI : public boss_horAI @@ -62,15 +62,13 @@ public: { boss_horAI::Reset(); - if (instance) - instance->SetBossState(DATA_MARWYN_EVENT, NOT_STARTED); + instance->SetBossState(DATA_MARWYN_EVENT, NOT_STARTED); } void EnterCombat(Unit* /*who*/) OVERRIDE { Talk(SAY_AGGRO); - if (instance) - instance->SetBossState(DATA_MARWYN_EVENT, IN_PROGRESS); + instance->SetBossState(DATA_MARWYN_EVENT, IN_PROGRESS); events.ScheduleEvent(EVENT_OBLITERATE, 30000); /// @todo Check timer events.ScheduleEvent(EVENT_WELL_OF_CORRUPTION, 13000); @@ -82,8 +80,7 @@ public: { Talk(SAY_DEATH); - if (instance) - instance->SetBossState(DATA_MARWYN_EVENT, DONE); + instance->SetBossState(DATA_MARWYN_EVENT, DONE); } void KilledUnit(Unit* /*victim*/) OVERRIDE diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp index 96b772df5a9..c9247ce17f3 100644 --- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -1283,7 +1283,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_ghostly_priestAI(creature); + return GetInstanceAI<npc_ghostly_priestAI>(creature); } }; @@ -1355,7 +1355,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_phantom_mageAI(creature); + return GetInstanceAI<npc_phantom_mageAI>(creature); } }; @@ -1377,7 +1377,7 @@ public: void EnterEvadeMode() OVERRIDE { - if (!me->GetOwner()->HasAura(AURA_HALLUCINATION)) + if (me->GetOwner() && !me->GetOwner()->HasAura(AURA_HALLUCINATION)) npc_phantom_mage::npc_phantom_mageAI::EnterEvadeMode(); } @@ -1447,7 +1447,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_shadowy_mercenaryAI(creature); + return GetInstanceAI<npc_shadowy_mercenaryAI>(creature); } }; @@ -1499,7 +1499,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_spectral_footmanAI(creature); + return GetInstanceAI<npc_spectral_footmanAI>(creature); } }; @@ -1558,7 +1558,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_tortured_riflemanAI(creature); + return GetInstanceAI<npc_tortured_riflemanAI>(creature); } }; @@ -1674,7 +1674,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_frostworn_generalAI(creature); + return GetInstanceAI<npc_frostworn_generalAI>(creature); } }; @@ -1901,7 +1901,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_raging_ghoulAI(creature); + return GetInstanceAI<npc_raging_ghoulAI>(creature); } }; @@ -2021,7 +2021,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_risen_witch_doctorAI(creature); + return GetInstanceAI<npc_risen_witch_doctorAI>(creature); } }; @@ -2111,7 +2111,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_lumbering_abominationAI(creature); + return GetInstanceAI<npc_lumbering_abominationAI>(creature); } }; diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.h b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.h index 9c40cb70141..ff3192b89d5 100644 --- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.h +++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp index 955f4fb1568..f78be036900 100644 --- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp index 5bf50cbb46f..fe2b818b325 100644 --- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -111,12 +111,13 @@ class boss_garfrost : public CreatureScript { _JustDied(); Talk(SAY_DEATH); + me->RemoveAllGameObjects(); if (Creature* tyrannus = me->GetCreature(*me, instance->GetData64(DATA_TYRANNUS))) tyrannus->AI()->Talk(SAY_TYRANNUS_DEATH); } - void DamageTaken(Unit* /*attacker*/, uint32& /*uiDamage*/) OVERRIDE + void DamageTaken(Unit* /*attacker*/, uint32& /*damage*/) OVERRIDE { if (events.IsInPhase(PHASE_ONE) && !HealthAbovePct(66)) { diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp index f2ee24f5b86..7720d4a4ca0 100644 --- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp index 5a58dfa1b4a..833c3765145 100644 --- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp index d61fc69a0ae..364246e05f1 100644 --- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.cpp index 82dfcb716b6..bce9e067ae1 100644 --- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.h b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.h index e7a3b069ce3..2a2f6a25741 100644 --- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.h +++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/Gundrak/boss_drakkari_colossus.cpp b/src/server/scripts/Northrend/Gundrak/boss_drakkari_colossus.cpp index 93030492caf..5a16271d378 100644 --- a/src/server/scripts/Northrend/Gundrak/boss_drakkari_colossus.cpp +++ b/src/server/scripts/Northrend/Gundrak/boss_drakkari_colossus.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -248,7 +248,7 @@ class boss_drakkari_colossus : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_drakkari_colossusAI(creature); + return GetInstanceAI<boss_drakkari_colossusAI>(creature); } }; @@ -278,11 +278,8 @@ class boss_drakkari_elemental : public CreatureScript if (killer == me) return; - if (instance) - { - if (Creature* colossus = Unit::GetCreature(*me, instance->GetData64(DATA_DRAKKARI_COLOSSUS))) - killer->Kill(colossus); - } + if (Creature* colossus = Unit::GetCreature(*me, instance->GetData64(DATA_DRAKKARI_COLOSSUS))) + killer->Kill(colossus); } void UpdateAI(uint32 diff) OVERRIDE @@ -317,12 +314,9 @@ class boss_drakkari_elemental : public CreatureScript { case ACTION_RETURN_TO_COLOSSUS: DoCast(SPELL_SURGE_VISUAL); - if (instance) - { - if (Creature* colossus = Unit::GetCreature(*me, instance->GetData64(DATA_DRAKKARI_COLOSSUS))) - // what if the elemental is more than 80 yards from drakkari colossus ? - DoCast(colossus, SPELL_MERGE, true); - } + if (Creature* colossus = Unit::GetCreature(*me, instance->GetData64(DATA_DRAKKARI_COLOSSUS))) + // what if the elemental is more than 80 yards from drakkari colossus ? + DoCast(colossus, SPELL_MERGE, true); break; } } @@ -381,7 +375,7 @@ class boss_drakkari_elemental : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_drakkari_elementalAI(creature); + return GetInstanceAI<boss_drakkari_elementalAI>(creature); } }; @@ -392,7 +386,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_living_mojoAI(creature); + return GetInstanceAI<npc_living_mojoAI>(creature); } struct npc_living_mojoAI : public ScriptedAI diff --git a/src/server/scripts/Northrend/Gundrak/boss_eck.cpp b/src/server/scripts/Northrend/Gundrak/boss_eck.cpp index c11db7146d1..e8791c6e97e 100644 --- a/src/server/scripts/Northrend/Gundrak/boss_eck.cpp +++ b/src/server/scripts/Northrend/Gundrak/boss_eck.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -37,7 +37,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_eckAI(creature); + return GetInstanceAI<boss_eckAI>(creature); } struct boss_eckAI : public ScriptedAI @@ -65,14 +65,12 @@ public: bBerserk = false; - if (instance) - instance->SetData(DATA_ECK_THE_FEROCIOUS_EVENT, NOT_STARTED); + instance->SetData(DATA_ECK_THE_FEROCIOUS_EVENT, NOT_STARTED); } void EnterCombat(Unit* /*who*/) OVERRIDE { - if (instance) - instance->SetData(DATA_ECK_THE_FEROCIOUS_EVENT, IN_PROGRESS); + instance->SetData(DATA_ECK_THE_FEROCIOUS_EVENT, IN_PROGRESS); } void UpdateAI(uint32 diff) OVERRIDE @@ -127,8 +125,7 @@ public: void JustDied(Unit* /*killer*/) OVERRIDE { - if (instance) - instance->SetData(DATA_ECK_THE_FEROCIOUS_EVENT, DONE); + instance->SetData(DATA_ECK_THE_FEROCIOUS_EVENT, DONE); } }; @@ -141,7 +138,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_ruins_dwellerAI(creature); + return GetInstanceAI<npc_ruins_dwellerAI>(creature); } struct npc_ruins_dwellerAI : public ScriptedAI @@ -155,12 +152,9 @@ public: void JustDied(Unit* /*killer*/) OVERRIDE { - if (instance) - { - instance->SetData64(DATA_RUIN_DWELLER_DIED, me->GetGUID()); - if (instance->GetData(DATA_ALIVE_RUIN_DWELLERS) == 0) - me->SummonCreature(CREATURE_ECK, EckSpawnPoint, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300*IN_MILLISECONDS); - } + instance->SetData64(DATA_RUIN_DWELLER_DIED, me->GetGUID()); + if (instance->GetData(DATA_ALIVE_RUIN_DWELLERS) == 0) + me->SummonCreature(CREATURE_ECK, EckSpawnPoint, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300*IN_MILLISECONDS); } }; diff --git a/src/server/scripts/Northrend/Gundrak/boss_gal_darah.cpp b/src/server/scripts/Northrend/Gundrak/boss_gal_darah.cpp index 7a5520ab145..4cf9eea8734 100644 --- a/src/server/scripts/Northrend/Gundrak/boss_gal_darah.cpp +++ b/src/server/scripts/Northrend/Gundrak/boss_gal_darah.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -70,7 +70,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_gal_darahAI(creature); + return GetInstanceAI<boss_gal_darahAI>(creature); } struct boss_gal_darahAI : public ScriptedAI @@ -118,16 +118,14 @@ public: me->SetDisplayId(DISPLAY_TROLL); - if (instance) - instance->SetData(DATA_GAL_DARAH_EVENT, NOT_STARTED); + instance->SetData(DATA_GAL_DARAH_EVENT, NOT_STARTED); } void EnterCombat(Unit* /*who*/) OVERRIDE { Talk(SAY_AGGRO); - if (instance) - instance->SetData(DATA_GAL_DARAH_EVENT, IN_PROGRESS); + instance->SetData(DATA_GAL_DARAH_EVENT, IN_PROGRESS); } void UpdateAI(uint32 diff) OVERRIDE @@ -269,8 +267,7 @@ public: { Talk(SAY_DEATH); - if (instance) - instance->SetData(DATA_GAL_DARAH_EVENT, DONE); + instance->SetData(DATA_GAL_DARAH_EVENT, DONE); } void KilledUnit(Unit* victim) OVERRIDE diff --git a/src/server/scripts/Northrend/Gundrak/boss_moorabi.cpp b/src/server/scripts/Northrend/Gundrak/boss_moorabi.cpp index 0ccaea316ef..25580efb9e0 100644 --- a/src/server/scripts/Northrend/Gundrak/boss_moorabi.cpp +++ b/src/server/scripts/Northrend/Gundrak/boss_moorabi.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -54,7 +54,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_moorabiAI(creature); + return GetInstanceAI<boss_moorabiAI>(creature); } struct boss_moorabiAI : public ScriptedAI @@ -81,8 +81,7 @@ public: uiTransformationTImer = 12*IN_MILLISECONDS; bPhase = false; - if (instance) - instance->SetData(DATA_MOORABI_EVENT, NOT_STARTED); + instance->SetData(DATA_MOORABI_EVENT, NOT_STARTED); } void EnterCombat(Unit* /*who*/) OVERRIDE @@ -90,8 +89,7 @@ public: Talk(SAY_AGGRO); DoCast(me, SPELL_MOJO_FRENZY, true); - if (instance) - instance->SetData(DATA_MOORABI_EVENT, IN_PROGRESS); + instance->SetData(DATA_MOORABI_EVENT, IN_PROGRESS); } void UpdateAI(uint32 uiDiff) OVERRIDE @@ -157,8 +155,7 @@ public: { Talk(SAY_DEATH); - if (instance) - instance->SetData(DATA_MOORABI_EVENT, DONE); + instance->SetData(DATA_MOORABI_EVENT, DONE); } void KilledUnit(Unit* victim) OVERRIDE diff --git a/src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp b/src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp index 4c25bead1b4..dd1d35e639e 100644 --- a/src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp +++ b/src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -76,7 +76,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_slad_ranAI(creature); + return GetInstanceAI<boss_slad_ranAI>(creature); } struct boss_slad_ranAI : public ScriptedAI @@ -109,16 +109,14 @@ public: lSummons.DespawnAll(); - if (instance) - instance->SetData(DATA_SLAD_RAN_EVENT, NOT_STARTED); + instance->SetData(DATA_SLAD_RAN_EVENT, NOT_STARTED); } void EnterCombat(Unit* /*who*/) OVERRIDE { Talk(SAY_AGGRO); - if (instance) - instance->SetData(DATA_SLAD_RAN_EVENT, IN_PROGRESS); + instance->SetData(DATA_SLAD_RAN_EVENT, IN_PROGRESS); } void UpdateAI(uint32 diff) OVERRIDE @@ -180,8 +178,7 @@ public: Talk(SAY_DEATH); lSummons.DespawnAll(); - if (instance) - instance->SetData(DATA_SLAD_RAN_EVENT, DONE); + instance->SetData(DATA_SLAD_RAN_EVENT, DONE); } void KilledUnit(Unit* who) OVERRIDE diff --git a/src/server/scripts/Northrend/Gundrak/gundrak.h b/src/server/scripts/Northrend/Gundrak/gundrak.h index f47b71cd48e..4cdbec3c157 100644 --- a/src/server/scripts/Northrend/Gundrak/gundrak.h +++ b/src/server/scripts/Northrend/Gundrak/gundrak.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/Gundrak/instance_gundrak.cpp b/src/server/scripts/Northrend/Gundrak/instance_gundrak.cpp index 780ab6358a6..3ac3c32916e 100644 --- a/src/server/scripts/Northrend/Gundrak/instance_gundrak.cpp +++ b/src/server/scripts/Northrend/Gundrak/instance_gundrak.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp index 5df69097f9b..30c11ec556d 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp index 65622411623..3d4ee279685 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp index 0f46888fbe7..7be766c0a0e 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp index 68df37f0fdd..884baaf39c7 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp index 027c8823af8..f05f2c20b12 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp index 42bb8acbf07..162382e91b0 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp index 92c97ce6abf..ac4d18adb8b 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_rotface.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_rotface.cpp index 88a00e78aae..e3c21c6b88e 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_rotface.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_rotface.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp index 64e87ac8873..b1141e31d39 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp index 5d1bd1ff934..30d520ce7bf 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_valithria_dreamwalker.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_valithria_dreamwalker.cpp index bbd700b7edd..e56bde39ae7 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_valithria_dreamwalker.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_valithria_dreamwalker.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -666,7 +666,7 @@ class npc_the_lich_king_controller : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_the_lich_king_controllerAI(creature); + return GetInstanceAI<npc_the_lich_king_controllerAI>(creature); } }; diff --git a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp index a04e98e74bc..f3b62cd7b24 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h index 6090d4b8368..8e529ba0ee9 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h +++ b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp index 72700a83a55..ad06bc1c485 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp index fd024dd4401..edd80377d68 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/Naxxramas/boss_anubrekhan.cpp b/src/server/scripts/Northrend/Naxxramas/boss_anubrekhan.cpp index b873b3ee15c..be6531df66a 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_anubrekhan.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_anubrekhan.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -59,7 +59,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_anubrekhanAI(creature); + return GetInstanceAI<boss_anubrekhanAI>(creature); } struct boss_anubrekhanAI : public BossAI @@ -105,8 +105,7 @@ public: _JustDied(); // start achievement timer (kill Maexna within 20 min) - if (instance) - instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT); + instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT); } void EnterCombat(Unit* /*who*/) OVERRIDE { diff --git a/src/server/scripts/Northrend/Naxxramas/boss_faerlina.cpp b/src/server/scripts/Northrend/Naxxramas/boss_faerlina.cpp index b723c2f4139..a61331bee3e 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_faerlina.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_faerlina.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -216,7 +216,7 @@ class npc_faerlina_add : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_faerlina_addAI(creature); + return GetInstanceAI<npc_faerlina_addAI>(creature); } }; diff --git a/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp b/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp index 9b336a77e26..544077db8e8 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -89,7 +89,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_four_horsemenAI(creature); + return GetInstanceAI<boss_four_horsemenAI>(creature); } struct boss_four_horsemenAI : public BossAI @@ -121,8 +121,7 @@ public: if (!encounterActionReset) DoEncounteraction(NULL, false, true, false); - if (instance) - instance->SetData(DATA_HORSEMEN0 + id, NOT_STARTED); + instance->SetData(DATA_HORSEMEN0 + id, NOT_STARTED); me->SetReactState(REACT_AGGRESSIVE); uiEventStarterGUID = 0; @@ -139,9 +138,6 @@ public: bool DoEncounteraction(Unit* who, bool attack, bool reset, bool checkAllDead) { - if (!instance) - return false; - Creature* Thane = Unit::GetCreature(*me, instance->GetData64(DATA_THANE)); Creature* Lady = Unit::GetCreature(*me, instance->GetData64(DATA_LADY)); Creature* Baron = Unit::GetCreature(*me, instance->GetData64(DATA_BARON)); @@ -301,10 +297,9 @@ public: events.Reset(); summons.DespawnAll(); - if (instance) - instance->SetData(DATA_HORSEMEN0 + id, DONE); + instance->SetData(DATA_HORSEMEN0 + id, DONE); - if (instance && DoEncounteraction(NULL, false, false, true)) + if (DoEncounteraction(NULL, false, false, true)) { instance->SetBossState(BOSS_HORSEMEN, DONE); instance->SaveToDB(); diff --git a/src/server/scripts/Northrend/Naxxramas/boss_gluth.cpp b/src/server/scripts/Northrend/Naxxramas/boss_gluth.cpp index 3f751e86149..d33d218fab9 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_gluth.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_gluth.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp b/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp index f76c46d96ff..20f7ec25775 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -181,8 +181,7 @@ class boss_gothik : public CreatureScript DeadTriggerGUID.clear(); me->SetReactState(REACT_PASSIVE); - if (instance) - instance->SetData(DATA_GOTHIK_GATE, GO_STATE_ACTIVE); + instance->SetData(DATA_GOTHIK_GATE, GO_STATE_ACTIVE); _Reset(); mergedSides = false; phaseTwo = false; @@ -210,8 +209,7 @@ class boss_gothik : public CreatureScript events.ScheduleEvent(EVENT_SUMMON, 30000); DoTeleportTo(PosPlatform); Talk(SAY_SPEECH); - if (instance) - instance->SetData(DATA_GOTHIK_GATE, GO_STATE_READY); + instance->SetData(DATA_GOTHIK_GATE, GO_STATE_READY); } void JustSummoned(Creature* summon) OVERRIDE @@ -248,8 +246,7 @@ class boss_gothik : public CreatureScript DeadTriggerGUID.clear(); _JustDied(); Talk(SAY_DEATH); - if (instance) - instance->SetData(DATA_GOTHIK_GATE, GO_STATE_ACTIVE); + instance->SetData(DATA_GOTHIK_GATE, GO_STATE_ACTIVE); } void DoGothikSummon(uint32 entry) @@ -403,8 +400,7 @@ class boss_gothik : public CreatureScript if (!thirtyPercentReached && HealthBelowPct(30) && phaseTwo) { thirtyPercentReached = true; - if (instance) - instance->SetData(DATA_GOTHIK_GATE, GO_STATE_ACTIVE); + instance->SetData(DATA_GOTHIK_GATE, GO_STATE_ACTIVE); } if (me->HasUnitState(UNIT_STATE_CASTING)) @@ -429,8 +425,7 @@ class boss_gothik : public CreatureScript { if (!CheckGroupSplitted()) { - if (instance) - instance->SetData(DATA_GOTHIK_GATE, GO_STATE_ACTIVE); + instance->SetData(DATA_GOTHIK_GATE, GO_STATE_ACTIVE); DummyEntryCheckPredicate pred; summons.DoAction(0, pred); //! Magic numbers fail summons.DoZoneInCombat(); @@ -500,7 +495,7 @@ class boss_gothik : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_gothikAI(creature); + return GetInstanceAI<boss_gothikAI>(creature); } }; diff --git a/src/server/scripts/Northrend/Naxxramas/boss_grobbulus.cpp b/src/server/scripts/Northrend/Naxxramas/boss_grobbulus.cpp index 8371a5ad9a0..6769e3429fa 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_grobbulus.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_grobbulus.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -17,18 +17,19 @@ #include "ScriptMgr.h" #include "ScriptedCreature.h" +#include "SpellScript.h" +#include "SpellAuraEffects.h" #include "naxxramas.h" -#include "SpellInfo.h" enum Spells { SPELL_BOMBARD_SLIME = 28280, - SPELL_POISON_CLOUD = 28240, - SPELL_MUTATING_INJECTION = 28169, SPELL_SLIME_SPRAY = 28157, - H_SPELL_SLIME_SPRAY = 54364, - SPELL_BERSERK = 26662, - SPELL_POISON_CLOUD_ADD = 59116 + SPELL_MUTATING_INJECTION = 28169, + SPELL_MUTATING_EXPLOSION = 28206, + SPELL_POISON_CLOUD = 28240, + SPELL_POISON_CLOUD_PASSIVE = 28158, + SPELL_BERSERK = 26662 }; enum Events @@ -46,115 +47,183 @@ enum CreatureId class boss_grobbulus : public CreatureScript { -public: - boss_grobbulus() : CreatureScript("boss_grobbulus") { } + public: + boss_grobbulus() : CreatureScript("boss_grobbulus") { } - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return new boss_grobbulusAI(creature); - } - - struct boss_grobbulusAI : public BossAI - { - boss_grobbulusAI(Creature* creature) : BossAI(creature, BOSS_GROBBULUS) + struct boss_grobbulusAI : public BossAI { - me->ApplySpellImmune(0, IMMUNITY_ID, SPELL_POISON_CLOUD_ADD, true); - } + boss_grobbulusAI(Creature* creature) : BossAI(creature, BOSS_GROBBULUS) { } - void EnterCombat(Unit* /*who*/) OVERRIDE - { - _EnterCombat(); - events.ScheduleEvent(EVENT_CLOUD, 15000); - events.ScheduleEvent(EVENT_INJECT, 20000); - events.ScheduleEvent(EVENT_SPRAY, 15000+rand()%15000); //not sure - events.ScheduleEvent(EVENT_BERSERK, 12*60000); - } + void EnterCombat(Unit* /*who*/) OVERRIDE + { + _EnterCombat(); + events.ScheduleEvent(EVENT_CLOUD, 15000); + events.ScheduleEvent(EVENT_INJECT, 20000); + events.ScheduleEvent(EVENT_SPRAY, urand(15000, 30000)); // not sure + events.ScheduleEvent(EVENT_BERSERK, 12 * 60000); + } - void SpellHitTarget(Unit* target, const SpellInfo* spell) OVERRIDE - { - if (spell->Id == uint32(SPELL_SLIME_SPRAY)) + void SpellHitTarget(Unit* target, SpellInfo const* spell) OVERRIDE { - if (TempSummon* slime = me->SummonCreature(NPC_FALLOUT_SLIME, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 0)) - DoZoneInCombat(slime); + if (spell->Id == SPELL_SLIME_SPRAY) + me->SummonCreature(NPC_FALLOUT_SLIME, *target, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT); } - } - void UpdateAI(uint32 diff) OVERRIDE - { - if (!UpdateVictim()) - return; + void UpdateAI(uint32 diff) OVERRIDE + { + if (!UpdateVictim()) + return; - events.Update(diff); + events.Update(diff); - while (uint32 eventId = events.ExecuteEvent()) - { - switch (eventId) + while (uint32 eventId = events.ExecuteEvent()) { - case EVENT_CLOUD: - DoCastAOE(SPELL_POISON_CLOUD); - events.ScheduleEvent(EVENT_CLOUD, 15000); - return; - case EVENT_BERSERK: - DoCastAOE(SPELL_BERSERK); - return; - case EVENT_SPRAY: - DoCastAOE(SPELL_SLIME_SPRAY); - events.ScheduleEvent(EVENT_SPRAY, 15000+rand()%15000); - return; - case EVENT_INJECT: - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1)) - if (!target->HasAura(SPELL_MUTATING_INJECTION)) + switch (eventId) + { + case EVENT_CLOUD: + DoCastAOE(SPELL_POISON_CLOUD); + events.ScheduleEvent(EVENT_CLOUD, 15000); + return; + case EVENT_BERSERK: + DoCastAOE(SPELL_BERSERK, true); + return; + case EVENT_SPRAY: + DoCastAOE(SPELL_SLIME_SPRAY); + events.ScheduleEvent(EVENT_SPRAY, urand(15000, 30000)); + return; + case EVENT_INJECT: + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 0.0f, true, -SPELL_MUTATING_INJECTION)) DoCast(target, SPELL_MUTATING_INJECTION); - events.ScheduleEvent(EVENT_INJECT, 8000 + uint32(120 * me->GetHealthPct())); - return; + events.ScheduleEvent(EVENT_INJECT, 8000 + uint32(120 * me->GetHealthPct())); + return; + default: + break; + } } + + DoMeleeAttackIfReady(); } + }; - DoMeleeAttackIfReady(); + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new boss_grobbulusAI(creature); } - }; - }; class npc_grobbulus_poison_cloud : public CreatureScript { -public: - npc_grobbulus_poison_cloud() : CreatureScript("npc_grobbulus_poison_cloud") { } + public: + npc_grobbulus_poison_cloud() : CreatureScript("npc_grobbulus_poison_cloud") { } + + struct npc_grobbulus_poison_cloudAI : public ScriptedAI + { + npc_grobbulus_poison_cloudAI(Creature* creature) : ScriptedAI(creature) + { + SetCombatMovement(false); + creature->SetReactState(REACT_PASSIVE); + } + + void IsSummonedBy(Unit* /*summoner*/) OVERRIDE + { + // no visual when casting in ctor or Reset() + DoCast(me, SPELL_POISON_CLOUD_PASSIVE, true); + } - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return new npc_grobbulus_poison_cloudAI(creature); - } + void UpdateAI(uint32 /*diff*/) OVERRIDE { } + }; - struct npc_grobbulus_poison_cloudAI : public ScriptedAI - { - npc_grobbulus_poison_cloudAI(Creature* creature) : ScriptedAI(creature) + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - SetCombatMovement(false); + return new npc_grobbulus_poison_cloudAI(creature); } +}; + +// 28169 - Mutating Injection +class spell_grobbulus_mutating_injection : public SpellScriptLoader +{ + public: + spell_grobbulus_mutating_injection() : SpellScriptLoader("spell_grobbulus_mutating_injection") { } - uint32 Cloud_Timer; + class spell_grobbulus_mutating_injection_AuraScript : public AuraScript + { + PrepareAuraScript(spell_grobbulus_mutating_injection_AuraScript); + + bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE + { + if (!sSpellMgr->GetSpellInfo(SPELL_MUTATING_EXPLOSION) + || !sSpellMgr->GetSpellInfo(SPELL_POISON_CLOUD)) + return false; + return true; + } + + void HandleRemove(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/) + { + AuraRemoveMode removeMode = GetTargetApplication()->GetRemoveMode(); + if (removeMode != AURA_REMOVE_BY_ENEMY_SPELL && removeMode != AURA_REMOVE_BY_EXPIRE) + return; + + if (Unit* caster = GetCaster()) + { + caster->CastSpell(GetTarget(), SPELL_MUTATING_EXPLOSION, true); + GetTarget()->CastSpell(GetTarget(), SPELL_POISON_CLOUD, true, NULL, aurEff, GetCasterGUID()); + } + } - void Reset() OVERRIDE + void Register() OVERRIDE + { + AfterEffectRemove += AuraEffectRemoveFn(spell_grobbulus_mutating_injection_AuraScript::HandleRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL); + } + }; + + AuraScript* GetAuraScript() const OVERRIDE { - Cloud_Timer = 1000; - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + return new spell_grobbulus_mutating_injection_AuraScript(); } +}; - void UpdateAI(uint32 diff) OVERRIDE +// 28158, 54362 - Poison (Grobbulus) +class spell_grobbulus_poison_cloud : public SpellScriptLoader +{ + public: + spell_grobbulus_poison_cloud() : SpellScriptLoader("spell_grobbulus_poison_cloud") { } + + class spell_grobbulus_poison_cloud_AuraScript : public AuraScript { - if (Cloud_Timer <= diff) + PrepareAuraScript(spell_grobbulus_poison_cloud_AuraScript); + + bool Validate(SpellInfo const* spellInfo) OVERRIDE { - DoCast(me, SPELL_POISON_CLOUD_ADD); - Cloud_Timer = 10000; - } else Cloud_Timer -= diff; - } - }; + if (!sSpellMgr->GetSpellInfo(spellInfo->Effects[EFFECT_0].TriggerSpell)) + return false; + return true; + } + + void PeriodicTick(AuraEffect const* aurEff) + { + PreventDefaultAction(); + uint32 triggerSpell = GetSpellInfo()->Effects[aurEff->GetEffIndex()].TriggerSpell; + int32 mod = int32(((float(aurEff->GetTickNumber()) / aurEff->GetTotalTicks()) * 0.9f + 0.1f) * 10000 * 2 / 3); + GetTarget()->CastCustomSpell(triggerSpell, SPELLVALUE_RADIUS_MOD, mod, (Unit*)NULL, TRIGGERED_FULL_MASK, NULL, aurEff); + } + + void Register() OVERRIDE + { + OnEffectPeriodic += AuraEffectPeriodicFn(spell_grobbulus_poison_cloud_AuraScript::PeriodicTick, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL); + } + }; + + AuraScript* GetAuraScript() const OVERRIDE + { + return new spell_grobbulus_poison_cloud_AuraScript(); + } }; void AddSC_boss_grobbulus() { new boss_grobbulus(); new npc_grobbulus_poison_cloud(); + new spell_grobbulus_mutating_injection(); + new spell_grobbulus_poison_cloud(); } diff --git a/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp b/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp index a8e2783602f..b850d5e5072 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -61,7 +61,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_heiganAI(creature); + return GetInstanceAI<boss_heiganAI>(creature); } struct boss_heiganAI : public BossAI diff --git a/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp b/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp index f9efdfce28b..41d1f53b52d 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -310,8 +310,7 @@ public: FindGameObjects(); - if (instance) - instance->SetData(DATA_ABOMINATION_KILLED, 0); + instance->SetData(DATA_ABOMINATION_KILLED, 0); if (GameObject* pKTTrigger = me->GetMap()->GetGameObject(KTTriggerGUID)) { @@ -649,7 +648,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_kelthuzadAI(creature); + return GetInstanceAI<boss_kelthuzadAI>(creature); } }; @@ -769,7 +768,7 @@ class npc_kelthuzad_abomination : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_kelthuzad_abominationAI(creature); + return GetInstanceAI<npc_kelthuzad_abominationAI>(creature); } }; diff --git a/src/server/scripts/Northrend/Naxxramas/boss_loatheb.cpp b/src/server/scripts/Northrend/Naxxramas/boss_loatheb.cpp index 93575e6367f..760cc180b95 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_loatheb.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_loatheb.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/Naxxramas/boss_maexxna.cpp b/src/server/scripts/Northrend/Naxxramas/boss_maexxna.cpp index 588d58c1436..9d8dbf70ce7 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_maexxna.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_maexxna.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/Naxxramas/boss_noth.cpp b/src/server/scripts/Northrend/Naxxramas/boss_noth.cpp index b56ecdd8b53..93cbb1b992a 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_noth.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_noth.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -217,7 +217,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_nothAI(creature); + return GetInstanceAI<boss_nothAI>(creature); } }; diff --git a/src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp b/src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp index 96f2d743cac..cc0b3836a7a 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -57,7 +57,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_patchwerkAI(creature); + return GetInstanceAI<boss_patchwerkAI>(creature); } struct boss_patchwerkAI : public BossAI @@ -70,8 +70,7 @@ public: { _Reset(); - if (instance) - instance->DoStopTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_MAKE_QUICK_WERK_OF_HIM_STARTING_EVENT); + instance->DoStopTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_MAKE_QUICK_WERK_OF_HIM_STARTING_EVENT); } void KilledUnit(Unit* /*Victim*/) OVERRIDE @@ -94,8 +93,7 @@ public: events.ScheduleEvent(EVENT_HATEFUL, 1000); events.ScheduleEvent(EVENT_BERSERK, 360000); - if (instance) - instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_MAKE_QUICK_WERK_OF_HIM_STARTING_EVENT); + instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_MAKE_QUICK_WERK_OF_HIM_STARTING_EVENT); } void UpdateAI(uint32 diff) OVERRIDE diff --git a/src/server/scripts/Northrend/Naxxramas/boss_razuvious.cpp b/src/server/scripts/Northrend/Naxxramas/boss_razuvious.cpp index 3ac20df24d6..4936681839f 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_razuvious.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_razuvious.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp b/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp index 60620804db8..be434ecc73a 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -96,6 +96,8 @@ class boss_sapphiron : public CreatureScript void InitializeAI() OVERRIDE { + _canTheHundredClub = true; + float x, y, z; me->GetPosition(x, y, z); me->SummonGameObject(GO_BIRTH, x, y, z, 0, 0, 0, 0, 0, 0); diff --git a/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp b/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp index 3d121887471..245399afdda 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -110,7 +110,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_thaddiusAI(creature); + return GetInstanceAI<boss_thaddiusAI>(creature); } struct boss_thaddiusAI : public BossAI @@ -230,15 +230,13 @@ public: { if (!checkStalaggAlive) { - if (instance) - if (Creature* pStalagg = me->GetCreature(*me, instance->GetData64(DATA_STALAGG))) - pStalagg->Respawn(); + if (Creature* pStalagg = me->GetCreature(*me, instance->GetData64(DATA_STALAGG))) + pStalagg->Respawn(); } else { - if (instance) - if (Creature* pFeugen = me->GetCreature(*me, instance->GetData64(DATA_FEUGEN))) - pFeugen->Respawn(); + if (Creature* pFeugen = me->GetCreature(*me, instance->GetData64(DATA_FEUGEN))) + pFeugen->Respawn(); } } } @@ -285,7 +283,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_stalaggAI(creature); + return GetInstanceAI<npc_stalaggAI>(creature); } struct npc_stalaggAI : public ScriptedAI @@ -302,10 +300,9 @@ public: void Reset() OVERRIDE { - if (instance) - if (Creature* pThaddius = me->GetCreature(*me, instance->GetData64(DATA_THADDIUS))) - if (pThaddius->AI()) - pThaddius->AI()->DoAction(ACTION_STALAGG_RESET); + if (Creature* pThaddius = me->GetCreature(*me, instance->GetData64(DATA_THADDIUS))) + if (pThaddius->AI()) + pThaddius->AI()->DoAction(ACTION_STALAGG_RESET); powerSurgeTimer = urand(20000, 25000); magneticPullTimer = 20000; } @@ -325,10 +322,9 @@ public: void JustDied(Unit* /*killer*/) OVERRIDE { Talk(SAY_STAL_DEATH); - if (instance) - if (Creature* pThaddius = me->GetCreature(*me, instance->GetData64(DATA_THADDIUS))) - if (pThaddius->AI()) - pThaddius->AI()->DoAction(ACTION_STALAGG_DIED); + if (Creature* pThaddius = me->GetCreature(*me, instance->GetData64(DATA_THADDIUS))) + if (pThaddius->AI()) + pThaddius->AI()->DoAction(ACTION_STALAGG_DIED); } void UpdateAI(uint32 uiDiff) OVERRIDE @@ -379,7 +375,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_feugenAI(creature); + return GetInstanceAI<npc_feugenAI>(creature); } struct npc_feugenAI : public ScriptedAI @@ -395,10 +391,9 @@ public: void Reset() OVERRIDE { - if (instance) - if (Creature* pThaddius = me->GetCreature(*me, instance->GetData64(DATA_THADDIUS))) - if (pThaddius->AI()) - pThaddius->AI()->DoAction(ACTION_FEUGEN_RESET); + if (Creature* pThaddius = me->GetCreature(*me, instance->GetData64(DATA_THADDIUS))) + if (pThaddius->AI()) + pThaddius->AI()->DoAction(ACTION_FEUGEN_RESET); staticFieldTimer = 5000; } @@ -417,10 +412,9 @@ public: void JustDied(Unit* /*killer*/) OVERRIDE { Talk(SAY_FEUG_DEATH); - if (instance) - if (Creature* pThaddius = me->GetCreature(*me, instance->GetData64(DATA_THADDIUS))) - if (pThaddius->AI()) - pThaddius->AI()->DoAction(ACTION_FEUGEN_DIED); + if (Creature* pThaddius = me->GetCreature(*me, instance->GetData64(DATA_THADDIUS))) + if (pThaddius->AI()) + pThaddius->AI()->DoAction(ACTION_FEUGEN_DIED); } void UpdateAI(uint32 uiDiff) OVERRIDE diff --git a/src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp b/src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp index 57f36ddc3a4..137c9e68247 100644 --- a/src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp +++ b/src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/Naxxramas/naxxramas.h b/src/server/scripts/Northrend/Naxxramas/naxxramas.h index a71d573bf20..b6e87504c77 100644 --- a/src/server/scripts/Northrend/Naxxramas/naxxramas.h +++ b/src/server/scripts/Northrend/Naxxramas/naxxramas.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp index d113daa4954..4e386afae17 100644 --- a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp +++ b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -376,8 +376,7 @@ public: SetPhase(PHASE_NOT_STARTED, true); me->SetReactState(REACT_PASSIVE); - if (instance) - instance->DoStopTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT); + instance->DoStopTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT); } uint32 GetData(uint32 data) const OVERRIDE @@ -568,27 +567,22 @@ public: // We can't call full function here since it includes DoZoneInCombat(), // if someone does it will be returned with a warning. me->setActive(true); - if (instance) + if (!instance->CheckRequiredBosses(DATA_MALYGOS_EVENT)) { - if (!instance->CheckRequiredBosses(DATA_MALYGOS_EVENT)) - { - EnterEvadeMode(); - return; - } - - instance->SetBossState(DATA_MALYGOS_EVENT, IN_PROGRESS); + EnterEvadeMode(); + return; } + instance->SetBossState(DATA_MALYGOS_EVENT, IN_PROGRESS); + Talk(SAY_START_P_ONE); DoCast(SPELL_BERSERK); // periodic aura, first tick in 10 minutes - if (instance) - instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT); + instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT); } void EnterEvadeMode() OVERRIDE { - if (instance) - instance->SetBossState(DATA_MALYGOS_EVENT, FAIL); + instance->SetBossState(DATA_MALYGOS_EVENT, FAIL); SendLightOverride(LIGHT_GET_DEFAULT_FOR_MAP, 1*IN_MILLISECONDS); @@ -628,8 +622,7 @@ public: summons.DespawnAll(); } - if (instance) - instance->SetBossState(DATA_MALYGOS_EVENT, NOT_STARTED); + instance->SetBossState(DATA_MALYGOS_EVENT, NOT_STARTED); } void KilledUnit(Unit* victim) OVERRIDE @@ -1074,7 +1067,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_malygosAI(creature); + return GetInstanceAI<boss_malygosAI>(creature); } }; @@ -1127,7 +1120,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_portal_eoeAI(creature); + return GetInstanceAI<npc_portal_eoeAI>(creature); } }; @@ -1190,7 +1183,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_power_sparkAI(creature); + return GetInstanceAI<npc_power_sparkAI>(creature); } }; @@ -1292,7 +1285,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_melee_hover_diskAI(creature); + return GetInstanceAI<npc_melee_hover_diskAI>(creature); } }; @@ -1374,7 +1367,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_caster_hover_diskAI(creature); + return GetInstanceAI<npc_caster_hover_diskAI>(creature); } }; @@ -1450,7 +1443,7 @@ class npc_nexus_lord : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_nexus_lordAI(creature); + return GetInstanceAI<npc_nexus_lordAI>(creature); } }; @@ -1517,7 +1510,7 @@ class npc_scion_of_eternity : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_scion_of_eternityAI(creature); + return GetInstanceAI<npc_scion_of_eternityAI>(creature); } }; @@ -1575,7 +1568,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_arcane_overloadAI(creature); + return GetInstanceAI<npc_arcane_overloadAI>(creature); } }; diff --git a/src/server/scripts/Northrend/Nexus/EyeOfEternity/eye_of_eternity.h b/src/server/scripts/Northrend/Nexus/EyeOfEternity/eye_of_eternity.h index db879eab6fb..f94acf5d772 100644 --- a/src/server/scripts/Northrend/Nexus/EyeOfEternity/eye_of_eternity.h +++ b/src/server/scripts/Northrend/Nexus/EyeOfEternity/eye_of_eternity.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp b/src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp index 4777b451e4e..e79f8d0764f 100644 --- a/src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp +++ b/src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp index f05d065ab34..f3304368e70 100644 --- a/src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp +++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -95,24 +95,21 @@ class boss_anomalus : public CreatureScript uiChaoticRiftGUID = 0; chaosTheory = true; - if (instance) - instance->SetData(DATA_ANOMALUS_EVENT, NOT_STARTED); + instance->SetData(DATA_ANOMALUS_EVENT, NOT_STARTED); } void EnterCombat(Unit* /*who*/) OVERRIDE { Talk(SAY_AGGRO); - if (instance) - instance->SetData(DATA_ANOMALUS_EVENT, IN_PROGRESS); + instance->SetData(DATA_ANOMALUS_EVENT, IN_PROGRESS); } void JustDied(Unit* /*killer*/) OVERRIDE { Talk(SAY_DEATH); - if (instance) - instance->SetData(DATA_ANOMALUS_EVENT, DONE); + instance->SetData(DATA_ANOMALUS_EVENT, DONE); } uint32 GetData(uint32 type) const OVERRIDE @@ -187,7 +184,7 @@ class boss_anomalus : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_anomalusAI(creature); + return GetInstanceAI<boss_anomalusAI>(creature); } }; @@ -255,7 +252,7 @@ class npc_chaotic_rift : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_chaotic_riftAI(creature); + return GetInstanceAI<npc_chaotic_riftAI>(creature); } }; diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_commander_kolurg.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_commander_kolurg.cpp index a864d679b89..b82f131457a 100644 --- a/src/server/scripts/Northrend/Nexus/Nexus/boss_commander_kolurg.cpp +++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_commander_kolurg.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_commander_stoutbeard.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_commander_stoutbeard.cpp index 3a74d3408c3..7a9ea8ec9c3 100644 --- a/src/server/scripts/Northrend/Nexus/Nexus/boss_commander_stoutbeard.cpp +++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_commander_stoutbeard.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp index f598de52e49..2f6a328b728 100644 --- a/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp +++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -61,7 +61,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_keristraszaAI(creature); + return GetInstanceAI<boss_keristraszaAI>(creature); } struct boss_keristraszaAI : public ScriptedAI @@ -95,8 +95,7 @@ public: RemovePrison(CheckContainmentSpheres()); - if (instance) - instance->SetData(DATA_KERISTRASZA_EVENT, NOT_STARTED); + instance->SetData(DATA_KERISTRASZA_EVENT, NOT_STARTED); } void EnterCombat(Unit* /*who*/) OVERRIDE @@ -104,16 +103,14 @@ public: Talk(SAY_AGGRO); DoCastAOE(SPELL_INTENSE_COLD); - if (instance) - instance->SetData(DATA_KERISTRASZA_EVENT, IN_PROGRESS); + instance->SetData(DATA_KERISTRASZA_EVENT, IN_PROGRESS); } void JustDied(Unit* /*killer*/) OVERRIDE { Talk(SAY_DEATH); - if (instance) - instance->SetData(DATA_KERISTRASZA_EVENT, DONE); + instance->SetData(DATA_KERISTRASZA_EVENT, DONE); } void KilledUnit(Unit* who) OVERRIDE @@ -124,9 +121,6 @@ public: bool CheckContainmentSpheres(bool remove_prison = false) { - if (!instance) - return false; - auiContainmentSphereGUIDs[0] = instance->GetData64(ANOMALUS_CONTAINMET_SPHERE); auiContainmentSphereGUIDs[1] = instance->GetData64(ORMOROKS_CONTAINMET_SPHERE); auiContainmentSphereGUIDs[2] = instance->GetData64(TELESTRAS_CONTAINMET_SPHERE); diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp index 1656d4c5a72..cfa1b704c90 100644 --- a/src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp +++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -65,7 +65,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_magus_telestraAI(creature); + return GetInstanceAI<boss_magus_telestraAI>(creature); } struct boss_magus_telestraAI : public ScriptedAI @@ -118,24 +118,21 @@ public: me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); me->SetVisible(true); - if (instance) - instance->SetData(DATA_MAGUS_TELESTRA_EVENT, NOT_STARTED); + instance->SetData(DATA_MAGUS_TELESTRA_EVENT, NOT_STARTED); } void EnterCombat(Unit* /*who*/) OVERRIDE { Talk(SAY_AGGRO); - if (instance) - instance->SetData(DATA_MAGUS_TELESTRA_EVENT, IN_PROGRESS); + instance->SetData(DATA_MAGUS_TELESTRA_EVENT, IN_PROGRESS); } void JustDied(Unit* /*killer*/) OVERRIDE { Talk(SAY_DEATH); - if (instance) - instance->SetData(DATA_MAGUS_TELESTRA_EVENT, DONE); + instance->SetData(DATA_MAGUS_TELESTRA_EVENT, DONE); } void KilledUnit(Unit* who) OVERRIDE diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp index d911aa8ed1a..93e52c4da73 100644 --- a/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp +++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -70,6 +70,12 @@ public: { boss_ormorokAI(Creature* creature) : BossAI(creature, DATA_ORMOROK_EVENT) { } + void Reset() + { + BossAI::Reset(); + frenzy = false; + } + void EnterCombat(Unit* /*who*/) OVERRIDE { _EnterCombat(); @@ -82,8 +88,7 @@ public: Talk(SAY_AGGRO); - if (instance) - instance->SetData(DATA_ORMOROK_EVENT, IN_PROGRESS); + instance->SetData(DATA_ORMOROK_EVENT, IN_PROGRESS); } void DamageTaken(Unit* /*attacker*/, uint32& /*damage*/) OVERRIDE @@ -102,8 +107,7 @@ public: Talk(SAY_DEATH); - if (instance) - instance->SetData(DATA_ORMOROK_EVENT, DONE); + instance->SetData(DATA_ORMOROK_EVENT, DONE); } void KilledUnit(Unit* who) OVERRIDE @@ -160,7 +164,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_ormorokAI(creature); + return GetInstanceAI<boss_ormorokAI>(creature); } }; @@ -191,7 +195,11 @@ public: struct npc_crystal_spike_triggerAI : public ScriptedAI { - npc_crystal_spike_triggerAI(Creature* creature) : ScriptedAI(creature) { } + npc_crystal_spike_triggerAI(Creature* creature) : ScriptedAI(creature) + { + _count = 0; + _despawntimer = 0; + } void IsSummonedBy(Unit* owner) OVERRIDE { diff --git a/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp b/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp index 109106d4d59..851e16fe576 100644 --- a/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp +++ b/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Northrend/Nexus/Nexus/nexus.h b/src/server/scripts/Northrend/Nexus/Nexus/nexus.h index 58abfb3b63e..e9be1a32c2a 100644 --- a/src/server/scripts/Northrend/Nexus/Nexus/nexus.h +++ b/src/server/scripts/Northrend/Nexus/Nexus/nexus.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/Nexus/Oculus/boss_drakos.cpp b/src/server/scripts/Northrend/Nexus/Oculus/boss_drakos.cpp index d22a0bcc79f..949b26d3d3b 100644 --- a/src/server/scripts/Northrend/Nexus/Oculus/boss_drakos.cpp +++ b/src/server/scripts/Northrend/Nexus/Oculus/boss_drakos.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/Nexus/Oculus/boss_eregos.cpp b/src/server/scripts/Northrend/Nexus/Oculus/boss_eregos.cpp index 1f7d47ccc31..c4fda7e68b3 100644 --- a/src/server/scripts/Northrend/Nexus/Oculus/boss_eregos.cpp +++ b/src/server/scripts/Northrend/Nexus/Oculus/boss_eregos.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp b/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp index db1bb342286..8cc198a0d84 100644 --- a/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp +++ b/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp b/src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp index 385f80ae37d..f6cf17c5b88 100644 --- a/src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp +++ b/src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -217,17 +217,14 @@ class npc_azure_ring_captain : public CreatureScript switch (action) { case ACTION_CALL_DRAGON_EVENT: - if (instance) + if (Creature* varos = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_VAROS))) { - if (Creature* varos = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_VAROS))) + if (Unit* victim = varos->AI()->SelectTarget(SELECT_TARGET_RANDOM, 0)) { - if (Unit* victim = varos->AI()->SelectTarget(SELECT_TARGET_RANDOM, 0)) - { - me->SetReactState(REACT_PASSIVE); - me->SetWalk(false); - me->GetMotionMaster()->MovePoint(ACTION_CALL_DRAGON_EVENT, victim->GetPositionX(), victim->GetPositionY(), victim->GetPositionZ() + 20.0f); - targetGUID = victim->GetGUID(); - } + me->SetReactState(REACT_PASSIVE); + me->SetWalk(false); + me->GetMotionMaster()->MovePoint(ACTION_CALL_DRAGON_EVENT, victim->GetPositionX(), victim->GetPositionY(), victim->GetPositionZ() + 20.0f); + targetGUID = victim->GetGUID(); } } break; @@ -241,7 +238,7 @@ class npc_azure_ring_captain : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_azure_ring_captainAI(creature); + return GetInstanceAI<npc_azure_ring_captainAI>(creature); } }; diff --git a/src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp b/src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp index b108378910e..2c809b17367 100644 --- a/src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp +++ b/src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp b/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp index c565f71320d..40e526219fa 100644 --- a/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp +++ b/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/Nexus/Oculus/oculus.h b/src/server/scripts/Northrend/Nexus/Oculus/oculus.h index 6f34cfbf6e5..f54b1c067f0 100644 --- a/src/server/scripts/Northrend/Nexus/Oculus/oculus.h +++ b/src/server/scripts/Northrend/Nexus/Oculus/oculus.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_bjarngrim.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_bjarngrim.cpp index 7d1f2d86b18..dbdcfc88951 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_bjarngrim.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_bjarngrim.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -99,7 +99,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_bjarngrimAI(creature); + return GetInstanceAI<boss_bjarngrimAI>(creature); } struct boss_bjarngrimAI : public ScriptedAI @@ -180,8 +180,7 @@ public: SetEquipmentSlots(false, EQUIP_SWORD, EQUIP_SHIELD, EQUIP_NO_CHANGE); - if (instance) - instance->SetBossState(DATA_BJARNGRIM, NOT_STARTED); + instance->SetBossState(DATA_BJARNGRIM, NOT_STARTED); } void EnterEvadeMode() OVERRIDE @@ -201,8 +200,7 @@ public: //must get both lieutenants here and make sure they are with him me->CallForHelp(30.0f); - if (instance) - instance->SetBossState(DATA_BJARNGRIM, IN_PROGRESS); + instance->SetBossState(DATA_BJARNGRIM, IN_PROGRESS); } void KilledUnit(Unit* /*victim*/) OVERRIDE @@ -214,8 +212,7 @@ public: { Talk(SAY_DEATH); - if (instance) - instance->SetBossState(DATA_BJARNGRIM, DONE); + instance->SetBossState(DATA_BJARNGRIM, DONE); } /// @todo remove when removal is done by the core @@ -391,7 +388,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_stormforged_lieutenantAI(creature); + return GetInstanceAI<npc_stormforged_lieutenantAI>(creature); } struct npc_stormforged_lieutenantAI : public ScriptedAI @@ -414,13 +411,10 @@ public: void EnterCombat(Unit* who) OVERRIDE { - if (instance) + if (Creature* pBjarngrim = instance->instance->GetCreature(instance->GetData64(DATA_BJARNGRIM))) { - if (Creature* pBjarngrim = instance->instance->GetCreature(instance->GetData64(DATA_BJARNGRIM))) - { - if (pBjarngrim->IsAlive() && !pBjarngrim->GetVictim()) - pBjarngrim->AI()->AttackStart(who); - } + if (pBjarngrim->IsAlive() && !pBjarngrim->GetVictim()) + pBjarngrim->AI()->AttackStart(who); } } @@ -440,13 +434,10 @@ public: if (m_uiRenewSteel_Timer <= uiDiff) { - if (instance) + if (Creature* pBjarngrim = instance->instance->GetCreature(instance->GetData64(DATA_BJARNGRIM))) { - if (Creature* pBjarngrim = instance->instance->GetCreature(instance->GetData64(DATA_BJARNGRIM))) - { - if (pBjarngrim->IsAlive()) - DoCast(pBjarngrim, SPELL_RENEW_STEEL_N); - } + if (pBjarngrim->IsAlive()) + DoCast(pBjarngrim, SPELL_RENEW_STEEL_N); } m_uiRenewSteel_Timer = urand(10000, 14000); } diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_ionar.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_ionar.cpp index 68116452082..c666a36741b 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_ionar.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_ionar.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -72,7 +72,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_ionarAI(creature); + return GetInstanceAI<boss_ionarAI>(creature); } struct boss_ionarAI : public ScriptedAI @@ -115,16 +115,14 @@ public: if (!me->IsVisible()) me->SetVisible(true); - if (instance) - instance->SetBossState(DATA_IONAR, NOT_STARTED); + instance->SetBossState(DATA_IONAR, NOT_STARTED); } void EnterCombat(Unit* /*who*/) OVERRIDE { Talk(SAY_AGGRO); - if (instance) - instance->SetBossState(DATA_IONAR, IN_PROGRESS); + instance->SetBossState(DATA_IONAR, IN_PROGRESS); } void JustDied(Unit* /*killer*/) OVERRIDE @@ -133,8 +131,7 @@ public: lSparkList.DespawnAll(); - if (instance) - instance->SetBossState(DATA_IONAR, DONE); + instance->SetBossState(DATA_IONAR, DONE); } void KilledUnit(Unit* who) OVERRIDE @@ -302,7 +299,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_spark_of_ionarAI(creature); + return GetInstanceAI<npc_spark_of_ionarAI>(creature); } struct npc_spark_of_ionarAI : public ScriptedAI @@ -348,24 +345,21 @@ public: // Prevent them to follow players through the whole instance if (uiCheckTimer <= uiDiff) { - if (instance) + Creature* pIonar = instance->instance->GetCreature(instance->GetData64(DATA_IONAR)); + if (pIonar && pIonar->IsAlive()) { - Creature* pIonar = instance->instance->GetCreature(instance->GetData64(DATA_IONAR)); - if (pIonar && pIonar->IsAlive()) + if (me->GetDistance(pIonar) > DATA_MAX_SPARK_DISTANCE) { - if (me->GetDistance(pIonar) > DATA_MAX_SPARK_DISTANCE) - { - Position pos; - pIonar->GetPosition(&pos); - - me->SetSpeed(MOVE_RUN, 2.0f); - me->GetMotionMaster()->Clear(); - me->GetMotionMaster()->MovePoint(DATA_POINT_CALLBACK, pos); - } + Position pos; + pIonar->GetPosition(&pos); + + me->SetSpeed(MOVE_RUN, 2.0f); + me->GetMotionMaster()->Clear(); + me->GetMotionMaster()->MovePoint(DATA_POINT_CALLBACK, pos); } - else - me->DespawnOrUnsummon(); } + else + me->DespawnOrUnsummon(); uiCheckTimer = 2*IN_MILLISECONDS; } else diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_loken.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_loken.cpp index af6cc7350c3..fee7d201a31 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_loken.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_loken.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -69,7 +69,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_lokenAI(creature); + return GetInstanceAI<boss_lokenAI>(creature); } struct boss_lokenAI : public ScriptedAI @@ -95,33 +95,24 @@ public: m_uiHealthAmountModifier = 1; - if (instance) - { - instance->SetBossState(DATA_LOKEN, NOT_STARTED); - instance->DoStopTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMELY_DEATH_START_EVENT); - } + instance->SetBossState(DATA_LOKEN, NOT_STARTED); + instance->DoStopTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMELY_DEATH_START_EVENT); } void EnterCombat(Unit* /*who*/) OVERRIDE { Talk(SAY_AGGRO); - if (instance) - { - instance->SetBossState(DATA_LOKEN, IN_PROGRESS); - instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMELY_DEATH_START_EVENT); - } + instance->SetBossState(DATA_LOKEN, IN_PROGRESS); + instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMELY_DEATH_START_EVENT); } void JustDied(Unit* /*killer*/) OVERRIDE { Talk(SAY_DEATH); - if (instance) - { - instance->SetBossState(DATA_LOKEN, DONE); - instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_PULSING_SHOCKWAVE_AURA); - } + instance->SetBossState(DATA_LOKEN, DONE); + instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_PULSING_SHOCKWAVE_AURA); } void KilledUnit(Unit* who) OVERRIDE diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp index 8f231457619..c312d001ee7 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -75,7 +75,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_volkhanAI(creature); + return GetInstanceAI<boss_volkhanAI>(creature); } struct boss_volkhanAI : public ScriptedAI @@ -120,16 +120,14 @@ public: DespawnGolem(); m_lGolemGUIDList.clear(); - if (instance) - instance->SetBossState(DATA_VOLKHAN, NOT_STARTED); + instance->SetBossState(DATA_VOLKHAN, NOT_STARTED); } void EnterCombat(Unit* /*who*/) OVERRIDE { Talk(SAY_AGGRO); - if (instance) - instance->SetBossState(DATA_VOLKHAN, IN_PROGRESS); + instance->SetBossState(DATA_VOLKHAN, IN_PROGRESS); } void AttackStart(Unit* who) OVERRIDE @@ -150,8 +148,7 @@ public: Talk(SAY_DEATH); DespawnGolem(); - if (instance) - instance->SetBossState(DATA_VOLKHAN, DONE); + instance->SetBossState(DATA_VOLKHAN, DONE); } void KilledUnit(Unit* who) OVERRIDE diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/halls_of_lightning.h b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/halls_of_lightning.h index 17c049e8292..cef99ce7abd 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/halls_of_lightning.h +++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/halls_of_lightning.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/instance_halls_of_lightning.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/instance_halls_of_lightning.cpp index 394fbc84253..a6d55c363f5 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/instance_halls_of_lightning.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/instance_halls_of_lightning.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_krystallus.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_krystallus.cpp index b6a4375d0eb..3a38f2b61e5 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_krystallus.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_krystallus.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -83,15 +83,13 @@ public: uiStompTimer = urand(20000, 29000); uiShatterTimer = 0; - if (instance) - instance->SetBossState(DATA_KRYSTALLUS, NOT_STARTED); + instance->SetBossState(DATA_KRYSTALLUS, NOT_STARTED); } void EnterCombat(Unit* /*who*/) OVERRIDE { Talk(SAY_AGGRO); - if (instance) - instance->SetBossState(DATA_KRYSTALLUS, IN_PROGRESS); + instance->SetBossState(DATA_KRYSTALLUS, IN_PROGRESS); } void UpdateAI(uint32 diff) OVERRIDE @@ -143,8 +141,7 @@ public: { Talk(SAY_DEATH); - if (instance) - instance->SetBossState(DATA_KRYSTALLUS, DONE); + instance->SetBossState(DATA_KRYSTALLUS, DONE); } void KilledUnit(Unit* victim) OVERRIDE diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_maiden_of_grief.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_maiden_of_grief.cpp index f4ea3ff556c..927f4490770 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_maiden_of_grief.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_maiden_of_grief.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -15,153 +15,130 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -/* Script Data Start -SDName: Boss maiden_of_grief -SDAuthor: LordVanMartin -SD%Complete: -SDComment: -SDCategory: -Script Data End */ - #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "halls_of_stone.h" +enum Yells +{ + SAY_AGGRO = 0, + SAY_SLAY = 1, + SAY_DEATH = 2, + SAY_STUN = 3 +}; + enum Spells { - SPELL_PARTING_SORROW = 59723, - SPELL_STORM_OF_GRIEF_N = 50752, - SPELL_STORM_OF_GRIEF_H = 59772, - SPELL_SHOCK_OF_SORROW_N = 50760, - SPELL_SHOCK_OF_SORROW_H = 59726, - SPELL_PILLAR_OF_WOE_N = 50761, - SPELL_PILLAR_OF_WOE_H = 59727 + SPELL_PARTING_SORROW = 59723, + SPELL_STORM_OF_GRIEF = 50752, + SPELL_SHOCK_OF_SORROW = 50760, + SPELL_PILLAR_OF_WOE = 50761 }; -enum Yells +enum Events { - SAY_AGGRO = 0, - SAY_SLAY = 1, - SAY_DEATH = 2, - SAY_STUN = 3 + EVENT_PARTING_SORROW = 1, + EVENT_STORM_OF_GRIEF, + EVENT_SHOCK_OF_SORROW, + EVENT_PILLAR_OF_WOE }; enum Achievements { - ACHIEV_GOOD_GRIEF_START_EVENT = 20383, + ACHIEV_GOOD_GRIEF_START_EVENT = 20383, }; class boss_maiden_of_grief : public CreatureScript { -public: - boss_maiden_of_grief() : CreatureScript("boss_maiden_of_grief") { } + public: + boss_maiden_of_grief() : CreatureScript("boss_maiden_of_grief") { } - struct boss_maiden_of_griefAI : public ScriptedAI - { - boss_maiden_of_griefAI(Creature* creature) : ScriptedAI(creature) + struct boss_maiden_of_griefAI : public BossAI { - instance = me->GetInstanceScript(); - } - - InstanceScript* instance; + boss_maiden_of_griefAI(Creature* creature) : BossAI(creature, DATA_MAIDEN_OF_GRIEF) { } - uint32 PartingSorrowTimer; - uint32 StormOfGriefTimer; - uint32 ShockOfSorrowTimer; - uint32 PillarOfWoeTimer; + void Reset() OVERRIDE + { + _Reset(); - void Reset() OVERRIDE - { - PartingSorrowTimer = urand(25000, 30000); - StormOfGriefTimer = 10000; - ShockOfSorrowTimer = 20000+rand()%5000; - PillarOfWoeTimer = urand(5000, 15000); + if (IsHeroic()) + events.ScheduleEvent(EVENT_PARTING_SORROW, urand(25000, 30000)); + events.ScheduleEvent(EVENT_STORM_OF_GRIEF, 10000); + events.ScheduleEvent(EVENT_SHOCK_OF_SORROW, urand(20000, 25000)); + events.ScheduleEvent(EVENT_PILLAR_OF_WOE, urand(5000, 15000)); - if (instance) - { - instance->SetBossState(DATA_MAIDEN_OF_GRIEF, NOT_STARTED); instance->DoStopTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_GOOD_GRIEF_START_EVENT); } - } - void EnterCombat(Unit* /*who*/) OVERRIDE - { - Talk(SAY_AGGRO); - - if (instance) + void EnterCombat(Unit* /*who*/) OVERRIDE { - instance->SetBossState(DATA_MAIDEN_OF_GRIEF, IN_PROGRESS); + _EnterCombat(); + Talk(SAY_AGGRO); + instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_GOOD_GRIEF_START_EVENT); } - } - void UpdateAI(uint32 diff) OVERRIDE - { - //Return since we have no target - if (!UpdateVictim()) - return; - - if (IsHeroic()) + void KilledUnit(Unit* who) OVERRIDE { - if (PartingSorrowTimer <= diff) - { - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) - DoCast(target, SPELL_PARTING_SORROW); - - PartingSorrowTimer = urand(30000, 40000); - } else PartingSorrowTimer -= diff; + if (who->GetTypeId() == TYPEID_PLAYER) + Talk(SAY_SLAY); } - if (StormOfGriefTimer <= diff) + void JustDied(Unit* /*killer*/) OVERRIDE { - DoCastVictim(SPELL_STORM_OF_GRIEF_N, true); - StormOfGriefTimer = urand(15000, 20000); - } else StormOfGriefTimer -= diff; - - if (ShockOfSorrowTimer <= diff) - { - DoResetThreat(); - Talk(SAY_STUN); - DoCast(me, SPELL_SHOCK_OF_SORROW_N); - ShockOfSorrowTimer = urand(20000, 30000); - } else ShockOfSorrowTimer -= diff; + _JustDied(); + Talk(SAY_DEATH); + } - if (PillarOfWoeTimer <= diff) + void UpdateAI(uint32 diff) OVERRIDE { - Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1); - - if (target) - DoCast(target, SPELL_PILLAR_OF_WOE_N); - else - DoCastVictim(SPELL_PILLAR_OF_WOE_N); + if (!UpdateVictim()) + return; - PillarOfWoeTimer = urand(5000, 25000); - } else PillarOfWoeTimer -= diff; + events.Update(diff); - DoMeleeAttackIfReady(); - } - - void JustDied(Unit* /*killer*/) OVERRIDE - { - Talk(SAY_DEATH); + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; - if (instance) - instance->SetBossState(DATA_MAIDEN_OF_GRIEF, DONE); - } + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_PARTING_SORROW: + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true)) + DoCast(target, SPELL_PARTING_SORROW); + events.ScheduleEvent(EVENT_PARTING_SORROW, urand(30000, 40000)); + break; + case EVENT_STORM_OF_GRIEF: + DoCastVictim(SPELL_STORM_OF_GRIEF, true); + events.ScheduleEvent(EVENT_STORM_OF_GRIEF, urand(15000, 20000)); + break; + case EVENT_SHOCK_OF_SORROW: + DoResetThreat(); + Talk(SAY_STUN); + DoCastAOE(SPELL_SHOCK_OF_SORROW); + events.ScheduleEvent(EVENT_SHOCK_OF_SORROW, urand(20000, 30000)); + break; + case EVENT_PILLAR_OF_WOE: + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 0.0f, true)) + DoCast(target, SPELL_PILLAR_OF_WOE); + else + DoCastVictim(SPELL_PILLAR_OF_WOE); + events.ScheduleEvent(EVENT_PILLAR_OF_WOE, urand(5000, 25000)); + break; + default: + break; + } + } + + DoMeleeAttackIfReady(); + } + }; - void KilledUnit(Unit* victim) OVERRIDE + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - if (victim->GetTypeId() != TYPEID_PLAYER) - return; - - Talk(SAY_SLAY); + return GetHallsOfStoneAI<boss_maiden_of_griefAI>(creature); } - }; - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return GetHallsOfStoneAI<boss_maiden_of_griefAI>(creature); - } }; void AddSC_boss_maiden_of_grief() diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_sjonnir.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_sjonnir.cpp index 618628adf88..b2785fbaba5 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_sjonnir.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_sjonnir.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.cpp index ff4a5d1b43a..d64b0d5c71d 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -167,13 +167,10 @@ public: bMarnakActivated = false; bAbedneumActivated = false; - if (instance) - { - instance->HandleGameObject(instance->GetData64(DATA_GO_KADDRAK), false); - instance->HandleGameObject(instance->GetData64(DATA_GO_MARNAK), false); - instance->HandleGameObject(instance->GetData64(DATA_GO_ABEDNEUM), false); - instance->HandleGameObject(instance->GetData64(DATA_GO_SKY_FLOOR), false); - } + instance->HandleGameObject(instance->GetData64(DATA_GO_KADDRAK), false); + instance->HandleGameObject(instance->GetData64(DATA_GO_MARNAK), false); + instance->HandleGameObject(instance->GetData64(DATA_GO_ABEDNEUM), false); + instance->HandleGameObject(instance->GetData64(DATA_GO_SKY_FLOOR), false); KaddrakGUIDList.clear(); } @@ -324,8 +321,7 @@ public: DespawnDwarf(); - if (instance) - instance->SetBossState(DATA_BRANN_EVENT, NOT_STARTED); + instance->SetBossState(DATA_BRANN_EVENT, NOT_STARTED); } } @@ -362,8 +358,7 @@ public: break; case 17: Talk(SAY_EVENT_INTRO_2); - if (instance) - instance->HandleGameObject(instance->GetData64(DATA_GO_TRIBUNAL_CONSOLE), true); + instance->HandleGameObject(instance->GetData64(DATA_GO_TRIBUNAL_CONSOLE), true); me->SetStandState(UNIT_STAND_STATE_KNEEL); SetEscortPaused(true); JumpToNextStep(8500); @@ -438,12 +433,9 @@ public: switch (uiStep) { case 1: - if (instance) - { - if (instance->GetBossState(DATA_BRANN_EVENT) != NOT_STARTED) - return; - instance->SetBossState(DATA_BRANN_EVENT, IN_PROGRESS); - } + if (instance->GetBossState(DATA_BRANN_EVENT) != NOT_STARTED) + return; + instance->SetBossState(DATA_BRANN_EVENT, IN_PROGRESS); bIsBattle = false; Talk(SAY_ESCORT_START); SetRun(true); @@ -454,25 +446,22 @@ public: JumpToNextStep(0); break; case 5: - if (instance) - if (Creature* temp = (Unit::GetCreature(*me, instance->GetData64(DATA_ABEDNEUM)))) - temp->AI()->Talk(SAY_EVENT_INTRO_3_ABED); - JumpToNextStep(8500); + if (Creature* temp = (Unit::GetCreature(*me, instance->GetData64(DATA_ABEDNEUM)))) + temp->AI()->Talk(SAY_EVENT_INTRO_3_ABED); + JumpToNextStep(8500); break; case 6: Talk(SAY_EVENT_A_1); JumpToNextStep(6500); break; case 7: - if (instance) - if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_KADDRAK))) - temp->AI()->Talk(SAY_EVENT_A_2_KADD); - JumpToNextStep(12500); + if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_KADDRAK))) + temp->AI()->Talk(SAY_EVENT_A_2_KADD); + JumpToNextStep(12500); break; case 8: Talk(SAY_EVENT_A_3); - if (instance) - instance->HandleGameObject(instance->GetData64(DATA_GO_KADDRAK), true); + instance->HandleGameObject(instance->GetData64(DATA_GO_KADDRAK), true); if (Creature* temp = Unit::GetCreature(*me, uiControllerGUID)) CAST_AI(npc_tribuna_controller::npc_tribuna_controllerAI, temp->AI())->bKaddrakActivated = true; JumpToNextStep(5000); @@ -487,16 +476,14 @@ public: JumpToNextStep(6000); break; case 11: - if (instance) - if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_MARNAK))) - temp->AI()->Talk(SAY_EVENT_B_2_MARN); + if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_MARNAK))) + temp->AI()->Talk(SAY_EVENT_B_2_MARN); SpawnDwarf(1); JumpToNextStep(20000); break; case 12: Talk(SAY_EVENT_B_3); - if (instance) - instance->HandleGameObject(instance->GetData64(DATA_GO_MARNAK), true); + instance->HandleGameObject(instance->GetData64(DATA_GO_MARNAK), true); if (Creature* temp = Unit::GetCreature(*me, uiControllerGUID)) CAST_AI(npc_tribuna_controller::npc_tribuna_controllerAI, temp->AI())->bMarnakActivated = true; JumpToNextStep(10000); @@ -519,16 +506,14 @@ public: JumpToNextStep(20000); break; case 17: - if (instance) - if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_ABEDNEUM))) - temp->AI()->Talk(SAY_EVENT_C_2_ABED); - SpawnDwarf(1); + if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_ABEDNEUM))) + temp->AI()->Talk(SAY_EVENT_C_2_ABED); + SpawnDwarf(1); JumpToNextStep(20000); break; case 18: Talk(SAY_EVENT_C_3); - if (instance) - instance->HandleGameObject(instance->GetData64(DATA_GO_ABEDNEUM), true); + instance->HandleGameObject(instance->GetData64(DATA_GO_ABEDNEUM), true); if (Creature* temp = Unit::GetCreature(*me, uiControllerGUID)) CAST_AI(npc_tribuna_controller::npc_tribuna_controllerAI, temp->AI())->bAbedneumActivated = true; JumpToNextStep(5000); @@ -547,9 +532,8 @@ public: JumpToNextStep(20000); break; case 22: - if (instance) - if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_ABEDNEUM))) - temp->AI()->Talk(SAY_EVENT_D_2_ABED); + if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_ABEDNEUM))) + temp->AI()->Talk(SAY_EVENT_D_2_ABED); SpawnDwarf(1); JumpToNextStep(5000); break; @@ -571,9 +555,8 @@ public: JumpToNextStep(10000); break; case 27: - if (instance) - if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_ABEDNEUM))) - temp->AI()->Talk(SAY_EVENT_D_4_ABED); + if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_ABEDNEUM))) + temp->AI()->Talk(SAY_EVENT_D_4_ABED); SpawnDwarf(1); JumpToNextStep(10000); break; @@ -581,8 +564,7 @@ public: me->SetReactState(REACT_DEFENSIVE); Talk(SAY_EVENT_END_01); me->SetStandState(UNIT_STAND_STATE_STAND); - if (instance) - instance->HandleGameObject(instance->GetData64(DATA_GO_SKY_FLOOR), true); + instance->HandleGameObject(instance->GetData64(DATA_GO_SKY_FLOOR), true); if (Creature* temp = Unit::GetCreature(*me, uiControllerGUID)) temp->DealDamage(temp, temp->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); bIsBattle = true; @@ -591,15 +573,13 @@ public: break; case 29: Talk(SAY_EVENT_END_02); - if (instance) - instance->SetBossState(DATA_BRANN_EVENT, DONE); + instance->SetBossState(DATA_BRANN_EVENT, DONE); me->CastSpell(me, SPELL_REWARD_ACHIEVEMENT, true); JumpToNextStep(5500); break; case 30: - if (instance) - if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_ABEDNEUM))) - temp->AI()->Talk(SAY_EVENT_END_03_ABED); + if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_ABEDNEUM))) + temp->AI()->Talk(SAY_EVENT_END_03_ABED); JumpToNextStep(8500); break; case 31: @@ -607,29 +587,26 @@ public: JumpToNextStep(11500); break; case 32: - if (instance) - if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_ABEDNEUM))) - temp->AI()->Talk(SAY_EVENT_END_05_ABED); - JumpToNextStep(11500); + if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_ABEDNEUM))) + temp->AI()->Talk(SAY_EVENT_END_05_ABED); + JumpToNextStep(11500); break; case 33: Talk(SAY_EVENT_END_06); JumpToNextStep(4500); break; case 34: - if (instance) - if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_ABEDNEUM))) - temp->AI()->Talk(SAY_EVENT_END_07_ABED); - JumpToNextStep(22500); + if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_ABEDNEUM))) + temp->AI()->Talk(SAY_EVENT_END_07_ABED); + JumpToNextStep(22500); break; case 35: Talk(SAY_EVENT_END_08); JumpToNextStep(7500); break; case 36: - if (instance) - if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_KADDRAK))) - temp->AI()->Talk(SAY_EVENT_END_09_KADD); + if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_KADDRAK))) + temp->AI()->Talk(SAY_EVENT_END_09_KADD); JumpToNextStep(18500); break; case 37: @@ -637,19 +614,17 @@ public: JumpToNextStep(5500); break; case 38: - if (instance) - if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_KADDRAK))) - temp->AI()->Talk(SAY_EVENT_END_11_KADD); - JumpToNextStep(20500); + if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_KADDRAK))) + temp->AI()->Talk(SAY_EVENT_END_11_KADD); + JumpToNextStep(20500); break; case 39: Talk(SAY_EVENT_END_12); JumpToNextStep(2500); break; case 40: - if (instance) - if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_KADDRAK))) - temp->AI()->Talk(SAY_EVENT_END_13_KADD); + if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_KADDRAK))) + temp->AI()->Talk(SAY_EVENT_END_13_KADD); JumpToNextStep(19500); break; case 41: @@ -657,50 +632,43 @@ public: JumpToNextStep(10500); break; case 42: - if (instance) - if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_MARNAK))) - temp->AI()->Talk(SAY_EVENT_END_15_MARN); - JumpToNextStep(6500); + if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_MARNAK))) + temp->AI()->Talk(SAY_EVENT_END_15_MARN); + JumpToNextStep(6500); break; case 43: Talk(SAY_EVENT_END_16); JumpToNextStep(6500); break; case 44: - if (instance) - if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_MARNAK))) - temp->AI()->Talk(SAY_EVENT_END_17_MARN); - JumpToNextStep(25500); + if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_MARNAK))) + temp->AI()->Talk(SAY_EVENT_END_17_MARN); + JumpToNextStep(25500); break; case 45: Talk(SAY_EVENT_END_18); JumpToNextStep(23500); break; case 46: - if (instance) - if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_MARNAK))) - temp->AI()->Talk(SAY_EVENT_END_19_MARN); - JumpToNextStep(3500); + if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_MARNAK))) + temp->AI()->Talk(SAY_EVENT_END_19_MARN); + JumpToNextStep(3500); break; case 47: Talk(SAY_EVENT_END_20); JumpToNextStep(8500); break; case 48: - if (instance) - if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_ABEDNEUM))) - temp->AI()->Talk(SAY_EVENT_END_21_ABED); - JumpToNextStep(5500); + if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_ABEDNEUM))) + temp->AI()->Talk(SAY_EVENT_END_21_ABED); + JumpToNextStep(5500); break; case 49: { - if (instance) - { - instance->HandleGameObject(instance->GetData64(DATA_GO_KADDRAK), false); - instance->HandleGameObject(instance->GetData64(DATA_GO_MARNAK), false); - instance->HandleGameObject(instance->GetData64(DATA_GO_ABEDNEUM), false); - instance->HandleGameObject(instance->GetData64(DATA_GO_SKY_FLOOR), false); - } + instance->HandleGameObject(instance->GetData64(DATA_GO_KADDRAK), false); + instance->HandleGameObject(instance->GetData64(DATA_GO_MARNAK), false); + instance->HandleGameObject(instance->GetData64(DATA_GO_ABEDNEUM), false); + instance->HandleGameObject(instance->GetData64(DATA_GO_SKY_FLOOR), false); Player* player = GetPlayerForEscort(); if (player) player->GroupEventHappens(QUEST_HALLS_OF_STONE, me); diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.h b/src/server/scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.h index b8af76bba20..3690557d91b 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.h +++ b/src/server/scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfStone/instance_halls_of_stone.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfStone/instance_halls_of_stone.cpp index 552e0661568..9f0bb3c87c1 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfStone/instance_halls_of_stone.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfStone/instance_halls_of_stone.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp index aa3c034da6e..a8f933431c3 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_assembly_of_iron.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_assembly_of_iron.cpp index cf33906d6f1..9b417690f46 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_assembly_of_iron.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_assembly_of_iron.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_auriaya.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_auriaya.cpp index e2a8ab25cac..a809eb4ddff 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_auriaya.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_auriaya.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -315,7 +315,7 @@ class npc_auriaya_seeping_trigger : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_auriaya_seeping_triggerAI(creature); + return GetInstanceAI<npc_auriaya_seeping_triggerAI>(creature); } }; @@ -390,7 +390,7 @@ class npc_sanctum_sentry : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_sanctum_sentryAI(creature); + return GetInstanceAI<npc_sanctum_sentryAI>(creature); } }; @@ -466,7 +466,7 @@ class npc_feral_defender : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_feral_defenderAI(creature); + return GetInstanceAI<npc_feral_defenderAI>(creature); } }; diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp index 44c380465a4..779adf67211 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -619,7 +619,7 @@ class boss_flame_leviathan_seat : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_flame_leviathan_seatAI(creature); + return GetInstanceAI<boss_flame_leviathan_seatAI>(creature); } }; @@ -898,7 +898,7 @@ class npc_colossus : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_colossusAI(creature); + return GetInstanceAI<npc_colossusAI>(creature); } }; diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp index e8f8e7684c2..64ee385b7fc 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -1146,7 +1146,7 @@ class npc_ancient_water_spirit : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_ancient_water_spiritAI(creature); + return GetInstanceAI<npc_ancient_water_spiritAI>(creature); } }; @@ -1213,7 +1213,7 @@ class npc_storm_lasher : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_storm_lasherAI(creature); + return GetInstanceAI<npc_storm_lasherAI>(creature); } }; @@ -1258,7 +1258,7 @@ class npc_snaplasher : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_snaplasherAI(creature); + return GetInstanceAI<npc_snaplasherAI>(creature); } }; @@ -1522,7 +1522,7 @@ class npc_unstable_sun_beam : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_unstable_sun_beamAI(creature); + return GetInstanceAI<npc_unstable_sun_beamAI>(creature); } }; diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp index 46776ae9b96..446075f76e5 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -369,7 +369,7 @@ class boss_saronite_animus : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_saronite_animusAI(creature); + return GetInstanceAI<boss_saronite_animusAI>(creature); } }; @@ -439,7 +439,7 @@ class npc_saronite_vapors : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_saronite_vaporsAI(creature); + return GetInstanceAI<npc_saronite_vaporsAI>(creature); } }; diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_hodir.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_hodir.cpp index 2fb165b935e..480c04c3254 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_hodir.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_hodir.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -235,7 +235,7 @@ class npc_flash_freeze : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_flash_freezeAI(creature); + return GetInstanceAI<npc_flash_freezeAI>(creature); } }; @@ -296,7 +296,7 @@ class npc_ice_block : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_ice_blockAI(creature); + return GetInstanceAI<npc_ice_blockAI>(creature); } }; diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp index 45c35741c3c..4b1572447d4 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp index ec2cf36822d..26886719ec8 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp index 6783d8cd428..f58ed4e83e5 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp index 31c635c7de5..862ee2c786b 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -300,7 +300,7 @@ class boss_razorscale_controller : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_razorscale_controllerAI(creature); + return GetInstanceAI<boss_razorscale_controllerAI>(creature); } }; @@ -735,7 +735,7 @@ class npc_expedition_commander : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_expedition_commanderAI(creature); + return GetInstanceAI<npc_expedition_commanderAI>(creature); } }; diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_thorim.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_thorim.cpp index c14cab88d76..73b644f3021 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_thorim.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_thorim.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp index 3997a484323..ee87e3e9732 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -218,9 +218,6 @@ class boss_xt002 : public CreatureScript _phase = 1; _heartExposed = 0; - if (!instance) - return; - instance->DoStopTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_MUST_DECONSTRUCT_FASTER); } @@ -235,9 +232,6 @@ class boss_xt002 : public CreatureScript //Tantrum is cast a bit slower the first time. events.ScheduleEvent(EVENT_TYMPANIC_TANTRUM, urand(TIMER_TYMPANIC_TANTRUM_MIN, TIMER_TYMPANIC_TANTRUM_MAX) * 2); - if (!instance) - return; - instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_MUST_DECONSTRUCT_FASTER); } @@ -477,7 +471,7 @@ class npc_xt002_heart : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_xt002_heartAI(creature); + return GetInstanceAI<npc_xt002_heartAI>(creature); } }; @@ -493,7 +487,7 @@ class npc_scrapbot : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_scrapbotAI(creature); + return GetInstanceAI<npc_scrapbotAI>(creature); } struct npc_scrapbotAI : public ScriptedAI @@ -550,7 +544,7 @@ class npc_pummeller : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_pummellerAI(creature); + return GetInstanceAI<npc_pummellerAI>(creature); } struct npc_pummellerAI : public ScriptedAI @@ -652,7 +646,7 @@ class npc_boombot : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_boombotAI(creature); + return GetInstanceAI<npc_boombotAI>(creature); } struct npc_boombotAI : public ScriptedAI diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp index 96a2a52714a..5e44d97299e 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp index d0cb7108c09..d0a25d2b216 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.h b/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.h index 45134cd9ff6..3544ff3c079 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.h +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar_teleporter.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar_teleporter.cpp index 0daa9ea16c6..e3e588be076 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar_teleporter.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar_teleporter.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp index 30174996a42..cc37dde57dd 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_keleseth.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_keleseth.cpp index 68f59419998..1bcbc63a8ab 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_keleseth.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_keleseth.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_skarvald_dalronn.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_skarvald_dalronn.cpp index 42fa0242df2..76ae2a1d374 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_skarvald_dalronn.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_skarvald_dalronn.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/instance_utgarde_keep.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/instance_utgarde_keep.cpp index c4e7416f855..763dcda24e1 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/instance_utgarde_keep.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/instance_utgarde_keep.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp index 84d6ee1734b..0ad12a15092 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.h b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.h index 873c5d634fa..240cb8c65db 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.h +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp index 7a25077cadd..7c42f75b72f 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -256,7 +256,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_ravenous_furbolgAI(creature); + return GetInstanceAI<npc_ravenous_furbolgAI>(creature); } struct npc_ravenous_furbolgAI : public ScriptedAI @@ -364,7 +364,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_frenzied_worgenAI(creature); + return GetInstanceAI<npc_frenzied_worgenAI>(creature); } struct npc_frenzied_worgenAI : public ScriptedAI @@ -438,8 +438,7 @@ public: who->SetInCombatWith(me); DoStartMovement(who); } - if (instance) - instance->SetBossState(DATA_GORTOK_PALEHOOF, IN_PROGRESS); + instance->SetBossState(DATA_GORTOK_PALEHOOF, IN_PROGRESS); } void JustDied(Unit* /*killer*/) OVERRIDE @@ -475,7 +474,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_ferocious_rhinoAI(creature); + return GetInstanceAI<npc_ferocious_rhinoAI>(creature); } struct npc_ferocious_rhinoAI : public ScriptedAI @@ -590,7 +589,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_massive_jormungarAI(creature); + return GetInstanceAI<npc_massive_jormungarAI>(creature); } struct npc_massive_jormungarAI : public ScriptedAI @@ -691,7 +690,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_palehoof_orbAI(creature); + return GetInstanceAI<npc_palehoof_orbAI>(creature); } struct npc_palehoof_orbAI : public ScriptedAI diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp index 6fdbea2086d..b6438008dde 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -162,7 +162,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_skadiAI(creature); + return GetInstanceAI<boss_skadiAI>(creature); } struct boss_skadiAI : public ScriptedAI @@ -208,11 +208,8 @@ public: me->SetSpeed(MOVE_FLIGHT, 3.0f); if ((Unit::GetCreature(*me, m_uiGraufGUID) == NULL) && !me->IsMounted()) me->SummonCreature(NPC_GRAUF, Location[0].GetPositionX(), Location[0].GetPositionY(), Location[0].GetPositionZ(), 3.0f); - if (instance) - { - instance->SetBossState(DATA_SKADI_THE_RUTHLESS, NOT_STARTED); - instance->DoStopTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT); - } + instance->SetBossState(DATA_SKADI_THE_RUTHLESS, NOT_STARTED); + instance->DoStopTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT); } void JustReachedHome() OVERRIDE @@ -235,15 +232,12 @@ public: m_uiMovementTimer = 1000; m_uiSummonTimer = 10000; me->SetInCombatWithZone(); - if (instance) - { - instance->SetBossState(DATA_SKADI_THE_RUTHLESS, IN_PROGRESS); - instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT); - me->GetMotionMaster()->MoveJump(Location[0].GetPositionX(), Location[0].GetPositionY(), Location[0].GetPositionZ(), 5.0f, 10.0f); - me->SetWalk(false); - m_uiMountTimer = 1000; - Summons.DespawnEntry(NPC_GRAUF); - } + instance->SetBossState(DATA_SKADI_THE_RUTHLESS, IN_PROGRESS); + instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT); + me->GetMotionMaster()->MoveJump(Location[0].GetPositionX(), Location[0].GetPositionY(), Location[0].GetPositionZ(), 5.0f, 10.0f); + me->SetWalk(false); + m_uiMountTimer = 1000; + Summons.DespawnEntry(NPC_GRAUF); } void JustSummoned(Creature* summoned) OVERRIDE @@ -411,8 +405,7 @@ public: { Talk(SAY_DEATH); Summons.DespawnAll(); - if (instance) - instance->SetBossState(DATA_SKADI_THE_RUTHLESS, DONE); + instance->SetBossState(DATA_SKADI_THE_RUTHLESS, DONE); } void KilledUnit(Unit* who) OVERRIDE diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp index f7e8d9ea7d6..2a24b1145c0 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -258,7 +258,7 @@ class boss_svala : public CreatureScript case EVENT_INTRO_TRANSFORM_0: { if (Creature* arthas = ObjectAccessor::GetCreature(*me, _arthasGUID)) - arthas->CastSpell(me, SPELL_TRANSFORMING_CHANNEL, false); + arthas->CastSpell(me, SPELL_TRANSFORMING_CHANNEL, true); Position pos; pos.Relocate(me); pos.m_positionZ += 8.0f; diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp index f4c306c726a..ba1dd0fc42b 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/instance_utgarde_pinnacle.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/instance_utgarde_pinnacle.cpp index 46fabe41086..5068abd0131 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/instance_utgarde_pinnacle.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/instance_utgarde_pinnacle.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/utgarde_pinnacle.h b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/utgarde_pinnacle.h index ddf1d1e512a..99acef0b2b3 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/utgarde_pinnacle.h +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/utgarde_pinnacle.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/VaultOfArchavon/boss_archavon.cpp b/src/server/scripts/Northrend/VaultOfArchavon/boss_archavon.cpp index 7d3d149f0ff..398a0308760 100644 --- a/src/server/scripts/Northrend/VaultOfArchavon/boss_archavon.cpp +++ b/src/server/scripts/Northrend/VaultOfArchavon/boss_archavon.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/VaultOfArchavon/boss_emalon.cpp b/src/server/scripts/Northrend/VaultOfArchavon/boss_emalon.cpp index 1ceddd4bd66..4dd3aa9916b 100644 --- a/src/server/scripts/Northrend/VaultOfArchavon/boss_emalon.cpp +++ b/src/server/scripts/Northrend/VaultOfArchavon/boss_emalon.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -268,7 +268,7 @@ class npc_tempest_minion : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_tempest_minionAI(creature); + return GetInstanceAI<npc_tempest_minionAI>(creature); } }; diff --git a/src/server/scripts/Northrend/VaultOfArchavon/boss_koralon.cpp b/src/server/scripts/Northrend/VaultOfArchavon/boss_koralon.cpp index ad65fcc83fd..9371068e231 100644 --- a/src/server/scripts/Northrend/VaultOfArchavon/boss_koralon.cpp +++ b/src/server/scripts/Northrend/VaultOfArchavon/boss_koralon.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/VaultOfArchavon/boss_toravon.cpp b/src/server/scripts/Northrend/VaultOfArchavon/boss_toravon.cpp index e8e54184cb3..ccb1b5ed7d8 100644 --- a/src/server/scripts/Northrend/VaultOfArchavon/boss_toravon.cpp +++ b/src/server/scripts/Northrend/VaultOfArchavon/boss_toravon.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -277,7 +277,7 @@ class npc_frozen_orb_stalker : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_frozen_orb_stalkerAI(creature); + return GetInstanceAI<npc_frozen_orb_stalkerAI>(creature); } }; diff --git a/src/server/scripts/Northrend/VaultOfArchavon/instance_vault_of_archavon.cpp b/src/server/scripts/Northrend/VaultOfArchavon/instance_vault_of_archavon.cpp index c6e3894a722..59b097d98b6 100644 --- a/src/server/scripts/Northrend/VaultOfArchavon/instance_vault_of_archavon.cpp +++ b/src/server/scripts/Northrend/VaultOfArchavon/instance_vault_of_archavon.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/VaultOfArchavon/vault_of_archavon.h b/src/server/scripts/Northrend/VaultOfArchavon/vault_of_archavon.h index 7b5258fc3fc..4a8d52ac306 100644 --- a/src/server/scripts/Northrend/VaultOfArchavon/vault_of_archavon.h +++ b/src/server/scripts/Northrend/VaultOfArchavon/vault_of_archavon.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/VioletHold/boss_cyanigosa.cpp b/src/server/scripts/Northrend/VioletHold/boss_cyanigosa.cpp index 80ebc01debc..ec20489bfc2 100644 --- a/src/server/scripts/Northrend/VioletHold/boss_cyanigosa.cpp +++ b/src/server/scripts/Northrend/VioletHold/boss_cyanigosa.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -50,7 +50,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_cyanigosaAI(creature); + return GetInstanceAI<boss_cyanigosaAI>(creature); } struct boss_cyanigosaAI : public ScriptedAI @@ -75,16 +75,14 @@ public: uiManaDestructionTimer = 30000; uiTailSweepTimer = 20000; uiUncontrollableEnergyTimer = 25000; - if (instance) - instance->SetData(DATA_CYANIGOSA_EVENT, NOT_STARTED); + instance->SetData(DATA_CYANIGOSA_EVENT, NOT_STARTED); } void EnterCombat(Unit* /*who*/) OVERRIDE { Talk(SAY_AGGRO); - if (instance) - instance->SetData(DATA_CYANIGOSA_EVENT, IN_PROGRESS); + instance->SetData(DATA_CYANIGOSA_EVENT, IN_PROGRESS); } void MoveInLineOfSight(Unit* /*who*/) OVERRIDE { } @@ -144,8 +142,7 @@ public: { Talk(SAY_DEATH); - if (instance) - instance->SetData(DATA_CYANIGOSA_EVENT, DONE); + instance->SetData(DATA_CYANIGOSA_EVENT, DONE); } void KilledUnit(Unit* victim) OVERRIDE diff --git a/src/server/scripts/Northrend/VioletHold/boss_erekem.cpp b/src/server/scripts/Northrend/VioletHold/boss_erekem.cpp index 883ea8fa0c0..81edfd65d03 100644 --- a/src/server/scripts/Northrend/VioletHold/boss_erekem.cpp +++ b/src/server/scripts/Northrend/VioletHold/boss_erekem.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -49,7 +49,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_erekemAI(creature); + return GetInstanceAI<boss_erekemAI>(creature); } struct boss_erekemAI : public ScriptedAI @@ -74,13 +74,10 @@ public: uiEarthShockTimer = urand(2000, 8000); uiLightningBoltTimer = urand(5000, 10000); uiEarthShieldTimer = 20000; - if (instance) - { - if (instance->GetData(DATA_WAVE_COUNT) == 6) - instance->SetData(DATA_1ST_BOSS_EVENT, NOT_STARTED); - else if (instance->GetData(DATA_WAVE_COUNT) == 12) - instance->SetData(DATA_2ND_BOSS_EVENT, NOT_STARTED); - } + if (instance->GetData(DATA_WAVE_COUNT) == 6) + instance->SetData(DATA_1ST_BOSS_EVENT, NOT_STARTED); + else if (instance->GetData(DATA_WAVE_COUNT) == 12) + instance->SetData(DATA_2ND_BOSS_EVENT, NOT_STARTED); if (Creature* pGuard1 = Unit::GetCreature(*me, instance ? instance->GetData64(DATA_EREKEM_GUARD_1) : 0)) { @@ -126,20 +123,17 @@ public: Talk(SAY_AGGRO); DoCast(me, SPELL_EARTH_SHIELD); - if (instance) - { - if (GameObject* pDoor = instance->instance->GetGameObject(instance->GetData64(DATA_EREKEM_CELL))) - if (pDoor->GetGoState() == GO_STATE_READY) - { - EnterEvadeMode(); - return; - } + if (GameObject* pDoor = instance->instance->GetGameObject(instance->GetData64(DATA_EREKEM_CELL))) + if (pDoor->GetGoState() == GO_STATE_READY) + { + EnterEvadeMode(); + return; + } - if (instance->GetData(DATA_WAVE_COUNT) == 6) - instance->SetData(DATA_1ST_BOSS_EVENT, IN_PROGRESS); - else if (instance->GetData(DATA_WAVE_COUNT) == 12) - instance->SetData(DATA_2ND_BOSS_EVENT, IN_PROGRESS); - } + if (instance->GetData(DATA_WAVE_COUNT) == 6) + instance->SetData(DATA_1ST_BOSS_EVENT, IN_PROGRESS); + else if (instance->GetData(DATA_WAVE_COUNT) == 12) + instance->SetData(DATA_2ND_BOSS_EVENT, IN_PROGRESS); } void MoveInLineOfSight(Unit* /*who*/) OVERRIDE { } @@ -210,18 +204,15 @@ public: { Talk(SAY_DEATH); - if (instance) + if (instance->GetData(DATA_WAVE_COUNT) == 6) { - if (instance->GetData(DATA_WAVE_COUNT) == 6) - { - instance->SetData(DATA_1ST_BOSS_EVENT, DONE); - instance->SetData(DATA_WAVE_COUNT, 7); - } - else if (instance->GetData(DATA_WAVE_COUNT) == 12) - { - instance->SetData(DATA_2ND_BOSS_EVENT, DONE); - instance->SetData(DATA_WAVE_COUNT, 13); - } + instance->SetData(DATA_1ST_BOSS_EVENT, DONE); + instance->SetData(DATA_WAVE_COUNT, 7); + } + else if (instance->GetData(DATA_WAVE_COUNT) == 12) + { + instance->SetData(DATA_2ND_BOSS_EVENT, DONE); + instance->SetData(DATA_WAVE_COUNT, 13); } } @@ -266,7 +257,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_erekem_guardAI(creature); + return GetInstanceAI<npc_erekem_guardAI>(creature); } struct npc_erekem_guardAI : public ScriptedAI diff --git a/src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp b/src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp index 4852b6cea07..7bdf8234087 100644 --- a/src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp +++ b/src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -78,7 +78,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_ichoronAI(creature); + return GetInstanceAI<boss_ichoronAI>(creature); } struct boss_ichoronAI : public ScriptedAI @@ -110,13 +110,10 @@ public: me->SetVisible(true); DespawnWaterElements(); - if (instance) - { - if (instance->GetData(DATA_WAVE_COUNT) == 6) - instance->SetData(DATA_1ST_BOSS_EVENT, NOT_STARTED); - else if (instance->GetData(DATA_WAVE_COUNT) == 12) - instance->SetData(DATA_2ND_BOSS_EVENT, NOT_STARTED); - } + if (instance->GetData(DATA_WAVE_COUNT) == 6) + instance->SetData(DATA_1ST_BOSS_EVENT, NOT_STARTED); + else if (instance->GetData(DATA_WAVE_COUNT) == 12) + instance->SetData(DATA_2ND_BOSS_EVENT, NOT_STARTED); } void EnterCombat(Unit* /*who*/) OVERRIDE @@ -125,19 +122,16 @@ public: DoCast(me, SPELL_PROTECTIVE_BUBBLE); - if (instance) - { - if (GameObject* pDoor = instance->instance->GetGameObject(instance->GetData64(DATA_ICHORON_CELL))) - if (pDoor->GetGoState() == GO_STATE_READY) - { - EnterEvadeMode(); - return; - } - if (instance->GetData(DATA_WAVE_COUNT) == 6) - instance->SetData(DATA_1ST_BOSS_EVENT, IN_PROGRESS); - else if (instance->GetData(DATA_WAVE_COUNT) == 12) - instance->SetData(DATA_2ND_BOSS_EVENT, IN_PROGRESS); - } + if (GameObject* pDoor = instance->instance->GetGameObject(instance->GetData64(DATA_ICHORON_CELL))) + if (pDoor->GetGoState() == GO_STATE_READY) + { + EnterEvadeMode(); + return; + } + if (instance->GetData(DATA_WAVE_COUNT) == 6) + instance->SetData(DATA_1ST_BOSS_EVENT, IN_PROGRESS); + else if (instance->GetData(DATA_WAVE_COUNT) == 12) + instance->SetData(DATA_2ND_BOSS_EVENT, IN_PROGRESS); } void AttackStart(Unit* who) OVERRIDE @@ -289,18 +283,15 @@ public: DespawnWaterElements(); - if (instance) + if (instance->GetData(DATA_WAVE_COUNT) == 6) { - if (instance->GetData(DATA_WAVE_COUNT) == 6) - { - instance->SetData(DATA_1ST_BOSS_EVENT, DONE); - instance->SetData(DATA_WAVE_COUNT, 7); - } - else if (instance->GetData(DATA_WAVE_COUNT) == 12) - { - instance->SetData(DATA_2ND_BOSS_EVENT, DONE); - instance->SetData(DATA_WAVE_COUNT, 13); - } + instance->SetData(DATA_1ST_BOSS_EVENT, DONE); + instance->SetData(DATA_WAVE_COUNT, 7); + } + else if (instance->GetData(DATA_WAVE_COUNT) == 12) + { + instance->SetData(DATA_2ND_BOSS_EVENT, DONE); + instance->SetData(DATA_WAVE_COUNT, 13); } } @@ -342,7 +333,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_ichor_globuleAI(creature); + return GetInstanceAI<npc_ichor_globuleAI>(creature); } struct npc_ichor_globuleAI : public ScriptedAI @@ -371,16 +362,13 @@ public: { if (uiRangeCheck_Timer < uiDiff) { - if (instance) + if (Creature* pIchoron = Unit::GetCreature(*me, instance->GetData64(DATA_ICHORON))) { - if (Creature* pIchoron = Unit::GetCreature(*me, instance->GetData64(DATA_ICHORON))) + if (me->IsWithinDist(pIchoron, 2.0f, false)) { - if (me->IsWithinDist(pIchoron, 2.0f, false)) - { - if (pIchoron->AI()) - pIchoron->AI()->DoAction(ACTION_WATER_ELEMENT_HIT); - me->DespawnOrUnsummon(); - } + if (pIchoron->AI()) + pIchoron->AI()->DoAction(ACTION_WATER_ELEMENT_HIT); + me->DespawnOrUnsummon(); } } uiRangeCheck_Timer = 1000; diff --git a/src/server/scripts/Northrend/VioletHold/boss_lavanthor.cpp b/src/server/scripts/Northrend/VioletHold/boss_lavanthor.cpp index 964f6b75e72..ef0e6d900e7 100644 --- a/src/server/scripts/Northrend/VioletHold/boss_lavanthor.cpp +++ b/src/server/scripts/Northrend/VioletHold/boss_lavanthor.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -37,7 +37,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_lavanthorAI(creature); + return GetInstanceAI<boss_lavanthorAI>(creature); } struct boss_lavanthorAI : public ScriptedAI @@ -60,19 +60,14 @@ public: uiFlameBreathTimer = 5000; uiLavaBurnTimer = 10000; uiCauterizingFlamesTimer = 3000; - if (instance) - { - if (instance->GetData(DATA_WAVE_COUNT) == 6) - instance->SetData(DATA_1ST_BOSS_EVENT, NOT_STARTED); - else if (instance->GetData(DATA_WAVE_COUNT) == 12) - instance->SetData(DATA_2ND_BOSS_EVENT, NOT_STARTED); - } + if (instance->GetData(DATA_WAVE_COUNT) == 6) + instance->SetData(DATA_1ST_BOSS_EVENT, NOT_STARTED); + else if (instance->GetData(DATA_WAVE_COUNT) == 12) + instance->SetData(DATA_2ND_BOSS_EVENT, NOT_STARTED); } void EnterCombat(Unit* /*who*/) OVERRIDE { - if (instance) - { if (GameObject* pDoor = instance->instance->GetGameObject(instance->GetData64(DATA_LAVANTHOR_CELL))) if (pDoor->GetGoState() == GO_STATE_READY) { @@ -83,7 +78,6 @@ public: instance->SetData(DATA_1ST_BOSS_EVENT, IN_PROGRESS); else if (instance->GetData(DATA_WAVE_COUNT) == 12) instance->SetData(DATA_2ND_BOSS_EVENT, IN_PROGRESS); - } } void AttackStart(Unit* who) OVERRIDE @@ -141,18 +135,15 @@ public: void JustDied(Unit* /*killer*/) OVERRIDE { - if (instance) + if (instance->GetData(DATA_WAVE_COUNT) == 6) { - if (instance->GetData(DATA_WAVE_COUNT) == 6) - { - instance->SetData(DATA_1ST_BOSS_EVENT, DONE); - instance->SetData(DATA_WAVE_COUNT, 7); - } - else if (instance->GetData(DATA_WAVE_COUNT) == 12) - { - instance->SetData(DATA_2ND_BOSS_EVENT, DONE); - instance->SetData(DATA_WAVE_COUNT, 13); - } + instance->SetData(DATA_1ST_BOSS_EVENT, DONE); + instance->SetData(DATA_WAVE_COUNT, 7); + } + else if (instance->GetData(DATA_WAVE_COUNT) == 12) + { + instance->SetData(DATA_2ND_BOSS_EVENT, DONE); + instance->SetData(DATA_WAVE_COUNT, 13); } } }; diff --git a/src/server/scripts/Northrend/VioletHold/boss_moragg.cpp b/src/server/scripts/Northrend/VioletHold/boss_moragg.cpp index d5dd41e7a90..5829adc7c86 100644 --- a/src/server/scripts/Northrend/VioletHold/boss_moragg.cpp +++ b/src/server/scripts/Northrend/VioletHold/boss_moragg.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -33,7 +33,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_moraggAI(creature); + return GetInstanceAI<boss_moraggAI>(creature); } struct boss_moraggAI : public ScriptedAI @@ -53,30 +53,24 @@ public: uiOpticLinkTimer = 10000; uiCorrosiveSalivaTimer = 5000; - if (instance) - { - if (instance->GetData(DATA_WAVE_COUNT) == 6) - instance->SetData(DATA_1ST_BOSS_EVENT, NOT_STARTED); - else if (instance->GetData(DATA_WAVE_COUNT) == 12) - instance->SetData(DATA_2ND_BOSS_EVENT, NOT_STARTED); - } + if (instance->GetData(DATA_WAVE_COUNT) == 6) + instance->SetData(DATA_1ST_BOSS_EVENT, NOT_STARTED); + else if (instance->GetData(DATA_WAVE_COUNT) == 12) + instance->SetData(DATA_2ND_BOSS_EVENT, NOT_STARTED); } void EnterCombat(Unit* /*who*/) OVERRIDE { - if (instance) - { - if (GameObject* pDoor = instance->instance->GetGameObject(instance->GetData64(DATA_MORAGG_CELL))) - if (pDoor->GetGoState() == GO_STATE_READY) - { - EnterEvadeMode(); - return; - } - if (instance->GetData(DATA_WAVE_COUNT) == 6) - instance->SetData(DATA_1ST_BOSS_EVENT, IN_PROGRESS); - else if (instance->GetData(DATA_WAVE_COUNT) == 12) - instance->SetData(DATA_2ND_BOSS_EVENT, IN_PROGRESS); - } + if (GameObject* pDoor = instance->instance->GetGameObject(instance->GetData64(DATA_MORAGG_CELL))) + if (pDoor->GetGoState() == GO_STATE_READY) + { + EnterEvadeMode(); + return; + } + if (instance->GetData(DATA_WAVE_COUNT) == 6) + instance->SetData(DATA_1ST_BOSS_EVENT, IN_PROGRESS); + else if (instance->GetData(DATA_WAVE_COUNT) == 12) + instance->SetData(DATA_2ND_BOSS_EVENT, IN_PROGRESS); } void AttackStart(Unit* who) OVERRIDE @@ -119,18 +113,15 @@ public: } void JustDied(Unit* /*killer*/) OVERRIDE { - if (instance) + if (instance->GetData(DATA_WAVE_COUNT) == 6) { - if (instance->GetData(DATA_WAVE_COUNT) == 6) - { - instance->SetData(DATA_1ST_BOSS_EVENT, DONE); - instance->SetData(DATA_WAVE_COUNT, 7); - } - else if (instance->GetData(DATA_WAVE_COUNT) == 12) - { - instance->SetData(DATA_2ND_BOSS_EVENT, DONE); - instance->SetData(DATA_WAVE_COUNT, 13); - } + instance->SetData(DATA_1ST_BOSS_EVENT, DONE); + instance->SetData(DATA_WAVE_COUNT, 7); + } + else if (instance->GetData(DATA_WAVE_COUNT) == 12) + { + instance->SetData(DATA_2ND_BOSS_EVENT, DONE); + instance->SetData(DATA_WAVE_COUNT, 13); } } }; diff --git a/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp b/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp index 8b39c48fb92..477be1ee56d 100644 --- a/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp +++ b/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -63,7 +63,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_xevozzAI(creature); + return GetInstanceAI<boss_xevozzAI>(creature); } struct boss_xevozzAI : public ScriptedAI @@ -81,13 +81,10 @@ public: void Reset() OVERRIDE { - if (instance) - { - if (instance->GetData(DATA_WAVE_COUNT) == 6) - instance->SetData(DATA_1ST_BOSS_EVENT, NOT_STARTED); - else if (instance->GetData(DATA_WAVE_COUNT) == 12) - instance->SetData(DATA_2ND_BOSS_EVENT, NOT_STARTED); - } + if (instance->GetData(DATA_WAVE_COUNT) == 6) + instance->SetData(DATA_1ST_BOSS_EVENT, NOT_STARTED); + else if (instance->GetData(DATA_WAVE_COUNT) == 12) + instance->SetData(DATA_2ND_BOSS_EVENT, NOT_STARTED); uiSummonEtherealSphere_Timer = urand(10000, 12000); uiArcaneBarrageVolley_Timer = urand(20000, 22000); @@ -137,19 +134,16 @@ public: void EnterCombat(Unit* /*who*/) OVERRIDE { Talk(SAY_AGGRO); - if (instance) - { - if (GameObject* pDoor = instance->instance->GetGameObject(instance->GetData64(DATA_XEVOZZ_CELL))) - if (pDoor->GetGoState() == GO_STATE_READY) - { - EnterEvadeMode(); - return; - } - if (instance->GetData(DATA_WAVE_COUNT) == 6) - instance->SetData(DATA_1ST_BOSS_EVENT, IN_PROGRESS); - else if (instance->GetData(DATA_WAVE_COUNT) == 12) - instance->SetData(DATA_2ND_BOSS_EVENT, IN_PROGRESS); - } + if (GameObject* pDoor = instance->instance->GetGameObject(instance->GetData64(DATA_XEVOZZ_CELL))) + if (pDoor->GetGoState() == GO_STATE_READY) + { + EnterEvadeMode(); + return; + } + if (instance->GetData(DATA_WAVE_COUNT) == 6) + instance->SetData(DATA_1ST_BOSS_EVENT, IN_PROGRESS); + else if (instance->GetData(DATA_WAVE_COUNT) == 12) + instance->SetData(DATA_2ND_BOSS_EVENT, IN_PROGRESS); } void MoveInLineOfSight(Unit* /*who*/) OVERRIDE { } @@ -199,18 +193,15 @@ public: DespawnSphere(); - if (instance) + if (instance->GetData(DATA_WAVE_COUNT) == 6) { - if (instance->GetData(DATA_WAVE_COUNT) == 6) - { - instance->SetData(DATA_1ST_BOSS_EVENT, DONE); - instance->SetData(DATA_WAVE_COUNT, 7); - } - else if (instance->GetData(DATA_WAVE_COUNT) == 12) - { - instance->SetData(DATA_2ND_BOSS_EVENT, NOT_STARTED); - instance->SetData(DATA_WAVE_COUNT, 13); - } + instance->SetData(DATA_1ST_BOSS_EVENT, DONE); + instance->SetData(DATA_WAVE_COUNT, 7); + } + else if (instance->GetData(DATA_WAVE_COUNT) == 12) + { + instance->SetData(DATA_2ND_BOSS_EVENT, NOT_STARTED); + instance->SetData(DATA_WAVE_COUNT, 13); } } void KilledUnit(Unit* victim) OVERRIDE @@ -231,7 +222,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_ethereal_sphereAI(creature); + return GetInstanceAI<npc_ethereal_sphereAI>(creature); } struct npc_ethereal_sphereAI : public ScriptedAI @@ -263,16 +254,13 @@ public: if (uiRangeCheck_Timer < uiDiff) { - if (instance) + if (Creature* pXevozz = Unit::GetCreature(*me, instance->GetData64(DATA_XEVOZZ))) { - if (Creature* pXevozz = Unit::GetCreature(*me, instance->GetData64(DATA_XEVOZZ))) - { - float fDistance = me->GetDistance2d(pXevozz); - if (fDistance <= 3) - DoCast(pXevozz, SPELL_ARCANE_POWER); - else - DoCast(me, 35845); //Is it blizzlike? - } + float fDistance = me->GetDistance2d(pXevozz); + if (fDistance <= 3) + DoCast(pXevozz, SPELL_ARCANE_POWER); + else + DoCast(me, 35845); //Is it blizzlike? } uiRangeCheck_Timer = 1000; } diff --git a/src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp b/src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp index 3db389ac703..6835228ca46 100644 --- a/src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp +++ b/src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -58,7 +58,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_zuramatAI(creature); + return GetInstanceAI<boss_zuramatAI>(creature); } struct boss_zuramatAI : public ScriptedAI @@ -77,13 +77,10 @@ public: void Reset() OVERRIDE { - if (instance) - { - if (instance->GetData(DATA_WAVE_COUNT) == 6) - instance->SetData(DATA_1ST_BOSS_EVENT, NOT_STARTED); - else if (instance->GetData(DATA_WAVE_COUNT) == 12) - instance->SetData(DATA_2ND_BOSS_EVENT, NOT_STARTED); - } + if (instance->GetData(DATA_WAVE_COUNT) == 6) + instance->SetData(DATA_1ST_BOSS_EVENT, NOT_STARTED); + else if (instance->GetData(DATA_WAVE_COUNT) == 12) + instance->SetData(DATA_2ND_BOSS_EVENT, NOT_STARTED); SpellShroudOfDarknessTimer = 22000; SpellVoidShiftTimer = 15000; @@ -108,19 +105,16 @@ public: void EnterCombat(Unit* /*who*/) OVERRIDE { Talk(SAY_AGGRO); - if (instance) - { - if (GameObject* pDoor = instance->instance->GetGameObject(instance->GetData64(DATA_ZURAMAT_CELL))) - if (pDoor->GetGoState() == GO_STATE_READY) - { - EnterEvadeMode(); - return; - } - if (instance->GetData(DATA_WAVE_COUNT) == 6) - instance->SetData(DATA_1ST_BOSS_EVENT, IN_PROGRESS); - else if (instance->GetData(DATA_WAVE_COUNT) == 12) - instance->SetData(DATA_2ND_BOSS_EVENT, IN_PROGRESS); - } + if (GameObject* pDoor = instance->instance->GetGameObject(instance->GetData64(DATA_ZURAMAT_CELL))) + if (pDoor->GetGoState() == GO_STATE_READY) + { + EnterEvadeMode(); + return; + } + if (instance->GetData(DATA_WAVE_COUNT) == 6) + instance->SetData(DATA_1ST_BOSS_EVENT, IN_PROGRESS); + else if (instance->GetData(DATA_WAVE_COUNT) == 12) + instance->SetData(DATA_2ND_BOSS_EVENT, IN_PROGRESS); } void MoveInLineOfSight(Unit* /*who*/) OVERRIDE { } @@ -172,18 +166,15 @@ public: { Talk(SAY_DEATH); - if (instance) + if (instance->GetData(DATA_WAVE_COUNT) == 6) { - if (instance->GetData(DATA_WAVE_COUNT) == 6) - { - instance->SetData(DATA_1ST_BOSS_EVENT, DONE); - instance->SetData(DATA_WAVE_COUNT, 7); - } - else if (instance->GetData(DATA_WAVE_COUNT) == 12) - { - instance->SetData(DATA_2ND_BOSS_EVENT, DONE); - instance->SetData(DATA_WAVE_COUNT, 13); - } + instance->SetData(DATA_1ST_BOSS_EVENT, DONE); + instance->SetData(DATA_WAVE_COUNT, 7); + } + else if (instance->GetData(DATA_WAVE_COUNT) == 12) + { + instance->SetData(DATA_2ND_BOSS_EVENT, DONE); + instance->SetData(DATA_WAVE_COUNT, 13); } } diff --git a/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp b/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp index 3e16f38001b..9d02929efdb 100644 --- a/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp +++ b/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/VioletHold/violet_hold.cpp b/src/server/scripts/Northrend/VioletHold/violet_hold.cpp index 6897153c44d..79025bb5c0f 100644 --- a/src/server/scripts/Northrend/VioletHold/violet_hold.cpp +++ b/src/server/scripts/Northrend/VioletHold/violet_hold.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -307,7 +307,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_sinclariAI(creature); + return GetInstanceAI<npc_sinclariAI>(creature); } struct npc_sinclariAI : public ScriptedAI @@ -401,8 +401,7 @@ public: uiPhase = 5; break; case 5: - if (instance) - instance->SetData(DATA_MAIN_EVENT_PHASE, IN_PROGRESS); + instance->SetData(DATA_MAIN_EVENT_PHASE, IN_PROGRESS); me->SetReactState(REACT_PASSIVE); uiTimer = 0; uiPhase = 0; @@ -428,7 +427,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_azure_saboteurAI(creature); + return GetInstanceAI<npc_azure_saboteurAI>(creature); } struct npc_azure_saboteurAI : public npc_escortAI @@ -552,7 +551,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_teleportation_portalAI(creature); + return GetInstanceAI<npc_teleportation_portalAI>(creature); } struct npc_teleportation_portalAI : public ScriptedAI @@ -585,9 +584,6 @@ public: void UpdateAI(uint32 diff) OVERRIDE { - if (!instance) //Massive usage of instance, global check - return; - if (instance->GetData(DATA_REMOVE_NPC) == 1) { me->DespawnOrUnsummon(); @@ -660,22 +656,19 @@ public: void JustDied(Unit* /*killer*/) OVERRIDE { - if (instance) - instance->SetData(DATA_WAVE_COUNT, instance->GetData(DATA_WAVE_COUNT)+1); + instance->SetData(DATA_WAVE_COUNT, instance->GetData(DATA_WAVE_COUNT)+1); } void JustSummoned(Creature* summoned) OVERRIDE { listOfMobs.Summon(summoned); - if (instance) - instance->SetData64(DATA_ADD_TRASH_MOB, summoned->GetGUID()); + instance->SetData64(DATA_ADD_TRASH_MOB, summoned->GetGUID()); } void SummonedCreatureDies(Creature* summoned, Unit* /*killer*/) OVERRIDE { listOfMobs.Despawn(summoned); - if (instance) - instance->SetData64(DATA_DEL_TRASH_MOB, summoned->GetGUID()); + instance->SetData64(DATA_DEL_TRASH_MOB, summoned->GetGUID()); } }; @@ -687,8 +680,7 @@ struct violet_hold_trashAI : public npc_escortAI { instance = creature->GetInstanceScript(); bHasGotMovingPoints = false; - if (instance) - portalLocationID = instance->GetData(DATA_PORTAL_LOCATION); + portalLocationID = instance->GetData(DATA_PORTAL_LOCATION); Reset(); } @@ -788,16 +780,14 @@ struct violet_hold_trashAI : public npc_escortAI void JustDied(Unit* /*killer*/) OVERRIDE { - if (instance) - instance->SetData(DATA_NPC_PRESENCE_AT_DOOR_REMOVE, 1); + instance->SetData(DATA_NPC_PRESENCE_AT_DOOR_REMOVE, 1); } void CreatureStartAttackDoor() { me->SetReactState(REACT_PASSIVE); DoCast(SPELL_DESTROY_DOOR_SEAL); - if (instance) - instance->SetData(DATA_NPC_PRESENCE_AT_DOOR_ADD, 1); + instance->SetData(DATA_NPC_PRESENCE_AT_DOOR_ADD, 1); } }; @@ -809,7 +799,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_azure_invaderAI(creature); + return GetInstanceAI<npc_azure_invaderAI>(creature); } struct npc_azure_invaderAI : public violet_hold_trashAI @@ -887,7 +877,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_azure_binderAI(creature); + return GetInstanceAI<npc_azure_binderAI>(creature); } struct npc_azure_binderAI : public violet_hold_trashAI @@ -965,7 +955,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_azure_mage_slayerAI(creature); + return GetInstanceAI<npc_azure_mage_slayerAI>(creature); } struct npc_azure_mage_slayerAI : public violet_hold_trashAI @@ -1025,7 +1015,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_azure_raiderAI(creature); + return GetInstanceAI<npc_azure_raiderAI>(creature); } struct npc_azure_raiderAI : public violet_hold_trashAI @@ -1131,7 +1121,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_azure_stalkerAI(creature); + return GetInstanceAI<npc_azure_stalkerAI>(creature); } }; @@ -1210,7 +1200,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_azure_spellbreakerAI(creature); + return GetInstanceAI<npc_azure_spellbreakerAI>(creature); } }; @@ -1221,7 +1211,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_azure_captainAI(creature); + return GetInstanceAI<npc_azure_captainAI>(creature); } struct npc_azure_captainAI : public violet_hold_trashAI @@ -1273,7 +1263,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_azure_sorcerorAI(creature); + return GetInstanceAI<npc_azure_sorcerorAI>(creature); } struct npc_azure_sorcerorAI : public violet_hold_trashAI diff --git a/src/server/scripts/Northrend/VioletHold/violet_hold.h b/src/server/scripts/Northrend/VioletHold/violet_hold.h index f288af43ed2..96691f5e662 100644 --- a/src/server/scripts/Northrend/VioletHold/violet_hold.h +++ b/src/server/scripts/Northrend/VioletHold/violet_hold.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/isle_of_conquest.cpp b/src/server/scripts/Northrend/isle_of_conquest.cpp index 62173bb2145..1149c58e561 100644 --- a/src/server/scripts/Northrend/isle_of_conquest.cpp +++ b/src/server/scripts/Northrend/isle_of_conquest.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/zone_borean_tundra.cpp b/src/server/scripts/Northrend/zone_borean_tundra.cpp index cef6c3388de..0173454ef28 100644 --- a/src/server/scripts/Northrend/zone_borean_tundra.cpp +++ b/src/server/scripts/Northrend/zone_borean_tundra.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -428,7 +428,10 @@ public: struct npc_jennyAI : public ScriptedAI { - npc_jennyAI(Creature* creature) : ScriptedAI(creature) { } + npc_jennyAI(Creature* creature) : ScriptedAI(creature) + { + setCrateNumber = false; + } bool setCrateNumber; @@ -439,6 +442,9 @@ public: me->SetReactState(REACT_PASSIVE); + if (!me->GetOwner()) + return; + switch (me->GetOwner()->ToPlayer()->GetTeamId()) { case TEAM_ALLIANCE: diff --git a/src/server/scripts/Northrend/zone_crystalsong_forest.cpp b/src/server/scripts/Northrend/zone_crystalsong_forest.cpp index 4c45bed1af8..9023f02111f 100644 --- a/src/server/scripts/Northrend/zone_crystalsong_forest.cpp +++ b/src/server/scripts/Northrend/zone_crystalsong_forest.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/zone_dalaran.cpp b/src/server/scripts/Northrend/zone_dalaran.cpp index cf66ef4fb47..a9c89dbf3da 100644 --- a/src/server/scripts/Northrend/zone_dalaran.cpp +++ b/src/server/scripts/Northrend/zone_dalaran.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/zone_dragonblight.cpp b/src/server/scripts/Northrend/zone_dragonblight.cpp index 9673fef0a1e..f91f5d8c007 100644 --- a/src/server/scripts/Northrend/zone_dragonblight.cpp +++ b/src/server/scripts/Northrend/zone_dragonblight.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Northrend/zone_grizzly_hills.cpp b/src/server/scripts/Northrend/zone_grizzly_hills.cpp index 1f04089af87..bacc6de57f0 100644 --- a/src/server/scripts/Northrend/zone_grizzly_hills.cpp +++ b/src/server/scripts/Northrend/zone_grizzly_hills.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Northrend/zone_howling_fjord.cpp b/src/server/scripts/Northrend/zone_howling_fjord.cpp index fd5b0a5ca1c..798801041f4 100644 --- a/src/server/scripts/Northrend/zone_howling_fjord.cpp +++ b/src/server/scripts/Northrend/zone_howling_fjord.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/zone_icecrown.cpp b/src/server/scripts/Northrend/zone_icecrown.cpp index 5c65be982e0..f7894c58b3e 100644 --- a/src/server/scripts/Northrend/zone_icecrown.cpp +++ b/src/server/scripts/Northrend/zone_icecrown.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Northrend/zone_sholazar_basin.cpp b/src/server/scripts/Northrend/zone_sholazar_basin.cpp index 04331a88cca..0298500e790 100644 --- a/src/server/scripts/Northrend/zone_sholazar_basin.cpp +++ b/src/server/scripts/Northrend/zone_sholazar_basin.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/zone_storm_peaks.cpp b/src/server/scripts/Northrend/zone_storm_peaks.cpp index e089d736992..69e4e65225a 100644 --- a/src/server/scripts/Northrend/zone_storm_peaks.cpp +++ b/src/server/scripts/Northrend/zone_storm_peaks.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Northrend/zone_zuldrak.cpp b/src/server/scripts/Northrend/zone_zuldrak.cpp index c2ce0201565..8f5ae0f65ff 100644 --- a/src/server/scripts/Northrend/zone_zuldrak.cpp +++ b/src/server/scripts/Northrend/zone_zuldrak.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/OutdoorPvP/CMakeLists.txt b/src/server/scripts/OutdoorPvP/CMakeLists.txt index 1789cbc1ffe..01347e134ea 100644 --- a/src/server/scripts/OutdoorPvP/CMakeLists.txt +++ b/src/server/scripts/OutdoorPvP/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> +# Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPEP.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPEP.cpp index f5d04154686..b8a28a3248a 100644 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPEP.cpp +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPEP.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPEP.h b/src/server/scripts/OutdoorPvP/OutdoorPvPEP.h index cdd944107bc..ecf9d80f071 100644 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPEP.h +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPEP.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPHP.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPHP.cpp index 4fd9f380350..5af51a5d07f 100644 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPHP.cpp +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPHP.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPHP.h b/src/server/scripts/OutdoorPvP/OutdoorPvPHP.h index a477b2af8a4..fa78da4732d 100644 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPHP.h +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPHP.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPNA.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPNA.cpp index c77d05e1150..41cd17e1afd 100644 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPNA.cpp +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPNA.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPNA.h b/src/server/scripts/OutdoorPvP/OutdoorPvPNA.h index 637f86591d4..cc32397741c 100644 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPNA.h +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPNA.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp index 41ebf577f68..30ca2e8cb3f 100644 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPSI.h b/src/server/scripts/OutdoorPvP/OutdoorPvPSI.h index bfad558e3e0..050bd6e8889 100644 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPSI.h +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPSI.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPTF.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPTF.cpp index 7a7efd2c81d..2877c5c0dcc 100644 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPTF.cpp +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPTF.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPTF.h b/src/server/scripts/OutdoorPvP/OutdoorPvPTF.h index be6032a82f5..2c4ad0445be 100644 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPTF.h +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPTF.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPZM.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPZM.cpp index 1308d61f333..df526ed068d 100644 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPZM.cpp +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPZM.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPZM.h b/src/server/scripts/OutdoorPvP/OutdoorPvPZM.h index d6743428db0..4b810ddb15f 100644 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPZM.h +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPZM.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/auchenai_crypts.h b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/auchenai_crypts.h index 21e82a1702d..d741044eea7 100644 --- a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/auchenai_crypts.h +++ b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/auchenai_crypts.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp index 9b96255fde0..5266a7bd137 100644 --- a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp +++ b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_shirrak_the_dead_watcher.cpp b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_shirrak_the_dead_watcher.cpp index 2c0c42e6092..f73ff46908b 100644 --- a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_shirrak_the_dead_watcher.cpp +++ b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_shirrak_the_dead_watcher.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/instance_auchenai_crypts.cpp b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/instance_auchenai_crypts.cpp index 56279f20e4c..b003039f484 100644 --- a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/instance_auchenai_crypts.cpp +++ b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/instance_auchenai_crypts.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_nexusprince_shaffar.cpp b/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_nexusprince_shaffar.cpp index db69ca6c892..7ccf7a7f9b2 100644 --- a/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_nexusprince_shaffar.cpp +++ b/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_nexusprince_shaffar.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_pandemonius.cpp b/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_pandemonius.cpp index 6f2b05a73c0..267acbc95eb 100644 --- a/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_pandemonius.cpp +++ b/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_pandemonius.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/Auchindoun/ManaTombs/instance_mana_tombs.cpp b/src/server/scripts/Outland/Auchindoun/ManaTombs/instance_mana_tombs.cpp index 77a5841cb39..baf8d2b7d01 100644 --- a/src/server/scripts/Outland/Auchindoun/ManaTombs/instance_mana_tombs.cpp +++ b/src/server/scripts/Outland/Auchindoun/ManaTombs/instance_mana_tombs.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Outland/Auchindoun/ManaTombs/mana_tombs.h b/src/server/scripts/Outland/Auchindoun/ManaTombs/mana_tombs.h index 9199ef1945b..89eefa19d6a 100644 --- a/src/server/scripts/Outland/Auchindoun/ManaTombs/mana_tombs.h +++ b/src/server/scripts/Outland/Auchindoun/ManaTombs/mana_tombs.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_anzu.cpp b/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_anzu.cpp index e36e80f8c14..d888121403f 100644 --- a/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_anzu.cpp +++ b/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_anzu.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_darkweaver_syth.cpp b/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_darkweaver_syth.cpp index 6adfdf7c885..25fdf84e739 100644 --- a/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_darkweaver_syth.cpp +++ b/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_darkweaver_syth.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_tailonking_ikiss.cpp b/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_tailonking_ikiss.cpp index 217eb2ea004..e6c416a3b61 100644 --- a/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_tailonking_ikiss.cpp +++ b/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_tailonking_ikiss.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/Auchindoun/SethekkHalls/instance_sethekk_halls.cpp b/src/server/scripts/Outland/Auchindoun/SethekkHalls/instance_sethekk_halls.cpp index 08cefb83c96..d70cc5dd566 100644 --- a/src/server/scripts/Outland/Auchindoun/SethekkHalls/instance_sethekk_halls.cpp +++ b/src/server/scripts/Outland/Auchindoun/SethekkHalls/instance_sethekk_halls.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Outland/Auchindoun/SethekkHalls/sethekk_halls.h b/src/server/scripts/Outland/Auchindoun/SethekkHalls/sethekk_halls.h index 58b8d4d157c..aeca1b88fcd 100644 --- a/src/server/scripts/Outland/Auchindoun/SethekkHalls/sethekk_halls.h +++ b/src/server/scripts/Outland/Auchindoun/SethekkHalls/sethekk_halls.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_ambassador_hellmaw.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_ambassador_hellmaw.cpp index 1fa589af3a1..e0f25bb18e2 100644 --- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_ambassador_hellmaw.cpp +++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_ambassador_hellmaw.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp index ec3465a0bfc..d84181046de 100644 --- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp +++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_grandmaster_vorpil.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_grandmaster_vorpil.cpp index 44ef5e8e42c..2bdd86afe47 100644 --- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_grandmaster_vorpil.cpp +++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_grandmaster_vorpil.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp index 38c14292289..130cdf31d42 100644 --- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp +++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/instance_shadow_labyrinth.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/instance_shadow_labyrinth.cpp index a401a74273f..9e324d99879 100644 --- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/instance_shadow_labyrinth.cpp +++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/instance_shadow_labyrinth.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/shadow_labyrinth.h b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/shadow_labyrinth.h index fd073903748..d7ef52cc7a7 100644 --- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/shadow_labyrinth.h +++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/shadow_labyrinth.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Outland/BlackTemple/black_temple.cpp b/src/server/scripts/Outland/BlackTemple/black_temple.cpp index 57c494756e5..ba8eb2194f5 100644 --- a/src/server/scripts/Outland/BlackTemple/black_temple.cpp +++ b/src/server/scripts/Outland/BlackTemple/black_temple.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -207,7 +207,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_wrathbone_flayerAI(creature); + return GetInstanceAI<npc_wrathbone_flayerAI>(creature); } }; diff --git a/src/server/scripts/Outland/BlackTemple/black_temple.h b/src/server/scripts/Outland/BlackTemple/black_temple.h index fb529a6b522..4af561480be 100644 --- a/src/server/scripts/Outland/BlackTemple/black_temple.h +++ b/src/server/scripts/Outland/BlackTemple/black_temple.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp b/src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp index 3a33885144d..a6a16f83a26 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -64,7 +64,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_gurtogg_bloodboilAI(creature); + return GetInstanceAI<boss_gurtogg_bloodboilAI>(creature); } struct boss_gurtogg_bloodboilAI : public ScriptedAI @@ -95,8 +95,7 @@ public: void Reset() OVERRIDE { - if (instance) - instance->SetBossState(DATA_GURTOGG_BLOODBOIL, NOT_STARTED); + instance->SetBossState(DATA_GURTOGG_BLOODBOIL, NOT_STARTED); TargetGUID = 0; @@ -123,8 +122,7 @@ public: { DoZoneInCombat(); Talk(SAY_AGGRO); - if (instance) - instance->SetBossState(DATA_GURTOGG_BLOODBOIL, IN_PROGRESS); + instance->SetBossState(DATA_GURTOGG_BLOODBOIL, IN_PROGRESS); } void KilledUnit(Unit* /*victim*/) OVERRIDE @@ -134,8 +132,7 @@ public: void JustDied(Unit* /*killer*/) OVERRIDE { - if (instance) - instance->SetBossState(DATA_GURTOGG_BLOODBOIL, DONE); + instance->SetBossState(DATA_GURTOGG_BLOODBOIL, DONE); Talk(SAY_DEATH); } diff --git a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp index 46e5c5783e6..3bbd41afc89 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -541,9 +541,6 @@ public: { me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - if (!instance) - return; - instance->SetBossState(DATA_ILLIDAN_STORMRAGE, DONE); for (uint8 i = DATA_GO_ILLIDAN_DOOR_R; i < DATA_GO_ILLIDAN_DOOR_L + 1; ++i) @@ -1126,7 +1123,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_illidan_stormrageAI(creature); + return GetInstanceAI<boss_illidan_stormrageAI>(creature); } }; @@ -1368,37 +1365,27 @@ public: void Reset() OVERRIDE { WalkCount = 0; - if (instance) - { - instance->SetBossState(DATA_ILLIDAN_STORMRAGE, NOT_STARTED); + instance->SetBossState(DATA_ILLIDAN_STORMRAGE, NOT_STARTED); - IllidanGUID = instance->GetData64(DATA_ILLIDAN_STORMRAGE); - GateGUID = instance->GetData64(DATA_GO_ILLIDAN_GATE); - DoorGUID[0] = instance->GetData64(DATA_GO_ILLIDAN_DOOR_R); - DoorGUID[1] = instance->GetData64(DATA_GO_ILLIDAN_DOOR_L); - - if (JustCreated) // close all doors at create - { - instance->HandleGameObject(GateGUID, false); + IllidanGUID = instance->GetData64(DATA_ILLIDAN_STORMRAGE); + GateGUID = instance->GetData64(DATA_GO_ILLIDAN_GATE); + DoorGUID[0] = instance->GetData64(DATA_GO_ILLIDAN_DOOR_R); + DoorGUID[1] = instance->GetData64(DATA_GO_ILLIDAN_DOOR_L); - for (uint8 i = 0; i < 2; ++i) - instance->HandleGameObject(DoorGUID[i], false); - } - else // open all doors, raid wiped - { - instance->HandleGameObject(GateGUID, true); - WalkCount = 1; // skip first wp + if (JustCreated) // close all doors at create + { + instance->HandleGameObject(GateGUID, false); - for (uint8 i = 0; i < 2; ++i) - instance->HandleGameObject(DoorGUID[i], true); - } + for (uint8 i = 0; i < 2; ++i) + instance->HandleGameObject(DoorGUID[i], false); } - else + else // open all doors, raid wiped { - IllidanGUID = 0; - GateGUID = 0; - DoorGUID[0] = 0; - DoorGUID[1] = 0; + instance->HandleGameObject(GateGUID, true); + WalkCount = 1; // skip first wp + + for (uint8 i = 0; i < 2; ++i) + instance->HandleGameObject(DoorGUID[i], true); } ChannelGUID = 0; @@ -1461,9 +1448,6 @@ public: void BeginTalk() { - if (!instance) - return; - instance->SetBossState(DATA_ILLIDAN_STORMRAGE, IN_PROGRESS); for (uint8 i = 0; i < 2; ++i) instance->HandleGameObject(DoorGUID[i], false); @@ -1515,8 +1499,6 @@ public: void EnterPhase(PhaseAkama NextPhase) { - if (!instance) - return; switch (NextPhase) { case PHASE_CHANNEL: @@ -1634,8 +1616,7 @@ public: me->InterruptNonMeleeSpells(true); Spirit[0]->InterruptNonMeleeSpells(true); Spirit[1]->InterruptNonMeleeSpells(true); - if (instance) - instance->HandleGameObject(GateGUID, true); + instance->HandleGameObject(GateGUID, true); Timer = 2000; break; case 4: @@ -1664,8 +1645,7 @@ public: { case 6: for (uint8 i = 0; i < 2; ++i) - if (instance) - instance->HandleGameObject(DoorGUID[i], true); + instance->HandleGameObject(DoorGUID[i], true); break; case 8: if (Phase == PHASE_WALK) @@ -1794,14 +1774,13 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_akama_illidanAI(creature); + return GetInstanceAI<npc_akama_illidanAI>(creature); } }; void boss_illidan_stormrage::boss_illidan_stormrageAI::Reset() { - if (instance) - instance->SetBossState(DATA_ILLIDAN_STORMRAGE, NOT_STARTED); + instance->SetBossState(DATA_ILLIDAN_STORMRAGE, NOT_STARTED); if (Creature* akama = ObjectAccessor::GetCreature(*me, AkamaGUID)) { @@ -2160,10 +2139,7 @@ public: void Reset() OVERRIDE { - if (instance) - IllidanGUID = instance->GetData64(DATA_ILLIDAN_STORMRAGE); - else - IllidanGUID = 0; + IllidanGUID = instance->GetData64(DATA_ILLIDAN_STORMRAGE); CheckTimer = 5000; DoCast(me, SPELL_SHADOWFIEND_PASSIVE, true); @@ -2228,7 +2204,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_parasitic_shadowfiendAI(creature); + return GetInstanceAI<npc_parasitic_shadowfiendAI>(creature); } }; diff --git a/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp b/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp index aafe5f365b2..7081607e755 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -84,7 +84,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_shahrazAI(creature); + return GetInstanceAI<boss_shahrazAI>(creature); } struct boss_shahrazAI : public ScriptedAI @@ -113,8 +113,7 @@ public: void Reset() OVERRIDE { - if (instance) - instance->SetBossState(DATA_MOTHER_SHAHRAZ, NOT_STARTED); + instance->SetBossState(DATA_MOTHER_SHAHRAZ, NOT_STARTED); for (uint8 i = 0; i<3; ++i) TargetGUID[i] = 0; @@ -136,8 +135,7 @@ public: void EnterCombat(Unit* /*who*/) OVERRIDE { - if (instance) - instance->SetBossState(DATA_MOTHER_SHAHRAZ, IN_PROGRESS); + instance->SetBossState(DATA_MOTHER_SHAHRAZ, IN_PROGRESS); DoZoneInCombat(); Talk(SAY_AGGRO); @@ -150,8 +148,7 @@ public: void JustDied(Unit* /*killer*/) OVERRIDE { - if (instance) - instance->SetBossState(DATA_MOTHER_SHAHRAZ, DONE); + instance->SetBossState(DATA_MOTHER_SHAHRAZ, DONE); Talk(SAY_DEATH); } diff --git a/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp b/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp index ad913a45071..ca0ea947295 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -134,7 +134,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_reliquary_of_soulsAI(creature); + return GetInstanceAI<boss_reliquary_of_soulsAI>(creature); } struct boss_reliquary_of_soulsAI : public ScriptedAI @@ -158,8 +158,7 @@ public: void Reset() OVERRIDE { - if (instance) - instance->SetBossState(DATA_RELIQUARY_OF_SOULS, NOT_STARTED); + instance->SetBossState(DATA_RELIQUARY_OF_SOULS, NOT_STARTED); if (EssenceGUID) { @@ -197,8 +196,7 @@ public: { me->AddThreat(who, 10000.0f); DoZoneInCombat(); - if (instance) - instance->SetBossState(DATA_RELIQUARY_OF_SOULS, IN_PROGRESS); + instance->SetBossState(DATA_RELIQUARY_OF_SOULS, IN_PROGRESS); Phase = 1; Counter = 0; @@ -243,8 +241,7 @@ public: void JustDied(Unit* /*killer*/) OVERRIDE { - if (instance) - instance->SetBossState(DATA_RELIQUARY_OF_SOULS, DONE); + instance->SetBossState(DATA_RELIQUARY_OF_SOULS, DONE); } void UpdateAI(uint32 diff) OVERRIDE diff --git a/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp b/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp index 1a2a55e6d00..48d1af27649 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -198,8 +198,7 @@ public: void JustDied(Unit* /*killer*/) OVERRIDE { - if (instance) - instance->SetBossState(DATA_SHADE_OF_AKAMA, DONE); + instance->SetBossState(DATA_SHADE_OF_AKAMA, DONE); } void EnterCombat(Unit* /*who*/) OVERRIDE { } @@ -405,7 +404,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_shade_of_akamaAI(creature); + return GetInstanceAI<boss_shade_of_akamaAI>(creature); } }; @@ -475,16 +474,13 @@ public: switch (eventId) { case EVENT_SHADE_START: - if (instance) - { - instance->SetBossState(DATA_SHADE_OF_AKAMA, IN_PROGRESS); - me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); - me->RemoveAura(SPELL_STEALTH); - me->SetWalk(true); - me->GetMotionMaster()->MovePoint(0, AkamaWP[0].x, AkamaWP[0].y, AkamaWP[0].z, false); - events.ScheduleEvent(EVENT_SHADE_CHANNEL, 10000); - break; - } + instance->SetBossState(DATA_SHADE_OF_AKAMA, IN_PROGRESS); + me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + me->RemoveAura(SPELL_STEALTH); + me->SetWalk(true); + me->GetMotionMaster()->MovePoint(0, AkamaWP[0].x, AkamaWP[0].y, AkamaWP[0].z, false); + events.ScheduleEvent(EVENT_SHADE_CHANNEL, 10000); + break; case EVENT_SHADE_CHANNEL: me->AddUnitState(UNIT_STATE_ROOT); me->SetFacingTo(3.118662f); @@ -550,7 +546,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_akamaAI(creature); + return GetInstanceAI<npc_akamaAI>(creature); } }; @@ -622,7 +618,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_ashtongue_channelerAI(creature); + return GetInstanceAI<npc_ashtongue_channelerAI>(creature); } }; @@ -730,7 +726,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_creature_generator_akamaAI(creature); + return GetInstanceAI<npc_creature_generator_akamaAI>(creature); } }; @@ -748,6 +744,7 @@ public: npc_ashtongue_sorcererAI(Creature* creature) : ScriptedAI(creature) { instance = creature->GetInstanceScript(); + startedBanishing = false; } void Reset() OVERRIDE @@ -851,7 +848,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_ashtongue_sorcererAI(creature); + return GetInstanceAI<npc_ashtongue_sorcererAI>(creature); } }; @@ -941,7 +938,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_ashtongue_defenderAI(creature); + return GetInstanceAI<npc_ashtongue_defenderAI>(creature); } }; @@ -1021,7 +1018,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_ashtongue_rogueAI(creature); + return GetInstanceAI<npc_ashtongue_rogueAI>(creature); } }; @@ -1101,7 +1098,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_ashtongue_elementalistAI(creature); + return GetInstanceAI<npc_ashtongue_elementalistAI>(creature); } }; @@ -1198,7 +1195,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_ashtongue_spiritbinderAI(creature); + return GetInstanceAI<npc_ashtongue_spiritbinderAI>(creature); } }; diff --git a/src/server/scripts/Outland/BlackTemple/boss_supremus.cpp b/src/server/scripts/Outland/BlackTemple/boss_supremus.cpp index b62e7b35a3c..551213b8b2c 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_supremus.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_supremus.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -90,7 +90,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_supremusAI(creature); + return GetInstanceAI<boss_supremusAI>(creature); } struct boss_supremusAI : public ScriptedAI @@ -107,11 +107,8 @@ public: void Reset() OVERRIDE { - if (instance) - { - if (me->IsAlive()) - instance->SetBossState(DATA_SUPREMUS, NOT_STARTED); - } + if (me->IsAlive()) + instance->SetBossState(DATA_SUPREMUS, NOT_STARTED); phase = 0; @@ -121,8 +118,7 @@ public: void EnterCombat(Unit* /*who*/) OVERRIDE { - if (instance) - instance->SetBossState(DATA_SUPREMUS, IN_PROGRESS); + instance->SetBossState(DATA_SUPREMUS, IN_PROGRESS); ChangePhase(); events.ScheduleEvent(EVENT_BERSERK, 900000, GCD_CAST); @@ -158,8 +154,7 @@ public: void JustDied(Unit* /*killer*/) OVERRIDE { - if (instance) - instance->SetBossState(DATA_SUPREMUS, DONE); + instance->SetBossState(DATA_SUPREMUS, DONE); summons.DespawnAll(); } diff --git a/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp b/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp index 7d445e23053..8deac58461c 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -217,7 +217,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_teron_gorefiendAI(creature); + return GetInstanceAI<boss_teron_gorefiendAI>(creature); } struct boss_teron_gorefiendAI : public ScriptedAI @@ -246,8 +246,7 @@ public: void Reset() OVERRIDE { - if (instance) - instance->SetBossState(DATA_TERON_GOREFIEND, NOT_STARTED); + instance->SetBossState(DATA_TERON_GOREFIEND, NOT_STARTED); IncinerateTimer = urand(20000, 31000); SummonDoomBlossomTimer = 12000; @@ -275,8 +274,7 @@ public: { if (me->IsWithinDistInMap(who, VISIBLE_RANGE) && me->IsWithinLOSInMap(who)) { - if (instance) - instance->SetBossState(DATA_TERON_GOREFIEND, IN_PROGRESS); + instance->SetBossState(DATA_TERON_GOREFIEND, IN_PROGRESS); me->GetMotionMaster()->Clear(false); me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); @@ -297,8 +295,7 @@ public: void JustDied(Unit* /*killer*/) OVERRIDE { - if (instance) - instance->SetBossState(DATA_TERON_GOREFIEND, DONE); + instance->SetBossState(DATA_TERON_GOREFIEND, DONE); Talk(SAY_DEATH); } diff --git a/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp b/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp index 1f4a36afad6..39fcbc16297 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -78,7 +78,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_najentusAI(creature); + return GetInstanceAI<boss_najentusAI>(creature); } struct boss_najentusAI : public ScriptedAI @@ -99,8 +99,7 @@ public: SpineTargetGUID = 0; - if (instance) - instance->SetBossState(DATA_HIGH_WARLORD_NAJENTUS, NOT_STARTED); + instance->SetBossState(DATA_HIGH_WARLORD_NAJENTUS, NOT_STARTED); } void KilledUnit(Unit* /*victim*/) OVERRIDE @@ -111,8 +110,7 @@ public: void JustDied(Unit* /*killer*/) OVERRIDE { - if (instance) - instance->SetBossState(DATA_HIGH_WARLORD_NAJENTUS, DONE); + instance->SetBossState(DATA_HIGH_WARLORD_NAJENTUS, DONE); Talk(SAY_DEATH); } @@ -129,8 +127,7 @@ public: void EnterCombat(Unit* /*who*/) OVERRIDE { - if (instance) - instance->SetBossState(DATA_HIGH_WARLORD_NAJENTUS, IN_PROGRESS); + instance->SetBossState(DATA_HIGH_WARLORD_NAJENTUS, IN_PROGRESS); Talk(SAY_AGGRO); DoZoneInCombat(); diff --git a/src/server/scripts/Outland/BlackTemple/illidari_council.cpp b/src/server/scripts/Outland/BlackTemple/illidari_council.cpp index 057bb725c32..2db95b6ea53 100644 --- a/src/server/scripts/Outland/BlackTemple/illidari_council.cpp +++ b/src/server/scripts/Outland/BlackTemple/illidari_council.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -218,7 +218,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_illidari_councilAI(creature); + return GetInstanceAI<npc_illidari_councilAI>(creature); } struct npc_illidari_councilAI : public ScriptedAI @@ -263,12 +263,9 @@ public: pMember->AI()->EnterEvadeMode(); } - if (instance) - { - instance->SetBossState(DATA_ILLIDARI_COUNCIL, NOT_STARTED); - if (Creature* VoiceTrigger = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_BLOOD_ELF_COUNCIL_VOICE))) - VoiceTrigger->AI()->EnterEvadeMode(); - } + instance->SetBossState(DATA_ILLIDARI_COUNCIL, NOT_STARTED); + if (Creature* VoiceTrigger = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_BLOOD_ELF_COUNCIL_VOICE))) + VoiceTrigger->AI()->EnterEvadeMode(); EventBegun = false; @@ -284,9 +281,6 @@ public: void StartEvent(Unit* target) { - if (!instance) - return; - if (target && target->IsAlive()) { Council[0] = instance->GetData64(DATA_GATHIOS_THE_SHATTERER); @@ -328,13 +322,10 @@ public: { if (DeathCount > 3) { - if (instance) - { - if (Creature* VoiceTrigger = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_BLOOD_ELF_COUNCIL_VOICE))) - VoiceTrigger->DealDamage(VoiceTrigger, VoiceTrigger->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - instance->SetBossState(DATA_ILLIDARI_COUNCIL, DONE); - //me->SummonCreature(AKAMAID, 746.466980f, 304.394989f, 311.90208f, 6.272870f, TEMPSUMMON_DEAD_DESPAWN, 0); - } + if (Creature* VoiceTrigger = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_BLOOD_ELF_COUNCIL_VOICE))) + VoiceTrigger->DealDamage(VoiceTrigger, VoiceTrigger->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + instance->SetBossState(DATA_ILLIDARI_COUNCIL, DONE); + //me->SummonCreature(AKAMAID, 746.466980f, 304.394989f, 311.90208f, 6.272870f, TEMPSUMMON_DEAD_DESPAWN, 0); me->DealDamage(me, me->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); return; } @@ -401,17 +392,8 @@ struct boss_illidari_councilAI : public ScriptedAI void EnterCombat(Unit* who) OVERRIDE { - if (instance) - { - if (Creature* controller = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_ILLIDARI_COUNCIL))) - CAST_AI(npc_illidari_council::npc_illidari_councilAI, controller->AI())->StartEvent(who); - } - else - { - TC_LOG_ERROR("scripts", ERROR_INST_DATA); - EnterEvadeMode(); - return; - } + if (Creature* controller = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_ILLIDARI_COUNCIL))) + CAST_AI(npc_illidari_council::npc_illidari_councilAI, controller->AI())->StartEvent(who); DoZoneInCombat(); // Load GUIDs on first aggro because the Creature guids are only set as the creatures are created in world- // this means that for each creature, it will attempt to LoadGUIDs even though some of the other creatures are @@ -454,12 +436,6 @@ struct boss_illidari_councilAI : public ScriptedAI void LoadGUIDs() { - if (!instance) - { - TC_LOG_ERROR("scripts", ERROR_INST_DATA); - return; - } - Council[0] = instance->GetData64(DATA_LADY_MALANDE); Council[1] = instance->GetData64(DATA_HIGH_NETHERMANCER_ZEREVOR); Council[2] = instance->GetData64(DATA_GATHIOS_THE_SHATTERER); @@ -476,7 +452,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_gathios_the_shattererAI(creature); + return GetInstanceAI<boss_gathios_the_shattererAI>(creature); } struct boss_gathios_the_shattererAI : public boss_illidari_councilAI @@ -608,7 +584,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_high_nethermancer_zerevorAI(creature); + return GetInstanceAI<boss_high_nethermancer_zerevorAI>(creature); } struct boss_high_nethermancer_zerevorAI : public boss_illidari_councilAI @@ -712,7 +688,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_lady_malandeAI(creature); + return GetInstanceAI<boss_lady_malandeAI>(creature); } struct boss_lady_malandeAI : public boss_illidari_councilAI @@ -790,7 +766,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_veras_darkshadowAI(creature); + return GetInstanceAI<boss_veras_darkshadowAI>(creature); } struct boss_veras_darkshadowAI : public boss_illidari_councilAI diff --git a/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp b/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp index 591f28a19f3..91ee58ea286 100644 --- a/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp +++ b/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Outland/CMakeLists.txt b/src/server/scripts/Outland/CMakeLists.txt index ab10ee2dfe4..414a3bce14a 100644 --- a/src/server/scripts/Outland/CMakeLists.txt +++ b/src/server/scripts/Outland/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> +# Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp index 6ccf69ae39b..6d632c81bca 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -104,7 +104,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_fathomlord_karathressAI(creature); + return GetInstanceAI<boss_fathomlord_karathressAI>(creature); } struct boss_fathomlord_karathressAI : public ScriptedAI @@ -135,27 +135,24 @@ public: BlessingOfTides = false; - if (instance) - { - uint64 RAdvisors[MAX_ADVISORS]; - RAdvisors[0] = instance->GetData64(DATA_SHARKKIS); - RAdvisors[1] = instance->GetData64(DATA_TIDALVESS); - RAdvisors[2] = instance->GetData64(DATA_CARIBDIS); - //Respawn of the 3 Advisors - Creature* pAdvisor = NULL; - for (int i=0; i<MAX_ADVISORS; ++i) - if (RAdvisors[i]) + uint64 RAdvisors[MAX_ADVISORS]; + RAdvisors[0] = instance->GetData64(DATA_SHARKKIS); + RAdvisors[1] = instance->GetData64(DATA_TIDALVESS); + RAdvisors[2] = instance->GetData64(DATA_CARIBDIS); + //Respawn of the 3 Advisors + Creature* pAdvisor = NULL; + for (int i=0; i<MAX_ADVISORS; ++i) + if (RAdvisors[i]) + { + pAdvisor = (Unit::GetCreature((*me), RAdvisors[i])); + if (pAdvisor && !pAdvisor->IsAlive()) { - pAdvisor = (Unit::GetCreature((*me), RAdvisors[i])); - if (pAdvisor && !pAdvisor->IsAlive()) - { - pAdvisor->Respawn(); - pAdvisor->AI()->EnterEvadeMode(); - pAdvisor->GetMotionMaster()->MoveTargetedHome(); - } + pAdvisor->Respawn(); + pAdvisor->AI()->EnterEvadeMode(); + pAdvisor->GetMotionMaster()->MoveTargetedHome(); } - instance->SetData(DATA_KARATHRESSEVENT, NOT_STARTED); - } + } + instance->SetData(DATA_KARATHRESSEVENT, NOT_STARTED); } @@ -179,9 +176,6 @@ public: void GetAdvisors() { - if (!instance) - return; - Advisors[0] = instance->GetData64(DATA_SHARKKIS); Advisors[1] = instance->GetData64(DATA_TIDALVESS); Advisors[2] = instance->GetData64(DATA_CARIBDIS); @@ -189,9 +183,6 @@ public: void StartEvent(Unit* who) { - if (!instance) - return; - GetAdvisors(); Talk(SAY_AGGRO); @@ -210,8 +201,7 @@ public: { Talk(SAY_DEATH); - if (instance) - instance->SetData(DATA_FATHOMLORDKARATHRESSEVENT, DONE); + instance->SetData(DATA_FATHOMLORDKARATHRESSEVENT, DONE); //support for quest 10944 me->SummonCreature(SEER_OLUM, OLUM_X, OLUM_Y, OLUM_Z, OLUM_O, TEMPSUMMON_TIMED_DESPAWN, 3600000); @@ -312,7 +302,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_fathomguard_sharkkisAI(creature); + return GetInstanceAI<boss_fathomguard_sharkkisAI>(creature); } struct boss_fathomguard_sharkkisAI : public ScriptedAI @@ -320,6 +310,7 @@ public: boss_fathomguard_sharkkisAI(Creature* creature) : ScriptedAI(creature) { instance = creature->GetInstanceScript(); + SummonedPet = 0; } InstanceScript* instance; @@ -350,26 +341,19 @@ public: SummonedPet = 0; - if (instance) - instance->SetData(DATA_KARATHRESSEVENT, NOT_STARTED); + instance->SetData(DATA_KARATHRESSEVENT, NOT_STARTED); } void JustDied(Unit* /*killer*/) OVERRIDE { - if (instance) - { - if (Creature* Karathress = (Unit::GetCreature((*me), instance->GetData64(DATA_KARATHRESS)))) - CAST_AI(boss_fathomlord_karathress::boss_fathomlord_karathressAI, Karathress->AI())->EventSharkkisDeath(); - } + if (Creature* Karathress = (Unit::GetCreature((*me), instance->GetData64(DATA_KARATHRESS)))) + CAST_AI(boss_fathomlord_karathress::boss_fathomlord_karathressAI, Karathress->AI())->EventSharkkisDeath(); } void EnterCombat(Unit* who) OVERRIDE { - if (instance) - { - instance->SetData64(DATA_KARATHRESSEVENT_STARTER, who->GetGUID()); - instance->SetData(DATA_KARATHRESSEVENT, IN_PROGRESS); - } + instance->SetData64(DATA_KARATHRESSEVENT_STARTER, who->GetGUID()); + instance->SetData(DATA_KARATHRESSEVENT, IN_PROGRESS); } void UpdateAI(uint32 diff) OVERRIDE @@ -459,7 +443,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_fathomguard_tidalvessAI(creature); + return GetInstanceAI<boss_fathomguard_tidalvessAI>(creature); } struct boss_fathomguard_tidalvessAI : public ScriptedAI @@ -483,26 +467,19 @@ public: PoisonCleansing_Timer = 30000; Earthbind_Timer = 45000; - if (instance) - instance->SetData(DATA_KARATHRESSEVENT, NOT_STARTED); + instance->SetData(DATA_KARATHRESSEVENT, NOT_STARTED); } void JustDied(Unit* /*killer*/) OVERRIDE { - if (instance) - { - if (Creature* Karathress = Unit::GetCreature((*me), instance->GetData64(DATA_KARATHRESS))) - CAST_AI(boss_fathomlord_karathress::boss_fathomlord_karathressAI, Karathress->AI())->EventTidalvessDeath(); - } + if (Creature* Karathress = Unit::GetCreature((*me), instance->GetData64(DATA_KARATHRESS))) + CAST_AI(boss_fathomlord_karathress::boss_fathomlord_karathressAI, Karathress->AI())->EventTidalvessDeath(); } void EnterCombat(Unit* who) OVERRIDE { - if (instance) - { - instance->SetData64(DATA_KARATHRESSEVENT_STARTER, who->GetGUID()); - instance->SetData(DATA_KARATHRESSEVENT, IN_PROGRESS); - } + instance->SetData64(DATA_KARATHRESSEVENT_STARTER, who->GetGUID()); + instance->SetData(DATA_KARATHRESSEVENT, IN_PROGRESS); DoCast(me, SPELL_WINDFURY_WEAPON); } @@ -582,7 +559,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_fathomguard_caribdisAI(creature); + return GetInstanceAI<boss_fathomguard_caribdisAI>(creature); } struct boss_fathomguard_caribdisAI : public ScriptedAI @@ -606,26 +583,19 @@ public: Heal_Timer = 55000; Cyclone_Timer = 30000+rand()%10000; - if (instance) - instance->SetData(DATA_KARATHRESSEVENT, NOT_STARTED); + instance->SetData(DATA_KARATHRESSEVENT, NOT_STARTED); } void JustDied(Unit* /*killer*/) OVERRIDE { - if (instance) - { - if (Creature* Karathress = Unit::GetCreature((*me), instance->GetData64(DATA_KARATHRESS))) - CAST_AI(boss_fathomlord_karathress::boss_fathomlord_karathressAI, Karathress->AI())->EventCaribdisDeath(); - } + if (Creature* Karathress = Unit::GetCreature((*me), instance->GetData64(DATA_KARATHRESS))) + CAST_AI(boss_fathomlord_karathress::boss_fathomlord_karathressAI, Karathress->AI())->EventCaribdisDeath(); } void EnterCombat(Unit* who) OVERRIDE { - if (instance) - { - instance->SetData64(DATA_KARATHRESSEVENT_STARTER, who->GetGUID()); - instance->SetData(DATA_KARATHRESSEVENT, IN_PROGRESS); - } + instance->SetData64(DATA_KARATHRESSEVENT_STARTER, who->GetGUID()); + instance->SetData(DATA_KARATHRESSEVENT, IN_PROGRESS); } void UpdateAI(uint32 diff) OVERRIDE @@ -705,24 +675,21 @@ public: Unit* selectAdvisorUnit() { Unit* unit = NULL; - if (instance) - { - switch (rand()%4) - { - case 0: - unit = Unit::GetUnit(*me, instance->GetData64(DATA_KARATHRESS)); - break; - case 1: - unit = Unit::GetUnit(*me, instance->GetData64(DATA_SHARKKIS)); - break; - case 2: - unit = Unit::GetUnit(*me, instance->GetData64(DATA_TIDALVESS)); - break; - case 3: - unit = me; - break; - } - } else unit = me; + switch (rand()%4) + { + case 0: + unit = Unit::GetUnit(*me, instance->GetData64(DATA_KARATHRESS)); + break; + case 1: + unit = Unit::GetUnit(*me, instance->GetData64(DATA_SHARKKIS)); + break; + case 2: + unit = Unit::GetUnit(*me, instance->GetData64(DATA_TIDALVESS)); + break; + case 3: + unit = me; + break; + } return unit; } }; diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_hydross_the_unstable.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_hydross_the_unstable.cpp index d6205cb3ec7..56055d8a5b4 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_hydross_the_unstable.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_hydross_the_unstable.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -86,7 +86,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_hydross_the_unstableAI(creature); + return GetInstanceAI<boss_hydross_the_unstableAI>(creature); } struct boss_hydross_the_unstableAI : public ScriptedAI @@ -134,8 +134,7 @@ public: me->SetDisplayId(MODEL_CLEAN); - if (instance) - instance->SetData(DATA_HYDROSSTHEUNSTABLEEVENT, NOT_STARTED); + instance->SetData(DATA_HYDROSSTHEUNSTABLEEVENT, NOT_STARTED); beam = false; Summons.DespawnAll(); } @@ -174,8 +173,7 @@ public: { Talk(SAY_AGGRO); - if (instance) - instance->SetData(DATA_HYDROSSTHEUNSTABLEEVENT, IN_PROGRESS); + instance->SetData(DATA_HYDROSSTHEUNSTABLEEVENT, IN_PROGRESS); } void KilledUnit(Unit* /*victim*/) OVERRIDE @@ -208,8 +206,7 @@ public: { Talk(CorruptedForm ? SAY_CORRUPT_DEATH : SAY_CLEAN_DEATH); - if (instance) - instance->SetData(DATA_HYDROSSTHEUNSTABLEEVENT, DONE); + instance->SetData(DATA_HYDROSSTHEUNSTABLEEVENT, DONE); Summons.DespawnAll(); } diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp index e1d6955cd7d..b421d9c1153 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -140,7 +140,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_lady_vashjAI(creature); + return GetInstanceAI<boss_lady_vashjAI>(creature); } struct boss_lady_vashjAI : public ScriptedAI @@ -215,8 +215,7 @@ public: } } - if (instance) - instance->SetData(DATA_LADYVASHJEVENT, NOT_STARTED); + instance->SetData(DATA_LADYVASHJEVENT, NOT_STARTED); me->SetCorpseDelay(1000*60*60); } @@ -237,8 +236,7 @@ public: { Talk(SAY_DEATH); - if (instance) - instance->SetData(DATA_LADYVASHJEVENT, DONE); + instance->SetData(DATA_LADYVASHJEVENT, DONE); } void StartEvent() @@ -247,21 +245,17 @@ public: Phase = 1; - if (instance) - instance->SetData(DATA_LADYVASHJEVENT, IN_PROGRESS); + instance->SetData(DATA_LADYVASHJEVENT, IN_PROGRESS); } void EnterCombat(Unit* who) OVERRIDE { - if (instance) - { - // remove old tainted cores to prevent cheating in phase 2 - Map* map = me->GetMap(); - Map::PlayerList const &PlayerList = map->GetPlayers(); - for (Map::PlayerList::const_iterator itr = PlayerList.begin(); itr != PlayerList.end(); ++itr) - if (Player* player = itr->GetSource()) - player->DestroyItemCount(31088, 1, true); - } + // remove old tainted cores to prevent cheating in phase 2 + Map* map = me->GetMap(); + Map::PlayerList const &PlayerList = map->GetPlayers(); + for (Map::PlayerList::const_iterator itr = PlayerList.begin(); itr != PlayerList.end(); ++itr) + if (Player* player = itr->GetSource()) + player->DestroyItemCount(31088, 1, true); StartEvent(); // this is EnterCombat(), so were are 100% in combat, start the event if (Phase != 2) @@ -556,7 +550,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_enchanted_elementalAI(creature); + return GetInstanceAI<npc_enchanted_elementalAI>(creature); } struct npc_enchanted_elementalAI : public ScriptedAI @@ -580,8 +574,6 @@ public: Move = 0; Phase = 1; - VashjGUID = 0; - X = ElementWPPos[0][0]; Y = ElementWPPos[0][1]; Z = ElementWPPos[0][2]; @@ -597,8 +589,7 @@ public: } } - if (instance) - VashjGUID = instance->GetData64(DATA_LADYVASHJ); + VashjGUID = instance->GetData64(DATA_LADYVASHJ); } void EnterCombat(Unit* /*who*/) OVERRIDE { } @@ -608,9 +599,6 @@ public: void UpdateAI(uint32 diff) OVERRIDE { - if (!instance) - return; - if (!VashjGUID) return; @@ -651,7 +639,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_tainted_elementalAI(creature); + return GetInstanceAI<npc_tainted_elementalAI>(creature); } struct npc_tainted_elementalAI : public ScriptedAI @@ -674,9 +662,8 @@ public: void JustDied(Unit* /*killer*/) OVERRIDE { - if (instance) - if (Creature* vashj = Unit::GetCreature((*me), instance->GetData64(DATA_LADYVASHJ))) - CAST_AI(boss_lady_vashj::boss_lady_vashjAI, vashj->AI())->EventTaintedElementalDeath(); + if (Creature* vashj = Unit::GetCreature((*me), instance->GetData64(DATA_LADYVASHJ))) + CAST_AI(boss_lady_vashj::boss_lady_vashjAI, vashj->AI())->EventTaintedElementalDeath(); } void EnterCombat(Unit* who) OVERRIDE @@ -720,7 +707,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_toxic_sporebatAI(creature); + return GetInstanceAI<npc_toxic_sporebatAI>(creature); } struct npc_toxic_sporebatAI : public ScriptedAI @@ -790,17 +777,14 @@ public: // CheckTimer if (CheckTimer <= diff) { - if (instance) + // check if vashj is death + Unit* Vashj = Unit::GetUnit(*me, instance->GetData64(DATA_LADYVASHJ)); + if (!Vashj || !Vashj->IsAlive() || CAST_AI(boss_lady_vashj::boss_lady_vashjAI, Vashj->ToCreature()->AI())->Phase != 3) { - // check if vashj is death - Unit* Vashj = Unit::GetUnit(*me, instance->GetData64(DATA_LADYVASHJ)); - if (!Vashj || !Vashj->IsAlive() || CAST_AI(boss_lady_vashj::boss_lady_vashjAI, Vashj->ToCreature()->AI())->Phase != 3) - { - // remove - me->setDeathState(DEAD); - me->RemoveCorpse(); - me->setFaction(35); - } + // remove + me->setDeathState(DEAD); + me->RemoveCorpse(); + me->setFaction(35); } CheckTimer = 1000; @@ -819,7 +803,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_shield_generator_channelAI(creature); + return GetInstanceAI<npc_shield_generator_channelAI>(creature); } struct npc_shield_generator_channelAI : public ScriptedAI @@ -847,9 +831,6 @@ public: void UpdateAI(uint32 diff) OVERRIDE { - if (!instance) - return; - if (CheckTimer <= diff) { Unit* vashj = Unit::GetUnit(*me, instance->GetData64(DATA_LADYVASHJ)); diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp index 83ec5e053c0..a45e4ddb0a9 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -181,7 +181,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_leotheras_the_blindAI(creature); + return GetInstanceAI<boss_leotheras_the_blindAI>(creature); } struct boss_leotheras_the_blindAI : public ScriptedAI @@ -242,8 +242,7 @@ public: me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID+1, 0); DoCast(me, SPELL_DUAL_WIELD, true); me->SetCorpseDelay(1000*60*60); - if (instance) - instance->SetData(DATA_LEOTHERASTHEBLINDEVENT, NOT_STARTED); + instance->SetData(DATA_LEOTHERASTHEBLINDEVENT, NOT_STARTED); } void CheckChannelers(/*bool DoEvade = true*/) @@ -290,8 +289,7 @@ public: void StartEvent() { Talk(SAY_AGGRO); - if (instance) - instance->SetData(DATA_LEOTHERASTHEBLINDEVENT, IN_PROGRESS); + instance->SetData(DATA_LEOTHERASTHEBLINDEVENT, IN_PROGRESS); } void CheckBanish() @@ -402,8 +400,7 @@ public: if (Creature* pDemon = Unit::GetCreature(*me, Demon)) pDemon->DespawnOrUnsummon(); } - if (instance) - instance->SetData(DATA_LEOTHERASTHEBLINDEVENT, DONE); + instance->SetData(DATA_LEOTHERASTHEBLINDEVENT, DONE); } void EnterCombat(Unit* /*who*/) OVERRIDE @@ -677,7 +674,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_greyheart_spellbinderAI(creature); + return GetInstanceAI<npc_greyheart_spellbinderAI>(creature); } struct npc_greyheart_spellbinderAI : public ScriptedAI @@ -703,20 +700,16 @@ public: Mindblast_Timer = urand(3000, 8000); Earthshock_Timer = urand(5000, 10000); - if (instance) - { - instance->SetData64(DATA_LEOTHERAS_EVENT_STARTER, 0); - Creature* leotheras = Unit::GetCreature(*me, leotherasGUID); - if (leotheras && leotheras->IsAlive()) - CAST_AI(boss_leotheras_the_blind::boss_leotheras_the_blindAI, leotheras->AI())->CheckChannelers(/*false*/); - } + instance->SetData64(DATA_LEOTHERAS_EVENT_STARTER, 0); + Creature* leotheras = Unit::GetCreature(*me, leotherasGUID); + if (leotheras && leotheras->IsAlive()) + CAST_AI(boss_leotheras_the_blind::boss_leotheras_the_blindAI, leotheras->AI())->CheckChannelers(/*false*/); } void EnterCombat(Unit* who) OVERRIDE { me->InterruptNonMeleeSpells(false); - if (instance) - instance->SetData64(DATA_LEOTHERAS_EVENT_STARTER, who->GetGUID()); + instance->SetData64(DATA_LEOTHERAS_EVENT_STARTER, who->GetGUID()); } void JustRespawned() OVERRIDE @@ -740,18 +733,15 @@ public: void UpdateAI(uint32 diff) OVERRIDE { - if (instance) - { - if (!leotherasGUID) - leotherasGUID = instance->GetData64(DATA_LEOTHERAS); + if (!leotherasGUID) + leotherasGUID = instance->GetData64(DATA_LEOTHERAS); - if (!me->IsInCombat() && instance->GetData64(DATA_LEOTHERAS_EVENT_STARTER)) - { - Unit* victim = NULL; - victim = Unit::GetUnit(*me, instance->GetData64(DATA_LEOTHERAS_EVENT_STARTER)); - if (victim) - AttackStart(victim); - } + if (!me->IsInCombat() && instance->GetData64(DATA_LEOTHERAS_EVENT_STARTER)) + { + Unit* victim = NULL; + victim = Unit::GetUnit(*me, instance->GetData64(DATA_LEOTHERAS_EVENT_STARTER)); + if (victim) + AttackStart(victim); } if (!UpdateVictim()) diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp index c4a55065f27..a6cd426f435 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -81,7 +81,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_the_lurker_belowAI(creature); + return GetInstanceAI<boss_the_lurker_belowAI>(creature); } struct boss_the_lurker_belowAI : public ScriptedAI @@ -138,11 +138,8 @@ public: Summons.DespawnAll(); - if (instance) - { - instance->SetData(DATA_THELURKERBELOWEVENT, NOT_STARTED); - instance->SetData(DATA_STRANGE_POOL, NOT_STARTED); - } + instance->SetData(DATA_THELURKERBELOWEVENT, NOT_STARTED); + instance->SetData(DATA_STRANGE_POOL, NOT_STARTED); DoCast(me, SPELL_SUBMERGE); // submerge anim me->SetVisible(false); // we start invis under water, submerged me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); @@ -151,19 +148,15 @@ public: void JustDied(Unit* /*killer*/) OVERRIDE { - if (instance) - { - instance->SetData(DATA_THELURKERBELOWEVENT, DONE); - instance->SetData(DATA_STRANGE_POOL, IN_PROGRESS); - } + instance->SetData(DATA_THELURKERBELOWEVENT, DONE); + instance->SetData(DATA_STRANGE_POOL, IN_PROGRESS); Summons.DespawnAll(); } void EnterCombat(Unit* /*who*/) OVERRIDE { - if (instance) - instance->SetData(DATA_THELURKERBELOWEVENT, IN_PROGRESS); + instance->SetData(DATA_THELURKERBELOWEVENT, IN_PROGRESS); } void MoveInLineOfSight(Unit* who) OVERRIDE diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp index 48a4a1e5ecd..77fd36f2f5e 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -91,7 +91,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_morogrim_tidewalkerAI(creature); + return GetInstanceAI<boss_morogrim_tidewalkerAI>(creature); } struct boss_morogrim_tidewalkerAI : public ScriptedAI @@ -130,16 +130,14 @@ public: Earthquake = false; Phase2 = false; - if (instance) - instance->SetData(DATA_MOROGRIMTIDEWALKEREVENT, NOT_STARTED); + instance->SetData(DATA_MOROGRIMTIDEWALKEREVENT, NOT_STARTED); } void StartEvent() { Talk(SAY_AGGRO); - if (instance) - instance->SetData(DATA_MOROGRIMTIDEWALKEREVENT, IN_PROGRESS); + instance->SetData(DATA_MOROGRIMTIDEWALKEREVENT, IN_PROGRESS); } void KilledUnit(Unit* /*victim*/) OVERRIDE @@ -151,8 +149,7 @@ public: { Talk(SAY_DEATH); - if (instance) - instance->SetData(DATA_MOROGRIMTIDEWALKEREVENT, DONE); + instance->SetData(DATA_MOROGRIMTIDEWALKEREVENT, DONE); } void EnterCombat(Unit* /*who*/) OVERRIDE diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp index 7590faee1db..528726723ed 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/serpent_shrine.h b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/serpent_shrine.h index 278b8169fca..f7f3bc9c24b 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/serpent_shrine.h +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/serpent_shrine.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_hydromancer_thespia.cpp b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_hydromancer_thespia.cpp index d6162fd1ea4..70b36e31713 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_hydromancer_thespia.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_hydromancer_thespia.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -41,7 +41,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_thespiaAI(creature); + return GetInstanceAI<boss_thespiaAI>(creature); } struct boss_thespiaAI : public ScriptedAI @@ -63,16 +63,14 @@ public: LungBurst_Timer = 7000; EnvelopingWinds_Timer = 9000; - if (instance) - instance->SetBossState(DATA_HYDROMANCER_THESPIA, NOT_STARTED); + instance->SetBossState(DATA_HYDROMANCER_THESPIA, NOT_STARTED); } void JustDied(Unit* /*killer*/) OVERRIDE { Talk(SAY_DEAD); - if (instance) - instance->SetBossState(DATA_HYDROMANCER_THESPIA, DONE); + instance->SetBossState(DATA_HYDROMANCER_THESPIA, DONE); } void KilledUnit(Unit* /*victim*/) OVERRIDE @@ -84,8 +82,7 @@ public: { Talk(SAY_AGGRO); - if (instance) - instance->SetBossState(DATA_HYDROMANCER_THESPIA, IN_PROGRESS); + instance->SetBossState(DATA_HYDROMANCER_THESPIA, IN_PROGRESS); } void UpdateAI(uint32 diff) OVERRIDE diff --git a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_mekgineer_steamrigger.cpp b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_mekgineer_steamrigger.cpp index 241d0f8fec2..42833fead04 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_mekgineer_steamrigger.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_mekgineer_steamrigger.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -57,7 +57,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_mekgineer_steamriggerAI(creature); + return GetInstanceAI<boss_mekgineer_steamriggerAI>(creature); } struct boss_mekgineer_steamriggerAI : public ScriptedAI @@ -86,16 +86,14 @@ public: Summon50 = false; Summon25 = false; - if (instance) - instance->SetBossState(DATA_MEKGINEER_STEAMRIGGER, NOT_STARTED); + instance->SetBossState(DATA_MEKGINEER_STEAMRIGGER, NOT_STARTED); } void JustDied(Unit* /*killer*/) OVERRIDE { Talk(SAY_DEATH); - if (instance) - instance->SetBossState(DATA_MEKGINEER_STEAMRIGGER, DONE); + instance->SetBossState(DATA_MEKGINEER_STEAMRIGGER, DONE); } void KilledUnit(Unit* /*victim*/) OVERRIDE @@ -107,8 +105,7 @@ public: { Talk(SAY_AGGRO); - if (instance) - instance->SetBossState(DATA_MEKGINEER_STEAMRIGGER, IN_PROGRESS); + instance->SetBossState(DATA_MEKGINEER_STEAMRIGGER, IN_PROGRESS); } //no known summon spells exist @@ -197,7 +194,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_steamrigger_mechanicAI(creature); + return GetInstanceAI<npc_steamrigger_mechanicAI>(creature); } struct npc_steamrigger_mechanicAI : public ScriptedAI diff --git a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_warlord_kalithresh.cpp b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_warlord_kalithresh.cpp index 887d51a43bf..fe035fc1dec 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_warlord_kalithresh.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_warlord_kalithresh.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -50,7 +50,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_naga_distillerAI(creature); + return GetInstanceAI<npc_naga_distillerAI>(creature); } struct npc_naga_distillerAI : public ScriptedAI @@ -68,13 +68,10 @@ public: me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); //hack, due to really weird spell behaviour :( - if (instance) + if (instance->GetData(DATA_DISTILLER) == IN_PROGRESS) { - if (instance->GetData(DATA_DISTILLER) == IN_PROGRESS) - { - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - } + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); } } @@ -87,15 +84,13 @@ public: DoCast(me, SPELL_WARLORDS_RAGE_NAGA, true); - if (instance) - instance->SetData(DATA_DISTILLER, IN_PROGRESS); + instance->SetData(DATA_DISTILLER, IN_PROGRESS); } void DamageTaken(Unit* /*done_by*/, uint32 &damage) OVERRIDE { if (me->GetHealth() <= damage) - if (instance) - instance->SetData(DATA_DISTILLER, DONE); + instance->SetData(DATA_DISTILLER, DONE); } }; @@ -108,7 +103,7 @@ public: CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_warlord_kalithreshAI(creature); + return GetInstanceAI<boss_warlord_kalithreshAI>(creature); } struct boss_warlord_kalithreshAI : public ScriptedAI @@ -132,16 +127,14 @@ public: Rage_Timer = 45000; CanRage = false; - if (instance) - instance->SetBossState(DATA_WARLORD_KALITHRESH, NOT_STARTED); + instance->SetBossState(DATA_WARLORD_KALITHRESH, NOT_STARTED); } void EnterCombat(Unit* /*who*/) OVERRIDE { Talk(SAY_AGGRO); - if (instance) - instance->SetBossState(DATA_WARLORD_KALITHRESH, IN_PROGRESS); + instance->SetBossState(DATA_WARLORD_KALITHRESH, IN_PROGRESS); } void KilledUnit(Unit* /*victim*/) OVERRIDE @@ -153,17 +146,15 @@ public: { //hack :( if (spell->Id == SPELL_WARLORDS_RAGE_PROC) - if (instance) - if (instance->GetData(DATA_DISTILLER) == DONE) - me->RemoveAurasDueToSpell(SPELL_WARLORDS_RAGE_PROC); + if (instance->GetData(DATA_DISTILLER) == DONE) + me->RemoveAurasDueToSpell(SPELL_WARLORDS_RAGE_PROC); } void JustDied(Unit* /*killer*/) OVERRIDE { Talk(SAY_DEATH); - if (instance) - instance->SetBossState(DATA_WARLORD_KALITHRESH, DONE); + instance->SetBossState(DATA_WARLORD_KALITHRESH, DONE); } void UpdateAI(uint32 diff) OVERRIDE diff --git a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/instance_steam_vault.cpp b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/instance_steam_vault.cpp index 784b7c59736..bd2d4d5f416 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/instance_steam_vault.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/instance_steam_vault.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/steam_vault.h b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/steam_vault.h index c0832ed8909..e1761c80769 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/steam_vault.h +++ b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/steam_vault.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Outland/CoilfangReservoir/TheSlavePens/boss_mennu_the_betrayer.cpp b/src/server/scripts/Outland/CoilfangReservoir/TheSlavePens/boss_mennu_the_betrayer.cpp index ba59aa3b463..7243b6e6738 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/TheSlavePens/boss_mennu_the_betrayer.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/TheSlavePens/boss_mennu_the_betrayer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Outland/CoilfangReservoir/TheSlavePens/boss_quagmirran.cpp b/src/server/scripts/Outland/CoilfangReservoir/TheSlavePens/boss_quagmirran.cpp index 6cef7291542..856e90405cb 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/TheSlavePens/boss_quagmirran.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/TheSlavePens/boss_quagmirran.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Outland/CoilfangReservoir/TheSlavePens/boss_rokmar_the_crackler.cpp b/src/server/scripts/Outland/CoilfangReservoir/TheSlavePens/boss_rokmar_the_crackler.cpp index a025df5c3ae..a819b59d359 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/TheSlavePens/boss_rokmar_the_crackler.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/TheSlavePens/boss_rokmar_the_crackler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Outland/CoilfangReservoir/TheSlavePens/instance_the_slave_pens.cpp b/src/server/scripts/Outland/CoilfangReservoir/TheSlavePens/instance_the_slave_pens.cpp index 1c31bee7d4f..e942d0987fc 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/TheSlavePens/instance_the_slave_pens.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/TheSlavePens/instance_the_slave_pens.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Outland/CoilfangReservoir/TheSlavePens/the_slave_pens.h b/src/server/scripts/Outland/CoilfangReservoir/TheSlavePens/the_slave_pens.h index 624ead7ef08..101268727b0 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/TheSlavePens/the_slave_pens.h +++ b/src/server/scripts/Outland/CoilfangReservoir/TheSlavePens/the_slave_pens.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Outland/CoilfangReservoir/TheUnderbog/boss_hungarfen.cpp b/src/server/scripts/Outland/CoilfangReservoir/TheUnderbog/boss_hungarfen.cpp index ef3d317643b..1ea58bce0ca 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/TheUnderbog/boss_hungarfen.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/TheUnderbog/boss_hungarfen.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/CoilfangReservoir/TheUnderbog/boss_the_black_stalker.cpp b/src/server/scripts/Outland/CoilfangReservoir/TheUnderbog/boss_the_black_stalker.cpp index 47bd4e3bb6c..13ebf22436c 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/TheUnderbog/boss_the_black_stalker.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/TheUnderbog/boss_the_black_stalker.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/CoilfangReservoir/TheUnderbog/instance_the_underbog.cpp b/src/server/scripts/Outland/CoilfangReservoir/TheUnderbog/instance_the_underbog.cpp index 08d80d3dd82..9249cadbe49 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/TheUnderbog/instance_the_underbog.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/TheUnderbog/instance_the_underbog.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp b/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp index 0ae86f7c455..917dda1389a 100644 --- a/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp +++ b/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp b/src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp index dd44d764987..f14e6badc35 100644 --- a/src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp +++ b/src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/GruulsLair/gruuls_lair.h b/src/server/scripts/Outland/GruulsLair/gruuls_lair.h index 1425a19aa47..81644a01567 100644 --- a/src/server/scripts/Outland/GruulsLair/gruuls_lair.h +++ b/src/server/scripts/Outland/GruulsLair/gruuls_lair.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Outland/GruulsLair/instance_gruuls_lair.cpp b/src/server/scripts/Outland/GruulsLair/instance_gruuls_lair.cpp index aa8a8d01d8a..caba33e1513 100644 --- a/src/server/scripts/Outland/GruulsLair/instance_gruuls_lair.cpp +++ b/src/server/scripts/Outland/GruulsLair/instance_gruuls_lair.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/blood_furnace.h b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/blood_furnace.h index 1303a80488e..b2097c34b33 100644 --- a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/blood_furnace.h +++ b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/blood_furnace.h @@ -1,6 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> - * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -16,32 +15,59 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef DEF_BLOOD_FURNACE_H -#define DEF_BLOOD_FURNACE_H +#ifndef BLOOD_FURNACE_H_ +#define BLOOD_FURNACE_H_ + +#define BFScriptName "instance_blood_furnace" +uint32 const EncounterCount = 3; enum DataTypes { - DATA_THE_MAKER = 1, - DATA_BROGGOK = 2, - DATA_KELIDAN_THE_MAKER = 3, - TYPE_THE_MAKER_EVENT = 4, - TYPE_BROGGOK_EVENT = 5, - TYPE_KELIDAN_THE_BREAKER_EVENT = 6, - DATA_DOOR1 = 7, - DATA_DOOR2 = 8, - DATA_DOOR3 = 9, - DATA_DOOR4 = 10, - DATA_DOOR5 = 11, - DATA_DOOR6 = 12, - DATA_PRISON_CELL1 = 13, - DATA_PRISON_CELL2 = 14, - DATA_PRISON_CELL3 = 15, - DATA_PRISON_CELL4 = 16, - DATA_PRISON_CELL5 = 17, - DATA_PRISON_CELL6 = 18, - DATA_PRISON_CELL7 = 19, - DATA_PRISON_CELL8 = 20, - DATA_BROGGOK_LEVER = 21 + // Encounter States/Boss GUIDs + DATA_THE_MAKER = 0, + DATA_BROGGOK = 1, + DATA_KELIDAN_THE_BREAKER = 2, + + // Additional Data + DATA_DOOR_4 = 3, + DATA_PRISON_CELL1 = 4, + DATA_PRISON_CELL2 = 5, + DATA_PRISON_CELL3 = 6, + DATA_PRISON_CELL4 = 7, + DATA_PRISON_CELL5 = 8, + DATA_PRISON_CELL6 = 9, + DATA_PRISON_CELL7 = 10, + DATA_PRISON_CELL8 = 11, + DATA_BROGGOK_LEVER = 12 +}; + +enum CreatureIds +{ + NPC_THE_MAKER = 17381, + NPC_BROGGOK = 17380, + NPC_KELIDAN_THE_BREAKER = 17377, + NPC_PRISONER = 17398 +}; + +enum GameObjectIds +{ + GO_PRISON_DOOR_01 = 181766, // Final Exit Door + GO_PRISON_DOOR_02 = 181811, // The Maker Front Door + GO_PRISON_DOOR_03 = 181812, // The Maker Rear Door + GO_PRISON_DOOR_04 = 181819, // Broggok Rear Door + GO_PRISON_DOOR_05 = 181822, // Broggok Front Door + GO_SUMMON_DOOR = 181823, // Kelidan Exit Door + + GO_PRISON_CELL_DOOR_1 = 181813, // The Maker Prison Cell front right + GO_PRISON_CELL_DOOR_2 = 181814, // The Maker Prison Cell back right + GO_PRISON_CELL_DOOR_3 = 181816, // The Maker Prison Cell front left + GO_PRISON_CELL_DOOR_4 = 181815, // The Maker Prison Cell back left + GO_PRISON_CELL_DOOR_5 = 181821, // Broggok Prison Cell front right + GO_PRISON_CELL_DOOR_6 = 181818, // Broggok Prison Cell back right + GO_PRISON_CELL_DOOR_7 = 181820, // Broggok Prison Cell front left + GO_PRISON_CELL_DOOR_8 = 181817, // Broggok Prison Cell back left + + GO_BROGGOK_LEVER = 181982 }; enum ActionIds @@ -51,5 +77,11 @@ enum ActionIds ACTION_PREPARE_BROGGOK = 3 }; -#endif +template<class AI> +AI* GetBloodFurnaceAI(Creature* creature) +{ + return GetInstanceAI<AI>(creature, BFScriptName); +} + +#endif // BLOOD_FURNACE_H_ diff --git a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_broggok.cpp b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_broggok.cpp index 307a329fd95..f610d6dd7e0 100644 --- a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_broggok.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_broggok.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -25,39 +25,32 @@ EndScriptData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" +#include "SpellScript.h" +#include "SpellAuraEffects.h" #include "blood_furnace.h" enum Yells { - SAY_AGGRO = 0 + SAY_AGGRO = 0 }; enum Spells { - SPELL_SLIME_SPRAY = 30913, - SPELL_POISON_CLOUD = 30916, - SPELL_POISON_BOLT = 30917, + SPELL_SLIME_SPRAY = 30913, + SPELL_POISON_CLOUD = 30916, + SPELL_POISON_BOLT = 30917, - SPELL_POISON = 30914 + SPELL_POISON_CLOUD_PASSIVE = 30914 }; class boss_broggok : public CreatureScript { public: - - boss_broggok() - : CreatureScript("boss_broggok") - { - } + boss_broggok() : CreatureScript("boss_broggok") { } struct boss_broggokAI : public BossAI { - boss_broggokAI(Creature* creature) : BossAI(creature, DATA_BROGGOK) - { - instance = creature->GetInstanceScript(); - } - - InstanceScript* instance; + boss_broggokAI(Creature* creature) : BossAI(creature, DATA_BROGGOK) { } uint32 AcidSpray_Timer; uint32 PoisonSpawn_Timer; @@ -71,29 +64,22 @@ class boss_broggok : public CreatureScript PoisonSpawn_Timer = 5000; PoisonBolt_Timer = 7000; DoAction(ACTION_RESET_BROGGOK); - if (instance) - instance->SetData(TYPE_BROGGOK_EVENT, NOT_STARTED); } void EnterCombat(Unit* /*who*/) OVERRIDE { + _EnterCombat(); Talk(SAY_AGGRO); } - void JustSummoned(Creature* summoned) OVERRIDE - { - summoned->setFaction(16); - summoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - summoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - summoned->CastSpell(summoned, SPELL_POISON, false, 0, 0, me->GetGUID()); - } - void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; + if (!canAttack) return; + if (AcidSpray_Timer <= diff) { DoCastVictim(SPELL_SLIME_SPRAY); @@ -123,12 +109,7 @@ class boss_broggok : public CreatureScript void JustDied(Unit* /*killer*/) OVERRIDE { - if (instance) - { - instance->HandleGameObject(instance->GetData64(DATA_DOOR4), true); - instance->HandleGameObject(instance->GetData64(DATA_DOOR5), true); - instance->SetData(TYPE_BROGGOK_EVENT, DONE); - } + _JustDied(); } void DoAction(int32 action) OVERRIDE @@ -155,7 +136,34 @@ class boss_broggok : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_broggokAI(creature); + return GetBloodFurnaceAI<boss_broggokAI>(creature); + } +}; + +class npc_broggok_poison_cloud : public CreatureScript +{ + public: + npc_broggok_poison_cloud() : CreatureScript("npc_broggok_poison_cloud") { } + + struct npc_broggok_poison_cloudAI : public ScriptedAI + { + npc_broggok_poison_cloudAI(Creature* creature) : ScriptedAI(creature) + { + SetCombatMovement(false); + creature->SetReactState(REACT_PASSIVE); + } + + void IsSummonedBy(Unit* /*summoner*/) OVERRIDE + { + DoCast(me, SPELL_POISON_CLOUD_PASSIVE, true); + } + + void UpdateAI(uint32 /*diff*/) OVERRIDE { } + }; + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new npc_broggok_poison_cloudAI(creature); } }; @@ -167,19 +175,60 @@ class go_broggok_lever : public GameObjectScript bool OnGossipHello(Player* /*player*/, GameObject* go) OVERRIDE { if (InstanceScript* instance = go->GetInstanceScript()) - if (instance->GetData(TYPE_BROGGOK_EVENT) != DONE && instance->GetData(TYPE_BROGGOK_EVENT) != IN_PROGRESS) + if (instance->GetBossState(DATA_BROGGOK) != DONE && instance->GetBossState(DATA_BROGGOK) != IN_PROGRESS) { - instance->SetData(TYPE_BROGGOK_EVENT, IN_PROGRESS); - if (Creature* broggok = Creature::GetCreature(*go, instance->GetData64(DATA_BROGGOK))) + instance->SetBossState(DATA_BROGGOK, IN_PROGRESS); + if (Creature* broggok = ObjectAccessor::GetCreature(*go, instance->GetData64(DATA_BROGGOK))) broggok->AI()->DoAction(ACTION_PREPARE_BROGGOK); } + go->UseDoorOrButton(); return false; } }; +// 30914, 38462 - Poison (Broggok) +class spell_broggok_poison_cloud : public SpellScriptLoader +{ + public: + spell_broggok_poison_cloud() : SpellScriptLoader("spell_broggok_poison_cloud") { } + + class spell_broggok_poison_cloud_AuraScript : public AuraScript + { + PrepareAuraScript(spell_broggok_poison_cloud_AuraScript); + + bool Validate(SpellInfo const* spellInfo) OVERRIDE + { + if (!sSpellMgr->GetSpellInfo(spellInfo->Effects[EFFECT_0].TriggerSpell)) + return false; + return true; + } + + void PeriodicTick(AuraEffect const* aurEff) + { + PreventDefaultAction(); + + uint32 triggerSpell = GetSpellInfo()->Effects[aurEff->GetEffIndex()].TriggerSpell; + int32 mod = int32(((float(aurEff->GetTickNumber()) / aurEff->GetTotalTicks()) * 0.9f + 0.1f) * 10000 * 2 / 3); + GetTarget()->CastCustomSpell(triggerSpell, SPELLVALUE_RADIUS_MOD, mod, (Unit*)NULL, TRIGGERED_FULL_MASK, NULL, aurEff); + } + + void Register() OVERRIDE + { + OnEffectPeriodic += AuraEffectPeriodicFn(spell_broggok_poison_cloud_AuraScript::PeriodicTick, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL); + } + }; + + AuraScript* GetAuraScript() const OVERRIDE + { + return new spell_broggok_poison_cloud_AuraScript(); + } +}; + void AddSC_boss_broggok() { new boss_broggok(); + new npc_broggok_poison_cloud(); new go_broggok_lever(); + new spell_broggok_poison_cloud(); } diff --git a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp index 75ccc962996..4c04c06b091 100644 --- a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -16,18 +16,6 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -/* ScriptData -SDName: Boss_Kelidan_The_Breaker -SD%Complete: 100 -SDComment: -SDCategory: Hellfire Citadel, Blood Furnace -EndScriptData */ - -/* ContentData -boss_kelidan_the_breaker -npc_shadowmoon_channeler -EndContentData */ - #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellAuras.h" @@ -71,23 +59,16 @@ const float ShadowmoonChannelers[5][4]= class boss_kelidan_the_breaker : public CreatureScript { public: + boss_kelidan_the_breaker() : CreatureScript("boss_kelidan_the_breaker") { } - boss_kelidan_the_breaker() - : CreatureScript("boss_kelidan_the_breaker") - { - } - - struct boss_kelidan_the_breakerAI : public ScriptedAI + struct boss_kelidan_the_breakerAI : public BossAI { - boss_kelidan_the_breakerAI(Creature* creature) : ScriptedAI(creature) + boss_kelidan_the_breakerAI(Creature* creature) : BossAI(creature, DATA_KELIDAN_THE_BREAKER) { - instance = creature->GetInstanceScript(); - for (uint8 i=0; i<5; ++i) + for (uint8 i = 0; i < 5; ++i) Channelers[i] = 0; } - InstanceScript* instance; - uint32 ShadowVolley_Timer; uint32 BurningNova_Timer; uint32 Firenova_Timer; @@ -99,6 +80,7 @@ class boss_kelidan_the_breaker : public CreatureScript void Reset() OVERRIDE { + _Reset(); ShadowVolley_Timer = 1000; BurningNova_Timer = 15000; Corruption_Timer = 5000; @@ -108,18 +90,15 @@ class boss_kelidan_the_breaker : public CreatureScript SummonChannelers(); me->SetReactState(REACT_PASSIVE); me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC | UNIT_FLAG_NON_ATTACKABLE); - if (instance) - instance->SetData(TYPE_KELIDAN_THE_BREAKER_EVENT, NOT_STARTED); } void EnterCombat(Unit* who) OVERRIDE { + _EnterCombat(); Talk(SAY_WAKE); if (me->IsNonMeleeSpellCast(false)) me->InterruptNonMeleeSpells(true); DoStartMovement(who); - if (instance) - instance->SetData(TYPE_KELIDAN_THE_BREAKER_EVENT, IN_PROGRESS); } void KilledUnit(Unit* /*victim*/) OVERRIDE @@ -191,14 +170,8 @@ class boss_kelidan_the_breaker : public CreatureScript void JustDied(Unit* /*killer*/) OVERRIDE { + _JustDied(); Talk(SAY_DIE); - - if (!instance) - return; - - instance->SetData(TYPE_KELIDAN_THE_BREAKER_EVENT, DONE); - instance->HandleGameObject(instance->GetData64(DATA_DOOR1), true); - instance->HandleGameObject(instance->GetData64(DATA_DOOR6), true); } void UpdateAI(uint32 diff) OVERRIDE @@ -275,7 +248,7 @@ class boss_kelidan_the_breaker : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_kelidan_the_breakerAI(creature); + return GetBloodFurnaceAI<boss_kelidan_the_breakerAI>(creature); } }; @@ -373,7 +346,7 @@ class npc_shadowmoon_channeler : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_shadowmoon_channelerAI(creature); + return GetBloodFurnaceAI<npc_shadowmoon_channelerAI>(creature); } }; diff --git a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_the_maker.cpp b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_the_maker.cpp index 33e23c12d14..6ab356bfa4a 100644 --- a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_the_maker.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_the_maker.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -45,20 +45,11 @@ enum Spells class boss_the_maker : public CreatureScript { public: + boss_the_maker() : CreatureScript("boss_the_maker") { } - boss_the_maker() - : CreatureScript("boss_the_maker") + struct boss_the_makerAI : public BossAI { - } - - struct boss_the_makerAI : public ScriptedAI - { - boss_the_makerAI(Creature* creature) : ScriptedAI(creature) - { - instance = creature->GetInstanceScript(); - } - - InstanceScript* instance; + boss_the_makerAI(Creature* creature) : BossAI(creature, DATA_THE_MAKER) { } uint32 AcidSpray_Timer; uint32 ExplodingBreaker_Timer; @@ -67,46 +58,30 @@ class boss_the_maker : public CreatureScript void Reset() OVERRIDE { + _Reset(); AcidSpray_Timer = 15000; ExplodingBreaker_Timer = 6000; Domination_Timer = 120000; Knockdown_Timer = 10000; - - if (!instance) - return; - - instance->SetData(TYPE_THE_MAKER_EVENT, NOT_STARTED); - instance->HandleGameObject(instance->GetData64(DATA_DOOR2), true); } void EnterCombat(Unit* /*who*/) OVERRIDE { + _EnterCombat(); Talk(SAY_AGGRO); - - if (!instance) - return; - - instance->SetData(TYPE_THE_MAKER_EVENT, IN_PROGRESS); - instance->HandleGameObject(instance->GetData64(DATA_DOOR2), false); } - void KilledUnit(Unit* /*victim*/) OVERRIDE + void KilledUnit(Unit* who) OVERRIDE { - Talk(SAY_KILL); + if (who->GetTypeId() == TYPEID_PLAYER) + Talk(SAY_KILL); } void JustDied(Unit* /*killer*/) OVERRIDE { + _JustDied(); Talk(SAY_DIE); - - if (!instance) - return; - - instance->SetData(TYPE_THE_MAKER_EVENT, DONE); - instance->HandleGameObject(instance->GetData64(DATA_DOOR2), true); - instance->HandleGameObject(instance->GetData64(DATA_DOOR3), true); - - } + } void UpdateAI(uint32 diff) OVERRIDE { @@ -156,7 +131,7 @@ class boss_the_maker : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_the_makerAI(creature); + return GetBloodFurnaceAI<boss_the_makerAI>(creature); } }; diff --git a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/instance_blood_furnace.cpp b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/instance_blood_furnace.cpp index b8edd55a3ed..bc399e4b43f 100644 --- a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/instance_blood_furnace.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/instance_blood_furnace.cpp @@ -1,6 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> - * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -16,292 +15,207 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -/* ScriptData -SDName: Instance_Blood_Furnace -SD%Complete: 85 -SDComment: -SDCategory: Hellfire Citadel, Blood Furnace -EndScriptData */ - #include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "InstanceScript.h" #include "blood_furnace.h" -#include "CreatureAI.h" -#define ENTRY_SEWER1 181823 -#define ENTRY_SEWER2 181766 -#define MAX_ENCOUNTER 3 +DoorData const doorData[] = +{ + { GO_PRISON_DOOR_01, DATA_KELIDAN_THE_BREAKER, DOOR_TYPE_PASSAGE, BOUNDARY_NONE }, + { GO_PRISON_DOOR_02, DATA_THE_MAKER, DOOR_TYPE_ROOM, BOUNDARY_NONE }, + { GO_PRISON_DOOR_03, DATA_THE_MAKER, DOOR_TYPE_PASSAGE, BOUNDARY_NONE }, + { GO_PRISON_DOOR_04, DATA_BROGGOK, DOOR_TYPE_PASSAGE, BOUNDARY_NONE }, + { GO_PRISON_DOOR_05, DATA_BROGGOK, DOOR_TYPE_ROOM, BOUNDARY_NONE }, + { GO_SUMMON_DOOR, DATA_KELIDAN_THE_BREAKER, DOOR_TYPE_PASSAGE, BOUNDARY_NONE }, + { 0, 0, DOOR_TYPE_ROOM, BOUNDARY_NONE } // END +}; class instance_blood_furnace : public InstanceMapScript { public: - instance_blood_furnace() - : InstanceMapScript("instance_blood_furnace", 542) { } + instance_blood_furnace() : InstanceMapScript(BFScriptName, 542) { } struct instance_blood_furnace_InstanceMapScript : public InstanceScript { - instance_blood_furnace_InstanceMapScript(Map* map) : InstanceScript(map) { } - - uint64 The_MakerGUID; - uint64 BroggokGUID; - uint64 Kelidan_The_BreakerGUID; - - uint64 Door1GUID; - uint64 Door2GUID; - uint64 Door3GUID; - uint64 Door4GUID; - uint64 Door5GUID; - uint64 Door6GUID; - - uint64 PrisonCell1GUID; - uint64 PrisonCell2GUID; - uint64 PrisonCell3GUID; - uint64 PrisonCell4GUID; - uint64 PrisonCell5GUID; - uint64 PrisonCell6GUID; - uint64 PrisonCell7GUID; - uint64 PrisonCell8GUID; - - std::set<uint64> PrisonersCell5; - std::set<uint64> PrisonersCell6; - std::set<uint64> PrisonersCell7; - std::set<uint64> PrisonersCell8; - - uint8 PrisonerCounter5; - uint8 PrisonerCounter6; - uint8 PrisonerCounter7; - uint8 PrisonerCounter8; + instance_blood_furnace_InstanceMapScript(Map* map) : InstanceScript(map) + { + SetBossNumber(EncounterCount); + LoadDoorData(doorData); - uint64 BroggokLeverGUID; + TheMakerGUID = 0; + BroggokGUID = 0; + KelidanTheBreakerGUID = 0; - uint32 m_auiEncounter[MAX_ENCOUNTER]; - std::string str_data; + BroggokLeverGUID = 0; + PrisonDoor4GUID = 0; - void Initialize() OVERRIDE - { - memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); - - The_MakerGUID = 0; - BroggokGUID = 0; - Kelidan_The_BreakerGUID = 0; - - Door1GUID = 0; - Door2GUID = 0; - Door3GUID = 0; - Door4GUID = 0; - Door5GUID = 0; - Door6GUID = 0; - - PrisonCell1GUID = 0; - PrisonCell2GUID = 0; - PrisonCell3GUID = 0; - PrisonCell4GUID = 0; - PrisonCell5GUID = 0; - PrisonCell6GUID = 0; - PrisonCell7GUID = 0; - PrisonCell8GUID = 0; + memset(PrisonCellGUIDs, 0, 8 * sizeof(uint64)); PrisonersCell5.clear(); PrisonersCell6.clear(); PrisonersCell7.clear(); PrisonersCell8.clear(); - PrisonerCounter5 = 0; - PrisonerCounter6 = 0; - PrisonerCounter7 = 0; - PrisonerCounter8 = 0; - - BroggokLeverGUID = 0; + PrisonerCounter5 = 0; + PrisonerCounter6 = 0; + PrisonerCounter7 = 0; + PrisonerCounter8 = 0; } void OnCreatureCreate(Creature* creature) OVERRIDE { switch (creature->GetEntry()) { - case 17381: - The_MakerGUID = creature->GetGUID(); + case NPC_THE_MAKER: + TheMakerGUID = creature->GetGUID(); break; - case 17380: + case NPC_BROGGOK: BroggokGUID = creature->GetGUID(); break; - case 17377: - Kelidan_The_BreakerGUID = creature->GetGUID(); + case NPC_KELIDAN_THE_BREAKER: + KelidanTheBreakerGUID = creature->GetGUID(); break; - case 17398: + case NPC_PRISONER: StorePrisoner(creature); break; + default: + break; } } void OnUnitDeath(Unit* unit) OVERRIDE { - if (unit && unit->GetTypeId() == TYPEID_UNIT && unit->GetEntry() == 17398) + if (unit->GetTypeId() == TYPEID_UNIT && unit->GetEntry() == NPC_PRISONER) PrisonerDied(unit->GetGUID()); } void OnGameObjectCreate(GameObject* go) OVERRIDE { - if (go->GetEntry() == 181766) //Final exit door - Door1GUID = go->GetGUID(); - if (go->GetEntry() == 181811) //The Maker Front door - Door2GUID = go->GetGUID(); - if (go->GetEntry() == 181812) //The Maker Rear door - Door3GUID = go->GetGUID(); - if (go->GetEntry() == 181822) //Broggok Front door - Door4GUID = go->GetGUID(); - if (go->GetEntry() == 181819) //Broggok Rear door - Door5GUID = go->GetGUID(); - if (go->GetEntry() == 181823) //Kelidan exit door - Door6GUID = go->GetGUID(); - - if (go->GetEntry() == 181813) //The Maker prison cell front right - PrisonCell1GUID = go->GetGUID(); - if (go->GetEntry() == 181814) //The Maker prison cell back right - PrisonCell2GUID = go->GetGUID(); - if (go->GetEntry() == 181816) //The Maker prison cell front left - PrisonCell3GUID = go->GetGUID(); - if (go->GetEntry() == 181815) //The Maker prison cell back left - PrisonCell4GUID = go->GetGUID(); - if (go->GetEntry() == 181821) //Broggok prison cell front right - PrisonCell5GUID = go->GetGUID(); - if (go->GetEntry() == 181818) //Broggok prison cell back right - PrisonCell6GUID = go->GetGUID(); - if (go->GetEntry() == 181820) //Broggok prison cell front left - PrisonCell7GUID = go->GetGUID(); - if (go->GetEntry() == 181817) //Broggok prison cell back left - PrisonCell8GUID = go->GetGUID(); - - if (go->GetEntry() == 181982) - BroggokLeverGUID = go->GetGUID(); //Broggok lever - } - - uint64 GetData64(uint32 data) const OVERRIDE - { - switch (data) + switch (go->GetEntry()) { - case DATA_THE_MAKER: return The_MakerGUID; - case DATA_BROGGOK: return BroggokGUID; - case DATA_KELIDAN_THE_MAKER: return Kelidan_The_BreakerGUID; - case DATA_DOOR1: return Door1GUID; - case DATA_DOOR2: return Door2GUID; - case DATA_DOOR3: return Door3GUID; - case DATA_DOOR4: return Door4GUID; - case DATA_DOOR5: return Door5GUID; - case DATA_DOOR6: return Door6GUID; - case DATA_PRISON_CELL1: return PrisonCell1GUID; - case DATA_PRISON_CELL2: return PrisonCell2GUID; - case DATA_PRISON_CELL3: return PrisonCell3GUID; - case DATA_PRISON_CELL4: return PrisonCell4GUID; - case DATA_PRISON_CELL5: return PrisonCell5GUID; - case DATA_PRISON_CELL6: return PrisonCell6GUID; - case DATA_PRISON_CELL7: return PrisonCell7GUID; - case DATA_PRISON_CELL8: return PrisonCell8GUID; - case DATA_BROGGOK_LEVER: return BroggokLeverGUID; + case GO_PRISON_DOOR_04: + PrisonDoor4GUID = go->GetGUID(); + // no break + case GO_PRISON_DOOR_01: + case GO_PRISON_DOOR_02: + case GO_PRISON_DOOR_03: + case GO_PRISON_DOOR_05: + case GO_SUMMON_DOOR: + AddDoor(go, true); + break; + case GO_BROGGOK_LEVER: + BroggokLeverGUID = go->GetGUID(); + break; + case GO_PRISON_CELL_DOOR_1: + PrisonCellGUIDs[DATA_PRISON_CELL1 - DATA_PRISON_CELL1] = go->GetGUID(); + break; + case GO_PRISON_CELL_DOOR_2: + PrisonCellGUIDs[DATA_PRISON_CELL2 - DATA_PRISON_CELL1] = go->GetGUID(); + break; + case GO_PRISON_CELL_DOOR_3: + PrisonCellGUIDs[DATA_PRISON_CELL3 - DATA_PRISON_CELL1] = go->GetGUID(); + break; + case GO_PRISON_CELL_DOOR_4: + PrisonCellGUIDs[DATA_PRISON_CELL4 - DATA_PRISON_CELL1] = go->GetGUID(); + break; + case GO_PRISON_CELL_DOOR_5: + PrisonCellGUIDs[DATA_PRISON_CELL5 - DATA_PRISON_CELL1] = go->GetGUID(); + break; + case GO_PRISON_CELL_DOOR_6: + PrisonCellGUIDs[DATA_PRISON_CELL6 - DATA_PRISON_CELL1] = go->GetGUID(); + break; + case GO_PRISON_CELL_DOOR_7: + PrisonCellGUIDs[DATA_PRISON_CELL7 - DATA_PRISON_CELL1] = go->GetGUID(); + break; + case GO_PRISON_CELL_DOOR_8: + PrisonCellGUIDs[DATA_PRISON_CELL8 - DATA_PRISON_CELL1] = go->GetGUID(); + break; + default: + break; } - return 0; } - void SetData(uint32 type, uint32 data) OVERRIDE + void OnGameObjectRemove(GameObject* go) OVERRIDE { - switch (type) - { - case TYPE_THE_MAKER_EVENT: - m_auiEncounter[0] = data; - break; - case TYPE_BROGGOK_EVENT: - m_auiEncounter[1] = data; - UpdateBroggokEvent(data); - break; - case TYPE_KELIDAN_THE_BREAKER_EVENT: - m_auiEncounter[2] = data; - break; - } - - if (data == DONE) + switch (go->GetEntry()) { - OUT_SAVE_INST_DATA; - - std::ostringstream saveStream; - saveStream << m_auiEncounter[0] << ' ' << m_auiEncounter[1] << ' ' << m_auiEncounter[2]; - - str_data = saveStream.str(); - - SaveToDB(); - OUT_SAVE_INST_DATA_COMPLETE; + case GO_PRISON_DOOR_01: + case GO_PRISON_DOOR_02: + case GO_PRISON_DOOR_03: + case GO_PRISON_DOOR_04: + case GO_PRISON_DOOR_05: + case GO_SUMMON_DOOR: + AddDoor(go, false); + break; + default: + break; } } - uint32 GetData(uint32 type) const OVERRIDE + uint64 GetData64(uint32 type) const OVERRIDE { switch (type) { - case TYPE_THE_MAKER_EVENT: return m_auiEncounter[0]; - case TYPE_BROGGOK_EVENT: return m_auiEncounter[1]; - case TYPE_KELIDAN_THE_BREAKER_EVENT: return m_auiEncounter[2]; + case DATA_THE_MAKER: + return TheMakerGUID; + case DATA_BROGGOK: + return BroggokGUID; + case DATA_KELIDAN_THE_BREAKER: + return KelidanTheBreakerGUID; + case DATA_BROGGOK_LEVER: + return BroggokLeverGUID; } - return 0; - } - const char* Save() - { - return str_data.c_str(); + return 0; } - void Load(const char* in) OVERRIDE + bool SetBossState(uint32 type, EncounterState state) OVERRIDE { - if (!in) - { - OUT_LOAD_INST_DATA_FAIL; - return; - } - - OUT_LOAD_INST_DATA(in); + if (!InstanceScript::SetBossState(type, state)) + return false; - std::istringstream loadStream(in); - loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2]; - - for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) - if (m_auiEncounter[i] == IN_PROGRESS || m_auiEncounter[i] == FAIL) - m_auiEncounter[i] = NOT_STARTED; - - OUT_LOAD_INST_DATA_COMPLETE; - } - - void UpdateBroggokEvent(uint32 data) - { - switch (data) + switch (type) { - case IN_PROGRESS: - ActivateCell(DATA_PRISON_CELL5); - HandleGameObject(Door4GUID, false); + case DATA_BROGGOK: + switch (state) + { + case IN_PROGRESS: + ActivateCell(DATA_PRISON_CELL5); + break; + case NOT_STARTED: + ResetPrisons(); + if (GameObject* lever = instance->GetGameObject(BroggokLeverGUID)) + lever->Respawn(); + break; + default: + break; + } break; - case NOT_STARTED: - ResetPrisons(); - HandleGameObject(Door5GUID, false); - HandleGameObject(Door4GUID, true); - if (GameObject* lever = instance->GetGameObject(BroggokLeverGUID)) - lever->Respawn(); + default: break; } + + return true; } void ResetPrisons() { PrisonerCounter5 = PrisonersCell5.size(); ResetPrisoners(PrisonersCell5); - HandleGameObject(PrisonCell5GUID, false); + HandleGameObject(PrisonCellGUIDs[DATA_PRISON_CELL5 - DATA_PRISON_CELL1], false); PrisonerCounter6 = PrisonersCell6.size(); ResetPrisoners(PrisonersCell6); - HandleGameObject(PrisonCell6GUID, false); + HandleGameObject(PrisonCellGUIDs[DATA_PRISON_CELL6 - DATA_PRISON_CELL1], false); PrisonerCounter7 = PrisonersCell7.size(); ResetPrisoners(PrisonersCell7); - HandleGameObject(PrisonCell7GUID, false); + HandleGameObject(PrisonCellGUIDs[DATA_PRISON_CELL7 - DATA_PRISON_CELL1], false); PrisonerCounter8 = PrisonersCell8.size(); ResetPrisoners(PrisonersCell8); - HandleGameObject(PrisonCell8GUID, false); + HandleGameObject(PrisonCellGUIDs[DATA_PRISON_CELL8 - DATA_PRISON_CELL1], false); } void ResetPrisoners(const std::set<uint64>& prisoners) @@ -367,7 +281,7 @@ class instance_blood_furnace : public InstanceMapScript else if (PrisonersCell7.find(guid) != PrisonersCell7.end() && --PrisonerCounter7 <= 0) ActivateCell(DATA_PRISON_CELL8); else if (PrisonersCell8.find(guid) != PrisonersCell8.end() && --PrisonerCounter8 <= 0) - ActivateCell(DATA_DOOR5); + ActivateCell(DATA_DOOR_4); } void ActivateCell(uint8 id) @@ -375,30 +289,30 @@ class instance_blood_furnace : public InstanceMapScript switch (id) { case DATA_PRISON_CELL5: - HandleGameObject(PrisonCell5GUID, true); + HandleGameObject(PrisonCellGUIDs[id - DATA_PRISON_CELL1], true); ActivatePrisoners(PrisonersCell5); break; case DATA_PRISON_CELL6: - HandleGameObject(PrisonCell6GUID, true); + HandleGameObject(PrisonCellGUIDs[id - DATA_PRISON_CELL1], true); ActivatePrisoners(PrisonersCell6); break; case DATA_PRISON_CELL7: - HandleGameObject(PrisonCell7GUID, true); + HandleGameObject(PrisonCellGUIDs[id - DATA_PRISON_CELL1], true); ActivatePrisoners(PrisonersCell7); break; case DATA_PRISON_CELL8: - HandleGameObject(PrisonCell8GUID, true); + HandleGameObject(PrisonCellGUIDs[id - DATA_PRISON_CELL1], true); ActivatePrisoners(PrisonersCell8); break; - case DATA_DOOR5: - HandleGameObject(Door5GUID, true); + case DATA_DOOR_4: + HandleGameObject(PrisonDoor4GUID, true); if (Creature* broggok = instance->GetCreature(BroggokGUID)) broggok->AI()->DoAction(ACTION_ACTIVATE_BROGGOK); break; } } - void ActivatePrisoners(const std::set<uint64>& prisoners) + void ActivatePrisoners(std::set<uint64> const& prisoners) { for (std::set<uint64>::const_iterator i = prisoners.begin(); i != prisoners.end(); ++i) if (Creature* prisoner = instance->GetCreature(*i)) @@ -407,6 +321,69 @@ class instance_blood_furnace : public InstanceMapScript prisoner->SetInCombatWithZone(); } } + + std::string GetSaveData() OVERRIDE + { + OUT_SAVE_INST_DATA; + + std::ostringstream saveStream; + saveStream << "B F " << GetBossSaveData(); + + OUT_SAVE_INST_DATA_COMPLETE; + return saveStream.str(); + } + + void Load(char const* str) OVERRIDE + { + if (!str) + { + OUT_LOAD_INST_DATA_FAIL; + return; + } + + OUT_LOAD_INST_DATA(str); + + char dataHead1, dataHead2; + + std::istringstream loadStream(str); + loadStream >> dataHead1 >> dataHead2; + + if (dataHead1 == 'B' && dataHead2 == 'F') + { + for (uint32 i = 0; i < EncounterCount; ++i) + { + uint32 tmpState; + loadStream >> tmpState; + if (tmpState == IN_PROGRESS || tmpState > SPECIAL) + tmpState = NOT_STARTED; + SetBossState(i, EncounterState(tmpState)); + } + } + else + OUT_LOAD_INST_DATA_FAIL; + + OUT_LOAD_INST_DATA_COMPLETE; + } + + protected: + uint64 TheMakerGUID; + uint64 BroggokGUID; + uint64 KelidanTheBreakerGUID; + + uint64 BroggokLeverGUID; + uint64 PrisonDoor4GUID; + + uint64 PrisonCellGUIDs[8]; + + std::set<uint64>PrisonersCell5; + std::set<uint64>PrisonersCell6; + std::set<uint64>PrisonersCell7; + std::set<uint64>PrisonersCell8; + + uint8 PrisonerCounter5; + uint8 PrisonerCounter6; + uint8 PrisonerCounter7; + uint8 PrisonerCounter8; }; InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp index 7e80182f1e8..a68b3181e6f 100644 --- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -224,7 +224,7 @@ class boss_omor_the_unscarred : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_omor_the_unscarredAI(creature); + return GetInstanceAI<boss_omor_the_unscarredAI>(creature); } }; diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp index 2388a67b3e5..1193e45e73b 100644 --- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_watchkeeper_gargolmar.cpp b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_watchkeeper_gargolmar.cpp index 493630a7650..f1bf63397bf 100644 --- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_watchkeeper_gargolmar.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_watchkeeper_gargolmar.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/hellfire_ramparts.h b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/hellfire_ramparts.h index 880640659b0..61252d16527 100644 --- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/hellfire_ramparts.h +++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/hellfire_ramparts.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/instance_hellfire_ramparts.cpp b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/instance_hellfire_ramparts.cpp index 0c8df4c01e7..a8fd639de6d 100644 --- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/instance_hellfire_ramparts.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/instance_hellfire_ramparts.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp index 44fcc7b8fe1..e1d83931166 100644 --- a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -249,11 +249,8 @@ class boss_magtheridon : public CreatureScript void JustReachedHome() OVERRIDE { - if (instance) - { - instance->SetData(DATA_MAGTHERIDON_EVENT, NOT_STARTED); - instance->SetData(DATA_COLLAPSE, false); - } + instance->SetData(DATA_MAGTHERIDON_EVENT, NOT_STARTED); + instance->SetData(DATA_COLLAPSE, false); } void SetClicker(uint64 cubeGUID, uint64 clickerGUID) @@ -314,8 +311,7 @@ class boss_magtheridon : public CreatureScript void JustDied(Unit* /*killer*/) OVERRIDE { - if (instance) - instance->SetData(DATA_MAGTHERIDON_EVENT, DONE); + instance->SetData(DATA_MAGTHERIDON_EVENT, DONE); Talk(SAY_DEATH); } @@ -331,8 +327,7 @@ class boss_magtheridon : public CreatureScript void EnterCombat(Unit* /*who*/) OVERRIDE { - if (instance) - instance->SetData(DATA_MAGTHERIDON_EVENT, IN_PROGRESS); + instance->SetData(DATA_MAGTHERIDON_EVENT, IN_PROGRESS); DoZoneInCombat(); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); @@ -429,8 +424,7 @@ class boss_magtheridon : public CreatureScript DoCast(me, SPELL_CAMERA_SHAKE, true); DoCast(me, SPELL_DEBRIS_KNOCKDOWN, true); - if (instance) - instance->SetData(DATA_COLLAPSE, true); + instance->SetData(DATA_COLLAPSE, true); } if (Phase3) @@ -457,7 +451,7 @@ class boss_magtheridon : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_magtheridonAI(creature); + return GetInstanceAI<boss_magtheridonAI>(creature); } }; @@ -498,8 +492,7 @@ class npc_hellfire_channeler : public CreatureScript void EnterCombat(Unit* /*who*/) OVERRIDE { - if (instance) - instance->SetData(DATA_CHANNELER_EVENT, IN_PROGRESS); + instance->SetData(DATA_CHANNELER_EVENT, IN_PROGRESS); me->InterruptNonMeleeSpells(false); DoZoneInCombat(); @@ -507,8 +500,7 @@ class npc_hellfire_channeler : public CreatureScript void JustReachedHome() OVERRIDE { - if (instance) - instance->SetData(DATA_CHANNELER_EVENT, NOT_STARTED); + instance->SetData(DATA_CHANNELER_EVENT, NOT_STARTED); DoCast(me, SPELL_SHADOW_GRASP_C, false); } @@ -526,8 +518,7 @@ class npc_hellfire_channeler : public CreatureScript void JustDied(Unit* /*killer*/) OVERRIDE { - if (instance) - instance->SetData(DATA_CHANNELER_EVENT, DONE); + instance->SetData(DATA_CHANNELER_EVENT, DONE); } void UpdateAI(uint32 diff) OVERRIDE @@ -576,7 +567,7 @@ class npc_hellfire_channeler : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_hellfire_channelerAI(creature); + return GetInstanceAI<npc_hellfire_channelerAI>(creature); } }; diff --git a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/instance_magtheridons_lair.cpp b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/instance_magtheridons_lair.cpp index 37a37d2197e..73f741fade1 100644 --- a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/instance_magtheridons_lair.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/instance_magtheridons_lair.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/magtheridons_lair.h b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/magtheridons_lair.h index f67b8ff3256..d3921a8709b 100644 --- a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/magtheridons_lair.h +++ b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/magtheridons_lair.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp index 981774a677b..69906880705 100644 --- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -109,8 +109,7 @@ class boss_grand_warlock_nethekurse : public CreatureScript { Talk(SAY_DIE); - if (instance) - instance->SetBossState(DATA_NETHEKURSE, DONE); + instance->SetBossState(DATA_NETHEKURSE, DONE); } void SetData(uint32 data, uint32 value) OVERRIDE @@ -184,8 +183,7 @@ class boss_grand_warlock_nethekurse : public CreatureScript IntroOnce = true; IsIntroEvent = true; - if (instance) - instance->SetBossState(DATA_NETHEKURSE, IN_PROGRESS); + instance->SetBossState(DATA_NETHEKURSE, IN_PROGRESS); } if (IsIntroEvent || !IsMainEvent) @@ -219,9 +217,6 @@ class boss_grand_warlock_nethekurse : public CreatureScript { if (IsIntroEvent) { - if (!instance) - return; - if (instance->GetBossState(DATA_NETHEKURSE) == IN_PROGRESS) { if (IntroEvent_Timer <= diff) @@ -297,7 +292,7 @@ class boss_grand_warlock_nethekurse : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_grand_warlock_nethekurseAI(creature); + return GetInstanceAI<boss_grand_warlock_nethekurseAI>(creature); } }; @@ -328,22 +323,18 @@ class npc_fel_orc_convert : public CreatureScript { events.ScheduleEvent(EVENT_HEMORRHAGE, 3000); - if (instance) - if (Creature* Kurse = Unit::GetCreature(*me, instance->GetData64(NPC_GRAND_WARLOCK_NETHEKURSE))) - if (Kurse && me->IsWithinDist(Kurse, 45.0f)) - Kurse->AI()->SetData(SETDATA_DATA, SETDATA_PEON_AGGRO); + if (Creature* Kurse = Unit::GetCreature(*me, instance->GetData64(NPC_GRAND_WARLOCK_NETHEKURSE))) + if (me->IsWithinDist(Kurse, 45.0f)) + Kurse->AI()->SetData(SETDATA_DATA, SETDATA_PEON_AGGRO); } void JustDied(Unit* /*killer*/) OVERRIDE { - if (instance) - { - if (instance->GetBossState(DATA_NETHEKURSE) != IN_PROGRESS) - return; + if (instance->GetBossState(DATA_NETHEKURSE) != IN_PROGRESS) + return; - if (Creature* Kurse = Unit::GetCreature(*me, instance->GetData64(NPC_GRAND_WARLOCK_NETHEKURSE))) - Kurse->AI()->SetData(SETDATA_DATA, SETDATA_PEON_DEATH); - } + if (Creature* Kurse = Unit::GetCreature(*me, instance->GetData64(NPC_GRAND_WARLOCK_NETHEKURSE))) + Kurse->AI()->SetData(SETDATA_DATA, SETDATA_PEON_DEATH); } void UpdateAI(uint32 diff) OVERRIDE @@ -369,7 +360,7 @@ class npc_fel_orc_convert : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_fel_orc_convertAI(creature); + return GetInstanceAI<npc_fel_orc_convertAI>(creature); } }; diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warbringer_omrogg.cpp b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warbringer_omrogg.cpp index 9c4be7c0b1b..2ed70ded6ef 100644 --- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warbringer_omrogg.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warbringer_omrogg.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -167,8 +167,7 @@ class boss_warbringer_omrogg : public CreatureScript ThunderClap_Timer = 15000; ResetThreat_Timer = 30000; - if (instance) - instance->SetData(DATA_OMROGG, NOT_STARTED); //End boss can use this later. O'mrogg must be defeated(DONE) or he will come to aid. + instance->SetData(DATA_OMROGG, NOT_STARTED); //End boss can use this later. O'mrogg must be defeated(DONE) or he will come to aid. } void DoYellForThreat() @@ -204,8 +203,7 @@ class boss_warbringer_omrogg : public CreatureScript AggroYell = true; } - if (instance) - instance->SetBossState(DATA_OMROGG, IN_PROGRESS); + instance->SetBossState(DATA_OMROGG, IN_PROGRESS); } void JustSummoned(Creature* summoned) OVERRIDE @@ -259,8 +257,7 @@ class boss_warbringer_omrogg : public CreatureScript RightHead->AI()->SetData(SETDATA_DATA, SETDATA_YELL); - if (instance) - instance->SetBossState(DATA_OMROGG, DONE); + instance->SetBossState(DATA_OMROGG, DONE); } void UpdateAI(uint32 diff) OVERRIDE @@ -388,7 +385,7 @@ class boss_warbringer_omrogg : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_warbringer_omroggAI(creature); + return GetInstanceAI<boss_warbringer_omroggAI>(creature); } }; @@ -438,7 +435,7 @@ class npc_omrogg_heads : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_omrogg_headsAI(creature); + return GetInstanceAI<npc_omrogg_headsAI>(creature); } }; diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp index f9ec3edb362..bdb109910a8 100644 --- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -90,8 +90,7 @@ class boss_warchief_kargath_bladefist : public CreatureScript Talk(SAY_DEATH); removeAdds(); - if (instance) - instance->SetBossState(DATA_KARGATH, DONE); + instance->SetBossState(DATA_KARGATH, DONE); } void EnterCombat(Unit* /*who*/) OVERRIDE @@ -311,7 +310,7 @@ class boss_warchief_kargath_bladefist : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_warchief_kargath_bladefistAI(creature); + return GetInstanceAI<boss_warchief_kargath_bladefistAI>(creature); } }; diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/instance_shattered_halls.cpp b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/instance_shattered_halls.cpp index 1484c5e9127..25ecf5331ad 100644 --- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/instance_shattered_halls.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/instance_shattered_halls.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/shattered_halls.h b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/shattered_halls.h index 888a9cb5010..10e944d5bc4 100644 --- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/shattered_halls.h +++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/shattered_halls.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp index 07401e1efbb..d802e48f3b0 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -109,8 +109,7 @@ class boss_alar : public CreatureScript void Reset() OVERRIDE { - if (instance) - instance->SetData(DATA_ALAREVENT, NOT_STARTED); + instance->SetData(DATA_ALAREVENT, NOT_STARTED); Berserk_Timer = 1200000; Platforms_Move_Timer = 0; @@ -136,8 +135,7 @@ class boss_alar : public CreatureScript void EnterCombat(Unit* /*who*/) OVERRIDE { - if (instance) - instance->SetData(DATA_ALAREVENT, IN_PROGRESS); + instance->SetData(DATA_ALAREVENT, IN_PROGRESS); me->SetDisableGravity(true); // after enterevademode will be set walk movement DoZoneInCombat(); @@ -146,8 +144,7 @@ class boss_alar : public CreatureScript void JustDied(Unit* /*killer*/) OVERRIDE { - if (instance) - instance->SetData(DATA_ALAREVENT, DONE); + instance->SetData(DATA_ALAREVENT, DONE); } void JustSummoned(Creature* summon) OVERRIDE @@ -451,7 +448,7 @@ class boss_alar : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_alarAI(creature); + return GetInstanceAI<boss_alarAI>(creature); } }; @@ -528,7 +525,7 @@ class npc_ember_of_alar : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_ember_of_alarAI(creature); + return GetInstanceAI<npc_ember_of_alarAI>(creature); } }; diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp index c5c3f6deb12..7caf1fd1771 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -146,8 +146,7 @@ class boss_high_astromancer_solarian : public CreatureScript Wrath_Timer = 20000+rand()%5000;//twice in phase one Phase = 1; - if (instance) - instance->SetData(DATA_HIGHASTROMANCERSOLARIANEVENT, NOT_STARTED); + instance->SetData(DATA_HIGHASTROMANCERSOLARIANEVENT, NOT_STARTED); me->SetArmor(defaultarmor); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); @@ -168,8 +167,7 @@ class boss_high_astromancer_solarian : public CreatureScript me->SetObjectScale(defaultsize); me->SetDisplayId(MODEL_HUMAN); Talk(SAY_DEATH); - if (instance) - instance->SetData(DATA_HIGHASTROMANCERSOLARIANEVENT, DONE); + instance->SetData(DATA_HIGHASTROMANCERSOLARIANEVENT, DONE); } void EnterCombat(Unit* /*who*/) OVERRIDE @@ -177,8 +175,7 @@ class boss_high_astromancer_solarian : public CreatureScript Talk(SAY_AGGRO); DoZoneInCombat(); - if (instance) - instance->SetData(DATA_HIGHASTROMANCERSOLARIANEVENT, IN_PROGRESS); + instance->SetData(DATA_HIGHASTROMANCERSOLARIANEVENT, IN_PROGRESS); } void SummonMinion(uint32 entry, float x, float y, float z) @@ -419,7 +416,7 @@ class boss_high_astromancer_solarian : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_high_astromancer_solarianAI(creature); + return GetInstanceAI<boss_high_astromancer_solarianAI>(creature); } }; @@ -467,8 +464,7 @@ class npc_solarium_priest : public CreatureScript switch (urand(0, 1)) { case 0: - if (instance) - target = Unit::GetUnit(*me, instance->GetData64(DATA_ASTROMANCER)); + target = Unit::GetUnit(*me, instance->GetData64(DATA_ASTROMANCER)); break; case 1: target = me; @@ -506,7 +502,7 @@ class npc_solarium_priest : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_solarium_priestAI(creature); + return GetInstanceAI<npc_solarium_priestAI>(creature); } }; diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp index a6ff49d1e48..75b1bfe8ad1 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -344,8 +344,7 @@ class boss_kaelthas : public CreatureScript me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - if (instance) - instance->SetData(DATA_KAELTHASEVENT, 0); + instance->SetData(DATA_KAELTHASEVENT, 0); } void PrepareAdvisors() @@ -364,9 +363,6 @@ class boss_kaelthas : public CreatureScript void StartEvent() { - if (!instance) - return; - m_auiAdvisorGuid[0] = instance->GetData64(DATA_THALADREDTHEDARKENER); m_auiAdvisorGuid[1] = instance->GetData64(DATA_LORDSANGUINAR); m_auiAdvisorGuid[2] = instance->GetData64(DATA_GRANDASTROMANCERCAPERNIAN); @@ -468,8 +464,7 @@ class boss_kaelthas : public CreatureScript summons.DespawnAll(); - if (instance) - instance->SetData(DATA_KAELTHASEVENT, 0); + instance->SetData(DATA_KAELTHASEVENT, 0); for (uint8 i = 0; i < MAX_ADVISORS; ++i) { @@ -633,8 +628,7 @@ class boss_kaelthas : public CreatureScript if (Advisor && (Advisor->getStandState() == UNIT_STAND_STATE_DEAD)) { Phase = 2; - if (instance) - instance->SetData(DATA_KAELTHASEVENT, 2); + instance->SetData(DATA_KAELTHASEVENT, 2); Talk(SAY_PHASE2_WEAPON); @@ -678,8 +672,7 @@ class boss_kaelthas : public CreatureScript if (Phase_Timer <= diff) { Talk(SAY_PHASE3_ADVANCE); - if (instance) - instance->SetData(DATA_KAELTHASEVENT, 3); + instance->SetData(DATA_KAELTHASEVENT, 3); Phase = 3; PhaseSubphase = 0; } @@ -716,8 +709,7 @@ class boss_kaelthas : public CreatureScript Talk(SAY_PHASE4_INTRO2); Phase = 4; - if (instance) - instance->SetData(DATA_KAELTHASEVENT, 4); + instance->SetData(DATA_KAELTHASEVENT, 4); // Sometimes people can collect Aggro in Phase 1-3. Reset threat before releasing Kael. DoResetThreat(); @@ -821,8 +813,7 @@ class boss_kaelthas : public CreatureScript { if (HealthBelowPct(50)) { - if (instance) - instance->SetData(DATA_KAELTHASEVENT, 4); + instance->SetData(DATA_KAELTHASEVENT, 4); Phase = 5; Phase_Timer = 10000; @@ -1011,7 +1002,7 @@ class boss_kaelthas : public CreatureScript }; CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_kaelthasAI(creature); + return GetInstanceAI<boss_kaelthasAI>(creature); } }; @@ -1109,7 +1100,7 @@ class boss_thaladred_the_darkener : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_thaladred_the_darkenerAI(creature); + return GetInstanceAI<boss_thaladred_the_darkenerAI>(creature); } }; @@ -1177,7 +1168,7 @@ class boss_lord_sanguinar : public CreatureScript }; CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_lord_sanguinarAI(creature); + return GetInstanceAI<boss_lord_sanguinarAI>(creature); } }; //Grand Astromancer Capernian AI @@ -1321,7 +1312,7 @@ class boss_grand_astromancer_capernian : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_grand_astromancer_capernianAI(creature); + return GetInstanceAI<boss_grand_astromancer_capernianAI>(creature); } }; @@ -1404,7 +1395,7 @@ class boss_master_engineer_telonicus : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_master_engineer_telonicusAI(creature); + return GetInstanceAI<boss_master_engineer_telonicusAI>(creature); } }; diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_void_reaver.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_void_reaver.cpp index f842ed19f3c..a1917d6201c 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/boss_void_reaver.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_void_reaver.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -91,16 +91,14 @@ class boss_void_reaver : public CreatureScript Talk(SAY_DEATH); DoZoneInCombat(); - if (instance) - instance->SetData(DATA_VOIDREAVEREVENT, DONE); + instance->SetData(DATA_VOIDREAVEREVENT, DONE); } void EnterCombat(Unit* /*who*/) OVERRIDE { Talk(SAY_AGGRO); - if (instance) - instance->SetData(DATA_VOIDREAVEREVENT, IN_PROGRESS); + instance->SetData(DATA_VOIDREAVEREVENT, IN_PROGRESS); } void UpdateAI(uint32 diff) OVERRIDE @@ -172,7 +170,7 @@ class boss_void_reaver : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_void_reaverAI(creature); + return GetInstanceAI<boss_void_reaverAI>(creature); } }; diff --git a/src/server/scripts/Outland/TempestKeep/Eye/instance_the_eye.cpp b/src/server/scripts/Outland/TempestKeep/Eye/instance_the_eye.cpp index f5f75d79b63..fcace2a3ab4 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/instance_the_eye.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/instance_the_eye.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/TempestKeep/Eye/the_eye.cpp b/src/server/scripts/Outland/TempestKeep/Eye/the_eye.cpp index e8d52c3f819..a09dd4c756e 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/the_eye.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/the_eye.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/TempestKeep/Eye/the_eye.h b/src/server/scripts/Outland/TempestKeep/Eye/the_eye.h index b9e44aff0a9..52061a54591 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/the_eye.h +++ b/src/server/scripts/Outland/TempestKeep/Eye/the_eye.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_gyrokill.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_gyrokill.cpp index 97a165453f8..05050b4be2e 100644 --- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_gyrokill.cpp +++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_gyrokill.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp index 6a4de059eb7..e34e4ebdb23 100644 --- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp +++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp index 06296ca3ae2..b15318647a9 100644 --- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp +++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp index b5172245b49..d7e8eabd32f 100644 --- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp +++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -182,14 +182,11 @@ class npc_ragin_flames : public CreatureScript //Check_Timer if (Check_Timer <= diff) { - if (instance) + if (instance->GetData(DATA_NETHERMANCER_SEPRETHREA) != IN_PROGRESS) { - if (instance->GetData(DATA_NETHERMANCER_SEPRETHREA) != IN_PROGRESS) - { - //remove - me->setDeathState(JUST_DIED); - me->RemoveCorpse(); - } + //remove + me->setDeathState(JUST_DIED); + me->RemoveCorpse(); } Check_Timer = 1000; } else Check_Timer -= diff; @@ -223,7 +220,7 @@ class npc_ragin_flames : public CreatureScript }; CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_ragin_flamesAI(creature); + return GetInstanceAI<npc_ragin_flamesAI>(creature); } }; diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp index 59dee587ef6..8d6dde82770 100644 --- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp +++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/instance_mechanar.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/instance_mechanar.cpp index c293a995467..9d2556d809b 100644 --- a/src/server/scripts/Outland/TempestKeep/Mechanar/instance_mechanar.cpp +++ b/src/server/scripts/Outland/TempestKeep/Mechanar/instance_mechanar.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/mechanar.h b/src/server/scripts/Outland/TempestKeep/Mechanar/mechanar.h index 0d3a4ea241d..34346e163c7 100644 --- a/src/server/scripts/Outland/TempestKeep/Mechanar/mechanar.h +++ b/src/server/scripts/Outland/TempestKeep/Mechanar/mechanar.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp b/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp index 741b1378e4a..3cc2e5dcc89 100644 --- a/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp +++ b/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.h b/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.h index c3b7d754a0d..889a900653f 100644 --- a/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.h +++ b/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_dalliah_the_doomsayer.cpp b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_dalliah_the_doomsayer.cpp index 36377b4d715..bfc304e6a99 100644 --- a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_dalliah_the_doomsayer.cpp +++ b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_dalliah_the_doomsayer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp index d590093de56..e94de3af56e 100644 --- a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp +++ b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_wrath_scryer_soccothrates.cpp b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_wrath_scryer_soccothrates.cpp index 2d9bfc92583..044be4c1534 100644 --- a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_wrath_scryer_soccothrates.cpp +++ b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_wrath_scryer_soccothrates.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_zereketh_the_unbound.cpp b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_zereketh_the_unbound.cpp index 7659f191ff7..54246453100 100644 --- a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_zereketh_the_unbound.cpp +++ b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_zereketh_the_unbound.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/instance_arcatraz.cpp b/src/server/scripts/Outland/TempestKeep/arcatraz/instance_arcatraz.cpp index cb7cd3828e2..90feaa8d091 100644 --- a/src/server/scripts/Outland/TempestKeep/arcatraz/instance_arcatraz.cpp +++ b/src/server/scripts/Outland/TempestKeep/arcatraz/instance_arcatraz.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Outland/TempestKeep/botanica/boss_commander_sarannis.cpp b/src/server/scripts/Outland/TempestKeep/botanica/boss_commander_sarannis.cpp index bd67f4be8b7..fefb791715f 100644 --- a/src/server/scripts/Outland/TempestKeep/botanica/boss_commander_sarannis.cpp +++ b/src/server/scripts/Outland/TempestKeep/botanica/boss_commander_sarannis.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Outland/TempestKeep/botanica/boss_high_botanist_freywinn.cpp b/src/server/scripts/Outland/TempestKeep/botanica/boss_high_botanist_freywinn.cpp index fe072b437eb..db62a0e91b3 100644 --- a/src/server/scripts/Outland/TempestKeep/botanica/boss_high_botanist_freywinn.cpp +++ b/src/server/scripts/Outland/TempestKeep/botanica/boss_high_botanist_freywinn.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/TempestKeep/botanica/boss_laj.cpp b/src/server/scripts/Outland/TempestKeep/botanica/boss_laj.cpp index fe9e7d87008..839b452e631 100644 --- a/src/server/scripts/Outland/TempestKeep/botanica/boss_laj.cpp +++ b/src/server/scripts/Outland/TempestKeep/botanica/boss_laj.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/TempestKeep/botanica/boss_thorngrin_the_tender.cpp b/src/server/scripts/Outland/TempestKeep/botanica/boss_thorngrin_the_tender.cpp index d2a1b294698..cc3ffc26edf 100644 --- a/src/server/scripts/Outland/TempestKeep/botanica/boss_thorngrin_the_tender.cpp +++ b/src/server/scripts/Outland/TempestKeep/botanica/boss_thorngrin_the_tender.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp b/src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp index 68b7c4e8117..7b83fa7009d 100644 --- a/src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp +++ b/src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/TempestKeep/botanica/instance_the_botanica.cpp b/src/server/scripts/Outland/TempestKeep/botanica/instance_the_botanica.cpp index 1bcfc9cbb21..72202c5d896 100644 --- a/src/server/scripts/Outland/TempestKeep/botanica/instance_the_botanica.cpp +++ b/src/server/scripts/Outland/TempestKeep/botanica/instance_the_botanica.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Outland/TempestKeep/botanica/the_botanica.h b/src/server/scripts/Outland/TempestKeep/botanica/the_botanica.h index d5657dc7048..ed0d6b0c98a 100644 --- a/src/server/scripts/Outland/TempestKeep/botanica/the_botanica.h +++ b/src/server/scripts/Outland/TempestKeep/botanica/the_botanica.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/boss_doomlord_kazzak.cpp b/src/server/scripts/Outland/boss_doomlord_kazzak.cpp index 82849691fcd..3da0ee61aa3 100644 --- a/src/server/scripts/Outland/boss_doomlord_kazzak.cpp +++ b/src/server/scripts/Outland/boss_doomlord_kazzak.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/boss_doomwalker.cpp b/src/server/scripts/Outland/boss_doomwalker.cpp index 295d86bbce3..46777abce6a 100644 --- a/src/server/scripts/Outland/boss_doomwalker.cpp +++ b/src/server/scripts/Outland/boss_doomwalker.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/zone_blades_edge_mountains.cpp b/src/server/scripts/Outland/zone_blades_edge_mountains.cpp index bb8bbe9215e..cc58be26664 100644 --- a/src/server/scripts/Outland/zone_blades_edge_mountains.cpp +++ b/src/server/scripts/Outland/zone_blades_edge_mountains.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -132,8 +132,9 @@ public: void JustDied(Unit* killer) OVERRIDE { - if (killer->ToPlayer()->GetQuestRewardStatus(QUEST_INTO_THE_SOULGRINDER)) - Talk(SAY_DEATH); + if (killer->GetTypeId() == TYPEID_PLAYER) + if (killer->ToPlayer()->GetQuestRewardStatus(QUEST_INTO_THE_SOULGRINDER)) + Talk(SAY_DEATH); } void MoveInLineOfSight(Unit* who) OVERRIDE @@ -1124,7 +1125,10 @@ public: struct npc_oscillating_frequency_scanner_master_bunnyAI : public ScriptedAI { - npc_oscillating_frequency_scanner_master_bunnyAI(Creature* creature) : ScriptedAI(creature) { } + npc_oscillating_frequency_scanner_master_bunnyAI(Creature* creature) : ScriptedAI(creature) + { + playerGuid = 0; + } void Reset() OVERRIDE { diff --git a/src/server/scripts/Outland/zone_hellfire_peninsula.cpp b/src/server/scripts/Outland/zone_hellfire_peninsula.cpp index 5e70b7f9fc4..3736994e9a3 100644 --- a/src/server/scripts/Outland/zone_hellfire_peninsula.cpp +++ b/src/server/scripts/Outland/zone_hellfire_peninsula.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/zone_nagrand.cpp b/src/server/scripts/Outland/zone_nagrand.cpp index 4f30638d707..8d5c81d1c01 100644 --- a/src/server/scripts/Outland/zone_nagrand.cpp +++ b/src/server/scripts/Outland/zone_nagrand.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/zone_netherstorm.cpp b/src/server/scripts/Outland/zone_netherstorm.cpp index 64b0901b720..72e7332381b 100644 --- a/src/server/scripts/Outland/zone_netherstorm.cpp +++ b/src/server/scripts/Outland/zone_netherstorm.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/zone_shadowmoon_valley.cpp b/src/server/scripts/Outland/zone_shadowmoon_valley.cpp index 73f044be7e6..f0defe88083 100644 --- a/src/server/scripts/Outland/zone_shadowmoon_valley.cpp +++ b/src/server/scripts/Outland/zone_shadowmoon_valley.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/zone_shattrath_city.cpp b/src/server/scripts/Outland/zone_shattrath_city.cpp index bb595d82a34..a5cdb600311 100644 --- a/src/server/scripts/Outland/zone_shattrath_city.cpp +++ b/src/server/scripts/Outland/zone_shattrath_city.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/zone_terokkar_forest.cpp b/src/server/scripts/Outland/zone_terokkar_forest.cpp index 261640f3379..3fb106e8cd8 100644 --- a/src/server/scripts/Outland/zone_terokkar_forest.cpp +++ b/src/server/scripts/Outland/zone_terokkar_forest.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Outland/zone_zangarmarsh.cpp b/src/server/scripts/Outland/zone_zangarmarsh.cpp index 7c8c81b3672..f8ef3d7c3bd 100644 --- a/src/server/scripts/Outland/zone_zangarmarsh.cpp +++ b/src/server/scripts/Outland/zone_zangarmarsh.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/Pet/CMakeLists.txt b/src/server/scripts/Pet/CMakeLists.txt index 87bbfd63c69..fce34098f41 100644 --- a/src/server/scripts/Pet/CMakeLists.txt +++ b/src/server/scripts/Pet/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> +# Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/src/server/scripts/Pet/pet_dk.cpp b/src/server/scripts/Pet/pet_dk.cpp index 31a6af2fc1c..61c3de0e6b1 100644 --- a/src/server/scripts/Pet/pet_dk.cpp +++ b/src/server/scripts/Pet/pet_dk.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -47,13 +47,14 @@ class npc_pet_dk_ebon_gargoyle : public CreatureScript void InitializeAI() OVERRIDE { + // Not needed to be despawned now + _despawnTimer = 0; + CasterAI::InitializeAI(); uint64 ownerGuid = me->GetOwnerGUID(); if (!ownerGuid) return; - // Not needed to be despawned now - _despawnTimer = 0; // Find victim of Summon Gargoyle spell std::list<Unit*> targets; Trinity::AnyUnfriendlyUnitInObjectRangeCheck u_check(me, me, 30.0f); diff --git a/src/server/scripts/Pet/pet_generic.cpp b/src/server/scripts/Pet/pet_generic.cpp index f59f850c20b..2a41b293967 100644 --- a/src/server/scripts/Pet/pet_generic.cpp +++ b/src/server/scripts/Pet/pet_generic.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Pet/pet_hunter.cpp b/src/server/scripts/Pet/pet_hunter.cpp index 80551be9131..8a0b78b5478 100644 --- a/src/server/scripts/Pet/pet_hunter.cpp +++ b/src/server/scripts/Pet/pet_hunter.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -25,9 +25,9 @@ enum HunterSpells { - SPELL_HUNTER_CRIPPLING_POISON = 30981, // Viper - SPELL_HUNTER_DEADLY_POISON = 34655, // Venomous Snake - SPELL_HUNTER_MIND_NUMBING_POISON = 25810 // Viper + SPELL_HUNTER_CRIPPLING_POISON = 30981, // Viper + SPELL_HUNTER_DEADLY_POISON_PASSIVE = 34657, // Venomous Snake + SPELL_HUNTER_MIND_NUMBING_POISON = 25810 // Viper }; enum HunterCreatures @@ -57,14 +57,17 @@ class npc_pet_hunter_snake_trap : public CreatureScript me->SetMaxHealth(uint32(107 * (me->getLevel() - 40) * 0.025f)); // Add delta to make them not all hit the same time uint32 delta = (rand() % 7) * 100; - me->SetStatFloatValue(UNIT_FIELD_BASEATTACKTIME, float(Info->baseattacktime + delta)); - me->SetStatFloatValue(UNIT_FIELD_RANGED_ATTACK_POWER, float(Info->attackpower)); + me->SetAttackTime(BASE_ATTACK, Info->baseattacktime + delta); + //me->SetStatFloatValue(UNIT_FIELD_RANGED_ATTACK_POWER, float(Info->attackpower)); // Start attacking attacker of owner on first ai update after spawn - move in line of sight may choose better target if (!me->GetVictim() && me->IsSummon()) if (Unit* Owner = me->ToTempSummon()->GetSummoner()) if (Owner->getAttackerForHelper()) AttackStart(Owner->getAttackerForHelper()); + + if (!_isViper) + DoCast(me, SPELL_HUNTER_DEADLY_POISON_PASSIVE, true); } // Redefined for random target selection: @@ -99,32 +102,19 @@ class npc_pet_hunter_snake_trap : public CreatureScript return; } - if (_spellTimer <= diff) + // Viper + if (_isViper) { - if (_isViper) // Viper + if (_spellTimer <= diff) { - if (urand(0, 2) == 0) //33% chance to cast - { - uint32 spell; - if (urand(0, 1) == 0) - spell = SPELL_HUNTER_MIND_NUMBING_POISON; - else - spell = SPELL_HUNTER_CRIPPLING_POISON; - - DoCastVictim(spell); - } + if (urand(0, 2) == 0) // 33% chance to cast + DoCastVictim(RAND(SPELL_HUNTER_MIND_NUMBING_POISON, SPELL_HUNTER_CRIPPLING_POISON)); _spellTimer = 3000; } - else // Venomous Snake - { - if (urand(0, 2) == 0) // 33% chance to cast - DoCastVictim(SPELL_HUNTER_DEADLY_POISON); - _spellTimer = 1500 + (rand() % 5) * 100; - } + else + _spellTimer -= diff; } - else - _spellTimer -= diff; DoMeleeAttackIfReady(); } diff --git a/src/server/scripts/Pet/pet_mage.cpp b/src/server/scripts/Pet/pet_mage.cpp index 7ac50f4313c..69e924c0d43 100644 --- a/src/server/scripts/Pet/pet_mage.cpp +++ b/src/server/scripts/Pet/pet_mage.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Pet/pet_priest.cpp b/src/server/scripts/Pet/pet_priest.cpp index 4b565aaec10..fc106a2a786 100644 --- a/src/server/scripts/Pet/pet_priest.cpp +++ b/src/server/scripts/Pet/pet_priest.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Pet/pet_shaman.cpp b/src/server/scripts/Pet/pet_shaman.cpp index 989d6f46327..03e6c55b109 100644 --- a/src/server/scripts/Pet/pet_shaman.cpp +++ b/src/server/scripts/Pet/pet_shaman.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Spells/CMakeLists.txt b/src/server/scripts/Spells/CMakeLists.txt index 077b4ccab5e..4e1d41b7261 100644 --- a/src/server/scripts/Spells/CMakeLists.txt +++ b/src/server/scripts/Spells/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> +# Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/src/server/scripts/Spells/spell_dk.cpp b/src/server/scripts/Spells/spell_dk.cpp index e78d690d3c0..e1ef9ea6862 100644 --- a/src/server/scripts/Spells/spell_dk.cpp +++ b/src/server/scripts/Spells/spell_dk.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -879,7 +879,7 @@ class spell_dk_presence : public SpellScriptLoader { Unit* target = GetTarget(); - if (GetSpellInfo()->Id == SPELL_DK_BLOOD_PRESENCE) + if (GetId() == SPELL_DK_BLOOD_PRESENCE) target->CastSpell(target, SPELL_DK_IMPROVED_BLOOD_PRESENCE_TRIGGERED, true); else if (AuraEffect const* impAurEff = target->GetAuraEffectOfRankedSpell(SPELL_DK_IMPROVED_BLOOD_PRESENCE_R1, EFFECT_0)) if (!target->HasAura(SPELL_DK_IMPROVED_BLOOD_PRESENCE_TRIGGERED)) @@ -890,7 +890,7 @@ class spell_dk_presence : public SpellScriptLoader { Unit* target = GetTarget(); - if (GetSpellInfo()->Id == SPELL_DK_FROST_PRESENCE) + if (GetId() == SPELL_DK_FROST_PRESENCE) target->CastSpell(target, SPELL_DK_FROST_PRESENCE_TRIGGERED, true); else if (AuraEffect const* impAurEff = target->GetAuraEffectOfRankedSpell(SPELL_DK_IMPROVED_FROST_PRESENCE_R1, EFFECT_0)) if (!target->HasAura(SPELL_DK_FROST_PRESENCE_TRIGGERED)) @@ -901,12 +901,12 @@ class spell_dk_presence : public SpellScriptLoader { Unit* target = GetTarget(); - if (GetSpellInfo()->Id == SPELL_DK_UNHOLY_PRESENCE) + if (GetId() == SPELL_DK_UNHOLY_PRESENCE) target->CastSpell(target, SPELL_DK_UNHOLY_PRESENCE_TRIGGERED, true); if (AuraEffect const* impAurEff = target->GetAuraEffectOfRankedSpell(SPELL_DK_IMPROVED_UNHOLY_PRESENCE_R1, EFFECT_0)) { - if (GetSpellInfo()->Id == SPELL_DK_UNHOLY_PRESENCE) + if (GetId() == SPELL_DK_UNHOLY_PRESENCE) { // Not listed as any effect, only base points set int32 bp = impAurEff->GetSpellInfo()->Effects[EFFECT_1].CalcValue(); diff --git a/src/server/scripts/Spells/spell_druid.cpp b/src/server/scripts/Spells/spell_druid.cpp index 61966ef8a8e..9fd43807fd5 100644 --- a/src/server/scripts/Spells/spell_druid.cpp +++ b/src/server/scripts/Spells/spell_druid.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp index f2c3473d8c6..3feb9821177 100644 --- a/src/server/scripts/Spells/spell_generic.cpp +++ b/src/server/scripts/Spells/spell_generic.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Spells/spell_holiday.cpp b/src/server/scripts/Spells/spell_holiday.cpp index 73db091eee1..bb84606dece 100644 --- a/src/server/scripts/Spells/spell_holiday.cpp +++ b/src/server/scripts/Spells/spell_holiday.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp index b93efe3b0f2..2f8a5daae84 100644 --- a/src/server/scripts/Spells/spell_hunter.cpp +++ b/src/server/scripts/Spells/spell_hunter.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp index 630485b0b88..8b3716f8f7d 100644 --- a/src/server/scripts/Spells/spell_item.cpp +++ b/src/server/scripts/Spells/spell_item.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Spells/spell_mage.cpp b/src/server/scripts/Spells/spell_mage.cpp index 680c2e35b35..ba59f701445 100644 --- a/src/server/scripts/Spells/spell_mage.cpp +++ b/src/server/scripts/Spells/spell_mage.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Spells/spell_paladin.cpp b/src/server/scripts/Spells/spell_paladin.cpp index 18d3e07d43b..0b790f01d29 100644 --- a/src/server/scripts/Spells/spell_paladin.cpp +++ b/src/server/scripts/Spells/spell_paladin.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Spells/spell_pet.cpp b/src/server/scripts/Spells/spell_pet.cpp index b3feac0f081..3d6853daf2c 100644 --- a/src/server/scripts/Spells/spell_pet.cpp +++ b/src/server/scripts/Spells/spell_pet.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Spells/spell_priest.cpp b/src/server/scripts/Spells/spell_priest.cpp index 0d3da30377a..4a702c7559c 100644 --- a/src/server/scripts/Spells/spell_priest.cpp +++ b/src/server/scripts/Spells/spell_priest.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp index cfb43e8a3f8..419a289aed4 100644 --- a/src/server/scripts/Spells/spell_quest.cpp +++ b/src/server/scripts/Spells/spell_quest.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Spells/spell_rogue.cpp b/src/server/scripts/Spells/spell_rogue.cpp index 6e88fb76c7e..4670117f0ea 100644 --- a/src/server/scripts/Spells/spell_rogue.cpp +++ b/src/server/scripts/Spells/spell_rogue.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Spells/spell_shaman.cpp b/src/server/scripts/Spells/spell_shaman.cpp index eb717315179..c8fa5b3f1fe 100644 --- a/src/server/scripts/Spells/spell_shaman.cpp +++ b/src/server/scripts/Spells/spell_shaman.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Spells/spell_warlock.cpp b/src/server/scripts/Spells/spell_warlock.cpp index 45518fcfef1..36e63b5a94e 100644 --- a/src/server/scripts/Spells/spell_warlock.cpp +++ b/src/server/scripts/Spells/spell_warlock.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Spells/spell_warrior.cpp b/src/server/scripts/Spells/spell_warrior.cpp index d022eef65b9..cafe510cc4f 100644 --- a/src/server/scripts/Spells/spell_warrior.cpp +++ b/src/server/scripts/Spells/spell_warrior.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/World/CMakeLists.txt b/src/server/scripts/World/CMakeLists.txt index c8fd16dca36..7d1b46732cf 100644 --- a/src/server/scripts/World/CMakeLists.txt +++ b/src/server/scripts/World/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> +# Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/src/server/scripts/World/achievement_scripts.cpp b/src/server/scripts/World/achievement_scripts.cpp index 40af44911ed..8ddfb0e9335 100644 --- a/src/server/scripts/World/achievement_scripts.cpp +++ b/src/server/scripts/World/achievement_scripts.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/World/areatrigger_scripts.cpp b/src/server/scripts/World/areatrigger_scripts.cpp index ac3ef5e59e5..d95c4f878fa 100644 --- a/src/server/scripts/World/areatrigger_scripts.cpp +++ b/src/server/scripts/World/areatrigger_scripts.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/World/boss_emerald_dragons.cpp b/src/server/scripts/World/boss_emerald_dragons.cpp index ca0083a1268..c74405628b5 100644 --- a/src/server/scripts/World/boss_emerald_dragons.cpp +++ b/src/server/scripts/World/boss_emerald_dragons.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/World/chat_log.cpp b/src/server/scripts/World/chat_log.cpp index 11fbeeca852..ef854246d20 100644 --- a/src/server/scripts/World/chat_log.cpp +++ b/src/server/scripts/World/chat_log.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/World/go_scripts.cpp b/src/server/scripts/World/go_scripts.cpp index 3a0c5b0dfd2..ddb4cc4c8d1 100644 --- a/src/server/scripts/World/go_scripts.cpp +++ b/src/server/scripts/World/go_scripts.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/World/guards.cpp b/src/server/scripts/World/guards.cpp index b629fd06b32..676eb7bd64f 100644 --- a/src/server/scripts/World/guards.cpp +++ b/src/server/scripts/World/guards.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/World/item_scripts.cpp b/src/server/scripts/World/item_scripts.cpp index 5b8e780e3d3..545ee9f4b43 100644 --- a/src/server/scripts/World/item_scripts.cpp +++ b/src/server/scripts/World/item_scripts.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/World/mob_generic_creature.cpp b/src/server/scripts/World/mob_generic_creature.cpp index 5cc9e68eb9b..19ea4f9b60b 100644 --- a/src/server/scripts/World/mob_generic_creature.cpp +++ b/src/server/scripts/World/mob_generic_creature.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/World/npc_innkeeper.cpp b/src/server/scripts/World/npc_innkeeper.cpp index 9c92dd0d27e..7a766fb9eb1 100644 --- a/src/server/scripts/World/npc_innkeeper.cpp +++ b/src/server/scripts/World/npc_innkeeper.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/World/npc_professions.cpp b/src/server/scripts/World/npc_professions.cpp index 8d0f917eb2f..5cbc54923e0 100644 --- a/src/server/scripts/World/npc_professions.cpp +++ b/src/server/scripts/World/npc_professions.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/World/npc_taxi.cpp b/src/server/scripts/World/npc_taxi.cpp index 08be2595c0e..730523c85f4 100644 --- a/src/server/scripts/World/npc_taxi.cpp +++ b/src/server/scripts/World/npc_taxi.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp index 44898d41f38..ac30f6f1e80 100644 --- a/src/server/scripts/World/npcs_special.cpp +++ b/src/server/scripts/World/npcs_special.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it @@ -34,7 +34,6 @@ npc_garments_of_quests 80% NPC's related to all Garments of-quests 5621, 56 npc_injured_patient 100% patients for triage-quests (6622 and 6624) npc_doctor 100% Gustaf Vanhowzen and Gregory Victor, quest 6622 and 6624 (Triage) npc_mount_vendor 100% Regular mount vendors all over the world. Display gossip if player doesn't meet the requirements to buy -npc_rogue_trainer 80% Scripted trainers, so they are able to offer item 17126 for class quest 6681 npc_sayge 100% Darkmoon event fortune teller, buff player based on answers given npc_snake_trap_serpents 80% AI for snakes that summoned by Snake Trap npc_shadowfiend 100% restore 5% of owner's mana when shadowfiend die from damage @@ -1239,86 +1238,6 @@ public: } }; -/*###### -## npc_rogue_trainer -######*/ - -#define GOSSIP_HELLO_ROGUE1 "I wish to unlearn my talents" -#define GOSSIP_HELLO_ROGUE2 "<Take the letter>" -#define GOSSIP_HELLO_ROGUE3 "Purchase a Dual Talent Specialization." - -class npc_rogue_trainer : public CreatureScript -{ -public: - npc_rogue_trainer() : CreatureScript("npc_rogue_trainer") { } - - bool OnGossipHello(Player* player, Creature* creature) OVERRIDE - { - if (creature->IsQuestGiver()) - player->PrepareQuestMenu(creature->GetGUID()); - - if (creature->IsTrainer()) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, GOSSIP_TEXT_TRAIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRAIN); - - if (player->getClass() == CLASS_ROGUE) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, GOSSIP_HELLO_ROGUE1, GOSSIP_SENDER_MAIN, GOSSIP_OPTION_UNLEARNTALENTS); - - if (player->GetSpecsCount() == 1 && player->getLevel() >= sWorld->getIntConfig(CONFIG_MIN_DUALSPEC_LEVEL)) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, GOSSIP_HELLO_ROGUE3, GOSSIP_SENDER_MAIN, GOSSIP_OPTION_LEARNDUALSPEC); - - if (player->getClass() == CLASS_ROGUE && player->getLevel() >= 24 && !player->HasItemCount(17126) && !player->GetQuestRewardStatus(6681)) - { - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HELLO_ROGUE2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - player->SEND_GOSSIP_MENU(5996, creature->GetGUID()); - } else - player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID()); - - return true; - } - - bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE - { - player->PlayerTalkClass->ClearMenus(); - switch (action) - { - case GOSSIP_ACTION_INFO_DEF + 1: - player->CLOSE_GOSSIP_MENU(); - player->CastSpell(player, 21100, false); - break; - case GOSSIP_ACTION_TRAIN: - player->GetSession()->SendTrainerList(creature->GetGUID()); - break; - case GOSSIP_OPTION_UNLEARNTALENTS: - player->CLOSE_GOSSIP_MENU(); - player->SendTalentWipeConfirm(creature->GetGUID()); - break; - case GOSSIP_OPTION_LEARNDUALSPEC: - if (player->GetSpecsCount() == 1 && !(player->getLevel() < sWorld->getIntConfig(CONFIG_MIN_DUALSPEC_LEVEL))) - { - if (!player->HasEnoughMoney(10000000)) - { - player->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, 0, 0, 0); - player->PlayerTalkClass->SendCloseGossip(); - break; - } - else - { - player->ModifyMoney(-10000000); - - // Cast spells that teach dual spec - // Both are also ImplicitTarget self and must be cast by player - player->CastSpell(player, 63680, true, NULL, NULL, player->GetGUID()); - player->CastSpell(player, 63624, true, NULL, NULL, player->GetGUID()); - - // Should show another Gossip text with "Congratulations..." - player->PlayerTalkClass->SendCloseGossip(); - } - } - break; - } - return true; - } -}; /*###### ## npc_sayge @@ -2445,7 +2364,6 @@ void AddSC_npcs_special() new npc_garments_of_quests(); new npc_guardian(); new npc_mount_vendor(); - new npc_rogue_trainer(); new npc_sayge(); new npc_steam_tonk(); new npc_tonk_mine(); diff --git a/src/server/shared/AutoPtr.h b/src/server/shared/AutoPtr.h index 621e0007f64..96ecbfc79fe 100644 --- a/src/server/shared/AutoPtr.h +++ b/src/server/shared/AutoPtr.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/shared/CMakeLists.txt b/src/server/shared/CMakeLists.txt index 4fc318f57eb..af113801067 100644 --- a/src/server/shared/CMakeLists.txt +++ b/src/server/shared/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> +# Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/src/server/shared/Common.cpp b/src/server/shared/Common.cpp index 28f987cf0b7..e45813b9d50 100644 --- a/src/server/shared/Common.cpp +++ b/src/server/shared/Common.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Common.h b/src/server/shared/Common.h index e3074ef45b9..5dea589da25 100644 --- a/src/server/shared/Common.h +++ b/src/server/shared/Common.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/CompilerDefs.h b/src/server/shared/CompilerDefs.h index 909dcd1707b..71b20a4d175 100644 --- a/src/server/shared/CompilerDefs.h +++ b/src/server/shared/CompilerDefs.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Configuration/Config.cpp b/src/server/shared/Configuration/Config.cpp index 055c33b40ee..3f8997e6d55 100644 --- a/src/server/shared/Configuration/Config.cpp +++ b/src/server/shared/Configuration/Config.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Configuration/Config.h b/src/server/shared/Configuration/Config.h index 49f5c5e07fb..4693b21a0c7 100644 --- a/src/server/shared/Configuration/Config.h +++ b/src/server/shared/Configuration/Config.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Containers.h b/src/server/shared/Containers.h index b33954d7ea4..d6ba98e4ed4 100644 --- a/src/server/shared/Containers.h +++ b/src/server/shared/Containers.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/shared/Cryptography/ARC4.cpp b/src/server/shared/Cryptography/ARC4.cpp index 6395ff99bfa..90f38d98d51 100644 --- a/src/server/shared/Cryptography/ARC4.cpp +++ b/src/server/shared/Cryptography/ARC4.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Cryptography/ARC4.h b/src/server/shared/Cryptography/ARC4.h index 0804971f696..5304b0730a6 100644 --- a/src/server/shared/Cryptography/ARC4.h +++ b/src/server/shared/Cryptography/ARC4.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Cryptography/Authentication/AuthCrypt.cpp b/src/server/shared/Cryptography/Authentication/AuthCrypt.cpp index 003c09e4589..ff94f307254 100644 --- a/src/server/shared/Cryptography/Authentication/AuthCrypt.cpp +++ b/src/server/shared/Cryptography/Authentication/AuthCrypt.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Cryptography/Authentication/AuthCrypt.h b/src/server/shared/Cryptography/Authentication/AuthCrypt.h index 95e773b586e..8fa150068a2 100644 --- a/src/server/shared/Cryptography/Authentication/AuthCrypt.h +++ b/src/server/shared/Cryptography/Authentication/AuthCrypt.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Cryptography/BigNumber.cpp b/src/server/shared/Cryptography/BigNumber.cpp index bfe92cd6051..1f3fc96e28d 100644 --- a/src/server/shared/Cryptography/BigNumber.cpp +++ b/src/server/shared/Cryptography/BigNumber.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Cryptography/BigNumber.h b/src/server/shared/Cryptography/BigNumber.h index 6129a24d1bc..dc553babec9 100644 --- a/src/server/shared/Cryptography/BigNumber.h +++ b/src/server/shared/Cryptography/BigNumber.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Cryptography/HMACSHA1.cpp b/src/server/shared/Cryptography/HMACSHA1.cpp index 2585fa64ea1..2148a3b8a7b 100644 --- a/src/server/shared/Cryptography/HMACSHA1.cpp +++ b/src/server/shared/Cryptography/HMACSHA1.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Cryptography/HMACSHA1.h b/src/server/shared/Cryptography/HMACSHA1.h index 04b8f7d0277..de1556d3c98 100644 --- a/src/server/shared/Cryptography/HMACSHA1.h +++ b/src/server/shared/Cryptography/HMACSHA1.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Cryptography/OpenSSLCrypto.cpp b/src/server/shared/Cryptography/OpenSSLCrypto.cpp index 417be813347..10ea595640a 100644 --- a/src/server/shared/Cryptography/OpenSSLCrypto.cpp +++ b/src/server/shared/Cryptography/OpenSSLCrypto.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/shared/Cryptography/OpenSSLCrypto.h b/src/server/shared/Cryptography/OpenSSLCrypto.h index 70071007c5f..26bd1357d39 100644 --- a/src/server/shared/Cryptography/OpenSSLCrypto.h +++ b/src/server/shared/Cryptography/OpenSSLCrypto.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/shared/Cryptography/SHA1.cpp b/src/server/shared/Cryptography/SHA1.cpp index 1f65c88a6f3..c89469bafb5 100644 --- a/src/server/shared/Cryptography/SHA1.cpp +++ b/src/server/shared/Cryptography/SHA1.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Cryptography/SHA1.h b/src/server/shared/Cryptography/SHA1.h index a4232f4e75f..2738d48931e 100644 --- a/src/server/shared/Cryptography/SHA1.h +++ b/src/server/shared/Cryptography/SHA1.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Cryptography/WardenKeyGeneration.h b/src/server/shared/Cryptography/WardenKeyGeneration.h index 6d5fd563ba3..11bc00d641a 100644 --- a/src/server/shared/Cryptography/WardenKeyGeneration.h +++ b/src/server/shared/Cryptography/WardenKeyGeneration.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/DataStores/DBCFileLoader.cpp b/src/server/shared/DataStores/DBCFileLoader.cpp index 3c02d5f533d..d027d7539ad 100644 --- a/src/server/shared/DataStores/DBCFileLoader.cpp +++ b/src/server/shared/DataStores/DBCFileLoader.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/DataStores/DBCFileLoader.h b/src/server/shared/DataStores/DBCFileLoader.h index 1f8768e5da4..c5194d20530 100644 --- a/src/server/shared/DataStores/DBCFileLoader.h +++ b/src/server/shared/DataStores/DBCFileLoader.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/DataStores/DBCStore.h b/src/server/shared/DataStores/DBCStore.h index ad13b2a02af..78f7bb28580 100644 --- a/src/server/shared/DataStores/DBCStore.h +++ b/src/server/shared/DataStores/DBCStore.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Database/AdhocStatement.cpp b/src/server/shared/Database/AdhocStatement.cpp index 23175cd2273..15732f20849 100644 --- a/src/server/shared/Database/AdhocStatement.cpp +++ b/src/server/shared/Database/AdhocStatement.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/shared/Database/AdhocStatement.h b/src/server/shared/Database/AdhocStatement.h index 7b41b43725c..44a9fa3d3ee 100644 --- a/src/server/shared/Database/AdhocStatement.h +++ b/src/server/shared/Database/AdhocStatement.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/shared/Database/DatabaseEnv.h b/src/server/shared/Database/DatabaseEnv.h index f45a468f617..d58fa81d608 100644 --- a/src/server/shared/Database/DatabaseEnv.h +++ b/src/server/shared/Database/DatabaseEnv.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Database/DatabaseWorker.cpp b/src/server/shared/Database/DatabaseWorker.cpp index 1333ba14632..3581f8e0211 100644 --- a/src/server/shared/Database/DatabaseWorker.cpp +++ b/src/server/shared/Database/DatabaseWorker.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/shared/Database/DatabaseWorker.h b/src/server/shared/Database/DatabaseWorker.h index 179806d29cb..14e92924ed2 100644 --- a/src/server/shared/Database/DatabaseWorker.h +++ b/src/server/shared/Database/DatabaseWorker.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/shared/Database/DatabaseWorkerPool.h b/src/server/shared/Database/DatabaseWorkerPool.h index 33075accc04..6c2e961d2ad 100644 --- a/src/server/shared/Database/DatabaseWorkerPool.h +++ b/src/server/shared/Database/DatabaseWorkerPool.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/shared/Database/Field.cpp b/src/server/shared/Database/Field.cpp index 87151f7a9be..866a96b58b6 100644 --- a/src/server/shared/Database/Field.cpp +++ b/src/server/shared/Database/Field.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/shared/Database/Field.h b/src/server/shared/Database/Field.h index 5460f5cc4f6..5f427a5871b 100644 --- a/src/server/shared/Database/Field.h +++ b/src/server/shared/Database/Field.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/shared/Database/Implementation/CharacterDatabase.cpp b/src/server/shared/Database/Implementation/CharacterDatabase.cpp index da99d6c3537..aa7c2e96fba 100644 --- a/src/server/shared/Database/Implementation/CharacterDatabase.cpp +++ b/src/server/shared/Database/Implementation/CharacterDatabase.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/shared/Database/Implementation/CharacterDatabase.h b/src/server/shared/Database/Implementation/CharacterDatabase.h index aa47fb53097..6768e4a197f 100644 --- a/src/server/shared/Database/Implementation/CharacterDatabase.h +++ b/src/server/shared/Database/Implementation/CharacterDatabase.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/shared/Database/Implementation/LoginDatabase.cpp b/src/server/shared/Database/Implementation/LoginDatabase.cpp index 4e876a8567b..de1e5b992e6 100644 --- a/src/server/shared/Database/Implementation/LoginDatabase.cpp +++ b/src/server/shared/Database/Implementation/LoginDatabase.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/shared/Database/Implementation/LoginDatabase.h b/src/server/shared/Database/Implementation/LoginDatabase.h index c9d34a26617..01f9fd973b6 100644 --- a/src/server/shared/Database/Implementation/LoginDatabase.h +++ b/src/server/shared/Database/Implementation/LoginDatabase.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/shared/Database/Implementation/WorldDatabase.cpp b/src/server/shared/Database/Implementation/WorldDatabase.cpp index f27ee2b72e0..644d3b330fb 100644 --- a/src/server/shared/Database/Implementation/WorldDatabase.cpp +++ b/src/server/shared/Database/Implementation/WorldDatabase.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/shared/Database/Implementation/WorldDatabase.h b/src/server/shared/Database/Implementation/WorldDatabase.h index 0126cdc3a80..a815373a1c6 100644 --- a/src/server/shared/Database/Implementation/WorldDatabase.h +++ b/src/server/shared/Database/Implementation/WorldDatabase.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/shared/Database/MySQLConnection.cpp b/src/server/shared/Database/MySQLConnection.cpp index f569b8352d3..55d47c76430 100644 --- a/src/server/shared/Database/MySQLConnection.cpp +++ b/src/server/shared/Database/MySQLConnection.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/shared/Database/MySQLConnection.h b/src/server/shared/Database/MySQLConnection.h index 656d7917315..161f459a7ad 100644 --- a/src/server/shared/Database/MySQLConnection.h +++ b/src/server/shared/Database/MySQLConnection.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/shared/Database/MySQLThreading.h b/src/server/shared/Database/MySQLThreading.h index 38c0d349a1c..0f6af8ace20 100644 --- a/src/server/shared/Database/MySQLThreading.h +++ b/src/server/shared/Database/MySQLThreading.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/shared/Database/PreparedStatement.cpp b/src/server/shared/Database/PreparedStatement.cpp index 30089cfb197..fe052bf5043 100644 --- a/src/server/shared/Database/PreparedStatement.cpp +++ b/src/server/shared/Database/PreparedStatement.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/shared/Database/PreparedStatement.h b/src/server/shared/Database/PreparedStatement.h index 2cab6e40de0..6a4d03bfb4d 100644 --- a/src/server/shared/Database/PreparedStatement.h +++ b/src/server/shared/Database/PreparedStatement.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/shared/Database/QueryHolder.cpp b/src/server/shared/Database/QueryHolder.cpp index 77980c4f66e..0c80f70acd2 100644 --- a/src/server/shared/Database/QueryHolder.cpp +++ b/src/server/shared/Database/QueryHolder.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/shared/Database/QueryHolder.h b/src/server/shared/Database/QueryHolder.h index 05c9e869290..b92b2e5327e 100644 --- a/src/server/shared/Database/QueryHolder.h +++ b/src/server/shared/Database/QueryHolder.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/shared/Database/QueryResult.cpp b/src/server/shared/Database/QueryResult.cpp index be81570318a..58ac8d37270 100644 --- a/src/server/shared/Database/QueryResult.cpp +++ b/src/server/shared/Database/QueryResult.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Database/QueryResult.h b/src/server/shared/Database/QueryResult.h index 1a721ce9e96..74320aeba19 100644 --- a/src/server/shared/Database/QueryResult.h +++ b/src/server/shared/Database/QueryResult.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Database/SQLOperation.h b/src/server/shared/Database/SQLOperation.h index d7870a7d22e..2c404c131ae 100644 --- a/src/server/shared/Database/SQLOperation.h +++ b/src/server/shared/Database/SQLOperation.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/shared/Database/Transaction.cpp b/src/server/shared/Database/Transaction.cpp index a1c900a51b9..2aadafa8f5d 100644 --- a/src/server/shared/Database/Transaction.cpp +++ b/src/server/shared/Database/Transaction.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/shared/Database/Transaction.h b/src/server/shared/Database/Transaction.h index e8e5a743a63..cb28f0ad876 100644 --- a/src/server/shared/Database/Transaction.h +++ b/src/server/shared/Database/Transaction.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/shared/Debugging/Errors.cpp b/src/server/shared/Debugging/Errors.cpp index 1bfe8c8e949..d656dc3fb4a 100644 --- a/src/server/shared/Debugging/Errors.cpp +++ b/src/server/shared/Debugging/Errors.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Debugging/Errors.h b/src/server/shared/Debugging/Errors.h index 2821ca504e7..7d521fefca0 100644 --- a/src/server/shared/Debugging/Errors.h +++ b/src/server/shared/Debugging/Errors.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Define.h b/src/server/shared/Define.h index d18f160aeaf..27973694818 100644 --- a/src/server/shared/Define.h +++ b/src/server/shared/Define.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Dynamic/FactoryHolder.h b/src/server/shared/Dynamic/FactoryHolder.h index cea8cb9c0bb..aee84ab151e 100644 --- a/src/server/shared/Dynamic/FactoryHolder.h +++ b/src/server/shared/Dynamic/FactoryHolder.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Dynamic/HashNamespace.h b/src/server/shared/Dynamic/HashNamespace.h index 88fa8c6f00e..0e95332c05f 100644 --- a/src/server/shared/Dynamic/HashNamespace.h +++ b/src/server/shared/Dynamic/HashNamespace.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Dynamic/LinkedList.h b/src/server/shared/Dynamic/LinkedList.h index c8a6a88e473..72d035c2cb6 100644 --- a/src/server/shared/Dynamic/LinkedList.h +++ b/src/server/shared/Dynamic/LinkedList.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Dynamic/LinkedReference/RefManager.h b/src/server/shared/Dynamic/LinkedReference/RefManager.h index e3a42b4bdc9..584066dde5c 100644 --- a/src/server/shared/Dynamic/LinkedReference/RefManager.h +++ b/src/server/shared/Dynamic/LinkedReference/RefManager.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Dynamic/LinkedReference/Reference.h b/src/server/shared/Dynamic/LinkedReference/Reference.h index 8604f3431e0..1ba41f1f454 100644 --- a/src/server/shared/Dynamic/LinkedReference/Reference.h +++ b/src/server/shared/Dynamic/LinkedReference/Reference.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Dynamic/ObjectRegistry.h b/src/server/shared/Dynamic/ObjectRegistry.h index 1b402eb3be1..4b17b2fc558 100644 --- a/src/server/shared/Dynamic/ObjectRegistry.h +++ b/src/server/shared/Dynamic/ObjectRegistry.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Dynamic/TypeContainer.h b/src/server/shared/Dynamic/TypeContainer.h index a99a448e0b8..5fe5c947dfe 100644 --- a/src/server/shared/Dynamic/TypeContainer.h +++ b/src/server/shared/Dynamic/TypeContainer.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Dynamic/TypeContainerFunctions.h b/src/server/shared/Dynamic/TypeContainerFunctions.h index 22f8be4ed5f..16701e1ab5a 100644 --- a/src/server/shared/Dynamic/TypeContainerFunctions.h +++ b/src/server/shared/Dynamic/TypeContainerFunctions.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Dynamic/TypeContainerVisitor.h b/src/server/shared/Dynamic/TypeContainerVisitor.h index 8ca3ee8dbc4..120d9880f03 100644 --- a/src/server/shared/Dynamic/TypeContainerVisitor.h +++ b/src/server/shared/Dynamic/TypeContainerVisitor.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Dynamic/TypeList.h b/src/server/shared/Dynamic/TypeList.h index f32a0ef1d64..c5dc1ee21a4 100644 --- a/src/server/shared/Dynamic/TypeList.h +++ b/src/server/shared/Dynamic/TypeList.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Dynamic/UnorderedMap.h b/src/server/shared/Dynamic/UnorderedMap.h index 701e7f339e2..f97c4830c75 100644 --- a/src/server/shared/Dynamic/UnorderedMap.h +++ b/src/server/shared/Dynamic/UnorderedMap.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Dynamic/UnorderedSet.h b/src/server/shared/Dynamic/UnorderedSet.h index 862358e7fe7..0e084698c47 100644 --- a/src/server/shared/Dynamic/UnorderedSet.h +++ b/src/server/shared/Dynamic/UnorderedSet.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Logging/Appender.cpp b/src/server/shared/Logging/Appender.cpp index 06aa6159014..718c3a406f1 100644 --- a/src/server/shared/Logging/Appender.cpp +++ b/src/server/shared/Logging/Appender.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/shared/Logging/Appender.h b/src/server/shared/Logging/Appender.h index 437c301ea6b..b373f0459c9 100644 --- a/src/server/shared/Logging/Appender.h +++ b/src/server/shared/Logging/Appender.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/shared/Logging/AppenderConsole.cpp b/src/server/shared/Logging/AppenderConsole.cpp index 78350029205..14d434e35b8 100644 --- a/src/server/shared/Logging/AppenderConsole.cpp +++ b/src/server/shared/Logging/AppenderConsole.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/shared/Logging/AppenderConsole.h b/src/server/shared/Logging/AppenderConsole.h index 6f3fcca901c..1aaa74e96ec 100644 --- a/src/server/shared/Logging/AppenderConsole.h +++ b/src/server/shared/Logging/AppenderConsole.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/shared/Logging/AppenderDB.cpp b/src/server/shared/Logging/AppenderDB.cpp index 204592720dc..d18a5ad8a50 100644 --- a/src/server/shared/Logging/AppenderDB.cpp +++ b/src/server/shared/Logging/AppenderDB.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/shared/Logging/AppenderDB.h b/src/server/shared/Logging/AppenderDB.h index f9dde0a1e82..660992261fd 100644 --- a/src/server/shared/Logging/AppenderDB.h +++ b/src/server/shared/Logging/AppenderDB.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/shared/Logging/AppenderFile.cpp b/src/server/shared/Logging/AppenderFile.cpp index d5410112b97..b9c2fd7339d 100644 --- a/src/server/shared/Logging/AppenderFile.cpp +++ b/src/server/shared/Logging/AppenderFile.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/shared/Logging/AppenderFile.h b/src/server/shared/Logging/AppenderFile.h index de94a46d692..1034b41f665 100644 --- a/src/server/shared/Logging/AppenderFile.h +++ b/src/server/shared/Logging/AppenderFile.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/shared/Logging/Log.cpp b/src/server/shared/Logging/Log.cpp index 08200af3c19..d7d70e7d4ea 100644 --- a/src/server/shared/Logging/Log.cpp +++ b/src/server/shared/Logging/Log.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2008 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Logging/Log.h b/src/server/shared/Logging/Log.h index 0eb54546aab..dcac93e5a60 100644 --- a/src/server/shared/Logging/Log.h +++ b/src/server/shared/Logging/Log.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Logging/LogOperation.cpp b/src/server/shared/Logging/LogOperation.cpp index f3d3649aa97..5f241d89712 100644 --- a/src/server/shared/Logging/LogOperation.cpp +++ b/src/server/shared/Logging/LogOperation.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/shared/Logging/LogOperation.h b/src/server/shared/Logging/LogOperation.h index 237f50de4ad..bd90da254a6 100644 --- a/src/server/shared/Logging/LogOperation.h +++ b/src/server/shared/Logging/LogOperation.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/shared/Logging/LogWorker.cpp b/src/server/shared/Logging/LogWorker.cpp index 857deb926fe..b0c82b614f4 100644 --- a/src/server/shared/Logging/LogWorker.cpp +++ b/src/server/shared/Logging/LogWorker.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/shared/Logging/LogWorker.h b/src/server/shared/Logging/LogWorker.h index 78571b596d7..25a57842e08 100644 --- a/src/server/shared/Logging/LogWorker.h +++ b/src/server/shared/Logging/LogWorker.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/shared/Logging/Logger.cpp b/src/server/shared/Logging/Logger.cpp index 6fff993e2ae..dae8edc6ca9 100644 --- a/src/server/shared/Logging/Logger.cpp +++ b/src/server/shared/Logging/Logger.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/shared/Logging/Logger.h b/src/server/shared/Logging/Logger.h index 24727ce1016..c7826f0615c 100644 --- a/src/server/shared/Logging/Logger.h +++ b/src/server/shared/Logging/Logger.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/shared/Packets/ByteBuffer.cpp b/src/server/shared/Packets/ByteBuffer.cpp index 8fba0fc23a4..b8cb5215665 100644 --- a/src/server/shared/Packets/ByteBuffer.cpp +++ b/src/server/shared/Packets/ByteBuffer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Packets/ByteBuffer.h b/src/server/shared/Packets/ByteBuffer.h index d2677538805..33d33519c8f 100644 --- a/src/server/shared/Packets/ByteBuffer.h +++ b/src/server/shared/Packets/ByteBuffer.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Packets/WorldPacket.h b/src/server/shared/Packets/WorldPacket.h index 7ec2b5d1e1e..6703c5ed2ea 100644 --- a/src/server/shared/Packets/WorldPacket.h +++ b/src/server/shared/Packets/WorldPacket.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/SystemConfig.h b/src/server/shared/SystemConfig.h index c3e54763ff0..dd5e9a2f90d 100644 --- a/src/server/shared/SystemConfig.h +++ b/src/server/shared/SystemConfig.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Threading/Callback.h b/src/server/shared/Threading/Callback.h index d4214cf0843..b074ff49c3c 100644 --- a/src/server/shared/Threading/Callback.h +++ b/src/server/shared/Threading/Callback.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/shared/Threading/LockedQueue.h b/src/server/shared/Threading/LockedQueue.h index d356d01606f..5709724c9a2 100644 --- a/src/server/shared/Threading/LockedQueue.h +++ b/src/server/shared/Threading/LockedQueue.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2008 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Threading/Threading.cpp b/src/server/shared/Threading/Threading.cpp index 1ed29d5106a..f67a985943a 100644 --- a/src/server/shared/Threading/Threading.cpp +++ b/src/server/shared/Threading/Threading.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2008 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Threading/Threading.h b/src/server/shared/Threading/Threading.h index 00be82c6555..9d416109e9f 100644 --- a/src/server/shared/Threading/Threading.h +++ b/src/server/shared/Threading/Threading.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2008 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Utilities/ByteConverter.h b/src/server/shared/Utilities/ByteConverter.h index b114f8915a4..bf1342a10e4 100644 --- a/src/server/shared/Utilities/ByteConverter.h +++ b/src/server/shared/Utilities/ByteConverter.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Utilities/EventProcessor.cpp b/src/server/shared/Utilities/EventProcessor.cpp index aeb67869882..fcae42cf27d 100644 --- a/src/server/shared/Utilities/EventProcessor.cpp +++ b/src/server/shared/Utilities/EventProcessor.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Utilities/EventProcessor.h b/src/server/shared/Utilities/EventProcessor.h index f341019395d..10ae6aa954c 100644 --- a/src/server/shared/Utilities/EventProcessor.h +++ b/src/server/shared/Utilities/EventProcessor.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -28,9 +28,9 @@ class BasicEvent { public: - BasicEvent() - { - to_Abort = false; + BasicEvent() + { + to_Abort = false; m_addTime = 0; m_execTime = 0; } diff --git a/src/server/shared/Utilities/ServiceWin32.cpp b/src/server/shared/Utilities/ServiceWin32.cpp index c50aca87c09..ec472b33f40 100644 --- a/src/server/shared/Utilities/ServiceWin32.cpp +++ b/src/server/shared/Utilities/ServiceWin32.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Utilities/ServiceWin32.h b/src/server/shared/Utilities/ServiceWin32.h index bc2917d4bcb..52223ccc7f6 100644 --- a/src/server/shared/Utilities/ServiceWin32.h +++ b/src/server/shared/Utilities/ServiceWin32.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Utilities/SignalHandler.h b/src/server/shared/Utilities/SignalHandler.h index 51bb9a4b27b..41e867c3d1a 100644 --- a/src/server/shared/Utilities/SignalHandler.h +++ b/src/server/shared/Utilities/SignalHandler.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Utilities/Timer.h b/src/server/shared/Utilities/Timer.h index b0b395865b4..c809a59c20f 100644 --- a/src/server/shared/Utilities/Timer.h +++ b/src/server/shared/Utilities/Timer.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Utilities/Util.cpp b/src/server/shared/Utilities/Util.cpp index 48012b6eea8..499ad0502b7 100644 --- a/src/server/shared/Utilities/Util.cpp +++ b/src/server/shared/Utilities/Util.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/shared/Utilities/Util.h b/src/server/shared/Utilities/Util.h index 30a6b27f186..b086a28134c 100644 --- a/src/server/shared/Utilities/Util.h +++ b/src/server/shared/Utilities/Util.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/worldserver/CMakeLists.txt b/src/server/worldserver/CMakeLists.txt index 99ea60ba76f..d1d2ef11848 100644 --- a/src/server/worldserver/CMakeLists.txt +++ b/src/server/worldserver/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> +# Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/src/server/worldserver/CommandLine/CliRunnable.cpp b/src/server/worldserver/CommandLine/CliRunnable.cpp index 218fe052cb3..ac46b218305 100644 --- a/src/server/worldserver/CommandLine/CliRunnable.cpp +++ b/src/server/worldserver/CommandLine/CliRunnable.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/worldserver/CommandLine/CliRunnable.h b/src/server/worldserver/CommandLine/CliRunnable.h index 6e608f60881..0306109ab54 100644 --- a/src/server/worldserver/CommandLine/CliRunnable.h +++ b/src/server/worldserver/CommandLine/CliRunnable.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/worldserver/Main.cpp b/src/server/worldserver/Main.cpp index a5f07c036c2..75d9ca5145d 100644 --- a/src/server/worldserver/Main.cpp +++ b/src/server/worldserver/Main.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/worldserver/Master.cpp b/src/server/worldserver/Master.cpp index eebf46f3831..f4b2b542de6 100644 --- a/src/server/worldserver/Master.cpp +++ b/src/server/worldserver/Master.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -86,8 +86,8 @@ private: uint32 _lastChange; uint32 _delaytime; public: - FreezeDetectorRunnable() - { + FreezeDetectorRunnable() + { _loops = 0; _lastChange = 0; _delaytime = 0; diff --git a/src/server/worldserver/Master.h b/src/server/worldserver/Master.h index 93b2387feec..9ee94a44acb 100644 --- a/src/server/worldserver/Master.h +++ b/src/server/worldserver/Master.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/worldserver/RemoteAccess/RARunnable.cpp b/src/server/worldserver/RemoteAccess/RARunnable.cpp index 424c3b9a5a6..44b07163294 100644 --- a/src/server/worldserver/RemoteAccess/RARunnable.cpp +++ b/src/server/worldserver/RemoteAccess/RARunnable.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/worldserver/RemoteAccess/RARunnable.h b/src/server/worldserver/RemoteAccess/RARunnable.h index a03e16e2154..052b532572e 100644 --- a/src/server/worldserver/RemoteAccess/RARunnable.h +++ b/src/server/worldserver/RemoteAccess/RARunnable.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/worldserver/RemoteAccess/RASocket.cpp b/src/server/worldserver/RemoteAccess/RASocket.cpp index 195b2992244..6e621ddfffe 100644 --- a/src/server/worldserver/RemoteAccess/RASocket.cpp +++ b/src/server/worldserver/RemoteAccess/RASocket.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/worldserver/RemoteAccess/RASocket.h b/src/server/worldserver/RemoteAccess/RASocket.h index add23198bde..ae201747010 100644 --- a/src/server/worldserver/RemoteAccess/RASocket.h +++ b/src/server/worldserver/RemoteAccess/RASocket.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/worldserver/TCSoap/TCSoap.cpp b/src/server/worldserver/TCSoap/TCSoap.cpp index c76298b0de9..1549019352d 100644 --- a/src/server/worldserver/TCSoap/TCSoap.cpp +++ b/src/server/worldserver/TCSoap/TCSoap.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/worldserver/TCSoap/TCSoap.h b/src/server/worldserver/TCSoap/TCSoap.h index ff2a49a4d7e..34a3b336464 100644 --- a/src/server/worldserver/TCSoap/TCSoap.h +++ b/src/server/worldserver/TCSoap/TCSoap.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/worldserver/WorldThread/WorldRunnable.cpp b/src/server/worldserver/WorldThread/WorldRunnable.cpp index 01208e3ef3a..476007f6ea0 100644 --- a/src/server/worldserver/WorldThread/WorldRunnable.cpp +++ b/src/server/worldserver/WorldThread/WorldRunnable.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/worldserver/WorldThread/WorldRunnable.h b/src/server/worldserver/WorldThread/WorldRunnable.h index 56a3b41eae7..563a6b03827 100644 --- a/src/server/worldserver/WorldThread/WorldRunnable.h +++ b/src/server/worldserver/WorldThread/WorldRunnable.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/server/worldserver/worldserver.conf.dist b/src/server/worldserver/worldserver.conf.dist index 4e594fc88c0..1e6d7d92ddc 100644 --- a/src/server/worldserver/worldserver.conf.dist +++ b/src/server/worldserver/worldserver.conf.dist @@ -138,7 +138,7 @@ WorldServerPort = 8085 # # BindIP -# Description: Bind world server to IP/hostname +# Description: Bind world server to IP/hostname. # Default: "0.0.0.0" - (Bind to all IPs on the system) BindIP = "0.0.0.0" @@ -152,7 +152,7 @@ BindIP = "0.0.0.0" # UseProcessors # Description: Processors mask for Windows and Linux based multi-processor systems. # Example: A computer with 2 CPUs: -# 1 - 1st CPU only, 2 - 2nd CPU only, 3 - 1st and 2nd CPU, because 1 | 2 is 3 +# 1 - 1st CPU only, 2 - 2nd CPU only, 3 - 1st and 2nd CPU, because 1 | 2 is 3 # Default: 0 - (Selected by OS) # 1+ - (Bit mask value of selected processors) @@ -169,7 +169,7 @@ ProcessPriority = 0 # # Compression -# Description: Compression level for client update packages +# Description: Compression level for client update packages. # Range: 1-9 # Default: 1 - (Speed) # 9 - (Best compression) @@ -275,7 +275,7 @@ PlayerSave.Stats.SaveOnlyOnLogout = 1 # # mmap.enablePathFinding -# Description: Enable/Disable pathfinding using mmaps - experimental +# Description: Enable/Disable pathfinding using mmaps - experimental. # Default: 0 - (Disabled) # 1 - (Enabled) @@ -395,7 +395,7 @@ PersistentCharacterCleanFlags = 0 # SERVER LOGGING # # PidFile -# Description: World daemon PID file +# Description: World daemon PID file. # Example: "./world.pid" - (Enabled) # Default: "" - (Disabled) @@ -440,7 +440,6 @@ ChatLogs.SysChan = 0 # Default: 0 - (Disabled) # 1 - (Enabled) - ChatLogs.Party = 0 # @@ -449,7 +448,6 @@ ChatLogs.Party = 0 # Default: 0 - (Disabled) # 1 - (Enabled) - ChatLogs.Raid = 0 # @@ -698,6 +696,7 @@ CharacterCreating.Disabled.ClassMask = 0 # Default: 50 CharactersPerAccount = 50 + # # CharactersPerRealm # Description: Limit number of characters per account on this realm. @@ -717,7 +716,7 @@ HeroicCharactersPerRealm = 1 # # CharacterCreating.MinLevelForHeroicCharacter # Description: Limit creating heroic characters only for account with another -# character of specific level (ignored for GM accounts) +# character of specific level (ignored for GM accounts). # Default: 55 - (Enabled, Requires at least another level 55 character) # 0 - (Disabled) # 1 - (Enabled, Requires at least another level 1 character) @@ -745,7 +744,7 @@ MaxPlayerLevel = 80 # # MinDualSpecLevel -# Description: Level requirement for Dual Talent Specialization +# Description: Level requirement for Dual Talent Specialization. # Default: 40 MinDualSpecLevel = 40 @@ -913,6 +912,7 @@ Instance.UnloadDelay = 1800000 # true - (Enabled, show) InstancesResetAnnounce = false + # # Quests.LowLevelHideDiff # Description: Level difference between player and quest level at which quests are @@ -1125,7 +1125,7 @@ DBC.EnforceItemAttributes = 1 # # AccountInstancesPerHour -# Description: Controls the max amount of different instances player can enter within hour +# Description: Controls the max amount of different instances player can enter within hour. # Default: 5 AccountInstancesPerHour = 5 @@ -1813,7 +1813,7 @@ Rate.Damage.Fall = 1 # Rate.Auction.Deposit # Rate.Auction.Cut # Description: Auction rates (auction time, deposit get at auction start, -# auction cut from price at auction end) +# auction cut from price at auction end). # Default: 1 - (Rate.Auction.Time) # 1 - (Rate.Auction.Deposit) # 1 - (Rate.Auction.Cut) @@ -2018,14 +2018,14 @@ Die.Command.Mode = 1 # STATS LIMITS # # Stats.Limits.Enable -# Description: Enable or disable stats system +# Description: Enable or disable stats system. # Default: 0 - Disabled Stats.Limits.Enable = 0 # # Stats.Limit.[STAT] -# Description: Set percentage limit for dodge, parry, block and crit rating +# Description: Set percentage limit for dodge, parry, block and crit rating. # Default: 95.0 (95%) Stats.Limits.Dodge = 95.0 @@ -2142,7 +2142,7 @@ Battleground.Random.ResetHour = 6 # Battleground.RewardWinnerArenaLast # Battleground.RewardLoserHonorFirst # Battleground.RewardLoserHonorLast -# Description: Random Battlegrounds / call to the arms rewards +# Description: Random Battlegrounds / call to the arms rewards. # Default: 30 - Battleground.RewardWinnerHonorFirst # 25 - Battleground.RewardWinnerArenaFirst # 15 - Battleground.RewardWinnerHonorLast @@ -2238,7 +2238,7 @@ Arena.RatingDiscardTimer = 600000 # # Arena.RatedUpdateTimer -# Description: Time (in milliseconds) between checks for matchups in rated arena +# Description: Time (in milliseconds) between checks for matchups in rated arena. # Default: 5000 - (5 seconds) Arena.RatedUpdateTimer = 5000 @@ -2392,7 +2392,7 @@ Ra.MinLevel = 3 # # SOAP.Enable -# Description: Enable soap service +# Description: Enable soap service. # Default: 0 - (Disabled) # 1 - (Enabled) @@ -2400,7 +2400,7 @@ SOAP.Enabled = 0 # # SOAP.IP -# Description: Bind SOAP service to IP/hostname +# Description: Bind SOAP service to IP/hostname. # Default: "127.0.0.1" - (Bind to localhost) SOAP.IP = "127.0.0.1" @@ -2554,7 +2554,7 @@ Guild.AllowMultipleGuildMaster = 0 # # ShowKickInWorld # Description: Determines whether a message is broadcasted to the entire server when a -# player gets kicked +# player gets kicked. # Default: 0 - (Disabled) # 1 - (Enabled) @@ -2569,6 +2569,7 @@ ShowKickInWorld = 0 # 0 - (Disabled) RecordUpdateTimeDiffInterval = 60000 + # # MinRecordUpdateTimeDiff # Description: Only record update time diff which is greater than this value. @@ -2628,8 +2629,8 @@ PlayerDump.DisallowOverwrite = 1 # # UI.ShowQuestLevelsInDialogs # Description: Show quest levels next to quest titles in UI dialogs -# Example: [13] Westfall Stew -# Default: 0 (do not show) +# Example: [13] Westfall Stew +# Default: 0 - (Do not show) UI.ShowQuestLevelsInDialogs = 0 @@ -2641,7 +2642,7 @@ UI.ShowQuestLevelsInDialogs = 0 # # Appender config values: Given a appender "name" # Appender.name -# Description: Defines 'where to log' +# Description: Defines 'where to log'. # Format: Type,LogLevel,Flags,optional1,optional2,optional3 # # Type @@ -2789,18 +2790,18 @@ Log.Async.Enable = 0 # # PacketSpoof.Policy # Description: Determines the course of action when packet spoofing is detected. -# Default: 1 - Log + kick -# 0 - Log only ("network") -# 2 - Log + kick + ban +# Default: 1 - (Log + kick) +# 0 - (Log only 'network') +# 2 - (Log + kick + ban) PacketSpoof.Policy = 1 # # PacketSpoof.BanMode # Description: If PacketSpoof.Policy equals 2, this will determine the ban mode. -# Note: Banning by character not supported for logical reasons. -# Default: 0 - Ban Account -# 2 - Ban IP +# Note: Banning by character not supported for logical reasons. +# Default: 0 - Ban Account +# 2 - Ban IP # PacketSpoof.BanMode = 0 diff --git a/src/server/worldserver/worldserver.rc b/src/server/worldserver/worldserver.rc index c2e5d5e168e..104d9b162df 100644 --- a/src/server/worldserver/worldserver.rc +++ b/src/server/worldserver/worldserver.rc @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/tools/CMakeLists.txt b/src/tools/CMakeLists.txt index 3adccf105de..c2ea8a85926 100644 --- a/src/tools/CMakeLists.txt +++ b/src/tools/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> +# Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/src/tools/map_extractor/CMakeLists.txt b/src/tools/map_extractor/CMakeLists.txt index ea073456680..f05424d6bbe 100644 --- a/src/tools/map_extractor/CMakeLists.txt +++ b/src/tools/map_extractor/CMakeLists.txt @@ -1,5 +1,5 @@ # Copyright (C) 2005-2009 MaNGOS project <http://getmangos.com/> -# Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> +# Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/src/tools/map_extractor/System.cpp b/src/tools/map_extractor/System.cpp index 3dd311c2da5..ca04e5a2081 100644 --- a/src/tools/map_extractor/System.cpp +++ b/src/tools/map_extractor/System.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/tools/map_extractor/adt.cpp b/src/tools/map_extractor/adt.cpp index 04d1ea9aa45..095f598501a 100644 --- a/src/tools/map_extractor/adt.cpp +++ b/src/tools/map_extractor/adt.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/tools/map_extractor/adt.h b/src/tools/map_extractor/adt.h index 46a517f3e84..5cb45d488d5 100644 --- a/src/tools/map_extractor/adt.h +++ b/src/tools/map_extractor/adt.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it @@ -255,7 +255,7 @@ public: if (h->offsData2a) return *((uint64 *)((uint8*)this + 8 + h->offsData2a)); else - return 0xFFFFFFFFFFFFFFFFLL; + return 0xFFFFFFFFFFFFFFFFuLL; } }; diff --git a/src/tools/map_extractor/dbcfile.cpp b/src/tools/map_extractor/dbcfile.cpp index 0a1aa6a8341..653b48ff949 100644 --- a/src/tools/map_extractor/dbcfile.cpp +++ b/src/tools/map_extractor/dbcfile.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/tools/map_extractor/dbcfile.h b/src/tools/map_extractor/dbcfile.h index 8c519a1b745..526c553e0f0 100644 --- a/src/tools/map_extractor/dbcfile.h +++ b/src/tools/map_extractor/dbcfile.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/tools/map_extractor/loadlib.cpp b/src/tools/map_extractor/loadlib.cpp index 6b103c282b5..ebe1bd61b65 100644 --- a/src/tools/map_extractor/loadlib.cpp +++ b/src/tools/map_extractor/loadlib.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/tools/map_extractor/loadlib/loadlib.h b/src/tools/map_extractor/loadlib/loadlib.h index 7fc1f92728d..724c41ef3c9 100644 --- a/src/tools/map_extractor/loadlib/loadlib.h +++ b/src/tools/map_extractor/loadlib/loadlib.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/tools/map_extractor/mpq_libmpq.cpp b/src/tools/map_extractor/mpq_libmpq.cpp index 7f63cebc66e..df9eb78fc65 100644 --- a/src/tools/map_extractor/mpq_libmpq.cpp +++ b/src/tools/map_extractor/mpq_libmpq.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/tools/map_extractor/mpq_libmpq04.h b/src/tools/map_extractor/mpq_libmpq04.h index 95e87fd7a7a..76778c663a6 100644 --- a/src/tools/map_extractor/mpq_libmpq04.h +++ b/src/tools/map_extractor/mpq_libmpq04.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/tools/map_extractor/wdt.cpp b/src/tools/map_extractor/wdt.cpp index cc97c12371e..fbb0b78567b 100644 --- a/src/tools/map_extractor/wdt.cpp +++ b/src/tools/map_extractor/wdt.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/tools/map_extractor/wdt.h b/src/tools/map_extractor/wdt.h index 9d1ca50e6b9..a55598105b3 100644 --- a/src/tools/map_extractor/wdt.h +++ b/src/tools/map_extractor/wdt.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/tools/mesh_extractor/ADT.cpp b/src/tools/mesh_extractor/ADT.cpp index a32276f9856..a55bdd5e4bb 100644 --- a/src/tools/mesh_extractor/ADT.cpp +++ b/src/tools/mesh_extractor/ADT.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/tools/mesh_extractor/ADT.h b/src/tools/mesh_extractor/ADT.h index e5d27708bfc..ac16b7278ed 100644 --- a/src/tools/mesh_extractor/ADT.h +++ b/src/tools/mesh_extractor/ADT.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/tools/mesh_extractor/CMakeLists.txt b/src/tools/mesh_extractor/CMakeLists.txt index 9ed8472051d..99fa136fccb 100644 --- a/src/tools/mesh_extractor/CMakeLists.txt +++ b/src/tools/mesh_extractor/CMakeLists.txt @@ -1,5 +1,5 @@ # Copyright (C) 2005-2009 MaNGOS project <http://getmangos.com/> -# Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> +# Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/src/tools/mesh_extractor/Cache.h b/src/tools/mesh_extractor/Cache.h index 017b4c53f72..5d8c02252c9 100644 --- a/src/tools/mesh_extractor/Cache.h +++ b/src/tools/mesh_extractor/Cache.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/tools/mesh_extractor/Chunk.cpp b/src/tools/mesh_extractor/Chunk.cpp index 42eb9e14881..e4b2f60ff99 100644 --- a/src/tools/mesh_extractor/Chunk.cpp +++ b/src/tools/mesh_extractor/Chunk.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/tools/mesh_extractor/Chunk.h b/src/tools/mesh_extractor/Chunk.h index 0641eb1dc3c..87201928435 100644 --- a/src/tools/mesh_extractor/Chunk.h +++ b/src/tools/mesh_extractor/Chunk.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/tools/mesh_extractor/ChunkedData.cpp b/src/tools/mesh_extractor/ChunkedData.cpp index 1330e4b47f9..ae7827d98ea 100644 --- a/src/tools/mesh_extractor/ChunkedData.cpp +++ b/src/tools/mesh_extractor/ChunkedData.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/tools/mesh_extractor/ChunkedData.h b/src/tools/mesh_extractor/ChunkedData.h index 5befdf30dd1..48bb61f6959 100644 --- a/src/tools/mesh_extractor/ChunkedData.h +++ b/src/tools/mesh_extractor/ChunkedData.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/tools/mesh_extractor/Constants.h b/src/tools/mesh_extractor/Constants.h index 5a89be9fe9c..75e08bcf6fd 100644 --- a/src/tools/mesh_extractor/Constants.h +++ b/src/tools/mesh_extractor/Constants.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/tools/mesh_extractor/ContinentBuilder.cpp b/src/tools/mesh_extractor/ContinentBuilder.cpp index 841d7a608e4..8f6a918ef8d 100644 --- a/src/tools/mesh_extractor/ContinentBuilder.cpp +++ b/src/tools/mesh_extractor/ContinentBuilder.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/tools/mesh_extractor/ContinentBuilder.h b/src/tools/mesh_extractor/ContinentBuilder.h index 5349b8e1ba5..7f0d23b0418 100644 --- a/src/tools/mesh_extractor/ContinentBuilder.h +++ b/src/tools/mesh_extractor/ContinentBuilder.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/tools/mesh_extractor/DBC.cpp b/src/tools/mesh_extractor/DBC.cpp index 9249e320563..d1b95076ecd 100644 --- a/src/tools/mesh_extractor/DBC.cpp +++ b/src/tools/mesh_extractor/DBC.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/tools/mesh_extractor/DBC.h b/src/tools/mesh_extractor/DBC.h index 0d3b85d8c78..d0951e36737 100644 --- a/src/tools/mesh_extractor/DBC.h +++ b/src/tools/mesh_extractor/DBC.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/tools/mesh_extractor/DoodadHandler.cpp b/src/tools/mesh_extractor/DoodadHandler.cpp index 2e0743134d4..d56ba4c3bdf 100644 --- a/src/tools/mesh_extractor/DoodadHandler.cpp +++ b/src/tools/mesh_extractor/DoodadHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/tools/mesh_extractor/DoodadHandler.h b/src/tools/mesh_extractor/DoodadHandler.h index c3a8d645016..3e179f63539 100644 --- a/src/tools/mesh_extractor/DoodadHandler.h +++ b/src/tools/mesh_extractor/DoodadHandler.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/tools/mesh_extractor/Geometry.cpp b/src/tools/mesh_extractor/Geometry.cpp index 0c7b7a492c5..e81dd8a7660 100644 --- a/src/tools/mesh_extractor/Geometry.cpp +++ b/src/tools/mesh_extractor/Geometry.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/tools/mesh_extractor/Geometry.h b/src/tools/mesh_extractor/Geometry.h index f2ea43e381e..d54cdbde5dd 100644 --- a/src/tools/mesh_extractor/Geometry.h +++ b/src/tools/mesh_extractor/Geometry.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/tools/mesh_extractor/LiquidHandler.cpp b/src/tools/mesh_extractor/LiquidHandler.cpp index eef36d8ea92..0a76dbfb54c 100644 --- a/src/tools/mesh_extractor/LiquidHandler.cpp +++ b/src/tools/mesh_extractor/LiquidHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/tools/mesh_extractor/LiquidHandler.h b/src/tools/mesh_extractor/LiquidHandler.h index c053b621088..424dbde7e63 100644 --- a/src/tools/mesh_extractor/LiquidHandler.h +++ b/src/tools/mesh_extractor/LiquidHandler.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/tools/mesh_extractor/MPQ.cpp b/src/tools/mesh_extractor/MPQ.cpp index 5a2957cac0b..b75a5bbdd85 100644 --- a/src/tools/mesh_extractor/MPQ.cpp +++ b/src/tools/mesh_extractor/MPQ.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/tools/mesh_extractor/MPQ.h b/src/tools/mesh_extractor/MPQ.h index 17dbe74dcaa..7eb048480b9 100644 --- a/src/tools/mesh_extractor/MPQ.h +++ b/src/tools/mesh_extractor/MPQ.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/tools/mesh_extractor/MPQManager.cpp b/src/tools/mesh_extractor/MPQManager.cpp index 8954da6c154..5f6e4a331ac 100644 --- a/src/tools/mesh_extractor/MPQManager.cpp +++ b/src/tools/mesh_extractor/MPQManager.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/tools/mesh_extractor/MPQManager.h b/src/tools/mesh_extractor/MPQManager.h index 6172237df49..588052bb844 100644 --- a/src/tools/mesh_extractor/MPQManager.h +++ b/src/tools/mesh_extractor/MPQManager.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/tools/mesh_extractor/MapChunk.cpp b/src/tools/mesh_extractor/MapChunk.cpp index 4cd5afad3f1..76280dcc973 100644 --- a/src/tools/mesh_extractor/MapChunk.cpp +++ b/src/tools/mesh_extractor/MapChunk.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/tools/mesh_extractor/MapChunk.h b/src/tools/mesh_extractor/MapChunk.h index 95bce9ffcd6..97adc790e94 100644 --- a/src/tools/mesh_extractor/MapChunk.h +++ b/src/tools/mesh_extractor/MapChunk.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/tools/mesh_extractor/MeshExtractor.cpp b/src/tools/mesh_extractor/MeshExtractor.cpp index e60e11b1db8..1926734ac72 100644 --- a/src/tools/mesh_extractor/MeshExtractor.cpp +++ b/src/tools/mesh_extractor/MeshExtractor.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/tools/mesh_extractor/Model.cpp b/src/tools/mesh_extractor/Model.cpp index 2a1a80f41eb..48c60d9d644 100644 --- a/src/tools/mesh_extractor/Model.cpp +++ b/src/tools/mesh_extractor/Model.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/tools/mesh_extractor/Model.h b/src/tools/mesh_extractor/Model.h index a1f224729dd..8f43b2963ea 100644 --- a/src/tools/mesh_extractor/Model.h +++ b/src/tools/mesh_extractor/Model.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/tools/mesh_extractor/ObjectDataHandler.cpp b/src/tools/mesh_extractor/ObjectDataHandler.cpp index 0e06a9f7e56..d8308fc25d0 100644 --- a/src/tools/mesh_extractor/ObjectDataHandler.cpp +++ b/src/tools/mesh_extractor/ObjectDataHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/tools/mesh_extractor/ObjectDataHandler.h b/src/tools/mesh_extractor/ObjectDataHandler.h index 3b18427db47..dc57301563a 100644 --- a/src/tools/mesh_extractor/ObjectDataHandler.h +++ b/src/tools/mesh_extractor/ObjectDataHandler.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/tools/mesh_extractor/TileBuilder.cpp b/src/tools/mesh_extractor/TileBuilder.cpp index 7b70ccca44c..768314e5101 100644 --- a/src/tools/mesh_extractor/TileBuilder.cpp +++ b/src/tools/mesh_extractor/TileBuilder.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/tools/mesh_extractor/TileBuilder.h b/src/tools/mesh_extractor/TileBuilder.h index fb8950c552b..b88966190b0 100644 --- a/src/tools/mesh_extractor/TileBuilder.h +++ b/src/tools/mesh_extractor/TileBuilder.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/tools/mesh_extractor/Utils.cpp b/src/tools/mesh_extractor/Utils.cpp index f82eb6ed1c8..704acf967ee 100644 --- a/src/tools/mesh_extractor/Utils.cpp +++ b/src/tools/mesh_extractor/Utils.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/tools/mesh_extractor/Utils.h b/src/tools/mesh_extractor/Utils.h index 612282f3e8f..267a32c27cd 100644 --- a/src/tools/mesh_extractor/Utils.h +++ b/src/tools/mesh_extractor/Utils.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/tools/mesh_extractor/WDT.cpp b/src/tools/mesh_extractor/WDT.cpp index 07aec95365e..593127e0d34 100644 --- a/src/tools/mesh_extractor/WDT.cpp +++ b/src/tools/mesh_extractor/WDT.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/tools/mesh_extractor/WDT.h b/src/tools/mesh_extractor/WDT.h index d1e8e30918d..55a1a9861ff 100644 --- a/src/tools/mesh_extractor/WDT.h +++ b/src/tools/mesh_extractor/WDT.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/tools/mesh_extractor/WorldModelGroup.cpp b/src/tools/mesh_extractor/WorldModelGroup.cpp index 6ea72d6edbe..9d32a096592 100644 --- a/src/tools/mesh_extractor/WorldModelGroup.cpp +++ b/src/tools/mesh_extractor/WorldModelGroup.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/tools/mesh_extractor/WorldModelGroup.h b/src/tools/mesh_extractor/WorldModelGroup.h index b3c2c2bd940..cf98dc8768a 100644 --- a/src/tools/mesh_extractor/WorldModelGroup.h +++ b/src/tools/mesh_extractor/WorldModelGroup.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/tools/mesh_extractor/WorldModelHandler.cpp b/src/tools/mesh_extractor/WorldModelHandler.cpp index 7c0acbc38e4..c272496c0a7 100644 --- a/src/tools/mesh_extractor/WorldModelHandler.cpp +++ b/src/tools/mesh_extractor/WorldModelHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/tools/mesh_extractor/WorldModelHandler.h b/src/tools/mesh_extractor/WorldModelHandler.h index dd030e4521f..972dda0f5d8 100644 --- a/src/tools/mesh_extractor/WorldModelHandler.h +++ b/src/tools/mesh_extractor/WorldModelHandler.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/tools/mesh_extractor/WorldModelRoot.cpp b/src/tools/mesh_extractor/WorldModelRoot.cpp index 4b6e4e189a4..d9bc4e550b3 100644 --- a/src/tools/mesh_extractor/WorldModelRoot.cpp +++ b/src/tools/mesh_extractor/WorldModelRoot.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/tools/mesh_extractor/WorldModelRoot.h b/src/tools/mesh_extractor/WorldModelRoot.h index c2303ceafe4..7fbc04d2b6d 100644 --- a/src/tools/mesh_extractor/WorldModelRoot.h +++ b/src/tools/mesh_extractor/WorldModelRoot.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/tools/mmaps_generator/CMakeLists.txt b/src/tools/mmaps_generator/CMakeLists.txt index b168691c994..591e0cc8e98 100644 --- a/src/tools/mmaps_generator/CMakeLists.txt +++ b/src/tools/mmaps_generator/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> +# Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/src/tools/mmaps_generator/IntermediateValues.cpp b/src/tools/mmaps_generator/IntermediateValues.cpp index a490273ad80..6c9abf719bb 100644 --- a/src/tools/mmaps_generator/IntermediateValues.cpp +++ b/src/tools/mmaps_generator/IntermediateValues.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/tools/mmaps_generator/IntermediateValues.h b/src/tools/mmaps_generator/IntermediateValues.h index 89a5c3ae4c2..5933c0137f1 100644 --- a/src/tools/mmaps_generator/IntermediateValues.h +++ b/src/tools/mmaps_generator/IntermediateValues.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/tools/mmaps_generator/MapBuilder.cpp b/src/tools/mmaps_generator/MapBuilder.cpp index 9c2dda51621..805926defa0 100644 --- a/src/tools/mmaps_generator/MapBuilder.cpp +++ b/src/tools/mmaps_generator/MapBuilder.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/tools/mmaps_generator/MapBuilder.h b/src/tools/mmaps_generator/MapBuilder.h index 6ab0b312af8..33f45a86549 100644 --- a/src/tools/mmaps_generator/MapBuilder.h +++ b/src/tools/mmaps_generator/MapBuilder.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/tools/mmaps_generator/PathCommon.h b/src/tools/mmaps_generator/PathCommon.h index 94a11e01730..a035bea3b6f 100644 --- a/src/tools/mmaps_generator/PathCommon.h +++ b/src/tools/mmaps_generator/PathCommon.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/tools/mmaps_generator/PathGenerator.cpp b/src/tools/mmaps_generator/PathGenerator.cpp index 8ccd04f4924..1df24cfa332 100644 --- a/src/tools/mmaps_generator/PathGenerator.cpp +++ b/src/tools/mmaps_generator/PathGenerator.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/tools/mmaps_generator/TerrainBuilder.cpp b/src/tools/mmaps_generator/TerrainBuilder.cpp index 5c76161c0d6..19112d84266 100644 --- a/src/tools/mmaps_generator/TerrainBuilder.cpp +++ b/src/tools/mmaps_generator/TerrainBuilder.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/tools/mmaps_generator/TerrainBuilder.h b/src/tools/mmaps_generator/TerrainBuilder.h index e9ff2a3c175..6ed88ff985f 100644 --- a/src/tools/mmaps_generator/TerrainBuilder.h +++ b/src/tools/mmaps_generator/TerrainBuilder.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/tools/mmaps_generator/VMapExtensions.cpp b/src/tools/mmaps_generator/VMapExtensions.cpp index 08929e5259d..d9437f8bdee 100644 --- a/src/tools/mmaps_generator/VMapExtensions.cpp +++ b/src/tools/mmaps_generator/VMapExtensions.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/tools/vmap4_assembler/CMakeLists.txt b/src/tools/vmap4_assembler/CMakeLists.txt index 8d455eae6ee..33e8188aee1 100644 --- a/src/tools/vmap4_assembler/CMakeLists.txt +++ b/src/tools/vmap4_assembler/CMakeLists.txt @@ -1,5 +1,5 @@ # Copyright (C) 2005-2009 MaNGOS project <http://getmangos.com/> -# Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> +# Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/src/tools/vmap4_assembler/VMapAssembler.cpp b/src/tools/vmap4_assembler/VMapAssembler.cpp index 56368e4a78d..445d5b791d1 100644 --- a/src/tools/vmap4_assembler/VMapAssembler.cpp +++ b/src/tools/vmap4_assembler/VMapAssembler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/tools/vmap4_extractor/CMakeLists.txt b/src/tools/vmap4_extractor/CMakeLists.txt index 023f5447f85..90d2c68977f 100644 --- a/src/tools/vmap4_extractor/CMakeLists.txt +++ b/src/tools/vmap4_extractor/CMakeLists.txt @@ -1,5 +1,5 @@ # Copyright (C) 2005-2009 MaNGOS project <http://getmangos.com/> -# Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> +# Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/src/tools/vmap4_extractor/adtfile.cpp b/src/tools/vmap4_extractor/adtfile.cpp index 82f26afbdc2..246b448380a 100644 --- a/src/tools/vmap4_extractor/adtfile.cpp +++ b/src/tools/vmap4_extractor/adtfile.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/tools/vmap4_extractor/adtfile.h b/src/tools/vmap4_extractor/adtfile.h index 88693659e52..aafcb46ce84 100644 --- a/src/tools/vmap4_extractor/adtfile.h +++ b/src/tools/vmap4_extractor/adtfile.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/tools/vmap4_extractor/dbcfile.cpp b/src/tools/vmap4_extractor/dbcfile.cpp index c96174bae59..66c5669b88b 100644 --- a/src/tools/vmap4_extractor/dbcfile.cpp +++ b/src/tools/vmap4_extractor/dbcfile.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/tools/vmap4_extractor/dbcfile.h b/src/tools/vmap4_extractor/dbcfile.h index 0e58c942919..7551de8594c 100644 --- a/src/tools/vmap4_extractor/dbcfile.h +++ b/src/tools/vmap4_extractor/dbcfile.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/tools/vmap4_extractor/gameobject_extract.cpp b/src/tools/vmap4_extractor/gameobject_extract.cpp index 73bd2f77d18..59871012ea5 100644 --- a/src/tools/vmap4_extractor/gameobject_extract.cpp +++ b/src/tools/vmap4_extractor/gameobject_extract.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/tools/vmap4_extractor/loadlib/loadlib.h b/src/tools/vmap4_extractor/loadlib/loadlib.h index 2d95cfb3bd1..1b44d13a9d3 100644 --- a/src/tools/vmap4_extractor/loadlib/loadlib.h +++ b/src/tools/vmap4_extractor/loadlib/loadlib.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/tools/vmap4_extractor/model.cpp b/src/tools/vmap4_extractor/model.cpp index 2a8417bafc1..825a2697c16 100644 --- a/src/tools/vmap4_extractor/model.cpp +++ b/src/tools/vmap4_extractor/model.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/tools/vmap4_extractor/model.h b/src/tools/vmap4_extractor/model.h index 66e42bd7947..a1766ed0bb2 100644 --- a/src/tools/vmap4_extractor/model.h +++ b/src/tools/vmap4_extractor/model.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/tools/vmap4_extractor/modelheaders.h b/src/tools/vmap4_extractor/modelheaders.h index e0a6c46ca17..b0d729dd238 100644 --- a/src/tools/vmap4_extractor/modelheaders.h +++ b/src/tools/vmap4_extractor/modelheaders.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/tools/vmap4_extractor/mpq_libmpq.cpp b/src/tools/vmap4_extractor/mpq_libmpq.cpp index b06470d3c80..265ae99528f 100644 --- a/src/tools/vmap4_extractor/mpq_libmpq.cpp +++ b/src/tools/vmap4_extractor/mpq_libmpq.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/tools/vmap4_extractor/mpq_libmpq04.h b/src/tools/vmap4_extractor/mpq_libmpq04.h index 87321912135..d045abe307a 100644 --- a/src/tools/vmap4_extractor/mpq_libmpq04.h +++ b/src/tools/vmap4_extractor/mpq_libmpq04.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/tools/vmap4_extractor/vec3d.h b/src/tools/vmap4_extractor/vec3d.h index 59150229ac7..b53b1003483 100644 --- a/src/tools/vmap4_extractor/vec3d.h +++ b/src/tools/vmap4_extractor/vec3d.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/tools/vmap4_extractor/vmapexport.cpp b/src/tools/vmap4_extractor/vmapexport.cpp index a5173638df4..b28ed84e105 100644 --- a/src/tools/vmap4_extractor/vmapexport.cpp +++ b/src/tools/vmap4_extractor/vmapexport.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/tools/vmap4_extractor/vmapexport.h b/src/tools/vmap4_extractor/vmapexport.h index e9436eb7d0d..e51938ea923 100644 --- a/src/tools/vmap4_extractor/vmapexport.h +++ b/src/tools/vmap4_extractor/vmapexport.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/tools/vmap4_extractor/wdtfile.cpp b/src/tools/vmap4_extractor/wdtfile.cpp index 87e63f201e6..20bee313e70 100644 --- a/src/tools/vmap4_extractor/wdtfile.cpp +++ b/src/tools/vmap4_extractor/wdtfile.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/tools/vmap4_extractor/wdtfile.h b/src/tools/vmap4_extractor/wdtfile.h index af0979e981b..8545fd67560 100644 --- a/src/tools/vmap4_extractor/wdtfile.h +++ b/src/tools/vmap4_extractor/wdtfile.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/tools/vmap4_extractor/wmo.cpp b/src/tools/vmap4_extractor/wmo.cpp index e4e66c682b3..8efdb899cab 100644 --- a/src/tools/vmap4_extractor/wmo.cpp +++ b/src/tools/vmap4_extractor/wmo.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it diff --git a/src/tools/vmap4_extractor/wmo.h b/src/tools/vmap4_extractor/wmo.h index 493c84f422f..0f1f0772bd3 100644 --- a/src/tools/vmap4_extractor/wmo.h +++ b/src/tools/vmap4_extractor/wmo.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it |