diff --git a/CMakeLists.txt b/CMakeLists.txt index 49f0c31b15e..f8a97c7f553 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,7 +12,7 @@ project(TrinityCore) # CMake policies (can not be handled elsewhere) -cmake_minimum_required(VERSION 2.6) +cmake_minimum_required(VERSION 2.8) cmake_policy(SET CMP0005 OLD) # Set RPATH-handing (CMake parameters) diff --git a/cmake/compiler/clang/settings.cmake b/cmake/compiler/clang/settings.cmake index add9fa8694d..ae07b1fc39b 100644 --- a/cmake/compiler/clang/settings.cmake +++ b/cmake/compiler/clang/settings.cmake @@ -2,9 +2,9 @@ add_definitions(-D_BUILD_DIRECTIVE='"$(CONFIGURATION)"') if(WITH_WARNINGS) - set(WARNING_FLAGS "-W -Wall -Wextra -Wwrite-strings -Winit-self -Woverloaded-virtual -Wfatal-errors") + set(WARNING_FLAGS "-W -Wall -Wextra -Winit-self -Wfatal-errors") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WARNING_FLAGS}") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WARNING_FLAGS}") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WARNING_FLAGS} -Woverloaded-virtual") message(STATUS "Clang: All warnings enabled") endif() diff --git a/cmake/compiler/gcc/settings.cmake b/cmake/compiler/gcc/settings.cmake index d74fc39031b..25ee96c8562 100644 --- a/cmake/compiler/gcc/settings.cmake +++ b/cmake/compiler/gcc/settings.cmake @@ -11,9 +11,9 @@ add_definitions(-DHAVE_SSE2 -D__SSE2__) message(STATUS "GCC: SFMT enabled, SSE2 flags forced") if( WITH_WARNINGS ) - set(WARNING_FLAGS "-W -Wall -Wextra -Wwrite-strings -Winit-self -Woverloaded-virtual -Winvalid-pch -Wfatal-errors") + set(WARNING_FLAGS "-W -Wall -Wextra -Winit-self -Winvalid-pch -Wfatal-errors") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WARNING_FLAGS}") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WARNING_FLAGS}") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WARNING_FLAGS} -Woverloaded-virtual") message(STATUS "GCC: All warnings enabled") endif() diff --git a/cmake/compiler/icc/settings.cmake b/cmake/compiler/icc/settings.cmake index b7e4cb742b3..58eb63b081d 100644 --- a/cmake/compiler/icc/settings.cmake +++ b/cmake/compiler/icc/settings.cmake @@ -9,10 +9,7 @@ endif() if( WITH_WARNINGS ) add_definitions(-w1) - message(STATUS "ICC All warnings enabled") -else() - add_definitions(-w) - message(STATUS "ICC: All warnings disabled") + message(STATUS "ICC: All warnings enabled") endif() if( WITH_COREDEBUG ) diff --git a/cmake/macros/CheckPlatform.cmake b/cmake/macros/CheckPlatform.cmake index addc619207f..e08aaed8db2 100644 --- a/cmake/macros/CheckPlatform.cmake +++ b/cmake/macros/CheckPlatform.cmake @@ -11,8 +11,6 @@ include("${CMAKE_SOURCE_DIR}/cmake/platform/settings.cmake") if(WIN32) include("${CMAKE_SOURCE_DIR}/cmake/platform/win/settings.cmake") -elseif(APPLE) - include("${CMAKE_SOURCE_DIR}/cmake/platform/osx/settings.cmake") elseif(UNIX) include("${CMAKE_SOURCE_DIR}/cmake/platform/unix/settings.cmake") endif() diff --git a/cmake/platform/osx/settings.cmake b/cmake/platform/osx/settings.cmake deleted file mode 100644 index 3d232c5a1f0..00000000000 --- a/cmake/platform/osx/settings.cmake +++ /dev/null @@ -1,33 +0,0 @@ -set(MACOSX 1) - -# set default configuration directory -if( NOT CONF_DIR ) - set(CONF_DIR ${CMAKE_INSTALL_PREFIX}/etc) - message(STATUS "OSX: Using default configuration directory") -endif() - -# set default library directory -if( NOT LIBSDIR ) - set(LIBSDIR ${CMAKE_INSTALL_PREFIX}/lib) - message(STATUS "OSX: Using default library directory") -endif() - -# configure uninstaller -configure_file( - "${CMAKE_SOURCE_DIR}/cmake/platform/cmake_uninstall.in.cmake" - "${CMAKE_BINARY_DIR}/cmake_uninstall.cmake" - IMMEDIATE @ONLY -) -message(STATUS "OSX: Configuring uninstall target") - -# create uninstaller target (allows for using "make uninstall") -add_custom_target(uninstall - "${CMAKE_COMMAND}" -P "${CMAKE_BINARY_DIR}/cmake_uninstall.cmake" -) -message(STATUS "OSX: Created uninstall target") - -if (CMAKE_COMPILER_IS_GNUCC) - include(${CMAKE_SOURCE_DIR}/cmake/compiler/gcc/settings.cmake) -elseif (${CMAKE_CXX_COMPILER_ID} MATCHES "Clang") - include(${CMAKE_SOURCE_DIR}/cmake/compiler/clang/settings.cmake) -endif() diff --git a/cmake/platform/unix/settings.cmake b/cmake/platform/unix/settings.cmake index c79cfc4ed4f..a851c8acf7a 100644 --- a/cmake/platform/unix/settings.cmake +++ b/cmake/platform/unix/settings.cmake @@ -36,4 +36,6 @@ if(CMAKE_C_COMPILER MATCHES "gcc") include(${CMAKE_SOURCE_DIR}/cmake/compiler/gcc/settings.cmake) elseif(CMAKE_C_COMPILER MATCHES "icc") include(${CMAKE_SOURCE_DIR}/cmake/compiler/icc/settings.cmake) +elseif(CMAKE_C_COMPILER MATCHES "clang") + include(${CMAKE_SOURCE_DIR}/cmake/compiler/clang/settings.cmake) endif() diff --git a/dep/SFMT/SFMT.h b/dep/SFMT/SFMT.h index 5498b9ac5fb..f1c6f72d2d6 100644 --- a/dep/SFMT/SFMT.h +++ b/dep/SFMT/SFMT.h @@ -123,7 +123,8 @@ #define SFMT_PARITY 0x00000001, 0x00000000, 0x00000000, 0x5986f054 // Period certification vector #endif -// Functions used by SFMTRand::RandomInitByArray +// Functions used by SFMTRand::RandomInitByArray (UNUSED AND COMMENTED OUT) +/* static uint32_t func1(uint32_t x) { return (x ^ (x >> 27)) * 1664525U; } @@ -131,6 +132,7 @@ static uint32_t func1(uint32_t x) { static uint32_t func2(uint32_t x) { return (x ^ (x >> 27)) * 1566083941U; } +*/ // Subfunction for the sfmt algorithm static inline __m128i sfmt_recursion(__m128i const &a, __m128i const &b, diff --git a/sql/updates/world/2012_11_24_02_world_creature_text.sql b/sql/updates/world/2012_11_24_02_world_creature_text.sql new file mode 100644 index 00000000000..8797039d967 --- /dev/null +++ b/sql/updates/world/2012_11_24_02_world_creature_text.sql @@ -0,0 +1,346 @@ +-- ------------------------------- -- +-- Creature text conversion part 3 -- +-- ------------------------------- -- +-- crusader +DELETE FROM `creature_text` WHERE `entry` IN (28939,28610,28940) AND `groupid` IN (6,7,8); +INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES +-- Scarlet Preacher +(28939,6,0,12,0,100,"break crusader SAY_PERSUADED5","LIES! The pain you are about to endure will be talked about for years to come!"), +(28939,7,0,12,0,100,"break crusader SAY_PERSUADED6","NO! PLEASE! There is one more thing that I forgot to mention... A courier comes soon... From Hearthglen. It..."), +(28939,8,0,12,0,100,"player SAY_PERSUADE1","I'll tear the secrets from your soul! Tell me about the \"Crimson Dawn\" and your life may be spared!"), +(28939,8,1,12,0,100,"player SAY_PERSUADE2","Tell me what you know about \"Crimson Dawn\" or the beatings will continue!"), +(28939,8,2,12,0,100,"player SAY_PERSUADE3","I'm through being courteous with your kind, human! What is the \"Crimson Dawn\"?"), +(28939,8,3,12,0,100,"player SAY_PERSUADE4","Is your life worth so little? Just tell me what I need to know about \"Crimson Dawn\" and I'll end your suffering quickly."), +(28939,8,4,12,0,100,"player SAY_PERSUADE5","I can keep this up for a very long time, Scarlet dog! Tell me about the \"Crimson Dawn\"!"), +(28939,8,5,12,0,100,"player SAY_PERSUADE6","What is the \"Crimson Dawn\"?"), +(28939,8,6,12,0,100,"player SAY_PERSUADE7","\"Crimson Dawn\"! What is it! Speak!"), +-- Scarlet Crusader +(28940,6,0,12,0,100,"break crusader SAY_PERSUADED5","LIES! The pain you are about to endure will be talked about for years to come!"), +(28940,7,0,12,0,100,"break crusader SAY_PERSUADED6","NO! PLEASE! There is one more thing that I forgot to mention... A courier comes soon... From Hearthglen. It..."), +(28940,8,0,12,0,100,"player SAY_PERSUADE1","I'll tear the secrets from your soul! Tell me about the \"Crimson Dawn\" and your life may be spared!"), +(28940,8,1,12,0,100,"player SAY_PERSUADE2","Tell me what you know about \"Crimson Dawn\" or the beatings will continue!"), +(28940,8,2,12,0,100,"player SAY_PERSUADE3","I'm through being courteous with your kind, human! What is the \"Crimson Dawn\"?"), +(28940,8,3,12,0,100,"player SAY_PERSUADE4","Is your life worth so little? Just tell me what I need to know about \"Crimson Dawn\" and I'll end your suffering quickly."), +(28940,8,4,12,0,100,"player SAY_PERSUADE5","I can keep this up for a very long time, Scarlet dog! Tell me about the \"Crimson Dawn\"!"), +(28940,8,5,12,0,100,"player SAY_PERSUADE6","What is the \"Crimson Dawn\"?"), +(28940,8,6,12,0,100,"player SAY_PERSUADE7","\"Crimson Dawn\"! What is it! Speak!"), +-- Scarlet Marksman +(28610,6,0,12,0,100,"break crusader SAY_PERSUADED5","LIES! The pain you are about to endure will be talked about for years to come!"), +(28610,7,0,12,0,100,"break crusader SAY_PERSUADED6","NO! PLEASE! There is one more thing that I forgot to mention... A courier comes soon... From Hearthglen. It..."), +(28610,8,0,12,0,100,"player SAY_PERSUADE1","I'll tear the secrets from your soul! Tell me about the \"Crimson Dawn\" and your life may be spared!"), +(28610,8,1,12,0,100,"player SAY_PERSUADE2","Tell me what you know about \"Crimson Dawn\" or the beatings will continue!"), +(28610,8,2,12,0,100,"player SAY_PERSUADE3","I'm through being courteous with your kind, human! What is the \"Crimson Dawn\"?"), +(28610,8,3,12,0,100,"player SAY_PERSUADE4","Is your life worth so little? Just tell me what I need to know about \"Crimson Dawn\" and I'll end your suffering quickly."), +(28610,8,4,12,0,100,"player SAY_PERSUADE5","I can keep this up for a very long time, Scarlet dog! Tell me about the \"Crimson Dawn\"!"), +(28610,8,5,12,0,100,"player SAY_PERSUADE6","What is the \"Crimson Dawn\"?"), +(28610,8,6,12,0,100,"player SAY_PERSUADE7","\"Crimson Dawn\"! What is it! Speak!"); + +-- unworthy initiate +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1609016 AND -1609000; +DELETE FROM `creature_text` WHERE `entry` IN (29519,29520,29565,29566,29567); +INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES +(29519,0,0,12,0,100,"unworthy initiate SAY_EVENT_START_1","You have made a grave error, fiend!"), +(29519,0,1,12,0,100,"unworthy initiate SAY_EVENT_START_2","I was a soldier of the Light once... Look at what I have become... "), +(29519,0,2,12,0,100,"unworthy initiate SAY_EVENT_START_3","You are hopelessly outmatched, $R."), +(29519,0,3,12,0,100,"unworthy initiate SAY_EVENT_START_4","They brand me unworthy? I will show them unmorthy!"), +(29519,0,4,12,0,100,"unworthy initiate SAY_EVENT_START_5","You will allow me a weapon and armor, yes?"), +(29519,0,5,12,0,100,"unworthy initiate SAY_EVENT_START_6","I will win my freedom and leave this cursed place!"), +(29519,0,6,12,0,100,"unworthy initiate SAY_EVENT_START_7","I will dismantle this festering hellhole!"), +(29519,0,7,12,0,100,"unworthy initiate SAY_EVENT_START_8","There can be only one survivor!"), +(29519,1,0,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_1","To battle!"), +(29519,1,1,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_2","Let your fears consume you!"), +(29519,1,2,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_3","HAH! You can barely hold a blade! Yours will be a quick death."), +(29519,1,3,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_4","And now you die"), +(29519,1,4,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_5","To battle!"), +(29519,1,5,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_6","There is no hope for our future..."), +(29519,1,6,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_7","Sate your hunger on cold steel, $R"), +(29519,1,7,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_8","It ends here!"), +(29519,1,8,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_9","Death is the only cure!"), +(29520,0,0,12,0,100,"unworthy initiate SAY_EVENT_START_1","You have made a grave error, fiend!"), +(29520,0,1,12,0,100,"unworthy initiate SAY_EVENT_START_2","I was a soldier of the Light once... Look at what I have become... "), +(29520,0,2,12,0,100,"unworthy initiate SAY_EVENT_START_3","You are hopelessly outmatched, $R."), +(29520,0,3,12,0,100,"unworthy initiate SAY_EVENT_START_4","They brand me unworthy? I will show them unmorthy!"), +(29520,0,4,12,0,100,"unworthy initiate SAY_EVENT_START_5","You will allow me a weapon and armor, yes?"), +(29520,0,5,12,0,100,"unworthy initiate SAY_EVENT_START_6","I will win my freedom and leave this cursed place!"), +(29520,0,6,12,0,100,"unworthy initiate SAY_EVENT_START_7","I will dismantle this festering hellhole!"), +(29520,0,7,12,0,100,"unworthy initiate SAY_EVENT_START_8","There can be only one survivor!"), +(29520,1,0,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_1","To battle!"), +(29520,1,1,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_2","Let your fears consume you!"), +(29520,1,2,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_3","HAH! You can barely hold a blade! Yours will be a quick death."), +(29520,1,3,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_4","And now you die"), +(29520,1,4,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_5","To battle!"), +(29520,1,5,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_6","There is no hope for our future..."), +(29520,1,6,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_7","Sate your hunger on cold steel, $R"), +(29520,1,7,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_8","It ends here!"), +(29520,1,8,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_9","Death is the only cure!"), +(29565,0,0,12,0,100,"unworthy initiate SAY_EVENT_START_1","You have made a grave error, fiend!"), +(29565,0,1,12,0,100,"unworthy initiate SAY_EVENT_START_2","I was a soldier of the Light once... Look at what I have become... "), +(29565,0,2,12,0,100,"unworthy initiate SAY_EVENT_START_3","You are hopelessly outmatched, $R."), +(29565,0,3,12,0,100,"unworthy initiate SAY_EVENT_START_4","They brand me unworthy? I will show them unmorthy!"), +(29565,0,4,12,0,100,"unworthy initiate SAY_EVENT_START_5","You will allow me a weapon and armor, yes?"), +(29565,0,5,12,0,100,"unworthy initiate SAY_EVENT_START_6","I will win my freedom and leave this cursed place!"), +(29565,0,6,12,0,100,"unworthy initiate SAY_EVENT_START_7","I will dismantle this festering hellhole!"), +(29565,0,7,12,0,100,"unworthy initiate SAY_EVENT_START_8","There can be only one survivor!"), +(29565,1,0,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_1","To battle!"), +(29565,1,1,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_2","Let your fears consume you!"), +(29565,1,2,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_3","HAH! You can barely hold a blade! Yours will be a quick death."), +(29565,1,3,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_4","And now you die"), +(29565,1,4,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_5","To battle!"), +(29565,1,5,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_6","There is no hope for our future..."), +(29565,1,6,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_7","Sate your hunger on cold steel, $R"), +(29565,1,7,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_8","It ends here!"), +(29565,1,8,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_9","Death is the only cure!"), +(29566,0,0,12,0,100,"unworthy initiate SAY_EVENT_START_1","You have made a grave error, fiend!"), +(29566,0,1,12,0,100,"unworthy initiate SAY_EVENT_START_2","I was a soldier of the Light once... Look at what I have become... "), +(29566,0,2,12,0,100,"unworthy initiate SAY_EVENT_START_3","You are hopelessly outmatched, $R."), +(29566,0,3,12,0,100,"unworthy initiate SAY_EVENT_START_4","They brand me unworthy? I will show them unmorthy!"), +(29566,0,4,12,0,100,"unworthy initiate SAY_EVENT_START_5","You will allow me a weapon and armor, yes?"), +(29566,0,5,12,0,100,"unworthy initiate SAY_EVENT_START_6","I will win my freedom and leave this cursed place!"), +(29566,0,6,12,0,100,"unworthy initiate SAY_EVENT_START_7","I will dismantle this festering hellhole!"), +(29566,0,7,12,0,100,"unworthy initiate SAY_EVENT_START_8","There can be only one survivor!"), +(29566,1,0,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_1","To battle!"), +(29566,1,1,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_2","Let your fears consume you!"), +(29566,1,2,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_3","HAH! You can barely hold a blade! Yours will be a quick death."), +(29566,1,3,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_4","And now you die"), +(29566,1,4,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_5","To battle!"), +(29566,1,5,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_6","There is no hope for our future..."), +(29566,1,6,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_7","Sate your hunger on cold steel, $R"), +(29566,1,7,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_8","It ends here!"), +(29566,1,8,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_9","Death is the only cure!"), +(29567,0,0,12,0,100,"unworthy initiate SAY_EVENT_START_1","You have made a grave error, fiend!"), +(29567,0,1,12,0,100,"unworthy initiate SAY_EVENT_START_2","I was a soldier of the Light once... Look at what I have become... "), +(29567,0,2,12,0,100,"unworthy initiate SAY_EVENT_START_3","You are hopelessly outmatched, $R."), +(29567,0,3,12,0,100,"unworthy initiate SAY_EVENT_START_4","They brand me unworthy? I will show them unmorthy!"), +(29567,0,4,12,0,100,"unworthy initiate SAY_EVENT_START_5","You will allow me a weapon and armor, yes?"), +(29567,0,5,12,0,100,"unworthy initiate SAY_EVENT_START_6","I will win my freedom and leave this cursed place!"), +(29567,0,6,12,0,100,"unworthy initiate SAY_EVENT_START_7","I will dismantle this festering hellhole!"), +(29567,0,7,12,0,100,"unworthy initiate SAY_EVENT_START_8","There can be only one survivor!"), +(29567,1,0,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_1","To battle!"), +(29567,1,1,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_2","Let your fears consume you!"), +(29567,1,2,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_3","HAH! You can barely hold a blade! Yours will be a quick death."), +(29567,1,3,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_4","And now you die"), +(29567,1,4,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_5","To battle!"), +(29567,1,5,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_6","There is no hope for our future..."), +(29567,1,6,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_7","Sate your hunger on cold steel, $R"), +(29567,1,7,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_8","It ends here!"), +(29567,1,8,12,0,100,"unworthy initiate SAY_EVENT_ATTACK_9","Death is the only cure!"); + +-- dk initiate +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1609088 AND -1609080; +DELETE FROM `creature_text` WHERE `entry`=28406; +INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES +(28406,0,0,12,0,100,"dk initiate SAY_DUEL_A","No potions!"), +(28406,0,1,12,0,100,"dk initiate SAY_DUEL_B","Remember this day, $n, for it is the day that you will be thoroughly owned."), +(28406,0,2,12,0,100,"dk initiate SAY_DUEL_C","I'm going to tear your heart out, cupcake!"), +(28406,0,3,12,0,100,"dk initiate SAY_DUEL_D","Don't make me laugh."), +(28406,0,4,12,0,100,"dk initiate SAY_DUEL_E","Here come the tears..."), +(28406,0,5,12,0,100,"dk initiate SAY_DUEL_F","You have challenged death itself!"), +(28406,0,6,12,0,100,"dk initiate SAY_DUEL_G","The Lich King will see his true champion on this day!"), +(28406,0,7,12,0,100,"dk initiate SAY_DUEL_H","You're going down!"), +(28406,0,8,12,0,100,"dk initiate SAY_DUEL_I","You don't stand a chance, $n"); + +-- geddon +DELETE FROM `script_texts` WHERE `entry`=-1409000; +DELETE FROM `creature_text` WHERE `entry`=12056; +INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES +(12056,0,0,16,0,100,"geddon EMOTE_SERVICE","%s performs one last service for Ragnaros."); + +-- majordomo +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1409012 AND -1409003; +DELETE FROM `creature_text` WHERE `entry`=12018; +INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES +(12018,0,0,14,8035,100,"majordomo SAY_AGGRO","Reckless mortals, none may challenge the sons of the living flame!"), +(12018,1,0,14,8039,100,"majordomo SAY_SPAWN","The runes of warding have been destroyed! Hunt down the infedels my bretheren."), +(12018,2,0,14,8037,100,"majordomo SAY_SLAY","Ashes to Ashes!"), +(12018,3,0,14,8036,100,"majordomo SAY_SPECIAL","Burn mortals! Burn for this transgression!"), +(12018,4,0,14,8038,100,"majordomo SAY_DEFEAT","Impossible! Stay your attack mortals! I submitt! I submitt! Brashly you have come to rest the secrets of the living flame. You will soon regret the recklessness of your quest. I go now to summon the lord whos house this is. Should you seek an audiance with him your paltry lives will surly be forfit. Nevertheless seek out his lair if you dare!"), +(12018,5,0,14,8040,100,"majordomo SAY_SUMMON_MAJ","Behold Ragnaros, the Firelord! He who was ancient when this world was young! Bow before him, mortals! Bow before your ending!"), +(12018,6,0,14,8041,100,"majordomo SAY_ARRIVAL2_MAJ","These mortal infidels, my lord! They have invaded your sanctum, and seek to steal your secrets!"); + +-- magmadar +DELETE FROM `script_texts` WHERE `entry`=-1409001; +DELETE FROM `creature_text` WHERE `entry`=11982; +INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES +(11982,0,0,16,0,100,"magmadar EMOTE_FRENZY","%s goes into a killing frenzy!"); + +-- calvin montague +DELETE FROM `script_texts` WHERE `entry`=-1000431; +DELETE FROM `creature_text` WHERE `entry`=6784; +INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES +(6784,0,0,12,0,100,"calvin montague SAY_RIN_END_6","Ugh."); + +-- corporal keeshan +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1000468 AND -1000464; +DELETE FROM `creature_text` WHERE `entry`=349; +INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES +(349,0,0,12,0,100,"corporal keeshan SAY_CORPORAL_1","My wounds are grave. Forgive my slow pace but my injuries won't allow me to walk any faster."), +(349,1,0,12,0,100,"corporal keeshan SAY_CORPORAL_2","Ah,fresh air,at last! I need a moment to reset."), +(349,2,0,12,0,100,"corporal keeshan SAY_CORPORAL_3","The Blackrock infestation is thick in these parts. I will do my best to keep the pace. Let's go!"), +(349,3,0,12,0,100,"corporal keeshan SAY_CORPORAL_4","Marshal Marris,sir. Corporal Keeshan of the 12th Sabre Regiment returned from battle and reporting for duty!"), +(349,4,0,12,0,100,"corporal keeshan SAY_CORPORAL_5","Brave adventurer,thank you for rescuing me! I am sure Marshal Marris will reward your kind deed."); + +-- anchorite truuen +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1800070 AND -1800064; +DELETE FROM `creature_text` WHERE `entry` IN (17238,1854,17233); +INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES +(17238,0,0,12,0,100,"anchorite truuen SAY_WP_0","Beware! We are attacked!"), +(17238,1,0,12,0,100,"anchorite truuen SAY_WP_1","It must be the purity of the Mark of the Lightbringer that is drawing forth the Scourge to attack us. We must proceed with caution lest we be overwhelmed!"), +(17238,2,0,12,0,100,"anchorite truuen SAY_WP_2","This land truly needs to be cleansed by the Light! Let us continue on to the tomb. It isn't far now..."), +(1854,0,0,12,0,100,"anchorite truuen SAY_WP_3","Be welcome, friends!"), +(17233,0,0,12,0,100,"anchorite truuen SAY_WP_4","Thank you for coming here in remembrance of me. Your efforts in recovering that symbol, while unnecessary, are certainly touching to an old man's heart. "), +(17233,1,0,12,0,100,"anchorite truuen SAY_WP_5","Please, rise my friend. Keep the Blessing as a symbol of the strength of the Light and how heroes long gone might once again rise in each of us to inspire. "), +(17233,2,0,12,0,100,"anchorite truuen SAY_WP_6","Thank you my friend for making this possible. This is a day that I shall never forget! I think I will stay a while. Please return to High Priestess MacDonnell at the camp. I know that she'll be keenly interested to know of what has transpired here."); + +-- hakkar +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1309023 AND -1309020; +DELETE FROM `creature_text` WHERE `entry`=14834; +INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES +(14834,0,0,14,8414,100,"hakkar SAY_AGGRO","PRIDE HERALDS THE END OF YOUR WORLD. COME, MORTALS! FACE THE WRATH OF THE SOULFLAYER!"), +(14834,1,0,14,0,100,"hakkar SAY_FLEEING","Fleeing will do you no good, mortals!"), +(14834,2,0,14,0,100,"hakkar SAY_MINION_DESTROY","You dare set foot upon Hakkari holy ground? Minions of Hakkar, destroy the infidels!"), +(14834,3,0,14,0,100,"hakkar SAY_PROTECT_ALTAR","Minions of Hakkar, hear your God. The sanctity of this temple has been compromised. Invaders encroach upon holy ground! The Altar of Blood must be protected. Kill them all!"); + +-- thekal +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1309010 AND -1309009; +DELETE FROM `creature_text` WHERE `entry`=14509; +INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES +(14509,0,0,14,8419,100,"thekal SAY_AGGRO","Shirvallah, fill me with your RAGE!"), +(14509,1,0,14,8424,100,"thekal SAY_DEATH","Hakkar binds me no more! Peace at last!"); + +-- jeklik +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1309004 AND -1309002; +DELETE FROM `creature_text` WHERE `entry`=14517; +INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES +(14517,0,0,14,8417,100,"jeklik SAY_AGGRO","Lord Hir'eek, grant me wings of vengance!"), +(14517,1,0,14,0,100,"jeklik SAY_RAIN_FIRE","I command you to rain fire down upon these invaders!"), +(14517,2,0,14,8422,100,"jeklik SAY_DEATH","Finally ...death. Curse you Hakkar! Curse you!"); + +-- arlokk +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1309013 AND -1309011; +DELETE FROM `creature_text` WHERE `entry`=14515; +INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES +(14515,0,0,14,8416,100,"arlokk SAY_AGGRO","Bethekk, your priestess calls upon your might!"), +(14515,1,0,14,0,100,"arlokk SAY_FEAST_PANTHER","Feast on $n, my pretties!"), +(14515,2,0,14,8412,100,"arlokk SAY_DEATH","At last, I am free of the Soulflayer!"); + +-- mandokir / jindo +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1309019 AND -1309014; +DELETE FROM `creature_text` WHERE `entry` IN (11382,11380); +INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES +(11382,0,0,14,8413,100,"mandokir SAY_AGGRO","I'll feed your souls to Hakkar himself!"), +(11382,1,0,14,0,100,"mandokir SAY_DING_KILL","DING!"), +(11382,2,0,14,0,100,"mandokir SAY_WATCH","I'm keeping my eye on you, $N!"), +(11382,3,0,14,0,100,"mandokir SAY_WATCH_WHISPER","Don't make me angry. You won't like it when I'm angry."), +(11380,0,0,14,0,100,"mandokir SAY_GRATS_JINDO","GRATS!"), +(11380,1,0,14,8425,100,"jindo SAY_AGGRO","Welcome to da great show friends! Step right up to die!"); + +-- marli +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1309008 AND -1309005; +DELETE FROM `creature_text` WHERE `entry`=14510; +INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES +(14510,0,0,14,8418,100,"marli SAY_AGGRO","Draw me to your web mistress Shadra. Unleash your venom!"), +(14510,1,0,14,0,100,"marli SAY_TRANSFORM","Shadra, make of me your avatar!"), +(14510,2,0,14,0,100,"marli SAY_SPIDER_SPAWN","Aid me my brood!"), +(14510,3,0,14,8423,100,"marli SAY_DEATH","Bless you mortal for this release. Hakkar controls me no longer..."); + +-- clintar +DELETE FROM `script_texts` WHERE `entry`=-1000283; +DELETE FROM `creature_text` WHERE `entry`=16364; +INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES +(16364,0,0,12,0,100,"clintar SAY_RELIC1","That's the first relic, but there are still two more. Follow me, $N."); + +-- freed soul +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1329003 AND -1329000; +DELETE FROM `creature_text` WHERE `entry`=11136; +INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES +(11136,0,0,12,0,100,"freed soul SAY_ZAPPED0","Thanks to Egan"), +(11136,0,1,12,0,100,"freed soul SAY_ZAPPED1","Rivendare must die"), +(11136,0,2,12,0,100,"freed soul SAY_ZAPPED2","Who you gonna call?"), +(11136,0,3,12,0,100,"freed soul SAY_ZAPPED3","Don't cross those beams!"); + +-- erland +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1000317 AND -1000306; +DELETE FROM `creature_text` WHERE `entry` IN (1978,1950,1951); +INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES +(1978,0,0,12,0,100,"erland SAY_QUESTACCEPT","Let's get to the others, and keep an eye open for those wolves cutside..."), +(1978,1,0,12,0,100,"erland SAY_START","Be careful, $N. Those wolves like to hide among the trees."), +(1978,2,0,12,0,100,"erland SAY_AGGRO_1","A $C attacks!"), +(1978,2,1,12,0,100,"erland SAY_AGGRO_2","Beware! I am under attack!"), +(1978,2,2,12,0,100,"erland SAY_AGGRO_3","Oh no! A $C is upon us!"), +(1978,3,0,12,0,100,"erland SAY_PROGRESS","We're almost there!"), +(1978,4,0,12,0,100,"erland SAY_LAST","We made it! Thanks, $N. I couldn't have gotten without you."), +(1950,0,0,12,0,100,"erland SAY_RANE","It's good to see you again, Erland. What is your report?"), +(1978,5,0,12,0,100,"erland SAY_RANE_ANSWER","Masses of wolves are to the east, and whoever lived at Malden's Orchard is gone."), +(1978,6,0,12,0,100,"erland SAY_MOVE_QUINN","If I am excused, then I'd like to check on Quinn..."), +(1978,7,0,12,0,100,"erland SAY_QUINN","Hello, Quinn. How are you faring?"), +(1951,0,0,12,0,100,"erland SAY_QUINN_ANSWER","I've been better. Ivar the Foul got the better of me..."), +(1978,8,0,12,0,100,"erland SAY_BYE","Try to take better care of yourself, Quinn. You were lucky this time."); + +-- converted sentry +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1000189 AND -1000188; +DELETE FROM `creature_text` WHERE `entry`=24981; +INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES +(24981,0,0,12,0,100,"converted sentry SAY_CONVERTED_1","Deployment sucessful. Trespassers will be neutralized."), +(24981,0,1,12,0,100,"converted sentry SAY_CONVERTED_2","Objective acquired. Initiating security routines."); + +-- example creature +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1999910 AND -1999900; + +-- example escort +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1999921 AND -1999910; + +-- example gossip codebox +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1999924 AND -1999922; + +-- azuregos +DELETE FROM `script_texts` WHERE `entry`=-1000100; +DELETE FROM `creature_text` WHERE `entry`=6109; +INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES +(6109,0,0,14,0,100,"azuregos SAY_TELEPORT","Come, little ones. Face me!"); + +-- ame +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1000522 AND -1000517; +DELETE FROM `creature_text` WHERE `entry`=9623; +INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES +(9623,0,0,12,0,100,"ame SAY_READY","A-Me good. Good, A-Me. Follow... follow A-Me. Home. A-Me go home."), +(9623,1,0,12,0,100,"ame SAY_AGGRO1","$c, no hurt A-Me. A-Me good."), +(9623,2,0,12,0,100,"ame SAY_SEARCH","Good... good, A-Me. A-Me good. Home. Find home."), +(9623,3,0,12,0,100,"ame SAY_AGGRO2","Danger. Danger! $c try hurt A-Me."), +(9623,4,0,12,0,100,"ame SAY_AGGRO3","Bad, $c. $c, bad!"), +(9623,5,0,12,0,100,"ame SAY_FINISH","A-Me home! A-Me good! Good A-Me. Home. Home. Home."); + +-- ringo +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1000433 AND -1000416; +DELETE FROM `creature_text` WHERE `entry` IN (9999,9997); +INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES +(9999,0,0,12,0,100,"ringo SAY_RIN_START_1","Well, I'm not sure how far I'll make it in this state... I'm feeling kind of faint..."), +(9999,0,1,12,0,100,"ringo SAY_RIN_START_2","Remember, if I faint again, the water that Spraggle gave you will revive me."), +(9999,1,0,12,0,100,"ringo SAY_FAINT_1","The heat... I can't take it..."), +(9999,1,1,12,0,100,"ringo SAY_FAINT_2","Maybe... you could carry me?"), +(9999,1,2,12,0,100,"ringo SAY_FAINT_3","Uuuuuuggggghhhhh...."), +(9999,1,3,12,0,100,"ringo SAY_FAINT_4","I'm not feeling so well..."), +(9999,2,0,12,0,100,"ringo SAY_WAKE_1","Where... Where am I?"), +(9999,2,1,12,0,100,"ringo SAY_WAKE_2","I am feeling a little better now, thank you."), +(9999,2,2,12,0,100,"ringo SAY_WAKE_3","Yes, I must go on."), +(9999,2,3,12,0,100,"ringo SAY_WAKE_4","How am I feeling? Quite soaked, thank you."), +(9999,3,0,12,0,100,"ringo SAY_RIN_END_1","Spraggle! I didn't think I'd make it back!"), +(9997,0,0,12,0,100,"ringo SAY_SPR_END_2","Ringo! You're okay!"), +(9999,4,0,12,0,100,"ringo SAY_RIN_END_3","Oh... I'm feeling faint..."), +(9999,5,0,16,0,100,"ringo EMOTE_RIN_END_4","%s collapses onto the ground."), +(9999,6,0,16,0,100,"ringo EMOTE_RIN_END_5","%s stands up after a short pause."), +(9999,7,0,12,0,100,"ringo SAY_RIN_END_6","Ugh."), +(9997,1,0,12,0,100,"ringo SAY_SPR_END_7","Ringo? Wake up! Don't worry, I'll take care of you."), +(9999,8,0,16,0,100,"ringo EMOTE_RIN_END_8","%s fades away after a long pause."); + +-- Corrections +DELETE FROM `creature_text` WHERE `entry`=3850; +INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`language`,`emote`,`comment`,`text`) VALUES +(3850,0,0,14,0,100,7,1,"prisoner ashcrombe SAY_FREE_AS","Follow me and I'll open the courtyard door for you."), +(3850,1,0,14,0,100,7,1,"prisoner ashcrombe SAY_OPEN_DOOR_AS","I have just the spell to get this door open. Too bad the cell doors weren't locked so haphazardly."), +(3850,2,0,14,0,100,7,1,"prisoner ashcrombe SAY_POST_DOOR_AS","There it is! Wide open. Good luck to you conquering what lies beyond. I must report back to the Kirin Tor at once!"), +(3850,3,0,12,0,100,7,1,"prisoner ashcrombe SAY_BOSS_DIE_AS","For once I agree with you... scum."); + +DELETE FROM `creature_text` WHERE `entry`=7766; +INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES +(7766,0,0,12,0,100,"tyrion spybot SAY_TYRION_1","Wait here. Spybot will make Lescovar come out as soon as possible. Be ready! Attack only after you've overheard their conversation."), +(7766,1,0,14,0,100,"lord gregor lescovar SAY_TYRION_2","That's it! That's what you were waiting for! KILL THEM!"); diff --git a/sql/updates/world/2012_11_26_03_world_misc.sql b/sql/updates/world/2012_11_26_03_world_misc.sql new file mode 100644 index 00000000000..5a6140e6bf3 --- /dev/null +++ b/sql/updates/world/2012_11_26_03_world_misc.sql @@ -0,0 +1,115 @@ +-- The Battle For Crusaders' Pinnacle (13141) + +SET @SPELL_ITEM_BANNER := 58013; -- Plant Blessed Banner +SET @SPELL_TORCH := 58121; +SET @SPELL_TORCH_EFFECT := 58125; + +SET @NPC_BLESSED_BANNER := 30891; -- Blessed Banner of the Crusade +SET @NPC_CRUSADER_DALFORS := 31003; -- Crusader Lord Dalfors +SET @NPC_BATTLE_PRIEST := 30919; -- Argent Battle-priest +SET @NPC_MASON := 30900; -- Argent Mason +SET @NPC_TORCH_DUMMY := 31004; -- (Wave 0) Torch Dummy +SET @NPC_LK := 31013; -- The Lich King +SET @NPC_CAPTAIN := 30986; +SET @NPC_DRUDGE := 30984; +SET @NPC_PLAGEBRINGER := 30987; +SET @NPC_HALOF := 30989; + +SET @EVENT_SCRIPT := 20082; + +DELETE FROM `spell_target_position` WHERE `id`=@SPELL_ITEM_BANNER; +INSERT INTO `spell_target_position` (`id`,`target_map`,`target_position_x`,`target_position_y`,`target_position_z`,`target_orientation`) VALUES +(@SPELL_ITEM_BANNER,571,6418.42,422.97,511.11,0); + +UPDATE `creature_template` SET `faction_A`=2140,`faction_H`=2140,`ScriptName`='npc_blessed_banner' WHERE `entry`=@NPC_BLESSED_BANNER; +UPDATE `creature_template` SET `faction_A`=2131,`faction_H`=2131,`AIName`='SmartAI',`unit_flags`=32768,`equipment_id`=@NPC_CRUSADER_DALFORS WHERE `entry`=@NPC_CRUSADER_DALFORS; +UPDATE `creature_template` SET `faction_A`=2131,`faction_H`=2131,`AIName`='SmartAI',`unit_flags`=32768,`equipment_id`=@NPC_BATTLE_PRIEST WHERE `entry`=@NPC_BATTLE_PRIEST; +UPDATE `creature_template` SET `faction_A`=2070,`faction_H`=2070,`unit_flags`=32768,`AIName`='SmartAI',`equipment_id`=@NPC_MASON WHERE `entry`=@NPC_MASON; +UPDATE `creature_template` SET `unit_flags`=33554432,`InhabitType`=4,`AIName`='SmartAI',`flags_extra`=128 WHERE `entry`=@NPC_TORCH_DUMMY; +UPDATE `creature_template` SET `unit_flags`=33554432,`flags_extra`=128 WHERE `entry`=@NPC_LK; +UPDATE `creature_template` SET `faction_A`=2068,`faction_H`=2068,`unit_flags`=32768,`AIName`='SmartAI' WHERE `entry`=@NPC_CAPTAIN; +UPDATE `creature_template` SET `faction_A`=2068,`faction_H`=2068,`unit_flags`=32768,`AIName`='SmartAI' WHERE `entry`=@NPC_DRUDGE; +UPDATE `creature_template` SET `faction_A`=2068,`faction_H`=2068,`unit_flags`=32768,`AIName`='SmartAI' WHERE `entry`=@NPC_PLAGEBRINGER; +UPDATE `creature_template` SET `faction_A`=2068,`faction_H`=2068,`unit_flags`=32768 WHERE `entry`=@NPC_HALOF; + +DELETE FROM `creature_template_addon` WHERE `entry` IN (@NPC_BLESSED_BANNER,@NPC_CRUSADER_DALFORS,@NPC_BATTLE_PRIEST,@NPC_MASON); +INSERT INTO `creature_template_addon` (`entry`, `mount`, `bytes1`, `bytes2`, `auras`) VALUES +(@NPC_BLESSED_BANNER, 0, 0x0, 0x1, '58026'), -- Blessing of the Crusade +(@NPC_CRUSADER_DALFORS,2786,0x0,0x1,'58110'), -- Threat Pulse +(@NPC_BATTLE_PRIEST,0,0x0,0x1,'58110'), -- Threat Pulse +(@NPC_MASON,0,0x0,0x1,''); + +DELETE FROM `creature_equip_template` WHERE `entry` IN (@NPC_CRUSADER_DALFORS,@NPC_BATTLE_PRIEST,@NPC_MASON); +INSERT INTO `creature_equip_template` (`entry`,`itemEntry1`,`itemEntry2`,`itemEntry3`) VALUES +(@NPC_CRUSADER_DALFORS,39290,40596,0), +(@NPC_BATTLE_PRIEST,42544,42543,0), +(@NPC_MASON,1906,2081,0); + +DELETE FROM `creature_text` WHERE `entry` IN (@NPC_BLESSED_BANNER,@NPC_CRUSADER_DALFORS,@NPC_LK); +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@NPC_BLESSED_BANNER,0,0,'The Blessed Banner of the Crusade has been planted.\n Defend the banner from all attackers!',41,0,100,0,0,0,'Blessed Banner of the Crusade'), +(@NPC_CRUSADER_DALFORS,0,0,'BY THE LIGHT! Those damned monsters! Look at what they''ve done to our people!',12,0,100,5,0,0,'Crusader Lord Dalfors'), +(@NPC_CRUSADER_DALFORS,1,0,'Burn it down, boys. Burn it all down.',12,0,100,1,0,0,'Crusader Lord Dalfors'), +(@NPC_CRUSADER_DALFORS,2,0,'Let ''em come. They''ll pay for what they''ve done!',12,0,100,1,0,0,'Crusader Lord Dalfors'), +(@NPC_CRUSADER_DALFORS,3,0,'We''ve done it, lads! We''ve taken the pinnacle from the Scourge! Report to Father Gustav at once and tell him the good news! We''re gonna get to buildin'' and settin'' up! Go!',14,0,100,71,0,0,'Crusader Lord Dalfors'), +(@NPC_LK,0,0,'Leave no survivors!',14,0,100,0,0,14793,'The Lich King'), +(@NPC_LK,1,0,'Cower before my terrible creations!',14,0,100,0,0,14800,'The Lich King'), +(@NPC_LK,2,0,'Feast my children! Feast upon the flesh of the living!',14,0,100,0,0,14801,'The Lich King'), +(@NPC_LK,3,0,'Lay down your arms and surrender your souls!',14,0,100,0,0,14802,'The Lich King'); + +DELETE FROM `event_scripts` WHERE `id`=@EVENT_SCRIPT; +INSERT INTO `event_scripts` (`id`, `delay`, `command`, `datalong`, `datalong2`, `x`, `y`, `z`, `o`) VALUES +(@EVENT_SCRIPT,0,10,@NPC_BLESSED_BANNER,600000,6418.422,422.9706,511.1964,5.8119); + +SET @CGUID := 85714; -- need 18 (85714<->85731) +DELETE FROM `creature` WHERE `id` IN (@NPC_TORCH_DUMMY,@NPC_LK); +INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`MovementType`) VALUES +(@CGUID+0,@NPC_TORCH_DUMMY,571,1,128,6405.316,431.9516,518.2324,0.296706,120,0,0), +(@CGUID+1,@NPC_TORCH_DUMMY,571,1,128,6408.057,424.2077,511.3653,1.256637,120,0,0), +(@CGUID+2,@NPC_TORCH_DUMMY,571,1,128,6371.181,452.4539,513.5053,1.204277,120,0,0), +(@CGUID+3,@NPC_TORCH_DUMMY,571,1,128,6391.331,460.3002,511.3657,1.745329,120,0,0), +(@CGUID+4,@NPC_TORCH_DUMMY,571,1,128,6393.723,427.9692,538.7354,1.692969,120,0,0), +(@CGUID+5,@NPC_TORCH_DUMMY,571,1,128,6374.808,445.4873,517.7629,4.031711,120,0,0), +(@CGUID+6,@NPC_TORCH_DUMMY,571,1,128,6382.271,451.9008,537.9304,1.32645,120,0,0), +(@CGUID+7,@NPC_TORCH_DUMMY,571,1,128,6366.836,459.1225,530.3361,0.7330383,120,0,0), +(@CGUID+8,@NPC_TORCH_DUMMY,571,1,128,6372.479,447.4598,511.3725,0.2443461,120,0,0), +(@CGUID+9,@NPC_TORCH_DUMMY,571,1,128,6394.698,427.4731,523.7177,1.850049,120,0,0), +(@CGUID+10,@NPC_TORCH_DUMMY,571,1,128,6367.246,459.7583,518.8009,3.857178,120,0,0), +(@CGUID+11,@NPC_TORCH_DUMMY,571,1,128,6396.961,432.8676,533.744,3.176499,120,0,0), +(@CGUID+12,@NPC_TORCH_DUMMY,571,1,128,6403.202,464.2955,535.6572,3.857178,120,0,0), +(@CGUID+13,@NPC_TORCH_DUMMY,571,1,128,6401.721,464.4387,543.1727,2.199115,120,0,0), +(@CGUID+14,@NPC_TORCH_DUMMY,571,1,128,6392.169,475.7449,512.7209,0.6283185,120,0,0), +(@CGUID+15,@NPC_TORCH_DUMMY,571,1,128,6397.238,475.2313,529.652,4.328416,120,0,0), +(@CGUID+16,@NPC_TORCH_DUMMY,571,1,128,6389.221,474.0008,511.365,1.553343,120,0,0), +(@CGUID+17,@NPC_LK,571,1,128,6389.73,451.2743,513.3198,1.32645,120,0,0); + +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid` IN (@NPC_TORCH_DUMMY,@NPC_MASON); +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 +(@NPC_TORCH_DUMMY,0,0,0,8,0,100,0,@SPELL_TORCH,0,0,0,11,@SPELL_TORCH_EFFECT,0,0,0,0,0,1,0,0,0,0,0,0,0,'On spellhit - Cast Torch Visual'), +(@NPC_MASON,0,0,0,38,0,100,0,1,1,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'On data - Set phase 1'), +(@NPC_MASON,0,1,0,60,1,100,0,0,10000,10000,20000,11,@SPELL_TORCH,0,0,0,0,0,1,0,0,0,0,0,0,0,'On update - Cast spell Torch'); + +DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId`=13 AND `SourceEntry`=@SPELL_TORCH) OR (`SourceTypeOrReferenceId`=17 AND `SourceEntry`=@SPELL_ITEM_BANNER); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(13,1,@SPELL_TORCH,0,0,31,0,3,@NPC_TORCH_DUMMY,0,0,0,'','Spell Torch targets Torch Dummy'), +(17,0,@SPELL_ITEM_BANNER,0,0,29,0,@NPC_BLESSED_BANNER,10,0,1,0,'','Cast Plant Blessed Banner if no banner is already spawned.'); + +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid` IN (@NPC_CRUSADER_DALFORS,@NPC_BATTLE_PRIEST,@NPC_CAPTAIN,@NPC_DRUDGE,@NPC_PLAGEBRINGER); +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 +-- Crusader Lord Dalfors +(@NPC_CRUSADER_DALFORS,0,0,0,2,0,100,1,0,50,0,0,11,58053,0,0,0,0,0,1,0,0,0,0,0,0,0,'Cast Holy Light at 50% HP'), +(@NPC_CRUSADER_DALFORS,0,1,0,0,0,100,0,5000,8000,23000,29000,11,37554,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast Shield'), +-- Argent Battle-priest +(@NPC_BATTLE_PRIEST,0,0,0,1,0,100,0,500,1000,600000,600000,11,58054,0,0,0,0,0,1,0,0,0,0,0,0,0,'Cast Blessing of Kings on Spawn'), +(@NPC_BATTLE_PRIEST,0,1,0,2,0,100,1,0,50,0,0,11,58053,0,0,0,0,0,1,0,0,0,0,0,0,0,'Cast Holy Light at 50% HP'), +(@NPC_BATTLE_PRIEST,0,2,0,14,0,100,0,50000,10,20000,30000,11,58053,0,0,0,0,0,7,0,0,0,0,0,0,0,'Cast Holy Light on Friendlies'), +-- Reanimated Captain +(@NPC_CAPTAIN,0,0,0,4,0,100,1,0,0,0,0,11,32674,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast Avenger''s Shield on Aggro'), +(@NPC_CAPTAIN,0,1,0,0,0,100,0,5000,5000,17800,19800,11,58154,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast Hammer of Injustice'), +(@NPC_CAPTAIN,0,2,0,2,0,100,1,0,45,0,0,11,58153,0,0,0,0,0,1,0,0,0,0,0,0,0,'Cast Unholy Light at 45% HP'), +(@NPC_CAPTAIN,0,3,0,14,0,100,0,4000,10,20000,30000,11,58153,0,0,0,0,0,7,0,0,0,0,0,0,0,'Cast Unholy Light on Friendlies'), +-- Scourge Drudge +(@NPC_DRUDGE,0,0,0,0,0,100,0,5000,5000,11300,14500,11,51917,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast Cleave'), +(@NPC_DRUDGE,0,1,0,0,0,100,0,7000,9000,17800,20200,11,49678,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast Flesh Rot'), +-- Hideous Plaguebringer +(@NPC_PLAGEBRINGER,0,0,0,0,0,100,0,3400,4600,11400,16500,11,38761,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast Arcing Smash'); diff --git a/src/server/authserver/Authentication/AuthCodes.h b/src/server/authserver/Authentication/AuthCodes.h old mode 100755 new mode 100644 diff --git a/src/server/authserver/Main.cpp b/src/server/authserver/Main.cpp old mode 100755 new mode 100644 diff --git a/src/server/authserver/Realms/RealmList.cpp b/src/server/authserver/Realms/RealmList.cpp old mode 100755 new mode 100644 index 453efd5bf72..79df2b15605 --- a/src/server/authserver/Realms/RealmList.cpp +++ b/src/server/authserver/Realms/RealmList.cpp @@ -31,7 +31,7 @@ void RealmList::Initialize(uint32 updateInterval) UpdateRealms(true); } -void RealmList::UpdateRealm(uint32 ID, const std::string& name, const std::string& address, uint16 port, uint8 icon, RealmFlags flag, uint8 timezone, AccountTypes allowedSecurityLevel, float popu, uint32 build) +void RealmList::UpdateRealm(uint32 ID, const std::string& name, ACE_INET_Addr const& address, uint8 icon, RealmFlags flag, uint8 timezone, AccountTypes allowedSecurityLevel, float popu, uint32 build) { // Create new if not exist or update existed Realm& realm = m_realms[name]; @@ -45,9 +45,7 @@ void RealmList::UpdateRealm(uint32 ID, const std::string& name, const std::strin realm.populationLevel = popu; // Append port to IP address. - std::ostringstream ss; - ss << address << ':' << port; - realm.address = ss.str(); + address.addr_to_string(realm.address, ACE_MAX_FULLY_QUALIFIED_NAME_LEN + 16); realm.gamebuild = build; } @@ -80,8 +78,8 @@ void RealmList::UpdateRealms(bool init) { Field* fields = result->Fetch(); uint32 realmId = fields[0].GetUInt32(); - const std::string& name = fields[1].GetString(); - const std::string& address = fields[2].GetString(); + std::string name = fields[1].GetString(); + std::string address = fields[2].GetString(); uint16 port = fields[3].GetUInt16(); uint8 icon = fields[4].GetUInt8(); RealmFlags flag = RealmFlags(fields[5].GetUInt8()); @@ -90,10 +88,12 @@ void RealmList::UpdateRealms(bool init) float pop = fields[8].GetFloat(); uint32 build = fields[9].GetUInt32(); - UpdateRealm(realmId, name, address, port, icon, flag, timezone, (allowedSecurityLevel <= SEC_ADMINISTRATOR ? AccountTypes(allowedSecurityLevel) : SEC_ADMINISTRATOR), pop, build); + ACE_INET_Addr addr(port, address.c_str(), AF_INET); + + UpdateRealm(realmId, name, addr, icon, flag, timezone, (allowedSecurityLevel <= SEC_ADMINISTRATOR ? AccountTypes(allowedSecurityLevel) : SEC_ADMINISTRATOR), pop, build); if (init) - sLog->outInfo(LOG_FILTER_AUTHSERVER, "Added realm \"%s\".", fields[1].GetCString()); + sLog->outInfo(LOG_FILTER_AUTHSERVER, "Added realm \"%s\" at %s.", name.c_str(), m_realms[name].address); } while (result->NextRow()); } diff --git a/src/server/authserver/Realms/RealmList.h b/src/server/authserver/Realms/RealmList.h old mode 100755 new mode 100644 index c8407b0fea1..52482897ea4 --- a/src/server/authserver/Realms/RealmList.h +++ b/src/server/authserver/Realms/RealmList.h @@ -21,6 +21,7 @@ #include #include +#include #include "Common.h" enum RealmFlags @@ -39,7 +40,7 @@ enum RealmFlags // Storage object for a realm struct Realm { - std::string address; + char address[ACE_MAX_FULLY_QUALIFIED_NAME_LEN + 16]; std::string name; uint8 icon; RealmFlags flag; @@ -71,7 +72,7 @@ public: private: void UpdateRealms(bool init=false); - void UpdateRealm(uint32 ID, const std::string& name, const std::string& address, uint16 port, uint8 icon, RealmFlags flag, uint8 timezone, AccountTypes allowedSecurityLevel, float popu, uint32 build); + void UpdateRealm(uint32 ID, const std::string& name, ACE_INET_Addr const& address, uint8 icon, RealmFlags flag, uint8 timezone, AccountTypes allowedSecurityLevel, float popu, uint32 build); RealmMap m_realms; uint32 m_UpdateInterval; diff --git a/src/server/authserver/Server/AuthSocket.h b/src/server/authserver/Server/AuthSocket.h old mode 100755 new mode 100644 diff --git a/src/server/authserver/Server/RealmAcceptor.h b/src/server/authserver/Server/RealmAcceptor.h old mode 100755 new mode 100644 diff --git a/src/server/authserver/Server/RealmSocket.cpp b/src/server/authserver/Server/RealmSocket.cpp old mode 100755 new mode 100644 diff --git a/src/server/authserver/Server/RealmSocket.h b/src/server/authserver/Server/RealmSocket.h old mode 100755 new mode 100644 diff --git a/src/server/authserver/authserver.rc b/src/server/authserver/authserver.rc old mode 100755 new mode 100644 diff --git a/src/server/collision/BoundingIntervalHierarchy.cpp b/src/server/collision/BoundingIntervalHierarchy.cpp old mode 100755 new mode 100644 diff --git a/src/server/collision/BoundingIntervalHierarchy.h b/src/server/collision/BoundingIntervalHierarchy.h old mode 100755 new mode 100644 diff --git a/src/server/collision/Management/IVMapManager.h b/src/server/collision/Management/IVMapManager.h old mode 100755 new mode 100644 diff --git a/src/server/collision/Management/VMapFactory.cpp b/src/server/collision/Management/VMapFactory.cpp old mode 100755 new mode 100644 diff --git a/src/server/collision/Management/VMapFactory.h b/src/server/collision/Management/VMapFactory.h old mode 100755 new mode 100644 diff --git a/src/server/collision/Management/VMapManager2.h b/src/server/collision/Management/VMapManager2.h old mode 100755 new mode 100644 diff --git a/src/server/collision/Maps/MapTree.h b/src/server/collision/Maps/MapTree.h old mode 100755 new mode 100644 diff --git a/src/server/collision/Maps/TileAssembler.h b/src/server/collision/Maps/TileAssembler.h old mode 100755 new mode 100644 diff --git a/src/server/collision/Models/ModelInstance.h b/src/server/collision/Models/ModelInstance.h old mode 100755 new mode 100644 diff --git a/src/server/collision/Models/WorldModel.h b/src/server/collision/Models/WorldModel.h old mode 100755 new mode 100644 diff --git a/src/server/collision/VMapTools.h b/src/server/collision/VMapTools.h old mode 100755 new mode 100644 diff --git a/src/server/game/AI/CoreAI/CombatAI.cpp b/src/server/game/AI/CoreAI/CombatAI.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/AI/CoreAI/CombatAI.h b/src/server/game/AI/CoreAI/CombatAI.h old mode 100755 new mode 100644 diff --git a/src/server/game/AI/CoreAI/GuardAI.cpp b/src/server/game/AI/CoreAI/GuardAI.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/AI/CoreAI/GuardAI.h b/src/server/game/AI/CoreAI/GuardAI.h old mode 100755 new mode 100644 diff --git a/src/server/game/AI/CoreAI/PassiveAI.cpp b/src/server/game/AI/CoreAI/PassiveAI.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/AI/CoreAI/PassiveAI.h b/src/server/game/AI/CoreAI/PassiveAI.h old mode 100755 new mode 100644 diff --git a/src/server/game/AI/CoreAI/PetAI.cpp b/src/server/game/AI/CoreAI/PetAI.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/AI/CoreAI/PetAI.h b/src/server/game/AI/CoreAI/PetAI.h old mode 100755 new mode 100644 diff --git a/src/server/game/AI/CoreAI/ReactorAI.cpp b/src/server/game/AI/CoreAI/ReactorAI.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/AI/CoreAI/ReactorAI.h b/src/server/game/AI/CoreAI/ReactorAI.h old mode 100755 new mode 100644 diff --git a/src/server/game/AI/CoreAI/TotemAI.cpp b/src/server/game/AI/CoreAI/TotemAI.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/AI/CoreAI/TotemAI.h b/src/server/game/AI/CoreAI/TotemAI.h old mode 100755 new mode 100644 diff --git a/src/server/game/AI/CoreAI/UnitAI.cpp b/src/server/game/AI/CoreAI/UnitAI.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/AI/CoreAI/UnitAI.h b/src/server/game/AI/CoreAI/UnitAI.h old mode 100755 new mode 100644 diff --git a/src/server/game/AI/CreatureAI.cpp b/src/server/game/AI/CreatureAI.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/AI/CreatureAI.h b/src/server/game/AI/CreatureAI.h old mode 100755 new mode 100644 diff --git a/src/server/game/AI/CreatureAIFactory.h b/src/server/game/AI/CreatureAIFactory.h old mode 100755 new mode 100644 diff --git a/src/server/game/AI/CreatureAIImpl.h b/src/server/game/AI/CreatureAIImpl.h old mode 100755 new mode 100644 diff --git a/src/server/game/AI/CreatureAIRegistry.cpp b/src/server/game/AI/CreatureAIRegistry.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/AI/CreatureAIRegistry.h b/src/server/game/AI/CreatureAIRegistry.h old mode 100755 new mode 100644 diff --git a/src/server/game/AI/CreatureAISelector.cpp b/src/server/game/AI/CreatureAISelector.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/AI/CreatureAISelector.h b/src/server/game/AI/CreatureAISelector.h old mode 100755 new mode 100644 diff --git a/src/server/game/Accounts/AccountMgr.cpp b/src/server/game/Accounts/AccountMgr.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Accounts/AccountMgr.h b/src/server/game/Accounts/AccountMgr.h old mode 100755 new mode 100644 diff --git a/src/server/game/Achievements/AchievementMgr.h b/src/server/game/Achievements/AchievementMgr.h old mode 100755 new mode 100644 index aa13dac3649..dfaaa147384 --- a/src/server/game/Achievements/AchievementMgr.h +++ b/src/server/game/Achievements/AchievementMgr.h @@ -71,7 +71,6 @@ enum AchievementCriteriaDataType #define MAX_ACHIEVEMENT_CRITERIA_DATA_TYPE 22 // maximum value in AchievementCriteriaDataType enum - struct AchievementCriteriaData { AchievementCriteriaDataType dataType; @@ -175,7 +174,7 @@ struct AchievementCriteriaData } bool IsValid(AchievementCriteriaEntry const* criteria); - bool Meets(uint32 criteria_id, Player const* source, Unit const* target, uint32 miscvalue1 = 0) const; + bool Meets(uint32 criteria_id, Player const* source, Unit const* target, uint32 miscValue1 = 0) const; }; struct AchievementCriteriaDataSet @@ -183,7 +182,7 @@ struct AchievementCriteriaDataSet AchievementCriteriaDataSet() : criteria_id(0) {} typedef std::vector Storage; void Add(AchievementCriteriaData const& data) { storage.push_back(data); } - bool Meets(Player const* source, Unit const* target, uint32 miscvalue = 0) const; + bool Meets(Player const* source, Unit const* target, uint32 miscValue = 0) const; void SetCriteriaId(uint32 id) {criteria_id = id;} private: uint32 criteria_id; diff --git a/src/server/game/Addons/AddonMgr.cpp b/src/server/game/Addons/AddonMgr.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Addons/AddonMgr.h b/src/server/game/Addons/AddonMgr.h old mode 100755 new mode 100644 diff --git a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp index db51f01ce4a..74f70f6bb4b 100644 --- a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp +++ b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp @@ -573,7 +573,6 @@ void AuctionHouseObject::BuildListAuctionItems(WorldPacket& data, Player* player if (itemRandProp) { char* temp = itemRandProp->nameSuffix; - //char* temp = itemRandProp->nameSuffix; // dbc local name if (temp) diff --git a/src/server/game/Battlegrounds/ArenaTeam.cpp b/src/server/game/Battlegrounds/ArenaTeam.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Battlegrounds/ArenaTeam.h b/src/server/game/Battlegrounds/ArenaTeam.h old mode 100755 new mode 100644 diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Battlegrounds/Battleground.h b/src/server/game/Battlegrounds/Battleground.h old mode 100755 new mode 100644 diff --git a/src/server/game/Battlegrounds/BattlegroundMgr.cpp b/src/server/game/Battlegrounds/BattlegroundMgr.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Battlegrounds/BattlegroundMgr.h b/src/server/game/Battlegrounds/BattlegroundMgr.h old mode 100755 new mode 100644 diff --git a/src/server/game/Battlegrounds/BattlegroundQueue.cpp b/src/server/game/Battlegrounds/BattlegroundQueue.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Battlegrounds/BattlegroundQueue.h b/src/server/game/Battlegrounds/BattlegroundQueue.h old mode 100755 new mode 100644 diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAB.h b/src/server/game/Battlegrounds/Zones/BattlegroundAB.h old mode 100755 new mode 100644 diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAV.h b/src/server/game/Battlegrounds/Zones/BattlegroundAV.h old mode 100755 new mode 100644 diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundBE.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundBE.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundBE.h b/src/server/game/Battlegrounds/Zones/BattlegroundBE.h old mode 100755 new mode 100644 diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundDS.h b/src/server/game/Battlegrounds/Zones/BattlegroundDS.h old mode 100755 new mode 100644 diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundEY.h b/src/server/game/Battlegrounds/Zones/BattlegroundEY.h old mode 100755 new mode 100644 diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundIC.h b/src/server/game/Battlegrounds/Zones/BattlegroundIC.h old mode 100755 new mode 100644 diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundNA.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundNA.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundNA.h b/src/server/game/Battlegrounds/Zones/BattlegroundNA.h old mode 100755 new mode 100644 diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundRL.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundRL.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundRL.h b/src/server/game/Battlegrounds/Zones/BattlegroundRL.h old mode 100755 new mode 100644 diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundRV.h b/src/server/game/Battlegrounds/Zones/BattlegroundRV.h old mode 100755 new mode 100644 diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundSA.h b/src/server/game/Battlegrounds/Zones/BattlegroundSA.h old mode 100755 new mode 100644 diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundWS.h b/src/server/game/Battlegrounds/Zones/BattlegroundWS.h old mode 100755 new mode 100644 diff --git a/src/server/game/Chat/Channels/Channel.cpp b/src/server/game/Chat/Channels/Channel.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Chat/Channels/Channel.h b/src/server/game/Chat/Channels/Channel.h old mode 100755 new mode 100644 diff --git a/src/server/game/Chat/Channels/ChannelMgr.cpp b/src/server/game/Chat/Channels/ChannelMgr.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Chat/Channels/ChannelMgr.h b/src/server/game/Chat/Channels/ChannelMgr.h old mode 100755 new mode 100644 diff --git a/src/server/game/Chat/Chat.cpp b/src/server/game/Chat/Chat.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Combat/HostileRefManager.cpp b/src/server/game/Combat/HostileRefManager.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Combat/HostileRefManager.h b/src/server/game/Combat/HostileRefManager.h old mode 100755 new mode 100644 diff --git a/src/server/game/Combat/ThreatManager.cpp b/src/server/game/Combat/ThreatManager.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Combat/ThreatManager.h b/src/server/game/Combat/ThreatManager.h old mode 100755 new mode 100644 diff --git a/src/server/game/Combat/UnitEvents.h b/src/server/game/Combat/UnitEvents.h old mode 100755 new mode 100644 diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp old mode 100755 new mode 100644 index 544e3087614..4fd13a111c9 --- a/src/server/game/Conditions/ConditionMgr.cpp +++ b/src/server/game/Conditions/ConditionMgr.cpp @@ -106,6 +106,12 @@ bool Condition::Meets(ConditionSourceInfo& sourceInfo) condMeets = unit->getRaceMask() & ConditionValue1; break; } + case CONDITION_GENDER: + { + if (Player* player = object->ToPlayer()) + condMeets = player->getGender() == ConditionValue1; + break; + } case CONDITION_SKILL: { if (Player* player = object->ToPlayer()) @@ -443,6 +449,9 @@ uint32 Condition::GetSearcherTypeMaskForCondition() case CONDITION_SPAWNMASK: mask |= GRID_MAP_TYPE_MASK_ALL; break; + case CONDITION_GENDER: + mask |= GRID_MAP_TYPE_MASK_PLAYER; + break; default: ASSERT(false && "Condition::GetSearcherTypeMaskForCondition - missing condition handling!"); break; @@ -1650,6 +1659,20 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) sLog->outError(LOG_FILTER_SQL, "Race condition has useless data in value3 (%u)!", cond->ConditionValue3); break; } + case CONDITION_GENDER: + { + if (!Player::IsValidGender(uint8(cond->ConditionValue1))) + { + sLog->outError(LOG_FILTER_SQL, "Gender condition has invalid gender (%u), skipped", cond->ConditionValue1); + return false; + } + + if (cond->ConditionValue2) + sLog->outError(LOG_FILTER_SQL, "Gender condition has useless data in value2 (%u)!", cond->ConditionValue2); + if (cond->ConditionValue3) + sLog->outError(LOG_FILTER_SQL, "Gender condition has useless data in value3 (%u)!", cond->ConditionValue3); + break; + } case CONDITION_MAPID: { MapEntry const* me = sMapStore.LookupEntry(cond->ConditionValue1); @@ -1909,9 +1932,6 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) } break; } - case CONDITION_UNUSED_20: - sLog->outError(LOG_FILTER_SQL, "Found ConditionTypeOrReference = CONDITION_UNUSED_20 in `conditions` table - ignoring"); - return false; case CONDITION_UNUSED_21: sLog->outError(LOG_FILTER_SQL, "Found ConditionTypeOrReference = CONDITION_UNUSED_21 in `conditions` table - ignoring"); return false; diff --git a/src/server/game/Conditions/ConditionMgr.h b/src/server/game/Conditions/ConditionMgr.h old mode 100755 new mode 100644 index 99f200b4228..96547accdb9 --- a/src/server/game/Conditions/ConditionMgr.h +++ b/src/server/game/Conditions/ConditionMgr.h @@ -53,7 +53,7 @@ enum ConditionTypes CONDITION_ACHIEVEMENT = 17, // achievement_id 0 0 true if achievement is complete CONDITION_TITLE = 18, // title id 0 0 true if player has title CONDITION_SPAWNMASK = 19, // spawnMask 0 0 true if in spawnMask - CONDITION_UNUSED_20 = 20, // + CONDITION_GENDER = 20, // gender 0 0 true if player's gender is equal to gender CONDITION_UNUSED_21 = 21, // CONDITION_MAPID = 22, // map_id 0 0 true if in map_id CONDITION_AREAID = 23, // area_id 0 0 true if in area_id diff --git a/src/server/game/Conditions/DisableMgr.cpp b/src/server/game/Conditions/DisableMgr.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Conditions/DisableMgr.h b/src/server/game/Conditions/DisableMgr.h old mode 100755 new mode 100644 diff --git a/src/server/game/DataStores/DBCEnums.h b/src/server/game/DataStores/DBCEnums.h old mode 100755 new mode 100644 diff --git a/src/server/game/DataStores/DBCStores.h b/src/server/game/DataStores/DBCStores.h old mode 100755 new mode 100644 diff --git a/src/server/game/DataStores/DBCStructure.h b/src/server/game/DataStores/DBCStructure.h index ee6cd5d951f..84c9603fb61 100644 --- a/src/server/game/DataStores/DBCStructure.h +++ b/src/server/game/DataStores/DBCStructure.h @@ -1843,9 +1843,9 @@ struct SpellFocusObjectEntry struct SpellRadiusEntry { uint32 ID; - float radiusHostile; - //uint32 Unk //always 0 - float radiusFriend; + float RadiusMin; + float RadiusPerLevel; + float RadiusMax; }; struct SpellRangeEntry diff --git a/src/server/game/DataStores/DBCfmt.h b/src/server/game/DataStores/DBCfmt.h index 9e593f66244..23f6798328f 100644 --- a/src/server/game/DataStores/DBCfmt.h +++ b/src/server/game/DataStores/DBCfmt.h @@ -135,7 +135,7 @@ const std::string CustomSpellEntryIndex = "Id"; char const SpellFocusObjectfmt[]="nx"; char const SpellItemEnchantmentfmt[]="nxiiiiiixxxiiisiiiiiiix"; char const SpellItemEnchantmentConditionfmt[]="nbbbbbxxxxxbbbbbbbbbbiiiiiXXXXX"; -char const SpellRadiusfmt[]="nfxf"; +char const SpellRadiusfmt[]="nfff"; char const SpellRangefmt[]="nffffixx"; char const SpellReagentsEntryfmt[]="diiiiiiiiiiiiiiii"; char const SpellScalingEntryfmt[]="diiiiffffffffffi"; diff --git a/src/server/game/DungeonFinding/LFG.h b/src/server/game/DungeonFinding/LFG.h old mode 100755 new mode 100644 diff --git a/src/server/game/DungeonFinding/LFGGroupData.cpp b/src/server/game/DungeonFinding/LFGGroupData.cpp index c7cf6f23ce9..68e7ab82c32 100644 --- a/src/server/game/DungeonFinding/LFGGroupData.cpp +++ b/src/server/game/DungeonFinding/LFGGroupData.cpp @@ -34,10 +34,12 @@ void LfgGroupData::SetState(LfgState state) { switch (state) { - case LFG_STATE_FINISHED_DUNGEON: case LFG_STATE_NONE: + m_Dungeon = 0; + m_KicksLeft = LFG_GROUP_MAX_KICKS; + case LFG_STATE_FINISHED_DUNGEON: case LFG_STATE_DUNGEON: - m_OldState = m_State; + m_OldState = state; // No break on purpose default: m_State = state; diff --git a/src/server/game/DungeonFinding/LFGMgr.cpp b/src/server/game/DungeonFinding/LFGMgr.cpp old mode 100755 new mode 100644 index da279016255..f8aea2d10f3 --- a/src/server/game/DungeonFinding/LFGMgr.cpp +++ b/src/server/game/DungeonFinding/LFGMgr.cpp @@ -370,11 +370,13 @@ void LFGMgr::Update(uint32 diff) for (LfgRolesMap::const_iterator itRoles = roleCheck.roles.begin(); itRoles != roleCheck.roles.end(); ++itRoles) { uint64 guid = itRoles->first; - ClearState(guid, "Remove Obsolete RoleCheck"); + RestoreState(guid, "Remove Obsolete RoleCheck"); SendLfgRoleCheckUpdate(guid, roleCheck); if (guid == roleCheck.leader) SendLfgJoinResult(guid, LfgJoinResultData(LFG_JOIN_FAILED, LFG_ROLECHECK_MISSING_ROLE)); } + + RestoreState(itRoleCheck->first, "Remove Obsolete RoleCheck"); RoleChecksStore.erase(itRoleCheck); } @@ -754,7 +756,7 @@ void LFGMgr::JoinLfg(Player* player, uint8 roles, LfgDungeonSet& dungeons, const */ void LFGMgr::LeaveLfg(uint64 guid) { - sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::Leave: [" UI64FMTD "]", guid); + sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::LeaveLfg: [" UI64FMTD "]", guid); uint64 gguid = IS_GROUP(guid) ? guid : GetGroup(guid); LfgState state = GetState(guid); @@ -765,13 +767,12 @@ void LFGMgr::LeaveLfg(uint64 guid) { LFGQueue& queue = GetQueue(gguid); queue.RemoveFromQueue(gguid); - RestoreState(gguid, "Leave queue"); + SetState(gguid, LFG_STATE_NONE); const LfgGuidSet& players = GetPlayers(gguid); for (LfgGuidSet::const_iterator it = players.begin(); it != players.end(); ++it) { - uint64 guid = (*it); - ClearState(guid, "Leave queue"); - SendLfgUpdateParty(guid, LfgUpdateData(LFG_UPDATETYPE_REMOVED_FROM_QUEUE)); + SetState(*it, LFG_STATE_NONE); + SendLfgUpdateParty(*it, LfgUpdateData(LFG_UPDATETYPE_REMOVED_FROM_QUEUE)); } } else @@ -779,7 +780,7 @@ void LFGMgr::LeaveLfg(uint64 guid) LFGQueue& queue = GetQueue(guid); queue.RemoveFromQueue(guid); SendLfgUpdatePlayer(guid, LfgUpdateData(LFG_UPDATETYPE_REMOVED_FROM_QUEUE)); - ClearState(guid, "Leave queue"); + SetState(guid, LFG_STATE_NONE); } break; case LFG_STATE_ROLECHECK: @@ -808,7 +809,20 @@ void LFGMgr::LeaveLfg(uint64 guid) RemoveProposal(it, LFG_UPDATETYPE_PROPOSAL_DECLINED); break; } - default: + case LFG_STATE_BOOT: + if (guid != gguid) // Player + { + UpdateBoot(guid); // Forcing LFG_ANSWER_PENDING (Removal of player) + SetState(guid, LFG_STATE_NONE); + } + break; + case LFG_STATE_NONE: + case LFG_STATE_RAIDBROWSER: + break; + case LFG_STATE_DUNGEON: + case LFG_STATE_FINISHED_DUNGEON: + if (guid != gguid) // Player + SetState(guid, LFG_STATE_NONE); break; } } @@ -882,7 +896,7 @@ void LFGMgr::UpdateRoleCheck(uint64 gguid, uint64 guid /* = 0 */, uint8 roles /* if (roleCheck.leader == pguid) SendLfgJoinResult(pguid, joinData); SendLfgUpdateParty(pguid, LfgUpdateData(LFG_UPDATETYPE_ROLECHECK_FAILED)); - ClearState(pguid, "Role check Failed"); + RestoreState(pguid, "Rolecheck Failed"); break; } } @@ -1007,7 +1021,7 @@ bool LFGMgr::CheckGroupRoles(LfgRolesMap& groles, bool removeLeaderFlag /*= true Makes a new group given a proposal @param[in] proposal Proposal to get info from */ -void LFGMgr::MakeNewGroup(const LfgProposal& proposal) +void LFGMgr::MakeNewGroup(LfgProposal const& proposal) { LfgGuidList players; LfgGuidList playersToTeleport; @@ -1038,7 +1052,7 @@ void LFGMgr::MakeNewGroup(const LfgProposal& proposal) Group* group = player->GetGroup(); if (group && group != grp) - player->RemoveFromGroup(); + group->RemoveMember(player->GetGUID()); if (!grp) { @@ -1243,10 +1257,11 @@ void LFGMgr::RemoveProposal(LfgProposalContainer::iterator itProposal, LfgUpdate updateData.updateType = LFG_UPDATETYPE_REMOVED_FROM_QUEUE; sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::RemoveProposal: [" UI64FMTD "] in same group that someone that didn't accept. Removing from queue and compatible cache", guid); } - ClearState(guid, "Proposal Fail (didn't accepted or in group with someone that didn't accept"); + + RestoreState(guid, "Proposal Fail (didn't accepted or in group with someone that didn't accept"); if (gguid != guid) { - RestoreState(gguid, "Proposal Fail (someone in group didn't accepted)"); + RestoreState(it->second.group, "Proposal Fail (someone in group didn't accepted)"); SendLfgUpdateParty(guid, updateData); } else @@ -1325,9 +1340,9 @@ void LFGMgr::InitBoot(uint64 gguid, uint64 kicker, uint64 victim, std::string co Update Boot info with player answer @param[in] guid Player who has answered - @param[in] accept player answer + @param[in] player answer */ -void LFGMgr::UpdateBoot(uint64 guid, bool accept) +void LFGMgr::UpdateBoot(uint64 guid, LfgAnswer answer) { uint64 gguid = GetGroup(guid); if (!gguid) @@ -1339,26 +1354,42 @@ void LFGMgr::UpdateBoot(uint64 guid, bool accept) LfgPlayerBoot& boot = itBoot->second; - if (boot.votes[guid] != LFG_ANSWER_PENDING) // Cheat check: Player can't vote twice - return; - - boot.votes[guid] = LfgAnswer(accept); - uint8 votesNum = 0; uint8 agreeNum = 0; - for (LfgAnswerContainer::const_iterator itVotes = boot.votes.begin(); itVotes != boot.votes.end(); ++itVotes) + + if (guid == boot.victim) + agreeNum = LFG_GROUP_KICK_VOTES_NEEDED + 1; // +1 on purpose to skip kick code + else if (answer == LFG_ANSWER_PENDING) { - if (itVotes->second != LFG_ANSWER_PENDING) + boot.votes.erase(guid); + // If we don't have enough members - force boot fail + if (boot.votes.size() <= LFG_GROUP_KICK_VOTES_NEEDED) { - ++votesNum; - if (itVotes->second == LFG_ANSWER_AGREE) - ++agreeNum; + agreeNum = 0; + votesNum = boot.votes.size(); } } + else + { + if (boot.votes[guid] != LFG_ANSWER_PENDING) // Cheat check: Player can't vote twice + return; - // if we don't have enough votes (agree or deny) do nothing - if (agreeNum < LFG_GROUP_KICK_VOTES_NEEDED && (votesNum - agreeNum) < LFG_GROUP_KICK_VOTES_NEEDED) - return; + boot.votes[guid] = answer; + + for (LfgAnswerContainer::const_iterator itVotes = boot.votes.begin(); itVotes != boot.votes.end(); ++itVotes) + { + if (itVotes->second != LFG_ANSWER_PENDING) + { + ++votesNum; + if (itVotes->second == LFG_ANSWER_AGREE) + ++agreeNum; + } + } + + // if we don't have enough votes (agree or deny) do nothing + if (agreeNum < LFG_GROUP_KICK_VOTES_NEEDED && (votesNum - agreeNum) < LFG_GROUP_KICK_VOTES_NEEDED) + return; + } // Send update info to all players boot.inProgress = false; @@ -1517,7 +1548,6 @@ void LFGMgr::RewardDungeonDoneFor(const uint32 dungeonId, Player* player) // Clear player related lfg stuff uint32 rDungeonId = (*GetSelectedDungeons(guid).begin()); - ClearState(guid, "Dungeon Finished"); SetState(guid, LFG_STATE_FINISHED_DUNGEON); // Give rewards only if its a random or seasonal dungeon @@ -1621,14 +1651,14 @@ LfgState LFGMgr::GetState(uint64 guid) else state = PlayersStore[guid].GetState(); - sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::GetState: [" UI64FMTD "] = %u", guid, state); + sLog->outTrace(LOG_FILTER_LFG, "LFGMgr::GetState: [" UI64FMTD "] = %u", guid, state); return state; } uint32 LFGMgr::GetDungeon(uint64 guid, bool asId /*= true */) { uint32 dungeon = GroupsStore[guid].GetDungeon(asId); - sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::GetDungeon: [" UI64FMTD "] asId: %u = %u", guid, asId, dungeon); + sLog->outTrace(LOG_FILTER_LFG, "LFGMgr::GetDungeon: [" UI64FMTD "] asId: %u = %u", guid, asId, dungeon); return dungeon; } @@ -1640,20 +1670,20 @@ uint32 LFGMgr::GetDungeonMapId(uint64 guid) if (LFGDungeonData const* dungeon = GetLFGDungeon(dungeonId)) mapId = dungeon->map; - sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::GetDungeonMapId: [" UI64FMTD "] = %u (DungeonId = %u)", guid, mapId, dungeonId); + sLog->outTrace(LOG_FILTER_LFG, "LFGMgr::GetDungeonMapId: [" UI64FMTD "] = %u (DungeonId = %u)", guid, mapId, dungeonId); return mapId; } uint8 LFGMgr::GetRoles(uint64 guid) { uint8 roles = PlayersStore[guid].GetRoles(); - sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::GetRoles: [" UI64FMTD "] = %u", guid, roles); + sLog->outTrace(LOG_FILTER_LFG, "LFGMgr::GetRoles: [" UI64FMTD "] = %u", guid, roles); return roles; } const std::string& LFGMgr::GetComment(uint64 guid) { - sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::GetComment: [" UI64FMTD "] = %s", guid, PlayersStore[guid].GetComment().c_str()); + sLog->outTrace(LOG_FILTER_LFG, "LFGMgr::GetComment: [" UI64FMTD "] = %s", guid, PlayersStore[guid].GetComment().c_str()); return PlayersStore[guid].GetComment(); } @@ -1669,48 +1699,50 @@ bool LFGMgr::IsTeleported(uint64 pguid) const LfgDungeonSet& LFGMgr::GetSelectedDungeons(uint64 guid) { - sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::GetSelectedDungeons: [" UI64FMTD "]", guid); + sLog->outTrace(LOG_FILTER_LFG, "LFGMgr::GetSelectedDungeons: [" UI64FMTD "]", guid); return PlayersStore[guid].GetSelectedDungeons(); } const LfgLockMap& LFGMgr::GetLockedDungeons(uint64 guid) { - sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::GetLockedDungeons: [" UI64FMTD "]", guid); + sLog->outTrace(LOG_FILTER_LFG, "LFGMgr::GetLockedDungeons: [" UI64FMTD "]", guid); return PlayersStore[guid].GetLockedDungeons(); } uint8 LFGMgr::GetKicksLeft(uint64 guid) { uint8 kicks = GroupsStore[guid].GetKicksLeft(); - sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::GetKicksLeft: [" UI64FMTD "] = %u", guid, kicks); + sLog->outTrace(LOG_FILTER_LFG, "LFGMgr::GetKicksLeft: [" UI64FMTD "] = %u", guid, kicks); return kicks; } void LFGMgr::RestoreState(uint64 guid, char const *debugMsg) { - LfgGroupData& data = GroupsStore[guid]; - if (sLog->ShouldLog(LOG_FILTER_LFG, LOG_LEVEL_DEBUG)) + if (IS_GROUP(guid)) { - std::string const& ps = GetStateString(data.GetState()); - std::string const& os = GetStateString(data.GetOldState()); - sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::RestoreState: Group: [" UI64FMTD "] (%s) State: %s, oldState: %s", - guid, debugMsg, ps.c_str(), os.c_str()); + LfgGroupData& data = GroupsStore[guid]; + if (sLog->ShouldLog(LOG_FILTER_LFG, LOG_LEVEL_DEBUG)) + { + std::string const& ps = GetStateString(data.GetState()); + std::string const& os = GetStateString(data.GetOldState()); + sLog->outTrace(LOG_FILTER_LFG, "LFGMgr::RestoreState: Group: [" UI64FMTD "] (%s) State: %s, oldState: %s", + guid, debugMsg, ps.c_str(), os.c_str()); + } + + data.RestoreState(); } - - data.RestoreState(); -} - -void LFGMgr::ClearState(uint64 guid, char const *debugMsg) -{ - LfgPlayerData& data = PlayersStore[guid]; - if (sLog->ShouldLog(LOG_FILTER_LFG, LOG_LEVEL_DEBUG)) + else { - std::string const& ps = GetStateString(data.GetState()); - std::string const& os = GetStateString(data.GetOldState()); - sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::ClearState: Player: [" UI64FMTD "] (%s) State: %s, oldState: %s", - guid, debugMsg, ps.c_str(), os.c_str()); + LfgPlayerData& data = PlayersStore[guid]; + if (sLog->ShouldLog(LOG_FILTER_LFG, LOG_LEVEL_DEBUG)) + { + std::string const& ps = GetStateString(data.GetState()); + std::string const& os = GetStateString(data.GetOldState()); + sLog->outTrace(LOG_FILTER_LFG, "LFGMgr::RestoreState: Player: [" UI64FMTD "] (%s) State: %s, oldState: %s", + guid, debugMsg, ps.c_str(), os.c_str()); + } + data.RestoreState(); } - data.ClearState(); } void LFGMgr::SetState(uint64 guid, LfgState state) @@ -1723,7 +1755,7 @@ void LFGMgr::SetState(uint64 guid, LfgState state) std::string const& ns = GetStateString(state); std::string const& ps = GetStateString(data.GetState()); std::string const& os = GetStateString(data.GetOldState()); - sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::SetState: Group: [" UI64FMTD "] newState: %s, previous: %s, oldState: %s", + sLog->outTrace(LOG_FILTER_LFG, "LFGMgr::SetState: Group: [" UI64FMTD "] newState: %s, previous: %s, oldState: %s", guid, ns.c_str(), ps.c_str(), os.c_str()); } data.SetState(state); @@ -1736,7 +1768,7 @@ void LFGMgr::SetState(uint64 guid, LfgState state) std::string const& ns = GetStateString(state); std::string const& ps = GetStateString(data.GetState()); std::string const& os = GetStateString(data.GetOldState()); - sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::SetState: Player: [" UI64FMTD "] newState: %s, previous: %s, oldState: %s", + sLog->outTrace(LOG_FILTER_LFG, "LFGMgr::SetState: Player: [" UI64FMTD "] newState: %s, previous: %s, oldState: %s", guid, ns.c_str(), ps.c_str(), os.c_str()); } data.SetState(state); @@ -1745,43 +1777,43 @@ void LFGMgr::SetState(uint64 guid, LfgState state) void LFGMgr::SetDungeon(uint64 guid, uint32 dungeon) { - sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::SetDungeon: [" UI64FMTD "] dungeon %u", guid, dungeon); + sLog->outTrace(LOG_FILTER_LFG, "LFGMgr::SetDungeon: [" UI64FMTD "] dungeon %u", guid, dungeon); GroupsStore[guid].SetDungeon(dungeon); } void LFGMgr::SetRoles(uint64 guid, uint8 roles) { - sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::SetRoles: [" UI64FMTD "] roles: %u", guid, roles); + sLog->outTrace(LOG_FILTER_LFG, "LFGMgr::SetRoles: [" UI64FMTD "] roles: %u", guid, roles); PlayersStore[guid].SetRoles(roles); } void LFGMgr::SetComment(uint64 guid, const std::string& comment) { - sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::SetComment: [" UI64FMTD "] comment: %s", guid, comment.c_str()); + sLog->outTrace(LOG_FILTER_LFG, "LFGMgr::SetComment: [" UI64FMTD "] comment: %s", guid, comment.c_str()); PlayersStore[guid].SetComment(comment); } void LFGMgr::SetSelectedDungeons(uint64 guid, const LfgDungeonSet& dungeons) { - sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::SetSelectedDungeons: [" UI64FMTD "]", guid); + sLog->outTrace(LOG_FILTER_LFG, "LFGMgr::SetSelectedDungeons: [" UI64FMTD "]", guid); PlayersStore[guid].SetSelectedDungeons(dungeons); } void LFGMgr::SetLockedDungeons(uint64 guid, const LfgLockMap& lock) { - sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::SetLockedDungeons: [" UI64FMTD "]", guid); + sLog->outTrace(LOG_FILTER_LFG, "LFGMgr::SetLockedDungeons: [" UI64FMTD "]", guid); PlayersStore[guid].SetLockedDungeons(lock); } void LFGMgr::DecreaseKicksLeft(uint64 guid) { - sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::DecreaseKicksLeft: [" UI64FMTD "]", guid); + sLog->outTrace(LOG_FILTER_LFG, "LFGMgr::DecreaseKicksLeft: [" UI64FMTD "]", guid); GroupsStore[guid].DecreaseKicksLeft(); } void LFGMgr::RemovePlayerData(uint64 guid) { - sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::RemovePlayerData: [" UI64FMTD "]", guid); + sLog->outTrace(LOG_FILTER_LFG, "LFGMgr::RemovePlayerData: [" UI64FMTD "]", guid); LfgPlayerDataContainer::iterator it = PlayersStore.find(guid); if (it != PlayersStore.end()) PlayersStore.erase(it); @@ -1789,18 +1821,23 @@ void LFGMgr::RemovePlayerData(uint64 guid) void LFGMgr::RemoveGroupData(uint64 guid) { - sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::RemoveGroupData: [" UI64FMTD "]", guid); + sLog->outTrace(LOG_FILTER_LFG, "LFGMgr::RemoveGroupData: [" UI64FMTD "]", guid); LfgGroupDataContainer::iterator it = GroupsStore.find(guid); if (it == GroupsStore.end()) return; + LfgState state = GetState(guid); + // If group is being formed after proposal success do nothing more LfgGuidSet const& players = it->second.GetPlayers(); for (LfgGuidSet::const_iterator it = players.begin(); it != players.end(); ++it) { uint64 guid = (*it); - ClearState(*it, "Group Disband"); SetGroup(*it, 0); - SendLfgUpdateParty(guid, LfgUpdateData(LFG_UPDATETYPE_REMOVED_FROM_QUEUE)); + if (state != LFG_STATE_PROPOSAL) + { + SetState(*it, LFG_STATE_NONE); + SendLfgUpdateParty(guid, LfgUpdateData(LFG_UPDATETYPE_REMOVED_FROM_QUEUE)); + } } GroupsStore.erase(it); } diff --git a/src/server/game/DungeonFinding/LFGMgr.h b/src/server/game/DungeonFinding/LFGMgr.h index 62dec80db05..c989dc1ce08 100644 --- a/src/server/game/DungeonFinding/LFGMgr.h +++ b/src/server/game/DungeonFinding/LFGMgr.h @@ -254,7 +254,7 @@ struct LfgPlayerBoot { time_t cancelTime; ///< Time left to vote bool inProgress; ///< Vote in progress - LfgAnswerContainer votes; ///< Player votes (-1 not answer | 0 Not agree | 1 agree) + LfgAnswerContainer votes; ///< Player votes (-1 not answer | 0 Not agree | 1 agree) uint64 victim; ///< Player guid to be kicked (can't vote) std::string reason; ///< kick reason }; @@ -322,7 +322,7 @@ class LFGMgr // Vote kick void InitBoot(uint64 gguid, uint64 kguid, uint64 vguid, std::string const& reason); - void UpdateBoot(uint64 guid, bool accept); + void UpdateBoot(uint64 guid, LfgAnswer accept = LFG_ANSWER_PENDING); void InitializeLockedDungeons(Player* player, uint8 level = 0); diff --git a/src/server/game/DungeonFinding/LFGPlayerData.cpp b/src/server/game/DungeonFinding/LFGPlayerData.cpp index f1281875598..deee0ddae3c 100644 --- a/src/server/game/DungeonFinding/LFGPlayerData.cpp +++ b/src/server/game/DungeonFinding/LFGPlayerData.cpp @@ -33,23 +33,27 @@ void LfgPlayerData::SetState(LfgState state) case LFG_STATE_FINISHED_DUNGEON: m_Roles = 0; m_SelectedDungeons.clear(); + m_Comment = ""; // No break on purpose case LFG_STATE_DUNGEON: - m_OldState = m_State; + m_OldState = state; // No break on purpose default: m_State = state; } } -void LfgPlayerData::ClearState() +void LfgPlayerData::RestoreState() { - m_SelectedDungeons.clear(); - m_Roles = 0; + if (m_OldState == LFG_STATE_NONE) + { + m_SelectedDungeons.clear(); + m_Roles = 0; + } m_State = m_OldState; } -void LfgPlayerData::SetLockedDungeons(const LfgLockMap& lockStatus) +void LfgPlayerData::SetLockedDungeons(LfgLockMap const& lockStatus) { m_LockedDungeons = lockStatus; } @@ -69,12 +73,12 @@ void LfgPlayerData::SetRoles(uint8 roles) m_Roles = roles; } -void LfgPlayerData::SetComment(const std::string& comment) +void LfgPlayerData::SetComment(std::string const& comment) { m_Comment = comment; } -void LfgPlayerData::SetSelectedDungeons(const LfgDungeonSet& dungeons) +void LfgPlayerData::SetSelectedDungeons(LfgDungeonSet const& dungeons) { m_SelectedDungeons = dungeons; } diff --git a/src/server/game/DungeonFinding/LFGPlayerData.h b/src/server/game/DungeonFinding/LFGPlayerData.h index 0682ad66698..589404cf65c 100644 --- a/src/server/game/DungeonFinding/LFGPlayerData.h +++ b/src/server/game/DungeonFinding/LFGPlayerData.h @@ -31,7 +31,7 @@ class LfgPlayerData // General void SetState(LfgState state); - void ClearState(); + void RestoreState(); void SetLockedDungeons(LfgLockMap const& lock); void SetTeam(uint8 team); void SetGroup(uint64 group); @@ -56,7 +56,7 @@ class LfgPlayerData private: // General LfgState m_State; ///< State if group in LFG - LfgState m_OldState; ///< Old State + LfgState m_OldState; ///< Old State - Used to restore state after failed Rolecheck/Proposal // Player LfgLockMap m_LockedDungeons; ///< Dungeons player can't do and reason uint8 m_Team; ///< Player team - determines the queue to join diff --git a/src/server/game/DungeonFinding/LFGQueue.cpp b/src/server/game/DungeonFinding/LFGQueue.cpp index 3bcd1ee5643..bfcf17dc270 100644 --- a/src/server/game/DungeonFinding/LFGQueue.cpp +++ b/src/server/game/DungeonFinding/LFGQueue.cpp @@ -483,12 +483,7 @@ LfgCompatibility LFGQueue::CheckCompatibility(LfgGuidList check) } proposal.queues = check; - if (check.size() == 1) - { - for (LfgGroupsMap::const_iterator it = proposalGroups.begin(); it != proposalGroups.end(); ++it) - if (proposal.group && it->second != proposal.group) - proposal.isNew = false; - } + proposal.isNew = numLfgGroups != 1; if (!sLFGMgr->AllQueued(check)) { diff --git a/src/server/game/DungeonFinding/LFGScripts.cpp b/src/server/game/DungeonFinding/LFGScripts.cpp index f9e3c02fe98..32dc8319215 100644 --- a/src/server/game/DungeonFinding/LFGScripts.cpp +++ b/src/server/game/DungeonFinding/LFGScripts.cpp @@ -161,7 +161,6 @@ void LFGGroupScript::OnRemoveMember(Group* group, uint64 guid, RemoveMethod meth } sLFGMgr->LeaveLfg(guid); - sLFGMgr->SetState(guid, LFG_STATE_NONE); sLFGMgr->SetGroup(guid, 0); uint8 players = sLFGMgr->RemovePlayerFromGroup(gguid, guid); diff --git a/src/server/game/Entities/Corpse/Corpse.cpp b/src/server/game/Entities/Corpse/Corpse.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Entities/Corpse/Corpse.h b/src/server/game/Entities/Corpse/Corpse.h old mode 100755 new mode 100644 diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Entities/Creature/Creature.h b/src/server/game/Entities/Creature/Creature.h old mode 100755 new mode 100644 diff --git a/src/server/game/Entities/Creature/CreatureGroups.cpp b/src/server/game/Entities/Creature/CreatureGroups.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Entities/Creature/CreatureGroups.h b/src/server/game/Entities/Creature/CreatureGroups.h old mode 100755 new mode 100644 diff --git a/src/server/game/Entities/Creature/GossipDef.cpp b/src/server/game/Entities/Creature/GossipDef.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Entities/Creature/GossipDef.h b/src/server/game/Entities/Creature/GossipDef.h old mode 100755 new mode 100644 diff --git a/src/server/game/Entities/Creature/TemporarySummon.cpp b/src/server/game/Entities/Creature/TemporarySummon.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Entities/Creature/TemporarySummon.h b/src/server/game/Entities/Creature/TemporarySummon.h old mode 100755 new mode 100644 diff --git a/src/server/game/Entities/DynamicObject/DynamicObject.cpp b/src/server/game/Entities/DynamicObject/DynamicObject.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Entities/DynamicObject/DynamicObject.h b/src/server/game/Entities/DynamicObject/DynamicObject.h old mode 100755 new mode 100644 diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp old mode 100755 new mode 100644 index 7535fb28bfb..1041ba08475 --- a/src/server/game/Entities/GameObject/GameObject.cpp +++ b/src/server/game/Entities/GameObject/GameObject.cpp @@ -118,7 +118,7 @@ void GameObject::RemoveFromOwner() else if (IS_PET_GUID(ownerGUID)) ownerType = "pet"; - sLog->outFatal(LOG_FILTER_GENERAL, "Delete GameObject (GUID: %u Entry: %u SpellId %u LinkedGO %u) that lost references to owner (GUID %u Type '%s') GO list. Crash possible later.", + sLog->outFatal(LOG_FILTER_GENERAL, "Removed GameObject (GUID: %u Entry: %u SpellId: %u LinkedGO: %u) that just lost any reference to the owner (GUID: %u Type: '%s') GO list", GetGUIDLow(), GetGOInfo()->entry, m_spellId, GetGOInfo()->GetLinkedGameObjectEntry(), GUID_LOPART(ownerGUID), ownerType); SetOwnerGUID(0); } @@ -1699,7 +1699,7 @@ void GameObject::CastSpell(Unit* target, uint32 spellId) { trigger->setFaction(owner->getFaction()); // needed for GO casts for proper target validation checks - trigger->SetUInt64Value(UNIT_FIELD_SUMMONEDBY, owner->GetGUID()); + trigger->SetOwnerGUID(owner->GetGUID()); trigger->CastSpell(target ? target : trigger, spellInfo, true, 0, 0, owner->GetGUID()); } else diff --git a/src/server/game/Entities/GameObject/GameObject.h b/src/server/game/Entities/GameObject/GameObject.h old mode 100755 new mode 100644 diff --git a/src/server/game/Entities/Item/Container/Bag.cpp b/src/server/game/Entities/Item/Container/Bag.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Entities/Item/Container/Bag.h b/src/server/game/Entities/Item/Container/Bag.h old mode 100755 new mode 100644 diff --git a/src/server/game/Entities/Item/Item.cpp b/src/server/game/Entities/Item/Item.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Entities/Item/Item.h b/src/server/game/Entities/Item/Item.h old mode 100755 new mode 100644 diff --git a/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp b/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Entities/Item/ItemEnchantmentMgr.h b/src/server/game/Entities/Item/ItemEnchantmentMgr.h old mode 100755 new mode 100644 diff --git a/src/server/game/Entities/Item/ItemPrototype.h b/src/server/game/Entities/Item/ItemPrototype.h old mode 100755 new mode 100644 diff --git a/src/server/game/Entities/Object/Object.h b/src/server/game/Entities/Object/Object.h old mode 100755 new mode 100644 diff --git a/src/server/game/Entities/Object/ObjectDefines.h b/src/server/game/Entities/Object/ObjectDefines.h old mode 100755 new mode 100644 diff --git a/src/server/game/Entities/Object/ObjectPosSelector.cpp b/src/server/game/Entities/Object/ObjectPosSelector.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Entities/Object/ObjectPosSelector.h b/src/server/game/Entities/Object/ObjectPosSelector.h old mode 100755 new mode 100644 diff --git a/src/server/game/Entities/Object/Updates/UpdateData.h b/src/server/game/Entities/Object/Updates/UpdateData.h old mode 100755 new mode 100644 diff --git a/src/server/game/Entities/Object/Updates/UpdateFields.h b/src/server/game/Entities/Object/Updates/UpdateFields.h old mode 100755 new mode 100644 diff --git a/src/server/game/Entities/Object/Updates/UpdateMask.h b/src/server/game/Entities/Object/Updates/UpdateMask.h old mode 100755 new mode 100644 diff --git a/src/server/game/Entities/Pet/Pet.cpp b/src/server/game/Entities/Pet/Pet.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Entities/Pet/Pet.h b/src/server/game/Entities/Pet/Pet.h old mode 100755 new mode 100644 diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index ebf25ddb575..f26769001c9 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -16957,7 +16957,9 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder) const WorldLocation& _loc = GetBattlegroundEntryPoint(); mapId = _loc.GetMapId(); instanceId = 0; - if (mapId == MAPID_INVALID) // Battleground Entry Point not found (???) + // Db field type is type int16, so it can never be MAPID_INVALID + //if (mapId == MAPID_INVALID) -- code kept for reference + if (int16(mapId) == int16(-1)) // Battleground Entry Point not found (???) { sLog->outError(LOG_FILTER_PLAYER, "Player (guidlow %d) was in BG in database, but BG was not found, and entry point was invalid! Teleport to default race/class locations.", guid); RelocateToHomebind(); @@ -26207,14 +26209,6 @@ VoidStorageItem* Player::GetVoidStorageItem(uint64 id, uint8& slot) const return NULL; } -bool Player::SetHover(bool enable) -{ - if (!Unit::SetHover(enable)) - return false; - - return true; -} - void Player::SendMovementSetCanFly(bool apply) { ObjectGuid guid = GetGUID(); diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h index 1b6a2e81299..7d2c057dd5a 100644 --- a/src/server/game/Entities/Player/Player.h +++ b/src/server/game/Entities/Player/Player.h @@ -2508,8 +2508,6 @@ class Player : public Unit, public GridObject m_mover->m_movedPlayer = this; } - bool SetHover(bool enable); - void SetSeer(WorldObject* target) { m_seer = target; } void SetViewpoint(WorldObject* target, bool apply); WorldObject* GetViewpoint() const; diff --git a/src/server/game/Entities/Player/SocialMgr.cpp b/src/server/game/Entities/Player/SocialMgr.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Entities/Player/SocialMgr.h b/src/server/game/Entities/Player/SocialMgr.h old mode 100755 new mode 100644 diff --git a/src/server/game/Entities/Totem/Totem.cpp b/src/server/game/Entities/Totem/Totem.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Entities/Totem/Totem.h b/src/server/game/Entities/Totem/Totem.h old mode 100755 new mode 100644 diff --git a/src/server/game/Entities/Transport/Transport.cpp b/src/server/game/Entities/Transport/Transport.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Entities/Transport/Transport.h b/src/server/game/Entities/Transport/Transport.h old mode 100755 new mode 100644 diff --git a/src/server/game/Entities/Unit/StatSystem.cpp b/src/server/game/Entities/Unit/StatSystem.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp old mode 100755 new mode 100644 index 43bbf8eb02a..e9d7338f8b9 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -6980,8 +6980,18 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere // Unholy Blight if (dummySpell->Id == 49194) { - basepoints0 = CalculatePct(int32(damage), triggerAmount); triggered_spell_id = 50536; + SpellInfo const* unholyBlight = sSpellMgr->GetSpellInfo(triggered_spell_id); + if (!unholyBlight) + return false; + + basepoints0 = CalculatePct(int32(damage), triggerAmount); + + //Glyph of Unholy Blight + if (AuraEffect* glyph=GetAuraEffect(63332, 0)) + AddPct(basepoints0, glyph->GetAmount()); + + basepoints0 = basepoints0 / (unholyBlight->GetMaxDuration() / unholyBlight->Effects[0].Amplitude); basepoints0 += victim->GetRemainingPeriodicAmount(GetGUID(), triggered_spell_id, SPELL_AURA_PERIODIC_DAMAGE); break; } diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h old mode 100755 new mode 100644 index 11f78275f24..000a254cfbe --- a/src/server/game/Entities/Unit/Unit.h +++ b/src/server/game/Entities/Unit/Unit.h @@ -1617,7 +1617,7 @@ class Unit : public WorldObject bool IsWalking() const { return m_movementInfo.HasMovementFlag(MOVEMENTFLAG_WALKING);} virtual bool SetWalk(bool enable); virtual bool SetDisableGravity(bool disable, bool packetOnly = false); - bool SetHover(bool enable); + virtual bool SetHover(bool enable); void SetInFront(Unit const* target); void SetFacingTo(float ori); diff --git a/src/server/game/Entities/Vehicle/Vehicle.cpp b/src/server/game/Entities/Vehicle/Vehicle.cpp old mode 100755 new mode 100644 index 5e46d2c9ba7..9fedb748ebe --- a/src/server/game/Entities/Vehicle/Vehicle.cpp +++ b/src/server/game/Entities/Vehicle/Vehicle.cpp @@ -362,9 +362,9 @@ bool Vehicle::AddPassenger(Unit* unit, int8 seatId) if (_me->IsInWorld()) { - unit->SendClearTarget(); // SMSG_BREAK_TARGET - unit->SetControlled(true, UNIT_STATE_ROOT); // SMSG_FORCE_ROOT - In some cases we send SMSG_SPLINE_MOVE_ROOT here (for creatures) - // also adds MOVEMENTFLAG_ROOT + unit->SendClearTarget(); // SMSG_BREAK_TARGET + unit->SetControlled(true, UNIT_STATE_ROOT); // SMSG_FORCE_ROOT - In some cases we send SMSG_SPLINE_MOVE_ROOT here (for creatures) + // also adds MOVEMENTFLAG_ROOT Movement::MoveSplineInit init(*unit); init.DisableTransportPathTransformations(); init.MoveTo(veSeat->m_attachmentOffsetX, veSeat->m_attachmentOffsetY, veSeat->m_attachmentOffsetZ); diff --git a/src/server/game/Entities/Vehicle/Vehicle.h b/src/server/game/Entities/Vehicle/Vehicle.h old mode 100755 new mode 100644 diff --git a/src/server/game/Events/GameEventMgr.cpp b/src/server/game/Events/GameEventMgr.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Events/GameEventMgr.h b/src/server/game/Events/GameEventMgr.h old mode 100755 new mode 100644 diff --git a/src/server/game/Globals/ObjectAccessor.cpp b/src/server/game/Globals/ObjectAccessor.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Globals/ObjectAccessor.h b/src/server/game/Globals/ObjectAccessor.h old mode 100755 new mode 100644 diff --git a/src/server/game/Globals/ObjectMgr.h b/src/server/game/Globals/ObjectMgr.h old mode 100755 new mode 100644 diff --git a/src/server/game/Grids/Cells/Cell.h b/src/server/game/Grids/Cells/Cell.h old mode 100755 new mode 100644 diff --git a/src/server/game/Grids/Grid.h b/src/server/game/Grids/Grid.h old mode 100755 new mode 100644 diff --git a/src/server/game/Grids/GridLoader.h b/src/server/game/Grids/GridLoader.h old mode 100755 new mode 100644 diff --git a/src/server/game/Grids/GridRefManager.h b/src/server/game/Grids/GridRefManager.h old mode 100755 new mode 100644 diff --git a/src/server/game/Grids/GridReference.h b/src/server/game/Grids/GridReference.h old mode 100755 new mode 100644 diff --git a/src/server/game/Grids/GridStates.cpp b/src/server/game/Grids/GridStates.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Grids/GridStates.h b/src/server/game/Grids/GridStates.h old mode 100755 new mode 100644 diff --git a/src/server/game/Grids/NGrid.h b/src/server/game/Grids/NGrid.h old mode 100755 new mode 100644 diff --git a/src/server/game/Grids/Notifiers/GridNotifiers.cpp b/src/server/game/Grids/Notifiers/GridNotifiers.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Grids/Notifiers/GridNotifiers.h b/src/server/game/Grids/Notifiers/GridNotifiers.h old mode 100755 new mode 100644 diff --git a/src/server/game/Grids/Notifiers/GridNotifiersImpl.h b/src/server/game/Grids/Notifiers/GridNotifiersImpl.h old mode 100755 new mode 100644 diff --git a/src/server/game/Grids/ObjectGridLoader.cpp b/src/server/game/Grids/ObjectGridLoader.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Grids/ObjectGridLoader.h b/src/server/game/Grids/ObjectGridLoader.h old mode 100755 new mode 100644 diff --git a/src/server/game/Groups/Group.cpp b/src/server/game/Groups/Group.cpp old mode 100755 new mode 100644 index a98f7cd8424..ffa87212eb5 --- a/src/server/game/Groups/Group.cpp +++ b/src/server/game/Groups/Group.cpp @@ -399,10 +399,13 @@ bool Group::AddMember(Player* player) if (player) { player->SetGroupInvite(NULL); - if (player->GetGroup() && (isBGGroup() || isBFGroup())) // if player is in group and he is being added to BG raid group, then call SetBattlegroundRaid() - player->SetBattlegroundOrBattlefieldRaid(this, subGroup); - else if (player->GetGroup()) //if player is in bg raid and we are adding him to normal group, then call SetOriginalGroup() - player->SetOriginalGroup(this, subGroup); + if (player->GetGroup()) + { + if (isBGGroup() || isBFGroup()) // if player is in group and he is being added to BG raid group, then call SetBattlegroundRaid() + player->SetBattlegroundOrBattlefieldRaid(this, subGroup); + else //if player is in bg raid and we are adding him to normal group, then call SetOriginalGroup() + player->SetOriginalGroup(this, subGroup); + } else //if player is not in group, then call set group player->SetGroup(this, subGroup); @@ -1235,8 +1238,8 @@ void Group::MasterLoot(Loot* /*loot*/, WorldObject* pLootedObject) uint32 real_count = 0; - WorldPacket data(SMSG_LOOT_MASTER_LIST, GetMembersCount()*8); - data << (uint8)GetMembersCount(); + WorldPacket data(SMSG_LOOT_MASTER_LIST, 1 + GetMembersCount() * 8); + data << uint8(GetMembersCount()); for (GroupReference* itr = GetFirstMember(); itr != NULL; itr = itr->next()) { diff --git a/src/server/game/Groups/Group.h b/src/server/game/Groups/Group.h old mode 100755 new mode 100644 diff --git a/src/server/game/Groups/GroupRefManager.h b/src/server/game/Groups/GroupRefManager.h old mode 100755 new mode 100644 diff --git a/src/server/game/Groups/GroupReference.cpp b/src/server/game/Groups/GroupReference.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Groups/GroupReference.h b/src/server/game/Groups/GroupReference.h old mode 100755 new mode 100644 diff --git a/src/server/game/Guilds/Guild.h b/src/server/game/Guilds/Guild.h old mode 100755 new mode 100644 diff --git a/src/server/game/Handlers/AddonHandler.cpp b/src/server/game/Handlers/AddonHandler.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Handlers/AddonHandler.h b/src/server/game/Handlers/AddonHandler.h old mode 100755 new mode 100644 diff --git a/src/server/game/Handlers/ArenaTeamHandler.cpp b/src/server/game/Handlers/ArenaTeamHandler.cpp old mode 100755 new mode 100644 index 1116587a63b..daeb037b484 --- a/src/server/game/Handlers/ArenaTeamHandler.cpp +++ b/src/server/game/Handlers/ArenaTeamHandler.cpp @@ -29,7 +29,7 @@ #include "ArenaTeamMgr.h" #include "Opcodes.h" -void WorldSession::HandleInspectArenaTeamsOpcode(WorldPacket & recvData) +void WorldSession::HandleInspectArenaTeamsOpcode(WorldPacket& recvData) { sLog->outDebug(LOG_FILTER_NETWORKIO, "MSG_INSPECT_ARENA_TEAMS"); @@ -50,7 +50,7 @@ void WorldSession::HandleInspectArenaTeamsOpcode(WorldPacket & recvData) } } -void WorldSession::HandleArenaTeamQueryOpcode(WorldPacket & recvData) +void WorldSession::HandleArenaTeamQueryOpcode(WorldPacket& recvData) { sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_ARENA_TEAM_QUERY"); @@ -64,7 +64,7 @@ void WorldSession::HandleArenaTeamQueryOpcode(WorldPacket & recvData) } } -void WorldSession::HandleArenaTeamRosterOpcode(WorldPacket & recvData) +void WorldSession::HandleArenaTeamRosterOpcode(WorldPacket& recvData) { sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_ARENA_TEAM_ROSTER"); @@ -123,7 +123,7 @@ void WorldSession::HandleArenaTeamCreateOpcode(WorldPacket & recvData) SendArenaTeamCommandResult(ERR_ARENA_TEAM_CREATE_S, name, "", ERR_ARENA_TEAM_CREATED); } -void WorldSession::HandleArenaTeamInviteOpcode(WorldPacket & recvData) +void WorldSession::HandleArenaTeamInviteOpcode(WorldPacket& recvData) { sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_ARENA_TEAM_INVITE"); @@ -248,7 +248,7 @@ void WorldSession::HandleArenaTeamDeclineOpcode(WorldPacket & /*recvData*/) _player->SetArenaTeamIdInvited(0); } -void WorldSession::HandleArenaTeamLeaveOpcode(WorldPacket & recvData) +void WorldSession::HandleArenaTeamLeaveOpcode(WorldPacket& recvData) { sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_ARENA_TEAM_LEAVE"); @@ -290,7 +290,7 @@ void WorldSession::HandleArenaTeamLeaveOpcode(WorldPacket & recvData) SendArenaTeamCommandResult(ERR_ARENA_TEAM_QUIT_S, arenaTeam->GetName(), "", 0); } -void WorldSession::HandleArenaTeamDisbandOpcode(WorldPacket & recvData) +void WorldSession::HandleArenaTeamDisbandOpcode(WorldPacket& recvData) { sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_ARENA_TEAM_DISBAND"); @@ -312,7 +312,7 @@ void WorldSession::HandleArenaTeamDisbandOpcode(WorldPacket & recvData) } } -void WorldSession::HandleArenaTeamRemoveOpcode(WorldPacket & recvData) +void WorldSession::HandleArenaTeamRemoveOpcode(WorldPacket& recvData) { sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_ARENA_TEAM_REMOVE"); @@ -358,7 +358,7 @@ void WorldSession::HandleArenaTeamRemoveOpcode(WorldPacket & recvData) arenaTeam->BroadcastEvent(ERR_ARENA_TEAM_REMOVE_SSS, 0, 3, name, arenaTeam->GetName(), _player->GetName()); } -void WorldSession::HandleArenaTeamLeaderOpcode(WorldPacket & recvData) +void WorldSession::HandleArenaTeamLeaderOpcode(WorldPacket& recvData) { sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_ARENA_TEAM_LEADER"); diff --git a/src/server/game/Handlers/AuctionHouseHandler.cpp b/src/server/game/Handlers/AuctionHouseHandler.cpp index 5db1fe16003..777afddfe09 100644 --- a/src/server/game/Handlers/AuctionHouseHandler.cpp +++ b/src/server/game/Handlers/AuctionHouseHandler.cpp @@ -138,7 +138,7 @@ void WorldSession::SendAuctionRemovedNotification(uint32 auctionId, uint32 itemE } //this void creates new auction and adds auction to some auctionhouse -void WorldSession::HandleAuctionSellItem(WorldPacket & recvData) +void WorldSession::HandleAuctionSellItem(WorldPacket& recvData) { uint64 auctioneer, bid, buyout; uint32 itemsCount, etime; @@ -514,7 +514,7 @@ void WorldSession::HandleAuctionPlaceBid(WorldPacket& recvData) } //this void is called when auction_owner cancels his auction -void WorldSession::HandleAuctionRemoveItem(WorldPacket & recvData) +void WorldSession::HandleAuctionRemoveItem(WorldPacket& recvData) { sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_AUCTION_REMOVE_ITEM"); @@ -589,7 +589,7 @@ void WorldSession::HandleAuctionRemoveItem(WorldPacket & recvData) } //called when player lists his bids -void WorldSession::HandleAuctionListBidderItems(WorldPacket & recvData) +void WorldSession::HandleAuctionListBidderItems(WorldPacket& recvData) { sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_AUCTION_LIST_BIDDER_ITEMS"); @@ -646,7 +646,7 @@ void WorldSession::HandleAuctionListBidderItems(WorldPacket & recvData) } //this void sends player info about his auctions -void WorldSession::HandleAuctionListOwnerItems(WorldPacket & recvData) +void WorldSession::HandleAuctionListOwnerItems(WorldPacket& recvData) { sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_AUCTION_LIST_OWNER_ITEMS"); @@ -683,7 +683,7 @@ void WorldSession::HandleAuctionListOwnerItems(WorldPacket & recvData) } //this void is called when player clicks on search button -void WorldSession::HandleAuctionListItems(WorldPacket & recvData) +void WorldSession::HandleAuctionListItems(WorldPacket& recvData) { sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_AUCTION_LIST_ITEMS"); @@ -746,7 +746,7 @@ void WorldSession::HandleAuctionListItems(WorldPacket & recvData) SendPacket(&data); } -void WorldSession::HandleAuctionListPendingSales(WorldPacket & recvData) +void WorldSession::HandleAuctionListPendingSales(WorldPacket& recvData) { sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_AUCTION_LIST_PENDING_SALES"); diff --git a/src/server/game/Handlers/AuthHandler.cpp b/src/server/game/Handlers/AuthHandler.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Handlers/BattleGroundHandler.cpp b/src/server/game/Handlers/BattleGroundHandler.cpp old mode 100755 new mode 100644 index a2780459f9b..2ef56a7a1b8 --- a/src/server/game/Handlers/BattleGroundHandler.cpp +++ b/src/server/game/Handlers/BattleGroundHandler.cpp @@ -35,7 +35,7 @@ #include "DisableMgr.h" #include "Group.h" -void WorldSession::HandleBattlemasterHelloOpcode(WorldPacket & recvData) +void WorldSession::HandleBattlemasterHelloOpcode(WorldPacket& recvData) { uint64 guid; recvData >> guid; @@ -70,7 +70,7 @@ void WorldSession::SendBattleGroundList(uint64 guid, BattlegroundTypeId bgTypeId SendPacket(&data); } -void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket & recvData) +void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket& recvData) { uint32 bgTypeId_; uint32 instanceId; @@ -661,7 +661,7 @@ void WorldSession::HandleBattlefieldStatusOpcode(WorldPacket & /*recvData*/) } } -void WorldSession::HandleBattlemasterJoinArena(WorldPacket & recvData) +void WorldSession::HandleBattlemasterJoinArena(WorldPacket& recvData) { sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_BATTLEMASTER_JOIN_ARENA"); @@ -768,7 +768,7 @@ void WorldSession::HandleBattlemasterJoinArena(WorldPacket & recvData) sBattlegroundMgr->ScheduleQueueUpdate(matchmakerRating, arenatype, bgQueueTypeId, bgTypeId, bracketEntry->GetBracketId()); } -void WorldSession::HandleReportPvPAFK(WorldPacket & recvData) +void WorldSession::HandleReportPvPAFK(WorldPacket& recvData) { uint64 playerGuid; recvData >> playerGuid; @@ -858,4 +858,4 @@ void WorldSession::HandleRequestRatedBgStats(WorldPacket& recvData) data << _player->GetCurrency(CURRENCY_TYPE_CONQUEST_POINTS, true); SendPacket(&data); -} \ No newline at end of file +} diff --git a/src/server/game/Battlefield/BattlefieldHandler.cpp b/src/server/game/Handlers/BattlefieldHandler.cpp similarity index 100% rename from src/server/game/Battlefield/BattlefieldHandler.cpp rename to src/server/game/Handlers/BattlefieldHandler.cpp diff --git a/src/server/game/Handlers/CalendarHandler.cpp b/src/server/game/Handlers/CalendarHandler.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Handlers/ChannelHandler.cpp b/src/server/game/Handlers/ChannelHandler.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Handlers/CharacterHandler.cpp b/src/server/game/Handlers/CharacterHandler.cpp index e0cd25edf22..d1a93b552c6 100644 --- a/src/server/game/Handlers/CharacterHandler.cpp +++ b/src/server/game/Handlers/CharacterHandler.cpp @@ -277,7 +277,7 @@ void WorldSession::HandleCharEnumOpcode(WorldPacket & /*recvData*/) _charEnumCallback = CharacterDatabase.AsyncQuery(stmt); } -void WorldSession::HandleCharCreateOpcode(WorldPacket & recvData) +void WorldSession::HandleCharCreateOpcode(WorldPacket& recvData) { std::string name; uint8 race_, class_; @@ -698,7 +698,7 @@ void WorldSession::HandleCharCreateCallback(PreparedQueryResult result, Characte } } -void WorldSession::HandleCharDeleteOpcode(WorldPacket & recvData) +void WorldSession::HandleCharDeleteOpcode(WorldPacket& recvData) { uint64 guid; recvData >> guid; @@ -1095,7 +1095,7 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder* holder) delete holder; } -void WorldSession::HandleSetFactionAtWar(WorldPacket & recvData) +void WorldSession::HandleSetFactionAtWar(WorldPacket& recvData) { sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_SET_FACTION_ATWAR"); @@ -1115,7 +1115,7 @@ void WorldSession::HandleSetFactionCheat(WorldPacket & /*recvData*/) GetPlayer()->GetReputationMgr().SendStates(); } -void WorldSession::HandleTutorialFlag(WorldPacket & recvData) +void WorldSession::HandleTutorialFlag(WorldPacket& recvData) { uint32 data; recvData >> data; @@ -1143,7 +1143,7 @@ void WorldSession::HandleTutorialReset(WorldPacket& /*recvData*/) SetTutorialInt(i, 0x00000000); } -void WorldSession::HandleSetWatchedFactionOpcode(WorldPacket & recvData) +void WorldSession::HandleSetWatchedFactionOpcode(WorldPacket& recvData) { sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_SET_WATCHED_FACTION"); uint32 fact; @@ -1151,7 +1151,7 @@ void WorldSession::HandleSetWatchedFactionOpcode(WorldPacket & recvData) GetPlayer()->SetUInt32Value(PLAYER_FIELD_WATCHED_FACTION_INDEX, fact); } -void WorldSession::HandleSetFactionInactiveOpcode(WorldPacket & recvData) +void WorldSession::HandleSetFactionInactiveOpcode(WorldPacket& recvData) { sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_SET_FACTION_INACTIVE"); uint32 replistid; @@ -1440,7 +1440,7 @@ void WorldSession::HandleAlterAppearance(WorldPacket& recvData) _player->SetStandState(0); // stand up } -void WorldSession::HandleRemoveGlyph(WorldPacket & recvData) +void WorldSession::HandleRemoveGlyph(WorldPacket& recvData) { uint32 slot; recvData >> slot; diff --git a/src/server/game/Handlers/CombatHandler.cpp b/src/server/game/Handlers/CombatHandler.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Handlers/DuelHandler.cpp b/src/server/game/Handlers/DuelHandler.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Handlers/GroupHandler.cpp b/src/server/game/Handlers/GroupHandler.cpp index af5b3123707..2dd870365e9 100644 --- a/src/server/game/Handlers/GroupHandler.cpp +++ b/src/server/game/Handlers/GroupHandler.cpp @@ -58,7 +58,7 @@ void WorldSession::SendPartyResult(PartyOperation operation, const std::string& SendPacket(&data); } -void WorldSession::HandleGroupInviteOpcode(WorldPacket & recvData) +void WorldSession::HandleGroupInviteOpcode(WorldPacket& recvData) { sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GROUP_INVITE"); @@ -447,7 +447,7 @@ void WorldSession::HandleGroupUninviteGuidOpcode(WorldPacket& recvData) SendPartyResult(PARTY_OP_UNINVITE, "", ERR_TARGET_NOT_IN_GROUP_S); } -void WorldSession::HandleGroupUninviteOpcode(WorldPacket & recvData) +void WorldSession::HandleGroupUninviteOpcode(WorldPacket& recvData) { sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GROUP_UNINVITE"); @@ -610,7 +610,7 @@ void WorldSession::HandleGroupDisbandOpcode(WorldPacket& /*recvData*/) GetPlayer()->RemoveFromGroup(GROUP_REMOVEMETHOD_LEAVE); } -void WorldSession::HandleLootMethodOpcode(WorldPacket & recvData) +void WorldSession::HandleLootMethodOpcode(WorldPacket& recvData) { sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_LOOT_METHOD"); @@ -819,7 +819,7 @@ void WorldSession::HandleGroupSwapSubGroupOpcode(WorldPacket& recvData) recvData >> unk2; } -void WorldSession::HandleGroupAssistantLeaderOpcode(WorldPacket & recvData) +void WorldSession::HandleGroupAssistantLeaderOpcode(WorldPacket& recvData) { sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GROUP_ASSISTANT_LEADER"); diff --git a/src/server/game/Handlers/GuildHandler.cpp b/src/server/game/Handlers/GuildHandler.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Handlers/ItemHandler.cpp b/src/server/game/Handlers/ItemHandler.cpp index a6ffcc2b2ef..bffad4b84c2 100644 --- a/src/server/game/Handlers/ItemHandler.cpp +++ b/src/server/game/Handlers/ItemHandler.cpp @@ -62,7 +62,7 @@ void WorldSession::HandleSplitItemOpcode(WorldPacket& recvData) _player->SplitItem(src, dst, count); } -void WorldSession::HandleSwapInvItemOpcode(WorldPacket & recvData) +void WorldSession::HandleSwapInvItemOpcode(WorldPacket& recvData) { //sLog->outDebug(LOG_FILTER_PACKETIO, "WORLD: CMSG_SWAP_INV_ITEM"); uint8 srcslot, dstslot; @@ -141,7 +141,7 @@ void WorldSession::HandleSwapItem(WorldPacket& recvData) _player->SwapItem(src, dst); } -void WorldSession::HandleAutoEquipItemOpcode(WorldPacket & recvData) +void WorldSession::HandleAutoEquipItemOpcode(WorldPacket& recvData) { //sLog->outDebug(LOG_FILTER_PACKETIO, "WORLD: CMSG_AUTOEQUIP_ITEM"); uint8 srcbag, srcslot; @@ -235,7 +235,7 @@ void WorldSession::HandleAutoEquipItemOpcode(WorldPacket & recvData) } } -void WorldSession::HandleDestroyItemOpcode(WorldPacket & recvData) +void WorldSession::HandleDestroyItemOpcode(WorldPacket& recvData) { //sLog->outDebug(LOG_FILTER_PACKETIO, "WORLD: CMSG_DESTROY_ITEM"); uint8 bag, slot, count, data1, data2, data3; @@ -473,7 +473,7 @@ void WorldSession::HandleReadItem(WorldPacket& recvData) _player->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, NULL, NULL); } -void WorldSession::HandleSellItemOpcode(WorldPacket & recvData) +void WorldSession::HandleSellItemOpcode(WorldPacket& recvData) { sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_SELL_ITEM"); uint64 vendorguid, itemguid; @@ -635,7 +635,7 @@ void WorldSession::HandleBuybackItem(WorldPacket& recvData) _player->SendBuyError(BUY_ERR_CANT_FIND_ITEM, creature, 0, 0); } -void WorldSession::HandleBuyItemInSlotOpcode(WorldPacket & recvData) +void WorldSession::HandleBuyItemInSlotOpcode(WorldPacket& recvData) { sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_BUY_ITEM_IN_SLOT"); uint64 vendorguid, bagguid; @@ -702,7 +702,7 @@ void WorldSession::HandleBuyItemOpcode(WorldPacket& recvData) sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: received wrong itemType (%u) in HandleBuyItemOpcode", itemType); } -void WorldSession::HandleListInventoryOpcode(WorldPacket & recvData) +void WorldSession::HandleListInventoryOpcode(WorldPacket& recvData) { uint64 guid; @@ -1449,7 +1449,7 @@ void WorldSession::HandleItemRefund(WorldPacket &recvData) * * This function is called when player clicks on item which has some flag set */ -void WorldSession::HandleItemTextQuery(WorldPacket & recvData ) +void WorldSession::HandleItemTextQuery(WorldPacket& recvData ) { uint64 itemGuid; recvData >> itemGuid; diff --git a/src/server/game/Handlers/LFGHandler.cpp b/src/server/game/Handlers/LFGHandler.cpp old mode 100755 new mode 100644 index c413fdaa4fc..5fa219dd2a4 --- a/src/server/game/Handlers/LFGHandler.cpp +++ b/src/server/game/Handlers/LFGHandler.cpp @@ -148,7 +148,7 @@ void WorldSession::HandleLfgSetBootVoteOpcode(WorldPacket& recvData) uint64 guid = GetPlayer()->GetGUID(); sLog->outDebug(LOG_FILTER_LFG, "CMSG_LFG_SET_BOOT_VOTE %s agree: %u", GetPlayerInfo().c_str(), agree ? 1 : 0); - sLFGMgr->UpdateBoot(guid, agree); + sLFGMgr->UpdateBoot(guid, agree ? LFG_ANSWER_AGREE : LFG_ANSWER_DENY); } void WorldSession::HandleLfgTeleportOpcode(WorldPacket& recvData) diff --git a/src/server/game/Handlers/LootHandler.cpp b/src/server/game/Handlers/LootHandler.cpp old mode 100755 new mode 100644 index 283a40d8409..e34dde7209f --- a/src/server/game/Handlers/LootHandler.cpp +++ b/src/server/game/Handlers/LootHandler.cpp @@ -32,7 +32,7 @@ #include "WorldPacket.h" #include "WorldSession.h" -void WorldSession::HandleAutostoreLootItemOpcode(WorldPacket & recvData) +void WorldSession::HandleAutostoreLootItemOpcode(WorldPacket& recvData) { sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_AUTOSTORE_LOOT_ITEM"); Player* player = GetPlayer(); @@ -212,7 +212,7 @@ void WorldSession::HandleLootMoneyOpcode(WorldPacket& /*recvData*/) } } -void WorldSession::HandleLootOpcode(WorldPacket & recvData) +void WorldSession::HandleLootOpcode(WorldPacket& recvData) { sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_LOOT"); diff --git a/src/server/game/Handlers/MailHandler.cpp b/src/server/game/Handlers/MailHandler.cpp index 428eee37db0..320712c074e 100644 --- a/src/server/game/Handlers/MailHandler.cpp +++ b/src/server/game/Handlers/MailHandler.cpp @@ -343,7 +343,7 @@ void WorldSession::HandleSendMail(WorldPacket& recvData) } //called when mail is read -void WorldSession::HandleMailMarkAsRead(WorldPacket & recvData) +void WorldSession::HandleMailMarkAsRead(WorldPacket& recvData) { uint64 mailbox; uint32 mailId; @@ -366,7 +366,7 @@ void WorldSession::HandleMailMarkAsRead(WorldPacket & recvData) } //called when client deletes mail -void WorldSession::HandleMailDelete(WorldPacket & recvData) +void WorldSession::HandleMailDelete(WorldPacket& recvData) { uint64 mailbox; uint32 mailId; @@ -394,7 +394,7 @@ void WorldSession::HandleMailDelete(WorldPacket & recvData) player->SendMailResult(mailId, MAIL_DELETED, MAIL_OK); } -void WorldSession::HandleMailReturnToSender(WorldPacket & recvData) +void WorldSession::HandleMailReturnToSender(WorldPacket& recvData) { uint64 mailbox; uint32 mailId; diff --git a/src/server/game/Handlers/MovementHandler.cpp b/src/server/game/Handlers/MovementHandler.cpp index 2b9cf4a9b6d..5adaba3f5ec 100644 --- a/src/server/game/Handlers/MovementHandler.cpp +++ b/src/server/game/Handlers/MovementHandler.cpp @@ -554,7 +554,7 @@ void WorldSession::HandleMountSpecialAnimOpcode(WorldPacket& /*recvData*/) GetPlayer()->SendMessageToSet(&data, false); } -void WorldSession::HandleMoveKnockBackAck(WorldPacket & recvData) +void WorldSession::HandleMoveKnockBackAck(WorldPacket& recvData) { sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_MOVE_KNOCK_BACK_ACK"); diff --git a/src/server/game/Handlers/NPCHandler.cpp b/src/server/game/Handlers/NPCHandler.cpp old mode 100755 new mode 100644 index 30d51e03b11..02a5a9c26e1 --- a/src/server/game/Handlers/NPCHandler.cpp +++ b/src/server/game/Handlers/NPCHandler.cpp @@ -48,7 +48,7 @@ enum StableResultCode STABLE_ERR_EXOTIC = 0x0C // "you are unable to control exotic creatures" }; -void WorldSession::HandleTabardVendorActivateOpcode(WorldPacket & recvData) +void WorldSession::HandleTabardVendorActivateOpcode(WorldPacket& recvData) { uint64 guid; recvData >> guid; @@ -103,7 +103,7 @@ void WorldSession::SendShowBank(uint64 guid) SendPacket(&data); } -void WorldSession::HandleTrainerListOpcode(WorldPacket & recvData) +void WorldSession::HandleTrainerListOpcode(WorldPacket& recvData) { uint64 guid; @@ -322,7 +322,7 @@ void WorldSession::SendTrainerBuyFailed(uint64 guid, uint32 spellId, uint32 reas SendPacket(&data); } -void WorldSession::HandleGossipHelloOpcode(WorldPacket & recvData) +void WorldSession::HandleGossipHelloOpcode(WorldPacket& recvData) { sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GOSSIP_HELLO"); @@ -369,7 +369,7 @@ void WorldSession::HandleGossipHelloOpcode(WorldPacket & recvData) unit->AI()->sGossipHello(_player); } -/*void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket & recvData) +/*void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket& recvData) { sLog->outDebug(LOG_FILTER_PACKETIO, "WORLD: CMSG_GOSSIP_SELECT_OPTION"); @@ -410,7 +410,7 @@ void WorldSession::HandleGossipHelloOpcode(WorldPacket & recvData) } }*/ -void WorldSession::HandleSpiritHealerActivateOpcode(WorldPacket & recvData) +void WorldSession::HandleSpiritHealerActivateOpcode(WorldPacket& recvData) { sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_SPIRIT_HEALER_ACTIVATE"); @@ -522,7 +522,7 @@ void WorldSession::SendBindPoint(Creature* npc) _player->PlayerTalkClass->SendCloseGossip(); } -void WorldSession::HandleListStabledPetsOpcode(WorldPacket & recvData) +void WorldSession::HandleListStabledPetsOpcode(WorldPacket& recvData) { sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recv MSG_LIST_STABLED_PETS"); uint64 npcGUID; @@ -616,7 +616,7 @@ void WorldSession::SendStableResult(uint8 res) SendPacket(&data); } -void WorldSession::HandleStablePet(WorldPacket & recvData) +void WorldSession::HandleStablePet(WorldPacket& recvData) { sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recv CMSG_STABLE_PET"); uint64 npcGUID; @@ -691,7 +691,7 @@ void WorldSession::HandleStablePetCallback(PreparedQueryResult result) SendStableResult(STABLE_ERR_STABLE); } -void WorldSession::HandleUnstablePet(WorldPacket & recvData) +void WorldSession::HandleUnstablePet(WorldPacket& recvData) { sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recv CMSG_UNSTABLE_PET."); uint64 npcGUID; @@ -772,7 +772,7 @@ void WorldSession::HandleUnstablePetCallback(PreparedQueryResult result, uint32 SendStableResult(STABLE_SUCCESS_UNSTABLE); } -void WorldSession::HandleBuyStableSlot(WorldPacket & recvData) +void WorldSession::HandleBuyStableSlot(WorldPacket& recvData) { sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recv CMSG_BUY_STABLE_SLOT."); uint64 npcGUID; @@ -810,7 +810,7 @@ void WorldSession::HandleStableRevivePet(WorldPacket &/* recvData */) sLog->outDebug(LOG_FILTER_NETWORKIO, "HandleStableRevivePet: Not implemented"); } -void WorldSession::HandleStableSwapPet(WorldPacket & recvData) +void WorldSession::HandleStableSwapPet(WorldPacket& recvData) { sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recv CMSG_STABLE_SWAP_PET."); uint64 npcGUID; diff --git a/src/server/game/Handlers/NPCHandler.h b/src/server/game/Handlers/NPCHandler.h old mode 100755 new mode 100644 diff --git a/src/server/game/Handlers/PetHandler.cpp b/src/server/game/Handlers/PetHandler.cpp index 785f39c4a8e..3bf64726f03 100644 --- a/src/server/game/Handlers/PetHandler.cpp +++ b/src/server/game/Handlers/PetHandler.cpp @@ -56,7 +56,7 @@ void WorldSession::HandleDismissCritter(WorldPacket& recvData) } } -void WorldSession::HandlePetAction(WorldPacket & recvData) +void WorldSession::HandlePetAction(WorldPacket& recvData) { uint64 guid1; uint32 data; @@ -420,7 +420,7 @@ void WorldSession::HandlePetActionHelper(Unit* pet, uint64 guid1, uint32 spellid } } -void WorldSession::HandlePetNameQuery(WorldPacket & recvData) +void WorldSession::HandlePetNameQuery(WorldPacket& recvData) { sLog->outInfo(LOG_FILTER_NETWORKIO, "HandlePetNameQuery. CMSG_PET_NAME_QUERY"); @@ -487,7 +487,7 @@ bool WorldSession::CheckStableMaster(uint64 guid) return true; } -void WorldSession::HandlePetSetAction(WorldPacket & recvData) +void WorldSession::HandlePetSetAction(WorldPacket& recvData) { sLog->outInfo(LOG_FILTER_NETWORKIO, "HandlePetSetAction. CMSG_PET_SET_ACTION"); @@ -604,7 +604,7 @@ void WorldSession::HandlePetSetAction(WorldPacket & recvData) } } -void WorldSession::HandlePetRename(WorldPacket & recvData) +void WorldSession::HandlePetRename(WorldPacket& recvData) { sLog->outInfo(LOG_FILTER_NETWORKIO, "HandlePetRename. CMSG_PET_RENAME"); @@ -689,7 +689,7 @@ void WorldSession::HandlePetRename(WorldPacket & recvData) pet->SetUInt32Value(UNIT_FIELD_PET_NAME_TIMESTAMP, uint32(time(NULL))); // cast can't be helped } -void WorldSession::HandlePetAbandon(WorldPacket & recvData) +void WorldSession::HandlePetAbandon(WorldPacket& recvData) { uint64 guid; recvData >> guid; //pet guid @@ -877,7 +877,7 @@ void WorldSession::HandlePetLearnTalent(WorldPacket& recvData) _player->SendTalentsInfoData(true); } -void WorldSession::HandleLearnPreviewTalentsPet(WorldPacket & recvData) +void WorldSession::HandleLearnPreviewTalentsPet(WorldPacket& recvData) { sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_LEARN_PREVIEW_TALENTS_PET"); diff --git a/src/server/game/Handlers/PetitionsHandler.cpp b/src/server/game/Handlers/PetitionsHandler.cpp old mode 100755 new mode 100644 index 09f13401918..9b7338f1104 --- a/src/server/game/Handlers/PetitionsHandler.cpp +++ b/src/server/game/Handlers/PetitionsHandler.cpp @@ -50,7 +50,7 @@ enum CharterCosts ARENA_TEAM_CHARTER_5v5_COST = 2000000 }; -void WorldSession::HandlePetitionBuyOpcode(WorldPacket & recvData) +void WorldSession::HandlePetitionBuyOpcode(WorldPacket& recvData) { sLog->outDebug(LOG_FILTER_NETWORKIO, "Received opcode CMSG_PETITION_BUY"); @@ -305,7 +305,7 @@ void WorldSession::HandlePetitionShowSignOpcode(WorldPacket& recvData) SendPacket(&data); } -void WorldSession::HandlePetitionQueryOpcode(WorldPacket & recvData) +void WorldSession::HandlePetitionQueryOpcode(WorldPacket& recvData) { sLog->outDebug(LOG_FILTER_NETWORKIO, "Received opcode CMSG_PETITION_QUERY"); // ok @@ -380,7 +380,7 @@ void WorldSession::SendPetitionQueryOpcode(uint64 petitionguid) SendPacket(&data); } -void WorldSession::HandlePetitionRenameOpcode(WorldPacket & recvData) +void WorldSession::HandlePetitionRenameOpcode(WorldPacket& recvData) { sLog->outDebug(LOG_FILTER_NETWORKIO, "Received opcode MSG_PETITION_RENAME"); @@ -453,7 +453,7 @@ void WorldSession::HandlePetitionRenameOpcode(WorldPacket & recvData) SendPacket(&data); } -void WorldSession::HandlePetitionSignOpcode(WorldPacket & recvData) +void WorldSession::HandlePetitionSignOpcode(WorldPacket& recvData) { sLog->outDebug(LOG_FILTER_NETWORKIO, "Received opcode CMSG_PETITION_SIGN"); // ok @@ -586,7 +586,7 @@ void WorldSession::HandlePetitionSignOpcode(WorldPacket & recvData) owner->GetSession()->SendPacket(&data); } -void WorldSession::HandlePetitionDeclineOpcode(WorldPacket & recvData) +void WorldSession::HandlePetitionDeclineOpcode(WorldPacket& recvData) { sLog->outDebug(LOG_FILTER_NETWORKIO, "Received opcode MSG_PETITION_DECLINE"); // ok @@ -616,7 +616,7 @@ void WorldSession::HandlePetitionDeclineOpcode(WorldPacket & recvData) } } -void WorldSession::HandleOfferPetitionOpcode(WorldPacket & recvData) +void WorldSession::HandleOfferPetitionOpcode(WorldPacket& recvData) { sLog->outDebug(LOG_FILTER_NETWORKIO, "Received opcode CMSG_OFFER_PETITION"); // ok @@ -725,7 +725,7 @@ void WorldSession::HandleOfferPetitionOpcode(WorldPacket & recvData) player->GetSession()->SendPacket(&data); } -void WorldSession::HandleTurnInPetitionOpcode(WorldPacket & recvData) +void WorldSession::HandleTurnInPetitionOpcode(WorldPacket& recvData) { sLog->outDebug(LOG_FILTER_NETWORKIO, "Received opcode CMSG_TURN_IN_PETITION"); @@ -915,7 +915,7 @@ void WorldSession::HandleTurnInPetitionOpcode(WorldPacket & recvData) SendPacket(&data); } -void WorldSession::HandlePetitionShowListOpcode(WorldPacket & recvData) +void WorldSession::HandlePetitionShowListOpcode(WorldPacket& recvData) { sLog->outDebug(LOG_FILTER_NETWORKIO, "Received CMSG_PETITION_SHOWLIST"); diff --git a/src/server/game/Handlers/QueryHandler.cpp b/src/server/game/Handlers/QueryHandler.cpp old mode 100755 new mode 100644 index a1f823b4534..b0bf5038f62 --- a/src/server/game/Handlers/QueryHandler.cpp +++ b/src/server/game/Handlers/QueryHandler.cpp @@ -89,7 +89,7 @@ void WorldSession::SendQueryTimeResponse() } /// Only _static_ data is sent in this packet !!! -void WorldSession::HandleCreatureQueryOpcode(WorldPacket & recvData) +void WorldSession::HandleCreatureQueryOpcode(WorldPacket& recvData) { uint32 entry; recvData >> entry; @@ -157,7 +157,7 @@ void WorldSession::HandleCreatureQueryOpcode(WorldPacket & recvData) } /// Only _static_ data is sent in this packet !!! -void WorldSession::HandleGameObjectQueryOpcode(WorldPacket & recvData) +void WorldSession::HandleGameObjectQueryOpcode(WorldPacket& recvData) { uint32 entry; recvData >> entry; @@ -264,7 +264,7 @@ void WorldSession::HandleCorpseQueryOpcode(WorldPacket& /*recvData*/) SendPacket(&data); } -void WorldSession::HandleNpcTextQueryOpcode(WorldPacket & recvData) +void WorldSession::HandleNpcTextQueryOpcode(WorldPacket& recvData) { uint32 textID; uint64 guid; diff --git a/src/server/game/Handlers/QuestHandler.cpp b/src/server/game/Handlers/QuestHandler.cpp index cc4a410e413..051e71e3b27 100644 --- a/src/server/game/Handlers/QuestHandler.cpp +++ b/src/server/game/Handlers/QuestHandler.cpp @@ -33,7 +33,7 @@ #include "ScriptMgr.h" #include "GameObjectAI.h" -void WorldSession::HandleQuestgiverStatusQueryOpcode(WorldPacket & recvData) +void WorldSession::HandleQuestgiverStatusQueryOpcode(WorldPacket& recvData) { uint64 guid; recvData >> guid; @@ -268,7 +268,7 @@ void WorldSession::HandleQuestgiverQueryQuestOpcode(WorldPacket& recvData) } } -void WorldSession::HandleQuestQueryOpcode(WorldPacket & recvData) +void WorldSession::HandleQuestQueryOpcode(WorldPacket& recvData) { if (!_player) return; @@ -378,7 +378,7 @@ void WorldSession::HandleQuestgiverChooseRewardOpcode(WorldPacket& recvData) _player->PlayerTalkClass->SendQuestGiverOfferReward(quest, guid, true); } -void WorldSession::HandleQuestgiverRequestRewardOpcode(WorldPacket & recvData) +void WorldSession::HandleQuestgiverRequestRewardOpcode(WorldPacket& recvData) { uint32 questId; uint64 guid; diff --git a/src/server/game/Handlers/SkillHandler.cpp b/src/server/game/Handlers/SkillHandler.cpp old mode 100755 new mode 100644 index 8153af95208..86fe813d593 --- a/src/server/game/Handlers/SkillHandler.cpp +++ b/src/server/game/Handlers/SkillHandler.cpp @@ -27,7 +27,7 @@ #include "WorldPacket.h" #include "WorldSession.h" -void WorldSession::HandleLearnTalentOpcode(WorldPacket & recvData) +void WorldSession::HandleLearnTalentOpcode(WorldPacket& recvData) { uint32 talentId, requestedRank; recvData >> talentId >> requestedRank; diff --git a/src/server/game/Handlers/SpellHandler.cpp b/src/server/game/Handlers/SpellHandler.cpp old mode 100755 new mode 100644 index e85a888e01c..6dd12e49b5e --- a/src/server/game/Handlers/SpellHandler.cpp +++ b/src/server/game/Handlers/SpellHandler.cpp @@ -285,7 +285,7 @@ void WorldSession::HandleOpenItemOpcode(WorldPacket& recvPacket) pUser->SendLoot(item->GetGUID(), LOOT_CORPSE); } -void WorldSession::HandleGameObjectUseOpcode(WorldPacket & recvData) +void WorldSession::HandleGameObjectUseOpcode(WorldPacket& recvData) { uint64 guid; diff --git a/src/server/game/Handlers/TaxiHandler.cpp b/src/server/game/Handlers/TaxiHandler.cpp old mode 100755 new mode 100644 index a3e7959cdeb..e86c71bd3e0 --- a/src/server/game/Handlers/TaxiHandler.cpp +++ b/src/server/game/Handlers/TaxiHandler.cpp @@ -163,7 +163,7 @@ void WorldSession::SendDiscoverNewTaxiNode(uint32 nodeid) } } -void WorldSession::HandleActivateTaxiExpressOpcode (WorldPacket & recvData) +void WorldSession::HandleActivateTaxiExpressOpcode (WorldPacket& recvData) { sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_ACTIVATETAXIEXPRESS"); @@ -270,7 +270,7 @@ void WorldSession::HandleMoveSplineDoneOpcode(WorldPacket& recvData) GetPlayer()->CastSpell(GetPlayer(), 2479, true); } -void WorldSession::HandleActivateTaxiOpcode(WorldPacket & recvData) +void WorldSession::HandleActivateTaxiOpcode(WorldPacket& recvData) { sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_ACTIVATETAXI"); diff --git a/src/server/game/Handlers/TicketHandler.cpp b/src/server/game/Handlers/TicketHandler.cpp index 1571d857f41..a632f956470 100644 --- a/src/server/game/Handlers/TicketHandler.cpp +++ b/src/server/game/Handlers/TicketHandler.cpp @@ -97,7 +97,7 @@ void WorldSession::HandleGMTicketCreateOpcode(WorldPacket& recvData) SendPacket(&data); } -void WorldSession::HandleGMTicketUpdateOpcode(WorldPacket & recvData) +void WorldSession::HandleGMTicketUpdateOpcode(WorldPacket& recvData) { std::string message; recvData >> message; diff --git a/src/server/game/Handlers/TradeHandler.cpp b/src/server/game/Handlers/TradeHandler.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Handlers/VoiceChatHandler.cpp b/src/server/game/Handlers/VoiceChatHandler.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Instances/InstanceSaveMgr.cpp b/src/server/game/Instances/InstanceSaveMgr.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Instances/InstanceSaveMgr.h b/src/server/game/Instances/InstanceSaveMgr.h old mode 100755 new mode 100644 diff --git a/src/server/game/Instances/InstanceScript.cpp b/src/server/game/Instances/InstanceScript.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Instances/InstanceScript.h b/src/server/game/Instances/InstanceScript.h old mode 100755 new mode 100644 diff --git a/src/server/game/Loot/LootMgr.cpp b/src/server/game/Loot/LootMgr.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Loot/LootMgr.h b/src/server/game/Loot/LootMgr.h old mode 100755 new mode 100644 diff --git a/src/server/game/Mails/Mail.cpp b/src/server/game/Mails/Mail.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Mails/Mail.h b/src/server/game/Mails/Mail.h old mode 100755 new mode 100644 diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Maps/Map.h b/src/server/game/Maps/Map.h old mode 100755 new mode 100644 diff --git a/src/server/game/Maps/MapInstanced.cpp b/src/server/game/Maps/MapInstanced.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Maps/MapInstanced.h b/src/server/game/Maps/MapInstanced.h old mode 100755 new mode 100644 diff --git a/src/server/game/Maps/MapManager.cpp b/src/server/game/Maps/MapManager.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Maps/MapManager.h b/src/server/game/Maps/MapManager.h old mode 100755 new mode 100644 diff --git a/src/server/game/Maps/MapRefManager.h b/src/server/game/Maps/MapRefManager.h old mode 100755 new mode 100644 diff --git a/src/server/game/Maps/MapReference.h b/src/server/game/Maps/MapReference.h old mode 100755 new mode 100644 diff --git a/src/server/game/Maps/ZoneScript.h b/src/server/game/Maps/ZoneScript.h old mode 100755 new mode 100644 diff --git a/src/server/game/Miscellaneous/Formulas.h b/src/server/game/Miscellaneous/Formulas.h old mode 100755 new mode 100644 diff --git a/src/server/game/Miscellaneous/Language.h b/src/server/game/Miscellaneous/Language.h old mode 100755 new mode 100644 diff --git a/src/server/game/Miscellaneous/SharedDefines.h b/src/server/game/Miscellaneous/SharedDefines.h old mode 100755 new mode 100644 index 95ad89392b2..1056de4e760 --- a/src/server/game/Miscellaneous/SharedDefines.h +++ b/src/server/game/Miscellaneous/SharedDefines.h @@ -93,7 +93,7 @@ enum Races #define RACEMASK_ALLIANCE \ ((1<<(RACE_HUMAN-1)) | (1<<(RACE_DWARF-1)) | (1<<(RACE_NIGHTELF-1)) | \ - (1<<(RACE_GNOME-1)) | (1<<(RACE_DRAENEI-1)) | (1<<(RACE_WORGEN-1))) + (1<<(RACE_GNOME-1)) | (1<<(RACE_DRAENEI-1)) | (1<<(RACE_WORGEN-1))) #define RACEMASK_HORDE RACEMASK_ALL_PLAYABLE & ~RACEMASK_ALLIANCE @@ -3578,25 +3578,25 @@ enum BanReturn // indexes of BattlemasterList.dbc enum BattlegroundTypeId { - BATTLEGROUND_TYPE_NONE = 0, // None - BATTLEGROUND_AV = 1, // Alterac Valley - BATTLEGROUND_WS = 2, // Warsong Gulch - BATTLEGROUND_AB = 3, // Arathi Basin - BATTLEGROUND_NA = 4, // Nagrand Arena - BATTLEGROUND_BE = 5, // Blade's Edge Arena - BATTLEGROUND_AA = 6, // All Arenas - BATTLEGROUND_EY = 7, // Eye of the Storm - BATTLEGROUND_RL = 8, // Ruins of Lordaernon - BATTLEGROUND_SA = 9, // Strand of the Ancients - BATTLEGROUND_DS = 10, // Dalaran Sewers - BATTLEGROUND_RV = 11, // Ring of Valor - BATTLEGROUND_IC = 30, // Isle of Conquest - BATTLEGROUND_RB = 32, // Random Battleground - BATTLEGROUND_RATED_10_VS_10 = 100, // Rated BG 10 vs 10 - BATTLEGROUND_RATED_15_VS_15 = 101, // Rated BG 15 vs 15 - BATTLEGROUND_RATED_25_VS_25 = 102, // Rated BG 25 vs 25 - BATTLEGROUND_TP = 108, // Twin Peaks - BATTLEGROUND_BFG = 120, // Battle For Gilneas + BATTLEGROUND_TYPE_NONE = 0, // None + BATTLEGROUND_AV = 1, // Alterac Valley + BATTLEGROUND_WS = 2, // Warsong Gulch + BATTLEGROUND_AB = 3, // Arathi Basin + BATTLEGROUND_NA = 4, // Nagrand Arena + BATTLEGROUND_BE = 5, // Blade's Edge Arena + BATTLEGROUND_AA = 6, // All Arenas + BATTLEGROUND_EY = 7, // Eye of the Storm + BATTLEGROUND_RL = 8, // Ruins of Lordaernon + BATTLEGROUND_SA = 9, // Strand of the Ancients + BATTLEGROUND_DS = 10, // Dalaran Sewers + BATTLEGROUND_RV = 11, // Ring of Valor + BATTLEGROUND_IC = 30, // Isle of Conquest + BATTLEGROUND_RB = 32, // Random Battleground + BATTLEGROUND_RATED_10_VS_10 = 100, // Rated BG 10 vs 10 + BATTLEGROUND_RATED_15_VS_15 = 101, // Rated BG 15 vs 15 + BATTLEGROUND_RATED_25_VS_25 = 102, // Rated BG 25 vs 25 + BATTLEGROUND_TP = 108, // Twin Peaks + BATTLEGROUND_BFG = 120, // Battle For Gilneas // 441 = "Icecrown Citadel" // 443 = "The Ruby Sanctum" // 656 = "Rated Eye of the Storm" diff --git a/src/server/game/Movement/FollowerRefManager.h b/src/server/game/Movement/FollowerRefManager.h old mode 100755 new mode 100644 diff --git a/src/server/game/Movement/FollowerReference.cpp b/src/server/game/Movement/FollowerReference.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Movement/FollowerReference.h b/src/server/game/Movement/FollowerReference.h old mode 100755 new mode 100644 diff --git a/src/server/game/Movement/MotionMaster.cpp b/src/server/game/Movement/MotionMaster.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Movement/MotionMaster.h b/src/server/game/Movement/MotionMaster.h old mode 100755 new mode 100644 diff --git a/src/server/game/Movement/MovementGenerator.cpp b/src/server/game/Movement/MovementGenerator.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Movement/MovementGenerator.h b/src/server/game/Movement/MovementGenerator.h old mode 100755 new mode 100644 diff --git a/src/server/game/Movement/MovementGeneratorImpl.h b/src/server/game/Movement/MovementGeneratorImpl.h old mode 100755 new mode 100644 diff --git a/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.h b/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.h old mode 100755 new mode 100644 diff --git a/src/server/game/Movement/MovementGenerators/IdleMovementGenerator.h b/src/server/game/Movement/MovementGenerators/IdleMovementGenerator.h old mode 100755 new mode 100644 diff --git a/src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Movement/MovementGenerators/PointMovementGenerator.h b/src/server/game/Movement/MovementGenerators/PointMovementGenerator.h old mode 100755 new mode 100644 diff --git a/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.h b/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.h old mode 100755 new mode 100644 diff --git a/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.h b/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.h index f4a36e13a74..67cd8771aa7 100755 --- a/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.h +++ b/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.h @@ -113,4 +113,3 @@ class FollowMovementGenerator : public TargetedMovementGeneratorMediumSendDirectMessage(&data); diff --git a/src/server/game/Reputation/ReputationMgr.h b/src/server/game/Reputation/ReputationMgr.h old mode 100755 new mode 100644 diff --git a/src/server/game/Scripting/MapScripts.cpp b/src/server/game/Scripting/MapScripts.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Scripting/ScriptLoader.cpp b/src/server/game/Scripting/ScriptLoader.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Scripting/ScriptMgr.cpp b/src/server/game/Scripting/ScriptMgr.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Scripting/ScriptMgr.h b/src/server/game/Scripting/ScriptMgr.h old mode 100755 new mode 100644 diff --git a/src/server/game/Scripting/ScriptSystem.cpp b/src/server/game/Scripting/ScriptSystem.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Server/Protocol/Opcodes.h b/src/server/game/Server/Protocol/Opcodes.h old mode 100755 new mode 100644 diff --git a/src/server/game/Server/WorldSession.h b/src/server/game/Server/WorldSession.h old mode 100755 new mode 100644 diff --git a/src/server/game/Server/WorldSocket.h b/src/server/game/Server/WorldSocket.h old mode 100755 new mode 100644 diff --git a/src/server/game/Server/WorldSocketMgr.cpp b/src/server/game/Server/WorldSocketMgr.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Server/WorldSocketMgr.h b/src/server/game/Server/WorldSocketMgr.h old mode 100755 new mode 100644 diff --git a/src/server/game/Skills/SkillDiscovery.cpp b/src/server/game/Skills/SkillDiscovery.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Skills/SkillDiscovery.h b/src/server/game/Skills/SkillDiscovery.h old mode 100755 new mode 100644 diff --git a/src/server/game/Skills/SkillExtraItems.cpp b/src/server/game/Skills/SkillExtraItems.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Skills/SkillExtraItems.h b/src/server/game/Skills/SkillExtraItems.h old mode 100755 new mode 100644 diff --git a/src/server/game/Spells/Auras/SpellAuraDefines.h b/src/server/game/Spells/Auras/SpellAuraDefines.h old mode 100755 new mode 100644 diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index 3a7aa5110b3..f1ab2df2be6 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -646,13 +646,6 @@ int32 AuraEffect::CalculateAmount(Unit* caster) float mwb = ((mwb_min + mwb_max) / 2 + ap * mws / 14000) * 0.25f * 6.0f; amount += int32(caster->ApplyEffectModifiers(m_spellInfo, m_effIndex, mwb)); } - // Unholy Blight damage over time effect - else if (GetId() == 50536) - { - m_canBeRecalculated = false; - // we're getting total damage on aura apply, change it to be damage per tick - amount = int32((float)amount / GetTotalTicks()); - } break; case SPELL_AURA_PERIODIC_ENERGIZE: switch (m_spellInfo->Id) diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Spells/Auras/SpellAuras.h b/src/server/game/Spells/Auras/SpellAuras.h old mode 100755 new mode 100644 diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Spells/Spell.h b/src/server/game/Spells/Spell.h old mode 100755 new mode 100644 diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp index 65eea69714a..fbc0ae1d803 100644 --- a/src/server/game/Spells/SpellInfo.cpp +++ b/src/server/game/Spells/SpellInfo.cpp @@ -538,10 +538,15 @@ float SpellEffectInfo::CalcRadius(Unit* caster, Spell* spell) const { if (!HasRadius()) return 0.0f; - //TODO: FIX radius value - float radius = RadiusEntry->ID; - if (Player* modOwner = (caster ? caster->GetSpellModOwner() : NULL)) - modOwner->ApplySpellMod(_spellInfo->Id, SPELLMOD_RADIUS, radius, spell); + + float radius = RadiusEntry->RadiusMin; + if (caster) + { + radius += RadiusEntry->RadiusPerLevel * caster->getLevel(); + radius = std::min(radius, RadiusEntry->RadiusMax); + if (Player* modOwner = caster->GetSpellModOwner()) + modOwner->ApplySpellMod(_spellInfo->Id, SPELLMOD_RADIUS, radius, spell); + } return radius; } diff --git a/src/server/game/Spells/SpellMgr.h b/src/server/game/Spells/SpellMgr.h old mode 100755 new mode 100644 diff --git a/src/server/game/Spells/SpellScript.cpp b/src/server/game/Spells/SpellScript.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Spells/SpellScript.h b/src/server/game/Spells/SpellScript.h old mode 100755 new mode 100644 diff --git a/src/server/game/Texts/CreatureTextMgr.cpp b/src/server/game/Texts/CreatureTextMgr.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Texts/CreatureTextMgr.h b/src/server/game/Texts/CreatureTextMgr.h old mode 100755 new mode 100644 diff --git a/src/server/game/Tickets/TicketMgr.h b/src/server/game/Tickets/TicketMgr.h old mode 100755 new mode 100644 diff --git a/src/server/game/Tools/CharacterDatabaseCleaner.cpp b/src/server/game/Tools/CharacterDatabaseCleaner.cpp index 8c86b80e827..198bce4a9fe 100644 --- a/src/server/game/Tools/CharacterDatabaseCleaner.cpp +++ b/src/server/game/Tools/CharacterDatabaseCleaner.cpp @@ -17,6 +17,7 @@ */ #include "Common.h" +#include "AchievementMgr.h" #include "CharacterDatabaseCleaner.h" #include "World.h" #include "Database/DatabaseEnv.h" diff --git a/src/server/game/Tools/PlayerDump.h b/src/server/game/Tools/PlayerDump.h old mode 100755 new mode 100644 diff --git a/src/server/game/Weather/Weather.cpp b/src/server/game/Weather/Weather.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Weather/Weather.h b/src/server/game/Weather/Weather.h old mode 100755 new mode 100644 diff --git a/src/server/game/Weather/WeatherMgr.cpp b/src/server/game/Weather/WeatherMgr.cpp old mode 100755 new mode 100644 diff --git a/src/server/game/Weather/WeatherMgr.h b/src/server/game/Weather/WeatherMgr.h old mode 100755 new mode 100644 diff --git a/src/server/scripts/Commands/cs_disable.cpp b/src/server/scripts/Commands/cs_disable.cpp index 27145ca36aa..cf0b1f08e53 100644 --- a/src/server/scripts/Commands/cs_disable.cpp +++ b/src/server/scripts/Commands/cs_disable.cpp @@ -22,9 +22,9 @@ Comment: All disable related commands Category: commandscripts EndScriptData */ +#include "DisableMgr.h" #include "AchievementMgr.h" #include "Chat.h" -#include "DisableMgr.h" #include "Language.h" #include "ObjectMgr.h" #include "OutdoorPvP.h" diff --git a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp index da6fdb2d0e3..1fa5cc9c5af 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp @@ -226,7 +226,6 @@ public: if (text) CreatureAI::Talk(text); - } void PrepareEncounter() diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp index 4d9bd1f2192..dcf70b36df6 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp @@ -113,7 +113,7 @@ public: for (std::list::const_iterator itr = Crystals.begin(); itr != Crystals.end(); ++itr) { //Unit* unit = Unit::GetUnit(*me, FelCrystals[i]); - if (Creature *creature = Unit::GetCreature(*me, *itr)) + if (Creature* creature = Unit::GetCreature(*me, *itr)) { if (!creature->isAlive()) creature->Respawn(); // Let the core handle setting death state, etc. diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_baron_geddon.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/boss_baron_geddon.cpp index f792b861c99..85a54398511 100644 --- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_baron_geddon.cpp +++ b/src/server/scripts/EasternKingdoms/MoltenCore/boss_baron_geddon.cpp @@ -28,7 +28,10 @@ EndScriptData */ #include "ScriptedCreature.h" #include "molten_core.h" -#define EMOTE_SERVICE -1409000 +enum Emotes +{ + EMOTE_SERVICE = 0 +}; enum Spells { @@ -76,7 +79,7 @@ class boss_baron_geddon : public CreatureScript { me->InterruptNonMeleeSpells(true); DoCast(me, SPELL_ARMAGEDDON); - DoScriptText(EMOTE_SERVICE, me); + Talk(EMOTE_SERVICE); return; } diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_magmadar.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/boss_magmadar.cpp index 65a630a58f7..42952580d54 100644 --- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_magmadar.cpp +++ b/src/server/scripts/EasternKingdoms/MoltenCore/boss_magmadar.cpp @@ -30,7 +30,7 @@ EndScriptData */ enum Texts { - EMOTE_FRENZY = -1409001, + EMOTE_FRENZY = 0 }; enum Spells @@ -88,7 +88,7 @@ class boss_magmadar : public CreatureScript switch (eventId) { case EVENT_FRENZY: - DoScriptText(EMOTE_FRENZY, me); + Talk(EMOTE_FRENZY); DoCast(me, SPELL_FRENZY); events.ScheduleEvent(EVENT_FRENZY, 15000); break; diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_majordomo_executus.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/boss_majordomo_executus.cpp index c7d6b31d2ea..043e5b16330 100644 --- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_majordomo_executus.cpp +++ b/src/server/scripts/EasternKingdoms/MoltenCore/boss_majordomo_executus.cpp @@ -32,17 +32,14 @@ EndScriptData */ enum Texts { - SAY_AGGRO = -1409003, - SAY_SPAWN = -1409004, - SAY_SLAY = -1409005, - SAY_SPECIAL = -1409006, - SAY_DEFEAT = -1409007, + SAY_AGGRO = 0, + SAY_SPAWN = 1, + SAY_SLAY = 2, + SAY_SPECIAL = 3, + SAY_DEFEAT = 4, - SAY_SUMMON_MAJ = -1409008, - SAY_ARRIVAL1_RAG = -1409009, - SAY_ARRIVAL2_MAJ = -1409010, - SAY_ARRIVAL3_RAG = -1409011, - SAY_ARRIVAL5_RAG = -1409012, + SAY_SUMMON_MAJ = 5, + SAY_ARRIVAL2_MAJ = 6 }; enum Spells @@ -84,13 +81,13 @@ class boss_majordomo : public CreatureScript void KilledUnit(Unit* /*victim*/) { if (urand(0, 99) < 25) - DoScriptText(SAY_SLAY, me); + Talk(SAY_SLAY); } void EnterCombat(Unit* who) { BossAI::EnterCombat(who); - DoScriptText(SAY_AGGRO, me); + Talk(SAY_AGGRO); events.ScheduleEvent(EVENT_MAGIC_REFLECTION, 30000); events.ScheduleEvent(EVENT_DAMAGE_REFLECTION, 15000); events.ScheduleEvent(EVENT_BLAST_WAVE, 10000); @@ -111,7 +108,7 @@ class boss_majordomo : public CreatureScript instance->UpdateEncounterState(ENCOUNTER_CREDIT_KILL_CREATURE, me->GetEntry(), me); me->setFaction(35); me->AI()->EnterEvadeMode(); - DoScriptText(SAY_DEFEAT, me); + Talk(SAY_DEFEAT); _JustDied(); events.ScheduleEvent(EVENT_OUTRO_1, 32000); return; @@ -168,7 +165,7 @@ class boss_majordomo : public CreatureScript instance->instance->SummonCreature(NPC_RAGNAROS, RagnarosSummonPos); break; case EVENT_OUTRO_3: - DoScriptText(SAY_ARRIVAL2_MAJ, me); + Talk(SAY_ARRIVAL2_MAJ); break; default: break; @@ -182,7 +179,7 @@ class boss_majordomo : public CreatureScript if (action == ACTION_START_RAGNAROS) { me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); - DoScriptText(SAY_SUMMON_MAJ, me); + Talk(SAY_SUMMON_MAJ); events.ScheduleEvent(EVENT_OUTRO_2, 8000); events.ScheduleEvent(EVENT_OUTRO_3, 24000); } diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp index 0cb2bd7f7bc..4a29a7d929b 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp @@ -25,6 +25,7 @@ #include "PassiveAI.h" #include "Player.h" #include "SpellInfo.h" +#include "CreatureTextMgr.h" /*###### ##Quest 12848 @@ -32,7 +33,7 @@ #define GCD_CAST 1 -enum eDeathKnightSpells +enum UnworthyInitiate { SPELL_SOUL_PRISON_CHAIN_SELF = 54612, SPELL_SOUL_PRISON_CHAIN = 54613, @@ -41,25 +42,24 @@ enum eDeathKnightSpells SPELL_ICY_TOUCH = 52372, SPELL_PLAGUE_STRIKE = 52373, SPELL_BLOOD_STRIKE = 52374, - SPELL_DEATH_COIL = 52375 + SPELL_DEATH_COIL = 52375, + + SAY_EVENT_START = 0, + SAY_EVENT_ATTACK = 1, + + EVENT_ICY_TOUCH = 1, + EVENT_PLAGUE_STRIKE = 2, + EVENT_BLOOD_STRIKE = 3, + EVENT_DEATH_COIL = 4 }; -#define EVENT_ICY_TOUCH 1 -#define EVENT_PLAGUE_STRIKE 2 -#define EVENT_BLOOD_STRIKE 3 -#define EVENT_DEATH_COIL 4 - -//used by 29519, 29520, 29565, 29566, 29567 but signed for 29519 -int32 say_event_start[8] = +enum UnworthyInitiatePhase { - -1609000, -1609001, -1609002, -1609003, - -1609004, -1609005, -1609006, -1609007 -}; - -int32 say_event_attack[9] = -{ - -1609008, -1609009, -1609010, -1609011, -1609012, - -1609013, -1609014, -1609015, -1609016 + PHASE_CHAINED, + PHASE_TO_EQUIP, + PHASE_EQUIPING, + PHASE_TO_ATTACK, + PHASE_ATTACKING, }; uint32 acherus_soul_prison[12] = @@ -87,15 +87,6 @@ uint32 acherus_unworthy_initiate[5] = 29567 }; -enum UnworthyInitiatePhase -{ - PHASE_CHAINED, - PHASE_TO_EQUIP, - PHASE_EQUIPING, - PHASE_TO_ATTACK, - PHASE_ATTACKING, -}; - class npc_unworthy_initiate : public CreatureScript { public: @@ -155,7 +146,7 @@ public: me->CastSpell(me, SPELL_DK_INITIATE_VISUAL, true); if (Player* starter = Unit::GetPlayer(*me, playerGUID)) - DoScriptText(say_event_attack[rand()%9], me, starter); + sCreatureTextMgr->SendChat(me, SAY_EVENT_ATTACK, 0, CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_NORMAL, 0, TEAM_OTHER, false, starter); phase = PHASE_TO_ATTACK; } @@ -174,7 +165,7 @@ public: anchor->GetContactPoint(me, anchorX, anchorY, z, 1.0f); playerGUID = target->GetGUID(); - DoScriptText(say_event_start[rand()%8], me, target); + sCreatureTextMgr->SendChat(me, SAY_EVENT_START, 0, CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_NORMAL, 0, TEAM_OTHER, false, target); } void UpdateAI(const uint32 diff) @@ -341,15 +332,7 @@ public: enum eDuelEnums { - SAY_DUEL_A = -1609080, - SAY_DUEL_B = -1609081, - SAY_DUEL_C = -1609082, - SAY_DUEL_D = -1609083, - SAY_DUEL_E = -1609084, - SAY_DUEL_F = -1609085, - SAY_DUEL_G = -1609086, - SAY_DUEL_H = -1609087, - SAY_DUEL_I = -1609088, + SAY_DUEL = 0, SPELL_DUEL = 52996, //SPELL_DUEL_TRIGGERED = 52990, @@ -360,11 +343,6 @@ enum eDuelEnums FACTION_HOSTILE = 2068 }; -int32 m_auiRandomSay[] = -{ - SAY_DUEL_A, SAY_DUEL_B, SAY_DUEL_C, SAY_DUEL_D, SAY_DUEL_E, SAY_DUEL_F, SAY_DUEL_G, SAY_DUEL_H, SAY_DUEL_I -}; - class npc_death_knight_initiate : public CreatureScript { public: @@ -389,8 +367,7 @@ public: creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNK_15); - int32 uiSayId = rand()% (sizeof(m_auiRandomSay)/sizeof(int32)); - DoScriptText(m_auiRandomSay[uiSayId], creature, player); + sCreatureTextMgr->SendChat(creature, SAY_EVENT_ATTACK, 0, CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_NORMAL, 0, TEAM_OTHER, false, player); player->CastSpell(creature, SPELL_DUEL, false); player->CastSpell(player, SPELL_DUEL_FLAG, true); diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp index 1bfcb4adf6a..7ceb86dd980 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp @@ -20,6 +20,7 @@ #include "ScriptedEscortAI.h" #include "Player.h" #include "SpellInfo.h" +#include "CreatureTextMgr.h" //How to win friends and influence enemies // texts signed for creature 28939 but used for 28939, 28940, 28610 @@ -30,22 +31,14 @@ enum win_friends SAY_PERSUADED2 = 3, SAY_PERSUADED3 = 4, SAY_PERSUADED4 = 5, - SAY_PERSUADED6 = 6, + SAY_PERSUADED5 = 6, + SAY_PERSUADED6 = 7, + SAY_PERSUADE_RAND = 8, SPELL_PERSUASIVE_STRIKE = 52781, SPELL_THREAT_PULSE = 58111, QUEST_HOW_TO_WIN_FRIENDS = 12720, }; -#define SAY_PERSUADED5 "LIES! The pain you are about to endure will be talked about for years to come!" - -#define SAY_PERSUADE1 "I'll tear the secrets from your soul! Tell me about the \"Crimson Dawn\" and your life may be spared!" -#define SAY_PERSUADE2 "Tell me what you know about \"Crimson Dawn\" or the beatings will continue!" -#define SAY_PERSUADE3 "I'm through being courteous with your kind, human! What is the \"Crimson Dawn\"?" -#define SAY_PERSUADE4 "Is your life worth so little? Just tell me what I need to know about \"Crimson Dawn\" and I'll end your suffering quickly." -#define SAY_PERSUADE5 "I can keep this up for a very long time, Scarlet dog! Tell me about the \"Crimson Dawn\"!" -#define SAY_PERSUADE6 "What is the \"Crimson Dawn\"?" -#define SAY_PERSUADE7 "\"Crimson Dawn\"! What is it! Speak!" - class npc_crusade_persuaded : public CreatureScript { public: @@ -90,30 +83,7 @@ public: me->SetReactState(REACT_PASSIVE); DoCastAOE(SPELL_THREAT_PULSE, true); - switch (urand(1, 7)) - { - case 1: - player->Say(SAY_PERSUADE1, LANG_UNIVERSAL); - break; - case 2: - player->Say(SAY_PERSUADE2, LANG_UNIVERSAL); - break; - case 3: - player->Say(SAY_PERSUADE3, LANG_UNIVERSAL); - break; - case 4: - player->Say(SAY_PERSUADE4, LANG_UNIVERSAL); - break; - case 5: - player->Say(SAY_PERSUADE5, LANG_UNIVERSAL); - break; - case 6: - player->Say(SAY_PERSUADE6, LANG_UNIVERSAL); - break; - case 7: - player->Say(SAY_PERSUADE7, LANG_UNIVERSAL); - break; - } + sCreatureTextMgr->SendChat(me, SAY_PERSUADE_RAND, 0, CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_NORMAL, 0, TEAM_OTHER, false, player); Talk(SAY_CRUSADER); } } @@ -156,7 +126,7 @@ public: break; case 5: - player->Say(SAY_PERSUADED5, LANG_UNIVERSAL); + sCreatureTextMgr->SendChat(me, SAY_PERSUADED5, 0, CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_NORMAL, 0, TEAM_OTHER, false, player); speechTimer = 8000; break; diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp b/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp index 5d9df239870..1ec0eda171c 100644 --- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp +++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp @@ -34,7 +34,7 @@ EndScriptData */ enum eEnums { SAY_BOSS_DIE_AD = 0, - SAY_BOSS_DIE_AS = 0, + SAY_BOSS_DIE_AS = 3, SAY_ARCHMAGE = 0, NPC_ASH = 3850, diff --git a/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp b/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp index 467b532163b..5da38e21d2f 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp @@ -83,12 +83,10 @@ public: /*###### ## mob_freed_soul ######*/ - -//Possibly more of these quotes around. -#define SAY_ZAPPED0 -1329000 -#define SAY_ZAPPED1 -1329001 -#define SAY_ZAPPED2 -1329002 -#define SAY_ZAPPED3 -1329003 +enum FreedSoul +{ + SAY_ZAPPED = 0 +}; class mob_freed_soul : public CreatureScript { @@ -106,7 +104,7 @@ public: void Reset() { - DoScriptText(RAND(SAY_ZAPPED0, SAY_ZAPPED1, SAY_ZAPPED2, SAY_ZAPPED3), me); + Talk(SAY_ZAPPED); } void EnterCombat(Unit* /*who*/) {} diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp new file mode 100644 index 00000000000..c5639a68860 --- /dev/null +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp @@ -0,0 +1,293 @@ +/* + * Copyright (C) 2008-2012 TrinityCore + * Copyright (C) 2006-2009 ScriptDev2 + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +/* ScriptData +SDName: Boss_Arlokk +SD%Complete: 95 +SDComment: Wrong cleave and red aura is missing. +SDCategory: Zul'Gurub +EndScriptData */ + +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "zulgurub.h" + +enum eYells +{ + SAY_AGGRO = 0, + SAY_FEAST_PANTHER = 1, + SAY_DEATH = 2, +}; + +enum eSpells +{ + SPELL_SHADOWWORDPAIN = 23952, + SPELL_GOUGE = 24698, + SPELL_MARK = 24210, + SPELL_CLEAVE = 26350, //Perhaps not right. Not a red aura... + SPELL_PANTHER_TRANSFORM = 24190, + + MODEL_ID_NORMAL = 15218, + MODEL_ID_PANTHER = 15215, + MODEL_ID_BLANK = 11686, + + NPC_ZULIAN_PROWLER = 15101 +}; + +class boss_arlokk : public CreatureScript +{ + public: + + boss_arlokk() + : CreatureScript("boss_arlokk") + { + } + + struct boss_arlokkAI : public ScriptedAI + { + boss_arlokkAI(Creature* creature) : ScriptedAI(creature) + { + instance = creature->GetInstanceScript(); + } + + InstanceScript* instance; + + uint32 m_uiShadowWordPain_Timer; + uint32 m_uiGouge_Timer; + uint32 m_uiMark_Timer; + uint32 m_uiCleave_Timer; + uint32 m_uiVanish_Timer; + uint32 m_uiVisible_Timer; + + uint32 m_uiSummon_Timer; + uint32 m_uiSummonCount; + + Unit* m_pMarkedTarget; + uint64 MarkedTargetGUID; + + bool m_bIsPhaseTwo; + bool m_bIsVanished; + + void Reset() + { + m_uiShadowWordPain_Timer = 8000; + m_uiGouge_Timer = 14000; + m_uiMark_Timer = 35000; + m_uiCleave_Timer = 4000; + m_uiVanish_Timer = 60000; + m_uiVisible_Timer = 6000; + + m_uiSummon_Timer = 5000; + m_uiSummonCount = 0; + + m_bIsPhaseTwo = false; + m_bIsVanished = false; + + MarkedTargetGUID = 0; + + me->SetDisplayId(MODEL_ID_NORMAL); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + } + + void EnterCombat(Unit* /*who*/) + { + Talk(SAY_AGGRO); + } + + void JustReachedHome() + { + if (instance) + instance->SetData(DATA_ARLOKK, NOT_STARTED); + + //we should be summoned, so despawn + me->DespawnOrUnsummon(); + } + + void JustDied(Unit* /*killer*/) + { + Talk(SAY_DEATH); + + me->SetDisplayId(MODEL_ID_NORMAL); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + + if (instance) + instance->SetData(DATA_ARLOKK, DONE); + } + + void DoSummonPhanters() + { + if (MarkedTargetGUID) + Talk(SAY_FEAST_PANTHER, MarkedTargetGUID); + + me->SummonCreature(NPC_ZULIAN_PROWLER, -11532.7998f, -1649.6734f, 41.4800f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + me->SummonCreature(NPC_ZULIAN_PROWLER, -11532.9970f, -1606.4840f, 41.2979f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + } + + void JustSummoned(Creature* summoned) + { + if (Unit* pMarkedTarget = Unit::GetUnit(*me, MarkedTargetGUID)) + summoned->AI()->AttackStart(pMarkedTarget); + + ++m_uiSummonCount; + } + + void UpdateAI(const uint32 uiDiff) + { + if (!UpdateVictim()) + return; + + if (!m_bIsPhaseTwo) + { + if (m_uiShadowWordPain_Timer <= uiDiff) + { + DoCast(me->getVictim(), SPELL_SHADOWWORDPAIN); + m_uiShadowWordPain_Timer = 15000; + } + else + m_uiShadowWordPain_Timer -= uiDiff; + + if (m_uiMark_Timer <= uiDiff) + { + Unit* pMarkedTarget = SelectTarget(SELECT_TARGET_RANDOM, 0); + + if (pMarkedTarget) + { + DoCast(pMarkedTarget, SPELL_MARK); + MarkedTargetGUID = pMarkedTarget->GetGUID(); + } + else + sLog->outError(LOG_FILTER_TSCR, "boss_arlokk could not accuire pMarkedTarget."); + + m_uiMark_Timer = 15000; + } + else + m_uiMark_Timer -= uiDiff; + } + else + { + //Cleave_Timer + if (m_uiCleave_Timer <= uiDiff) + { + DoCast(me->getVictim(), SPELL_CLEAVE); + m_uiCleave_Timer = 16000; + } + else + m_uiCleave_Timer -= uiDiff; + + //Gouge_Timer + if (m_uiGouge_Timer <= uiDiff) + { + DoCast(me->getVictim(), SPELL_GOUGE); + + DoModifyThreatPercent(me->getVictim(), -80); + + m_uiGouge_Timer = 17000+rand()%10000; + } + else + m_uiGouge_Timer -= uiDiff; + } + + if (m_uiSummonCount <= 30) + { + if (m_uiSummon_Timer <= uiDiff) + { + DoSummonPhanters(); + m_uiSummon_Timer = 5000; + } + else + m_uiSummon_Timer -= uiDiff; + } + + if (m_uiVanish_Timer <= uiDiff) + { + //Invisble Model + me->SetDisplayId(MODEL_ID_BLANK); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + + me->AttackStop(); + DoResetThreat(); + + m_bIsVanished = true; + + m_uiVanish_Timer = 45000; + m_uiVisible_Timer = 6000; + } + else + m_uiVanish_Timer -= uiDiff; + + if (m_bIsVanished) + { + if (m_uiVisible_Timer <= uiDiff) + { + //The Panther Model + me->SetDisplayId(MODEL_ID_PANTHER); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + + 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); + + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) + AttackStart(target); + + m_bIsPhaseTwo = true; + m_bIsVanished = false; + } + else + m_uiVisible_Timer -= uiDiff; + } + else + DoMeleeAttackIfReady(); + } + }; + + CreatureAI* GetAI(Creature* creature) const + { + return new boss_arlokkAI(creature); + } +}; + +class go_gong_of_bethekk : public GameObjectScript +{ + public: + go_gong_of_bethekk() : GameObjectScript("go_gong_of_bethekk") + { + } + + bool OnGossipHello(Player* /*player*/, GameObject* go) + { + if (InstanceScript* instance = go->GetInstanceScript()) + { + if (instance->GetData(DATA_ARLOKK) == DONE || instance->GetData(DATA_ARLOKK) == IN_PROGRESS) + return true; + + instance->SetData(DATA_ARLOKK, IN_PROGRESS); + return true; + } + + return true; + } +}; + +void AddSC_boss_arlokk() +{ + new boss_arlokk(); + new go_gong_of_bethekk(); +} + diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp new file mode 100644 index 00000000000..7d80de88beb --- /dev/null +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp @@ -0,0 +1,262 @@ +/* + * Copyright (C) 2008-2012 TrinityCore + * Copyright (C) 2006-2009 ScriptDev2 + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +/* ScriptData +SDName: Boss_Hakkar +SD%Complete: 95 +SDComment: Blood siphon spell buggy cause of Core Issue. +SDCategory: Zul'Gurub +EndScriptData */ + +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "zulgurub.h" + +enum Hakkar +{ + SAY_AGGRO = 0, + SAY_FLEEING = 1, + SAY_MINION_DESTROY = 2, //where does it belong? + SAY_PROTECT_ALTAR = 3, //where does it belong? + + SPELL_BLOODSIPHON = 24322, + SPELL_CORRUPTEDBLOOD = 24328, + SPELL_CAUSEINSANITY = 24327, //Not working disabled. + SPELL_WILLOFHAKKAR = 24178, + SPELL_ENRAGE = 24318, + +// The Aspects of all High Priests + SPELL_ASPECT_OF_JEKLIK = 24687, + SPELL_ASPECT_OF_VENOXIS = 24688, + SPELL_ASPECT_OF_MARLI = 24686, + SPELL_ASPECT_OF_THEKAL = 24689, + SPELL_ASPECT_OF_ARLOKK = 24690 +}; + +class boss_hakkar : public CreatureScript +{ + public: + + boss_hakkar() + : CreatureScript("boss_hakkar") + { + } + + struct boss_hakkarAI : public ScriptedAI + { + boss_hakkarAI(Creature* creature) : ScriptedAI(creature) + { + instance = creature->GetInstanceScript(); + } + + InstanceScript* instance; + + uint32 BloodSiphon_Timer; + uint32 CorruptedBlood_Timer; + uint32 CauseInsanity_Timer; + uint32 WillOfHakkar_Timer; + uint32 Enrage_Timer; + + uint32 CheckJeklik_Timer; + uint32 CheckVenoxis_Timer; + uint32 CheckMarli_Timer; + uint32 CheckThekal_Timer; + uint32 CheckArlokk_Timer; + + uint32 AspectOfJeklik_Timer; + uint32 AspectOfVenoxis_Timer; + uint32 AspectOfMarli_Timer; + uint32 AspectOfThekal_Timer; + uint32 AspectOfArlokk_Timer; + + bool Enraged; + + void Reset() + { + BloodSiphon_Timer = 90000; + CorruptedBlood_Timer = 25000; + CauseInsanity_Timer = 17000; + WillOfHakkar_Timer = 17000; + Enrage_Timer = 600000; + + CheckJeklik_Timer = 1000; + CheckVenoxis_Timer = 2000; + CheckMarli_Timer = 3000; + CheckThekal_Timer = 4000; + CheckArlokk_Timer = 5000; + + AspectOfJeklik_Timer = 4000; + AspectOfVenoxis_Timer = 7000; + AspectOfMarli_Timer = 12000; + AspectOfThekal_Timer = 8000; + AspectOfArlokk_Timer = 18000; + + Enraged = false; + } + + void EnterCombat(Unit* /*who*/) + { + Talk(SAY_AGGRO); + } + + void UpdateAI(const uint32 diff) + { + if (!UpdateVictim()) + return; + + //BloodSiphon_Timer + if (BloodSiphon_Timer <= diff) + { + DoCast(me->getVictim(), SPELL_BLOODSIPHON); + BloodSiphon_Timer = 90000; + } else BloodSiphon_Timer -= diff; + + //CorruptedBlood_Timer + if (CorruptedBlood_Timer <= diff) + { + DoCast(me->getVictim(), SPELL_CORRUPTEDBLOOD); + CorruptedBlood_Timer = urand(30000, 45000); + } else CorruptedBlood_Timer -= diff; + + //CauseInsanity_Timer + /*if (CauseInsanity_Timer <= diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(target, SPELL_CAUSEINSANITY); + + CauseInsanity_Timer = urand(35000, 43000); + } else CauseInsanity_Timer -= diff;*/ + + //WillOfHakkar_Timer + if (WillOfHakkar_Timer <= diff) + { + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) + DoCast(target, SPELL_WILLOFHAKKAR); + + WillOfHakkar_Timer = urand(25000, 35000); + } else WillOfHakkar_Timer -= diff; + + if (!Enraged && Enrage_Timer <= diff) + { + DoCast(me, SPELL_ENRAGE); + Enraged = true; + } else Enrage_Timer -= diff; + + //Checking if Jeklik is dead. If not we cast her Aspect + if (CheckJeklik_Timer <= diff) + { + if (instance) + { + if (instance->GetData(DATA_JEKLIK) != DONE) + { + if (AspectOfJeklik_Timer <= diff) + { + DoCast(me->getVictim(), SPELL_ASPECT_OF_JEKLIK); + AspectOfJeklik_Timer = urand(10000, 14000); + } else AspectOfJeklik_Timer -= diff; + } + } + CheckJeklik_Timer = 1000; + } else CheckJeklik_Timer -= diff; + + //Checking if Venoxis is dead. If not we cast his Aspect + if (CheckVenoxis_Timer <= diff) + { + if (instance) + { + if (instance->GetData(DATA_VENOXIS) != DONE) + { + if (AspectOfVenoxis_Timer <= diff) + { + DoCast(me->getVictim(), SPELL_ASPECT_OF_VENOXIS); + AspectOfVenoxis_Timer = 8000; + } else AspectOfVenoxis_Timer -= diff; + } + } + CheckVenoxis_Timer = 1000; + } else CheckVenoxis_Timer -= diff; + + //Checking if Marli is dead. If not we cast her Aspect + if (CheckMarli_Timer <= diff) + { + if (instance) + { + if (instance->GetData(DATA_MARLI) != DONE) + { + if (AspectOfMarli_Timer <= diff) + { + DoCast(me->getVictim(), SPELL_ASPECT_OF_MARLI); + AspectOfMarli_Timer = 10000; + } else AspectOfMarli_Timer -= diff; + + } + } + CheckMarli_Timer = 1000; + } else CheckMarli_Timer -= diff; + + //Checking if Thekal is dead. If not we cast his Aspect + if (CheckThekal_Timer <= diff) + { + if (instance) + { + if (instance->GetData(DATA_THEKAL) != DONE) + { + if (AspectOfThekal_Timer <= diff) + { + DoCast(me, SPELL_ASPECT_OF_THEKAL); + AspectOfThekal_Timer = 15000; + } else AspectOfThekal_Timer -= diff; + } + } + CheckThekal_Timer = 1000; + } else CheckThekal_Timer -= diff; + + //Checking if Arlokk is dead. If yes we cast her Aspect + if (CheckArlokk_Timer <= diff) + { + if (instance) + { + if (instance->GetData(DATA_ARLOKK) != DONE) + { + if (AspectOfArlokk_Timer <= diff) + { + DoCast(me, SPELL_ASPECT_OF_ARLOKK); + DoResetThreat(); + + AspectOfArlokk_Timer = urand(10000, 15000); + } else AspectOfArlokk_Timer -= diff; + } + } + CheckArlokk_Timer = 1000; + } else CheckArlokk_Timer -= diff; + + DoMeleeAttackIfReady(); + } + }; + + CreatureAI* GetAI(Creature* creature) const + { + return new boss_hakkarAI(creature); + } +}; + +void AddSC_boss_hakkar() +{ + new boss_hakkar(); +} + diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp new file mode 100644 index 00000000000..3a2da6fdba9 --- /dev/null +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp @@ -0,0 +1,308 @@ +/* + * Copyright (C) 2008-2012 TrinityCore + * Copyright (C) 2006-2009 ScriptDev2 + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +/* ScriptData +SDName: Boss_Jeklik +SD%Complete: 85 +SDComment: Problem in finding the right flying batriders for spawning and making them fly. +SDCategory: Zul'Gurub +EndScriptData */ + +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "zulgurub.h" + +enum Jeklik +{ + SAY_AGGRO = 0, + SAY_RAIN_FIRE = 1, + SAY_DEATH = 2, + + SPELL_CHARGE = 22911, + SPELL_SONICBURST = 23918, + SPELL_SCREECH = 6605, + SPELL_SHADOW_WORD_PAIN = 23952, + SPELL_MIND_FLAY = 23953, + SPELL_CHAIN_MIND_FLAY = 26044, //Right ID unknown. So disabled + SPELL_GREATERHEAL = 23954, + SPELL_BAT_FORM = 23966, + + // Batriders Spell + SPELL_BOMB = 40332 //Wrong ID but Magmadars bomb is not working... +}; + +class boss_jeklik : public CreatureScript +{ + public: + + boss_jeklik() + : CreatureScript("boss_jeklik") + { + } + + struct boss_jeklikAI : public ScriptedAI + { + boss_jeklikAI(Creature* creature) : ScriptedAI(creature) + { + instance = creature->GetInstanceScript(); + } + + InstanceScript* instance; + + uint32 Charge_Timer; + uint32 SonicBurst_Timer; + uint32 Screech_Timer; + uint32 SpawnBats_Timer; + uint32 ShadowWordPain_Timer; + uint32 MindFlay_Timer; + uint32 ChainMindFlay_Timer; + uint32 GreaterHeal_Timer; + uint32 SpawnFlyingBats_Timer; + + bool PhaseTwo; + + void Reset() + { + Charge_Timer = 20000; + SonicBurst_Timer = 8000; + Screech_Timer = 13000; + SpawnBats_Timer = 60000; + ShadowWordPain_Timer = 6000; + MindFlay_Timer = 11000; + ChainMindFlay_Timer = 26000; + GreaterHeal_Timer = 50000; + SpawnFlyingBats_Timer = 10000; + + PhaseTwo = false; + } + + void EnterCombat(Unit* /*who*/) + { + Talk(SAY_AGGRO); + DoCast(me, SPELL_BAT_FORM); + } + + void JustDied(Unit* /*killer*/) + { + Talk(SAY_DEATH); + + if (instance) + instance->SetData(DATA_JEKLIK, DONE); + } + + void UpdateAI(const uint32 diff) + { + if (!UpdateVictim()) + return; + + if (me->getVictim() && me->isAlive()) + { + if (HealthAbovePct(50)) + { + if (Charge_Timer <= diff) + { + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) + { + DoCast(target, SPELL_CHARGE); + AttackStart(target); + } + + Charge_Timer = urand(15000, 30000); + } else Charge_Timer -= diff; + + if (SonicBurst_Timer <= diff) + { + DoCast(me->getVictim(), SPELL_SONICBURST); + SonicBurst_Timer = urand(8000, 13000); + } else SonicBurst_Timer -= diff; + + if (Screech_Timer <= diff) + { + DoCast(me->getVictim(), SPELL_SCREECH); + Screech_Timer = urand(18000, 26000); + } else Screech_Timer -= diff; + + if (SpawnBats_Timer <= diff) + { + Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0); + + Creature* Bat = NULL; + Bat = me->SummonCreature(11368, -12291.6220f, -1380.2640f, 144.8304f, 5.483f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + if (target && Bat) Bat ->AI()->AttackStart(target); + + Bat = me->SummonCreature(11368, -12289.6220f, -1380.2640f, 144.8304f, 5.483f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + if (target && Bat) Bat ->AI()->AttackStart(target); + + Bat = me->SummonCreature(11368, -12293.6220f, -1380.2640f, 144.8304f, 5.483f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + if (target && Bat) Bat ->AI()->AttackStart(target); + + Bat = me->SummonCreature(11368, -12291.6220f, -1380.2640f, 144.8304f, 5.483f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + if (target && Bat) Bat ->AI()->AttackStart(target); + + Bat = me->SummonCreature(11368, -12289.6220f, -1380.2640f, 144.8304f, 5.483f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + if (target && Bat) Bat ->AI()->AttackStart(target); + Bat = me->SummonCreature(11368, -12293.6220f, -1380.2640f, 144.8304f, 5.483f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + if (target && Bat) Bat ->AI()->AttackStart(target); + + SpawnBats_Timer = 60000; + } else SpawnBats_Timer -= diff; + } + else + { + if (PhaseTwo) + { + if (PhaseTwo && ShadowWordPain_Timer <= diff) + { + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) + { + DoCast(target, SPELL_SHADOW_WORD_PAIN); + ShadowWordPain_Timer = urand(12000, 18000); + } + }ShadowWordPain_Timer -=diff; + + if (MindFlay_Timer <= diff) + { + DoCast(me->getVictim(), SPELL_MIND_FLAY); + MindFlay_Timer = 16000; + }MindFlay_Timer -=diff; + + if (ChainMindFlay_Timer <= diff) + { + me->InterruptNonMeleeSpells(false); + DoCast(me->getVictim(), SPELL_CHAIN_MIND_FLAY); + ChainMindFlay_Timer = urand(15000, 30000); + }ChainMindFlay_Timer -=diff; + + if (GreaterHeal_Timer <= diff) + { + me->InterruptNonMeleeSpells(false); + DoCast(me, SPELL_GREATERHEAL); + GreaterHeal_Timer = urand(25000, 35000); + }GreaterHeal_Timer -=diff; + + if (SpawnFlyingBats_Timer <= diff) + { + Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0); + if (!target) + return; + + Creature* FlyingBat = me->SummonCreature(14965, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ()+15, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + if (FlyingBat) + FlyingBat->AI()->AttackStart(target); + + SpawnFlyingBats_Timer = urand(10000, 15000); + } else SpawnFlyingBats_Timer -=diff; + } + else + { + me->SetDisplayId(15219); + DoResetThreat(); + PhaseTwo = true; + } + } + + DoMeleeAttackIfReady(); + } + } + }; + + CreatureAI* GetAI(Creature* creature) const + { + return new boss_jeklikAI(creature); + } +}; + +//Flying Bat +class mob_batrider : public CreatureScript +{ + public: + + mob_batrider() + : CreatureScript("mob_batrider") + { + } + + struct mob_batriderAI : public ScriptedAI + { + mob_batriderAI(Creature* creature) : ScriptedAI(creature) + { + instance = creature->GetInstanceScript(); + } + + InstanceScript* instance; + + uint32 Bomb_Timer; + uint32 Check_Timer; + + void Reset() + { + Bomb_Timer = 2000; + Check_Timer = 1000; + + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + } + + void EnterCombat(Unit* /*who*/) {} + + void UpdateAI (const uint32 diff) + { + if (!UpdateVictim()) + return; + + //Bomb_Timer + if (Bomb_Timer <= diff) + { + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) + { + DoCast(target, SPELL_BOMB); + Bomb_Timer = 5000; + } + } else Bomb_Timer -= diff; + + //Check_Timer + if (Check_Timer <= diff) + { + if (instance) + { + if (instance->GetData(DATA_JEKLIK) == DONE) + { + me->setDeathState(JUST_DIED); + me->RemoveCorpse(); + return; + } + } + + Check_Timer = 1000; + } else Check_Timer -= diff; + + DoMeleeAttackIfReady(); + } + }; + + CreatureAI* GetAI(Creature* creature) const + { + return new mob_batriderAI(creature); + } +}; + +void AddSC_boss_jeklik() +{ + new boss_jeklik(); + new mob_batrider(); +} + diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp new file mode 100644 index 00000000000..844a2b16800 --- /dev/null +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp @@ -0,0 +1,286 @@ +/* + * Copyright (C) 2008-2012 TrinityCore + * Copyright (C) 2006-2009 ScriptDev2 + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +/* ScriptData +SDName: Boss_Jin'do the Hexxer +SD%Complete: 85 +SDComment: Mind Control not working because of core bug. Shades visible for all. +SDCategory: Zul'Gurub +EndScriptData */ + +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "zulgurub.h" + +enum Jindo +{ + SAY_AGGRO = 1, + + SPELL_BRAINWASHTOTEM = 24262, + SPELL_POWERFULLHEALINGWARD = 24309, //We will not use this spell. We will summon a totem by script cause the spell totems will not cast. + SPELL_HEX = 24053, + SPELL_DELUSIONSOFJINDO = 24306, + SPELL_SHADEOFJINDO = 24308, //We will not use this spell. We will summon a shade by script. + + //Healing Ward Spell + SPELL_HEAL = 38588, //Totems are not working right. Right heal spell ID is 24311 but this spell is not casting... + + //Shade of Jindo Spell + SPELL_SHADOWSHOCK = 19460, + SPELL_INVISIBLE = 24699 +}; + +class boss_jindo : public CreatureScript +{ + public: + + boss_jindo() + : CreatureScript("boss_jindo") + { + } + + struct boss_jindoAI : public ScriptedAI + { + boss_jindoAI(Creature* creature) : ScriptedAI(creature) {} + + uint32 BrainWashTotem_Timer; + uint32 HealingWard_Timer; + uint32 Hex_Timer; + uint32 Delusions_Timer; + uint32 Teleport_Timer; + + void Reset() + { + BrainWashTotem_Timer = 20000; + HealingWard_Timer = 16000; + Hex_Timer = 8000; + Delusions_Timer = 10000; + Teleport_Timer = 5000; + } + + void EnterCombat(Unit* /*who*/) + { + Talk(SAY_AGGRO); + } + + void UpdateAI(const uint32 diff) + { + if (!UpdateVictim()) + return; + + //BrainWashTotem_Timer + if (BrainWashTotem_Timer <= diff) + { + DoCast(me, SPELL_BRAINWASHTOTEM); + BrainWashTotem_Timer = urand(18000, 26000); + } else BrainWashTotem_Timer -= diff; + + //HealingWard_Timer + if (HealingWard_Timer <= diff) + { + //DoCast(me, SPELL_POWERFULLHEALINGWARD); + me->SummonCreature(14987, me->GetPositionX()+3, me->GetPositionY()-2, me->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 30000); + HealingWard_Timer = urand(14000, 20000); + } else HealingWard_Timer -= diff; + + //Hex_Timer + if (Hex_Timer <= diff) + { + DoCast(me->getVictim(), SPELL_HEX); + + if (DoGetThreat(me->getVictim())) + DoModifyThreatPercent(me->getVictim(), -80); + + Hex_Timer = urand(12000, 20000); + } else Hex_Timer -= diff; + + //Casting the delusion curse with a shade. So shade will attack the same target with the curse. + if (Delusions_Timer <= diff) + { + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) + { + DoCast(target, SPELL_DELUSIONSOFJINDO); + + Creature* Shade = me->SummonCreature(14986, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + if (Shade) + Shade->AI()->AttackStart(target); + } + + Delusions_Timer = urand(4000, 12000); + } else Delusions_Timer -= diff; + + //Teleporting a random gamer and spawning 9 skeletons that will attack this gamer + if (Teleport_Timer <= diff) + { + Unit* target = NULL; + target = SelectTarget(SELECT_TARGET_RANDOM, 0); + if (target && target->GetTypeId() == TYPEID_PLAYER) + { + DoTeleportPlayer(target, -11583.7783f, -1249.4278f, 77.5471f, 4.745f); + + if (DoGetThreat(me->getVictim())) + DoModifyThreatPercent(target, -100); + + Creature* Skeletons; + Skeletons = me->SummonCreature(14826, target->GetPositionX()+2, target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + if (Skeletons) + Skeletons->AI()->AttackStart(target); + Skeletons = me->SummonCreature(14826, target->GetPositionX()-2, target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + if (Skeletons) + Skeletons->AI()->AttackStart(target); + Skeletons = me->SummonCreature(14826, target->GetPositionX()+4, target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + if (Skeletons) + Skeletons->AI()->AttackStart(target); + Skeletons = me->SummonCreature(14826, target->GetPositionX()-4, target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + if (Skeletons) + Skeletons->AI()->AttackStart(target); + Skeletons = me->SummonCreature(14826, target->GetPositionX(), target->GetPositionY()+2, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + if (Skeletons) + Skeletons->AI()->AttackStart(target); + Skeletons = me->SummonCreature(14826, target->GetPositionX(), target->GetPositionY()-2, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + if (Skeletons) + Skeletons->AI()->AttackStart(target); + Skeletons = me->SummonCreature(14826, target->GetPositionX(), target->GetPositionY()+4, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + if (Skeletons) + Skeletons->AI()->AttackStart(target); + Skeletons = me->SummonCreature(14826, target->GetPositionX(), target->GetPositionY()-4, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + if (Skeletons) + Skeletons->AI()->AttackStart(target); + Skeletons = me->SummonCreature(14826, target->GetPositionX()+3, target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + if (Skeletons) + Skeletons->AI()->AttackStart(target); + } + + Teleport_Timer = urand(15000, 23000); + } else Teleport_Timer -= diff; + + DoMeleeAttackIfReady(); + } + }; + + CreatureAI* GetAI(Creature* creature) const + { + return new boss_jindoAI(creature); + } +}; + +//Healing Ward +class mob_healing_ward : public CreatureScript +{ + public: + + mob_healing_ward() + : CreatureScript("mob_healing_ward") + { + } + + struct mob_healing_wardAI : public ScriptedAI + { + mob_healing_wardAI(Creature* creature) : ScriptedAI(creature) + { + instance = creature->GetInstanceScript(); + } + + uint32 Heal_Timer; + + InstanceScript* instance; + + void Reset() + { + Heal_Timer = 2000; + } + + void EnterCombat(Unit* /*who*/) + { + } + + void UpdateAI (const uint32 diff) + { + //Heal_Timer + if (Heal_Timer <= diff) + { + if (instance) + { + Unit* pJindo = Unit::GetUnit(*me, instance->GetData64(DATA_JINDO)); + if (pJindo) + DoCast(pJindo, SPELL_HEAL); + } + Heal_Timer = 3000; + } else Heal_Timer -= diff; + + DoMeleeAttackIfReady(); + } + }; + + CreatureAI* GetAI(Creature* creature) const + { + return new mob_healing_wardAI(creature); + } +}; + +//Shade of Jindo +class mob_shade_of_jindo : public CreatureScript +{ + public: + + mob_shade_of_jindo() + : CreatureScript("mob_shade_of_jindo") + { + } + + struct mob_shade_of_jindoAI : public ScriptedAI + { + mob_shade_of_jindoAI(Creature* creature) : ScriptedAI(creature) {} + + uint32 ShadowShock_Timer; + + void Reset() + { + ShadowShock_Timer = 1000; + DoCast(me, SPELL_INVISIBLE, true); + } + + void EnterCombat(Unit* /*who*/){} + + void UpdateAI (const uint32 diff) + { + + //ShadowShock_Timer + if (ShadowShock_Timer <= diff) + { + DoCast(me->getVictim(), SPELL_SHADOWSHOCK); + ShadowShock_Timer = 2000; + } else ShadowShock_Timer -= diff; + + DoMeleeAttackIfReady(); + } + }; + + CreatureAI* GetAI(Creature* creature) const + { + return new mob_shade_of_jindoAI(creature); + } +}; + +void AddSC_boss_jindo() +{ + new boss_jindo(); + new mob_healing_ward(); + new mob_shade_of_jindo(); +} + diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp new file mode 100644 index 00000000000..17b268b92ef --- /dev/null +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp @@ -0,0 +1,278 @@ +/* + * Copyright (C) 2008-2012 TrinityCore + * Copyright (C) 2006-2009 ScriptDev2 + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +/* ScriptData +SDName: Boss_Marli +SD%Complete: 80 +SDComment: Charging healers and casters not working. Perhaps wrong Spell Timers. +SDCategory: Zul'Gurub +EndScriptData */ + +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "zulgurub.h" + +enum Marli +{ + SAY_AGGRO = 0, + SAY_TRANSFORM = 1, + SAY_SPIDER_SPAWN = 2, + SAY_DEATH = 3, + + SPELL_CHARGE = 22911, + SPELL_ASPECT_OF_MARLI = 24686, // A stun spell + SPELL_ENVOLWINGWEB = 24110, + SPELL_POISONVOLLEY = 24099, + SPELL_SPIDER_FORM = 24084, + +//The Spider Spells + SPELL_LEVELUP = 24312 //Not right Spell. +}; + +class boss_marli : public CreatureScript +{ + public: + + boss_marli() + : CreatureScript("boss_marli") + { + } + + struct boss_marliAI : public ScriptedAI + { + boss_marliAI(Creature* creature) : ScriptedAI(creature) + { + instance = creature->GetInstanceScript(); + } + + InstanceScript* instance; + + uint32 SpawnStartSpiders_Timer; + uint32 PoisonVolley_Timer; + uint32 SpawnSpider_Timer; + uint32 Charge_Timer; + uint32 Aspect_Timer; + uint32 Transform_Timer; + uint32 TransformBack_Timer; + + bool Spawned; + bool PhaseTwo; + + void Reset() + { + SpawnStartSpiders_Timer = 1000; + PoisonVolley_Timer = 15000; + SpawnSpider_Timer = 30000; + Charge_Timer = 1500; + Aspect_Timer = 12000; + Transform_Timer = 45000; + TransformBack_Timer = 25000; + + Spawned = false; + PhaseTwo = false; + } + + void EnterCombat(Unit* /*who*/) + { + Talk(SAY_AGGRO); + } + + void JustDied(Unit* /*killer*/) + { + Talk(SAY_DEATH); + if (instance) + instance->SetData(DATA_MARLI, DONE); + } + + void UpdateAI(const uint32 diff) + { + if (!UpdateVictim()) + return; + + if (me->getVictim() && me->isAlive()) + { + if (PoisonVolley_Timer <= diff) + { + DoCast(me->getVictim(), SPELL_POISONVOLLEY); + PoisonVolley_Timer = urand(10000, 20000); + } else PoisonVolley_Timer -= diff; + + if (!PhaseTwo && Aspect_Timer <= diff) + { + DoCast(me->getVictim(), SPELL_ASPECT_OF_MARLI); + Aspect_Timer = urand(13000, 18000); + } else Aspect_Timer -= diff; + + if (!Spawned && SpawnStartSpiders_Timer <= diff) + { + Talk(SAY_SPIDER_SPAWN); + + Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0); + if (!target) + return; + + Creature* Spider = NULL; + + Spider = me->SummonCreature(15041, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + if (Spider) + Spider->AI()->AttackStart(target); + Spider = me->SummonCreature(15041, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + if (Spider) + Spider->AI()->AttackStart(target); + Spider = me->SummonCreature(15041, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + if (Spider) + Spider->AI()->AttackStart(target); + Spider = me->SummonCreature(15041, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + if (Spider) + Spider->AI()->AttackStart(target); + + Spawned = true; + } else SpawnStartSpiders_Timer -= diff; + + if (SpawnSpider_Timer <= diff) + { + Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0); + if (!target) + return; + + Creature* Spider = me->SummonCreature(15041, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + if (Spider) + Spider->AI()->AttackStart(target); + SpawnSpider_Timer = urand(12000, 17000); + } else SpawnSpider_Timer -= diff; + + if (!PhaseTwo && Transform_Timer <= diff) + { + Talk(SAY_TRANSFORM); + DoCast(me, SPELL_SPIDER_FORM); + 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); + DoCast(me->getVictim(), SPELL_ENVOLWINGWEB); + + if (DoGetThreat(me->getVictim())) + DoModifyThreatPercent(me->getVictim(), -100); + + PhaseTwo = true; + Transform_Timer = urand(35000, 60000); + } else Transform_Timer -= diff; + + if (PhaseTwo) + { + if (Charge_Timer <= diff) + { + Unit* target = NULL; + int i = 0; + while (i < 3) // max 3 tries to get a random target with power_mana + { + ++i; + target = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true); // not aggro leader + if (target && target->getPowerType() == POWER_MANA) + i = 3; + } + if (target) + { + DoCast(target, SPELL_CHARGE); + //me->SetPosition(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0); + //me->SendMonsterMove(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, true, 1); + AttackStart(target); + } + + Charge_Timer = 8000; + } else Charge_Timer -= diff; + + if (TransformBack_Timer <= diff) + { + me->SetDisplayId(15220); + const CreatureTemplate* 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); + + PhaseTwo = false; + TransformBack_Timer = urand(25000, 40000); + } else TransformBack_Timer -= diff; + + } + + DoMeleeAttackIfReady(); + } + } + }; + + CreatureAI* GetAI(Creature* creature) const + { + return new boss_marliAI(creature); + } +}; + +//Spawn of Marli +class mob_spawn_of_marli : public CreatureScript +{ + public: + + mob_spawn_of_marli() + : CreatureScript("mob_spawn_of_marli") + { + } + + struct mob_spawn_of_marliAI : public ScriptedAI + { + mob_spawn_of_marliAI(Creature* creature) : ScriptedAI(creature) {} + + uint32 LevelUp_Timer; + + void Reset() + { + LevelUp_Timer = 3000; + } + + void EnterCombat(Unit* /*who*/) + { + } + + void UpdateAI (const uint32 diff) + { + //Return since we have no target + if (!UpdateVictim()) + return; + + //LevelUp_Timer + if (LevelUp_Timer <= diff) + { + DoCast(me, SPELL_LEVELUP); + LevelUp_Timer = 3000; + } else LevelUp_Timer -= diff; + + DoMeleeAttackIfReady(); + } + }; + + CreatureAI* GetAI(Creature* creature) const + { + return new mob_spawn_of_marliAI(creature); + } +}; + +void AddSC_boss_marli() +{ + new boss_marli(); + new mob_spawn_of_marli(); +} + diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp new file mode 100644 index 00000000000..3ea5d932ab0 --- /dev/null +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp @@ -0,0 +1,588 @@ +/* + * Copyright (C) 2008-2012 TrinityCore + * Copyright (C) 2006-2009 ScriptDev2 + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +/* ScriptData +SDName: Boss_Thekal +SD%Complete: 95 +SDComment: Almost finished. +SDCategory: Zul'Gurub +EndScriptData */ + +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "zulgurub.h" + +enum Thekal +{ + SAY_AGGRO = 0, + SAY_DEATH = 1, + + SPELL_MORTALCLEAVE = 22859, + SPELL_SILENCE = 22666, + SPELL_FRENZY = 8269, + SPELL_FORCEPUNCH = 24189, + SPELL_CHARGE = 24193, + SPELL_ENRAGE = 8269, + SPELL_SUMMONTIGERS = 24183, + SPELL_TIGER_FORM = 24169, + SPELL_RESURRECT = 24173, //We will not use this spell. + +//Zealot Lor'Khan Spells + SPELL_SHIELD = 20545, + SPELL_BLOODLUST = 24185, + SPELL_GREATERHEAL = 24208, + SPELL_DISARM = 6713, + +//Zealot Zath Spells + SPELL_SWEEPINGSTRIKES = 18765, + SPELL_SINISTERSTRIKE = 15581, + SPELL_GOUGE = 12540, + SPELL_KICK = 15614, + SPELL_BLIND = 21060 +}; + +class boss_thekal : public CreatureScript +{ + public: + + boss_thekal() + : CreatureScript("boss_thekal") + { + } + + struct boss_thekalAI : public ScriptedAI + { + boss_thekalAI(Creature* creature) : ScriptedAI(creature) + { + instance = creature->GetInstanceScript(); + } + + uint32 MortalCleave_Timer; + uint32 Silence_Timer; + uint32 Frenzy_Timer; + uint32 ForcePunch_Timer; + uint32 Charge_Timer; + uint32 Enrage_Timer; + uint32 SummonTigers_Timer; + uint32 Check_Timer; + uint32 Resurrect_Timer; + + InstanceScript* instance; + bool Enraged; + bool PhaseTwo; + bool WasDead; + + void Reset() + { + MortalCleave_Timer = 4000; + Silence_Timer = 9000; + Frenzy_Timer = 30000; + ForcePunch_Timer = 4000; + Charge_Timer = 12000; + Enrage_Timer = 32000; + SummonTigers_Timer = 25000; + Check_Timer = 10000; + Resurrect_Timer = 10000; + + Enraged = false; + PhaseTwo = false; + WasDead = false; + } + + void EnterCombat(Unit* /*who*/) + { + Talk(SAY_AGGRO); + } + + void JustDied(Unit* /*killer*/) + { + Talk(SAY_DEATH); + if (instance) + instance->SetData(DATA_THEKAL, DONE); + } + + void JustReachedHome() + { + if (instance) + instance->SetData(DATA_THEKAL, NOT_STARTED); + } + + void UpdateAI(const uint32 diff) + { + if (!UpdateVictim()) + return; + + //Check_Timer for the death of LorKhan and Zath. + if (!WasDead && Check_Timer <= diff) + { + if (instance) + { + if (instance->GetData(DATA_LORKHAN) == SPECIAL) + { + //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); + } + } + + if (instance->GetData(DATA_ZATH) == SPECIAL) + { + //Resurrect Zath + Unit* pZath = Unit::GetUnit(*me, instance->GetData64(DATA_ZATH)); + if (pZath) + { + pZath->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); + pZath->setFaction(14); + pZath->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + pZath->SetFullHealth(); + + instance->SetData(DATA_ZATH, DONE); + } + } + } + + Check_Timer = 5000; + } else Check_Timer -= diff; + + if (!PhaseTwo && MortalCleave_Timer <= diff) + { + DoCast(me->getVictim(), SPELL_MORTALCLEAVE); + MortalCleave_Timer = urand(15000, 20000); + } else MortalCleave_Timer -= diff; + + if (!PhaseTwo && Silence_Timer <= diff) + { + DoCast(me->getVictim(), SPELL_SILENCE); + Silence_Timer = urand(20000, 25000); + } else Silence_Timer -= diff; + + if (!PhaseTwo && !WasDead && !HealthAbovePct(5)) + { + me->RemoveAurasByType(SPELL_AURA_PERIODIC_DAMAGE_PERCENT); + me->RemoveAurasByType(SPELL_AURA_PERIODIC_DAMAGE); + me->RemoveAurasByType(SPELL_AURA_PERIODIC_LEECH); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + me->SetStandState(UNIT_STAND_STATE_SLEEP); + me->AttackStop(); + + if (instance) + instance->SetData(DATA_THEKAL, SPECIAL); + + WasDead=true; + } + + //Thekal will transform to Tiger if he died and was not resurrected after 10 seconds. + if (!PhaseTwo && WasDead) + { + if (Resurrect_Timer <= diff) + { + DoCast(me, SPELL_TIGER_FORM); + 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); + DoResetThreat(); + PhaseTwo = true; + } else Resurrect_Timer -= diff; + } + + if (me->IsFullHealth() && WasDead) + { + WasDead = false; + } + + if (PhaseTwo) + { + if (Charge_Timer <= diff) + { + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) + { + DoCast(target, SPELL_CHARGE); + DoResetThreat(); + AttackStart(target); + } + + Charge_Timer = urand(15000, 22000); + } else Charge_Timer -= diff; + + if (Frenzy_Timer <= diff) + { + DoCast(me, SPELL_FRENZY); + Frenzy_Timer = 30000; + } else Frenzy_Timer -= diff; + + if (ForcePunch_Timer <= diff) + { + DoCast(me->getVictim(), SPELL_SILENCE); + ForcePunch_Timer = urand(16000, 21000); + } else ForcePunch_Timer -= diff; + + if (SummonTigers_Timer <= diff) + { + DoCast(me->getVictim(), SPELL_SUMMONTIGERS); + SummonTigers_Timer = urand(10000, 14000); + } else SummonTigers_Timer -= diff; + + if (HealthBelowPct(11) && !Enraged) + { + DoCast(me, SPELL_ENRAGE); + Enraged = true; + } + } + + DoMeleeAttackIfReady(); + + } + }; + + CreatureAI* GetAI(Creature* creature) const + { + return new boss_thekalAI(creature); + } +}; + +//Zealot Lor'Khan +class mob_zealot_lorkhan : public CreatureScript +{ + public: + + mob_zealot_lorkhan() + : CreatureScript("mob_zealot_lorkhan") + { + } + + struct mob_zealot_lorkhanAI : public ScriptedAI + { + mob_zealot_lorkhanAI(Creature* creature) : ScriptedAI(creature) + { + instance = creature->GetInstanceScript(); + } + + uint32 Shield_Timer; + uint32 BloodLust_Timer; + uint32 GreaterHeal_Timer; + uint32 Disarm_Timer; + uint32 Check_Timer; + + bool FakeDeath; + + InstanceScript* instance; + + void Reset() + { + Shield_Timer = 1000; + BloodLust_Timer = 16000; + GreaterHeal_Timer = 32000; + Disarm_Timer = 6000; + Check_Timer = 10000; + + FakeDeath = false; + + if (instance) + instance->SetData(DATA_LORKHAN, NOT_STARTED); + + me->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + } + + void EnterCombat(Unit* /*who*/) + { + } + + void UpdateAI (const uint32 diff) + { + if (!UpdateVictim()) + return; + + //Shield_Timer + if (Shield_Timer <= diff) + { + DoCast(me, SPELL_SHIELD); + Shield_Timer = 61000; + } else Shield_Timer -= diff; + + //BloodLust_Timer + if (BloodLust_Timer <= diff) + { + DoCast(me, SPELL_BLOODLUST); + BloodLust_Timer = 20000+rand()%8000; + } else BloodLust_Timer -= diff; + + //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)); + + 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; + } + } + + GreaterHeal_Timer = 15000+rand()%5000; + } else GreaterHeal_Timer -= diff; + + //Disarm_Timer + if (Disarm_Timer <= diff) + { + DoCast(me->getVictim(), SPELL_DISARM); + Disarm_Timer = 15000+rand()%10000; + } else Disarm_Timer -= diff; + + //Check_Timer for the death of LorKhan and Zath. + if (!FakeDeath && Check_Timer <= diff) + { + if (instance) + { + if (instance->GetData(DATA_THEKAL) == SPECIAL) + { + //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(); + } + } + + if (instance->GetData(DATA_ZATH) == SPECIAL) + { + //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(); + } + } + } + + Check_Timer = 5000; + } else Check_Timer -= diff; + + if (!HealthAbovePct(5)) + { + me->RemoveAurasByType(SPELL_AURA_PERIODIC_DAMAGE_PERCENT); + me->RemoveAurasByType(SPELL_AURA_PERIODIC_DAMAGE); + me->RemoveAurasByType(SPELL_AURA_PERIODIC_LEECH); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + me->SetStandState(UNIT_STAND_STATE_SLEEP); + me->setFaction(35); + me->AttackStop(); + + if (instance) + instance->SetData(DATA_LORKHAN, SPECIAL); + + FakeDeath = true; + } + + DoMeleeAttackIfReady(); + } + }; + + CreatureAI* GetAI(Creature* creature) const + { + return new mob_zealot_lorkhanAI(creature); + } +}; + +//Zealot Zath +class mob_zealot_zath : public CreatureScript +{ + public: + + mob_zealot_zath() + : CreatureScript("mob_zealot_zath") + { + } + + struct mob_zealot_zathAI : public ScriptedAI + { + mob_zealot_zathAI(Creature* creature) : ScriptedAI(creature) + { + instance = creature->GetInstanceScript(); + } + + uint32 SweepingStrikes_Timer; + uint32 SinisterStrike_Timer; + uint32 Gouge_Timer; + uint32 Kick_Timer; + uint32 Blind_Timer; + uint32 Check_Timer; + + bool FakeDeath; + + InstanceScript* instance; + + void Reset() + { + SweepingStrikes_Timer = 13000; + SinisterStrike_Timer = 8000; + Gouge_Timer = 25000; + Kick_Timer = 18000; + Blind_Timer = 5000; + Check_Timer = 10000; + + FakeDeath = false; + + if (instance) + instance->SetData(DATA_ZATH, NOT_STARTED); + + me->SetStandState(UNIT_STAND_STATE_STAND); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + } + + void EnterCombat(Unit* /*who*/) + { + } + + void UpdateAI (const uint32 diff) + { + if (!UpdateVictim()) + return; + + //SweepingStrikes_Timer + if (SweepingStrikes_Timer <= diff) + { + DoCast(me->getVictim(), SPELL_SWEEPINGSTRIKES); + SweepingStrikes_Timer = 22000+rand()%4000; + } else SweepingStrikes_Timer -= diff; + + //SinisterStrike_Timer + if (SinisterStrike_Timer <= diff) + { + DoCast(me->getVictim(), SPELL_SINISTERSTRIKE); + SinisterStrike_Timer = 8000+rand()%8000; + } else SinisterStrike_Timer -= diff; + + //Gouge_Timer + if (Gouge_Timer <= diff) + { + DoCast(me->getVictim(), SPELL_GOUGE); + + if (DoGetThreat(me->getVictim())) + DoModifyThreatPercent(me->getVictim(), -100); + + Gouge_Timer = 17000+rand()%10000; + } else Gouge_Timer -= diff; + + //Kick_Timer + if (Kick_Timer <= diff) + { + DoCast(me->getVictim(), SPELL_KICK); + Kick_Timer = 15000+rand()%10000; + } else Kick_Timer -= diff; + + //Blind_Timer + if (Blind_Timer <= diff) + { + DoCast(me->getVictim(), SPELL_BLIND); + Blind_Timer = 10000+rand()%10000; + } else Blind_Timer -= diff; + + //Check_Timer for the death of LorKhan and Zath. + if (!FakeDeath && Check_Timer <= diff) + { + if (instance) + { + if (instance->GetData(DATA_LORKHAN) == SPECIAL) + { + //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(); + } + } + + if (instance->GetData(DATA_THEKAL) == SPECIAL) + { + //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(); + } + } + } + + Check_Timer = 5000; + } else Check_Timer -= diff; + + if (!HealthAbovePct(5)) + { + me->RemoveAurasByType(SPELL_AURA_PERIODIC_DAMAGE_PERCENT); + me->RemoveAurasByType(SPELL_AURA_PERIODIC_DAMAGE); + me->RemoveAurasByType(SPELL_AURA_PERIODIC_LEECH); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + me->SetStandState(UNIT_STAND_STATE_SLEEP); + me->setFaction(35); + me->AttackStop(); + + if (instance) + instance->SetData(DATA_ZATH, SPECIAL); + + FakeDeath = true; + } + + DoMeleeAttackIfReady(); + } + }; + + CreatureAI* GetAI(Creature* creature) const + { + return new mob_zealot_zathAI(creature); + } +}; + +void AddSC_boss_thekal() +{ + new boss_thekal(); + new mob_zealot_lorkhan(); + new mob_zealot_zath(); +} + diff --git a/src/server/scripts/EasternKingdoms/eversong_woods.cpp b/src/server/scripts/EasternKingdoms/eversong_woods.cpp index f62273e583d..c5f9522b23d 100644 --- a/src/server/scripts/EasternKingdoms/eversong_woods.cpp +++ b/src/server/scripts/EasternKingdoms/eversong_woods.cpp @@ -517,9 +517,12 @@ public: ## npc_infused_crystal ######*/ -#define MOB_ENRAGED_WRAITH 17086 -#define EMOTE -1000283 -#define QUEST_POWERING_OUR_DEFENSES 8490 +enum InfusedCrystal +{ + MOB_ENRAGED_WRAITH = 17086, + EMOTE = 0, + QUEST_POWERING_OUR_DEFENSES = 8490 +}; struct Location { @@ -597,7 +600,7 @@ public: { if (EndTimer < diff && Progress) { - DoScriptText(EMOTE, me); + Talk(EMOTE); Completed = true; if (PlayerGUID) if (Player* player = Unit::GetPlayer(*me, PlayerGUID)) diff --git a/src/server/scripts/EasternKingdoms/isle_of_queldanas.cpp b/src/server/scripts/EasternKingdoms/isle_of_queldanas.cpp index c3a725f2f45..5625b6994d7 100644 --- a/src/server/scripts/EasternKingdoms/isle_of_queldanas.cpp +++ b/src/server/scripts/EasternKingdoms/isle_of_queldanas.cpp @@ -37,11 +37,13 @@ EndContentData */ /*###### ## npc_converted_sentry ######*/ +enum ConvertedSentry +{ + SAY_CONVERTED = 0, -#define SAY_CONVERTED_1 -1000188 -#define SAY_CONVERTED_2 -1000189 + SPELL_CONVERT_CREDIT = 45009 +}; -#define SPELL_CONVERT_CREDIT 45009 class npc_converted_sentry : public CreatureScript { @@ -75,11 +77,7 @@ public: { if (Timer <= diff) { - uint32 i = urand(1, 2); - if (i == 1) - DoScriptText(SAY_CONVERTED_1, me); - else - DoScriptText(SAY_CONVERTED_2, me); + Talk(SAY_CONVERTED); DoCast(me, SPELL_CONVERT_CREDIT); if (me->isPet()) diff --git a/src/server/scripts/EasternKingdoms/silverpine_forest.cpp b/src/server/scripts/EasternKingdoms/silverpine_forest.cpp index 3a6fac58945..8c202962c70 100644 --- a/src/server/scripts/EasternKingdoms/silverpine_forest.cpp +++ b/src/server/scripts/EasternKingdoms/silverpine_forest.cpp @@ -38,20 +38,19 @@ EndContentData */ enum eErland { - SAY_QUESTACCEPT = -1000306, - SAY_START = -1000307, - SAY_AGGRO_1 = -1000308, - SAY_AGGRO_2 = -1000309, - SAY_LAST = -1000310, + SAY_QUESTACCEPT = 0, + SAY_START = 1, + SAY_AGGRO = 2, + SAY_PROGRESS = 3, + SAY_LAST = 4, - SAY_THANKS = -1000311, - SAY_RANE = -1000312, - SAY_ANSWER = -1000313, - SAY_MOVE_QUINN = -1000314, + SAY_RANE = 0, + SAY_RANE_ANSWER = 5, + SAY_MOVE_QUINN = 6, - SAY_GREETINGS = -1000315, - SAY_QUINN = -1000316, - SAY_ON_BYE = -1000317, + SAY_QUINN = 7, + SAY_QUINN_ANSWER = 0, + SAY_BYE = 8, QUEST_ESCORTING = 435, NPC_RANE = 1950, @@ -76,34 +75,34 @@ public: switch (waypointId) { case 1: - DoScriptText(SAY_START, me, player); + Talk(SAY_START, player->GetGUID()); + break; + case 10: + Talk(SAY_PROGRESS); break; case 13: - DoScriptText(SAY_LAST, me, player); + Talk(SAY_LAST, player->GetGUID()); player->GroupEventHappens(QUEST_ESCORTING, me); break; - case 14: - DoScriptText(SAY_THANKS, me, player); - break; case 15: - if (Unit* Rane = me->FindNearestCreature(NPC_RANE, 20)) - DoScriptText(SAY_RANE, Rane); + if (Creature* rane = me->FindNearestCreature(NPC_RANE, 20.0f)) + rane->AI()->Talk(SAY_RANE); break; case 16: - DoScriptText(SAY_ANSWER, me); + Talk(SAY_RANE_ANSWER); break; case 17: - DoScriptText(SAY_MOVE_QUINN, me); + Talk(SAY_MOVE_QUINN); break; case 24: - DoScriptText(SAY_GREETINGS, me); + Talk(SAY_QUINN); break; case 25: - if (Unit* Quinn = me->FindNearestCreature(NPC_QUINN, 20)) - DoScriptText(SAY_QUINN, Quinn); + if (Creature* quinn = me->FindNearestCreature(NPC_QUINN, 20.0f)) + quinn->AI()->Talk(SAY_QUINN_ANSWER); break; case 26: - DoScriptText(SAY_ON_BYE, me, NULL); + Talk(SAY_BYE); break; } } @@ -112,7 +111,7 @@ public: void EnterCombat(Unit* who) { - DoScriptText(RAND(SAY_AGGRO_1, SAY_AGGRO_2), me, who); + Talk(SAY_AGGRO, who->GetGUID()); } }; @@ -120,7 +119,7 @@ public: { if (quest->GetQuestId() == QUEST_ESCORTING) { - DoScriptText(SAY_QUESTACCEPT, creature, player); + creature->AI()->Talk(SAY_QUESTACCEPT, player->GetGUID()); if (npc_escortAI* pEscortAI = CAST_AI(npc_deathstalker_erland::npc_deathstalker_erlandAI, creature->AI())) pEscortAI->Start(true, false, player->GetGUID()); diff --git a/src/server/scripts/EasternKingdoms/tirisfal_glades.cpp b/src/server/scripts/EasternKingdoms/tirisfal_glades.cpp index 6a8845ee8b4..949ea963c02 100644 --- a/src/server/scripts/EasternKingdoms/tirisfal_glades.cpp +++ b/src/server/scripts/EasternKingdoms/tirisfal_glades.cpp @@ -16,21 +16,6 @@ * with this program. If not, see . */ -/* ScriptData -SDName: Tirisfal_Glades -SD%Complete: 0 -SDComment: -SDCategory: Tirisfal Glades -EndScriptData */ - -/* ContentData -EndContentData */ - -#include "ScriptMgr.h" -#include "ScriptedCreature.h" -#include "Player.h" - - void AddSC_tirisfal_glades() { } diff --git a/src/server/scripts/EasternKingdoms/western_plaguelands.cpp b/src/server/scripts/EasternKingdoms/western_plaguelands.cpp index 1c2f2624b34..79b49b6a438 100644 --- a/src/server/scripts/EasternKingdoms/western_plaguelands.cpp +++ b/src/server/scripts/EasternKingdoms/western_plaguelands.cpp @@ -281,13 +281,13 @@ enum eTruuen QUEST_TOMB_LIGHTBRINGER = 9446, - SAY_WP_0 = -1800064, //Beware! We are attacked! - SAY_WP_1 = -1800065, //It must be the purity of the Mark of the Lightbringer that is drawing forth the Scourge to attack us. We must proceed with caution lest we be overwhelmed! - SAY_WP_2 = -1800066, //This land truly needs to be cleansed by the Light! Let us continue on to the tomb. It isn't far now... - SAY_WP_3 = -1800067, //Be welcome, friends! - SAY_WP_4 = -1800068, //Thank you for coming here in remembrance of me. Your efforts in recovering that symbol, while unnecessary, are certainly touching to an old man's heart. - SAY_WP_5 = -1800069, //Please, rise my friend. Keep the Blessing as a symbol of the strength of the Light and how heroes long gone might once again rise in each of us to inspire. - SAY_WP_6 = -1800070 //Thank you my friend for making this possible. This is a day that I shall never forget! I think I will stay a while. Please return to High Priestess MacDonnell at the camp. I know that she'll be keenly interested to know of what has transpired here. + SAY_WP_0 = 0, //Beware! We are attacked! + SAY_WP_1 = 1, //It must be the purity of the Mark of the Lightbringer that is drawing forth the Scourge to attack us. We must proceed with caution lest we be overwhelmed! + SAY_WP_2 = 2, //This land truly needs to be cleansed by the Light! Let us continue on to the tomb. It isn't far now... + SAY_WP_3 = 0, //Be welcome, friends! + SAY_WP_4 = 0, //Thank you for coming here in remembrance of me. Your efforts in recovering that symbol, while unnecessary, are certainly touching to an old man's heart. + SAY_WP_5 = 1, //Please, rise my friend. Keep the Blessing as a symbol of the strength of the Light and how heroes long gone might once again rise in each of us to inspire. + SAY_WP_6 = 2 //Thank you my friend for making this possible. This is a day that I shall never forget! I think I will stay a while. Please return to High Priestess MacDonnell at the camp. I know that she'll be keenly interested to know of what has transpired here. }; class npc_anchorite_truuen : public CreatureScript @@ -339,12 +339,12 @@ public: switch (waypointId) { case 8: - DoScriptText(SAY_WP_0, me); + Talk(SAY_WP_0); me->SummonCreature(NPC_GHOUL, me->GetPositionX()+7.0f, me->GetPositionY()+7.0f, me->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 90000); me->SummonCreature(NPC_GHOUL, me->GetPositionX()+5.0f, me->GetPositionY()+5.0f, me->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 90000); break; case 9: - DoScriptText(SAY_WP_1, me); + Talk(SAY_WP_1); break; case 14: me->SummonCreature(NPC_GHOUL, me->GetPositionX()+7.0f, me->GetPositionY()+7.0f, me->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 90000); @@ -353,25 +353,31 @@ public: me->SummonCreature(NPC_GHOUL, me->GetPositionX()+8.0f, me->GetPositionY()+8.0f, me->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 90000); break; case 15: - DoScriptText(SAY_WP_2, me); + Talk(SAY_WP_2); case 21: Theldanis = GetClosestCreatureWithEntry(me, NPC_THEL_DANIS, 150); - DoScriptText(SAY_WP_3, Theldanis); + if (Theldanis) + Theldanis->AI()->Talk(SAY_WP_3); break; case 22: break; case 23: Ughost = me->SummonCreature(NPC_GHOST_UTHER, 971.86f, -1825.42f, 81.99f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); - Ughost->SetDisableGravity(true); - DoScriptText(SAY_WP_4, Ughost, me); + if (Ughost) + { + Ughost->SetDisableGravity(true); + Ughost->AI()->Talk(SAY_WP_4, me->GetGUID()); + } m_uiChatTimer = 4000; break; case 24: - DoScriptText(SAY_WP_5, Ughost, me); + if (Ughost) + Ughost->AI()->Talk(SAY_WP_5, me->GetGUID()); m_uiChatTimer = 4000; break; case 25: - DoScriptText(SAY_WP_6, Ughost, me); + if (Ughost) + Ughost->AI()->Talk(SAY_WP_6, me->GetGUID()); m_uiChatTimer = 4000; break; case 26: diff --git a/src/server/scripts/Examples/example_creature.cpp b/src/server/scripts/Examples/example_creature.cpp index 1ef15c0ca61..0baa9814970 100644 --- a/src/server/scripts/Examples/example_creature.cpp +++ b/src/server/scripts/Examples/example_creature.cpp @@ -45,17 +45,18 @@ enum Yells //List of text id's. The text is stored in database, also in a localized version //(if translation not exist for the textId, default english text will be used) //Not required to define in this way, but simplify if changes are needed. - SAY_AGGRO = -1999900, - SAY_RANDOM_0 = -1999901, - SAY_RANDOM_1 = -1999902, - SAY_RANDOM_2 = -1999903, - SAY_RANDOM_3 = -1999904, - SAY_RANDOM_4 = -1999905, - SAY_BERSERK = -1999906, - SAY_PHASE = -1999907, - SAY_DANCE = -1999908, - SAY_SALUTE = -1999909, - SAY_EVADE = -1999910, + //These texts must be added to the creature texts of the npc for which the script is assigned. + SAY_AGGRO = 0, // "Let the games begin." + SAY_RANDOM = 1, // "I see endless suffering. I see torment. I see rage. I see everything.", + // "Muahahahaha", + // "These mortal infedels my lord, they have invaded your sanctum and seek to steal your secrets.", + // "You are already dead.", + // "Where to go? What to do? So many choices that all end in pain, end in death." + SAY_BERSERK = 2, // "$N, I sentance you to death!" + SAY_PHASE = 3, // "The suffering has just begun!" + SAY_DANCE = 4, // "I always thought I was a good dancer." + SAY_SALUTE = 5, // "Move out Soldier!" + SAY_EVADE = 6 // "Help $N! I'm under attack!" }; enum Spells @@ -127,7 +128,7 @@ class example_creature : public CreatureScript void EnterCombat(Unit* who) { //Say some stuff - DoScriptText(SAY_AGGRO, me, who); + Talk(SAY_AGGRO, who->GetGUID()); } // *** HANDLED FUNCTION *** @@ -142,7 +143,7 @@ class example_creature : public CreatureScript // Called when going out of combat. Reset is called just after. void EnterEvadeMode() { - DoScriptText(SAY_EVADE, me); + Talk(SAY_EVADE); } // *** HANDLED FUNCTION *** @@ -154,10 +155,10 @@ class example_creature : public CreatureScript switch (uiTextEmote) { case TEXT_EMOTE_DANCE: - DoScriptText(SAY_DANCE, me); + Talk(SAY_DANCE); break; case TEXT_EMOTE_SALUTE: - DoScriptText(SAY_SALUTE, me); + Talk(SAY_SALUTE); break; } } @@ -173,7 +174,7 @@ class example_creature : public CreatureScript if (m_uiSayTimer <= uiDiff) { //Random switch between 5 outcomes - DoScriptText(RAND(SAY_RANDOM_0, SAY_RANDOM_1, SAY_RANDOM_2, SAY_RANDOM_3, SAY_RANDOM_4), me); + Talk(SAY_RANDOM); m_uiSayTimer = 45000; //Say something agian in 45 seconds } @@ -235,7 +236,7 @@ class example_creature : public CreatureScript if (m_uiBeserkTimer <= uiDiff) { //Say our line then cast uber death spell - DoScriptText(SAY_BERSERK, me, me->getVictim()); + Talk(SAY_BERSERK, me->getVictim() ? me->getVictim()->GetGUID() : 0); DoCast(me->getVictim(), SPELL_BERSERK); //Cast our beserk spell agian in 12 seconds if we didn't kill everyone @@ -250,7 +251,7 @@ class example_creature : public CreatureScript { //Go to next phase ++m_uiPhase; - DoScriptText(SAY_PHASE, me); + Talk(SAY_PHASE); DoCast(me, SPELL_FRENZY); } else diff --git a/src/server/scripts/Examples/example_escort.cpp b/src/server/scripts/Examples/example_escort.cpp index 8cf0dad25d2..cd680b31577 100644 --- a/src/server/scripts/Examples/example_escort.cpp +++ b/src/server/scripts/Examples/example_escort.cpp @@ -28,6 +28,7 @@ EndScriptData */ #include "ScriptedGossip.h" #include "ScriptedEscortAI.h" #include "Player.h" +#include "CreatureTextMgr.h" enum eEnums { @@ -37,18 +38,18 @@ enum eEnums SPELL_ELIXIR_OF_FORTITUDE = 3593, SPELL_BLUE_FIREWORK = 11540, - SAY_AGGRO1 = -1999910, - SAY_AGGRO2 = -1999911, - SAY_WP_1 = -1999912, - SAY_WP_2 = -1999913, - SAY_WP_3 = -1999914, - SAY_WP_4 = -1999915, - SAY_DEATH_1 = -1999916, - SAY_DEATH_2 = -1999917, - SAY_DEATH_3 = -1999918, - SAY_SPELL = -1999919, - SAY_RAND_1 = -1999920, - SAY_RAND_2 = -1999921 + SAY_AGGRO1 = 0, + SAY_AGGRO2 = 1, + SAY_WP_1 = 2, + SAY_WP_2 = 3, + SAY_WP_3 = 4, + SAY_WP_4 = 5, + SAY_DEATH_1 = 6, + SAY_DEATH_2 = 7, + SAY_DEATH_3 = 8, + SAY_SPELL = 9, + SAY_RAND_1 = 10, + SAY_RAND_2 = 11 }; #define GOSSIP_ITEM_1 "Click to Test Escort(Attack, Run)" @@ -83,19 +84,19 @@ class example_escort : public CreatureScript switch (waypointId) { case 1: - DoScriptText(SAY_WP_1, me); + Talk(SAY_WP_1); break; case 3: - DoScriptText(SAY_WP_2, me); + Talk(SAY_WP_2); me->SummonCreature(NPC_FELBOAR, me->GetPositionX()+5.0f, me->GetPositionY()+7.0f, me->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 3000); break; case 4: if (Player* player = GetPlayerForEscort()) { //pTmpPlayer is the target of the text - DoScriptText(SAY_WP_3, me, player); + Talk(SAY_WP_3, player->GetGUID()); //pTmpPlayer is the source of the text - DoScriptText(SAY_WP_4, player); + sCreatureTextMgr->SendChat(me, SAY_WP_4, 0, CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_NORMAL, 0, TEAM_OTHER, false, player); } break; } @@ -106,10 +107,10 @@ class example_escort : public CreatureScript if (HasEscortState(STATE_ESCORT_ESCORTING)) { if (Player* player = GetPlayerForEscort()) - DoScriptText(SAY_AGGRO1, me, player); + Talk(SAY_AGGRO1, player->GetGUID()); } else - DoScriptText(SAY_AGGRO2, me); + Talk(SAY_AGGRO2); } void Reset() @@ -126,13 +127,13 @@ class example_escort : public CreatureScript { // not a likely case, code here for the sake of example if (killer == me) - DoScriptText(SAY_DEATH_1, me, player); + Talk(SAY_DEATH_1, player->GetGUID()); else - DoScriptText(SAY_DEATH_2, me, player); + Talk(SAY_DEATH_2, player->GetGUID()); } } else - DoScriptText(SAY_DEATH_3, me); + Talk(SAY_DEATH_3); } void UpdateAI(const uint32 uiDiff) @@ -145,7 +146,7 @@ class example_escort : public CreatureScript { if (m_uiDeathCoilTimer <= uiDiff) { - DoScriptText(SAY_SPELL, me); + Talk(SAY_SPELL); DoCast(me->getVictim(), SPELL_DEATH_COIL, false); m_uiDeathCoilTimer = 4000; } @@ -161,12 +162,12 @@ class example_escort : public CreatureScript { if (me->HasAura(SPELL_ELIXIR_OF_FORTITUDE, 0)) { - DoScriptText(SAY_RAND_1, me); + Talk(SAY_RAND_1); DoCast(me, SPELL_BLUE_FIREWORK, false); } else { - DoScriptText(SAY_RAND_2, me); + Talk(SAY_RAND_2); DoCast(me, SPELL_ELIXIR_OF_FORTITUDE, false); } diff --git a/src/server/scripts/Examples/example_gossip_codebox.cpp b/src/server/scripts/Examples/example_gossip_codebox.cpp index 352c43fc1de..b6be4ce3ce1 100644 --- a/src/server/scripts/Examples/example_gossip_codebox.cpp +++ b/src/server/scripts/Examples/example_gossip_codebox.cpp @@ -34,9 +34,10 @@ enum eEnums SPELL_POLYMORPH = 12826, SPELL_MARK_OF_THE_WILD = 26990, - SAY_NOT_INTERESTED = -1999922, - SAY_WRONG = -1999923, - SAY_CORRECT = -1999924 + //These texts must be added to the creature texts of the npc for which the script is assigned. + SAY_NOT_INTERESTED = 0, // "Normal select, guess you're not interested." + SAY_WRONG = 1, // "Wrong!" + SAY_CORRECT = 2 // "You're right, you are allowed to see my inner secrets." }; #define GOSSIP_ITEM_1 "A quiz: what's your name?" @@ -66,7 +67,8 @@ class example_gossip_codebox : public CreatureScript player->PlayerTalkClass->ClearMenus(); if (action == GOSSIP_ACTION_INFO_DEF+2) { - DoScriptText(SAY_NOT_INTERESTED, creature); + //Read comment in enum + creature->AI()->Talk(SAY_NOT_INTERESTED); player->CLOSE_GOSSIP_MENU(); } @@ -83,12 +85,14 @@ class example_gossip_codebox : public CreatureScript case GOSSIP_ACTION_INFO_DEF+1: if (player->GetName() != code) { - DoScriptText(SAY_WRONG, creature); + //Read comment in enum + creature->AI()->Talk(SAY_WRONG); creature->CastSpell(player, SPELL_POLYMORPH, true); } else { - DoScriptText(SAY_CORRECT, creature); + //Read comment in enum + creature->AI()->Talk(SAY_CORRECT); creature->CastSpell(player, SPELL_MARK_OF_THE_WILD, true); } player->CLOSE_GOSSIP_MENU(); diff --git a/src/server/scripts/Examples/example_misc.cpp b/src/server/scripts/Examples/example_misc.cpp index 5ff66c4a7ed..68986b44496 100644 --- a/src/server/scripts/Examples/example_misc.cpp +++ b/src/server/scripts/Examples/example_misc.cpp @@ -26,11 +26,6 @@ EndScriptData */ #include "ScriptMgr.h" #include "Player.h" -enum eSay -{ - SAY_HI = -1999925 -}; - class AT_example_areatrigger : public AreaTriggerScript { public: @@ -42,7 +37,7 @@ class AT_example_areatrigger : public AreaTriggerScript bool OnTrigger(Player* player, AreaTriggerEntry const* /*trigger*/) { - DoScriptText(SAY_HI, player); + player->Kill(player); return true; } }; diff --git a/src/server/scripts/Kalimdor/boss_azuregos.cpp b/src/server/scripts/Kalimdor/boss_azuregos.cpp new file mode 100644 index 00000000000..7bc2e96e0dc --- /dev/null +++ b/src/server/scripts/Kalimdor/boss_azuregos.cpp @@ -0,0 +1,166 @@ +/* + * Copyright (C) 2008-2012 TrinityCore + * Copyright (C) 2006-2009 ScriptDev2 + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +/* ScriptData +SDName: Boss_Azuregos +SD%Complete: 90 +SDComment: Teleport not included, spell reflect not effecting dots (Core problem) +SDCategory: Azshara +EndScriptData */ + +#include "ScriptMgr.h" +#include "ScriptedCreature.h" + +enum Say +{ + SAY_TELEPORT = 0 +}; + +enum Spells +{ + SPELL_MARKOFFROST = 23182, + SPELL_MANASTORM = 21097, + SPELL_CHILL = 21098, + SPELL_FROSTBREATH = 21099, + SPELL_REFLECT = 22067, + SPELL_CLEAVE = 8255, //Perhaps not right ID + SPELL_ENRAGE = 23537 +}; + +class boss_azuregos : public CreatureScript +{ +public: + boss_azuregos() : CreatureScript("boss_azuregos") { } + + CreatureAI* GetAI(Creature* creature) const + { + return new boss_azuregosAI (creature); + } + + struct boss_azuregosAI : public ScriptedAI + { + boss_azuregosAI(Creature* creature) : ScriptedAI(creature) {} + + uint32 MarkOfFrostTimer; + uint32 ManaStormTimer; + uint32 ChillTimer; + uint32 BreathTimer; + uint32 TeleportTimer; + uint32 ReflectTimer; + uint32 CleaveTimer; + uint32 EnrageTimer; + bool Enraged; + + void Reset() + { + MarkOfFrostTimer = 35000; + ManaStormTimer = urand(5000, 17000); + ChillTimer = urand(10000, 30000); + BreathTimer = urand(2000, 8000); + TeleportTimer = 30000; + ReflectTimer = urand(15000, 30000); + CleaveTimer = 7000; + EnrageTimer = 0; + Enraged = false; + } + + void EnterCombat(Unit* /*who*/) {} + + void UpdateAI(const uint32 diff) + { + //Return since we have no target + if (!UpdateVictim()) + return; + + if (TeleportTimer <= diff) + { + Talk(SAY_TELEPORT); + ThreatContainer::StorageType threatlist = me->getThreatManager().getThreatList(); + ThreatContainer::StorageType::const_iterator i = threatlist.begin(); + for (i = threatlist.begin(); i != threatlist.end(); ++i) + { + Unit* unit = Unit::GetUnit(*me, (*i)->getUnitGuid()); + if (unit && (unit->GetTypeId() == TYPEID_PLAYER)) + { + DoTeleportPlayer(unit, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()+3, unit->GetOrientation()); + } + } + + DoResetThreat(); + TeleportTimer = 30000; + } else TeleportTimer -= diff; + + // //MarkOfFrostTimer + // if (MarkOfFrostTimer <= diff) + // { + // DoCast(me->getVictim(), SPELL_MARKOFFROST); + // MarkOfFrostTimer = 25000; + // } else MarkOfFrostTimer -= diff; + + //ChillTimer + if (ChillTimer <= diff) + { + DoCast(me->getVictim(), SPELL_CHILL); + ChillTimer = urand(13000, 25000); + } else ChillTimer -= diff; + + //BreathTimer + if (BreathTimer <= diff) + { + DoCast(me->getVictim(), SPELL_FROSTBREATH); + BreathTimer = urand(10000, 15000); + } else BreathTimer -= diff; + + //ManaStormTimer + if (ManaStormTimer <= diff) + { + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) + DoCast(target, SPELL_MANASTORM); + ManaStormTimer = urand(7500, 12500); + } else ManaStormTimer -= diff; + + //ReflectTimer + if (ReflectTimer <= diff) + { + DoCast(me, SPELL_REFLECT); + ReflectTimer = urand(20000, 35000); + } else ReflectTimer -= diff; + + //CleaveTimer + if (CleaveTimer <= diff) + { + DoCast(me->getVictim(), SPELL_CLEAVE); + CleaveTimer = 7000; + } else CleaveTimer -= diff; + + //EnrageTimer + if (HealthBelowPct(26) && !Enraged) + { + DoCast(me, SPELL_ENRAGE); + Enraged = true; + } + + DoMeleeAttackIfReady(); + } + }; +}; + +void AddSC_boss_azuregos() +{ + new boss_azuregos(); +} diff --git a/src/server/scripts/Kalimdor/ungoro_crater.cpp b/src/server/scripts/Kalimdor/ungoro_crater.cpp index 87b329b65e3..7e69daed72e 100644 --- a/src/server/scripts/Kalimdor/ungoro_crater.cpp +++ b/src/server/scripts/Kalimdor/ungoro_crater.cpp @@ -16,23 +16,6 @@ * with this program. If not, see . */ -/* ScriptData -SDName: Ungoro Crater -SD%Complete: 0 -SDComment: Support for Quest: -SDCategory: Ungoro Crater -EndScriptData */ - -/* ContentData -EndContentData */ - -#include "ScriptMgr.h" -#include "ScriptedCreature.h" -#include "ScriptedEscortAI.h" -#include "ScriptedFollowerAI.h" -#include "Player.h" -#include "SpellInfo.h" - void AddSC_ungoro_crater() { } diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp old mode 100755 new mode 100644 diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp old mode 100755 new mode 100644 diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp old mode 100755 new mode 100644 diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp old mode 100755 new mode 100644 diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp old mode 100755 new mode 100644 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 old mode 100755 new mode 100644 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 old mode 100755 new mode 100644 diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp old mode 100755 new mode 100644 diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp old mode 100755 new mode 100644 diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp old mode 100755 new mode 100644 diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp old mode 100755 new mode 100644 diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp old mode 100755 new mode 100644 diff --git a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h old mode 100755 new mode 100644 diff --git a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp old mode 100755 new mode 100644 diff --git a/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp old mode 100755 new mode 100644 diff --git a/src/server/scripts/Northrend/icecrown.cpp b/src/server/scripts/Northrend/icecrown.cpp index 030df23028c..e08a9173715 100644 --- a/src/server/scripts/Northrend/icecrown.cpp +++ b/src/server/scripts/Northrend/icecrown.cpp @@ -494,6 +494,378 @@ class npc_tournament_training_dummy : public CreatureScript }; +// Battle for Crusaders' Pinnacle +enum BlessedBanner +{ + SPELL_BLESSING_OF_THE_CRUSADE = 58026, + SPELL_THREAT_PULSE = 58113, + SPELL_CRUSADERS_SPIRE_VICTORY = 58084, + SPELL_TORCH = 58121, + + NPC_BLESSED_BANNER = 30891, + NPC_CRUSADER_LORD_DALFORS = 31003, + NPC_ARGENT_BATTLE_PRIEST = 30919, + NPC_ARGENT_MASON = 30900, + NPC_REANIMATED_CAPTAIN = 30986, + NPC_SCOURGE_DRUDGE = 30984, + NPC_HIDEOUS_PLAGEBRINGER = 30987, + NPC_HALOF_THE_DEATHBRINGER = 30989, + NPC_LK = 31013, + + BANNER_SAY = 0, // "The Blessed Banner of the Crusade has been planted.\n Defend the banner from all attackers!" + DALFORS_SAY_PRE_1 = 0, // "BY THE LIGHT! Those damned monsters! Look at what they've done to our people!" + DALFORS_SAY_PRE_2 = 1, // "Burn it down, boys. Burn it all down." + DALFORS_SAY_START = 2, // "Let 'em come. They'll pay for what they've done!" + DALFORS_YELL_FINISHED = 3, // "We've done it, lads! We've taken the pinnacle from the Scourge! Report to Father Gustav at once and tell him the good news! We're gonna get to buildin' and settin' up! Go!" + LK_TALK_1 = 0, // "Leave no survivors!" + LK_TALK_2 = 1, // "Cower before my terrible creations!" + LK_TALK_3 = 2, // "Feast my children! Feast upon the flesh of the living!" + LK_TALK_4 = 3, // "Lay down your arms and surrender your souls!" + + EVENT_SPAWN = 1, + EVENT_INTRO_1 = 2, + EVENT_INTRO_2 = 3, + EVENT_INTRO_3 = 4, + EVENT_MASON_ACTION = 5, + EVENT_START_FIGHT = 6, + EVENT_WAVE_SPAWN = 7, + EVENT_HALOF = 8, + EVENT_ENDED = 9, +}; + +Position const DalforsPos[3] = +{ + {6458.703f, 403.858f, 490.498f, 3.1205f}, // Dalfors spawn point + {6422.950f, 423.335f, 510.451f, 0.0f}, // Dalfors intro pos + {6426.343f, 420.515f, 508.650f, 0.0f}, // Dalfors fight pos +}; + +Position const Priest1Pos[2] = +{ + {6462.025f, 403.681f, 489.721f, 3.1007f}, // priest1 spawn point + {6421.480f, 423.576f, 510.781f, 5.7421f}, // priest1 intro pos +}; + +Position const Priest2Pos[2] = +{ + {6463.969f, 407.198f, 489.240f, 2.2689f}, // priest2 spawn point + {6419.778f, 421.404f, 510.972f, 5.7421f}, // priest2 intro pos +}; + +Position const Priest3Pos[2] = +{ + {6464.371f, 400.944f, 489.186f, 6.1610f}, // priest3 spawn point + {6423.516f, 425.782f, 510.774f, 5.7421f}, // priest3 intro pos +}; + +Position const Mason1Pos[3] = +{ + {6462.929f, 409.826f, 489.392f, 3.0968f}, // mason1 spawn point + {6428.163f, 421.960f, 508.297f, 0.0f}, // mason1 intro pos + {6414.335f, 454.904f, 511.395f, 2.8972f}, // mason1 action pos +}; + +Position const Mason2Pos[3] = +{ + {6462.650f, 405.670f, 489.576f, 2.9414f}, // mason2 spawn point + {6426.250f, 419.194f, 508.219f, 0.0f}, // mason2 intro pos + {6415.014f, 446.849f, 511.395f, 3.1241f}, // mason2 action pos +}; + +Position const Mason3Pos[3] = +{ + {6462.646f, 401.218f, 489.601f, 2.7864f}, // mason3 spawn point + {6423.855f, 416.598f, 508.305f, 0.0f}, // mason3 intro pos + {6417.070f, 438.824f, 511.395f, 3.6651f}, // mason3 action pos +}; + +class npc_blessed_banner : public CreatureScript +{ +public: + npc_blessed_banner() : CreatureScript("npc_blessed_banner") { } + + struct npc_blessed_bannerAI : public Scripted_NoMovementAI + { + npc_blessed_bannerAI(Creature* creature) : Scripted_NoMovementAI(creature) , Summons(me) + { + HalofSpawned = false; + PhaseCount = 0; + Summons.DespawnAll(); + } + + EventMap events; + + bool HalofSpawned; + + uint32 PhaseCount; + + SummonList Summons; + + uint64 guidDalfors; + uint64 guidPriest[3]; + uint64 guidMason[3]; + uint64 guidHalof; + + void Reset() + { + me->setRegeneratingHealth(false); + DoCast(SPELL_THREAT_PULSE); + me->AI()->Talk(BANNER_SAY); + events.ScheduleEvent(EVENT_SPAWN,3000); + } + + void EnterCombat(Unit* /*who*/) {} + + void MoveInLineOfSight(Unit* /*who*/) {} + + void JustSummoned(Creature* Summoned) + { + Summons.Summon(Summoned); + } + + void JustDied(Unit* /*killer*/) + { + Summons.DespawnAll(); + me->DespawnOrUnsummon(); + } + + void UpdateAI(uint32 const diff) + { + events.Update(diff); + + switch (events.ExecuteEvent()) + { + case EVENT_SPAWN: + { + if (Creature* Dalfors = DoSummon(NPC_CRUSADER_LORD_DALFORS, DalforsPos[0])) + { + guidDalfors = Dalfors->GetGUID(); + Dalfors->GetMotionMaster()->MovePoint(0, DalforsPos[1]); + } + if (Creature* Priest1 = DoSummon(NPC_ARGENT_BATTLE_PRIEST, Priest1Pos[0])) + { + guidPriest[0] = Priest1->GetGUID(); + Priest1->GetMotionMaster()->MovePoint(0, Priest1Pos[1]); + } + if (Creature* Priest2 = DoSummon(NPC_ARGENT_BATTLE_PRIEST, Priest2Pos[0])) + { + guidPriest[1] = Priest2->GetGUID(); + Priest2->GetMotionMaster()->MovePoint(0, Priest2Pos[1]); + } + if (Creature* Priest3 = DoSummon(NPC_ARGENT_BATTLE_PRIEST, Priest3Pos[0])) + { + guidPriest[2] = Priest3->GetGUID(); + Priest3->GetMotionMaster()->MovePoint(0, Priest3Pos[1]); + } + if (Creature* Mason1 = DoSummon(NPC_ARGENT_MASON, Mason1Pos[0])) + { + guidMason[0] = Mason1->GetGUID(); + Mason1->GetMotionMaster()->MovePoint(0, Mason1Pos[1]); + } + if (Creature* Mason2 = DoSummon(NPC_ARGENT_MASON, Mason2Pos[0])) + { + guidMason[1] = Mason2->GetGUID(); + Mason2->GetMotionMaster()->MovePoint(0, Mason2Pos[1]); + } + if (Creature* Mason3 = DoSummon(NPC_ARGENT_MASON, Mason3Pos[0])) + { + guidMason[2] = Mason3->GetGUID(); + Mason3->GetMotionMaster()->MovePoint(0, Mason3Pos[1]); + } + events.ScheduleEvent(EVENT_INTRO_1,15000); + } + break; + case EVENT_INTRO_1: + { + if (Creature* Dalfors = me->GetCreature(*me,guidDalfors)) + Dalfors->AI()->Talk(DALFORS_SAY_PRE_1); + events.ScheduleEvent(EVENT_INTRO_2,5000); + } + break; + case EVENT_INTRO_2: + { + if (Creature* Dalfors = me->GetCreature(*me,guidDalfors)) + { + Dalfors->SetFacingTo(6.215f); + Dalfors->AI()->Talk(DALFORS_SAY_PRE_2); + } + events.ScheduleEvent(EVENT_INTRO_3,5000); + } + break; + case EVENT_INTRO_3: + { + if (Creature* Dalfors = me->GetCreature(*me,guidDalfors)) + { + Dalfors->GetMotionMaster()->MovePoint(0, DalforsPos[2]); + Dalfors->SetHomePosition(DalforsPos[2]); + } + if (Creature* Priest1 = me->GetCreature(*me,guidPriest[0])) + { + Priest1->SetFacingTo(5.7421f); + Priest1->SetHomePosition(Priest1Pos[1]); + } + if (Creature* Priest2 = me->GetCreature(*me,guidPriest[1])) + { + Priest2->SetFacingTo(5.7421f); + Priest2->SetHomePosition(Priest2Pos[1]); + } + if (Creature* Priest3 = me->GetCreature(*me,guidPriest[2])) + { + Priest3->SetFacingTo(5.7421f); + Priest3->SetHomePosition(Priest3Pos[1]); + } + if (Creature* Mason1 = me->GetCreature(*me,guidMason[0])) + { + Mason1->GetMotionMaster()->MovePoint(0, Mason1Pos[2]); + Mason1->SetHomePosition(Mason1Pos[2]); + } + if (Creature* Mason2 = me->GetCreature(*me,guidMason[1])) + { + Mason2->GetMotionMaster()->MovePoint(0, Mason2Pos[2]); + Mason2->SetHomePosition(Mason2Pos[2]); + } + if (Creature* Mason3 = me->GetCreature(*me,guidMason[2])) + { + Mason3->GetMotionMaster()->MovePoint(0, Mason3Pos[2]); + Mason3->SetHomePosition(Mason3Pos[2]); + } + events.ScheduleEvent(EVENT_START_FIGHT,5000); + events.ScheduleEvent(EVENT_MASON_ACTION,15000); + } + break; + case EVENT_MASON_ACTION: + { + if (Creature* Mason1 = me->GetCreature(*me,guidMason[0])) + { + Mason1->SetFacingTo(2.8972f); + Mason1->AI()->SetData(1,1); // triggers SAI actions on npc + } + if (Creature* Mason2 = me->GetCreature(*me,guidMason[1])) + { + Mason2->SetFacingTo(3.1241f); + Mason2->AI()->SetData(1,1); // triggers SAI actions on npc + } + if (Creature* Mason3 = me->GetCreature(*me,guidMason[2])) + { + Mason3->SetFacingTo(3.6651f); + Mason3->AI()->SetData(1,1); // triggers SAI actions on npc + } + } + break; + case EVENT_START_FIGHT: + { + if(Creature* LK = GetClosestCreatureWithEntry(me,NPC_LK,100)) + LK->AI()->Talk(LK_TALK_1); + if (Creature* Dalfors = me->GetCreature(*me,guidDalfors)) + Dalfors->AI()->Talk(DALFORS_SAY_START); + events.ScheduleEvent(EVENT_WAVE_SPAWN,1000); + } + break; + case EVENT_WAVE_SPAWN: + { + if (PhaseCount == 3) + { + if (Creature* LK = GetClosestCreatureWithEntry(me,NPC_LK,100)) + LK->AI()->Talk(LK_TALK_2); + } + else if (PhaseCount == 6) + { + if (Creature* LK = GetClosestCreatureWithEntry(me,NPC_LK,100)) + LK->AI()->Talk(LK_TALK_3); + } + if (Creature* tempsum = DoSummon(NPC_SCOURGE_DRUDGE,Mason3Pos[0])) + { + tempsum->SetHomePosition(DalforsPos[2]); + tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me,NPC_BLESSED_BANNER,100)); + } + if (urand(0,1) == 0) + { + if (Creature* tempsum = DoSummon(NPC_HIDEOUS_PLAGEBRINGER,Mason1Pos[0])) + { + tempsum->SetHomePosition(DalforsPos[2]); + tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me,NPC_BLESSED_BANNER,100)); + } + if (Creature* tempsum = DoSummon(NPC_HIDEOUS_PLAGEBRINGER,Mason2Pos[0])) + { + tempsum->SetHomePosition(DalforsPos[2]); + tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me,NPC_BLESSED_BANNER,100)); + } + } + else + { + if (Creature* tempsum = DoSummon(NPC_REANIMATED_CAPTAIN,Mason1Pos[0])) + { + tempsum->SetHomePosition(DalforsPos[2]); + tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me,NPC_BLESSED_BANNER,100)); + } + if (Creature* tempsum = DoSummon(NPC_REANIMATED_CAPTAIN,Mason2Pos[0])) + { + tempsum->SetHomePosition(DalforsPos[2]); + tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me,NPC_BLESSED_BANNER,100)); + } + } + + PhaseCount++; + + if (PhaseCount < 8) + events.ScheduleEvent(EVENT_WAVE_SPAWN,urand(10000,20000)); + else + events.ScheduleEvent(EVENT_HALOF,urand(10000,20000)); + } + break; + case EVENT_HALOF: + { + if (Creature* LK = GetClosestCreatureWithEntry(me,NPC_LK,100)) + LK->AI()->Talk(LK_TALK_4); + if (Creature* tempsum = DoSummon(NPC_SCOURGE_DRUDGE,Mason1Pos[0])) + { + tempsum->SetHomePosition(DalforsPos[2]); + tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me,NPC_BLESSED_BANNER,100)); + } + if (Creature* tempsum = DoSummon(NPC_SCOURGE_DRUDGE,Mason2Pos[0])) + { + tempsum->SetHomePosition(DalforsPos[2]); + tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me,NPC_BLESSED_BANNER,100)); + } + if (Creature* tempsum = DoSummon(NPC_HALOF_THE_DEATHBRINGER,DalforsPos[0])) + { + HalofSpawned = true; + guidHalof = tempsum->GetGUID(); + tempsum->SetHomePosition(DalforsPos[2]); + tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me,NPC_BLESSED_BANNER,100)); + } + } + break; + case EVENT_ENDED: + { + Summons.DespawnAll(); + me->DespawnOrUnsummon(); + } + break; + } + + if (PhaseCount == 8) + if (Creature* Halof = me->GetCreature(*me,guidHalof)) + if (Halof->isDead()) + { + DoCast(me,SPELL_CRUSADERS_SPIRE_VICTORY,true); + Summons.DespawnEntry(NPC_HIDEOUS_PLAGEBRINGER); + Summons.DespawnEntry(NPC_REANIMATED_CAPTAIN); + Summons.DespawnEntry(NPC_SCOURGE_DRUDGE); + Summons.DespawnEntry(NPC_HALOF_THE_DEATHBRINGER); + if (Creature* Dalfors = me->GetCreature(*me,guidDalfors)) + Dalfors->AI()->Talk(DALFORS_YELL_FINISHED); + events.ScheduleEvent(EVENT_ENDED,10000); + } + } + }; + + CreatureAI* GetAI(Creature* creature) const + { + return new npc_blessed_bannerAI(creature); + } +}; + void AddSC_icecrown() { new npc_arete; @@ -502,4 +874,5 @@ void AddSC_icecrown() new npc_guardian_pavilion; new npc_vereth_the_cunning; new npc_tournament_training_dummy; + new npc_blessed_banner(); } diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPHP.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPHP.cpp old mode 100755 new mode 100644 diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPHP.h b/src/server/scripts/OutdoorPvP/OutdoorPvPHP.h old mode 100755 new mode 100644 diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPNA.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPNA.cpp old mode 100755 new mode 100644 diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPNA.h b/src/server/scripts/OutdoorPvP/OutdoorPvPNA.h old mode 100755 new mode 100644 diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp old mode 100755 new mode 100644 diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPSI.h b/src/server/scripts/OutdoorPvP/OutdoorPvPSI.h old mode 100755 new mode 100644 diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPTF.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPTF.cpp old mode 100755 new mode 100644 diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPTF.h b/src/server/scripts/OutdoorPvP/OutdoorPvPTF.h old mode 100755 new mode 100644 diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPZM.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPZM.cpp old mode 100755 new mode 100644 diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPZM.h b/src/server/scripts/OutdoorPvP/OutdoorPvPZM.h old mode 100755 new mode 100644 diff --git a/src/server/scripts/World/achievement_scripts.cpp b/src/server/scripts/World/achievement_scripts.cpp old mode 100755 new mode 100644 diff --git a/src/server/scripts/World/chat_log.cpp b/src/server/scripts/World/chat_log.cpp old mode 100755 new mode 100644 diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp index d0f8282d4bb..d601c717562 100644 --- a/src/server/scripts/World/npcs_special.cpp +++ b/src/server/scripts/World/npcs_special.cpp @@ -2951,7 +2951,7 @@ public: me->GetMotionMaster()->MoveFollow(owner, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE); } - void EnterCombat(Unit * /*who*/) { } + void EnterCombat(Unit* /*who*/) { } void DoAction(const int32 /*param*/) { diff --git a/src/server/shared/Common.cpp b/src/server/shared/Common.cpp old mode 100755 new mode 100644 diff --git a/src/server/shared/Common.h b/src/server/shared/Common.h old mode 100755 new mode 100644 diff --git a/src/server/shared/CompilerDefs.h b/src/server/shared/CompilerDefs.h old mode 100755 new mode 100644 diff --git a/src/server/shared/Configuration/Config.cpp b/src/server/shared/Configuration/Config.cpp old mode 100755 new mode 100644 diff --git a/src/server/shared/Configuration/Config.h b/src/server/shared/Configuration/Config.h old mode 100755 new mode 100644 diff --git a/src/server/shared/Cryptography/ARC4.cpp b/src/server/shared/Cryptography/ARC4.cpp old mode 100755 new mode 100644 diff --git a/src/server/shared/Cryptography/ARC4.h b/src/server/shared/Cryptography/ARC4.h old mode 100755 new mode 100644 diff --git a/src/server/shared/Cryptography/Authentication/AuthCrypt.cpp b/src/server/shared/Cryptography/Authentication/AuthCrypt.cpp old mode 100755 new mode 100644 diff --git a/src/server/shared/Cryptography/Authentication/AuthCrypt.h b/src/server/shared/Cryptography/Authentication/AuthCrypt.h old mode 100755 new mode 100644 diff --git a/src/server/shared/Cryptography/BigNumber.cpp b/src/server/shared/Cryptography/BigNumber.cpp old mode 100755 new mode 100644 diff --git a/src/server/shared/Cryptography/BigNumber.h b/src/server/shared/Cryptography/BigNumber.h old mode 100755 new mode 100644 diff --git a/src/server/shared/Cryptography/HMACSHA1.cpp b/src/server/shared/Cryptography/HMACSHA1.cpp old mode 100755 new mode 100644 diff --git a/src/server/shared/Cryptography/HMACSHA1.h b/src/server/shared/Cryptography/HMACSHA1.h old mode 100755 new mode 100644 diff --git a/src/server/shared/Cryptography/SHA1.cpp b/src/server/shared/Cryptography/SHA1.cpp old mode 100755 new mode 100644 diff --git a/src/server/shared/Cryptography/SHA1.h b/src/server/shared/Cryptography/SHA1.h old mode 100755 new mode 100644 diff --git a/src/server/shared/DataStores/DBCFileLoader.cpp b/src/server/shared/DataStores/DBCFileLoader.cpp old mode 100755 new mode 100644 diff --git a/src/server/shared/DataStores/DBCFileLoader.h b/src/server/shared/DataStores/DBCFileLoader.h old mode 100755 new mode 100644 diff --git a/src/server/shared/DataStores/DBCStore.h b/src/server/shared/DataStores/DBCStore.h old mode 100755 new mode 100644 index 0c502d3fd77..91c3f935c7b --- a/src/server/shared/DataStores/DBCStore.h +++ b/src/server/shared/DataStores/DBCStore.h @@ -117,7 +117,7 @@ class DBCStorage // Check if sql index pos is valid if (int32(result->GetFieldCount()-1) < sql->sqlIndexPos) { - sLog->outError(LOG_FILTER_GENERAL, "Invalid index pos for dbc:'%s'", sql->sqlTableName.c_str()); + sLog->outError(LOG_FILTER_SERVER_LOADING, "Invalid index pos for dbc:'%s'", sql->sqlTableName.c_str()); return false; } } @@ -148,7 +148,7 @@ class DBCStorage uint32 id = fields[sql->sqlIndexPos].GetUInt32(); if (indexTable.asT[id]) { - sLog->outError(LOG_FILTER_GENERAL, "Index %d already exists in dbc:'%s'", id, sql->sqlTableName.c_str()); + sLog->outError(LOG_FILTER_SERVER_LOADING, "Index %d already exists in dbc:'%s'", id, sql->sqlTableName.c_str()); return false; } indexTable.asT[id]=(T*)&sqlDataTable[offset]; @@ -203,7 +203,7 @@ class DBCStorage offset+=1; break; case FT_STRING: - sLog->outError(LOG_FILTER_GENERAL, "Unsupported data type in table '%s' at char %d", sql->sqlTableName.c_str(), columnNumber); + sLog->outError(LOG_FILTER_SERVER_LOADING, "Unsupported data type in table '%s' at char %d", sql->sqlTableName.c_str(), columnNumber); return false; case FT_SORT: break; @@ -215,13 +215,13 @@ class DBCStorage } else { - sLog->outError(LOG_FILTER_GENERAL, "Incorrect sql format string '%s' at char %d", sql->sqlTableName.c_str(), columnNumber); + sLog->outError(LOG_FILTER_SERVER_LOADING, "Incorrect sql format string '%s' at char %d", sql->sqlTableName.c_str(), columnNumber); return false; } } if (sqlColumnNumber != (result->GetFieldCount()-1)) { - sLog->outError(LOG_FILTER_GENERAL, "SQL and DBC format strings are not matching for table: '%s'", sql->sqlTableName.c_str()); + sLog->outError(LOG_FILTER_SERVER_LOADING, "SQL and DBC format strings are not matching for table: '%s'", sql->sqlTableName.c_str()); return false; } diff --git a/src/server/shared/Database/AdhocStatement.cpp b/src/server/shared/Database/AdhocStatement.cpp old mode 100755 new mode 100644 diff --git a/src/server/shared/Database/AdhocStatement.h b/src/server/shared/Database/AdhocStatement.h old mode 100755 new mode 100644 diff --git a/src/server/shared/Database/DatabaseEnv.h b/src/server/shared/Database/DatabaseEnv.h old mode 100755 new mode 100644 diff --git a/src/server/shared/Database/DatabaseWorker.h b/src/server/shared/Database/DatabaseWorker.h old mode 100755 new mode 100644 diff --git a/src/server/shared/Database/DatabaseWorkerPool.h b/src/server/shared/Database/DatabaseWorkerPool.h old mode 100755 new mode 100644 diff --git a/src/server/shared/Database/Field.cpp b/src/server/shared/Database/Field.cpp old mode 100755 new mode 100644 diff --git a/src/server/shared/Database/Field.h b/src/server/shared/Database/Field.h old mode 100755 new mode 100644 diff --git a/src/server/shared/Database/Implementation/LoginDatabase.cpp b/src/server/shared/Database/Implementation/LoginDatabase.cpp old mode 100755 new mode 100644 diff --git a/src/server/shared/Database/Implementation/LoginDatabase.h b/src/server/shared/Database/Implementation/LoginDatabase.h old mode 100755 new mode 100644 diff --git a/src/server/shared/Database/Implementation/WorldDatabase.cpp b/src/server/shared/Database/Implementation/WorldDatabase.cpp old mode 100755 new mode 100644 diff --git a/src/server/shared/Database/Implementation/WorldDatabase.h b/src/server/shared/Database/Implementation/WorldDatabase.h old mode 100755 new mode 100644 diff --git a/src/server/shared/Database/MySQLConnection.cpp b/src/server/shared/Database/MySQLConnection.cpp old mode 100755 new mode 100644 diff --git a/src/server/shared/Database/MySQLConnection.h b/src/server/shared/Database/MySQLConnection.h old mode 100755 new mode 100644 diff --git a/src/server/shared/Database/MySQLThreading.h b/src/server/shared/Database/MySQLThreading.h old mode 100755 new mode 100644 diff --git a/src/server/shared/Database/PreparedStatement.cpp b/src/server/shared/Database/PreparedStatement.cpp old mode 100755 new mode 100644 diff --git a/src/server/shared/Database/PreparedStatement.h b/src/server/shared/Database/PreparedStatement.h old mode 100755 new mode 100644 diff --git a/src/server/shared/Database/QueryHolder.cpp b/src/server/shared/Database/QueryHolder.cpp old mode 100755 new mode 100644 diff --git a/src/server/shared/Database/QueryHolder.h b/src/server/shared/Database/QueryHolder.h old mode 100755 new mode 100644 diff --git a/src/server/shared/Database/QueryResult.cpp b/src/server/shared/Database/QueryResult.cpp old mode 100755 new mode 100644 diff --git a/src/server/shared/Database/QueryResult.h b/src/server/shared/Database/QueryResult.h old mode 100755 new mode 100644 diff --git a/src/server/shared/Database/SQLOperation.h b/src/server/shared/Database/SQLOperation.h old mode 100755 new mode 100644 diff --git a/src/server/shared/Database/Transaction.cpp b/src/server/shared/Database/Transaction.cpp old mode 100755 new mode 100644 diff --git a/src/server/shared/Database/Transaction.h b/src/server/shared/Database/Transaction.h old mode 100755 new mode 100644 diff --git a/src/server/shared/Debugging/Errors.h b/src/server/shared/Debugging/Errors.h old mode 100755 new mode 100644 diff --git a/src/server/shared/Define.h b/src/server/shared/Define.h old mode 100755 new mode 100644 diff --git a/src/server/shared/Dynamic/FactoryHolder.h b/src/server/shared/Dynamic/FactoryHolder.h old mode 100755 new mode 100644 diff --git a/src/server/shared/Dynamic/LinkedList.h b/src/server/shared/Dynamic/LinkedList.h old mode 100755 new mode 100644 diff --git a/src/server/shared/Dynamic/LinkedReference/RefManager.h b/src/server/shared/Dynamic/LinkedReference/RefManager.h old mode 100755 new mode 100644 diff --git a/src/server/shared/Dynamic/LinkedReference/Reference.h b/src/server/shared/Dynamic/LinkedReference/Reference.h old mode 100755 new mode 100644 diff --git a/src/server/shared/Dynamic/ObjectRegistry.h b/src/server/shared/Dynamic/ObjectRegistry.h old mode 100755 new mode 100644 diff --git a/src/server/shared/Dynamic/TypeContainer.h b/src/server/shared/Dynamic/TypeContainer.h old mode 100755 new mode 100644 diff --git a/src/server/shared/Dynamic/TypeContainerFunctions.h b/src/server/shared/Dynamic/TypeContainerFunctions.h old mode 100755 new mode 100644 diff --git a/src/server/shared/Dynamic/TypeContainerVisitor.h b/src/server/shared/Dynamic/TypeContainerVisitor.h old mode 100755 new mode 100644 diff --git a/src/server/shared/Dynamic/TypeList.h b/src/server/shared/Dynamic/TypeList.h old mode 100755 new mode 100644 diff --git a/src/server/shared/Dynamic/UnorderedMap.h b/src/server/shared/Dynamic/UnorderedMap.h old mode 100755 new mode 100644 diff --git a/src/server/shared/Packets/ByteBuffer.h b/src/server/shared/Packets/ByteBuffer.h old mode 100755 new mode 100644 index c4f709d23dd..01e8d9cc22c --- a/src/server/shared/Packets/ByteBuffer.h +++ b/src/server/shared/Packets/ByteBuffer.h @@ -54,7 +54,7 @@ class ByteBufferPositionException : public ByteBufferException { ACE_Stack_Trace trace; - sLog->outError(LOG_FILTER_GENERAL, "Attempted to %s value with size: "SIZEFMTD" in ByteBuffer (pos: " SIZEFMTD " size: "SIZEFMTD")\n[Stack trace: %s]" , + sLog->outError(LOG_FILTER_NETWORKIO, "Attempted to %s value with size: "SIZEFMTD" in ByteBuffer (pos: " SIZEFMTD " size: "SIZEFMTD")\n[Stack trace: %s]" , (_add ? "put" : "get"), ValueSize, Pos, Size, trace.c_str()); } @@ -76,7 +76,7 @@ class ByteBufferSourceException : public ByteBufferException { ACE_Stack_Trace trace; - sLog->outError(LOG_FILTER_GENERAL, "Attempted to put a %s in ByteBuffer (pos: "SIZEFMTD" size: "SIZEFMTD")\n[Stack trace: %s]", + sLog->outError(LOG_FILTER_NETWORKIO, "Attempted to put a %s in ByteBuffer (pos: "SIZEFMTD" size: "SIZEFMTD")\n[Stack trace: %s]", (ValueSize > 0 ? "NULL-pointer" : "zero-sized value"), Pos, Size, trace.c_str()); } }; diff --git a/src/server/shared/SystemConfig.h b/src/server/shared/SystemConfig.h old mode 100755 new mode 100644 diff --git a/src/server/shared/Threading/Callback.h b/src/server/shared/Threading/Callback.h old mode 100755 new mode 100644 diff --git a/src/server/shared/Threading/LockedQueue.h b/src/server/shared/Threading/LockedQueue.h old mode 100755 new mode 100644 diff --git a/src/server/shared/Threading/Threading.cpp b/src/server/shared/Threading/Threading.cpp old mode 100755 new mode 100644 diff --git a/src/server/shared/Threading/Threading.h b/src/server/shared/Threading/Threading.h old mode 100755 new mode 100644 diff --git a/src/server/shared/Utilities/ByteConverter.h b/src/server/shared/Utilities/ByteConverter.h old mode 100755 new mode 100644 diff --git a/src/server/shared/Utilities/EventProcessor.cpp b/src/server/shared/Utilities/EventProcessor.cpp old mode 100755 new mode 100644 diff --git a/src/server/shared/Utilities/EventProcessor.h b/src/server/shared/Utilities/EventProcessor.h old mode 100755 new mode 100644 diff --git a/src/server/shared/Utilities/ServiceWin32.cpp b/src/server/shared/Utilities/ServiceWin32.cpp old mode 100755 new mode 100644 index 91a78af1adc..390b1a35010 --- a/src/server/shared/Utilities/ServiceWin32.cpp +++ b/src/server/shared/Utilities/ServiceWin32.cpp @@ -255,7 +255,7 @@ bool WinServiceRun() if (!StartServiceCtrlDispatcher(serviceTable)) { - sLog->outError(LOG_FILTER_GENERAL, "StartService Failed. Error [%u]", ::GetLastError()); + sLog->outError(LOG_FILTER_WORLDSERVER, "StartService Failed. Error [%u]", ::GetLastError()); return false; } return true; diff --git a/src/server/shared/Utilities/ServiceWin32.h b/src/server/shared/Utilities/ServiceWin32.h old mode 100755 new mode 100644 diff --git a/src/server/shared/Utilities/SignalHandler.h b/src/server/shared/Utilities/SignalHandler.h old mode 100755 new mode 100644 diff --git a/src/server/shared/Utilities/Timer.h b/src/server/shared/Utilities/Timer.h old mode 100755 new mode 100644 diff --git a/src/server/shared/Utilities/Util.cpp b/src/server/shared/Utilities/Util.cpp old mode 100755 new mode 100644 diff --git a/src/server/shared/Utilities/Util.h b/src/server/shared/Utilities/Util.h old mode 100755 new mode 100644 diff --git a/src/server/worldserver/CommandLine/CliRunnable.cpp b/src/server/worldserver/CommandLine/CliRunnable.cpp old mode 100755 new mode 100644 diff --git a/src/server/worldserver/CommandLine/CliRunnable.h b/src/server/worldserver/CommandLine/CliRunnable.h old mode 100755 new mode 100644 diff --git a/src/server/worldserver/Main.cpp b/src/server/worldserver/Main.cpp old mode 100755 new mode 100644 diff --git a/src/server/worldserver/Master.cpp b/src/server/worldserver/Master.cpp old mode 100755 new mode 100644 diff --git a/src/server/worldserver/Master.h b/src/server/worldserver/Master.h old mode 100755 new mode 100644 diff --git a/src/server/worldserver/RemoteAccess/RASocket.cpp b/src/server/worldserver/RemoteAccess/RASocket.cpp old mode 100755 new mode 100644 diff --git a/src/server/worldserver/RemoteAccess/RASocket.h b/src/server/worldserver/RemoteAccess/RASocket.h old mode 100755 new mode 100644 diff --git a/src/server/worldserver/TCSoap/TCSoap.cpp b/src/server/worldserver/TCSoap/TCSoap.cpp old mode 100755 new mode 100644 diff --git a/src/server/worldserver/TCSoap/TCSoap.h b/src/server/worldserver/TCSoap/TCSoap.h old mode 100755 new mode 100644 diff --git a/src/server/worldserver/WorldThread/WorldRunnable.cpp b/src/server/worldserver/WorldThread/WorldRunnable.cpp old mode 100755 new mode 100644 diff --git a/src/server/worldserver/WorldThread/WorldRunnable.h b/src/server/worldserver/WorldThread/WorldRunnable.h old mode 100755 new mode 100644 diff --git a/src/server/worldserver/worldserver.rc b/src/server/worldserver/worldserver.rc old mode 100755 new mode 100644 diff --git a/src/tools/vmap4_extractor/adtfile.h b/src/tools/vmap4_extractor/adtfile.h index 795eebc892f..0aefdff4bf8 100644 --- a/src/tools/vmap4_extractor/adtfile.h +++ b/src/tools/vmap4_extractor/adtfile.h @@ -109,6 +109,11 @@ struct MapChunkHeader class ADTFile { +private: + //size_t mcnk_offsets[256], mcnk_sizes[256]; + MPQFile ADT; + //mcell Mcell; + string Adtfilename; public: ADTFile(char* filename); ~ADTFile(); @@ -126,11 +131,6 @@ public: return Mcell; } */ -private: - //size_t mcnk_offsets[256], mcnk_sizes[256]; - MPQFile ADT; - //mcell Mcell; - string Adtfilename; }; const char * GetPlainName(const char * FileName); diff --git a/src/tools/vmap4_extractor/model.h b/src/tools/vmap4_extractor/model.h index acd31d58ec9..a45da99d762 100644 --- a/src/tools/vmap4_extractor/model.h +++ b/src/tools/vmap4_extractor/model.h @@ -29,6 +29,15 @@ Vec3D fixCoordSystem(Vec3D v); class Model { +private: + void _unload() + { + delete[] vertices; + delete[] indices; + vertices = NULL; + indices = NULL; + } + std::string filename; public: ModelHeader header; Vec3D* vertices; @@ -39,17 +48,6 @@ public: Model(std::string& filename); ~Model() { _unload(); } - -private: - void _unload() - { - delete[] vertices; - delete[] indices; - vertices = NULL; - indices = NULL; - } - - std::string filename; }; class ModelInstance @@ -62,7 +60,7 @@ public: unsigned int d1, scale; float w, sc; - ModelInstance() : model(NULL), d1(0), scale(0), w(0.0f), sc(0.0f), id(0) {} + ModelInstance() : model(NULL), id(0), d1(0), scale(0), w(0.0f), sc(0.0f) {} ModelInstance(MPQFile& f, char const* ModelInstName, uint32 mapID, uint32 tileX, uint32 tileY, FILE* pDirfile); }; diff --git a/src/tools/vmap4_extractor/wdtfile.cpp b/src/tools/vmap4_extractor/wdtfile.cpp index 9e208dac8dc..c1af5b5788d 100644 --- a/src/tools/vmap4_extractor/wdtfile.cpp +++ b/src/tools/vmap4_extractor/wdtfile.cpp @@ -37,7 +37,7 @@ WDTFile::WDTFile(char* file_name, char* file_name1):WDT(WorldMpq, file_name) filename.append(file_name1,strlen(file_name1)); } -bool WDTFile::init(char *map_id, unsigned int mapID) +bool WDTFile::init(char */*map_id*/, unsigned int mapID) { if (WDT.isEof()) { diff --git a/src/tools/vmap4_extractor/wdtfile.h b/src/tools/vmap4_extractor/wdtfile.h index b085965343a..31303d62928 100644 --- a/src/tools/vmap4_extractor/wdtfile.h +++ b/src/tools/vmap4_extractor/wdtfile.h @@ -10,6 +10,9 @@ class ADTFile; class WDTFile { +private: + MPQFile WDT; + string filename; public: WDTFile(char* file_name, char* file_name1); ~WDTFile(void); @@ -19,10 +22,6 @@ public: int gnWMO; ADTFile* GetMap(int x, int z); - -private: - MPQFile WDT; - string filename; }; #endif diff --git a/src/tools/vmap4_extractor/wmo.h b/src/tools/vmap4_extractor/wmo.h index 02e4be4aa79..16d55ffe7de 100644 --- a/src/tools/vmap4_extractor/wmo.h +++ b/src/tools/vmap4_extractor/wmo.h @@ -44,9 +44,11 @@ static inline Vec3D fixCoords(const Vec3D &v){ return Vec3D(v.z, v.x, v.y); } class WMORoot { +private: + std::string filename; public: - uint32 nTextures, nGroups, nP, nLights, nModels, nDoodads, nDoodadSets, RootWMOID, liquidType; unsigned int col; + uint32 nTextures, nGroups, nP, nLights, nModels, nDoodads, nDoodadSets, RootWMOID, liquidType; float bbcorn1[3]; float bbcorn2[3]; @@ -55,8 +57,6 @@ public: bool open(); bool ConvertToVMAPRootWmo(FILE* output); -private: - std::string filename; }; struct WMOLiquidHeader @@ -77,9 +77,22 @@ struct WMOLiquidVert class WMOGroup { +private: + std::string filename; public: // MOGP - int groupName, descGroupName, mogpFlags; + + char* MOPY; + uint16* MOVI; + uint16* MoviEx; + float* MOVT; + uint16* MOBA; + int* MobaEx; + WMOLiquidHeader* hlq; + WMOLiquidVert* LiquEx; + char* LiquBytes; + int groupName, descGroupName; + int mogpFlags; float bbcorn1[3]; float bbcorn2[3]; uint16 moprIdx; @@ -92,15 +105,6 @@ public: int LiquEx_size; unsigned int nVertices; // number when loaded int nTriangles; // number when loaded - char* MOPY; - uint16* MOVI; - uint16* MoviEx; - float* MOVT; - uint16* MOBA; - int* MobaEx; - WMOLiquidHeader* hlq; - WMOLiquidVert* LiquEx; - char* LiquBytes; uint32 liquflags; WMOGroup(std::string const& filename); @@ -108,9 +112,6 @@ public: bool open(); int ConvertToVMAPGroupWmo(FILE* output, WMORoot* rootWMO, bool preciseVectorData); - -private: - std::string filename; }; class WMOInstance @@ -121,10 +122,10 @@ public: int currx; int curry; WMOGroup* wmo; + int doodadset; Vec3D pos; Vec3D pos2, pos3, rot; uint32 indx, id, d2, d3; - int doodadset; WMOInstance(MPQFile&f , char const* WmoInstName, uint32 mapID, uint32 tileX, uint32 tileY, FILE* pDirfile);