diff --git a/cmake/macros/FindBoost.cmake b/cmake/macros/FindBoost.cmake index 836b1b1c389..6d892da2112 100644 --- a/cmake/macros/FindBoost.cmake +++ b/cmake/macros/FindBoost.cmake @@ -482,7 +482,7 @@ else() # The user has not requested an exact version. Among known # versions, find those that are acceptable to the user request. set(_Boost_KNOWN_VERSIONS ${Boost_ADDITIONAL_VERSIONS} - "1.65.1" "1.65.0" "1.65" + "1.66.0" "1.66" "1.65.1" "1.65.0" "1.65" "1.64.0" "1.64" "1.63.0" "1.63" "1.62.0" "1.62" "1.61.0" "1.61" "1.60.0" "1.60" "1.59.0" "1.59" "1.58.0" "1.58" "1.57.0" "1.57" "1.56.0" "1.56" "1.55.0" "1.55" "1.54.0" "1.54" "1.53.0" "1.53" "1.52.0" "1.52" "1.51.0" "1.51" @@ -851,6 +851,25 @@ if(Boost_DEBUG) "_boost_DEBUG_ABI_TAG = ${_boost_DEBUG_ABI_TAG}") endif() +#TODO: fix this when CMake is updated +#====================== +# Systematically build up the Boost architecture and address model tag +# http://www.boost.org/doc/libs/1_66_0/more/getting_started/windows.html#library-naming +set( _boost_AAM_TAG "-x") +# Key Use this library when: +# 32 32-bit address model +# 64 64-bit address model +if(PLATFORM EQUAL 64) + set( _boost_AAM_TAG "${_boost_AAM_TAG}64") +else() + set( _boost_AAM_TAG "${_boost_AAM_TAG}32") +endif() + +if(Boost_DEBUG) + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "_boost_AAM_TAG = ${_boost_AAM_TAG}") +endif() + # ------------------------------------------------------------------------ # Begin finding boost libraries # ------------------------------------------------------------------------ @@ -991,10 +1010,12 @@ foreach(COMPONENT ${Boost_FIND_COMPONENTS}) unset(_boost_RELEASE_NAMES) foreach(compiler IN LISTS _boost_COMPILER) list(APPEND _boost_RELEASE_NAMES + ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}${_boost_AAM_TAG}-${Boost_LIB_VERSION} ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}-${Boost_LIB_VERSION} ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG} ) endforeach() list(APPEND _boost_RELEASE_NAMES + ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}${_boost_AAM_TAG}-${Boost_LIB_VERSION} ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}-${Boost_LIB_VERSION} ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG} ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT} ) @@ -1002,10 +1023,12 @@ foreach(COMPONENT ${Boost_FIND_COMPONENTS}) set(_boost_RELEASE_STATIC_ABI_TAG "-s${_boost_RELEASE_ABI_TAG}") foreach(compiler IN LISTS _boost_COMPILER) list(APPEND _boost_RELEASE_NAMES + ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}${_boost_AAM_TAG}-${Boost_LIB_VERSION} ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}-${Boost_LIB_VERSION} ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG} ) endforeach() list( APPEND _boost_RELEASE_NAMES + ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}${_boost_AAM_TAG}-${Boost_LIB_VERSION} ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}-${Boost_LIB_VERSION} ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG} ) endif() @@ -1033,10 +1056,12 @@ foreach(COMPONENT ${Boost_FIND_COMPONENTS}) unset(_boost_DEBUG_NAMES) foreach(compiler IN LISTS _boost_COMPILER) list(APPEND _boost_DEBUG_NAMES + ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}${_boost_AAM_TAG}-${Boost_LIB_VERSION} ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}-${Boost_LIB_VERSION} ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG} ) endforeach() - list(APPEND + list(APPEND _boost_DEBUG_NAMES + ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}${_boost_AAM_TAG}-${Boost_LIB_VERSION} ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}-${Boost_LIB_VERSION} ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG} ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED} @@ -1045,10 +1070,12 @@ foreach(COMPONENT ${Boost_FIND_COMPONENTS}) set(_boost_DEBUG_STATIC_ABI_TAG "-s${_boost_DEBUG_ABI_TAG}") foreach(compiler IN LISTS _boost_COMPILER) list(APPEND _boost_DEBUG_NAMES + ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}${_boost_AAM_TAG}-${Boost_LIB_VERSION} ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}-${Boost_LIB_VERSION} ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG} ) endforeach() list(APPEND _boost_DEBUG_NAMES + ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}${_boost_AAM_TAG}-${Boost_LIB_VERSION} ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}-${Boost_LIB_VERSION} ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG} ) endif() diff --git a/sql/updates/world/4.3.4/2017_12_19_00_world.sql b/sql/updates/world/4.3.4/2017_12_19_00_world.sql new file mode 100644 index 00000000000..0788aa230a2 --- /dev/null +++ b/sql/updates/world/4.3.4/2017_12_19_00_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `playercreateinfo_skills` SET `classMask`= `classMask`| 8 WHERE `skill`= 44; diff --git a/sql/updates/world/4.3.4/2017_12_19_01_world.sql b/sql/updates/world/4.3.4/2017_12_19_01_world.sql new file mode 100644 index 00000000000..1f995823f77 --- /dev/null +++ b/sql/updates/world/4.3.4/2017_12_19_01_world.sql @@ -0,0 +1,5 @@ +-- +DELETE FROM `spell_learn_spell` WHERE `entry`= 87840; +INSERT INTO `spell_learn_spell` (`entry`, `SpellID`, `Active`) VALUES +(87840, 33388, 1); +UPDATE `spell_bonus_data` SET `direct_bonus`= 0.654 WHERE `entry`= 133; diff --git a/sql/updates/world/4.3.4/2017_12_26_00_world_from_335_was_2017_12_19_00_world.sql b/sql/updates/world/4.3.4/2017_12_26_00_world_from_335_was_2017_12_19_00_world.sql new file mode 100644 index 00000000000..021d1e25d83 --- /dev/null +++ b/sql/updates/world/4.3.4/2017_12_26_00_world_from_335_was_2017_12_19_00_world.sql @@ -0,0 +1,2 @@ +-- The Shadow Labyrinth door Lever +UPDATE `gameobject_template_addon` SET `flags`=0 WHERE `entry` IN (183518); diff --git a/sql/updates/world/4.3.4/2017_12_26_01_world_from_335_was_2017_12_19_01_world.sql b/sql/updates/world/4.3.4/2017_12_26_01_world_from_335_was_2017_12_19_01_world.sql new file mode 100644 index 00000000000..79a25debf9f --- /dev/null +++ b/sql/updates/world/4.3.4/2017_12_26_01_world_from_335_was_2017_12_19_01_world.sql @@ -0,0 +1,5 @@ +-- +UPDATE `creature` SET `spawnMask`=3 WHERE `id` IN (18956,19511); +UPDATE `smart_scripts` SET `event_flags`=7 WHERE `entryorguid` IN (18956) AND `source_type`=0; +UPDATE `smart_scripts` SET `event_flags`=7 WHERE `entryorguid` IN (1895600) AND `source_type`=9; +UPDATE `gameobject` SET `spawnMask` = 3 WHERE `spawnMask` = 1 AND `id` IN (181278,181556,181557,181569,183051,182940,186633,185434,181275,184931,181276,181270,184956,184940,183296,183516,182942,182943,183036,183295,184941,183441) AND `map` NOT IN (530,548,568,571); diff --git a/sql/updates/world/4.3.4/2017_12_26_02_world_from_335_was_2017_12_20_01_world_335.sql b/sql/updates/world/4.3.4/2017_12_26_02_world_from_335_was_2017_12_20_01_world_335.sql new file mode 100644 index 00000000000..d24faaa61d4 --- /dev/null +++ b/sql/updates/world/4.3.4/2017_12_26_02_world_from_335_was_2017_12_20_01_world_335.sql @@ -0,0 +1,7 @@ +/* +-- +UPDATE `creature_template` SET `maxgold` = 1093073 WHERE `entry` = 36855; +UPDATE `creature_template` SET `mingold` = 1674308, `maxgold` = 2186146 WHERE `entry` = 38106; +UPDATE `creature_template` SET `mingold` = 1925454, `maxgold` = 2514068 WHERE `entry` = 38296; +UPDATE `creature_template` SET `mingold` = 2092885, `maxgold` = 2732683 WHERE `entry` = 38297; +*/ diff --git a/sql/updates/world/4.3.4/2017_12_26_03_world_from_335_was_2017_12_20_02_world_335.sql b/sql/updates/world/4.3.4/2017_12_26_03_world_from_335_was_2017_12_20_02_world_335.sql new file mode 100644 index 00000000000..77633df193b --- /dev/null +++ b/sql/updates/world/4.3.4/2017_12_26_03_world_from_335_was_2017_12_20_02_world_335.sql @@ -0,0 +1,15 @@ +/* +-- +UPDATE `creature_template` SET `maxgold` = 22960 WHERE `entry` = 36829; +UPDATE `creature_template` SET `mingold` = 36640, `maxgold` = 45920 WHERE `entry` = 38074; +UPDATE `creature_template` SET `maxgold` = 7536 WHERE `entry` = 37028; +UPDATE `creature_template` SET `mingold` = 9214, `maxgold` = 15072 WHERE `entry` = 38094; +UPDATE `creature_template` SET `maxgold` = 07510 WHERE `entry` = 37031; +UPDATE `creature_template` SET `mingold` = 10912, `maxgold` = 15020 WHERE `entry` = 38090; +UPDATE `creature_template` SET `maxgold` = 07665 WHERE `entry` = 37029; +UPDATE `creature_template` SET `mingold` = 9494, `maxgold` = 15330 WHERE `entry` = 38092; +UPDATE `creature_template` SET `maxgold` = 7599 WHERE `entry` = 37662; +UPDATE `creature_template` SET `mingold` = 6720, `maxgold` = 15198 WHERE `entry` = 38102; +UPDATE `creature_template` SET `maxgold` = 7617 WHERE `entry` = 36805; +UPDATE `creature_template` SET `mingold` = 5346, `maxgold` = 15234 WHERE `entry` = 38075; +*/ diff --git a/sql/updates/world/4.3.4/2017_12_26_04_world_from_335_was_2017_12_20_03_world_335.sql b/sql/updates/world/4.3.4/2017_12_26_04_world_from_335_was_2017_12_20_03_world_335.sql new file mode 100644 index 00000000000..405f73eebdf --- /dev/null +++ b/sql/updates/world/4.3.4/2017_12_26_04_world_from_335_was_2017_12_20_03_world_335.sql @@ -0,0 +1,28 @@ +/* +-- +UPDATE `creature_template` SET `mingold` = 15123, `maxgold` = 19760 WHERE `entry` = 37328; +UPDATE `creature_template` SET `mingold` = 15123, `maxgold` = 19760 WHERE `entry` = 37408; +UPDATE `creature_template` SET `mingold` = 13913, `maxgold` = 18179 WHERE `entry` = 32009; +UPDATE `creature_template` SET `mingold` = 13913, `maxgold` = 18179 WHERE `entry` = 32087; +UPDATE `creature_template` SET `mingold` = 17046, `maxgold` = 17046 WHERE `entry` = 29356; +UPDATE `creature_template` SET `mingold` = 9262, `maxgold` = 17664 WHERE `entry` = 29574; +UPDATE `creature_template` SET `mingold` = 3988, `maxgold` = 23564 WHERE `entry` = 38110; +UPDATE `creature_template` SET `mingold` = 1278, `maxgold` = 25596 WHERE `entry` = 30818; +UPDATE `creature_template` SET `mingold` = 1278, `maxgold` = 25592 WHERE `entry` = 30817; +UPDATE `creature_template` SET `mingold` = 1282, `maxgold` = 25644 WHERE `entry` = 30816; +UPDATE `creature_template` SET `mingold` = 43710, `maxgold` = 47060 WHERE `entry` = 31001; +UPDATE `creature_template` SET `mingold` = 45162, `maxgold` = 49068 WHERE `entry` = 31000; +UPDATE `creature_template` SET `mingold` = 5460, `maxgold` = 5460 WHERE `entry` = 32368; +UPDATE `creature_template` SET `mingold` = 6968, `maxgold` = 15324 WHERE `entry` = 34016; +UPDATE `creature_template` SET `mingold` = 4132, `maxgold` = 25116 WHERE `entry` = 38076; +UPDATE `creature_template` SET `mingold` = 141844, `maxgold` = 141844 WHERE `entry` = 38031; +UPDATE `creature_template` SET `mingold` = 4890, `maxgold` = 24368 WHERE `entry` = 38061; +UPDATE `creature_template` SET `mingold` = 9090, `maxgold` = 18374 WHERE `entry` = 38059; +UPDATE `creature_template` SET `mingold` = 542268, `maxgold` = 542268 WHERE `entry` = 38444; +UPDATE `creature_template` SET `mingold` = 6532, `maxgold` = 23044 WHERE `entry` = 38108; +UPDATE `creature_template` SET `mingold` = 4804, `maxgold` = 24334 WHERE `entry` = 38062; +UPDATE `creature_template` SET `mingold` = 4380, `maxgold` = 26180 WHERE `entry` = 38063; +UPDATE `creature_template` SET `mingold` = 570506, `maxgold` = 570506 WHERE `entry` = 38103; +UPDATE `creature_template` SET `mingold` = 13390, `maxgold` = 24210 WHERE `entry` = 38197; +UPDATE `creature_template` SET `mingold` = 650000, `maxgold` = 700000 WHERE `entry` = 35349; +*/ diff --git a/sql/updates/world/4.3.4/2017_12_26_05_world_from_335_was_2017_12_20_04_world.sql b/sql/updates/world/4.3.4/2017_12_26_05_world_from_335_was_2017_12_20_04_world.sql new file mode 100644 index 00000000000..fa60855d586 --- /dev/null +++ b/sql/updates/world/4.3.4/2017_12_26_05_world_from_335_was_2017_12_20_04_world.sql @@ -0,0 +1,11 @@ +-- +DELETE FROM `gameobject` WHERE `id`=64922 AND `guid`=189980; +DELETE FROM `gameobject_addon` WHERE `guid`=189980; +DELETE FROM `pool_gameobject` WHERE `pool_entry`=5217 ; +DELETE FROM `pool_creature` WHERE `guid`=134515 AND `pool_entry`=1047; +DELETE FROM `pool_template` WHERE `entry` IN (5217,5450,5506,5517,5608); +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(5450,1,"Icecrown node 3"), +(5506,1,"Icecrown node 59"), +(5517,1,"Icecrown node 70"), +(5608,1,"Icecrown node 161"); diff --git a/sql/updates/world/4.3.4/2017_12_26_06_world_from_335_was_2017_12_20_05_world.sql b/sql/updates/world/4.3.4/2017_12_26_06_world_from_335_was_2017_12_20_05_world.sql new file mode 100644 index 00000000000..96c3a51b727 --- /dev/null +++ b/sql/updates/world/4.3.4/2017_12_26_06_world_from_335_was_2017_12_20_05_world.sql @@ -0,0 +1,41 @@ +-- +-- Add script and waypoints to Draenei Artificer +SET @ENTRY := 17228; +SET @GUID := -82823; +SET @ACTIONLIST_0 := 8282300; +SET @ACTIONLIST_1 := 8282301; + +-- Remove emote from Draenei Artificer +DELETE FROM `creature_addon` WHERE `guid`=82823; +INSERT INTO `creature_addon` (`guid`, `emote`, `bytes2`) VALUES +(82823, 0, 4097); + +-- Add weapon to Draenei Artificer +DELETE FROM `creature_equip_template` WHERE `CreatureID`=@ENTRY AND `ID`=2; +INSERT INTO `creature_equip_template` (`CreatureID`, `ID`, `ItemID1`, `ItemID2`, `ItemID3`, `VerifiedBuild`) VALUES (@ENTRY, 2, 2530, 0, 0, 18019); + +DELETE FROM `waypoints` WHERE `entry`=@ENTRY; +INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES +(@ENTRY, 1, -4189.97, -12460.97, 45.227, 'Draenei Artificer'), +(@ENTRY, 2, -4191.24, -12456.74, 45.444, 'Draenei Artificer'), +(@ENTRY, 3, -4192.75, -12453.75, 45.635, 'Draenei Artificer'), +(@ENTRY, 4, -4191.24, -12456.74, 45.444, 'Draenei Artificer'), +(@ENTRY, 5, -4189.97, -12460.97, 45.227, 'Draenei Artificer'), +(@ENTRY, 6, -4191.44, -12464.07, 45.340, 'Draenei Artificer'); + +-- Add SAI to Draenei Artificer + Actionlist 00/01 +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@GUID, @ACTIONLIST_0, @ACTIONLIST_1) AND `source_type` IN (0, 9); +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@GUID,0,0,0,40,0,100,0,3,@ENTRY,0,0,80,@ACTIONLIST_0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Draenei Artificer - On Waypoint 3 Reached - Run Script"), +(@GUID,0,1,0,40,0,100,0,6,@ENTRY,0,0,80,@ACTIONLIST_1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Draenei Artificer - On Waypoint 6 Reached - Run Script"), +(@GUID,0,2,0,1,0,100,0,0,0,130000,130000,53,0,@ENTRY,1,0,0,2,1,0,0,0,0,0,0,0,"Draenei Artificer - Out of Combat - Start Waypoint"), +(@ACTIONLIST_0,9,0,0,0,0,100,0,0,0,0,0,54,60000,0,0,0,0,0,0,0,0,0,0,0,0,0,"Draenei Artificer - On Script - Pause Waypoint"), +(@ACTIONLIST_0,9,1,0,0,0,100,0,1000,1000,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,0.8356,"Draenei Artificer - On Script - Set Orientation 0,8356"), +(@ACTIONLIST_0,9,2,0,0,0,100,0,1500,1500,0,0,71,2,1,0,0,0,0,1,0,0,0,0,0,0,0,"Draenei Artificer - On Script - Change Equipment"), +(@ACTIONLIST_0,9,3,0,0,0,100,0,2000,2000,0,0,17,234,0,0,0,0,0,1,0,0,0,0,0,0,0,"Draenei Artificer - On Script - Set Emote State 234"), +(@ACTIONLIST_0,9,4,0,0,0,100,0,55000,55000,0,0,17,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Draenei Artificer - On Script - Set Emote State 0"), +(@ACTIONLIST_1,9,0,0,0,0,100,0,0,0,0,0,54,60000,0,0,0,0,0,1,0,0,0,0,0,0,0,"Draenei Artificer - On Script - Pause Waypoint"), +(@ACTIONLIST_1,9,1,0,0,0,100,0,1000,1000,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,3.8398,"Draenei Artificer - On Script - Set Orientation 3,8398"), +(@ACTIONLIST_1,9,3,0,0,0,100,0,1500,1500,0,0,71,1,1,0,0,0,0,1,0,0,0,0,0,0,0,"Draenei Artificer - On Script - Change Equipment"), +(@ACTIONLIST_1,9,4,0,0,0,100,0,2000,2000,0,0,17,234,0,0,0,0,0,1,0,0,0,0,0,0,0,"Draenei Artificer - On Script - Set Emote State 234"), +(@ACTIONLIST_1,9,5,0,0,0,100,0,55000,55000,0,0,17,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Draenei Artificer - On Script - Set Emote State 0"); diff --git a/sql/updates/world/4.3.4/2017_12_26_07_world_from_335_was_2017_12_21_00_world.sql b/sql/updates/world/4.3.4/2017_12_26_07_world_from_335_was_2017_12_21_00_world.sql new file mode 100644 index 00000000000..f1763e34575 --- /dev/null +++ b/sql/updates/world/4.3.4/2017_12_26_07_world_from_335_was_2017_12_21_00_world.sql @@ -0,0 +1,5 @@ +UPDATE `creature_template` SET `mechanic_immune_mask` = `mechanic_immune_mask`|33554432 WHERE `entry` IN +(36626,37504,37505,37506, -- Festergut +39863,39864,39944,39945, -- Halion (normal) +40142,40143,40144,40145, -- Halion (twilight) +34797,35447,35448,35449); -- Icehowl diff --git a/sql/updates/world/4.3.4/2017_12_26_08_world_from_335_was_2017_12_21_01_world.sql b/sql/updates/world/4.3.4/2017_12_26_08_world_from_335_was_2017_12_21_01_world.sql new file mode 100644 index 00000000000..f11c3d35d86 --- /dev/null +++ b/sql/updates/world/4.3.4/2017_12_26_08_world_from_335_was_2017_12_21_01_world.sql @@ -0,0 +1,18 @@ +SET @CGUID:= 16806; -- 1 guid +SET @GGUID:= 1577; -- 2 guids + +DELETE FROM `creature` WHERE `guid` = @CGUID; +INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `ScriptName`, `VerifiedBuild`) VALUES +(@CGUID, 16031, 329, 0, 0, 1, 1, 0, 0, 4044.78, -3333.68, 117.26, 4.153883, 7200, 0, 0, 4120, 0, 0, 0, 0, 0, '', 0); + +DELETE FROM `gameobject` WHERE `guid` IN (@GGUID + 0, @GGUID + 1); +INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `ScriptName`, `VerifiedBuild`) VALUES +(@GGUID + 0, 181071, 329, 2017, 2017, 1, 1, 4044.34, -3334.217, 115.0604, 2.740162, -0, -0, 0.9799242, 0.1993704, 300, 255, 1, '', 0), +(@GGUID + 1, 181072, 329, 2017, 2017, 1, 1, 4039.52, -3331.85, 115.061, 1.169369, -0, -0, 0.5519361, 0.8338864, 300, 255, 1, '', 0); + +DELETE FROM `spell_script_names` WHERE `ScriptName` = "spell_ysida_saved_credit"; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(31912, "spell_ysida_saved_credit"); + +UPDATE `creature_template` SET `npcflag` = `npcflag` & ~2, `AIName` = "" WHERE `entry` = 16031; +DELETE FROM `smart_scripts` WHERE `entryorguid` = 16031; diff --git a/sql/updates/world/4.3.4/2017_12_26_09_world_from_335_was_2017_12_21_02_world.sql b/sql/updates/world/4.3.4/2017_12_26_09_world_from_335_was_2017_12_21_02_world.sql new file mode 100644 index 00000000000..b7fece8a3cb --- /dev/null +++ b/sql/updates/world/4.3.4/2017_12_26_09_world_from_335_was_2017_12_21_02_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature_template` SET `npcflag` = `npcflag` | 2 WHERE `entry` = 16031; diff --git a/sql/updates/world/4.3.4/2017_12_26_10_world_from_335_was_2017_12_22_00_world.sql b/sql/updates/world/4.3.4/2017_12_26_10_world_from_335_was_2017_12_22_00_world.sql new file mode 100644 index 00000000000..9f671922aeb --- /dev/null +++ b/sql/updates/world/4.3.4/2017_12_26_10_world_from_335_was_2017_12_22_00_world.sql @@ -0,0 +1,18 @@ +-- Quest "The Emitter" +DELETE FROM `smart_scripts` WHERE `entryorguid`=1707100 AND `source_type`=9; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(1707100,9,0,0,0,0,100,0,0,0,0,0,9,0,0,0,0,0,0,20,181286,0,0,0,0,0,0,"Technician Zhanaa - On Script - Activate Gameobject"), +(1707100,9,1,0,0,0,100,0,0,0,0,0,12,16550,1,39000,0,0,0,8,0,0,0,-4187.71,-13738.7,75.6549,1.85005,"Technician Zhanaa - On Script - Summon Creature 'Image of Technician Dyvuun'"), +(1707100,9,2,0,0,0,100,0,0,0,0,0,64,2,0,0,0,0,0,7,0,0,0,0,0,0,0,"Technician Zhanaa - On Script - Store Targetlist"), +(1707100,9,3,0,0,0,100,0,1000,1000,0,0,100,2,0,0,0,0,0,19,16550,10,0,0,0,0,0,"Technician Zhanaa - On Script - Send Target 2"), +(1707100,9,4,0,0,0,100,0,1000,1000,0,0,45,0,1,0,0,0,0,19,16550,10,0,0,0,0,0,"Technician Zhanaa - On Script - Set Data 0 1"), +(1707100,9,5,0,0,0,100,0,1000,1000,0,0,66,0,0,0,0,0,0,19,16550,10,0,0,0,0,0,"Technician Zhanaa - On Script - Set Orientation Closest Creature 'Image of Technician Dyvuun'"), +(1707100,9,6,0,0,0,100,0,2000,2000,0,0,5,70,0,0,0,0,0,1,0,0,0,0,0,0,0,"Technician Zhanaa - On Script - Play Emote 70"), +(1707100,9,7,0,0,0,100,0,19000,19000,0,0,59,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Technician Zhanaa - On Script - Set Run Off"), +(1707100,9,8,0,0,0,100,0,1000,1000,0,0,69,0,0,0,0,0,0,8,0,0,0,-4186.67,-13736.3,74.4813,0,"Technician Zhanaa - On Script - Move to Position"), +(1707100,9,9,0,0,0,100,0,3000,3000,0,0,17,133,0,0,0,0,0,1,0,0,0,0,0,0,0,"Technician Zhanaa - On Script - Set Emote State 133"), +(1707100,9,11,0,0,0,100,0,16000,16000,0,0,66,0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Technician Zhanaa - On Script - Set Orientation Invoker"), +(1707100,9,12,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Technician Zhanaa - On Script - Say Line 0"), +(1707100,9,13,0,0,0,100,0,29000,29000,0,0,17,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Technician Zhanaa - On Script - Set Emote State 0"), +(1707100,9,14,0,0,0,100,0,1000,1000,0,0,69,0,0,0,0,0,0,8,0,0,0,-4184.55,-13733.1,74.1389,0,"Technician Zhanaa - On Script - Move to Position"), +(1707100,9,15,0,0,0,100,0,3000,3000,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,1.91986,"Technician Zhanaa - On Script - Set Orientation"); diff --git a/sql/updates/world/4.3.4/2017_12_26_11_world_from_335_was_2017_12_22_01_world.sql b/sql/updates/world/4.3.4/2017_12_26_11_world_from_335_was_2017_12_22_01_world.sql new file mode 100644 index 00000000000..f8837525ede --- /dev/null +++ b/sql/updates/world/4.3.4/2017_12_26_11_world_from_335_was_2017_12_22_01_world.sql @@ -0,0 +1,93 @@ +-- Aponi Brightmane & Tahu Sagewind +DELETE FROM `creature_text` WHERE `CreatureID` IN (34526,34528); +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(34526,0,0,"Talk to me, Tahu. Something. Anything! I'm going stir-crazy.",12,0,100,0,0,0,34762,0,"Aponi Brightmane"), +(34526,1,0,"Not much.",12,0,100,0,0,0,34763,0,"Aponi Brightmane"), +(34526,2,0,"Like Mu'sha.",12,0,100,0,0,0,34764,0,"Aponi Brightmane"), +(34526,3,0,"Where are you going with this?",12,0,100,6,0,0,34765,0,"Aponi Brightmane"), +(34526,4,0,"I hear the \"but\" in your voice...",12,0,100,0,0,0,34766,0,"Aponi Brightmane"), +(34526,5,0,"Do you think his teachings are wrong?",12,0,100,6,0,0,34767,0,"Aponi Brightmane"), +(34526,6,0,"So are you going to bring this up to the elder?",12,0,100,0,0,0,34768,0,"Aponi Brightmane"), +(34526,7,0,"I suppose so. It's not silly, though, what you said.",12,0,100,1,0,0,34769,0,"Aponi Brightmane"), +(34526,8,0,"I see that thoughtful frown, Tahu.",12,0,100,0,0,0,34770,0,"Aponi Brightmane"), +(34526,9,0,"But something is on your mind, right?",12,0,100,6,0,0,34771,0,"Aponi Brightmane"), +(34526,10,0,"What about it?",12,0,100,0,0,0,34772,0,"Aponi Brightmane"), +(34526,11,0,"There's a phrase... \"It's always darkest before the dawn.\" The dawn will come, though, Tahu. The sun will rise. The balance will shift back to where it should be.",12,0,100,1,0,0,34773,0,"Aponi Brightmane"), +(34526,12,0,"%s smiles and gestures to the north.",16,0,100,25,0,0,34774,0,"Aponi Brightmane"), +(34526,13,0,"Even on the glacier itself, the sun manages to peek through the gloom. I have hope, Tahu. I think we'll make it through this, no matter how dire it looks.",12,0,100,1,0,0,34775,0,"Aponi Brightmane"), +(34526,14,0,"But I'd still rather be there on the front lines helping it happen rather than trying to placate myself with belief. We can't just sit around and hope it happens.",12,0,100,0,0,0,34776,0,"Aponi Brightmane"), +(34526,15,0,"And through that hope, strengthen our side in the fight?",12,0,100,0,0,0,34777,0,"Aponi Brightmane"), +(34528,0,0,"%s laughs softly.",16,0,100,0,0,0,34745,0,"Tahu Sagewind"), +(34528,1,0,"All right, Aponi. I've enough on my mind to share. Have you ever spoken to the elves of Moonglade?",12,0,100,1,0,0,34746,0,"Tahu Sagewind"), +(34528,2,0,"The elves speak of a moon goddess, did you know? They put great stock in the light given by the moon.",12,0,100,0,0,0,34747,0,"Tahu Sagewind"), +(34528,3,0,"Just like her. The parallels I've heard are interesting. And it's no secret all druids, Shu'halo and elf alike, can call upon Mu'sha's light.",12,0,100,273,0,0,34748,0,"Tahu Sagewind"), +(34528,4,0,"I wonder. Hamuul has guided us well, and I've learned so much from him. The legends say that our people were druids when time began...",12,0,100,1,0,0,34749,0,"Tahu Sagewind"), +(34528,5,0,"...but what Hamuul teaches is what the elves know. The night elves. They put such stock in their moon goddess, as creatures of the night.",12,0,100,0,0,0,34750,0,"Tahu Sagewind"), +(34528,6,0,"No! No, nothing like that. He is an elder for good reason, sister. Mu'sha is one of the Earthmother's eyes, and she watches over us. That isn't sinister.",12,0,100,274,0,0,34751,0,"Tahu Sagewind"), +(34528,7,0,"But we're nothing if not people who strive for balance. Our warriors fight only when there is need. Our hunters take only what the tribes require to live, and use all they can when they do. The shaman stand as guide and mediator to the elemental spirits.",12,0,100,0,0,0,34753,0,"Tahu Sagewind"), +(34528,8,0,"And while we, as druids, are guardians of nature, I wonder if we've overlooked a key aspect of balance in all things.",12,0,100,1,0,0,34754,0,"Tahu Sagewind"), +(34528,9,0,"No, no. No need for him to trouble about a student's idle philosophizing while he entertains a friend.",12,0,100,274,0,0,34755,0,"Tahu Sagewind"), +(34528,10,0,"Well, it isn't exactly a new thought, sister.",12,0,100,6,0,0,34756,0,"Tahu Sagewind"), +(34528,11,0,"Sorry, sister. It's nothing to worry about.",12,0,100,0,0,0,34778,0,"Tahu Sagewind"), +(34528,12,0,"I'm thinking about the front to the north. The one you're so eager to return to.",12,0,100,1,0,0,34779,0,"Tahu Sagewind"), +(34528,13,0,"I know I'm counseling patience, Aponi, but I don't like remaining here any more than you do. Times are bleak, and failing to act only makes me worry that my idle hand may have been the one to turn the tide.",12,0,100,0,0,0,34780,0,"Tahu Sagewind"), +(34528,14,0,"Still... there is balance in all things, even death. I simply hate the concept that such destruction and darkness might be necessary.",12,0,100,1,0,0,34781,0,"Tahu Sagewind"), +(34528,15,0,"I know, sister. I know. We'll return to fighting one day. For now, though, maybe it's best to spread the word to others... give them the hope you have.",12,0,100,1,0,0,34783,0,"Tahu Sagewind"), +(34528,16,0,"That's the idea.",12,0,100,273,0,0,34784,0,"Tahu Sagewind"); + +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=34526; +DELETE FROM `smart_scripts` WHERE `entryorguid`=34526 AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (3452600,3452601) AND `source_type`=9; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(34526,0,0,0,20,1,100,0,13986,0,0,0,87,3452600,3452601,0,0,0,0,1,0,0,0,0,0,0,0,"Aponi Brightmane - On Quest 'An Injured Colleague' Finished - Run Random Script"), +(34526,0,1,0,11,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Aponi Brightmane - On Respawn - Set Event Phase 1"), +(3452600,9,0,0,0,0,100,0,0,0,0,0,22,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Aponi Brightmane - On Script - Set Event Phase 0"), +(3452600,9,1,0,0,0,100,0,3000,3000,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Aponi Brightmane - On Script - Say Line 0"), +(3452600,9,2,0,0,0,100,0,3000,3000,0,0,1,0,0,0,0,0,0,19,34528,0,0,0,0,0,0,"Aponi Brightmane - On Script - Say Line 0 (Tahu Sagewind)"), +(3452600,9,3,0,0,0,100,0,2000,2000,0,0,1,1,0,0,0,0,0,19,34528,0,0,0,0,0,0,"Aponi Brightmane - On Script - Say Line 1 (Tahu Sagewind)"), +(3452600,9,4,0,0,0,100,0,5500,5500,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Aponi Brightmane - On Script - Say Line 1"), +(3452600,9,5,0,0,0,100,0,2000,2000,0,0,1,2,0,0,0,0,0,19,34528,0,0,0,0,0,0,"Aponi Brightmane - On Script - Say Line 2 (Tahu Sagewind)"), +(3452600,9,6,0,0,0,100,0,3000,3000,0,0,86,65630,0,19,34548,0,0,1,0,0,0,0,0,0,0,"Aponi Brightmane - On Script - Cross Cast 'Starfall State Visual'"), +(3452600,9,7,0,0,0,100,0,3000,3000,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Aponi Brightmane - On Script - Say Line 2"), +(3452600,9,8,0,0,0,100,0,2000,2000,0,0,1,3,0,0,0,0,0,19,34528,0,0,0,0,0,0,"Aponi Brightmane - On Script - Say Line 3 (Tahu Sagewind)"), +(3452600,9,9,0,0,0,100,0,7000,7000,0,0,1,3,0,0,0,0,0,1,0,0,0,0,0,0,0,"Aponi Brightmane - On Script - Say Line 3"), +(3452600,9,10,0,0,0,100,0,3000,3000,0,0,1,4,0,0,0,0,0,19,34528,0,0,0,0,0,0,"Aponi Brightmane - On Script - Say Line 4 (Tahu Sagewind)"), +(3452600,9,11,0,0,0,100,0,7000,7000,0,0,1,4,0,0,0,0,0,1,0,0,0,0,0,0,0,"Aponi Brightmane - On Script - Say Line 4"), +(3452600,9,12,0,0,0,100,0,3000,3000,0,0,1,5,0,0,0,0,0,19,34528,0,0,0,0,0,0,"Aponi Brightmane - On Script - Say Line 5 (Tahu Sagewind)"), +(3452600,9,13,0,0,0,100,0,7000,7000,0,0,1,5,0,0,0,0,0,1,0,0,0,0,0,0,0,"Aponi Brightmane - On Script - Say Line 5"), +(3452600,9,14,0,0,0,100,0,4000,4000,0,0,1,6,0,0,0,0,0,19,34528,0,0,0,0,0,0,"Aponi Brightmane - On Script - Say Line 6 (Tahu Sagewind)"), +(3452600,9,15,0,0,0,100,0,8000,8000,0,0,1,7,0,0,0,0,0,19,34528,0,0,0,0,0,0,"Aponi Brightmane - On Script - Say Line 7 (Tahu Sagewind)"), +(3452600,9,16,0,0,0,100,0,13000,13000,0,0,1,8,0,0,0,0,0,19,34528,0,0,0,0,0,0,"Aponi Brightmane - On Script - Say Line 8 (Tahu Sagewind)"), +(3452600,9,17,0,0,0,100,0,2500,2500,0,0,28,0,0,0,0,0,0,19,34548,0,0,0,0,0,0,"Aponi Brightmane - On Script - Remove All Auras"), +(3452600,9,18,0,0,0,100,0,500,500,0,0,86,65632,0,19,34548,0,0,1,0,0,0,0,0,0,0,"Aponi Brightmane - On Script - Cross Cast 'Eclipse Visual'"), +(3452600,9,19,0,0,0,100,0,3000,3000,0,0,1,6,0,0,0,0,0,1,0,0,0,0,0,0,0,"Aponi Brightmane - On Script - Say Line 6"), +(3452600,9,20,0,0,0,100,0,4000,4000,0,0,1,9,0,0,0,0,0,19,34528,0,0,0,0,0,0,"Aponi Brightmane - On Script - Say Line 9 (Tahu Sagewind)"), +(3452600,9,21,0,0,0,100,0,5500,5500,0,0,1,7,0,0,0,0,0,1,0,0,0,0,0,0,0,"Aponi Brightmane - On Script - Say Line 7"), +(3452600,9,22,0,0,0,100,0,4000,4000,0,0,1,10,0,0,0,0,0,19,34528,0,0,0,0,0,0,"Aponi Brightmane - On Script - Say Line 10 (Tahu Sagewind)"), +(3452600,9,23,0,0,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Aponi Brightmane - On Script - Set Event Phase 1"), +(3452601,9,0,0,0,0,100,0,0,0,0,0,22,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Aponi Brightmane - On Script - Set Event Phase 0"), +(3452601,9,1,0,0,0,100,0,3000,3000,0,0,1,8,0,0,0,0,0,1,0,0,0,0,0,0,0,"Aponi Brightmane - On Script - Say Line 8"), +(3452601,9,2,0,0,0,100,0,3000,3000,0,0,1,11,0,0,0,0,0,19,34528,0,0,0,0,0,0,"Aponi Brightmane - On Script - Say Line 11 (Tahu Sagewind)"), +(3452601,9,3,0,0,0,100,0,3500,3500,0,0,1,9,0,0,0,0,0,1,0,0,0,0,0,0,0,"Aponi Brightmane - On Script - Say Line 9"), +(3452601,9,4,0,0,0,100,0,3500,3500,0,0,1,12,0,0,0,0,0,19,34528,0,0,0,0,0,0,"Aponi Brightmane - On Script - Say Line 12 (Tahu Sagewind)"), +(3452601,9,5,0,0,0,100,0,5000,5000,0,0,1,10,0,0,0,0,0,1,0,0,0,0,0,0,0,"Aponi Brightmane - On Script - Say Line 10"), +(3452601,9,6,0,0,0,100,0,2000,2000,0,0,1,13,0,0,0,0,0,19,34528,0,0,0,0,0,0,"Aponi Brightmane - On Script - Say Line 13 (Tahu Sagewind)"), +(3452601,9,7,0,0,0,100,0,11000,11000,0,0,1,14,0,0,0,0,0,19,34528,0,0,0,0,0,0,"Aponi Brightmane - On Script - Say Line 14 (Tahu Sagewind)"), +(3452601,9,8,0,0,0,100,0,7000,7000,0,0,1,11,0,0,0,0,0,1,0,0,0,0,0,0,0,"Aponi Brightmane - On Script - Say Line 11"), +(3452601,9,9,0,0,0,100,0,4000,4000,0,0,86,65631,0,19,34548,0,0,1,0,0,0,0,0,0,0,"Aponi Brightmane - On Script - Cross Cast 'Sunny'"), +(3452601,9,10,0,0,0,100,0,5000,5000,0,0,1,12,0,0,0,0,0,1,0,0,0,0,0,0,0,"Aponi Brightmane - On Script - Say Line 12"), +(3452601,9,11,0,0,0,100,0,2000,2000,0,0,1,13,0,0,0,0,0,1,0,0,0,0,0,0,0,"Aponi Brightmane - On Script - Say Line 13"), +(3452601,9,12,0,0,0,100,0,8000,8000,0,0,1,14,0,0,0,0,0,1,0,0,0,0,0,0,0,"Aponi Brightmane - On Script - Say Line 14"), +(3452601,9,13,0,0,0,100,0,8500,8500,0,0,1,15,0,0,0,0,0,19,34528,0,0,0,0,0,0,"Aponi Brightmane - On Script - Say Line 15 (Tahu Sagewind)"), +(3452601,9,14,0,0,0,100,0,8000,8000,0,0,1,15,0,0,0,0,0,1,0,0,0,0,0,0,0,"Aponi Brightmane - On Script - Say Line 15"), +(3452601,9,15,0,0,0,100,0,4000,4000,0,0,1,16,0,0,0,0,0,19,34528,0,0,0,0,0,0,"Aponi Brightmane - On Script - Say Line 16 (Tahu Sagewind)"), +(3452601,9,16,0,0,0,100,0,0,0,0,0,28,0,0,0,0,0,0,19,34548,0,0,0,0,0,0,"Aponi Brightmane - On Script - Remove All Auras"), +(3452601,9,17,0,0,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Aponi Brightmane - On Script - Set Event Phase 1"); + +-- Add missing spawns +SET @GUID1 := 16806; +SET @GUID2 := 17553; +DELETE FROM `creature` WHERE `guid` IN (@GUID1, @GUID2); +INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `ScriptName`, `VerifiedBuild`) VALUES +(@GUID1,34548,1,0,0,1,1,0,0,-1047.73,-287.61,159.03,5.93684,300,0,0,42,0,0,0,33554432,0,"",0), -- Invisible Spell Target - Tahu +(@GUID2,34528,1,0,0,1,1,0,1,-1045.84,-288.282,159.03,2.8312,300,0,0,3137,2117,0,0,0,0,"",0); -- Tahu Sagewind diff --git a/sql/updates/world/4.3.4/2017_12_26_12_world_from_335_was_2017_12_22_02_world.sql b/sql/updates/world/4.3.4/2017_12_26_12_world_from_335_was_2017_12_22_02_world.sql new file mode 100644 index 00000000000..c6e249907bd --- /dev/null +++ b/sql/updates/world/4.3.4/2017_12_26_12_world_from_335_was_2017_12_22_02_world.sql @@ -0,0 +1,6 @@ +-- +SET @CGUID:= 42637; -- 1 guid + +DELETE FROM `creature` WHERE `guid` = @CGUID; +INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `ScriptName`, `VerifiedBuild`) VALUES +(@CGUID, 16031, 329, 0, 0, 1, 1, 0, 0, 4044.78, -3333.68, 117.26, 4.153883, 7200, 0, 0, 4120, 0, 0, 0, 0, 0, '', 0); diff --git a/sql/updates/world/4.3.4/2017_12_26_13_world_from_335_was_2017_12_24_00_world.sql b/sql/updates/world/4.3.4/2017_12_26_13_world_from_335_was_2017_12_24_00_world.sql new file mode 100644 index 00000000000..54fa4fffdf4 --- /dev/null +++ b/sql/updates/world/4.3.4/2017_12_26_13_world_from_335_was_2017_12_24_00_world.sql @@ -0,0 +1,3 @@ +-- +UPDATE `gameobject` SET `spawnMask` = 3 WHERE `id` = 182947; +UPDATE `gameobject` SET `spawnMask` = 2 WHERE `id` = 184222 AND `map` IN (553,554); diff --git a/sql/updates/world/4.3.4/2017_12_26_14_world_from_335_was_2017_12_25_00_world.sql b/sql/updates/world/4.3.4/2017_12_26_14_world_from_335_was_2017_12_25_00_world.sql new file mode 100644 index 00000000000..ac78bfdc15d --- /dev/null +++ b/sql/updates/world/4.3.4/2017_12_26_14_world_from_335_was_2017_12_25_00_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE creature_template SET AIName='' WHERE entry=21909; diff --git a/sql/updates/world/4.3.4/2017_12_26_15_world_from_335_was_2017_12_25_01_world_335.sql b/sql/updates/world/4.3.4/2017_12_26_15_world_from_335_was_2017_12_25_01_world_335.sql new file mode 100644 index 00000000000..ae558e0e232 --- /dev/null +++ b/sql/updates/world/4.3.4/2017_12_26_15_world_from_335_was_2017_12_25_01_world_335.sql @@ -0,0 +1,19 @@ +/* +-- +-- Change weapons of Commander Springvale to the correct pre-cataclysm ones +UPDATE `creature_equip_template` SET `ItemID1`=5191, `ItemID2`=1201 WHERE `CreatureID`=4278 AND `ID`=1; + +-- Update Lupine Horror and Slavering Worg MovementType to stand still +UPDATE `creature` SET `spawndist`=0, `MovementType`=0 WHERE `guid` IN (16240, 16238); + +-- Add chain aggro to Worgs infront of Wolf Master Nandos +DELETE FROM `creature_formations` WHERE `leaderGUID`=16241; +INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`) VALUES +(16241, 16241, 0, 0, 3), +(16241, 16240, 0, 0, 3), +(16241, 16238, 0, 0, 3), +(16241, 16239, 0, 0, 3); + +-- Add random movement to Razorclaw the Butcher +UPDATE `creature` SET `spawndist`=5, `MovementType`=1 WHERE `guid`=16253; +*/ diff --git a/src/server/game/AI/CoreAI/GameObjectAI.h b/src/server/game/AI/CoreAI/GameObjectAI.h index 84ead51cc91..e72157ccd7a 100644 --- a/src/server/game/AI/CoreAI/GameObjectAI.h +++ b/src/server/game/AI/CoreAI/GameObjectAI.h @@ -25,6 +25,7 @@ #include "QuestDef.h" #include "GameObject.h" #include "CreatureAI.h" +#include "ObjectGuid.h" class TC_GAME_API GameObjectAI { @@ -42,8 +43,8 @@ class TC_GAME_API GameObjectAI // Pass parameters between AI virtual void DoAction(int32 /*param = 0 */) { } - virtual void SetGUID(uint64 /*guid*/, int32 /*id = 0 */) { } - virtual uint64 GetGUID(int32 /*id = 0 */) const { return 0; } + virtual void SetGUID(ObjectGuid /*guid*/, int32 /*id = 0 */) { } + virtual ObjectGuid GetGUID(int32 /*id = 0 */) const { return ObjectGuid::Empty; } static int32 Permissible(GameObject const* /*go*/) { return PERMIT_BASE_NO; } diff --git a/src/server/game/AI/CoreAI/PetAI.cpp b/src/server/game/AI/CoreAI/PetAI.cpp index b4cd98f1f38..2f06926d447 100644 --- a/src/server/game/AI/CoreAI/PetAI.cpp +++ b/src/server/game/AI/CoreAI/PetAI.cpp @@ -551,6 +551,8 @@ bool PetAI::CanAttack(Unit* target) return false; } + ASSERT(me->GetCharmInfo()); + // Passive - passive pets can attack if told to if (me->HasReactState(REACT_PASSIVE)) return me->GetCharmInfo()->IsCommandAttack(); diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index 0f60dda7e28..08cb3532f0d 100644 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -2610,12 +2610,6 @@ void Creature::SetPosition(float x, float y, float z, float o) GetVehicleKit()->RelocatePassengers(); } -bool Creature::IsDungeonBoss() const -{ - CreatureTemplate const* cinfo = sObjectMgr->GetCreatureTemplate(GetEntry()); - return cinfo && (cinfo->flags_extra & CREATURE_FLAG_EXTRA_DUNGEON_BOSS); -} - float Creature::GetAggroRange(Unit const* target) const { // Determines the aggro range for creatures (usually pets), used mainly for aggressive pet target selection. diff --git a/src/server/game/Entities/Creature/Creature.h b/src/server/game/Entities/Creature/Creature.h index 93c3b490d36..8bcd6f24c11 100644 --- a/src/server/game/Entities/Creature/Creature.h +++ b/src/server/game/Entities/Creature/Creature.h @@ -502,6 +502,8 @@ class TC_GAME_API Creature : public Unit, public GridObject, public Ma bool CanWalk() const { return (GetCreatureTemplate()->InhabitType & INHABIT_GROUND) != 0; } bool CanSwim() const { return (GetCreatureTemplate()->InhabitType & INHABIT_WATER) != 0 || IsPet(); } bool CanFly() const override { return (GetCreatureTemplate()->InhabitType & INHABIT_AIR) != 0; } + bool IsDungeonBoss() const { return (GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_DUNGEON_BOSS) != 0; } + bool IsAffectedByDiminishingReturns() const override { return Unit::IsAffectedByDiminishingReturns() || (GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_ALL_DIMINISH) != 0; } void SetReactState(ReactStates st) { m_reactState = st; } ReactStates GetReactState() const { return m_reactState; } @@ -518,8 +520,6 @@ class TC_GAME_API Creature : public Unit, public GridObject, public Ma bool isElite() const; bool isWorldBoss() const; - bool IsDungeonBoss() const; - uint8 getLevelForTarget(WorldObject const* target) const override; // overwrite Unit::getLevelForTarget for boss level support bool IsInEvadeMode() const { return HasUnitState(UNIT_STATE_EVADE); } diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 24c5dab51f8..c186b1da109 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -4481,17 +4481,6 @@ bool Unit::HasNegativeAuraWithInterruptFlag(uint32 flag, ObjectGuid guid) const return false; } -bool Unit::HasNegativeAuraWithAttribute(uint32 flag, ObjectGuid guid) const -{ - for (AuraApplicationMap::const_iterator iter = m_appliedAuras.begin(); iter != m_appliedAuras.end(); ++iter) - { - Aura const* aura = iter->second->GetBase(); - if (!iter->second->IsPositive() && aura->GetSpellInfo()->Attributes & flag && (!guid || aura->GetCasterGUID() == guid)) - return true; - } - return false; -} - bool Unit::HasAuraWithMechanic(uint32 mechanicMask) const { for (AuraApplicationMap::const_iterator iter = m_appliedAuras.begin(); iter != m_appliedAuras.end(); ++iter) @@ -4509,6 +4498,26 @@ bool Unit::HasAuraWithMechanic(uint32 mechanicMask) const return false; } +bool Unit::HasStrongerAuraWithDR(SpellInfo const* auraSpellInfo, Unit* caster, bool triggered) const +{ + DiminishingGroup diminishGroup = auraSpellInfo->GetDiminishingReturnsGroupForSpell(triggered); + DiminishingLevels level = GetDiminishing(diminishGroup); + for (auto itr = m_appliedAuras.begin(); itr != m_appliedAuras.end(); ++itr) + { + SpellInfo const* spellInfo = itr->second->GetBase()->GetSpellInfo(); + if (spellInfo->GetDiminishingReturnsGroupForSpell(triggered) != diminishGroup) + continue; + + int32 existingDuration = itr->second->GetBase()->GetMaxDuration(); + int32 newDuration = auraSpellInfo->GetMaxDuration(); + ApplyDiminishingToDuration(auraSpellInfo, triggered, newDuration, caster, level); + if (newDuration > 0 && newDuration < existingDuration) + return true; + } + + return false; +} + AuraEffect* Unit::IsScriptOverriden(SpellInfo const* spell, int32 script) const { AuraEffectList const& auras = GetAuraEffectsByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS); @@ -9434,31 +9443,28 @@ void Unit::ModSpellDurationTime(SpellInfo const* spellInfo, int32 & duration, Sp duration = int32(float(duration) * m_modAttackSpeedPct[RANGED_ATTACK]); } -DiminishingLevels Unit::GetDiminishing(DiminishingGroup group) +DiminishingLevels Unit::GetDiminishing(DiminishingGroup group) const { - DiminishingReturn& diminish = m_Diminishing[group]; + DiminishingReturn const& diminish = m_Diminishing[group]; if (!diminish.hitCount) return DIMINISHING_LEVEL_1; - // If last spell was cast more than 15 seconds ago - reset the count. + // If last spell was cast more than 15 seconds ago - reset level if (!diminish.stack && GetMSTimeDiffToNow(diminish.hitTime) > 15000) - { - diminish.hitCount = DIMINISHING_LEVEL_1; return DIMINISHING_LEVEL_1; - } return DiminishingLevels(diminish.hitCount); } void Unit::IncrDiminishing(SpellInfo const* auraSpellInfo, bool triggered) { - DiminishingGroup const group = auraSpellInfo->GetDiminishingReturnsGroupForSpell(triggered); - DiminishingLevels const maxLevel = auraSpellInfo->GetDiminishingReturnsMaxLevel(triggered); + DiminishingGroup group = auraSpellInfo->GetDiminishingReturnsGroupForSpell(triggered); + uint32 currentLevel = GetDiminishing(group); + uint32 const maxLevel = auraSpellInfo->GetDiminishingReturnsMaxLevel(triggered); - // Checking for existing in the table DiminishingReturn& diminish = m_Diminishing[group]; - if (static_cast(diminish.hitCount) < maxLevel) - ++diminish.hitCount; + if (currentLevel < maxLevel) + diminish.hitCount = currentLevel + 1; } bool Unit::ApplyDiminishingToDuration(SpellInfo const* auraSpellInfo, bool triggered, int32& duration, Unit* caster, DiminishingLevels previousLevel) const @@ -9479,9 +9485,7 @@ bool Unit::ApplyDiminishingToDuration(SpellInfo const* auraSpellInfo, bool trigg Unit const* target = targetOwner ? targetOwner : this; Unit const* source = casterOwner ? casterOwner : caster; - if ((target->GetTypeId() == TYPEID_PLAYER - || target->ToCreature()->GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_ALL_DIMINISH) - && source->GetTypeId() == TYPEID_PLAYER) + if (target->IsAffectedByDiminishingReturns() && source->GetTypeId() == TYPEID_PLAYER) duration = limitDuration; } @@ -9503,10 +9507,9 @@ bool Unit::ApplyDiminishingToDuration(SpellInfo const* auraSpellInfo, bool trigg } } // Some diminishings applies to mobs too (for example, Stun) - else if ((auraSpellInfo->GetDiminishingReturnsGroupType(triggered) == DRTYPE_PLAYER - && ((targetOwner ? (targetOwner->GetTypeId() == TYPEID_PLAYER) : (GetTypeId() == TYPEID_PLAYER)) - || (GetTypeId() == TYPEID_UNIT && ToCreature()->GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_ALL_DIMINISH))) - || auraSpellInfo->GetDiminishingReturnsGroupType(triggered) == DRTYPE_ALL) + else if (auraSpellInfo->GetDiminishingReturnsGroupType(triggered) == DRTYPE_ALL || + (auraSpellInfo->GetDiminishingReturnsGroupType(triggered) == DRTYPE_PLAYER && + (targetOwner ? targetOwner->IsAffectedByDiminishingReturns() : IsAffectedByDiminishingReturns()))) { DiminishingLevels diminish = previousLevel; switch (diminish) diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h index 5ea863a88db..be9a8412869 100644 --- a/src/server/game/Entities/Unit/Unit.h +++ b/src/server/game/Entities/Unit/Unit.h @@ -1315,7 +1315,8 @@ class TC_GAME_API Unit : public WorldObject void CleanupBeforeRemoveFromMap(bool finalCleanup); void CleanupsBeforeDelete(bool finalCleanup = true) override; // used in ~Creature/~Player (or before mass creature delete to remove cross-references to already deleted units) - DiminishingLevels GetDiminishing(DiminishingGroup group); + virtual bool IsAffectedByDiminishingReturns() const { return (GetCharmerOrOwnerPlayerOrPlayerItself() != nullptr); } + DiminishingLevels GetDiminishing(DiminishingGroup group) const; void IncrDiminishing(SpellInfo const* auraSpellInfo, bool triggered); bool ApplyDiminishingToDuration(SpellInfo const* auraSpellInfo, bool triggered, int32& duration, Unit* caster, DiminishingLevels previousLevel) const; void ApplyDiminishingAura(DiminishingGroup group, bool apply); @@ -1598,7 +1599,9 @@ class TC_GAME_API Unit : public WorldObject void CastSpell(SpellCastTargets const& targets, SpellInfo const* spellInfo, CustomSpellValues const* value, TriggerCastFlags triggerFlags = TRIGGERED_NONE, Item* castItem = nullptr, AuraEffect const* triggeredByAura = nullptr, ObjectGuid originalCaster = ObjectGuid::Empty); void CastSpell(Unit* victim, uint32 spellId, bool triggered, Item* castItem = nullptr, AuraEffect const* triggeredByAura = nullptr, ObjectGuid originalCaster = ObjectGuid::Empty); + void CastSpell(std::nullptr_t, uint32 spellId, bool triggered, Item* castItem = nullptr, AuraEffect const* triggeredByAura = nullptr, ObjectGuid originalCaster = ObjectGuid::Empty) { CastSpell((Unit*)nullptr, spellId, triggered, castItem, triggeredByAura, originalCaster); } void CastSpell(Unit* victim, uint32 spellId, TriggerCastFlags triggerFlags = TRIGGERED_NONE, Item* castItem = nullptr, AuraEffect const* triggeredByAura = nullptr, ObjectGuid originalCaster = ObjectGuid::Empty); + void CastSpell(std::nullptr_t, uint32 spellId, TriggerCastFlags triggerFlags = TRIGGERED_NONE, Item* castItem = nullptr, AuraEffect const* triggeredByAura = nullptr, ObjectGuid originalCaster = ObjectGuid::Empty) { CastSpell((Unit*)nullptr, spellId, triggerFlags, castItem, triggeredByAura, originalCaster); } void CastSpell(Unit* victim, SpellInfo const* spellInfo, bool triggered, Item* castItem = nullptr, AuraEffect const* triggeredByAura = nullptr, ObjectGuid originalCaster = ObjectGuid::Empty); void CastSpell(Unit* victim, SpellInfo const* spellInfo, TriggerCastFlags triggerFlags = TRIGGERED_NONE, Item* castItem = nullptr, AuraEffect const* triggeredByAura = nullptr, ObjectGuid originalCaster = ObjectGuid::Empty); void CastSpell(float x, float y, float z, uint32 spellId, bool triggered, Item* castItem = nullptr, AuraEffect const* triggeredByAura = nullptr, ObjectGuid originalCaster = ObjectGuid::Empty); @@ -1840,8 +1843,8 @@ class TC_GAME_API Unit : public WorldObject bool HasAuraTypeWithAffectMask(AuraType auratype, SpellInfo const* affectedSpell) const; bool HasAuraTypeWithValue(AuraType auratype, int32 value) const; bool HasNegativeAuraWithInterruptFlag(uint32 flag, ObjectGuid guid = ObjectGuid::Empty) const; - bool HasNegativeAuraWithAttribute(uint32 flag, ObjectGuid guid = ObjectGuid::Empty) const; bool HasAuraWithMechanic(uint32 mechanicMask) const; + bool HasStrongerAuraWithDR(SpellInfo const* auraSpellInfo, Unit* caster, bool triggered) const; AuraEffect* IsScriptOverriden(SpellInfo const* spell, int32 script) const; uint32 GetDiseasesByCaster(ObjectGuid casterGUID, bool remove = false); diff --git a/src/server/game/Events/GameEventMgr.cpp b/src/server/game/Events/GameEventMgr.cpp index b0711c9caf3..9fe5f21671b 100644 --- a/src/server/game/Events/GameEventMgr.cpp +++ b/src/server/game/Events/GameEventMgr.cpp @@ -1719,7 +1719,7 @@ void GameEventMgr::SetHolidayEventTime(GameEventData& event) if (!event.holidayStage) // Ignore holiday return; - const HolidaysEntry* holiday = sHolidaysStore.LookupEntry(event.holiday_id); + HolidaysEntry const* holiday = sHolidaysStore.LookupEntry(event.holiday_id); if (!holiday->Date[0] || !holiday->Duration[0]) // Invalid definitions { diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index 713dc43f4cb..0cd9c91b2b9 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -899,7 +899,14 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo) ok = true; } - if (cInfo->AIName == "TotemAI") + if (cInfo->mingold > cInfo->maxgold) + { + TC_LOG_ERROR("sql.sql", "Creature (Entry: %u) has `mingold` %u which is greater than `maxgold` %u, setting `maxgold` to %u.", + cInfo->Entry, cInfo->mingold, cInfo->maxgold, cInfo->mingold); + const_cast(cInfo)->maxgold = cInfo->mingold; + } + + if (cInfo->AIName == "TotemAI" || cInfo->AIName == "PetAI") { TC_LOG_ERROR("sql.sql", "Creature (Entry: %u) has not-allowed `AIName` '%s' set, removing", cInfo->Entry, cInfo->AIName.c_str()); const_cast(cInfo)->AIName.clear(); diff --git a/src/server/game/Pools/PoolMgr.cpp b/src/server/game/Pools/PoolMgr.cpp index c5ad8e283cb..4f28e34a734 100644 --- a/src/server/game/Pools/PoolMgr.cpp +++ b/src/server/game/Pools/PoolMgr.cpp @@ -556,23 +556,10 @@ void PoolGroup::ReSpawn1Object(PoolObject* /*obj*/) { } //////////////////////////////////////////////////////////// // Methods of class PoolMgr -PoolMgr::PoolMgr() : max_pool_id(0) { } +PoolMgr::PoolMgr() { } void PoolMgr::Initialize() { - QueryResult result = WorldDatabase.Query("SELECT MAX(entry) FROM pool_template"); - if (result) - { - Field* fields = result->Fetch(); - max_pool_id = fields[0].GetUInt32(); - } - - mPoolTemplate.resize(max_pool_id + 1); - mPoolCreatureGroups.resize(max_pool_id + 1); - mPoolGameobjectGroups.resize(max_pool_id + 1); - mPoolPoolGroups.resize(max_pool_id + 1); - mPoolQuestGroups.resize(max_pool_id + 1); - mQuestSearchMap.clear(); mGameobjectSearchMap.clear(); mCreatureSearchMap.clear(); @@ -645,9 +632,10 @@ void PoolMgr::LoadFromDB() TC_LOG_ERROR("sql.sql", "`pool_creature` has a non existing creature spawn (GUID: %u) defined for pool id (%u), skipped.", guid, pool_id); continue; } - if (pool_id > max_pool_id) + auto it = mPoolTemplate.find(pool_id); + if (it == mPoolTemplate.end()) { - TC_LOG_ERROR("sql.sql", "`pool_creature` pool id (%u) is out of range compared to max pool id in `pool_template`, skipped.", pool_id); + TC_LOG_ERROR("sql.sql", "`pool_creature` pool id (%u) is not in `pool_template`, skipped.", pool_id); continue; } if (chance < 0 || chance > 100) @@ -711,9 +699,10 @@ void PoolMgr::LoadFromDB() continue; } - if (pool_id > max_pool_id) + auto it = mPoolTemplate.find(pool_id); + if (it == mPoolTemplate.end()) { - TC_LOG_ERROR("sql.sql", "`pool_gameobject` pool id (%u) is out of range compared to max pool id in `pool_template`, skipped.", pool_id); + TC_LOG_ERROR("sql.sql", "`pool_gameobject` pool id (%u) is not in `pool_template`, skipped.", pool_id); continue; } @@ -763,15 +752,21 @@ void PoolMgr::LoadFromDB() uint32 mother_pool_id = fields[1].GetUInt32(); float chance = fields[2].GetFloat(); - if (mother_pool_id > max_pool_id) { - TC_LOG_ERROR("sql.sql", "`pool_pool` mother_pool id (%u) is out of range compared to max pool id in `pool_template`, skipped.", mother_pool_id); - continue; + auto it = mPoolTemplate.find(mother_pool_id); + if (it == mPoolTemplate.end()) + { + TC_LOG_ERROR("sql.sql", "`pool_pool` mother_pool id (%u) is not in `pool_template`, skipped.", mother_pool_id); + continue; + } } - if (child_pool_id > max_pool_id) { - TC_LOG_ERROR("sql.sql", "`pool_pool` included pool_id (%u) is out of range compared to max pool id in `pool_template`, skipped.", child_pool_id); - continue; + auto it = mPoolTemplate.find(child_pool_id); + if (it == mPoolTemplate.end()) + { + TC_LOG_ERROR("sql.sql", "`pool_pool` included pool_id (%u) is not in `pool_template`, skipped.", child_pool_id); + continue; + } } if (mother_pool_id == child_pool_id) { @@ -796,10 +791,11 @@ void PoolMgr::LoadFromDB() while (result->NextRow()); // Now check for circular reference - for (uint32 i=0; i < max_pool_id; ++i) + // All pool_ids are in pool_template + for (auto const it : mPoolTemplate) { std::set checkedPools; - for (SearchMap::iterator poolItr = mPoolSearchMap.find(i); poolItr != mPoolSearchMap.end(); poolItr = mPoolSearchMap.find(poolItr->second)) + for (SearchMap::iterator poolItr = mPoolSearchMap.find(it.first); poolItr != mPoolSearchMap.end(); poolItr = mPoolSearchMap.find(poolItr->second)) { checkedPools.insert(poolItr->first); if (checkedPools.find(poolItr->second) != checkedPools.end()) @@ -862,9 +858,10 @@ void PoolMgr::LoadFromDB() continue; } - if (pool_id > max_pool_id) + auto it = mPoolTemplate.find(pool_id); + if (it == mPoolTemplate.end()) { - TC_LOG_ERROR("sql.sql", "`pool_quest` pool id (%u) is out of range compared to max pool id in `pool_template`, skipped.", pool_id); + TC_LOG_ERROR("sql.sql", "`pool_quest` pool id (%u) is not in `pool_template`, skipped.", pool_id); continue; } @@ -969,10 +966,10 @@ void PoolMgr::SaveQuestsToDB() for (PoolGroupQuestMap::iterator itr = mPoolQuestGroups.begin(); itr != mPoolQuestGroups.end(); ++itr) { - if (itr->isEmpty()) + if (itr->second.isEmpty()) continue; PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_QUEST_POOL_SAVE); - stmt->setUInt32(0, itr->GetPoolId()); + stmt->setUInt32(0, itr->second.GetPoolId()); trans->Append(stmt); } @@ -994,12 +991,12 @@ void PoolMgr::ChangeDailyQuests() { for (PoolGroupQuestMap::iterator itr = mPoolQuestGroups.begin(); itr != mPoolQuestGroups.end(); ++itr) { - if (Quest const* quest = sObjectMgr->GetQuestTemplate(itr->GetFirstEqualChancedObjectId())) + if (Quest const* quest = sObjectMgr->GetQuestTemplate(itr->second.GetFirstEqualChancedObjectId())) { if (quest->IsWeekly()) continue; - UpdatePool(itr->GetPoolId(), 1); // anything non-zero means don't load from db + UpdatePool(itr->second.GetPoolId(), 1); // anything non-zero means don't load from db } } @@ -1010,12 +1007,12 @@ void PoolMgr::ChangeWeeklyQuests() { for (PoolGroupQuestMap::iterator itr = mPoolQuestGroups.begin(); itr != mPoolQuestGroups.end(); ++itr) { - if (Quest const* quest = sObjectMgr->GetQuestTemplate(itr->GetFirstEqualChancedObjectId())) + if (Quest const* quest = sObjectMgr->GetQuestTemplate(itr->second.GetFirstEqualChancedObjectId())) { if (quest->IsDaily()) continue; - UpdatePool(itr->GetPoolId(), 1); + UpdatePool(itr->second.GetPoolId(), 1); } } @@ -1027,8 +1024,9 @@ void PoolMgr::ChangeWeeklyQuests() template<> void PoolMgr::SpawnPool(uint32 pool_id, uint32 db_guid) { - if (!mPoolCreatureGroups[pool_id].isEmpty()) - mPoolCreatureGroups[pool_id].SpawnObject(mSpawnedData, mPoolTemplate[pool_id].MaxLimit, db_guid); + auto it = mPoolCreatureGroups.find(pool_id); + if (it != mPoolCreatureGroups.end() && !it->second.isEmpty()) + it->second.SpawnObject(mSpawnedData, mPoolTemplate[pool_id].MaxLimit, db_guid); } // Call to spawn a pool, if cache if true the method will spawn only if cached entry is different @@ -1036,8 +1034,9 @@ void PoolMgr::SpawnPool(uint32 pool_id, uint32 db_guid) template<> void PoolMgr::SpawnPool(uint32 pool_id, uint32 db_guid) { - if (!mPoolGameobjectGroups[pool_id].isEmpty()) - mPoolGameobjectGroups[pool_id].SpawnObject(mSpawnedData, mPoolTemplate[pool_id].MaxLimit, db_guid); + auto it = mPoolGameobjectGroups.find(pool_id); + if (it != mPoolGameobjectGroups.end() && !it->second.isEmpty()) + it->second.SpawnObject(mSpawnedData, mPoolTemplate[pool_id].MaxLimit, db_guid); } // Call to spawn a pool, if cache if true the method will spawn only if cached entry is different @@ -1045,16 +1044,18 @@ void PoolMgr::SpawnPool(uint32 pool_id, uint32 db_guid) template<> void PoolMgr::SpawnPool(uint32 pool_id, uint32 sub_pool_id) { - if (!mPoolPoolGroups[pool_id].isEmpty()) - mPoolPoolGroups[pool_id].SpawnObject(mSpawnedData, mPoolTemplate[pool_id].MaxLimit, sub_pool_id); + auto it = mPoolPoolGroups.find(pool_id); + if (it != mPoolPoolGroups.end() && !it->second.isEmpty()) + it->second.SpawnObject(mSpawnedData, mPoolTemplate[pool_id].MaxLimit, sub_pool_id); } // Call to spawn a pool template<> void PoolMgr::SpawnPool(uint32 pool_id, uint32 quest_id) { - if (!mPoolQuestGroups[pool_id].isEmpty()) - mPoolQuestGroups[pool_id].SpawnObject(mSpawnedData, mPoolTemplate[pool_id].MaxLimit, quest_id); + auto it = mPoolQuestGroups.find(pool_id); + if (it != mPoolQuestGroups.end() && !it->second.isEmpty()) + it->second.SpawnObject(mSpawnedData, mPoolTemplate[pool_id].MaxLimit, quest_id); } void PoolMgr::SpawnPool(uint32 pool_id) @@ -1068,27 +1069,52 @@ void PoolMgr::SpawnPool(uint32 pool_id) // Call to despawn a pool, all gameobjects/creatures in this pool are removed void PoolMgr::DespawnPool(uint32 pool_id) { - if (!mPoolCreatureGroups[pool_id].isEmpty()) - mPoolCreatureGroups[pool_id].DespawnObject(mSpawnedData); - - if (!mPoolGameobjectGroups[pool_id].isEmpty()) - mPoolGameobjectGroups[pool_id].DespawnObject(mSpawnedData); - - if (!mPoolPoolGroups[pool_id].isEmpty()) - mPoolPoolGroups[pool_id].DespawnObject(mSpawnedData); - - if (!mPoolQuestGroups[pool_id].isEmpty()) - mPoolQuestGroups[pool_id].DespawnObject(mSpawnedData); + { + auto it = mPoolCreatureGroups.find(pool_id); + if (it != mPoolCreatureGroups.end() && !it->second.isEmpty()) + it->second.DespawnObject(mSpawnedData); + } + { + auto it = mPoolGameobjectGroups.find(pool_id); + if (it != mPoolGameobjectGroups.end() && !it->second.isEmpty()) + it->second.DespawnObject(mSpawnedData); + } + { + auto it = mPoolPoolGroups.find(pool_id); + if (it != mPoolPoolGroups.end() && !it->second.isEmpty()) + it->second.DespawnObject(mSpawnedData); + } + { + auto it = mPoolQuestGroups.find(pool_id); + if (it != mPoolQuestGroups.end() && !it->second.isEmpty()) + it->second.DespawnObject(mSpawnedData); + } } // Method that check chance integrity of the creatures and gameobjects in this pool bool PoolMgr::CheckPool(uint32 pool_id) const { - return pool_id <= max_pool_id && - mPoolGameobjectGroups[pool_id].CheckPool() && - mPoolCreatureGroups[pool_id].CheckPool() && - mPoolPoolGroups[pool_id].CheckPool() && - mPoolQuestGroups[pool_id].CheckPool(); + { + auto it = mPoolGameobjectGroups.find(pool_id); + if (it != mPoolGameobjectGroups.end() && !it->second.CheckPool()) + return false; + } + { + auto it = mPoolCreatureGroups.find(pool_id); + if (it != mPoolCreatureGroups.end() && !it->second.CheckPool()) + return false; + } + { + auto it = mPoolPoolGroups.find(pool_id); + if (it != mPoolPoolGroups.end() && !it->second.CheckPool()) + return false; + } + { + auto it = mPoolQuestGroups.find(pool_id); + if (it != mPoolQuestGroups.end() && !it->second.CheckPool()) + return false; + } + return true; } // Call to update the pool when a gameobject/creature part of pool [pool_id] is ready to respawn diff --git a/src/server/game/Pools/PoolMgr.h b/src/server/game/Pools/PoolMgr.h index 077fcd7dfa0..4382a285d4e 100644 --- a/src/server/game/Pools/PoolMgr.h +++ b/src/server/game/Pools/PoolMgr.h @@ -139,12 +139,11 @@ class TC_GAME_API PoolMgr template void SpawnPool(uint32 pool_id, uint32 db_guid_or_pool_id); - uint32 max_pool_id; - typedef std::vector PoolTemplateDataMap; - typedef std::vector > PoolGroupCreatureMap; - typedef std::vector > PoolGroupGameObjectMap; - typedef std::vector > PoolGroupPoolMap; - typedef std::vector > PoolGroupQuestMap; + typedef std::unordered_map PoolTemplateDataMap; + typedef std::unordered_map> PoolGroupCreatureMap; + typedef std::unordered_map> PoolGroupGameObjectMap; + typedef std::unordered_map> PoolGroupPoolMap; + typedef std::unordered_map> PoolGroupQuestMap; typedef std::pair SearchPair; typedef std::map SearchMap; diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 1e7257247be..e30634dfbb0 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -2662,9 +2662,7 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit* unit, uint32 effectMask, bool scaleA diminishLevel = unit->GetDiminishing(diminishGroup); DiminishingReturnsType type = m_spellInfo->GetDiminishingReturnsGroupType(triggered); // Increase Diminishing on unit, current informations for actually casts will use values above - if ((type == DRTYPE_PLAYER && - (unit->GetCharmerOrOwnerPlayerOrPlayerItself() || (unit->GetTypeId() == TYPEID_UNIT && unit->ToCreature()->GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_ALL_DIMINISH))) || - type == DRTYPE_ALL) + if (type == DRTYPE_ALL || (type == DRTYPE_PLAYER && unit->IsAffectedByDiminishingReturns())) unit->IncrDiminishing(m_spellInfo, triggered); } @@ -3259,11 +3257,9 @@ void Spell::_cast(bool skipCheck) // skip check if done already (for instant cast spells for example) if (!skipCheck) { - uint32 param1 = 0, param2 = 0; - SpellCastResult castResult = CheckCast(false, ¶m1, ¶m2); - if (castResult != SPELL_CAST_OK) + auto cleanupSpell = [this, modOwner](SpellCastResult res, uint32* p1 = nullptr, uint32* p2 = nullptr) { - SendCastResult(castResult, ¶m1, ¶m2); + SendCastResult(res, p1, p2); SendInterrupted(0); if (modOwner) @@ -3271,6 +3267,13 @@ void Spell::_cast(bool skipCheck) finish(false); SetExecutedCurrently(false); + }; + + uint32 param1 = 0, param2 = 0; + SpellCastResult castResult = CheckCast(false, ¶m1, ¶m2); + if (castResult != SPELL_CAST_OK) + { + cleanupSpell(castResult, ¶m1, ¶m2); return; } @@ -3286,18 +3289,39 @@ void Spell::_cast(bool skipCheck) { // Spell will be cast after completing the trade. Silently ignore at this place my_trade->SetSpell(m_spellInfo->Id, m_CastItem); - SendCastResult(SPELL_FAILED_DONT_REPORT); - SendInterrupted(0); - - modOwner->SetSpellModTakingSpell(this, false); - - finish(false); - SetExecutedCurrently(false); + cleanupSpell(SPELL_FAILED_DONT_REPORT); return; } } } } + + // check diminishing returns (again, only after finish cast bar, tested on retail) + if (Unit* target = m_targets.GetUnitTarget()) + { + uint8 aura_effmask = 0; + for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i) + if (m_spellInfo->Effects[i].IsUnitOwnedAuraEffect()) + aura_effmask |= 1 << i; + + if (aura_effmask) + { + bool const triggered = m_triggeredByAuraSpell != nullptr; + if (DiminishingGroup diminishGroup = m_spellInfo->GetDiminishingReturnsGroupForSpell(triggered)) + { + DiminishingReturnsType type = m_spellInfo->GetDiminishingReturnsGroupType(triggered); + if (type == DRTYPE_ALL || (type == DRTYPE_PLAYER && target->IsAffectedByDiminishingReturns())) + { + Unit* caster = m_originalCaster ? m_originalCaster : m_caster; + if (target->HasStrongerAuraWithDR(m_spellInfo, caster, triggered)) + { + cleanupSpell(SPELL_FAILED_AURA_BOUNCED); + return; + } + } + } + } + } } // if the spell allows the creature to turn while casting, then adjust server-side orientation to face the target now diff --git a/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp b/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp index 91594c7b1c0..426b1d0ec49 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp @@ -25,10 +25,16 @@ EndScriptData */ #include "ScriptMgr.h" #include "AreaBoundary.h" -#include "ScriptedCreature.h" +#include "Creature.h" +#include "CreatureAI.h" +#include "EventMap.h" +#include "GameObject.h" #include "InstanceScript.h" -#include "stratholme.h" +#include "Log.h" +#include "Map.h" +#include "MotionMaster.h" #include "Player.h" +#include "stratholme.h" enum InstanceEvents { @@ -36,6 +42,11 @@ enum InstanceEvents EVENT_SLAUGHTER_SQUARE = 2 }; +enum StratholmeMisc +{ + SAY_YSIDA_SAVED = 0 +}; + Position const timmyTheCruelSpawnPosition = { 3625.358f, -3188.108f, 130.3985f, 4.834562f }; EllipseBoundary const beforeScarletGate(Position(3671.158f, -3181.79f), 60.0f, 40.0f); @@ -76,8 +87,10 @@ class instance_stratholme : public InstanceMapScript ObjectGuid portGauntletGUID; ObjectGuid portSlaugtherGUID; ObjectGuid portElderGUID; + ObjectGuid ysidaCageGUID; ObjectGuid baronGUID; + ObjectGuid ysidaGUID; ObjectGuid ysidaTriggerGUID; GuidSet crystalsGUID; GuidSet abomnationGUID; @@ -156,6 +169,10 @@ class instance_stratholme : public InstanceMapScript case NPC_ABOM_VENOM: abomnationGUID.insert(creature->GetGUID()); break; + case NPC_YSIDA: + ysidaGUID = creature->GetGUID(); + creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + break; } } @@ -223,6 +240,9 @@ class instance_stratholme : public InstanceMapScript case GO_PORT_ELDERS: portElderGUID = go->GetGUID(); break; + case GO_YSIDA_CAGE: + ysidaCageGUID = go->GetGUID(); + break; } } @@ -242,14 +262,41 @@ class instance_stratholme : public InstanceMapScript break; case FAIL: DoRemoveAurasDueToSpellOnPlayers(SPELL_BARON_ULTIMATUM); + if (Creature* ysida = instance->GetCreature(ysidaGUID)) + ysida->CastSpell(ysida, SPELL_PERM_FEIGN_DEATH, true); EncounterState[0] = data; break; case DONE: EncounterState[0] = data; - if (Creature* ysidaTrigger = instance->GetCreature(ysidaTriggerGUID)) + + if (Creature* ysida = instance->GetCreature(ysidaGUID)) { - Position ysidaPos = ysidaTrigger->GetPosition(); - ysidaTrigger->SummonCreature(NPC_YSIDA, ysidaPos, TEMPSUMMON_TIMED_DESPAWN, 1800000); + if (GameObject* cage = instance->GetGameObject(ysidaCageGUID)) + cage->UseDoorOrButton(); + + float x, y, z; + //! This spell handles the Dead man's plea quest completion + ysida->CastSpell(nullptr, SPELL_YSIDA_SAVED, true); + ysida->SetWalk(true); + ysida->AI()->Talk(SAY_YSIDA_SAVED); + ysida->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + ysida->GetClosePoint(x, y, z, ysida->GetObjectScale() / 3, 4.0f); + ysida->GetMotionMaster()->MovePoint(1, x, y, z); + + Map::PlayerList const& players = instance->GetPlayers(); + + for (auto const& i : players) + { + if (Player* player = i.GetSource()) + { + if (player->IsGameMaster()) + continue; + + //! im not quite sure what this one is supposed to do + //! this is server-side spell + player->CastSpell(ysida, SPELL_YSIDA_CREDIT_EFFECT, true); + } + } } events.CancelEvent(EVENT_BARON_RUN); break; @@ -332,19 +379,9 @@ class instance_stratholme : public InstanceMapScript { HandleGameObject(portGauntletGUID, true); if (GetData(TYPE_BARON_RUN) == IN_PROGRESS) - { DoRemoveAurasDueToSpellOnPlayers(SPELL_BARON_ULTIMATUM); - Map::PlayerList const& players = instance->GetPlayers(); - if (!players.isEmpty()) - for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) - if (Player* player = itr->GetSource()) - if (player->GetQuestStatus(QUEST_DEAD_MAN_PLEA) == QUEST_STATUS_INCOMPLETE) - { - player->AreaExploredOrEventHappens(QUEST_DEAD_MAN_PLEA); - player->KilledMonsterCredit(NPC_YSIDA); - } - SetData(TYPE_BARON_RUN, DONE); - } + + SetData(TYPE_BARON_RUN, DONE); } EncounterState[5] = data; break; @@ -438,6 +475,8 @@ class instance_stratholme : public InstanceMapScript return baronGUID; case DATA_YSIDA_TRIGGER: return ysidaTriggerGUID; + case NPC_YSIDA: + return ysidaGUID; } return ObjectGuid::Empty; } diff --git a/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp b/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp index 2275956daa0..bcd673b8c12 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp @@ -31,12 +31,17 @@ npc_spectral_ghostly_citizen EndContentData */ #include "ScriptMgr.h" -#include "ScriptedCreature.h" -#include "stratholme.h" -#include "Group.h" -#include "Player.h" -#include "SpellInfo.h" +#include "GameObject.h" #include "GameObjectAI.h" +#include "Group.h" +#include "InstanceScript.h" +#include "MotionMaster.h" +#include "ObjectAccessor.h" +#include "Player.h" +#include "ScriptedCreature.h" +#include "SpellInfo.h" +#include "SpellScript.h" +#include "stratholme.h" /*###### ## go_gauntlet_gate (this is the _first_ of the gauntlet gates, two exist) @@ -297,9 +302,43 @@ public: }; +class spell_ysida_saved_credit : public SpellScript +{ + PrepareSpellScript(spell_ysida_saved_credit); + + bool Validate(SpellInfo const* /*spell*/) override + { + return ValidateSpellInfo({ SPELL_YSIDA_SAVED }); + } + + void FilterTargets(std::list& targets) + { + targets.remove_if([](WorldObject* obj) + { + return obj->GetTypeId() != TYPEID_PLAYER; + }); + } + + void HandleScript(SpellEffIndex /*effIndex*/) + { + if (Player* player = GetHitUnit()->ToPlayer()) + { + player->AreaExploredOrEventHappens(QUEST_DEAD_MAN_PLEA); + player->KilledMonsterCredit(NPC_YSIDA); + } + } + + void Register() override + { + OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_ysida_saved_credit::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENTRY); + OnEffectHitTarget += SpellEffectFn(spell_ysida_saved_credit::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); + } +}; + void AddSC_stratholme() { new go_gauntlet_gate(); new npc_restless_soul(); new npc_spectral_ghostly_citizen(); + RegisterSpellScript(spell_ysida_saved_credit); } diff --git a/src/server/scripts/EasternKingdoms/Stratholme/stratholme.h b/src/server/scripts/EasternKingdoms/Stratholme/stratholme.h index ff4d330748e..dc16dc2e0f7 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/stratholme.h +++ b/src/server/scripts/EasternKingdoms/Stratholme/stratholme.h @@ -76,7 +76,8 @@ enum STRGameobjectIds GO_ZIGGURAT5 = 175796, // baron GO_PORT_GAUNTLET = 175374, // port from gauntlet to slaugther GO_PORT_SLAUGTHER = 175373, // port at slaugther - GO_PORT_ELDERS = 175377 // port at elders square + GO_PORT_ELDERS = 175377, // port at elders square + GO_YSIDA_CAGE = 181071 }; enum STRQuestIds @@ -86,7 +87,10 @@ enum STRQuestIds enum STRSpellIds { - SPELL_BARON_ULTIMATUM = 27861 + SPELL_BARON_ULTIMATUM = 27861, + SPELL_PERM_FEIGN_DEATH = 29266, + SPELL_YSIDA_SAVED = 31912, + SPELL_YSIDA_CREDIT_EFFECT = 31913 }; enum STRMisc diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp index ebe7fb2d8ab..6a9b4b122c7 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp @@ -122,7 +122,7 @@ class VoidSpawnSummon : public BasicEvent bool Execute(uint64 /*time*/, uint32 /*diff*/) { - _owner->CastSpell((Unit*)nullptr, SPELL_SUMMON_VOID_SENTINEL, true); + _owner->CastSpell(nullptr, SPELL_SUMMON_VOID_SENTINEL, true); return true; } @@ -590,7 +590,7 @@ class spell_summon_blood_elves_script : SpellScriptLoader void HandleScript(SpellEffIndex /*effIndex*/) { for (uint8 i = 0; i < MAX_SUMMON_BLOOD_ELVES; ++i) - GetCaster()->CastSpell((Unit*)nullptr, SummonBloodElvesSpells[urand(0,3)], true); + GetCaster()->CastSpell(nullptr, SummonBloodElvesSpells[urand(0,3)], true); } void Register() override @@ -625,7 +625,7 @@ class spell_muru_darkness : SpellScriptLoader void HandleAfterCast() { for (uint8 i = 0; i < MAX_SUMMON_DARK_FIEND; ++i) - GetCaster()->CastSpell((Unit*)nullptr, SummonDarkFiendSpells[i], true); + GetCaster()->CastSpell(nullptr, SummonDarkFiendSpells[i], true); } void Register() override @@ -687,7 +687,7 @@ class spell_transform_visual_missile_periodic : public SpellScriptLoader void OnPeriodic(AuraEffect const* /*aurEff*/) { - GetTarget()->CastSpell((Unit*)nullptr, RAND(TRANSFORM_VISUAL_MISSILE_1, TRANSFORM_VISUAL_MISSILE_2), true); + GetTarget()->CastSpell(nullptr, RAND(TRANSFORM_VISUAL_MISSILE_1, TRANSFORM_VISUAL_MISSILE_2), true); } void Register() override @@ -713,7 +713,7 @@ class spell_summon_blood_elves_periodic : public SpellScriptLoader void OnPeriodic(AuraEffect const* /*aurEff*/) { - GetTarget()->CastSpell((Unit*)nullptr, SPELL_SUMMON_BLOOD_ELVES_SCRIPT, true); + GetTarget()->CastSpell(nullptr, SPELL_SUMMON_BLOOD_ELVES_SCRIPT, true); } void Register() override diff --git a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_bronjahm.cpp b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_bronjahm.cpp index a71214b7974..d3c57b45f76 100644 --- a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_bronjahm.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_bronjahm.cpp @@ -242,7 +242,7 @@ class npc_corrupted_soul_fragment : public CreatureScript if (instance->GetGuidData(DATA_BRONJAHM).GetCounter() != id) return; - me->CastSpell((Unit*)nullptr, SPELL_CONSUME_SOUL, true); + me->CastSpell(nullptr, SPELL_CONSUME_SOUL, true); me->DespawnOrUnsummon(); } diff --git a/src/server/scripts/Northrend/Gundrak/instance_gundrak.cpp b/src/server/scripts/Northrend/Gundrak/instance_gundrak.cpp index 244d5aa9181..c462827310f 100644 --- a/src/server/scripts/Northrend/Gundrak/instance_gundrak.cpp +++ b/src/server/scripts/Northrend/Gundrak/instance_gundrak.cpp @@ -319,7 +319,7 @@ class instance_gundrak : public InstanceMapScript if (GameObject* altar = GetGameObject(altarId)) if (Creature* trigger = altar->FindNearestCreature(NPC_ALTAR_TRIGGER, 10.0f)) - trigger->CastSpell((Unit*)nullptr, spellId, true); + trigger->CastSpell(nullptr, spellId, true); // eventId equals statueId ToggleGameObject(eventId, GO_STATE_READY); diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp index f2fcf44fd8c..16a3189ed32 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp @@ -1845,8 +1845,8 @@ class spell_igb_rocket_pack : public SpellScriptLoader void HandleRemove(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/) { SpellInfo const* damageInfo = sSpellMgr->AssertSpellInfo(SPELL_ROCKET_PACK_DAMAGE); - GetTarget()->CastCustomSpell(SPELL_ROCKET_PACK_DAMAGE, SPELLVALUE_BASE_POINT0, 2 * (damageInfo->Effects[EFFECT_0].CalcValue() + aurEff->GetTickNumber() * aurEff->GetAmplitude()), NULL, TRIGGERED_FULL_MASK); - GetTarget()->CastSpell(NULL, SPELL_ROCKET_BURST, TRIGGERED_FULL_MASK); + GetTarget()->CastCustomSpell(SPELL_ROCKET_PACK_DAMAGE, SPELLVALUE_BASE_POINT0, 2 * (damageInfo->Effects[EFFECT_0].CalcValue() + aurEff->GetTickNumber() * aurEff->GetAmplitude()), nullptr, TRIGGERED_FULL_MASK); + GetTarget()->CastSpell(nullptr, SPELL_ROCKET_BURST, TRIGGERED_FULL_MASK); } void Register() override diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp index 1e2da34120e..9ed7f76d9ac 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp @@ -857,7 +857,7 @@ class spell_summon_gauntlet_mobs_periodic : public SpellScriptLoader for (uint8 i = 0; i < 2; ++i) { uint32 spellId = SummonSpellsList.front(); - GetTarget()->CastSpell((Unit*)nullptr, spellId, true); + GetTarget()->CastSpell(nullptr, spellId, true); SummonSpellsList.push_back(spellId); SummonSpellsList.pop_front(); } diff --git a/src/server/scripts/Northrend/zone_borean_tundra.cpp b/src/server/scripts/Northrend/zone_borean_tundra.cpp index 003f660a8a7..a98a76ea356 100644 --- a/src/server/scripts/Northrend/zone_borean_tundra.cpp +++ b/src/server/scripts/Northrend/zone_borean_tundra.cpp @@ -2369,7 +2369,7 @@ public: { if (GetTarget()->isDead()) if (Unit* caster = GetCaster()) - caster->CastSpell(NULL, SPELL_WINDSOUL_CREDT); + caster->CastSpell(nullptr, SPELL_WINDSOUL_CREDT); } void Register() override