diff options
393 files changed, 3968 insertions, 1677 deletions
diff --git a/.gitignore b/.gitignore index ace64225d0c..7dbed8f3ea2 100644 --- a/.gitignore +++ b/.gitignore @@ -7,10 +7,12 @@ build*/ *~ .hg/ *.kdev* +.DS_Store +CMakeLists.txt.user *.bak *.patch *.diff *.REMOTE.* *.BACKUP.* *.BASE.* -*.LOCAL.*
\ No newline at end of file +*.LOCAL.* diff --git a/cmake/compiler/clang/settings.cmake b/cmake/compiler/clang/settings.cmake new file mode 100644 index 00000000000..add9fa8694d --- /dev/null +++ b/cmake/compiler/clang/settings.cmake @@ -0,0 +1,15 @@ +# Set build-directive (used in core to tell which buildtype we used) +add_definitions(-D_BUILD_DIRECTIVE='"$(CONFIGURATION)"') + +if(WITH_WARNINGS) + set(WARNING_FLAGS "-W -Wall -Wextra -Wwrite-strings -Winit-self -Woverloaded-virtual -Wfatal-errors") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WARNING_FLAGS}") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WARNING_FLAGS}") + message(STATUS "Clang: All warnings enabled") +endif() + +if(WITH_COREDEBUG) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g3") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g3") + message(STATUS "Clang: Debug-flags set (-g3)") +endif() diff --git a/cmake/compiler/gcc/settings.cmake b/cmake/compiler/gcc/settings.cmake index 8247831fdd8..d74fc39031b 100644 --- a/cmake/compiler/gcc/settings.cmake +++ b/cmake/compiler/gcc/settings.cmake @@ -1,24 +1,24 @@ # Set build-directive (used in core to tell which buildtype we used) add_definitions(-D_BUILD_DIRECTIVE='"${CMAKE_BUILD_TYPE}"') -add_definitions(-fno-delete-null-pointer-checks) - if(PLATFORM EQUAL 32) # Required on 32-bit systems to enable SSE2 (standard on x64) - add_definitions(-msse2 -mfpmath=sse) + set(SSE_FLAGS "-msse2 -mfpmath=sse") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${SSE_FLAGS}") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SSE_FLAGS}") endif() add_definitions(-DHAVE_SSE2 -D__SSE2__) -message(STATUS "GCC: SSE2 flags forced") +message(STATUS "GCC: SFMT enabled, SSE2 flags forced") if( WITH_WARNINGS ) - add_definitions(-Wall -Wfatal-errors -Wextra) + set(WARNING_FLAGS "-W -Wall -Wextra -Wwrite-strings -Winit-self -Woverloaded-virtual -Winvalid-pch -Wfatal-errors") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WARNING_FLAGS}") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WARNING_FLAGS}") message(STATUS "GCC: All warnings enabled") -else() - add_definitions(--no-warnings) - message(STATUS "GCC: All warnings disabled") endif() if( WITH_COREDEBUG ) - add_definitions(-ggdb3) - message(STATUS "GCC: Debug-flags set (-ggdb3)") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g3") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g3") + message(STATUS "GCC: Debug-flags set (-g3)") endif() diff --git a/cmake/compiler/xcode/settings.cmake b/cmake/compiler/xcode/settings.cmake deleted file mode 100644 index b2f73e71310..00000000000 --- a/cmake/compiler/xcode/settings.cmake +++ /dev/null @@ -1,2 +0,0 @@ -# Set build-directive (used in core to tell which buildtype we used) -add_definitions(-D_BUILD_DIRECTIVE='"$(CONFIGURATION)"') diff --git a/cmake/macros/FindPCHSupport.cmake b/cmake/macros/FindPCHSupport.cmake index 39a96b6cadb..a93182cd8f6 100644 --- a/cmake/macros/FindPCHSupport.cmake +++ b/cmake/macros/FindPCHSupport.cmake @@ -1,315 +1,104 @@ -# - Try to find precompiled headers support for GCC 3.4 and 4.x (and MSVC) -# Once done this will define: -# -# Variable: -# PCHSupport_FOUND -# -# Macro: -# ADD_PRECOMPILED_HEADER _targetName _input _dowarn -# ADD_PRECOMPILED_HEADER_TO_TARGET _targetName _input _pch_output_to_use _dowarn -# ADD_NATIVE_PRECOMPILED_HEADER _targetName _input _dowarn -# GET_NATIVE_PRECOMPILED_HEADER _targetName _input +FUNCTION(GET_COMMON_PCH_PARAMS PCH_HEADER PCH_FE INCLUDE_PREFIX) + GET_FILENAME_COMPONENT(PCH_HEADER_N ${PCH_HEADER} NAME) + GET_DIRECTORY_PROPERTY(TARGET_INCLUDES INCLUDE_DIRECTORIES) + + FOREACH(ITEM ${TARGET_INCLUDES}) + LIST(APPEND INCLUDE_FLAGS_LIST "${INCLUDE_PREFIX}${ITEM} ") + ENDFOREACH(ITEM) + + SET(PCH_HEADER_NAME ${PCH_HEADER_N} PARENT_SCOPE) + SET(PCH_HEADER_OUT ${CMAKE_CURRENT_BINARY_DIR}/${PCH_HEADER_N}.${PCH_FE} PARENT_SCOPE) + SET(INCLUDE_FLAGS ${INCLUDE_FLAGS_LIST} PARENT_SCOPE) +ENDFUNCTION(GET_COMMON_PCH_PARAMS) + +FUNCTION(GENERATE_CXX_PCH_COMMAND TARGET_NAME INCLUDE_FLAGS IN PCH_SRC OUT) + IF (CMAKE_BUILD_TYPE) + STRING(TOUPPER _${CMAKE_BUILD_TYPE} CURRENT_BUILD_TYPE) + ENDIF () + + SET(COMPILE_FLAGS ${CMAKE_CXX_FLAGS${CURRENT_BUILD_TYPE}}) + LIST(APPEND COMPILE_FLAGS ${CMAKE_CXX_FLAGS}) + + IF ("${CMAKE_SYSTEM_NAME}" MATCHES "Darwin") + IF (NOT "${CMAKE_OSX_ARCHITECTURES}" STREQUAL "") + LIST(APPEND COMPILE_FLAGS "-arch ${CMAKE_OSX_ARCHITECTURES}") + ENDIF () + IF (NOT "${CMAKE_OSX_SYSROOT}" STREQUAL "") + LIST(APPEND COMPILE_FLAGS "-isysroot ${CMAKE_OSX_SYSROOT}") + ENDIF () + IF (NOT "${CMAKE_OSX_DEPLOYMENT_TARGET}" STREQUAL "") + LIST(APPEND COMPILE_FLAGS "-mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET}") + ENDIF () + ENDIF () + + GET_DIRECTORY_PROPERTY(TARGET_DEFINITIONS COMPILE_DEFINITIONS) + FOREACH(ITEM ${TARGET_DEFINITIONS}) + LIST(APPEND DEFINITION_FLAGS "-D${ITEM} ") + ENDFOREACH(ITEM) + + SEPARATE_ARGUMENTS(COMPILE_FLAGS) + SEPARATE_ARGUMENTS(INCLUDE_FLAGS) + SEPARATE_ARGUMENTS(DEFINITION_FLAGS) + + GET_FILENAME_COMPONENT(PCH_SRC_N ${PCH_SRC} NAME) + ADD_LIBRARY(${PCH_SRC_N}_dephelp MODULE ${PCH_SRC}) -IF(CMAKE_COMPILER_IS_GNUCXX) - - EXEC_PROGRAM( - ${CMAKE_CXX_COMPILER} - ARGS ${CMAKE_CXX_COMPILER_ARG1} -dumpversion - OUTPUT_VARIABLE gcc_compiler_version - ) - #MESSAGE("GCC Version: ${gcc_compiler_version}") - IF(gcc_compiler_version MATCHES "4\\.[0-9]\\.[0-9]") - SET(PCHSupport_FOUND TRUE) - ELSE(gcc_compiler_version MATCHES "4\\.[0-9]\\.[0-9]") - IF(gcc_compiler_version MATCHES "3\\.4\\.[0-9]") - SET(PCHSupport_FOUND TRUE) - ENDIF(gcc_compiler_version MATCHES "3\\.4\\.[0-9]") - ENDIF(gcc_compiler_version MATCHES "4\\.[0-9]\\.[0-9]") - - SET(_PCH_include_prefix "-I") - -ELSE(CMAKE_COMPILER_IS_GNUCXX) - - IF(WIN32) - SET(PCHSupport_FOUND TRUE) # for experimental msvc support - SET(_PCH_include_prefix "/I") - ELSE(WIN32) - SET(PCHSupport_FOUND FALSE) - ENDIF(WIN32) - -ENDIF(CMAKE_COMPILER_IS_GNUCXX) - -MACRO(_PCH_GET_COMPILE_FLAGS _out_compile_flags) - - STRING(TOUPPER "CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE}" _flags_var_name) - SET(${_out_compile_flags} ${${_flags_var_name}} ) - - IF(CMAKE_COMPILER_IS_GNUCXX) - GET_TARGET_PROPERTY(_targetType ${_PCH_current_target} TYPE) - IF(${_targetType} STREQUAL SHARED_LIBRARY AND NOT WIN32) - LIST(APPEND ${_out_compile_flags} -fPIC) - ENDIF() - - ELSE(CMAKE_COMPILER_IS_GNUCXX) - ## TODO ... ? or does it work out of the box - ENDIF(CMAKE_COMPILER_IS_GNUCXX) - - GET_DIRECTORY_PROPERTY(DIRINC INCLUDE_DIRECTORIES ) - FOREACH(item ${DIRINC}) - LIST(APPEND ${_out_compile_flags} "${_PCH_include_prefix}${item}") - ENDFOREACH(item) - - GET_DIRECTORY_PROPERTY(_directory_flags DEFINITIONS) - GET_DIRECTORY_PROPERTY(_global_definitions DIRECTORY ${CMAKE_SOURCE_DIR} DEFINITIONS) - #MESSAGE("_directory_flags ${_directory_flags} ${_global_definitions}" ) - LIST(APPEND ${_out_compile_flags} ${_directory_flags}) - LIST(APPEND ${_out_compile_flags} ${_global_definitions}) - LIST(APPEND ${_out_compile_flags} ${CMAKE_CXX_FLAGS} ) - - SEPARATE_ARGUMENTS(${_out_compile_flags}) - -ENDMACRO(_PCH_GET_COMPILE_FLAGS) - -MACRO(_PCH_WRITE_PCHDEP_CXX _targetName _include_file _dephelp) - - SET(${_dephelp} ${CMAKE_CURRENT_BINARY_DIR}/${_targetName}_pch_dephelp.cxx) - FILE(WRITE ${${_dephelp}} -"#include \"${_include_file}\" -int testfunction() -{ - return 0; -} -" + ADD_CUSTOM_COMMAND( + OUTPUT ${OUT} + COMMAND ${CMAKE_CXX_COMPILER} + ARGS ${DEFINITION_FLAGS} ${COMPILE_FLAGS} ${INCLUDE_FLAGS} -x c++-header ${IN} -o ${OUT} + DEPENDS ${IN} ${PCH_SRC_N}_dephelp + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} ) -ENDMACRO(_PCH_WRITE_PCHDEP_CXX ) - -MACRO(_PCH_GET_COMPILE_COMMAND out_command _input _output) - - FILE(TO_NATIVE_PATH ${_input} _native_input) - FILE(TO_NATIVE_PATH ${_output} _native_output) - - - IF(CMAKE_COMPILER_IS_GNUCXX) - IF(CMAKE_CXX_COMPILER_ARG1) - # remove leading space in compiler argument - STRING(REGEX REPLACE "^ +" "" pchsupport_compiler_cxx_arg1 ${CMAKE_CXX_COMPILER_ARG1}) - - SET(${out_command} - ${CMAKE_CXX_COMPILER} ${pchsupport_compiler_cxx_arg1} ${_compile_FLAGS} -x c++-header -o ${_output} ${_input} - ) - ELSE(CMAKE_CXX_COMPILER_ARG1) - SET(${out_command} - ${CMAKE_CXX_COMPILER} ${_compile_FLAGS} -x c++-header -o ${_output} ${_input} - ) - ENDIF(CMAKE_CXX_COMPILER_ARG1) - ELSE(CMAKE_COMPILER_IS_GNUCXX) - - SET(_dummy_str "#include <${_input}>") - FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/pch_dummy.cpp ${_dummy_str}) - - SET(${out_command} - ${CMAKE_CXX_COMPILER} ${_compile_FLAGS} /c /Fp${_native_output} /Yc${_native_input} pch_dummy.cpp - ) - #/out:${_output} - - ENDIF(CMAKE_COMPILER_IS_GNUCXX) - -ENDMACRO(_PCH_GET_COMPILE_COMMAND ) - - - -MACRO(_PCH_GET_TARGET_COMPILE_FLAGS _cflags _header_name _pch_path _dowarn ) - - FILE(TO_NATIVE_PATH ${_pch_path} _native_pch_path) - - IF(CMAKE_COMPILER_IS_GNUCXX) - # for use with distcc and gcc >4.0.1 if preprocessed files are accessible - # on all remote machines set - # PCH_ADDITIONAL_COMPILER_FLAGS to -fpch-preprocess - # if you want warnings for invalid header files (which is very inconvenient - # if you have different versions of the headers for different build types - # you may set _pch_dowarn - IF (_dowarn) - SET(${_cflags} "${PCH_ADDITIONAL_COMPILER_FLAGS} -include ${CMAKE_CURRENT_BINARY_DIR}/${_header_name} -Winvalid-pch " ) - ELSE (_dowarn) - SET(${_cflags} "${PCH_ADDITIONAL_COMPILER_FLAGS} -include ${CMAKE_CURRENT_BINARY_DIR}/${_header_name} " ) - ENDIF (_dowarn) - ELSE(CMAKE_COMPILER_IS_GNUCXX) - - set(${_cflags} "/Fp${_native_pch_path} /Yu${_header_name}" ) - - ENDIF(CMAKE_COMPILER_IS_GNUCXX) - -ENDMACRO(_PCH_GET_TARGET_COMPILE_FLAGS ) - -MACRO(GET_PRECOMPILED_HEADER_OUTPUT _targetName _input _output) - GET_FILENAME_COMPONENT(_name ${_input} NAME) - GET_FILENAME_COMPONENT(_path ${_input} PATH) - SET(_output "${CMAKE_CURRENT_BINARY_DIR}/${_name}.gch/${_targetName}_${CMAKE_BUILD_TYPE}.gch") -ENDMACRO(GET_PRECOMPILED_HEADER_OUTPUT _targetName _input) - - -MACRO(ADD_PRECOMPILED_HEADER_TO_TARGET _targetName _input _pch_output_to_use ) - - # to do: test whether compiler flags match between target _targetName - # and _pch_output_to_use - GET_FILENAME_COMPONENT(_name ${_input} NAME) - - IF( "${ARGN}" STREQUAL "0") - SET(_dowarn 0) - ELSE( "${ARGN}" STREQUAL "0") - SET(_dowarn 1) - ENDIF("${ARGN}" STREQUAL "0") + ADD_CUSTOM_TARGET(generate_${PCH_SRC_N} + DEPENDS ${OUT} + ) + ADD_DEPENDENCIES(${TARGET_NAME} generate_${PCH_SRC_N}) +ENDFUNCTION(GENERATE_CXX_PCH_COMMAND) - _PCH_GET_TARGET_COMPILE_FLAGS(_target_cflags ${_name} ${_pch_output_to_use} ${_dowarn}) - # MESSAGE("Add flags ${_target_cflags} to ${_targetName} " ) - SET_TARGET_PROPERTIES(${_targetName} - PROPERTIES - COMPILE_FLAGS ${_target_cflags} +FUNCTION(ADD_CXX_PCH_GCC TARGET_NAME PCH_HEADER PCH_SOURCE) + GET_COMMON_PCH_PARAMS(${PCH_HEADER} "gch" "-I") + GENERATE_CXX_PCH_COMMAND(${TARGET_NAME} "${INCLUDE_FLAGS}" ${PCH_HEADER} ${PCH_SOURCE} ${PCH_HEADER_OUT}) + SET_TARGET_PROPERTIES( + ${TARGET_NAME} PROPERTIES + COMPILE_FLAGS "-include ${CMAKE_CURRENT_BINARY_DIR}/${PCH_HEADER_NAME}" ) - - ADD_CUSTOM_TARGET(pch_Generate_${_targetName} - DEPENDS ${_pch_output_to_use} +ENDFUNCTION(ADD_CXX_PCH_GCC) + +FUNCTION(ADD_CXX_PCH_CLANG TARGET_NAME PCH_HEADER PCH_SOURCE) + GET_COMMON_PCH_PARAMS(${PCH_HEADER} "pch" "-I") + GENERATE_CXX_PCH_COMMAND(${TARGET_NAME} "${INCLUDE_FLAGS}" ${PCH_HEADER} ${PCH_SOURCE} ${PCH_HEADER_OUT}) + SET_TARGET_PROPERTIES( + ${TARGET_NAME} PROPERTIES + COMPILE_FLAGS "-include-pch ${PCH_HEADER_OUT}" ) +ENDFUNCTION(ADD_CXX_PCH_CLANG) - ADD_DEPENDENCIES(${_targetName} pch_Generate_${_targetName} ) - -ENDMACRO(ADD_PRECOMPILED_HEADER_TO_TARGET) - -MACRO(ADD_PRECOMPILED_HEADER _targetName _input) - - SET(_PCH_current_target ${_targetName}) - - IF(NOT CMAKE_BUILD_TYPE) - MESSAGE(FATAL_ERROR - "This is the ADD_PRECOMPILED_HEADER macro. " - "You must set CMAKE_BUILD_TYPE!" - ) - ENDIF(NOT CMAKE_BUILD_TYPE) - - IF( "${ARGN}" STREQUAL "0") - SET(_dowarn 0) - ELSE( "${ARGN}" STREQUAL "0") - SET(_dowarn 1) - ENDIF("${ARGN}" STREQUAL "0") - - GET_FILENAME_COMPONENT(_name ${_input} NAME) - GET_FILENAME_COMPONENT(_path ${_input} PATH) - GET_PRECOMPILED_HEADER_OUTPUT( ${_targetName} ${_input} _output) - - GET_FILENAME_COMPONENT(_outdir ${_output} PATH ) - - GET_TARGET_PROPERTY(_targetType ${_PCH_current_target} TYPE) - _PCH_WRITE_PCHDEP_CXX(${_targetName} ${_input} _pch_dephelp_cxx) - - IF(${_targetType} STREQUAL SHARED_LIBRARY) - ADD_LIBRARY(${_targetName}_pch_dephelp STATIC ${_pch_dephelp_cxx} ) - ELSE(${_targetType} STREQUAL SHARED_LIBRARY) - ADD_LIBRARY(${_targetName}_pch_dephelp STATIC ${_pch_dephelp_cxx}) - ENDIF(${_targetType} STREQUAL SHARED_LIBRARY) - - FILE(MAKE_DIRECTORY ${_outdir}) - - _PCH_GET_COMPILE_FLAGS(_compile_FLAGS) - - #MESSAGE("_compile_FLAGS: ${_compile_FLAGS}") - #message("COMMAND ${CMAKE_CXX_COMPILER} ${_compile_FLAGS} -x c++-header -o ${_output} ${_input}") - SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_BINARY_DIR}/${_name} PROPERTIES GENERATED 1) - ADD_CUSTOM_COMMAND( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_name} - COMMAND ${CMAKE_COMMAND} -E copy ${_input} ${CMAKE_CURRENT_BINARY_DIR}/${_name} # ensure same directory! Required by gcc - DEPENDS ${_input} +FUNCTION(ADD_CXX_PCH_MSVC TARGET_NAME PCH_HEADER PCH_SOURCE) + GET_COMMON_PCH_PARAMS(${PCH_HEADER} "pch" "/I") + SET_TARGET_PROPERTIES( + ${TARGET_NAME} PROPERTIES + COMPILE_FLAGS "/FI${PCH_HEADER_NAME} /Yu${PCH_HEADER_NAME}" ) - - #message("_command ${_input} ${_output}") - _PCH_GET_COMPILE_COMMAND(_command ${CMAKE_CURRENT_BINARY_DIR}/${_name} ${_output} ) - - #message(${_input} ) - #message("_output ${_output}") - - ADD_CUSTOM_COMMAND( - OUTPUT ${_output} - COMMAND ${_command} - DEPENDS ${_input} ${CMAKE_CURRENT_BINARY_DIR}/${_name} ${_targetName}_pch_dephelp + SET_SOURCE_FILES_PROPERTIES( + ${PCH_SOURCE} PROPERTIES + COMPILE_FLAGS "/Yc${PCH_HEADER_NAME}" ) - - ADD_PRECOMPILED_HEADER_TO_TARGET(${_targetName} ${_input} ${_output} ${_dowarn}) -ENDMACRO(ADD_PRECOMPILED_HEADER) - -# Generates the use of precompiled in a target, -# without using depency targets (2 extra for each target) -# Using Visual, must also add ${_targetName}_pch to sources -# Not needed by Xcode - -MACRO(GET_NATIVE_PRECOMPILED_HEADER _targetName _input) - - if(CMAKE_GENERATOR MATCHES Visual*) - - SET(_dummy_str "#include \"${_input}\"\n" - "// This is required to suppress LNK4221. Very annoying.\n" - "void *g_${_targetName}Dummy = 0\;\n") - - # Use of cxx extension for generated files (as Qt does) - SET(${_targetName}_pch ${CMAKE_CURRENT_BINARY_DIR}/${_targetName}_pch.cxx) - if(EXISTS ${${_targetName}_pch}) - # Check if contents is the same, if not rewrite - # todo - else(EXISTS ${${_targetName}_pch}) - FILE(WRITE ${${_targetName}_pch} ${_dummy_str}) - endif(EXISTS ${${_targetName}_pch}) - endif(CMAKE_GENERATOR MATCHES Visual*) - -ENDMACRO(GET_NATIVE_PRECOMPILED_HEADER) - -MACRO(ADD_NATIVE_PRECOMPILED_HEADER _targetName _input) - - IF( "${ARGN}" STREQUAL "0") - SET(_dowarn 0) - ELSE( "${ARGN}" STREQUAL "0") - SET(_dowarn 1) - ENDIF("${ARGN}" STREQUAL "0") - - if(CMAKE_GENERATOR MATCHES Visual*) - # Auto include the precompile (useful for moc processing, since the use of - # precompiled is specified at the target level - # and I don't want to specifiy /F- for each moc/res/ui generated files (using Qt) - - GET_TARGET_PROPERTY(oldProps ${_targetName} COMPILE_FLAGS) - if (${oldProps} MATCHES NOTFOUND) - SET(oldProps "") - endif(${oldProps} MATCHES NOTFOUND) - - SET(newProperties "${oldProps} /Yu\"${_input}.h\" /FI\"${_input}.h\"") - SET_TARGET_PROPERTIES(${_targetName} PROPERTIES COMPILE_FLAGS "${newProperties}") - - #also inlude ${oldProps} to have the same compile options - SET_SOURCE_FILES_PROPERTIES(${_input}.cpp PROPERTIES COMPILE_FLAGS "${oldProps} /Yc\"${_input}.h\"") - - else(CMAKE_GENERATOR MATCHES Visual*) - - if (CMAKE_GENERATOR MATCHES Xcode) - # For Xcode, cmake needs my patch to process - # GCC_PREFIX_HEADER and GCC_PRECOMPILE_PREFIX_HEADER as target properties - - GET_TARGET_PROPERTY(oldProps ${_targetName} COMPILE_FLAGS) - if (${oldProps} MATCHES NOTFOUND) - SET(oldProps "") - endif(${oldProps} MATCHES NOTFOUND) - - # When buiding out of the tree, precompiled may not be located - # Use full path instead. - GET_FILENAME_COMPONENT(fullPath ${_input} ABSOLUTE) - - SET_TARGET_PROPERTIES(${_targetName} PROPERTIES XCODE_ATTRIBUTE_GCC_PREFIX_HEADER "${fullPath}") - SET_TARGET_PROPERTIES(${_targetName} PROPERTIES XCODE_ATTRIBUTE_GCC_PRECOMPILE_PREFIX_HEADER "YES") - - else (CMAKE_GENERATOR MATCHES Xcode) - - #Fallback to the "old" precompiled suppport - #ADD_PRECOMPILED_HEADER(${_targetName} ${_input} ${_dowarn}) - endif(CMAKE_GENERATOR MATCHES Xcode) - endif(CMAKE_GENERATOR MATCHES Visual*) - -ENDMACRO(ADD_NATIVE_PRECOMPILED_HEADER) +ENDFUNCTION(ADD_CXX_PCH_MSVC) + +FUNCTION(ADD_CXX_PCH TARGET_NAME PCH_HEADER PCH_SOURCE) + IF (MSVC) + ADD_CXX_PCH_MSVC(${TARGET_NAME} ${PCH_HEADER} ${PCH_SOURCE}) + ELSEIF ("${CMAKE_GENERATOR}" MATCHES "Xcode") + SET_TARGET_PROPERTIES(${TARGET_NAME} PROPERTIES + XCODE_ATTRIBUTE_GCC_PRECOMPILE_PREFIX_HEADER YES + XCODE_ATTRIBUTE_GCC_PREFIX_HEADER "${CMAKE_CURRENT_SOURCE_DIR}/${PCH_HEADER}" + ) + ELSEIF ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") + ADD_CXX_PCH_CLANG(${TARGET_NAME} ${PCH_HEADER} ${PCH_SOURCE}) + ELSEIF ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") + ADD_CXX_PCH_GCC(${TARGET_NAME} ${PCH_HEADER} ${PCH_SOURCE}) + ENDIF () +ENDFUNCTION(ADD_CXX_PCH) diff --git a/cmake/platform/osx/settings.cmake b/cmake/platform/osx/settings.cmake index f623ecf8c27..3d232c5a1f0 100644 --- a/cmake/platform/osx/settings.cmake +++ b/cmake/platform/osx/settings.cmake @@ -1,6 +1,4 @@ set(MACOSX 1) -set(OSX_LIBS /usr/lib/libcrypto.dylib) -add_definitions(-D__ASSERTMACROS__) # set default configuration directory if( NOT CONF_DIR ) @@ -28,4 +26,8 @@ add_custom_target(uninstall ) message(STATUS "OSX: Created uninstall target") -include(${CMAKE_SOURCE_DIR}/cmake/compiler/xcode/settings.cmake) +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 dd8b7c081f3..c79cfc4ed4f 100644 --- a/cmake/platform/unix/settings.cmake +++ b/cmake/platform/unix/settings.cmake @@ -2,6 +2,7 @@ if(CMAKE_SYSTEM_NAME MATCHES "Linux") if (NOT NOJEM) set(JEMALLOC_LIBRARY "jemalloc") + message(STATUS "UNIX: Using jemalloc") endif() endif() diff --git a/dep/acelite/6.1.4_tc_changes.diff b/dep/acelite/6.1.4_tc_changes.diff index a0caff7ab7d..6f1a5c2f3bf 100644 --- a/dep/acelite/6.1.4_tc_changes.diff +++ b/dep/acelite/6.1.4_tc_changes.diff @@ -3,7 +3,7 @@ new file mode 100644 index 0000000..acd3d5a --- /dev/null +++ b/dep/acelite/ace/CMakeLists.txt -@@ -0,0 +1,337 @@ +@@ -0,0 +1,348 @@ +# Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> +# +# This file is free software; as a special exception the author gives @@ -325,6 +325,11 @@ index 0000000..acd3d5a + XTI_ATM_Mcast.cpp +) + ++if (USE_COREPCH) ++ set(ace_PCH_HDR PrecompiledHeaders/WinAcePCH.h) ++ set(ace_PCH_SRC PrecompiledHeaders/WinAcePCH.cpp) ++endif() ++ +include_directories( + ${CMAKE_SOURCE_DIR}/dep/acelite + ${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders @@ -336,9 +341,15 @@ index 0000000..acd3d5a + +add_definitions(-DACE_BUILD_DLL) + -+add_library(ace SHARED ${ace_STAT_SRCS}) ++add_library(ace SHARED ++ ${ace_STAT_SRCS} ++ ${ace_PCH_SRC} ++) + -+add_native_precompiled_header(ace ${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders/WinAcePCH) ++# Generate precompiled header ++if( USE_COREPCH ) ++ add_cxx_pch(ace ${ace_PCH_HDR} ${ace_PCH_SRC}) ++endif() + +install(TARGETS ace RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}") diff --git a/dep/acelite/ace/PrecompiledHeaders/WinAcePCH.cpp b/dep/acelite/ace/PrecompiledHeaders/WinAcePCH.cpp diff --git a/dep/acelite/ace/CMakeLists.txt b/dep/acelite/ace/CMakeLists.txt index a0a590e0c30..f22bc381202 100644 --- a/dep/acelite/ace/CMakeLists.txt +++ b/dep/acelite/ace/CMakeLists.txt @@ -320,6 +320,11 @@ set(ace_STAT_SRCS XTI_ATM_Mcast.cpp ) +if (USE_COREPCH) + set(ace_PCH_HDR PrecompiledHeaders/WinAcePCH.h) + set(ace_PCH_SRC PrecompiledHeaders/WinAcePCH.cpp) +endif() + include_directories( ${CMAKE_SOURCE_DIR}/dep/acelite ${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders @@ -331,8 +336,14 @@ set_source_files_properties(Atomic_Op_Sparc.c Rtems_init.c PROPERTIES LANGUAGE C add_definitions(-DACE_BUILD_DLL) -add_library(ace SHARED ${ace_STAT_SRCS}) +add_library(ace SHARED + ${ace_STAT_SRCS} + ${ace_PCH_SRC} +) -add_native_precompiled_header(ace ${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders/WinAcePCH) +# Generate precompiled header +if( USE_COREPCH ) + add_cxx_pch(ace ${ace_PCH_HDR} ${ace_PCH_SRC}) +endif() install(TARGETS ace RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}") diff --git a/dep/g3dlite/G3D-v8.0_extra.diff b/dep/g3dlite/G3D-v8.0_extra.diff index d556103c96d..62c513435b9 100644 --- a/dep/g3dlite/G3D-v8.0_extra.diff +++ b/dep/g3dlite/G3D-v8.0_extra.diff @@ -10,3 +10,16 @@ index 3469b81..9fe098d 100644 #endif +diff --git a/dep/g3dlite/include/G3D/platform.h b/dep/g3dlite/include/G3D/platform.h +index c8d2f0b..11093f4 100644 +--- a/dep/g3dlite/include/G3D/platform.h ++++ b/dep/g3dlite/include/G3D/platform.h +@@ -57,7 +57,7 @@ + #elif defined(__linux__) + #define G3D_LINUX + #elif defined(__APPLE__) +- #define G3D_OSX ++ #define G3D_LINUX + + // Prevent OS X fp.h header from being included; it defines + // pi as a constant, which creates a conflict with G3D diff --git a/dep/g3dlite/include/G3D/platform.h b/dep/g3dlite/include/G3D/platform.h index c8d2f0b6534..11093f4a6ce 100644 --- a/dep/g3dlite/include/G3D/platform.h +++ b/dep/g3dlite/include/G3D/platform.h @@ -57,7 +57,7 @@ #elif defined(__linux__) #define G3D_LINUX #elif defined(__APPLE__) - #define G3D_OSX + #define G3D_LINUX // Prevent OS X fp.h header from being included; it defines // pi as a constant, which creates a conflict with G3D diff --git a/sql/base/characters_database.sql b/sql/base/characters_database.sql index 4a2d2951da3..5548630d2d6 100644 --- a/sql/base/characters_database.sql +++ b/sql/base/characters_database.sql @@ -1727,20 +1727,6 @@ CREATE TABLE `guild_member` ( `rank` tinyint(3) unsigned NOT NULL, `pnote` varchar(31) NOT NULL DEFAULT '', `offnote` varchar(31) NOT NULL DEFAULT '', - `BankResetTimeMoney` int(10) unsigned NOT NULL DEFAULT '0', - `BankRemMoney` int(10) unsigned NOT NULL DEFAULT '0', - `BankResetTimeTab0` int(10) unsigned NOT NULL DEFAULT '0', - `BankRemSlotsTab0` int(10) unsigned NOT NULL DEFAULT '0', - `BankResetTimeTab1` int(10) unsigned NOT NULL DEFAULT '0', - `BankRemSlotsTab1` int(10) unsigned NOT NULL DEFAULT '0', - `BankResetTimeTab2` int(10) unsigned NOT NULL DEFAULT '0', - `BankRemSlotsTab2` int(10) unsigned NOT NULL DEFAULT '0', - `BankResetTimeTab3` int(10) unsigned NOT NULL DEFAULT '0', - `BankRemSlotsTab3` int(10) unsigned NOT NULL DEFAULT '0', - `BankResetTimeTab4` int(10) unsigned NOT NULL DEFAULT '0', - `BankRemSlotsTab4` int(10) unsigned NOT NULL DEFAULT '0', - `BankResetTimeTab5` int(10) unsigned NOT NULL DEFAULT '0', - `BankRemSlotsTab5` int(10) unsigned NOT NULL DEFAULT '0', UNIQUE KEY `guid_key` (`guid`), KEY `guildid_key` (`guildid`), KEY `guildid_rank_key` (`guildid`,`rank`) @@ -1757,6 +1743,35 @@ LOCK TABLES `guild_member` WRITE; UNLOCK TABLES; -- +-- Table structure for table `guild_member_withdraw` +-- + +DROP TABLE IF EXISTS `guild_member_withdraw`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE IF NOT EXISTS `guild_member_withdraw` ( + `guid` int(10) unsigned NOT NULL, + `tab0` int(10) unsigned NOT NULL DEFAULT '0', + `tab1` int(10) unsigned NOT NULL DEFAULT '0', + `tab2` int(10) unsigned NOT NULL DEFAULT '0', + `tab3` int(10) unsigned NOT NULL DEFAULT '0', + `tab4` int(10) unsigned NOT NULL DEFAULT '0', + `tab5` int(10) unsigned NOT NULL DEFAULT '0', + `money` int(10) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`guid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Guild Member Daily Withdraws'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `guild_member_withdraw` +-- + +LOCK TABLES `guild_member_withdraw` WRITE; +/*!40000 ALTER TABLE `guild_member_withdraw` DISABLE KEYS */; +/*!40000 ALTER TABLE `guild_member_withdraw` ENABLE KEYS */; +UNLOCK TABLES; + +-- -- Table structure for table `guild_rank` -- diff --git a/sql/updates/characters/2012_11_02_00_character_misc.sql b/sql/updates/characters/2012_11_02_00_character_misc.sql index a7613944dc4..9cbbd423bb8 100644 --- a/sql/updates/characters/2012_11_02_00_character_misc.sql +++ b/sql/updates/characters/2012_11_02_00_character_misc.sql @@ -27,4 +27,3 @@ ALTER TABLE `guild_member` DROP COLUMN `BankResetTimeTab5`; DELETE FROM `worldstates` WHERE `entry`=20006; INSERT INTO `worldstates` (`entry`,`value`,`comment`) VALUES (20006,0, 'Guild daily reset'); - diff --git a/sql/updates/world/2012_10_10_00_world_battleground_template.sql b/sql/updates/world/2012_10_10_00_world_battleground_template.sql index a9a1cdb04d1..2dcafc51161 100644 --- a/sql/updates/world/2012_10_10_00_world_battleground_template.sql +++ b/sql/updates/world/2012_10_10_00_world_battleground_template.sql @@ -1,2 +1,2 @@ -- Remove all bgs from e1bee86ee6f5c3ab7b1da6d1b54c98c2851f11ec -DELETE FROM `battleground_template` WHERE `id` = 6; -- all Bgs
\ No newline at end of file +DELETE FROM `battleground_template` WHERE `id` = 6; -- all Bgs diff --git a/sql/updates/world/2012_11_07_00_world_misc.sql b/sql/updates/world/2012_11_07_00_world_misc.sql new file mode 100644 index 00000000000..db7c8f66fb1 --- /dev/null +++ b/sql/updates/world/2012_11_07_00_world_misc.sql @@ -0,0 +1,36 @@ +SET @GUID := 43456; + +DELETE FROM `creature` WHERE `guid` BETWEEN @GUID+0 AND @GUID+3; +INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`,`npcflag`,`unit_flags`,`dynamicflags`) VALUES +(@GUID+0,30236,571,1,64,0,0,6219.17,59.9983,400.375,1.6057,120,0,0,1,0,0,0,0,0), +(@GUID+1,30236,571,1,64,0,0,6256.11,93.2413,410.92,0.767945,120,0,0,1,0,0,0,0,0), +(@GUID+2,30236,571,1,64,0,0,6297.37,53.5677,410.957,0.802851,120,0,0,1,0,0,0,0,0), +(@GUID+3,30236,571,1,64,0,0,6162.81,60.9792,400.371,1.55334,120,0,0,1,0,0,0,0,0); + +DELETE FROM `creature_template_addon` WHERE `entry`=30236; +INSERT INTO `creature_template_addon` (`entry`,`path_id`,`mount`,`bytes1`,`bytes2`,`auras`) VALUES +(30236,0,0,0x0,0x1,''); + +DELETE FROM `creature_model_info` WHERE `modelid`=27101; +INSERT INTO `creature_model_info` (`modelid`,`bounding_radius`,`combat_reach`,`gender`) VALUES +(27101,0.3055,1,2); + +UPDATE `creature_template` SET `VehicleId`=246,`npcflag`=0x1000000,`resistance2`=4394,`resistance4`=1 WHERE `entry`=30236; + +DELETE FROM `npc_spellclick_spells` WHERE `npc_entry`=30236; +INSERT INTO `npc_spellclick_spells` (`npc_entry`,`spell_id`,`cast_flags`,`user_type`) VALUES +(30236,57573,1,0); + +SET @OGUID := 7278; +DELETE FROM `gameobject` WHERE `id` IN (192657,192658,192769,192770,192767,192768,192771,192772); +INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES +(@OGUID+0, 192657, 571, 1, 64, 6255.958, 93.05556, 403.0368, 5.454153, 0, 0, 0, 1, 120, 255, 1), +(@OGUID+1, 192658, 571, 1, 64, 6255.961, 93.06424, 408.4696, 5.44543, 0, 0, 0, 1, 120, 255, 1), +(@OGUID+2, 192769, 571, 1, 64, 6219.205, 59.86806, 392.5132, 6.283184, 0, 0, 0, 1, 120, 255, 1), +(@OGUID+3, 192770, 571, 1, 64, 6219.202, 59.875, 397.924, 6.274461, 0, 0, 0, 1, 120, 255, 1), +(@OGUID+4, 192767, 571, 1, 64, 6297.223, 53.39583, 402.9972, 5.532692, 0, 0, 0, 1, 120, 255, 1), +(@OGUID+5, 192768, 571, 1, 64, 6297.226, 53.40451, 408.4129, 5.523969, 0, 0, 0, 1, 120, 255, 1), +(@OGUID+6, 192771, 571, 1, 64, 6162.772, 60.73438, 392.4362, 6.265733, 0, 0, 0, 1, 120, 255, 1), +(@OGUID+7, 192772, 571, 1, 64, 6162.768, 60.74306, 397.8138, 6.257008, 0, 0, 0, 1, 120, 255, 1); + +UPDATE `gameobject_template` SET `flags`=32,`faction`=114 WHERE `entry` IN (192657,192658,192769,192770,192767,192768,192771,192772); diff --git a/sql/updates/world/2012_11_11_00_world_sai.sql b/sql/updates/world/2012_11_11_00_world_sai.sql new file mode 100644 index 00000000000..7d895b81b7b --- /dev/null +++ b/sql/updates/world/2012_11_11_00_world_sai.sql @@ -0,0 +1,113 @@ +-- Update creature gossip_menu_option from sniff +DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (8803,8808,8894,9045,9621,9879,9895,9987,10117,10218) AND `id`=0; +DELETE FROM `gossip_menu_option` WHERE `menu_id`=9879 AND `id`=1; +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`) VALUES +(8803,0,1, 'I need some booze, Coot.',3,128,0,0,0,0, ''), +(8808,0,1, 'I require some components, Sorely.',3,128,0,0,0,0, ''), +(8894,0,0, 'I need to fly to the Windrunner Official business!',1,1,0,0,0,0, ''), +(9045,0,0, 'I don''t have time for chit-chat, Lou. Take me to Scalawag Point.',1,1,0,0,0,0, ''), +(9621,0,0, 'Harry said I could use his bomber to Bael''gun''s. I''m ready to go!',1,1,0,0,0,0, ''), +(9879,0,3, 'Train me',5,16,0,0,0,0, ''), +(9879,1,1, 'Let me browse your goods.',3,128,0,0,0,0, ''), +(9895,0,3, 'Train me',5,16,0,0,0,0, ''), +(9987,0,3, 'Train me',5,16,0,0,0,0, ''), +(10117,0,3, 'Train me',5,16,0,0,0,0, ''), +(10218,0,0, '<Get in the bomber and return to Scalawag Point.>',1,1,0,0,0,0, ''); +-- Insert gossip menu from sniff +DELETE FROM `gossip_menu` WHERE `entry`=8803 AND `text_id`=11287; +DELETE FROM `gossip_menu` WHERE `entry`=8808 AND `text_id`=11297; +DELETE FROM `gossip_menu` WHERE `entry`=8820 AND `text_id`=11352; +DELETE FROM `gossip_menu` WHERE `entry`=8832 AND `text_id`=11418; +DELETE FROM `gossip_menu` WHERE `entry`=8839 AND `text_id`=11436; +DELETE FROM `gossip_menu` WHERE `entry`=8893 AND `text_id`=11655; +DELETE FROM `gossip_menu` WHERE `entry`=8900 AND `text_id`=11691; +DELETE FROM `gossip_menu` WHERE `entry`=8957 AND `text_id`=11746; +DELETE FROM `gossip_menu` WHERE `entry`=8985 AND `text_id`=12130; +DELETE FROM `gossip_menu` WHERE `entry`=9008 AND `text_id`=12170; +DELETE FROM `gossip_menu` WHERE `entry`=9045 AND `text_id`=12222; +DELETE FROM `gossip_menu` WHERE `entry`=9346 AND `text_id`=12646; +DELETE FROM `gossip_menu` WHERE `entry`=9895 AND `text_id`=13738; +DELETE FROM `gossip_menu` WHERE `entry`=9987 AND `text_id`=13841; +DELETE FROM `gossip_menu` WHERE `entry`=10117 AND `text_id`=14043; +DELETE FROM `gossip_menu` WHERE `entry`=10218 AND `text_id`=14205; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES +(8803,11287), +(8808,11297), +(8820,11352), +(8832,11418), +(8839,11436), +(8893,11655), +(8900,11691), +(8957,11746), +(8985,12130), +(9008,12170), +(9045,12222), +(9346,12646), +(9895,13738), +(9987,13841), +(10117,14043), +(10218,14205); +-- Insert creature gossip_menu_id Update from sniff +UPDATE `creature_template` SET `gossip_menu_id`=8803 WHERE `entry`=23737; -- Coot "The Stranger" Albertson +UPDATE `creature_template` SET `gossip_menu_id`=8808 WHERE `entry`=23732; -- Sorely Twitchblade +UPDATE `creature_template` SET `gossip_menu_id`=8820 WHERE `entry`=23862; -- Finlay Fletcher +UPDATE `creature_template` SET `gossip_menu_id`=8832 WHERE `entry`=23770; -- Cannoneer Ely +UPDATE `creature_template` SET `gossip_menu_id`=8839 WHERE `entry`=23906; -- Scout Knowles +UPDATE `creature_template` SET `gossip_menu_id`=8893 WHERE `entry`=24106; -- Scout Valory +UPDATE `creature_template` SET `gossip_menu_id`=8900 WHERE `entry`=24135; -- Greatmother Ankha +UPDATE `creature_template` SET `gossip_menu_id`=8957 WHERE `entry`=23833; -- Explorer Jaren +UPDATE `creature_template` SET `gossip_menu_id`=8985 WHERE `entry`=24544; -- Old Icefin +UPDATE `creature_template` SET `gossip_menu_id`=9008, `npcflag`=`npcflag`|1 WHERE `entry`=24643; -- Grezzix Spindlesnap +UPDATE `creature_template` SET `gossip_menu_id`=9045, `npcflag`=1, `AIName`='SmartAI' WHERE `entry`=24896; -- Lou the Cabin Boy +UPDATE `creature_template` SET `gossip_menu_id`=9346 WHERE `entry`=26540; -- Drenk Spannerspark +UPDATE `creature_template` SET `gossip_menu_id`=9821 WHERE `entry` IN (24067,24154,24350); -- Mahana Frosthoof, Mary Darrow, Robert Clarke +UPDATE `creature_template` SET `gossip_menu_id`=9879 WHERE `entry`=26959; -- Booker Kells +UPDATE `creature_template` SET `gossip_menu_id`=9895 WHERE `entry`=26960; -- Carter Tiffens +UPDATE `creature_template` SET `gossip_menu_id`=9987 WHERE `entry`=26953; -- Thomas Kolichio +UPDATE `creature_template` SET `gossip_menu_id`=10117 WHERE `entry`=26964; -- Alexandra McQueen +UPDATE `creature_template` SET `gossip_menu_id`=10218, `AIName`='SmartAI' WHERE `entry`=28277; -- Harry's Bomber +-- Insert npc_text from sniff +DELETE FROM `npc_text` WHERE `ID` IN (12130,13702); +INSERT INTO `npc_text` (`ID`,`text0_0`,`text0_1`,`lang0`,`prob0`,`em0_0`,`em0_1`,`em0_2`,`em0_3`,`em0_4`,`em0_5`,`text1_0`,`text1_1`,`lang1`,`prob1`,`em1_0`,`em1_1`,`em1_2`,`em1_3`,`em1_4`,`em1_5`,`text2_0`,`text2_1`,`lang2`,`prob2`,`em2_0`,`em2_1`,`em2_2`,`em2_3`,`em2_4`,`em2_5`,`text3_0`,`text3_1`,`lang3`,`prob3`,`em3_0`,`em3_1`,`em3_2`,`em3_3`,`em3_4`,`em3_5`,`text4_0`,`text4_1`,`lang4`,`prob4`,`em4_0`,`em4_1`,`em4_2`,`em4_3`,`em4_4`,`em4_5`,`text5_0`,`text5_1`,`lang5`,`prob5`,`em5_0`,`em5_1`,`em5_2`,`em5_3`,`em5_4`,`em5_5`,`text6_0`,`text6_1`,`lang6`,`prob6`,`em6_0`,`em6_1`,`em6_2`,`em6_3`,`em6_4`,`em6_5`,`text7_0`,`text7_1`,`lang7`,`prob7`,`em7_0`,`em7_1`,`em7_2`,`em7_3`,`em7_4`,`em7_5`,`WDBVerified`) VALUES +(12130,'<Old Icefin eyes you warily, his fishy eye blinking as he bobs his head up and down once in a curt dismissal.>','',0,1,0,396,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,12340), +(13702,'How may I help you?','',0,1,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,12340); +-- Insert creature_text from sniff +DELETE FROM `creature_text` WHERE `entry` IN (27923,27933); +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(27923,0,0,'Hang on to your hat, $N! To Scalawag we go!',12,0,100,0,0,0,'Lou the Cabin Boy'), +(27923,1,0,'YAAARRRRR! Here we be, matey! Scalawag Point!',12,0,100,0,0,0,'Lou the Cabin Boy'), +(27933,0,0,'Enjoy the ride! It''s a one way trip!',12,0,100,3,0,0,'Alanya'); +-- Conditions +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup` IN (8894,9045,9621,10218) AND `SourceEntry`=0; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup` IN (8894,9546) AND `SourceEntry`=1; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(15,8894,0,0,0,9,0,11229,0,0,0,0,'','Bathandler Camille - Show gossip option only if player has taken quest 11229'), +(15,8894,1,0,0,9,0,11170,0,0,0,0,'','Bathandler Camille - Show gossip option only if player has taken quest 11170'), +(15,9045,0,0,0,9,0,11509,0,0,0,0,'','Lou the Cabin Boy - Show gossip option only if player has taken quest 11509'), +(15,9546,1,0,0,9,0,12298,0,0,0,0,'','Greer Orehammer - Show gossip option only if player has taken quest 12298'), +(15,9621,0,0,0,9,0,11567,0,0,0,0,'','Alanya - Show gossip option only if player has taken quest 11567'), +(15,10218,0,0,0,9,0,11567,0,0,0,0,'','Harry''s Bomber - Show gossip option if player has taken quest 11567'); +-- SmartAIs +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=27933; +UPDATE `creature_template` SET `AIName`='SmartAI', `ScriptName`='' WHERE `entry`=23816; +DELETE FROM `smart_scripts` WHERE `entryorguid`=23859 AND `source_type`=0 AND `id` IN (3,4); -- this npc had already a SmartAI so deleting just the new lines +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (23816,24896,27933,28277) AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(23816,0,0,2,62,0,100,0,8894,0,0,0,85,43074,0,0,0,0,0,7,0,0,0,0,0,0,0,'Bathandler Camille - On gossip select - Invoker spellcast'), +(23816,0,1,2,62,0,100,0,8894,1,0,0,85,43136,0,0,0,0,0,7,0,0,0,0,0,0,0,'Bathandler Camille - On gossip select - Invoker spellcast'), +(23816,0,2,0,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Bathandler Camille - On gossip select - Close gossip'), +(23859,0,3,4,62,0,100,0,9546,1,0,0,11,48862,0,0,0,0,0,7,0,0,0,0,0,0,0,'Greer Orehammer - On gossip select - Invoker spellcast'), +(23859,0,4,0,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Greer Orehammer - On gossip select - Close gossip'), +(24896,0,0,1,62,0,100,0,9045,0,0,0,11,50004,0,0,0,0,0,7,0,0,0,0,0,0,0,'Lou the Cabin Boy - On gossip select - Spellcast'), +(24896,0,1,0,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Lou the Cabin Boy - On gossip select - Close gossip'), +(27933,0,0,1,62,0,100,0,9621,0,0,0,11,50038,0,0,0,0,0,7,0,0,0,0,0,0,0,'Alanya - On gossip select - Spellcast'), +(27933,0,1,2,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Alanya - On gossip select - Close gossip'), +(27933,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Alanya - On gossip select - Say line'), +(28277,0,0,1,62,0,100,0,10218,0,0,0,11,61604,0,0,0,0,0,7,0,0,0,0,0,0,0,'Harry''s Bomber - On gossip select - Spellcast'), +(28277,0,1,0,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Harry''s Bomber - On gossip select - Close gossip'); +DELETE FROM `npc_spellclick_spells` WHERE `npc_entry`=24896; -- that was absolutely not correct +DELETE FROM `spell_target_position` WHERE `id` IN (50005,50039,61605); +INSERT INTO `spell_target_position` (`id`,`target_map`,`target_position_x`,`target_position_y`,`target_position_z`,`target_orientation`) VALUES +(50005,571,595.208,-2796.47,-0.124098,3.66519), -- Summon Lou the Cabin Boy +(50039,571,-170.469,-3588.19,-0.221146,4.2586), -- Summon Harry's Bomber +(61605,571,89.7416,-6286.08,1.17903,1.58825); -- Summon Harry's Bomber diff --git a/sql/updates/world/2012_11_11_01_world_quest_template.sql b/sql/updates/world/2012_11_11_01_world_quest_template.sql new file mode 100644 index 00000000000..9abf2ea3cd1 --- /dev/null +++ b/sql/updates/world/2012_11_11_01_world_quest_template.sql @@ -0,0 +1,2 @@ +-- Fix a typo in RewardText table for quest Spooky Lighthouse (1687) +UPDATE `quest_template` SET `OfferRewardText`="WOW, that was a real life ghost! That was so awesome - I can't wait to tell everyone back at the orphanage. Captain Grayson... he even looked like a pirate! When I grow up I wanna be a ghost pirate too!$B$BThanks for taking me to Westfall, $N. I know there are scary things out there in the wilds of Westfall, and I hope I wasn't too much of a pain. You're awesome!" WHERE `Id`=1687; diff --git a/sql/updates/world/2012_11_11_02_world_gossip_menu.sql b/sql/updates/world/2012_11_11_02_world_gossip_menu.sql new file mode 100644 index 00000000000..59d1a10b337 --- /dev/null +++ b/sql/updates/world/2012_11_11_02_world_gossip_menu.sql @@ -0,0 +1,109 @@ +UPDATE `creature_template` SET `gossip_menu_id`=9260 WHERE `entry`=25754; +DELETE FROM `gossip_menu` WHERE `entry`=9260 AND `text_id`=12572; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9260,12572); + +UPDATE `creature_template` SET `gossip_menu_id`=11417 WHERE `entry`=25697; +DELETE FROM `gossip_menu` WHERE `entry`=11417 AND `text_id`=12390; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (11417,12390); + +UPDATE `creature_template` SET `gossip_menu_id`=9298 WHERE `entry`=16818; +DELETE FROM `gossip_menu` WHERE `entry`=9298 AND `text_id`=12609; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9298,12609); + +UPDATE `creature_template` SET `gossip_menu_id`=9204 WHERE `entry`=26113; +UPDATE `creature_template` SET `gossip_menu_id`=9204 WHERE `entry`=25994; +DELETE FROM `gossip_menu` WHERE `entry`=9204 AND `text_id`=12506; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9204,12506); + +UPDATE `creature_template` SET `gossip_menu_id`=9148 WHERE `entry`=16781; +DELETE FROM `gossip_menu` WHERE `entry`=9148 AND `text_id`=12376; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9148,12376); + +UPDATE `creature_template` SET `gossip_menu_id`=9157 WHERE `entry`=26221; +DELETE FROM `gossip_menu` WHERE `entry`=9157 AND `text_id`=12390; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9157,12390); + +UPDATE `creature_template` SET `gossip_menu_id`=9278 WHERE `entry`=25884; +UPDATE `creature_template` SET `gossip_menu_id`=9278 WHERE `entry`=25918; +UPDATE `creature_template` SET `gossip_menu_id`=9278 WHERE `entry`=25919; +UPDATE `creature_template` SET `gossip_menu_id`=9278 WHERE `entry`=25920; +UPDATE `creature_template` SET `gossip_menu_id`=9278 WHERE `entry`=25921; +UPDATE `creature_template` SET `gossip_menu_id`=9278 WHERE `entry`=25922; +UPDATE `creature_template` SET `gossip_menu_id`=9278 WHERE `entry`=25924; +UPDATE `creature_template` SET `gossip_menu_id`=9278 WHERE `entry`=25926; +UPDATE `creature_template` SET `gossip_menu_id`=9278 WHERE `entry`=25928; +UPDATE `creature_template` SET `gossip_menu_id`=9278 WHERE `entry`=25929; +UPDATE `creature_template` SET `gossip_menu_id`=9278 WHERE `entry`=25930; +UPDATE `creature_template` SET `gossip_menu_id`=9278 WHERE `entry`=25932; +UPDATE `creature_template` SET `gossip_menu_id`=9278 WHERE `entry`=25934; +UPDATE `creature_template` SET `gossip_menu_id`=9278 WHERE `entry`=25936; +UPDATE `creature_template` SET `gossip_menu_id`=9278 WHERE `entry`=25937; +UPDATE `creature_template` SET `gossip_menu_id`=9278 WHERE `entry`=25938; +UPDATE `creature_template` SET `gossip_menu_id`=9278 WHERE `entry`=25940; +UPDATE `creature_template` SET `gossip_menu_id`=9278 WHERE `entry`=25943; +UPDATE `creature_template` SET `gossip_menu_id`=9278 WHERE `entry`=25947; +UPDATE `creature_template` SET `gossip_menu_id`=9278 WHERE `entry`=32809; +UPDATE `creature_template` SET `gossip_menu_id`=9278 WHERE `entry`=32810; +UPDATE `creature_template` SET `gossip_menu_id`=9278 WHERE `entry`=32811; +UPDATE `creature_template` SET `gossip_menu_id`=9278 WHERE `entry`=32812; +UPDATE `creature_template` SET `gossip_menu_id`=9278 WHERE `entry`=32813; +UPDATE `creature_template` SET `gossip_menu_id`=9278 WHERE `entry`=32814; +UPDATE `creature_template` SET `gossip_menu_id`=9278 WHERE `entry`=32815; +UPDATE `creature_template` SET `gossip_menu_id`=9278 WHERE `entry`=32816; +DELETE FROM `gossip_menu` WHERE `entry`=9278 AND `text_id`=12582; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9278,12582); + +DELETE FROM `gossip_menu` WHERE `entry`=9354 AND `text_id`=12377; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9354,12377); +DELETE FROM `gossip_menu` WHERE `entry`=9384 AND `text_id`=12377; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9384,12377); +DELETE FROM `gossip_menu` WHERE `entry`=9385 AND `text_id`=12377; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9385,12377); +DELETE FROM `gossip_menu` WHERE `entry`=9386 AND `text_id`=12377; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9386,12377); +DELETE FROM `gossip_menu` WHERE `entry`=9387 AND `text_id`=12377; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9387,12377); +DELETE FROM `gossip_menu` WHERE `entry`=9389 AND `text_id`=12377; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9389,12377); +DELETE FROM `gossip_menu` WHERE `entry`=9390 AND `text_id`=12377; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9390,12377); +DELETE FROM `gossip_menu` WHERE `entry`=9393 AND `text_id`=12377; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9393,12377); +DELETE FROM `gossip_menu` WHERE `entry`=9395 AND `text_id`=12377; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9395,12377); +DELETE FROM `gossip_menu` WHERE `entry`=9396 AND `text_id`=12377; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9396,12377); +DELETE FROM `gossip_menu` WHERE `entry`=9399 AND `text_id`=12377; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9399,12377); +DELETE FROM `gossip_menu` WHERE `entry`=9401 AND `text_id`=12377; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9401,12377); +DELETE FROM `gossip_menu` WHERE `entry`=9403 AND `text_id`=12377; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9403,12377); +DELETE FROM `gossip_menu` WHERE `entry`=9408 AND `text_id`=12377; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9408,12377); +DELETE FROM `gossip_menu` WHERE `entry`=9409 AND `text_id`=12377; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9409,12377); +DELETE FROM `gossip_menu` WHERE `entry`=9410 AND `text_id`=12377; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9410,12377); +DELETE FROM `gossip_menu` WHERE `entry`=9411 AND `text_id`=12377; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9411,12377); +DELETE FROM `gossip_menu` WHERE `entry`=9412 AND `text_id`=12377; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9412,12377); +DELETE FROM `gossip_menu` WHERE `entry`=9413 AND `text_id`=12377; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9413,12377); +DELETE FROM `gossip_menu` WHERE `entry`=10230 AND `text_id`=12377; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (10230,12377); +DELETE FROM `gossip_menu` WHERE `entry`=10232 AND `text_id`=12377; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (10232,12377); +DELETE FROM `gossip_menu` WHERE `entry`=10233 AND `text_id`=12377; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (10233,12377); +DELETE FROM `gossip_menu` WHERE `entry`=10234 AND `text_id`=12377; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (10234,12377); +DELETE FROM `gossip_menu` WHERE `entry`=10237 AND `text_id`=12377; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (10237,12377); +DELETE FROM `gossip_menu` WHERE `entry`=10238 AND `text_id`=12377; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (10238,12377); +DELETE FROM `gossip_menu` WHERE `entry`=10240 AND `text_id`=12377; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (10240,12377); +DELETE FROM `gossip_menu` WHERE `entry`=10243 AND `text_id`=12377; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (10243,12377); diff --git a/sql/updates/world/2012_11_11_03_world_gossip_menu.sql b/sql/updates/world/2012_11_11_03_world_gossip_menu.sql new file mode 100644 index 00000000000..4f250597388 --- /dev/null +++ b/sql/updates/world/2012_11_11_03_world_gossip_menu.sql @@ -0,0 +1,280 @@ +-- Creature Gossip Update for midsummer event from sniff +UPDATE `creature_template` SET `gossip_menu_id`=9148 WHERE `entry`=16781; -- Midsummer Celebrant +UPDATE `creature_template` SET `gossip_menu_id`=7326 WHERE `entry`=16817; -- Festival Loremaster +UPDATE `creature_template` SET `gossip_menu_id`=11417 WHERE `entry`=25697; -- Luma Skymother <The Earthen Ring> +UPDATE `creature_template` SET `gossip_menu_id`=9260 WHERE `entry`=25754; -- Earthen Ring Flamecaller <The Earthen Ring> +UPDATE `creature_template` SET `gossip_menu_id`=9203 WHERE `entry`=25883; -- Ashenvale Flame Warden +UPDATE `creature_template` SET `gossip_menu_id`=9278 WHERE `entry`=25884; -- Ashenvale Flame Keeper +UPDATE `creature_template` SET `gossip_menu_id`=9203 WHERE `entry`=25887; -- Arathi Flame Warden +UPDATE `creature_template` SET `gossip_menu_id`=9203 WHERE `entry`=25888; -- Azuremyst Isle Flame Warden +UPDATE `creature_template` SET `gossip_menu_id`=9203 WHERE `entry`=25889; -- Blade's Edge Flame Warden +UPDATE `creature_template` SET `gossip_menu_id`=9203 WHERE `entry`=25890; -- Blasted Lands Flame Warden +UPDATE `creature_template` SET `gossip_menu_id`=9203 WHERE `entry`=25891; -- Bloodmyst Isle Flame Warden +UPDATE `creature_template` SET `gossip_menu_id`=9203 WHERE `entry`=25892; -- Burning Steppes Flame Warden +UPDATE `creature_template` SET `gossip_menu_id`=9203 WHERE `entry`=25893; -- Darkshore Flame Warden +UPDATE `creature_template` SET `gossip_menu_id`=9203 WHERE `entry`=25894; -- Desolace Flame Warden +UPDATE `creature_template` SET `gossip_menu_id`=9203 WHERE `entry`=25895; -- Dun Morogh Flame Warden +UPDATE `creature_template` SET `gossip_menu_id`=9203 WHERE `entry`=25896; -- Duskwood Flame Warden +UPDATE `creature_template` SET `gossip_menu_id`=9203 WHERE `entry`=25897; -- Dustwallow Marsh Flame Warden +UPDATE `creature_template` SET `gossip_menu_id`=9203 WHERE `entry`=25898; -- Elwynn Forest Flame Warden +UPDATE `creature_template` SET `gossip_menu_id`=9203 WHERE `entry`=25899; -- Feralas Flame Warden +UPDATE `creature_template` SET `gossip_menu_id`=9203 WHERE `entry`=25900; -- Hellfire Peninsula Flame Warden +UPDATE `creature_template` SET `gossip_menu_id`=9203 WHERE `entry`=25901; -- Hillsbrad Flame Warden -> Deleted in cata, taking from 3.x sniff +UPDATE `creature_template` SET `gossip_menu_id`=9203 WHERE `entry`=25902; -- Loch Modan Flame Warden +UPDATE `creature_template` SET `gossip_menu_id`=9203 WHERE `entry`=25903; -- Nagrand Flame Warden +UPDATE `creature_template` SET `gossip_menu_id`=9203 WHERE `entry`=25904; -- Redridge Flame Warden +UPDATE `creature_template` SET `gossip_menu_id`=9203 WHERE `entry`=25905; -- Shadowmoon Valley Flame Warden +UPDATE `creature_template` SET `gossip_menu_id`=9203 WHERE `entry`=25906; -- Teldrassil Flame Warden +UPDATE `creature_template` SET `gossip_menu_id`=9203 WHERE `entry`=25907; -- Terokkar Forest Flame Warden +UPDATE `creature_template` SET `gossip_menu_id`=9203 WHERE `entry`=25908; -- The Hinterlands Flame Warden +UPDATE `creature_template` SET `gossip_menu_id`=9203 WHERE `entry`=25909; -- Western Plaguelands Flame Warden +UPDATE `creature_template` SET `gossip_menu_id`=9203 WHERE `entry`=25910; -- Westfall Flame Warden +UPDATE `creature_template` SET `gossip_menu_id`=9203 WHERE `entry`=25911; -- Wetlands Flame Warden +UPDATE `creature_template` SET `gossip_menu_id`=9203 WHERE `entry`=25912; -- Zangarmarsh Flame Warden +UPDATE `creature_template` SET `gossip_menu_id`=9203 WHERE `entry`=25913; -- Netherstorm Flame Warden +UPDATE `creature_template` SET `gossip_menu_id`=9203 WHERE `entry`=25914; -- Silithus Flame Warden +UPDATE `creature_template` SET `gossip_menu_id`=9203 WHERE `entry`=25915; -- Cape of Stranglethorn Flame Warden +UPDATE `creature_template` SET `gossip_menu_id`=9203 WHERE `entry`=25916; -- Tanaris Flame Warden +UPDATE `creature_template` SET `gossip_menu_id`=9203 WHERE `entry`=25917; -- Winterspring Flame Warden +UPDATE `creature_template` SET `gossip_menu_id`=9278 WHERE `entry`=25918; -- Netherstorm Flame Keeper +UPDATE `creature_template` SET `gossip_menu_id`=9278 WHERE `entry`=25919; -- Silithus Flame Keeper +UPDATE `creature_template` SET `gossip_menu_id`=9278 WHERE `entry`=25920; -- Cape of Stranglethorn Flame Keeper +UPDATE `creature_template` SET `gossip_menu_id`=9278 WHERE `entry`=25921; -- Tanaris Flame Keeper +UPDATE `creature_template` SET `gossip_menu_id`=9278 WHERE `entry`=25922; -- Winterspring Flame Keeper +UPDATE `creature_template` SET `gossip_menu_id`=9278 WHERE `entry`=25923; -- Arathi Flame Keeper +UPDATE `creature_template` SET `gossip_menu_id`=9278 WHERE `entry`=25925; -- Badlands Flame Keeper +UPDATE `creature_template` SET `gossip_menu_id`=9278 WHERE `entry`=25926; -- Blade's Edge Flame Keeper +UPDATE `creature_template` SET `gossip_menu_id`=9278 WHERE `entry`=25927; -- Burning Steppes Flame Keeper +UPDATE `creature_template` SET `gossip_menu_id`=9278 WHERE `entry`=25928; -- Desolace Flame Keeper +UPDATE `creature_template` SET `gossip_menu_id`=9278 WHERE `entry`=25929; -- Durotar Flame Keeper +UPDATE `creature_template` SET `gossip_menu_id`=9278 WHERE `entry`=25930; -- Dustwallow Marsh Flame Keeper +UPDATE `creature_template` SET `gossip_menu_id`=9278 WHERE `entry`=25931; -- Eversong Woods Flame Keeper +UPDATE `creature_template` SET `gossip_menu_id`=9278 WHERE `entry`=25932; -- Feralas Flame Keeper +UPDATE `creature_template` SET `gossip_menu_id`=9278 WHERE `entry`=25933; -- Ghostlands Flame Keeper +UPDATE `creature_template` SET `gossip_menu_id`=9278 WHERE `entry`=25934; -- Hellfire Peninsula Flame Keeper +UPDATE `creature_template` SET `gossip_menu_id`=9278 WHERE `entry`=25935; -- Hillsbrad Flame Keeper +UPDATE `creature_template` SET `gossip_menu_id`=9278 WHERE `entry`=25936; -- Mulgore Flame Keeper +UPDATE `creature_template` SET `gossip_menu_id`=9278 WHERE `entry`=25937; -- Nagrand Flame Keeper +UPDATE `creature_template` SET `gossip_menu_id`=9278 WHERE `entry`=25938; -- Shadowmoon Valley Flame Keeper +UPDATE `creature_template` SET `gossip_menu_id`=9278 WHERE `entry`=25939; -- Silverpine Forest Flame Keeper +UPDATE `creature_template` SET `gossip_menu_id`=9278 WHERE `entry`=25940; -- Stonetalon Flame Keeper +UPDATE `creature_template` SET `gossip_menu_id`=9278 WHERE `entry`=25941; -- Swamp of Sorrows Flame Keeper +UPDATE `creature_template` SET `gossip_menu_id`=9278 WHERE `entry`=25942; -- Terokkar Forest Flame Keeper +UPDATE `creature_template` SET `gossip_menu_id`=9278 WHERE `entry`=25943; -- The Northern Barrens Flame Keeper +UPDATE `creature_template` SET `gossip_menu_id`=9278 WHERE `entry`=25944; -- The Hinterlands Flame Keeper +UPDATE `creature_template` SET `gossip_menu_id`=9278 WHERE `entry`=25945; -- Thousand Needles Flame Keeper -> Deleted in cata, taking from 3.x sniff +UPDATE `creature_template` SET `gossip_menu_id`=9278 WHERE `entry`=25946; -- Tirisfal Glades Flame Keeper +UPDATE `creature_template` SET `gossip_menu_id`=9278 WHERE `entry`=25947; -- Zangarmarsh Flame Keeper +UPDATE `creature_template` SET `gossip_menu_id`=9204 WHERE `entry`=25962; -- Fire Eater +UPDATE `creature_template` SET `gossip_menu_id`=9204 WHERE `entry`=25975; -- Master Fire Eater +UPDATE `creature_template` SET `gossip_menu_id`=9203 WHERE `entry`=32801; -- Borean Tundra Flame Warden +UPDATE `creature_template` SET `gossip_menu_id`=9203 WHERE `entry`=32802; -- Sholazar Basin Flame Warden +UPDATE `creature_template` SET `gossip_menu_id`=9203 WHERE `entry`=32806; -- Storm Peaks Flame Warden +UPDATE `creature_template` SET `gossip_menu_id`=9203 WHERE `entry`=32807; -- Crystalsong Forest Flame Warden +UPDATE `creature_template` SET `gossip_menu_id`=9203 WHERE `entry`=32808; -- Zul'Drak Flame Warden +UPDATE `creature_template` SET `gossip_menu_id`=9278 WHERE `entry`=32809; -- Borean Tundra Flame Keeper +UPDATE `creature_template` SET `gossip_menu_id`=9278 WHERE `entry`=32810; -- Sholazar Basin Flame Keeper +UPDATE `creature_template` SET `gossip_menu_id`=9278 WHERE `entry`=32811; -- Dragonblight Flame Keeper +UPDATE `creature_template` SET `gossip_menu_id`=9278 WHERE `entry`=32812; -- Howling Fjord Flame Keeper +UPDATE `creature_template` SET `gossip_menu_id`=9278 WHERE `entry`=32813; -- Grizzly Hills Flame Keeper +UPDATE `creature_template` SET `gossip_menu_id`=9278 WHERE `entry`=32814; -- Storm Peaks Flame Keeper +UPDATE `creature_template` SET `gossip_menu_id`=9278 WHERE `entry`=32815; -- Crystalsong Forest Flame Keeper +UPDATE `creature_template` SET `gossip_menu_id`=9278 WHERE `entry`=32816; -- Zul'Drak Flame Keeper +-- Gossip insert from sniff +DELETE FROM `gossip_menu` WHERE (`entry`=9148 AND `text_id`=12376) OR (`entry`=7326 AND `text_id`=8703) OR (`entry`=11417 AND `text_id`=12390) OR (`entry`=9260 AND `text_id`=12571) OR (`entry`=9260 AND `text_id`=12572) OR (`entry`=9203 AND `text_id`=12504) OR (`entry`=9278 AND `text_id`=12582) OR (`entry`=9204 AND `text_id`=12506) OR (`entry`=9370 AND `text_id`=12374) OR (`entry`=9406 AND `text_id`=12377) OR (`entry`=9352 AND `text_id`=12377) OR (`entry`=9354 AND `text_id`=12377) OR (`entry`=9384 AND `text_id`=12377) OR (`entry`=9385 AND `text_id`=12377) OR (`entry`=9386 AND `text_id`=12377) OR (`entry`=9387 AND `text_id`=12377) OR (`entry`=9388 AND `text_id`=12377) OR (`entry`=9389 AND `text_id`=12377) OR (`entry`=9390 AND `text_id`=12377) OR (`entry`=9391 AND `text_id`=12377) OR (`entry`=9392 AND `text_id`=12377) OR (`entry`=9393 AND `text_id`=12377) OR (`entry`=9394 AND `text_id`=12377) OR (`entry`=9395 AND `text_id`=12377) OR (`entry`=9396 AND `text_id`=12377) OR (`entry`=9397 AND `text_id`=12377) OR (`entry`=9398 AND `text_id`=12377) OR (`entry`=9399 AND `text_id`=12377) OR (`entry`=9400 AND `text_id`=12377) OR (`entry`=9401 AND `text_id`=12377) OR (`entry`=9402 AND `text_id`=12377) OR (`entry`=9403 AND `text_id`=12377) OR (`entry`=9404 AND `text_id`=12377) OR (`entry`=9405 AND `text_id`=12377) OR (`entry`=9407 AND `text_id`=12377) OR (`entry`=9408 AND `text_id`=12377) OR (`entry`=9409 AND `text_id`=12377) OR(`entry`=9410 AND `text_id`=12377) OR (`entry`=9411 AND `text_id`=12377) OR (`entry`=9412 AND `text_id`=12377) OR (`entry`=9413 AND `text_id`=12377) OR (`entry`=9353 AND `text_id`=12374) OR (`entry`=9355 AND `text_id`=12374) OR (`entry`=9379 AND `text_id`=12374) OR (`entry`=9380 AND `text_id`=12374) OR (`entry`=9381 AND `text_id`=12374) OR (`entry`=9382 AND `text_id`=12374) OR (`entry`=9383 AND `text_id`=12374) OR (`entry`=9356 AND `text_id`=12374) OR (`entry`=9357 AND `text_id`=12374) OR (`entry`=9358 AND `text_id`=12374) OR (`entry`=9359 AND `text_id`=12374) OR (`entry`=9360 AND `text_id`=12374) OR (`entry`=9361 AND `text_id`=12374) OR (`entry`=9362 AND `text_id`=12374) OR (`entry`=9363 AND `text_id`=12374) OR (`entry`=9364 AND `text_id`=12374) OR (`entry`=9365 AND `text_id`=12374) OR (`entry`=9366 AND `text_id`=12374) OR (`entry`=9367 AND `text_id`=12374) OR (`entry`=9368 AND `text_id`=12374) OR (`entry`=9369 AND `text_id`=12374) OR (`entry`=9371 AND `text_id`=12374) OR (`entry`=9372 AND `text_id`=12374) OR (`entry`=9373 AND `text_id`=12374) OR (`entry`=9374 AND `text_id`=12374) OR (`entry`=9375 AND `text_id`=12374) OR (`entry`=9377 AND `text_id`=12374) OR (`entry`=9378 AND `text_id`=12374) OR (`entry`=10227 AND `text_id`=12377) OR (`entry`=10228 AND `text_id`=12374) OR (`entry`=10231 AND `text_id`=12374) OR (`entry`=10230 AND `text_id`=12377) OR (`entry`=10239 AND `text_id`=12374) OR (`entry`=10238 AND `text_id`=12377) OR (`entry`=10240 AND `text_id`=12377) OR (`entry`=10241 AND `text_id`=12374) OR (`entry`=10242 AND `text_id`=12374) OR (`entry`=10243 AND `text_id`=12377); +INSERT INTO `gossip_menu` (`entry`, `text_id`) VALUES +(9148, 12376), -- 16781 +(7326, 8703), -- 16817 +(11417, 12390), -- 25697 +(9260, 12571), -- 25754 +(9260, 12572), -- 25754 +(9203, 12504), -- 25883, 25887, 25888, 25889, 25890, 25891, 25892, 25893, 25894, 25895, 25896, 25897, 25898, 25899, 25900, 25901, 25902, 25903, 25904, 25905, 25906, 25907, 25908, 25909, 25910, 25911, 25912, 25913, 25914, 25915, 25916, 25917, 32801, 32802, 32806, 32807, 32808 +(9278, 12582), -- 25884, 25918, 25919, 25920, 25921, 25922, 25923, 25925, 25926, 25927, 25928, 25929, 25930, 25931, 25932, 25933, 25934, 25935, 25936, 25937, 25938, 25939, 25940, 25941, 25942, 25943, 25944, 25945, 25946, 25947, 32809, 32810, 32811, 32812, 32813, 32814, 32815, 32816 +(9204, 12506), -- 25962, 25975 +(9370, 12374), -- 187559 +(9406, 12377), -- 187564 +(9352, 12377), -- 187914 +(9354, 12377), -- 187916 +(9384, 12377), -- 187917 +(9385, 12377), -- 187919 +(9386, 12377), -- 187920 +(9387, 12377), -- 187921 +(9388, 12377), -- 187922 +(9389, 12377), -- 187923 +(9390, 12377), -- 187924 +(9391, 12377), -- 187925 +(9392, 12377), -- 187926 +(9393, 12377), -- 187927 +(9394, 12377), -- 187928 +(9395, 12377), -- 187929 +(9396, 12377), -- 187930 +(9397, 12377), -- 187931 -> Deleted in cata, taking from 3.x sniff +(9398, 12377), -- 187932 +(9399, 12377), -- 187933 +(9400, 12377), -- 187934 +(9401, 12377), -- 187935 +(9402, 12377), -- 187936 +(9403, 12377), -- 187937 +(9404, 12377), -- 187938 +(9405, 12377), -- 187939 +(9407, 12377), -- 187940 +(9408, 12377), -- 187941 +(9409, 12377), -- 187942 +(9410, 12377), -- 187943 +(9411, 12377), -- 187944 +(9412, 12377), -- 187945 +(9413, 12377), -- 187946 +(9353, 12374), -- 187947 +(9355, 12374), -- 187948 +(9379, 12374), -- 187949 +(9380, 12374), -- 187950 +(9381, 12374), -- 187951 +(9382, 12374), -- 187952 +(9383, 12374), -- 187953 +(9356, 12374), -- 187954 +(9357, 12374), -- 187955 +(9358, 12374), -- 187956 +(9359, 12374), -- 187957 +(9360, 12374), -- 187958 +(9361, 12374), -- 187959 +(9362, 12374), -- 187960 +(9363, 12374), -- 187961 +(9364, 12374), -- 187962 +(9365, 12374), -- 187963 +(9366, 12374), -- 187964 +(9367, 12374), -- 187965 +(9368, 12374), -- 187966 +(9369, 12374), -- 187967 +(9371, 12374), -- 187968 +(9372, 12374), -- 187969 +(9373, 12374), -- 187970 +(9374, 12374), -- 187971 +(9375, 12374), -- 187972 +(9377, 12374), -- 187974 +(9378, 12374), -- 187975 +(10227, 12377), -- 194032 +(10228, 12374), -- 194033 +(10231, 12374), -- 194034 +(10230, 12377), -- 194035 +(10239, 12374), -- 194043 +(10238, 12377), -- 194044 +(10240, 12377), -- 194045 +(10241, 12374), -- 194046 +(10242, 12374), -- 194048 +(10243, 12377); -- 194049 +-- Add quest to creature (warden) +DELETE FROM `game_event_creature_quest` WHERE (`id`=25883 AND `quest`=11805) OR (`id`=25887 AND `quest`=11804) OR (`id`=25888 AND `quest`=11806) OR (`id`=25889 AND `quest`=11807) OR (`id`=25890 AND `quest`=11808) OR (`id`=25891 AND `quest`=11809) OR (`id`=25892 AND `quest`=11810) OR (`id`=25893 AND `quest`=11811) OR (`id`=25894 AND `quest`=11812) OR (`id`=25895 AND `quest`=11813) OR (`id`=25896 AND `quest`=11814) OR (`id`=25897 AND `quest`=11815) OR (`id`=25898 AND `quest`=11816) OR (`id`=25899 AND `quest`=11817) OR (`id`=25900 AND `quest`=11818) OR (`id`=25901 AND `quest`=11819) OR (`id`=25902 AND `quest`=11820) OR (`id`=25903 AND `quest`=11821) OR (`id`=25904 AND `quest`=11822) OR (`id`=25905 AND `quest`=11823) OR (`id`=25906 AND `quest`=11824) OR (`id`=25907 AND `quest`=11825) OR (`id`=25908 AND `quest`=11826) OR (`id`=25909 AND `quest`=11827) OR (`id`=25910 AND `quest`=11583) OR (`id`=25911 AND `quest`=11828) OR (`id`=25912 AND `quest`=11829) OR (`id`=25913 AND `quest`=11830) OR (`id`=25914 AND `quest`=11831) OR (`id`=25915 AND `quest`=11832) OR (`id`=25916 AND `quest`=11833) OR (`id`=25917 AND `quest`=11834) OR (`id`=32801 AND `quest`=13485) OR (`id`=32802 AND `quest`=13486) OR (`id`=32806 AND `quest`=13490) OR (`id`=32807 AND `quest`=13491) OR (`id`=32808 AND `quest`=13492); +INSERT INTO `game_event_creature_quest` (`eventEntry`, `id`, `quest`) VALUES +(1, 25883, 11805), +(1, 25887, 11804), +(1, 25888, 11806), +(1, 25889, 11807), +(1, 25890, 11808), +(1, 25891, 11809), +(1, 25892, 11810), +(1, 25893, 11811), +(1, 25894, 11812), +(1, 25895, 11813), +(1, 25896, 11814), +(1, 25897, 11815), +(1, 25898, 11816), +(1, 25899, 11817), +(1, 25900, 11818), +(1, 25901, 11819), -- Deleted in cata, taking from 3.x sniff +(1, 25902, 11820), +(1, 25903, 11821), +(1, 25904, 11822), +(1, 25905, 11823), +(1, 25906, 11824), +(1, 25907, 11825), +(1, 25908, 11826), +(1, 25909, 11827), +(1, 25910, 11583), +(1, 25911, 11828), +(1, 25912, 11829), +(1, 25913, 11830), +(1, 25914, 11831), +(1, 25915, 11832), +(1, 25916, 11833), +(1, 25917, 11834), +(1, 32801, 13485), +(1, 32802, 13486), +(1, 32806, 13490), +(1, 32807, 13491), +(1, 32808, 13492); +-- Delete double quest +DELETE FROM `creature_questrelation` WHERE `id`=25889 AND `quest` =11807; +-- Add quest relation to Gameobject (fire) +DELETE FROM `game_event_gameobject_quest` WHERE (`id`=187559 AND `quest`=11580) OR (`id`=187564 AND `quest`=11581) OR (`id`=187914 AND `quest`=11732) OR (`id`=187916 AND `quest`=11734) OR (`id`=187917 AND `quest`=11735) OR (`id`=187919 AND `quest`=11736) OR (`id`=187920 AND `quest`=11737) OR (`id`=187921 AND `quest`=11738) OR (`id`=187922 AND `quest`=11739) OR (`id`=187923 AND `quest`=11740) OR (`id`=187924 AND `quest`=11741) OR (`id`=187925 AND `quest`=11742) OR (`id`=187926 AND `quest`=11743) OR (`id`=187927 AND `quest`=11744) OR (`id`=187928 AND `quest`=11745) OR (`id`=187929 AND `quest`=11746) OR (`id`=187930 AND `quest`=11747) OR (`id`=187931 AND `quest`=11748) OR (`id`=187932 AND `quest`=11749) OR (`id`=187933 AND `quest`=11750) OR (`id`=187934 AND `quest`=11751) OR (`id`=187935 AND `quest`=11752) OR (`id`=187936 AND `quest`=11753) OR (`id`=187937 AND `quest`=11754) OR (`id`=187938 AND `quest`=11755) OR (`id`=187939 AND `quest`=11756) OR (`id`=187940 AND `quest`=11757) OR (`id`=187941 AND `quest`=11758) OR (`id`=187942 AND `quest`=11759) OR(`id`=187943 AND `quest`=11760) OR (`id`=187944 AND `quest`=11761) OR (`id`=187945 AND `quest`=11762) OR (`id`=187946 AND `quest`=11763) OR (`id`=187947 AND `quest`=11764) OR (`id`=187948 AND `quest`=11765) OR (`id`=187949 AND `quest`=11799) OR (`id`=187950 AND `quest`=11800) OR (`id`=187951 AND `quest`=11801) OR (`id`=187952 AND `quest`=11802) OR (`id`=187953 AND `quest`=11803) OR (`id`=187954 AND `quest`=11766) OR (`id`=187955 AND `quest`=11767) OR (`id`=187956 AND `quest`=11768) OR (`id`=187957 AND `quest`=11769) OR (`id`=187958 AND `quest`=11770) OR (`id`=187959 AND `quest`=11771) OR (`id`=187960 AND `quest`=11772) OR (`id`=187961 AND `quest`=11773) OR (`id`=187962 AND `quest`=11774) OR (`id`=187963 AND `quest`=11775) OR (`id`=187964 AND `quest`=11776) OR (`id`=187965 AND `quest`=11777) OR (`id`=187966 AND `quest`=11778) OR (`id`=187967 AND `quest`=11779) OR (`id`=187968 AND `quest`=11780) OR (`id`=187969 AND `quest`=11781) OR (`id`=187970 AND `quest`=11782) OR (`id`=187971 AND `quest`=11783) OR (`id`=187972 AND `quest`=11784) OR (`id`=187974 AND `quest`=11786) OR (`id`=187975 AND `quest`=11787) OR (`id`=194032 AND `quest`=13440) OR (`id`=194033 AND `quest`=13441) OR (`id`=194034 AND `quest`=13450) OR (`id`=194035 AND `quest`=13442) OR (`id`=194043 AND `quest`=13455) OR (`id`=194044 AND `quest`=13446) OR (`id`=194045 AND `quest`=13447) OR (`id`=194046 AND `quest`=13457) OR (`id`=194048 AND `quest`=13458) OR (`id`=194049 AND `quest`=13449); +INSERT INTO `game_event_gameobject_quest` (`eventEntry`, `id`, `quest`) VALUES +(1, 187559, 11580), +(1, 187564, 11581), +(1, 187914, 11732), +(1, 187916, 11734), +(1, 187917, 11735), +(1, 187919, 11736), +(1, 187920, 11737), +(1, 187921, 11738), +(1, 187922, 11739), +(1, 187923, 11740), +(1, 187924, 11741), +(1, 187925, 11742), +(1, 187926, 11743), +(1, 187927, 11744), +(1, 187928, 11745), +(1, 187929, 11746), +(1, 187930, 11747), +(1, 187931, 11748), -- Deleted in cata, taking from 3.x sniff +(1, 187932, 11749), +(1, 187933, 11750), +(1, 187934, 11751), +(1, 187935, 11752), +(1, 187936, 11753), +(1, 187937, 11754), +(1, 187938, 11755), +(1, 187939, 11756), +(1, 187940, 11757), +(1, 187941, 11758), +(1, 187942, 11759), +(1, 187943, 11760), +(1, 187944, 11761), +(1, 187945, 11762), +(1, 187946, 11763), +(1, 187947, 11764), +(1, 187948, 11765), +(1, 187949, 11799), +(1, 187950, 11800), +(1, 187951, 11801), +(1, 187952, 11802), +(1, 187953, 11803), +(1, 187954, 11766), +(1, 187955, 11767), +(1, 187956, 11768), +(1, 187957, 11769), +(1, 187958, 11770), +(1, 187959, 11771), +(1, 187960, 11772), +(1, 187961, 11773), +(1, 187962, 11774), +(1, 187963, 11775), +(1, 187964, 11776), +(1, 187965, 11777), +(1, 187966, 11778), +(1, 187967, 11779), +(1, 187968, 11780), +(1, 187969, 11781), +(1, 187970, 11782), +(1, 187971, 11783), +(1, 187972, 11784), +(1, 187974, 11786), +(1, 187975, 11787), +(1, 194032, 13440), +(1, 194033, 13441), +(1, 194034, 13450), +(1, 194035, 13442), +(1, 194043, 13455), +(1, 194044, 13446), +(1, 194045, 13447), +(1, 194046, 13457), +(1, 194048, 13458), +(1, 194049, 13449); diff --git a/sql/updates/world/2012_11_12_00_world_quest_template.sql b/sql/updates/world/2012_11_12_00_world_quest_template.sql new file mode 100644 index 00000000000..ee2206146b3 --- /dev/null +++ b/sql/updates/world/2012_11_12_00_world_quest_template.sql @@ -0,0 +1,3 @@ +-- Set chaining for Doomguard minion quests +UPDATE `quest_template` SET `PrevQuestId`=7581 WHERE `Id`=7582; -- Complete The Prison's Bindings before The Prison's Casing +UPDATE `quest_template` SET `PrevQuestId`=7582 WHERE `Id`=7583; -- Complete The Prison's Casing before Suppression diff --git a/sql/updates/world/2012_11_12_01_world_misc.sql b/sql/updates/world/2012_11_12_01_world_misc.sql new file mode 100644 index 00000000000..7a5e81c4b1a --- /dev/null +++ b/sql/updates/world/2012_11_12_01_world_misc.sql @@ -0,0 +1,13 @@ +-- update quest linking for Egg Collection +UPDATE `quest_template` SET `NextQuestId`=5522 WHERE `Id`=4735; +-- -------------------------------------------------------------------------------------------------------------- +-- Test of Endurance (Gecko32) +DELETE FROM `event_scripts` WHERE `id`=747 AND `command`=10 AND `datalong`=4100; -- Remove summon of Screeching Harpies +UPDATE `event_scripts` SET `delay`=5 WHERE `id`=747 AND `command`=10 AND `datalong`=4490; -- Lower summon time of Grenka Bloodscreech from 40 sec to 5 sec +-- -------------------------------------------------------------------------------------------------------------- +-- Tapper Swindlekeg (24711) fix Alliance faction exploitation (nelgano) +UPDATE `creature_template` SET `unit_flags`=4864 WHERE `entry`=24711; +-- -------------------------------------------------------------------------------------------------------------- +DELETE FROM `gameobject` WHERE `guid`=335; +INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES +(335,1684,1,1,1,1524.929,-4371.182,17.94367,1.62046,0,0,0,1,300,100,1); diff --git a/sql/updates/world/2012_11_12_02_world_quest_template.sql b/sql/updates/world/2012_11_12_02_world_quest_template.sql new file mode 100644 index 00000000000..8f988bfa4ab --- /dev/null +++ b/sql/updates/world/2012_11_12_02_world_quest_template.sql @@ -0,0 +1,4 @@ +DELETE FROM `gameobject` WHERE `guid`IN (335,347); +INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(335,324,1,1,1,-6314,507.647,7.651,0.496,0,0,0,0,2700,100,1), +(347,1684,1,1,1,1524.929,-4371.182,17.94367,1.62046,0,0,0,1,300,100,1); diff --git a/sql/updates/world/2012_11_12_03_world_misc.sql b/sql/updates/world/2012_11_12_03_world_misc.sql new file mode 100644 index 00000000000..20c91974bbb --- /dev/null +++ b/sql/updates/world/2012_11_12_03_world_misc.sql @@ -0,0 +1,106 @@ +-- Fix Jormungar Tunneler +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=26467; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=26467; +DELETE FROM `smart_scripts` WHERE `entryorguid`=26467 AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(26467,0,0,0,11,0,100,0,0,0,0,0,11,47677,0,0,0,0,0,1,0,0,0,0,0,0,0,'Jormungar Tunneler - On spawn - Spellcast Jormungar Tunnel Passive'), +(26467,0,1,0,21,0,100,0,0,0,0,0,11,47677,0,0,0,0,0,1,0,0,0,0,0,0,0,'Jormungar Tunneler - On reached homeposition - Spellcast Jormungar Tunnel Passive'), +(26467,0,2,0,1,0,100,0,3000,5000,15000,18000,11,51879,0,0,0,0,0,2,0,0,0,0,0,0,0,'Jormungar Tunneler - On update (IC) - Spellcast Corrode Flesh'), +(26467,0,3,0,4,0,100,0,0,0,0,0,28,47677,0,0,0,0,0,1,0,0,0,0,0,0,0,'Jormungar Tunneler - On aggro - Remove Jormungar Tunnel Passive'); +-- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +-- Update Fjord Hawk: Lots of these had incorrect movement. +DELETE FROM `creature_addon` WHERE `guid` IN (112058,112059,112088,112089,112091,112114,112115,112141,112142,112149,112150,112151,112152,112153,112154,112155,112156,112157,112158); +INSERT INTO `creature_addon` (`guid`,`mount`,`bytes1`,`bytes2`,`auras`) VALUES +(112058,0,1,1,''),(112059,0,1,1,''),(112088,0,1,1,''), +(112089,0,1,1,''),(112091,0,1,1,''),(112114,0,1,1,''), +(112115,0,1,1,''),(112141,0,1,1,''),(112142,0,1,1,''), +(112149,0,1,1,''),(112150,0,1,1,''),(112151,0,1,1,''), +(112152,0,1,1,''),(112153,0,1,1,''),(112154,0,1,1,''), +(112155,0,1,1,''),(112156,0,1,1,''),(112157,0,1,1,''),(112158,0,1,1,''); +UPDATE `creature` SET `spawndist`=0, `MovementType`=0 WHERE `guid` IN (112058,112059,112088,112089,112091,112114,112115,112141,112142,112149,112150,112151,112152,112153,112154,112155,112156,112157,112158); +-- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +-- SAI for Lashers +UPDATE `creature_addon` SET `bytes1`=0 WHERE `guid` BETWEEN 88228 AND 88237; +UPDATE `creature_addon` SET `bytes1`=0 WHERE `guid` BETWEEN 131438 AND 131457; +UPDATE `creature_addon` SET `auras`='' WHERE `guid`=131452; +UPDATE `creature_addon` SET `bytes1`=0 WHERE `guid` IN (106897,106898,106899,106900,106902,106903,106909,106910,106911,106912,106913,106914,106915,106916,106917,106918); +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`IN(27254,30845,34300); +DELETE FROM `creature_ai_scripts` WHERE `creature_id`IN(27254,30845,34300); +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (27254,30845,34300) AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +-- Emerald Lasher +(27254,0,0,2,11,0,100,0,0,0,0,0,90,9,0,0,0,0,0,1,0,0,0,0,0,0,0,'Emerald Lasher - On spawn - Set unitfield_bytes1 9 (submerged)'), +(27254,0,1,2,21,0,100,0,0,0,0,0,90,9,0,0,0,0,0,1,0,0,0,0,0,0,0,'Emerald Lasher - On reached homeposition - Set unitfield_bytes1 9 (submerged)'), +(27254,0,2,0,61,0,100,0,0,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Emerald Lasher - Linked with event 0 or 1 - Disable combat movement'), +(27254,0,3,0,4,0,100,0,0,0,0,0,11,37752,0,0,0,0,0,1,0,0,0,0,0,0,0,'Emerald Lasher - On aggro - Spellcast Stand'), +(27254,0,4,0,0,0,100,0,1500,1500,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Emerald Lasher - On update (IC) - Enable combat movement'), +(27254,0,5,0,0,0,100,0,4000,7000,9000,13000,11,51901,0,0,0,0,0,2,0,0,0,0,0,0,0,'Emerald Lasher - On update (IC) - Spellcast Dream Lash'), +-- Living Lasher +(30845,0,0,2,11,0,100,0,0,0,0,0,90,9,0,0,0,0,0,1,0,0,0,0,0,0,0,'Living Lasher - On spawn - Set unitfield_bytes1 9 (submerged)'), +(30845,0,1,2,21,0,100,0,0,0,0,0,90,9,0,0,0,0,0,1,0,0,0,0,0,0,0,'Living Lasher - On reached homeposition - Set unitfield_bytes1 9 (submerged)'), +(30845,0,2,0,61,0,100,0,0,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Living Lasher - Linked with event 0 or 1 - Disable combat movement'), +(30845,0,3,0,4,0,100,0,0,0,0,0,11,37752,0,0,0,0,0,1,0,0,0,0,0,0,0,'Living Lasher - On aggro - Spellcast Stand'), +(30845,0,4,0,0,0,100,0,1500,1500,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Living Lasher - On update (IC) - Enable combat movement'), +(30845,0,5,0,0,0,100,0,4000,7000,9000,13000,11,51901,0,0,0,0,0,2,0,0,0,0,0,0,0,'Living Lasher - On update (IC) - Spellcast Dream Lash'), +-- 34300 Mature Lasher +(34300,0,0,2,11,0,100,0,0,0,0,0,90,9,0,0,0,0,0,1,0,0,0,0,0,0,0,'Mature Lasher - On spawn - Set unitfield_bytes1 9 (submerged)'), +(34300,0,1,2,21,0,100,0,0,0,0,0,90,9,0,0,0,0,0,1,0,0,0,0,0,0,0,'Mature Lasher - On reached homeposition - Set unitfield_bytes1 9 (submerged)'), +(34300,0,2,0,61,0,100,0,0,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Mature Lasher - Linked with event 0 or 1 - Disable combat movement'), +(34300,0,3,0,4,0,100,0,0,0,0,0,11,37752,0,0,0,0,0,1,0,0,0,0,0,0,0,'Mature Lasher - On aggro - Spellcast Stand'), +(34300,0,4,0,0,0,100,0,1500,1500,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Mature Lasher - On update (IC) - Enable combat movement'), +(34300,0,5,0,0,0,100,0,4000,7000,9000,13000,11,51901,0,0,0,0,0,2,0,0,0,0,0,0,0,'Mature Lasher - On update (IC) - Spellcast Dream Lash'); +-- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +-- Secrets of the Scourge +UPDATE `quest_template` SET `PrevQuestId`=0 WHERE `Id`=12312; +-- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +-- Icehorn updates from sniffs +UPDATE `creature_template` SET `speed_run`=0.9920629, `rank`=4, `unit_flags`=32832, `family`=43, `type_flags`=65537 WHERE `entry`=32361; +DELETE FROM `creature_template_addon` WHERE `entry`=32361; +INSERT INTO `creature_template_addon` (`entry`, `mount`, `bytes1`, `bytes2`, `auras`) VALUES +(32361,0,0,1,'60915'); +-- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +-- Dragonblight optical improvements +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (27203,30058); +UPDATE `creature_template` SET `inhabitType`=4 WHERE `entry`=30078; +UPDATE `creature_addon` SET `auras`='' WHERE `guid` IN (131075,131077); +UPDATE `creature_addon` SET `auras`='42048' WHERE `guid`=131066; +UPDATE `creature_addon` SET `auras`='42049' WHERE `guid`=106614; +UPDATE `creature_addon` SET `auras`='42050' WHERE `guid`=131068; +UPDATE `creature_addon` SET `auras`='42051' WHERE `guid`=106634; +UPDATE `creature` SET `spawndist`=0, `MovementType`=0 WHERE `id` IN (27222,27223,30078); +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (-102199,-105487,-105488,-105489,-105495,-131055,-131056,-131058,-131059) AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(-102199,0,0,0,25,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Onslaught Footman - On reset - Set event phase 1'), +(-102199,0,1,2,1,1,100,0,2000,2000,12000,14000,11,48115,0,0,0,0,0,19,27222,30,0,0,0,0,0,'Onslaught Footman - On OOC update (phase 1) - Spellcast Shoot on Archery Target'), +(-102199,0,2,0,61,1,100,0,0,0,0,0,22,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Onslaught Footman - On OOC update (phase 1) - Set event phase 2'), +(-102199,0,3,4,1,2,100,0,16000,18000,16000,18000,11,48117,0,0,0,0,0,19,27223,30,0,0,0,0,0,'Onslaught Footman - On OOC update (phase 2) - Spellcast Shoot on Archery Target'), +(-102199,0,4,0,61,2,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Onslaught Footman - On OOC update (phase 2) - Set event phase 4'), +(-105487,0,0,0,1,0,100,0,2000,2000,0,0,11,55840,0,0,0,0,0,10,107492,0,0,0,0,0,0,'Warden of the Chamber - On reset - Spellcast Blue Wyrmrest Warden Beam'), +(-105488,0,0,0,1,0,100,0,2000,2000,0,0,11,55841,0,0,0,0,0,10,107491,0,0,0,0,0,0,'Warden of the Chamber - On reset - Spellcast Yellow Wyrmrest Warden Beam'), +(-105489,0,0,0,1,0,100,0,2000,2000,0,0,11,55841,0,0,0,0,0,10,107491,0,0,0,0,0,0,'Warden of the Chamber - On reset - Spellcast Yellow Wyrmrest Warden Beam'), +(-105495,0,0,0,1,0,100,0,2000,2000,0,0,11,55840,0,0,0,0,0,10,107492,0,0,0,0,0,0,'Warden of the Chamber - On reset - Spellcast Blue Wyrmrest Warden Beam'), +(-131055,0,0,0,1,0,100,0,2000,2000,0,0,11,55838,0,0,0,0,0,10,131075,0,0,0,0,0,0,'Warden of the Chamber - On reset - Spellcast Green Wyrmrest Warden Beam'), +(-131056,0,0,0,1,0,100,0,2000,2000,0,0,11,55824,0,0,0,0,0,10,131077,0,0,0,0,0,0,'Warden of the Chamber - On reset - Spellcast Red Wyrmrest Warden Beam'), +(-131058,0,0,0,1,0,100,0,2000,2000,0,0,11,55838,0,0,0,0,0,10,131075,0,0,0,0,0,0,'Warden of the Chamber - On reset - Spellcast Green Wyrmrest Warden Beam'), +(-131059,0,0,0,1,0,100,0,2000,2000,0,0,11,55824,0,0,0,0,0,10,131077,0,0,0,0,0,0,'Warden of the Chamber - On reset - Spellcast Red Wyrmrest Warden Beam'); +-- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +-- Borean Tundra visual improvement and missing spawn +SET @GOGUID :=356; -- need 1 set by TDB +SET @GUID :=43460; -- need 3 set by TDB +DELETE FROM `gameobject` WHERE `guid`=@GOGUID; +INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES +(@GOGUID,187879,571,1,1,4207.366,4056.894,91.62077,2.792518,0,0,0.984807,0.1736523,300,100,1); +DELETE FROM `creature` WHERE `guid` in (@GUID+0,@GUID+1,@GUID+2); +INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`,`npcflag`,`unit_flags`,`dynamicflags`) VALUES +(@GUID+0,24021,571,1,1,21999,0,4207.475,4056.687,93.53715,2.094395,300,0,0,42,0,0,0,0,0), +(@GUID+1,23837,571,1,1,11686,0,4207.471,4056.705,93.66189,3.979351,300,0,0,42,0,0,0,0,0), +(@GUID+2,24957,571,1,1,0,0,4200.877,4056.888,92.28766,6.25263,300,0,0,7185,7196,0,0,0,0); +DELETE FROM `smart_scripts` WHERE `entryorguid`=24957 AND `source_type`=0 AND `id` IN (1,3); +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`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 +(24957,0,1,0,11,0,100,0,0,0,0,0,11,45820,0,0,0,0,0,9,24021,0,30,0,0,0,0,'Cult Plaguebringer - On spawn - Spellcast Plague Cauldron Beam'), +(24957,0,3,0,21,0,100,0,0,0,0,0,11,45820,0,0,0,0,0,9,24021,0,30,0,0,0,0,'Cult Plaguebringer - On reached homeposition - Spellcast Plague Cauldron Beam'); +UPDATE `creature_addon` SET `auras`='45797' WHERE `guid` IN (98730,115941); +DELETE FROM `creature_addon` WHERE `guid` IN (@GUID+0,@GUID+1); +INSERT INTO `creature_addon` (`guid`,`mount`,`bytes1`,`bytes2`,`auras`) VALUES +(@GUID+0,0,0,1,'45797'), +(@GUID+1,0,0,1,'45797'); diff --git a/sql/updates/world/2012_11_13_00_world_waypoints.sql b/sql/updates/world/2012_11_13_00_world_waypoints.sql new file mode 100644 index 00000000000..5e4c0aeae13 --- /dev/null +++ b/sql/updates/world/2012_11_13_00_world_waypoints.sql @@ -0,0 +1,35 @@ +-- Pathing for Ol' Sooty Entry: 1225 +SET @NPC := 8877; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawntimesecs`=1200,`spawndist`=0,`MovementType`=2,`position_x`=-5716.181152,`position_y`=-3110.810791,`position_z`=316.686523 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes2`,`mount`,`auras`) VALUES (@NPC,@PATH,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,-5716.181152,-3110.810791,316.686523,0,0,0,100,0), +(@PATH,2,-5716.187012,-3093.080078,325.600677,0,0,0,100,0), +(@PATH,3,-5712.214355,-3090.297607,327.738647,0,0,0,100,0), +(@PATH,4,-5705.484375,-3092.523438,329.362366,0,0,0,100,0), +(@PATH,5,-5681.826660,-3110.568848,338.121887,0,0,0,100,0), +(@PATH,6,-5659.498535,-3122.215576,344.336151,0,0,0,100,0), +(@PATH,7,-5639.585938,-3124.536133,348.404938,0,0,0,100,0), +(@PATH,8,-5618.112793,-3110.905762,360.618225,0,0,0,100,0), +(@PATH,9,-5621.486816,-3096.315918,368.247772,0,0,0,100,0), +(@PATH,10,-5632.212891,-3078.608398,374.990936,0,0,0,100,0), +(@PATH,11,-5629.793457,-3056.124023,384.465576,0,0,0,100,0), +(@PATH,12,-5642.278809,-3036.872314,385.471649,0,0,0,100,0), +(@PATH,13,-5609.369141,-3006.883301,386.288177,0,0,0,100,0), +(@PATH,14,-5643.634277,-3036.388672,385.531891,0,0,0,100,0), +(@PATH,15,-5630.174805,-3057.015869,384.385712,0,0,0,100,0), +(@PATH,16,-5629.840332,-3065.496338,381.129578,0,0,0,100,0), +(@PATH,17,-5634.866211,-3078.448975,374.489044,0,0,0,100,0), +(@PATH,18,-5620.416504,-3101.081543,364.819855,0,0,0,100,0), +(@PATH,19,-5624.629395,-3117.040527,354.493805,0,0,0,100,0), +(@PATH,20,-5644.949707,-3125.081787,347.271362,0,0,0,100,0), +(@PATH,21,-5660.741699,-3121.580566,343.975922,0,0,0,100,0), +(@PATH,22,-5676.210938,-3111.586914,340.021484,0,0,0,100,0), +(@PATH,23,-5691.895508,-3102.994385,333.646698,0,0,0,100,0), +(@PATH,24,-5711.662109,-3088.433594,328.761566,0,0,0,100,0), +(@PATH,25,-5717.663574,-3099.033691,321.686920,0,0,0,100,0), +(@PATH,26,-5705.214844,-3132.324219,315.837585,0,0,0,100,0), +(@PATH,27,-5679.014160,-3185.046875,319.508057,0,0,0,100,0); diff --git a/sql/updates/world/2012_11_13_01_world_misc.sql b/sql/updates/world/2012_11_13_01_world_misc.sql new file mode 100644 index 00000000000..97e3cd8b499 --- /dev/null +++ b/sql/updates/world/2012_11_13_01_world_misc.sql @@ -0,0 +1,120 @@ +-- Various quest fixes in Grizzly Hills + +SET @GUID :=43494; -- need 8 set by TDB +SET @OGUID :=5681; -- need 3 set by TDB + +-- Creature Gossip_menu_option Update from sniff +DELETE FROM `gossip_menu_option` WHERE `menu_id`=9426 AND `id`=0; +DELETE FROM `gossip_menu_option` WHERE `menu_id`=9615 AND `id`=1; +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`) VALUES +(9426,0,0, 'Remove the Eye of the Prophets from the idol''s face.',1,1,0,0,0,0, ''), +(9615,1,0, 'I need another of your elixirs, Drakuru.',1,1,0,0,0,0, ''); + +-- Gossip Menu insert from sniff +DELETE FROM `gossip_menu` WHERE `entry`=9426 AND `text_id` IN (12669,12670); +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES +(9426,12669),(9426,12670); + +-- Creature Template update from sniff +UPDATE `creature_template` SET `minLevel`=70, `maxLevel`=70, `unit_flags`=33024, `AIName`='SmartAI' WHERE `entry` IN (26500); +UPDATE `creature_template` SET `npcflag`=2, `unit_flags`=33024, `AIName`='SmartAI' WHERE `entry` IN (26543,26701,26787); + +UPDATE `creature_loot_template` SET `ChanceOrQuestChance`=61 WHERE `item`=35799 AND `entry`=26447; +UPDATE `creature_loot_template` SET `ChanceOrQuestChance`=58 WHERE `item`=35799 AND `entry`=26425; +UPDATE `creature_loot_template` SET `ChanceOrQuestChance`=100 WHERE `item`=35836; +UPDATE `creature_loot_template` SET `ChanceOrQuestChance`=49 WHERE `item`=36743 AND `entry`=26704; +UPDATE `creature_loot_template` SET `ChanceOrQuestChance`=50 WHERE `item`=36743 AND `entry`=27554; +UPDATE `creature_loot_template` SET `ChanceOrQuestChance`=51 WHERE `item`=36758 AND `entry`=26795; +UPDATE `creature_loot_template` SET `ChanceOrQuestChance`=48 WHERE `item`=36758 AND `entry`=26797; +UPDATE `creature_loot_template` SET `ChanceOrQuestChance`=66 WHERE `item`=38303 AND `entry`=26620; +UPDATE `creature_loot_template` SET `ChanceOrQuestChance`=67 WHERE `item`=38303 AND `entry`=26639; +UPDATE `creature_loot_template` SET `ChanceOrQuestChance`=15 WHERE `item`=38303 AND `entry`=27431; + +UPDATE `creature_involvedrelation` SET `id`=26543 WHERE `quest`=12007; +UPDATE `creature_involvedrelation` SET `id`=26701 WHERE `quest`=12802; +UPDATE `creature_involvedrelation` SET `id`=26787 WHERE `quest`=12068; +UPDATE `creature_questrelation` SET `id`=26543 WHERE `quest`=12042; +UPDATE `creature_questrelation` SET `id`=26701 WHERE `quest`=12068; +UPDATE `creature_questrelation` SET `id`=26787 WHERE `quest`=12238; + +DELETE FROM `creature_text` WHERE `entry`=26500; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(26500,0,0,'I''ll be waitin'' for ya, mon.',15,0,100,0,0,0,'Image of Drakuru'); + +-- Conditions +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=47110; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=9426 AND `SourceEntry`=12670; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=9426 AND `SourceEntry`=0; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=9615 AND `SourceEntry`=1; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(13,1,47110,0,0,31,0,3,26498,0,0,0,'','Spell Summon Drakuru''s Image targets Drakuru''s Bunny 01'), +(13,1,47110,0,1,31,0,3,26559,0,0,0,'','Spell Summon Drakuru''s Image targets Drakuru''s Bunny 02'), +(13,1,47110,0,2,31,0,3,26700,0,0,0,'','Spell Summon Drakuru''s Image targets Drakuru''s Bunny 03'), +(13,1,47110,0,3,31,0,3,26789,0,0,0,'','Spell Summon Drakuru''s Image targets Drakuru''s Bunny 04'), +(13,1,47110,0,4,31,0,3,28015,0,0,0,'','Spell Summon Drakuru''s Image targets Drakuru''s Bunny 05'), +(14,9426,12670,0,0,2,0,35806,1,1,0,0,'','Seer of Zeb''Halak - Show different gossip if player has item Eye of the Propehts'), +(15,9426,0,0,0,9,0,12007,0,0,0,0,'','Seer of Zeb''Halak - Show gossip option if player has taken quest 12007'), +(15,9426,0,0,0,2,0,35806,1,1,1,0,'','Seer of Zeb''Halak - Show gossip option if player has not item Eye of the Propehts'), +(15,9615,1,0,0,8,0,11990,0,0,0,0,'','Drakuru - Show gossip option if player has rewarded quest 11990'), +(15,9615,1,0,0,8,0,12238,0,0,1,0,'','Drakuru - Show gossip option if player has not rewarded quest 12238'), +(15,9615,1,0,0,2,0,35797,1,1,1,0,'','Drakuru - Show gossip option if player has not item Drakuru''s Elixir'); + +UPDATE `gameobject_template` SET `AIName`='SmartGameObjectAI' WHERE `entry`=188458; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (26498,26559,26700,26789); + +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (26498,26500,26543,26559,26700,26701,26787,26789) AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid`=26423 AND `source_type`=0 AND `id` IN (2,3); +DELETE FROM `smart_scripts` WHERE `entryorguid`=188458 AND `source_type`=1; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`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 +(26423,0,2,3,62,0,100,0,9615,1,0,0,85,50021,0,0,0,0,0,7,0,0,0,0,0,0,0,'Drakuru - On gossip option select - Invoker spellcast Replace Drakuru''s Elixir'), +(26423,0,3,0,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Drakuru - On gossip option select - Close gossip'), +(26498,0,0,0,8,0,100,0,47110,0,0,0,11,47117,0,0,0,0,0,7,0,0,0,0,0,0,0,'Drakuru''s Bunny 01 - On spellhit - Spellcast Script Cast Summon Image of Drakuru'), +(26500,0,0,1,19,0,100,0,12007,0,0,0,1,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Image of Drakuru - On quest accepted - Say text'), +(26500,0,1,0,61,0,100,0,12007,0,0,0,11,47122,0,0,0,0,0,7,0,0,0,0,0,0,0,'Image of Drakuru - On quest accepted - Spellcast Strip Detect Drakuru'), +(26543,0,0,1,19,0,100,0,12042,0,0,0,11,47308,0,0,0,0,0,7,0,0,0,0,0,0,0,'Image of Drakuru - On quest accepted - Spellcast Strip Detect Drakuru 02'), +(26559,0,0,0,8,0,100,0,47110,0,0,0,11,47149,0,0,0,0,0,7,0,0,0,0,0,0,0,'Drakuru''s Bunny 02 - On spellhit - Spellcast Script Cast Summon Image of Drakuru 02'), +(26700,0,0,0,8,0,100,0,47110,0,0,0,11,47316,0,0,0,0,0,7,0,0,0,0,0,0,0,'Drakuru''s Bunny 03 - On spellhit - Spellcast Script Cast Summon Image of Drakuru 03'), +(26701,0,0,1,19,0,100,0,12068,0,0,0,11,47403,0,0,0,0,0,7,0,0,0,0,0,0,0,'Image of Drakuru - On quest accepted - Spellcast Strip Detect Drakuru 03'), +(26787,0,0,1,19,0,100,0,12238,0,0,0,11,48417,0,0,0,0,0,7,0,0,0,0,0,0,0,'Image of Drakuru - On quest accepted - Spellcast Strip Detect Drakuru 04'), +(26789,0,0,0,8,0,100,0,47110,0,0,0,11,47405,0,0,0,0,0,7,0,0,0,0,0,0,0,'Drakuru''s Bunny 04 - On spellhit - Spellcast Script Cast Summon Image of Drakuru 04'), +(188458,1,0,1,62,0,100,0,9426,0,0,0,85,47293,0,0,0,0,0,7,0,0,0,0,0,0,0,'Seer of Zeb''Halak - On gossip option select - Invoker spellcast Create Eye of the Prophets'), +(188458,1,1,0,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Seer of Zeb''Halak - On gossip option select - Close gossip'); + +DELETE FROM `spell_scripts` WHERE `id` IN (47117,47149,47316,47405,50439); +INSERT INTO `spell_scripts` (`id`,`effIndex`,`delay`,`command`,`datalong`,`datalong2`,`dataint`,`x`,`y`,`z`,`o`) VALUES +(47117,0,0,15,47118,2,0,0,0,0,0), -- Script Cast Summon Image of Drakuru - Spellcast Envision Drakuru +(47149,0,0,15,47150,2,0,0,0,0,0), -- Script Cast Summon Image of Drakuru 02 - Spellcast Envision Drakuru +(47316,0,0,15,47317,2,0,0,0,0,0), -- Script Cast Summon Image of Drakuru 03 - Spellcast Envision Drakuru +(47405,0,0,15,47406,2,0,0,0,0,0), -- Script Cast Summon Image of Drakuru 04 - Spellcast Envision Drakuru +(50439,0,0,15,50440,2,0,0,0,0,0); -- Script Cast Summon Image of Drakuru 05 - Spellcast Envision Drakuru + +DELETE FROM `spell_linked_spell` WHERE `spell_trigger` IN (-47122,-47308,-47403,-48417); +INSERT INTO `spell_linked_spell` (`spell_trigger`,`spell_effect`,`type`,`comment`) VALUES +(-47122,-47118,0,'On Strip Detect Drakuru fade - Remove Envision Drakuru'), +(-47308,-47150,0,'On Strip Detect Drakuru 02 fade - Remove Envision Drakuru'), +(-47403,-47317,0,'On Strip Detect Drakuru 03 fade - Remove Envision Drakuru'), +(-48417,-47406,0,'On Strip Detect Drakuru 04 fade - Remove Envision Drakuru'); + +DELETE FROM `creature` WHERE `guid` in (@GUID+0,@GUID+1,@GUID+2,@GUID+3,@GUID+4,@GUID+5,@GUID+6,@GUID+7); +INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`,`npcflag`,`unit_flags`,`dynamicflags`) VALUES +(@GUID+0,26498,571,1,1,19595,0,3386.607,-1805.944,115.2497,3.001966,300,0,0,0,0,0,0,0,0), +(@GUID+1,26500,571,1,1,0,0,3386.272,-1805.434,115.4441,4.939282,300,0,0,0,0,0,0,0,0), +(@GUID+2,26559,571,1,1,19595,0,4243.962,-2024.805,238.2487,1.411705,300,0,0,0,0,0,0,0,0), +(@GUID+3,26543,571,1,1,0,0,4243.962,-2024.805,238.2487,1.411705,300,0,0,0,0,0,0,0,0), +(@GUID+4,26700,571,1,1,19595,0,4523.894,-3472.863,228.2441,4.695459,300,0,0,0,0,0,0,0,0), +(@GUID+5,26701,571,1,1,0,0,4523.894,-3472.863,228.2441,4.695459,300,0,0,0,0,0,0,0,0), +(@GUID+6,26787,571,1,1,0,0,4599.709,-4876.9,48.95556,0.719772,300,0,0,0,0,0,0,0,0), +(@GUID+7,26789,571,1,1,19595,0,4599.709,-4876.9,48.95556,0.719772,300,0,0,0,0,0,0,0,0); + +DELETE FROM `creature_template_addon` WHERE `entry` IN (26500,26543,26701,26787); +INSERT INTO `creature_template_addon` (`entry`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES +(26500,0,0,65536,1,0,'43167 47119'), +(26543,0,0,65536,1,0,'43167 47119'), +(26701,0,0,65536,1,0,'43167 47119'), +(26787,0,0,65536,1,0,'43167 47119'); + +DELETE FROM `gameobject` WHERE `guid` BETWEEN @OGUID+0 AND @OGUID+2; +INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(@OGUID+0,188600,571,1,1,3980.721,-1956.352,210.6624,1.169369,0,0,0,1,120,255,1), +(@OGUID+1,188600,571,1,1,3957.188,-1908.295,209.97,0.8901166,0,0,0,1,120,255,1), +(@OGUID+2,188600,571,1,1,3964.761,-1884.524,208.2739,1.692969,0,0,0,1,120,255,1); diff --git a/sql/updates/world/2012_11_13_02_world_creature.sql b/sql/updates/world/2012_11_13_02_world_creature.sql new file mode 100644 index 00000000000..19f278ca5c6 --- /dev/null +++ b/sql/updates/world/2012_11_13_02_world_creature.sql @@ -0,0 +1,3 @@ +-- Fix [Q]{A/H} Meet At The Grave +UPDATE `creature_template_addon` SET `auras`='10848' WHERE `entry`=9299; -- allow to be seen in world of death +UPDATE `creature_template` SET `npcflag`=32770,`unit_flags`=768 WHERE `entry`=9299; -- makes unseen in world of living diff --git a/sql/updates/world/2012_11_13_03_world_gameevent.sql b/sql/updates/world/2012_11_13_03_world_gameevent.sql new file mode 100644 index 00000000000..fbb24b863f2 --- /dev/null +++ b/sql/updates/world/2012_11_13_03_world_gameevent.sql @@ -0,0 +1,2 @@ +-- Pilgrim's Bounty start time fix +UPDATE `game_event` SET `start_time`= '2012-11-18 01:00:00' WHERE `eventEntry`=26; diff --git a/sql/updates/world/2012_11_13_04_world_gameeventquest.sql b/sql/updates/world/2012_11_13_04_world_gameeventquest.sql new file mode 100644 index 00000000000..cce654859e0 --- /dev/null +++ b/sql/updates/world/2012_11_13_04_world_gameeventquest.sql @@ -0,0 +1,3 @@ +-- Fix Pilgrims Bounty quest during Hallows End +INSERT INTO `game_event_creature_quest` (`eventEntry`,`id`,`quest`) VALUES (26,18927,14022); +DELETE FROM `creature_questrelation` WHERE `id`=18927; diff --git a/sql/updates/world/2012_11_13_05_world_player_factionchange_items.sql b/sql/updates/world/2012_11_13_05_world_player_factionchange_items.sql new file mode 100644 index 00000000000..17b9616624a --- /dev/null +++ b/sql/updates/world/2012_11_13_05_world_player_factionchange_items.sql @@ -0,0 +1,4 @@ +DELETE FROM `player_factionchange_items` WHERE `alliance_id` IN (15198, 47937); +INSERT INTO `player_factionchange_items` (`race_A`, `alliance_id`, `commentA`, `race_H`, `horde_id`, `commentH`) VALUES +(0, 15198, 'Knight\'s Colors', 0, 15199, 'Stone Guard\'s Herald'), +(0, 47937, 'Girdle of the Nether Champion', 0, 48009, 'Belt of the Nether Champion'); diff --git a/sql/updates/world/2012_11_13_06_world_trinity_string.sql b/sql/updates/world/2012_11_13_06_world_trinity_string.sql new file mode 100644 index 00000000000..2834a8f900b --- /dev/null +++ b/sql/updates/world/2012_11_13_06_world_trinity_string.sql @@ -0,0 +1,2 @@ +DELETE FROM `trinity_string` WHERE `entry` IN (5018,5019); +UPDATE `trinity_string` SET `content_default`= '[Raid]' WHERE `entry`=5017; diff --git a/sql/updates/world/2012_11_14_00_world_sai.sql b/sql/updates/world/2012_11_14_00_world_sai.sql new file mode 100644 index 00000000000..98467fe4f3a --- /dev/null +++ b/sql/updates/world/2012_11_14_00_world_sai.sql @@ -0,0 +1,16 @@ +SET @ENTRY_SPIRIT_SHADE := 15261; +SET @ENTRY_LETHON := 14888; +SET @SPELL_DARK_OFFERING := 24804; + +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY_SPIRIT_SHADE; +UPDATE `creature_template` SET `AIName`= '',`ScriptName`= 'npc_spirit_shade' WHERE `entry`=@ENTRY_SPIRIT_SHADE; + +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY_SPIRIT_SHADE AND `source_type`=0; + +DELETE FROM `creature_template_addon` WHERE `entry`=@ENTRY_SPIRIT_SHADE; +INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`auras`) VALUES +(@ENTRY_SPIRIT_SHADE,0,0,0, '24809'); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=@SPELL_DARK_OFFERING; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(13,1,@SPELL_DARK_OFFERING,0,0,31,0,3,@ENTRY_LETHON,0,0,0, '', 'Dark offering can only target Lethon'); diff --git a/sql/updates/world/2012_11_14_00_world_various_fixes.sql b/sql/updates/world/2012_11_14_00_world_various_fixes.sql new file mode 100644 index 00000000000..5946c82e92c --- /dev/null +++ b/sql/updates/world/2012_11_14_00_world_various_fixes.sql @@ -0,0 +1,307 @@ +-- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +-- Mounts players mode 25 +UPDATE `creature_template` SET `VehicleId`=220,`spell1`=56091,`spell2`=56092,`spell3`=57090,`spell4`=57143,`spell5`=57108,`spell6`=57092,`spell7`=60534,`InhabitType`=5 WHERE `entry`=31752; +-- Hover Disk mode 25 +UPDATE `creature_template` SET `VehicleId`=224,`faction_A`=35,`faction_H`=35,`InhabitType`=5 WHERE `entry` IN (31749,31748); +-- spawn the focusing iris 25men +DELETE FROM gameobject WHERE id IN (193960); +INSERT INTO `gameobject` +(`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES +(361,193960,616,2,1,754.362,1301.61,266.171,6.23742,0,0,0.022883,-0.999738,300,0,1); +-- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +-- The Heart of the Storm (Issue 1959) +DELETE FROM `gameobject` WHERE `id`=192181; +INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES +(362,192181,571,1,1,7308.945,-727.9163,791.6083,1.53589,0,0,0.690772,0.723073,30,100,1); +-- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +-- Add support for {Q} Corrupted Sabers ID: 4506 (Issue 2297) +SET @CommonKitten:=9937; +SET @CorruptedKitten :=9936; +SET @SGossip :=55002; -- Gossip for Kitten when near quest giver +SET @SpellVisual :=16510; -- Turn Kitten in Saber +SET @Winna :=9996; -- Winna Hazzard +SET @Saber :=10042; -- Big green cat +-- Add SAI support for Corrupted Kitten +UPDATE `creature_template` SET `AIName`='SmartAI',`gossip_menu_id`=@SGossip,`npcflag`=1 WHERE `entry`=@CorruptedKitten; +UPDATE `creature_template` SET `AIName`='SmartAI',`gossip_menu_id`=@SGossip,`npcflag`=1 WHERE `entry`=@CommonKitten; +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@CorruptedKitten,@CommonKitten); +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 +(@CommonKitten,0,0,1,54,0,100,0,0,0,0,0,36,@CorruptedKitten,0,0,0,0,0,1,0,0,0,0,0,0,0,'Common Kitten - On spawn - Change template to corrupted one'), +(@CommonKitten,0,1,2,61,0,100,0,0,0,0,0,11,@SpellVisual,0,0,0,0,0,1,0,0,0,0,0,0,0,'Common Kitten - On OOC of 10 sec - Cast Corrupted Saber visual to self'), +(@CommonKitten,0,2,0,61,0,100,0,0,0,0,0,3,@Saber,0,0,0,0,0,1,0,0,0,0,0,0,0,'Common Kitten - Linked with previous event - Morph to Corrupted Saber'), +(@CommonKitten,0,3,4,62,0,100,0,@SGossip,1,0,0,26,4506,0,0,0,0,0,7,0,0,0,0,0,0,0,'Common Kitten - On Gossip Select - Award quest,since no credit'), +(@CommonKitten,0,4,5,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Common Kitten - Linked with previous event - Close gossip'), +(@CommonKitten,0,5,6,61,0,100,0,0,0,0,0,47,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Common Kitten - Linked with previous event - Set unseen'), +(@CommonKitten,0,6,0,61,0,100,0,0,0,0,0,41,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Common Kitten - Linked with previous event - Despawn in 1 sec'); +-- Insert Gossip /custom made id/ +DELETE FROM `gossip_menu_option` WHERE `menu_id`=@SGossip AND `id`=1; +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`) VALUES +(@SGossip,1,0,'I want to release the saber to Winna.',1,131,0); +-- Only show gossip if near Winna +DELETE FROM `conditions` WHERE `SourceGroup`=@SGOSSIP AND `SourceTypeOrReferenceId`=15; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(15,@SGOSSIP,1,0,29,1,@Winna,5,0,0,0,'','Only show second gossip Corrupted Saber is near Wina in 5 yards'); +-- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +-- Fix for Prepping the Speech by Gecko32 (Issue 2399) +SET @MEKKATORQUE :=39712; +SET @OZZIE :=1268; +SET @MILLI :=7955; +SET @TOG :=6119; +-- Add creature text for npc's +DELETE FROM `creature_text` WHERE `entry`=@MEKKATORQUE; +DELETE FROM `creature_text` WHERE `entry`=@OZZIE; +DELETE FROM `creature_text` WHERE `entry`=@MILLI; +DELETE FROM `creature_text` WHERE `entry`=@TOG; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@MEKKATORQUE,0,0,'They may take our lives, but they''ll never take...',12,0,100,0,0,0,'High Tinker Mekkatorque to Milli Featherwhistle 1'), +(@MEKKATORQUE,1,0,'...our INNOVATION!',12,0,100,0,0,0,'High Tinker Mekkatorque to Milli Featherwhistle 2'), +(@MEKKATORQUE,2,0,'What I want out of each and every one of you is a hard-target search of every refuelling station, residence, warehouse, farmhouse, henhouse, outhouse, and doghouse in this area.',12,0,100,0,0,0,'High Tinker Mekkatorque to Ozzie Togglevolt 1'), +(@MEKKATORQUE,3,0,'Your fugitive''s name is Mekgineer Thermaplugg.',12,0,100,0,0,0,'High Tinker Mekkatorque to Ozzie Togglevolt 2'), +(@MEKKATORQUE,4,0,'Go get him.',12,0,100,0,0,0,'High Tinker Mekkatorque to Ozzie Togglevolt 3'), +(@MEKKATORQUE,5,0,'We will not go quietly into the night! We will not vanish without a fight!',12,0,100,0,0,0,'High Tinker Mekkatorque to Tog Rustsprocket 1'), +(@MEKKATORQUE,6,0,'We''re going to live on! We''re going to survive! Today we celebrate...',12,0,100,0,0,0,'High Tinker Mekkatorque to Tog Rustsprocket 2'), +(@MEKKATORQUE,7,0,'...our Autonomy Day!',12,0,100,0,0,0,'High Tinker Mekkatorque to Tog Rustsprocket 3'), +(@OZZIE,0,0,'Hmm, I suppose it could work. But it could really use a little more umph!',12,0,100,0,0,0,'Ozzie Togglevolt reply'), +(@MILLI,0,0,'What? I don''t even know what you''re talking about! That''s terrible!',12,0,100,0,0,0,'Milli Featherwhistle reply'), +(@TOG,0,0,'Horrible! Well, all right,maybe it just needs a little cleaning up?',12,0,100,0,0,0,'Tog Rustsprocket reply'); +-- Add SAI for Milli Featherwhistle +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@MILLI; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@MILLI; +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 +(@MILLI,0,0,0,8,0,100,1,74222,0,0,0,1,0,2000,0,0,0,0,11,@MEKKATORQUE,10,0,0.0,0.0,0.0,0.0,'Milli Featherwhistle - On spell hit - High Tinker Mekkatorque say part1'), +(@MILLI,0,1,0,52,0,100,0,0,@MEKKATORQUE,0,0,1,1,4000,0,0,0,0,11,@MEKKATORQUE,10,0,0.0,0.0,0.0,0.0,'Milli Featherwhistle - On text over - High Tinker Mekkatorque say part2'), +(@MILLI,0,2,3,52,0,100,0,1,@MEKKATORQUE,0,0,1,0,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'Milli Featherwhistle - On text over - Reply'), +(@MILLI,0,3,4,61,0,100,0,0,0,0,0,33,@MILLI,0,0,0,0,0,7,0,0,0,0.0,0.0,0.0,0.0,'Milli Featherwhistle - On link - credit quest'), +(@MILLI,0,4,0,61,0,100,0,0,0,0,0,45,1,1,0,0,0,0,11,@MEKKATORQUE,10,0,0.0,0.0,0.0,0.0,'Milli Featherwhistle - On link - set data 1'); +-- Add SAI for Ozzie Togglevolt +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@OZZIE; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@OZZIE; +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 +(@OZZIE,0,0,0,8,0,100,1,74222,0,0,0,1,2,2000,0,0,0,0,11,@MEKKATORQUE,10,0,0.0,0.0,0.0,0.0,'Ozzie Togglevolt - On spell hit - High Tinker Mekkatorque say part1'), +(@OZZIE,0,1,0,52,0,100,0,2,@MEKKATORQUE,0,0,1,3,4000,0,0,0,0,11,@MEKKATORQUE,10,0,0.0,0.0,0.0,0.0,'Ozzie Togglevolt - On text over - High Tinker Mekkatorque say part2'), +(@OZZIE,0,2,0,52,0,100,0,3,@MEKKATORQUE,0,0,1,4,4000,0,0,0,0,11,@MEKKATORQUE,10,0,0.0,0.0,0.0,0.0,'Ozzie Togglevolt - On text over - High Tinker Mekkatorque say part3'), +(@OZZIE,0,3,4,52,0,100,0,4,@MEKKATORQUE,0,0,1,0,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'Ozzie Togglevolt - On text over - Reply'), +(@OZZIE,0,4,5,61,0,100,0,0,0,0,0,33,@OZZIE,0,0,0,0,0,7,0,0,0,0.0,0.0,0.0,0.0,'Milli Featherwhistle - On link - credit quest'), +(@OZZIE,0,5,0,61,0,100,0,0,0,0,0,45,1,1,0,0,0,0,11,@MEKKATORQUE,10,0,0.0,0.0,0.0,0.0,'Milli Featherwhistle - On link - set data 1'); +-- Add SAI for Tog Rustsprocket +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@TOG; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@TOG; +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 +(@TOG,0,0,0,8,0,100,1,74222,0,0,0,1,5,2000,0,0,0,0,11,@MEKKATORQUE,10,0,0.0,0.0,0.0,0.0,'Tog Rustsprocket - On spell hit - High Tinker Mekkatorque say part1'), +(@TOG,0,1,0,52,0,100,0,5,@MEKKATORQUE,0,0,1,6,4000,0,0,0,0,11,@MEKKATORQUE,10,0,0.0,0.0,0.0,0.0,'Tog Rustsprocket - On text over - High Tinker Mekkatorque say part2'), +(@TOG,0,2,0,52,0,100,0,6,@MEKKATORQUE,0,0,1,7,4000,0,0,0,0,11,@MEKKATORQUE,10,0,0.0,0.0,0.0,0.0,'Tog Rustsprocket - On text over - High Tinker Mekkatorque say part3'), +(@TOG,0,3,4,52,0,100,0,7,@MEKKATORQUE,0,0,1,0,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'Tog Rustsprocket - On text over - Reply'), +(@TOG,0,4,5,61,0,100,0,0,0,0,0,33,@TOG,0,0,0,0,0,7,0,0,0,0.0,0.0,0.0,0.0,'Tog Rustsprocket - On link - credit quest'), +(@TOG,0,5,0,61,0,100,0,0,0,0,0,45,1,1,0,0,0,0,11,@MEKKATORQUE,10,0,0.0,0.0,0.0,0.0,'Tog Rustsprocket - On link - set data 1'); +-- Add SAI for High Tinker Mekkatorque +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@MEKKATORQUE; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@MEKKATORQUE; +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 +(@MEKKATORQUE,0,0,0,38,0,100,1,1,1,0,0,41,1000,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'High Tinker Mekkatorque - on data set- despawn'); +-- add prev quest id to both Words for Delivery +UPDATE `quest_template` SET `PrevQuestId`=25283 WHERE `Id`=25500;-- below 75 +UPDATE `quest_template` SET `PrevQuestId`=25283 WHERE `Id`=25286;-- 75+ +-- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +-- Where the Wild Things Roam by Shlomi155 (Issue 3038) +-- Quest item will work only at Dragonblight and if the quest is incomplete! +DELETE FROM `conditions` WHERE SourceEntry=47627; +INSERT INTO `conditions` VALUES +(17,0,47627,0,0,9,0,12111,0,0,0,0,'',NULL), +(17,0,47627,0,0,23,0,65,0,0,0,0,'',NULL); +UPDATE `creature_template` SET AIName='SmartAI' WHERE entry IN (26615,26482); +DELETE FROM `creature_ai_scripts`where creature_id IN (26615,26482); +DELETE FROM `smart_scripts` WHERE entryorguid IN (26615,26482); +INSERT INTO `smart_scripts` VALUES +(26615,0,0,0,9,0,100,1,0,5,8000,12000,11,15976,0,0,0,0,0,2,0,0,0,0,0,0,0,'Snowfall Elk - Cast Puncture'), +(26615,0,1,2,23,0,100,1,47628,1,1,1,11,47675,0,0,0,0,0,1,0,0,0,0,0,0,0,'Snowfall Elk - On Aura - Cast Recently Inoculated'), +(26615,0,2,3,61,0,100,1,0,0,0,0,33,26895,0,0,0,0,0,18,40,0,0,0,0,0,0,'Snowfall Elk - Event Linked - Credit'), +(26615,0,3,0,61,0,100,1,0,0,0,0,41,5000,0,0,0,0,0,1,0,0,0,0,0,0,0,'Snowfall Elk - Event Linked - Despawn Delay 5 Seconds'), +(26482,0,0,1,23,0,100,1,47628,1,1,1,11,47675,0,0,0,0,0,1,0,0,0,0,0,0,0,'Arctic Grizzly - On Aura - Cast Recently Inoculated'), +(26482,0,1,2,61,0,100,1,0,0,0,0,33,26882,0,0,0,0,0,18,40,0,0,0,0,0,0,'Arctic Grizzly - Event Linked - Credit'), +(26482,0,2,0,61,0,100,1,0,0,0,0,41,5000,0,0,0,0,0,1,0,0,0,0,0,0,0,'Arctic Grizzly - Event Linked - Despawn Delay 5 Seconds'); +-- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +-- [Q] [A/H] Catch the Wild Wolpertinger! by Discover (Issue 3131) +-- Wild Wolpertinger SAI +SET @WOLPERTINGER :=23487; +SET @SPELL_NET :=41621; +SET @SPELL_CREATE_ITEM :=41622; +UPDATE `creature_template` SET `AIName`='SmartAI',`unit_flags`=`unit_flags`|512 WHERE `entry`=@WOLPERTINGER; +UPDATE `creature` SET `position_x`=24.539537 WHERE `guid`=207045 AND `id`=@WOLPERTINGER; -- For some reason this one was spawned in air +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@WOLPERTINGER; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@WOLPERTINGER; +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 +(@WOLPERTINGER,0,0,1,8,0,100,0,@SPELL_NET,0,0,0,11,@SPELL_CREATE_ITEM,2,0,0,0,0,7,0,0,0,0,0,0,0,"Wild Wolpertinger - On Spellhit - Cast Create Stunned Wolpertinger Item"), +(@WOLPERTINGER,0,1,0,61,0,100,0,0,0,0,0,41,4000,0,0,0,0,0,1,0,0,0,0,0,0,0,"Wild Wolpertinger - On Spellhit - Forced Despawn"); +-- Condition for spell Wolpertinger Net +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=@SPELL_NET; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition` ,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(17,0,@SPELL_NET,0,0,31,1,3,@WOLPERTINGER,0,0,0,'','Net can only hit Wolpertingers'); +-- Update Wolpetinger flags to remove immunity to players,was 768 before +UPDATE `creature_template` SET `unit_flags`=512 WHERE `entry`=@WOLPERTINGER; +-- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +-- Fix quest Blinding the Eyes in the Sky ID: 13313 by Trista (Issue 3225) +SET @ReconFighter :=32189; +SET @Spell :=60079; +-- Add SAI support Skybreaker Recon +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ReconFighter; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ReconFighter; +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 +(@ReconFighter,0,0,1,8,0,100,0,@Spell,0,0,0,33,@ReconFighter,0,0,0,0,0,7,0,0,0,0,0,0,0,'Skybreaker Recon - On spell hit - Give kill credit to invoker'), +(@ReconFighter,0,1,0,61,0,100,0,0,0,0,0,37,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Skybreaker Recon - Linked with previous event - Kill self'); +-- Update Vehicle_Accesorry to die along with the vehicle,otherwise little untargetable dwards fall on ground +UPDATE `vehicle_template_accessory` SET `minion`=1 WHERE `entry`=32189 AND `seat_id`=0; +-- Add conditions for spell to target only alive Recons +DELETE FROM `conditions` WHERE `SourceEntry`=@Spell and `SourceTypeOrReferenceId`=17; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(17,0,@Spell,0,0,36,1,0,0,0,0,0,'','Fire SGM-3 can hit only alive Recon Fighter'), +(17,0,@Spell,0,0,31,1,3,@ReconFighter,0,0,0,'','Fire SGM-3 can hit Recon Fighter'); +-- Keeping the Alliance Blind ID: 13331 quest requirements +UPDATE `quest_template` SET `PrevQuestId`=13313 WHERE `Id`=13331; +-- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +-- Cleansing Drak'Tharon by gecko32 (Issue 3351) +-- Update Item Enduring Mojo is normal drop not quest drop +UPDATE `creature_loot_template` SET `ChanceOrQuestChance` = ABS(`ChanceOrQuestChance`) WHERE `item`=38303; +-- Add gossip menu option +DELETE FROM `gossip_menu_option` WHERE `menu_id`=9615 AND `id`=1; +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`) VALUES +(9615,1,0,'I need another of your elixirs, Drakuru.',1,1,0,0,0,0,''); +-- Add Conditions for Gossip +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=9615 AND `SourceEntry`=1; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(15,9615,1,0,1,2,0,35797,1,0,1,0,'','Drakuru''s Elixir - Must not already have item'), +(15,9615,1,0,1,28,0,11991,0,0,0,0,'','Drakuru''s Elixir - Must have quest Subject to Interpretation'), +(15,9615,1,0,2,2,0,35797,1,0,1,0,'','Drakuru''s Elixir - Must not already have item'), +(15,9615,1,0,2,9,0,12007,0,0,0,0,'','Drakuru''s Elixir - Must have quest Sacrifices Must be Made'), +(15,9615,1,0,3,2,0,35797,1,0,1,0,'','Drakuru''s Elixir - Must not already have item'), +(15,9615,1,0,3,28,0,12802,0,0,0,0,'','Drakuru''s Elixir - Must have quest My Heart is in Your Hands'), +(15,9615,1,0,4,2,0,35797,1,0,1,0,'','Drakuru''s Elixir - Must not already have item'), +(15,9615,1,0,4,9,0,12068,0,0,0,0,'','Drakuru''s Elixir - Must have quest Voices From the Dust'), +(15,9615,1,0,5,2,0,35797,1,0,1,0,'','Drakuru''s Elixir - Must not already have item'), +(15,9615,1,0,5,28,0,12238,0,0,0,0,'','Drakuru''s Elixir - Must have quest Cleansing Drak''Tharon'); +-- Add SmartAI to give item +DELETE FROM `smart_scripts` WHERE `entryorguid`=26423 AND `id` IN (2,3); +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`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 +(26423,0,2,3,62,0,100,0,9615,1,0,0,11,50021,2,0,0,0,0,7,0,0,0,0,0,0,0,'Drakuru - On gossip option select - cast Replace Drakuru''s Elixir'), +(26423,0,3,0,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Drakuru - On gossip option select - close gossip'); +-- Add TEMP Drakuru's Brazier In Drak'tharon Keep +DELETE FROM `gameobject` WHERE `guid`=364; +INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES +(364,300188,600,3,1,-236.766,-614.774,116.487,1.5708,0,0,0,1,300,100,1); +-- Conditions for spell Target +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=47110; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(13,1,47110,0,1,31,0,3,26498,0,0,0,'',NULL),-- Drakuru's Bunny 01 +(13,1,47110,0,2,31,0,3,26559,0,0,0,'',NULL),-- Drakuru's Bunny 02 +(13,1,47110,0,3,31,0,3,26700,0,0,0,'',NULL),-- Drakuru's Bunny 03 +(13,1,47110,0,4,31,0,3,26789,0,0,0,'',NULL),-- Drakuru's Bunny 04 +(13,1,47110,0,5,31,0,3,28015,0,0,0,'',NULL); -- Drakuru's Bunny 05 +-- Add Smart AI Drakuru Bunny +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (26498,26559,26700,26789,28015); +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (26498,26559,26700,26789,28015); +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 +(26498,0,0,0,8,0,100,0,47110,0,0,0,12,26500,3,50000,0,0,0,8,0,0,0,3386.26,-1805.32,114.909,4.945,'Drakuru Bunny 01- On Spellhit - Summmon Image of Drakuru'), +(26559,0,0,0,8,0,100,0,47110,0,0,0,12,26543,3,50000,0,0,0,8,0,0,0,4243.98,-2025.08,238.248,1.431,'Drakuru Bunny 02- On Spellhit - Summmon Image of Drakuru'), +(26700,0,0,0,8,0,100,0,47110,0,0,0,12,26701,3,50000,0,0,0,8,0,0,0,4523.94,-3472.9,228.393,-0.803,'Drakuru Bunny 03- On Spellhit - Summmon Image of Drakuru'), +(26789,0,0,0,8,0,100,0,47110,0,0,0,12,26787,3,50000,0,0,0,8,0,0,0,4599.09,-4875.82,48.956,0.748,'Drakuru Bunny 04- On Spellhit - Summmon Image of Drakuru'), +(28015,0,0,0,8,0,100,0,47110,0,0,0,12,28016,3,50000,0,0,0,8,0,0,0,-236.77,-618.61,116.475,4.727,'Drakuru Bunny 05- On Spellhit - Summmon Drakuru'); +-- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +-- Fix Neutralizing the Cauldrons (11647) quest by Shlomi1515 (Issue 3432) +UPDATE `creature_template` SET flags_extra='128', AIName='SmartAI' WHERE entry IN (25493,25490,25492); +DELETE FROM `smart_scripts` WHERE entryorguid IN (25493,25490,25492); +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 +(25493,0,0,0,8,0,100,0,45653,0,0,0,33,25493,0,0,0,0,0,7,0,0,0,0,0,0,0,'West Enkilah Cauldron - On Spell Hit - Kil Credit'), +(25490,0,0,0,8,0,100,0,45653,0,0,0,33,25490,0,0,0,0,0,7,0,0,0,0,0,0,0,'East Enkilah Cauldron - On Spell Hit - Kil Credit'), +(25492,0,0,0,8,0,100,0,45653,0,0,0,33,25492,0,0,0,0,0,7,0,0,0,0,0,0,0,'Central Enkilah Cauldron - On Spell Hit - Kil Credit'); +-- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +-- Hallow's End Treats for Jesper/spoops 8311/8312 (Issue 3548) +-- Flexing for Nougat (Alliance) +SET @INNKEEPER=6740; +SET @QUEST=8356; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@INNKEEPER AND `id`=2; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`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 +(@INNKEEPER,0,2,0,22,0,100,0,41,0,0,0,33,@INNKEEPER,0,0,0,0,0,7,0,0,0,0,0,0,0,'Innkeeper Allison - on /flex credit for quest'); +DELETE FROM `conditions` WHERE `SourceEntry`=@QUEST; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(19,0,@QUEST,0,12,12,0,0,0,'',NULL); +-- Chicken Clucking for a Mint (Alliance) +SET @INNKEEPER=5111; +SET @QUEST=8353; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@INNKEEPER AND `id`=2; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`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 +(@INNKEEPER,0,2,0,22,0,100,0,22,0,0,0,33,@INNKEEPER,0,0,0,0,0,7,0,0,0,0,0,0,0,'Innkeeper Firebrew - on /chicken credit for quest'); +DELETE FROM `conditions` WHERE `SourceEntry`=@QUEST; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(19,0,@QUEST,0,12,12,0,0,0,'',NULL); +-- Dancing for Marzipan (Alliance) +SET @INNKEEPER=6735; +SET @QUEST=8357; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@INNKEEPER AND `id`=2; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`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 +(@INNKEEPER,0,2,0,22,0,100,0,34,0,0,0,33,@INNKEEPER,0,0,0,0,0,7,0,0,0,0,0,0,0,'Innkeeper Saelienne - on /dance credit for quest'); +DELETE FROM `conditions` WHERE `SourceEntry`=@QUEST; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(19,0,@QUEST,0,12,12,0,0,0,'',NULL); +-- Incoming Gumdrop (Alliance) +SET @INNKEEPER=6826; +SET @QUEST=8355; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@INNKEEPER; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@INNKEEPER; +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 +(@INNKEEPER,0,0,0,22,0,100,0,264,0,0,0,33,@INNKEEPER,0,0,0,0,0,7,0,0,0,0,0,0,0,'Talvash del Kissel - on /train credit for quest'); +DELETE FROM `conditions` WHERE `SourceEntry`=@QUEST; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(19,0,@QUEST,0,12,12,0,0,0,'',NULL); +-- Flexing for Nougat (Horde) +SET @INNKEEPER=6929; +SET @QUEST=8359; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@INNKEEPER AND `id`=2; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`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 +(@INNKEEPER,0,2,0,22,0,100,0,41,0,0,0,33,@INNKEEPER,0,0,0,0,0,7,0,0,0,0,0,0,0,'Innkeeper Gryshka - on /flex credit for quest'); +DELETE FROM `conditions` WHERE `SourceEntry`=@QUEST; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(19,0,@QUEST,0,12,12,0,0,0,'',NULL); +-- Chicken Clucking for a Mint (Horde) +SET @INNKEEPER=6741; +SET @QUEST=8354; +-- SAI +UPDATE `smart_scripts` SET `link`=3 WHERE `entryorguid`=@INNKEEPER AND `id`=2; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@INNKEEPER AND `id`=3; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`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 +(@INNKEEPER,0,3,0,61,0,100,0,0,0,0,0,15,@QUEST,0,0,0,0,0,7,0,0,0,0,0,0,0,'Innkeeper Norman - Link - exploreded for quest'); +-- conditions +DELETE FROM `conditions` WHERE `SourceEntry`=@QUEST; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(19,0,@QUEST,0,0,12,0,12,0,0,0,0,'',"Quest avialable only during Hallow's End event"); +-- Dancing for Marzipan (Horde) +SET @INNKEEPER=6746; +SET @QUEST=8360; +SET @GOSSIP=21215; +UPDATE `creature_template` SET `AIName`='SmartAI',`ScriptName`='' WHERE `entry`=@INNKEEPER; +-- Add trick or treat SAI since the .cpp script was removed +DELETE FROM `smart_scripts` WHERE `entryorguid`=@INNKEEPER; +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 +(@INNKEEPER,0,0,1,62,0,100,0,@GOSSIP,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Innkeeper Pala - On gossip option 0 select - Close gossip'), +(@INNKEEPER,0,1,0,61,0,100,0,0,0,0,0,85,24751,0,0,0,0,0,7,0,0,0,0,0,0,0,'Innkeeper Pala - On gossip option 0 select - Player cast Trick or Treat on self'), +(@INNKEEPER,0,2,0,22,0,100,0,34,0,0,0,33,@INNKEEPER,0,0,0,0,0,7,0,0,0,0,0,0,0,'Innkeeper Pala - on /dance credit for quest'); +-- Add gossip menu option for trick or treat +DELETE FROM `gossip_menu_option` WHERE `menu_id`=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`) VALUES +(@GOSSIP,1,5,'Make this inn your home.',8,65536,0,0,0,0,''), +(@GOSSIP,2,1,'I want to browse your goods',3,128,0,0,0,0,''), +(@GOSSIP,0,0,'Trick or Treat!',1,1,0,0,0,0,''); +-- Add conditions must be hallows end for Dancing for Marzipan quest and trick or treat option +DELETE FROM `conditions` WHERE `SourceEntry`=@QUEST; +DELETE FROM `conditions` WHERE `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(19,0,@QUEST,0,12,12,0,0,0,'',NULL), +(15,@GOSSIP,0,0,12,12,0,0,0,'',NULL); +-- Incoming Gumdrop (Horde) +SET @INNKEEPER=11814; +SET @QUEST=8358; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@INNKEEPER; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@INNKEEPER; +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 +(@INNKEEPER,0,0,0,22,0,100,0,264,0,0,0,33,@INNKEEPER,0,0,0,0,0,7,0,0,0,0,0,0,0,'Kali Remik - on /train credit for quest'); +DELETE FROM `conditions` WHERE `SourceEntry`=@QUEST; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(19,0,@QUEST,0,12,12,0,0,0,'',NULL); diff --git a/sql/updates/world/2012_11_14_02_world_battleground_template.sql b/sql/updates/world/2012_11_14_02_world_battleground_template.sql new file mode 100644 index 00000000000..b69216ea380 --- /dev/null +++ b/sql/updates/world/2012_11_14_02_world_battleground_template.sql @@ -0,0 +1,3 @@ +DELETE FROM `battleground_template` WHERE `id` = 6; +INSERT INTO `battleground_template` (`id`, `MinPlayersPerTeam`, `MaxPlayersPerTeam`, `MinLvl`, `MaxLvl`, `AllianceStartLoc`, `AllianceStartO`, `HordeStartLoc`, `HordeStartO`, `StartMaxDist`, `Weight`, `ScriptName`, `Comment`) VALUES +(6,0,2,10,80,0,0,0,0,0,1,'','All Arena'); diff --git a/sql/updates/world/2012_09_22_00_world_utgarde.sql b/sql/updates/world/2012_11_16_00_world_utgarde.sql index 83cc227f9cd..4b825636b9d 100644 --- a/sql/updates/world/2012_09_22_00_world_utgarde.sql +++ b/sql/updates/world/2012_11_16_00_world_utgarde.sql @@ -48,7 +48,7 @@ INSERT INTO `smart_scripts`(`entryorguid`,`event_type`,`event_param1`,`event_par (28419,0,5000,5000,30000,30000,11,40414,5,'Frenzied geist - In combat - Cast Fixate'); -- Difficulty data for spells used in utgarde keep -DELETE FROM `spelldifficulty_dbc` WHERE `id` IN(42669,42708,42750,42723,42729,43667,42702) OR `spellid0` IN(42669,42708,42750,42723,42729,43667,42702); +DELETE FROM `spelldifficulty_dbc` WHERE `id` IN(42669,42708,42750,42723,42729,43667,42702,50653,43931) OR `spellid0` IN(42669,42708,42750,42723,42729,43667,42702,50653,43931); INSERT INTO `spelldifficulty_dbc`(`id`,`spellid0`,`spellid1`) VALUES (42669,42669,59706), -- Smash (42708,42708,59708), -- Staggering Roar @@ -56,7 +56,9 @@ INSERT INTO `spelldifficulty_dbc`(`id`,`spellid0`,`spellid1`) VALUES (42723,42723,59709), -- Dark Smash (42729,42729,59734), -- Dreadful Roar (43667,43667,59389), -- Shadow Bolt -(42702,42702,59397); -- Decrepify +(42702,42702,59397), -- Decrepify +(50653,50653,59692), -- Flame Breath +(43931,43931,59691); -- Rend -- Ticking Time Bomb, Fixate DELETE FROM `spell_script_names` WHERE `spell_id` IN(59686,40414); @@ -88,7 +90,7 @@ INSERT INTO `creature_addon`(`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`auras`) -- Waypoint data DELETE FROM `waypoint_data` WHERE `id` IN (1259400,1259340,1259150,1259200,1259140,1259360,1259370,1259220); -INSERT INTO `waypoint_data`(`id`,`point`,`position_x`,`position_y`,`position_z`) VALUES +INSERT INTO `waypoint_data`(`id`,`point`,`position_x`,`position_y`,`position_z`) VALUES (1259400,1,211.864,-352.629,196.144), (1259340,1,271.911,-318.506,185.049), (1259150,1,265.478,-199.246,186.812), diff --git a/sql/updates/world/2012_11_16_01_world_utgarde.sql b/sql/updates/world/2012_11_16_01_world_utgarde.sql new file mode 100644 index 00000000000..7063e8a7483 --- /dev/null +++ b/sql/updates/world/2012_11_16_01_world_utgarde.sql @@ -0,0 +1,39 @@ +-- Areatrigger script +DELETE FROM `areatrigger_scripts` WHERE `entry`=4838; +INSERT INTO `areatrigger_scripts`(`entry`,`ScriptName`) VALUES +(4838,'SmartTrigger'); + +DELETE FROM `smart_scripts` WHERE `entryorguid`=4838 AND `source_type`=2; +INSERT INTO `smart_scripts`(`entryorguid`,`source_type`,`event_type`,`event_param1`,`action_type`,`action_param1`,`action_param2`,`target_type`,`target_param1`,`comment`) VALUES +(4838,2,46,4838,45,28,6,10,125946,'Areatrigger in Utgarde Keep near Ingvar - On trigger - Set data of Enslaved Proto Drake'); + +-- Template updates for proto drake and rider +UPDATE `creature_template` SET `AIName`='',`ScriptName`='npc_enslaved_proto_drake' WHERE `entry`=24083; -- Proto drake non heroic +UPDATE `creature_template` SET `InhabitType`=4 WHERE `entry` IN (24849,31676); -- Proto drake rider + +-- Waypoints for core script +DELETE FROM `waypoint_data` WHERE `id`=125946; +INSERT INTO `waypoint_data`(`id`,`point`,`position_x`,`position_y`,`position_z`,`move_flag`) VALUES +(125946,1,210.92,-185.92,203.729,1), +(125946,2,215.397,-181.239,205.773,1), +(125946,3,219.674,-176.469,202.97,1), +(125946,4,223.183,-172.761,200.058,1), +(125946,5,228.007,-168.952,196.713,1), +(125946,6,230.514,-167.104,195.116,1), +(125946,7,235.687,-163.455,192.13,1), +(125946,8,239.569,-161.025,190.346,1); + +-- Mount the rider to the drake +DELETE FROM `vehicle_template_accessory` WHERE `entry`=24083; +INSERT INTO `vehicle_template_accessory`(`entry`,`accessory_entry`,`seat_id`,`minion`,`description`,`summontype`,`summontimer`) VALUES +(24083,24849,0,0,'Proto Drake Rider mounted to Enslaved Proto Drake',6,30000); + +-- Create required spellclick information +DELETE FROM `npc_spellclick_spells` WHERE `npc_entry`=24083; +INSERT INTO `npc_spellclick_spells`(`npc_entry`,`spell_id`,`cast_flags`) VALUES +(24083,55074,1); + +-- Remove no longer needed data +DELETE FROM `creature` WHERE `guid`=125912 AND `map`=574 AND `id`=24849; +DELETE FROM `creature_addon` WHERE `guid`=125912; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=24083; diff --git a/sql/updates/world/2012_11_16_02_world_creature_ai_summons.sql b/sql/updates/world/2012_11_16_02_world_creature_ai_summons.sql new file mode 100644 index 00000000000..7d2caf76e33 --- /dev/null +++ b/sql/updates/world/2012_11_16_02_world_creature_ai_summons.sql @@ -0,0 +1 @@ +DROP TABLE `creature_ai_summons`; diff --git a/sql/updates/world/2012_11_17_00_world_various_fixes.sql b/sql/updates/world/2012_11_17_00_world_various_fixes.sql new file mode 100644 index 00000000000..5db30e04b6a --- /dev/null +++ b/sql/updates/world/2012_11_17_00_world_various_fixes.sql @@ -0,0 +1,834 @@ +-- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +-- Issue 3132: Horde Brewfest Vendors +-- add Ray'ma <Brew of the Month Club> (27489) +DELETE FROM `creature` WHERE `id`=27489; +INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`,`npcflag`,`unit_flags`,`dynamicflags`) VALUES +(42662,27489,1,1,1,0,0,1472.608,-4209.172,43.26931,4.433136,600,0,0,7500,1,0,0,0,0); +-- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +-- Issue 3563: Mistcaller Yngvar +-- Deletes incorrectly spawned Mistcaller Yngvar +DELETE FROM `creature` WHERE `id`=34965; +-- Spawns missing Spell Focus for Mistcaller's Cave +DELETE FROM `gameobject` WHERE `guid`=365; +INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES +(365,300006,571,1,1,10184.8,1184.6,75.892,2.7989,0,0,0.985356,0.170509,300,0,1); +-- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +-- Issue 3635: The Test of Skulls, Somnus +-- Spawn Somnus (12900) NPC needed for The Test of Skulls, Somnus (6583) quest fix by shlomi1515 +SET @NPC :=12900; +UPDATE `creature_template` SET AIName='SmartAI', Mechanic_Immune_Mask=2147483647 WHERE entry=@NPC; +DELETE FROM `creature` WHERE id=@NPC; +INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`,`npcflag`,`unit_flags`,`dynamicflags`) VALUES +(42880,@NPC,0,1,1,0,0,-10444.5,-4096.17,28.9469,2.91185,300,0,0,38844,0,2,0,0,0); +DELETE FROM `smart_scripts` WHERE `entryorguid`=@NPC AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@NPC,0,0,0,13,0,100,0,75000,75000,75000,75000,11,20989,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Somnus - Target is Casting - Cast Sleep'), +(@NPC,0,1,0,13,0,100,0,85000,85000,85000,85000,11,12882,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Somnus - Target is Casting - Cast Wing Flap'), +(@NPC,0,2,0,0,0,100,0,0,5000,30000,30000,11,20667,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Somnus - IC - Cast Corrosive Acid Breath'), +(@NPC,0,3,0,0,0,100,0,7000,9000,14000,20000,11,18368,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Somnus - IC - Cast Strike'); +-- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +-- Issue 3678: Joys of Omosh +-- Orokk Omosh SAI +SET @ENTRY := 7790; +SET @QUEST := 2755; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +UPDATE `quest_template` SET `StartScript`=0,`CompleteScript`=0 WHERE `id`=@QUEST; +DELETE FROM `quest_start_scripts` WHERE `id`=@QUEST; +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@ENTRY,@ENTRY*100); +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 +(@ENTRY,0,0,0,19,0,100,0,@QUEST,0,0,0,80,@ENTRY*100,0,2,0,0,0,1,0,0,0,0,0,0,0, 'Orokk Omosh - On Quest Accept - Run Script'), +(@ENTRY*100,9,0,0,0,0,100,0,0,0,0,0,5,10,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Orokk Omosh - On Script - Start Dancing'), +(@ENTRY*100,9,1,0,0,0,100,0,30000,30000,0,0,5,26,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Orokk Omosh - On Script - Stop Dancing'), +(@ENTRY*100,9,2,0,0,0,100,0,33000,33000,0,0,15,@QUEST,0,0,0,0,7,0,0,0,0,0,0,0,0, 'Orokk Omosh - On Script - Quest Credit'); +-- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +-- Issue 3679: Gnomer-gooooone! +-- Raschal the Courier SAI +SET @ENTRY := 7853; +SET @QUEST := 2843; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +UPDATE `quest_template` SET `StartScript`=0,`CompleteScript`=0 WHERE `id`=@QUEST; +DELETE FROM `quest_start_scripts` WHERE `id`=@QUEST; +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@ENTRY,@ENTRY*100); +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 +(@ENTRY,0,0,0,19,0,100,0,@QUEST,0,0,0,80,@ENTRY*100,0,2,0,0,0,1,0,0,0,0,0,0,0, 'Scooty - On Quest Accept - Run Script'), +(@ENTRY*100,9,0,0,0,0,100,0,10000,10000,0,0,15,@QUEST,0,0,0,0,7,0,0,0,0,0,0,0,0, 'Scooty - On Script - Quest Credit'); +-- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +-- Issue 3680: Test of Faith +-- Dorn Plainstalker SAI +SET @ENTRY := 2986; +SET @QUEST := 1149; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +UPDATE `quest_template` SET `StartScript`=0,`CompleteScript`=0 WHERE `id`=@QUEST; +DELETE FROM `quest_start_scripts` WHERE `id`=@QUEST; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY; +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 +(@ENTRY,0,0,0,19,0,100,0,@QUEST,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Dorn Plainstalker - On Quest Accept - Say Line 0'); +-- Text +DELETE FROM `db_script_string` WHERE `entry`=2000000042; +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0, 'Until we meet again, brave one.',12,0,100,113,0,0, 'Dorn Plainstalker'); +-- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +-- Issue 3749: Frankly,It Makes No Sense +SET @Scorp := 21909; -- Arcano-Scorp +SET @CreditGuid := 84902; -- There is unused spawn of this +SET @Guid1 := 43463; -- TC team values should be set here -> add missing scorp spawn +SET @Guid2 := 43464; -- TC team values should be set here -> add missing scorp spawn +SET @Control1 := 37867; -- Trigger /connected with dismissing to make vehicle not attack master/ +SET @Control1_1 := 37868; -- Control /apply control aura without target/ +SET @Control2 := 37892; -- -//- +SET @Control2_2 := 37893; -- -//- +SET @Control3 := 37894; -- -//- +SET @Control3_3 := 37895; -- -//- +SET @Diametron := 21462; -- Greater Fellfire Diametron +-- Arcano-Scorp spells: +SET @Tag := 37851; -- Tag Greater Felfire Diemetradon +SET @Arcano_Cloak := 37917; +SET @Arcano_dismantle := 37919; +SET @Arcano_pince := 37918; +-- Add spawns for two missing Arcano-Scorps +UPDATE `creature_template` SET `AIName`='PetAI',`unit_flags`=512,`MovementType`=1,`spell4`=@Tag,`spell5`=@Arcano_Cloak,`spell6`=@Arcano_dismantle,`spell7`=@Arcano_pince WHERE `entry`=@Scorp; +UPDATE `creature` SET `MovementType`=1,`spawndist`=3,`position_x`=-3414.004,`position_y`=825.4113,`position_z`=-30.77301 WHERE `guid`=76655; +DELETE FROM `creature` WHERE `guid` IN (@Guid1,@Guid2,@CreditGuid); +INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`MovementType`) VALUES +(@Guid1,@Scorp,530,1,1,-3414.294,813.9421,-31.12042,1.478481,30,3,0,1), +(@Guid2,@Scorp,530,1,1,-3408.508,795.8544,-31.42966,1.452154,30,3,0,1); +-- Spell script for trigger of control spell *will rewrite it once SAI spell script is released* +DELETE FROM `spell_scripts` WHERE `id` IN (@Control1,@Control2,@Control3); +INSERT INTO `spell_scripts` (`id`,`effindex`,`delay`,`command`,`datalong`,`datalong2`) VALUES +(@Control1,0,0,15,@Control1_1,2), +(@Control2,0,0,15,@Control2_2,2), +(@Control3,0,0,15,@Control3_3,2); +-- Limit @Tag only to Diametrons,also to ones not affected by it +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=@Tag; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition` ,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(17,0,@Tag,0,0,31,1,3,@Diametron,0,0,0, '', 'Tag can only target Greater Felfire Diametrons'), +(17,0,@Tag,0,0,1,1,@Tag,0,0,1,0, '', 'Tag cannot be casted on tagged Diametrons'); +-- Limit Arcano_Dismantle to not being able to hit self and cannot damage anything else beside Arcano-scorp +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=@Arcano_dismantle; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition` ,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(13,1,@Arcano_dismantle,0,0,33,1,0,1,0,1,0, '', 'Arcano-Dismantle effect 0 cannot hit self'), +(13,2,@Arcano_dismantle,0,0,33,1,0,1,0,1,0, '', 'Arcano-Dismantle effect 1 cannot hit self'), +(13,1,@Arcano_dismantle,0,0,31,0,3,@Scorp,0,0,0, '', 'Arcano-Dismantle effect 0 can hit only Arcano-Scorp'), +(13,2,@Arcano_dismantle,0,0,31,0,3,@Scorp,0,0,0, '', 'Arcano-Dismantle effect 1 can hit only Arcano-Scorp'); +-- Limit @Arcano_pince to not being able to hit self and cannot damage anything else beside Arcano-scorp +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=@Arcano_pince; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition` ,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(13,1,@Arcano_pince,0,0,33,1,0,1,0,1,0, '', 'Arcano_pince effect 0 cannot hit self'), +(13,1,@Arcano_pince,0,0,31,0,3,@Scorp,0,0,0, '', 'Arcano_pince effect 0 can hit only Arcano-Scorp'); +-- Add SAI for Greater Diametron to prevent some bugs +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@Diametron; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@Diametron; +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 +(@Diametron,0,0,0,0,0,100,0,4500,5000,5000,7000,11,37945,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Greater Fellfire Diametron - IC - Cast Fel Fireball'), +(@Diametron,0,1,0,0,0,100,0,1500,3000,15000,17000,11,37941,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Greater Fellfire Diametron - IC - Cast Flaming Wound'), +(@Diametron,0,2,3,8,0,100,0,@Tag,0,0,0,90,256,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Greater Fellfire Diametron - On hit by spell Tag - Set bytes to wipe aggro'), +(@Diametron,0,3,4,61,0,100,0,0,0,0,0,91,256,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Greater Fellfire Diametron - Linked with previous event - Remove bytes'), +(@Diametron,0,4,0,61,0,100,0,0,0,0,0,75,@Tag,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Greater Fellfire Diametron - Linked with previous event - Add Tag aura on self'); +-- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +-- Issue 3809: You Robot +DELETE FROM `creature_ai_scripts` WHERE creature_id=19851; +UPDATE `creature_template` SET AIName='SmartAI' WHERE `entry`=19851; +DELETE FROM `smart_scripts` WHERE entryorguid=19851; +INSERT INTO `smart_scripts` VALUES +(19851,0,0,0,9,0,100,0,8,25,15000,21000,11,35570,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Negatron - Cast Charge'), +(19851,0,1,0,9,0,100,0,0,5,15000,21000,11,34625,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Negatron - Cast Demolish'), +(19851,0,2,0,0,0,100,0,15000,19000,21000,25000,11,35565,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Negatron - Cast Earthquake'), +(19851,0,3,0,2,0,100,0,0,50,16000,22000,11,34624,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Negatron - Cast Frenzy at 50% HP'), +(19851,0,4,0,6,0,100,0,0,0,0,0,15,10248,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Negatron - Death - Quest Complete'); +-- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +-- Issue 3822: Deaths Door +-- Fix quest 10910 'Deaths Door' +-- Evergrove Druid SAI +SET @ENTRY := 22423; +UPDATE `creature_template` SET `inhabittype`=4,`AIName`= 'SmartAI' WHERE `entry`=@ENTRY; +UPDATE `creature_template_addon` SET `bytes1`=0,`bytes2`=1,`mount`=0,`emote`=0,`auras`=NULL WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY; +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 +(@ENTRY,0,0,1,8,0,100,1,38782,0,0,0,11,38776,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Evergrove Druid - On hit by signal - transform to crow'), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,19,33554432,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Evergrove Druid - On hit by signal - Remove field flag'), +(@ENTRY,0,2,3,61,0,100,0,0,0,0,0,69,0,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Evergrove Druid - On hit by signal - Follow player invoker'), +(@ENTRY,0,3,0,61,0,100,0,0,0,0,0,81,2,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Evergrove Druid - On hit by signal - Set npcflag = 2'), +(@ENTRY,0,4,5,64,0,100,1,0,0,0,0,11,39158,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Evergrove Druid - On gossip hello - transform to druid, since end point for follow can''t be player'), +(@ENTRY,0,5,0,61,0,100,0,0,0,0,0,41,60000,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Evergrove Druid - After 60 sec - despawn'), +(@ENTRY,0,6,0,19,0,100,0,10904,0,0,0,41,10000,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Evergrove Druid - On target accepted next quest - despawn'), +(@ENTRY,0,7,0,19,0,100,0,10911,0,0,0,41,10000,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Evergrove Druid - On target accepted next quest - despawn'), +(@ENTRY,0,8,0,19,0,100,0,10912,0,0,0,41,10000,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Evergrove Druid - On target accepted next quest - despawn'), +(@ENTRY,0,9,0,11,0,100,0,0,0,0,0,83,2,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Evergrove Druid - On Spawn - Remove quest flag'); +-- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +-- Issue 3930: Evil Draws Near +-- Teribus the Cursed is out of combat when is finally summoned by players +UPDATE `creature_template` SET `unit_flags`=`unit_flags`&~256 WHERE `entry`=22441; -- removing OOC +-- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +DELETE FROM `creature` WHERE `guid`=42889; +INSERT INTO creature(`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`,`npcflag`,`unit_flags`,`dynamicflags`) +VALUES (42889,34675,0,1,1,0,0,-9133.91,355.333,92.3983,2.0151,300,0,0,1524,0,0,0,0,0); +-- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +-- Issue 3761 Day of the Dead +-- Day of the Dead +SET @ENTRY := 34383; -- Catrina +DELETE FROM `creature_template_addon` WHERE `entry`=@ENTRY; +INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES +(@ENTRY,0,0,0,10,NULL); +UPDATE `quest_template` SET `RequiredRaces`=512 WHERE `Id`=14171; +UPDATE `quest_template` SET `RequiredRaces`=1024 WHERE `Id`=14169; +-- Invisibility aura for Cheerful Spirits +DELETE FROM `creature_template_addon` WHERE `entry` IN (35256,34435,34435,34478,34481,34484,34479,34483,34476,34477,34480,34482,35260,35261); +INSERT INTO `creature_template_addon` (`entry`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES +(35256,0,0,0,0,0,30628), -- Cheerful Dalaran Spirit +(34435,0,0,0,0,0,30628), -- Cheerful Human Spirit +(34478,0,0,0,0,0,30628), -- Cheerful Dwarf Spirit +(34481,0,0,0,0,0,30628), -- Cheerful Gnome Spirit +(34484,0,0,0,0,0,30628), -- Cheerful Draenei Spirit +(34479,0,0,0,0,0,30628), -- Cheerful Night Elf Spirit +(34483,0,0,0,0,0,30628), -- Cheerful Blood Elf Spirit +(34476,0,0,0,0,0,30628), -- Cheerful Forsaken Spirit +(34477,0,0,0,0,0,30628), -- Cheerful Orc Spirit +(34480,0,0,0,0,0,30628), -- Cheerful Tauren Spirit +(34482,0,0,0,0,0,30628), -- Cheerful Troll Spirit +(35260,0,0,0,0,0,30628), -- Cheerful Aldor Spirit +(35261,0,0,0,0,0,30628); -- Cheerful Scryer Spirit +-- Quest relations +DELETE FROM `creature_questrelation` WHERE `id` IN (35256,34435,34435,34478,34481,34484,34479,34483,34476,34477,34480,34482,35260,35261); +INSERT INTO `creature_questrelation` (`id`, `quest`) VALUES +(34435,13952), +(34476,14174), +(34477,14175), +(34478,14167), +(34479,14170), +(34480,14176), +(34481,14168), +(34482,14177), +(34483,14171), +(34484,14169), +(35256,14166), +(35260,14172), +(35261,14173); +DELETE FROM `creature_involvedrelation` WHERE `id` IN (35256,34435,34435,34478,34481,34484,34479,34483,34476,34477,34480,34482,35260,35261); +INSERT INTO `creature_involvedrelation` (`id`, `quest`) VALUES +(34435,13952), +(34476,14174), +(34477,14175), +(34478,14167), +(34479,14170), +(34480,14176), +(34481,14168), +(34482,14177), +(34483,14171), +(34484,14169), +(35256,14166), +(35260,14172), +(35261,14173); +-- Creature spawns for Day of the Dead Event +SET @GUID := 134848; +DELETE FROM `creature` WHERE `guid` BETWEEN @GUID AND @GUID+146; +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`) VALUES +(@GUID,20102,530,1,1,0,0,3038.56,3635.53,144.012,3.32713,300,0,0,42,0,0,0,0,0), +(@GUID+1,35250,1,1,1,0,0,10066,2125.69,1329.66,1.12742,300,0,0,42,0,0,0,0,0), +(@GUID+2,35250,1,1,1,0,0,10058.4,2135.92,1330.81,4.55176,300,0,0,42,0,0,0,0,0), +(@GUID+3,35250,1,1,1,0,0,10045,2109.59,1330.2,0.224221,300,0,0,42,0,0,0,0,0), +(@GUID+4,35250,1,1,1,0,0,10053.8,2104.68,1330.93,1.5594,300,0,0,42,0,0,0,0,0), +(@GUID+5,35250,1,1,1,0,0,10052.9,2111.1,1330.06,1.93246,300,0,0,42,0,0,0,0,0), +(@GUID+6,35250,1,1,1,0,0,10062.2,2109.76,1330.92,2.08954,300,0,0,42,0,0,0,0,0), +(@GUID+7,35250,1,1,1,0,0,10063.5,2117.74,1330.03,3.55824,300,0,0,42,0,0,0,0,0), +(@GUID+8,35250,1,1,1,0,0,10059.1,2123.97,1330.28,5.04264,300,0,0,42,0,0,0,0,0), +(@GUID+9,35250,1,1,1,0,0,10052.9,2127.26,1330.13,3.93523,300,0,0,42,0,0,0,0,0), +(@GUID+10,34479,1,1,1,0,0,10061.5,2128.42,1330.17,2.73357,300,0,0,2442,2434,0,0,0,0), +(@GUID+11,35243,530,1,1,0,0,9404.91,-6859.42,15.101,4.17483,300,0,0,40,120,0,0,0,0), +(@GUID+12,35243,530,1,1,0,0,9411.01,-6855.19,14.9017,1.27278,300,0,0,40,120,0,0,0,0), +(@GUID+13,35243,530,1,1,0,0,9414.6,-6853.32,14.9361,2.67472,300,0,0,40,120,0,0,0,0), +(@GUID+14,35243,530,1,1,0,0,9415.1,-6848.51,15.1693,3.83318,300,0,0,40,120,0,0,0,0), +(@GUID+15,35249,0,1,1,0,0,-9350.81,171.018,61.7532,1.0198,300,0,0,42,0,0,0,0,0), +(@GUID+16,35253,1,1,1,0,0,1174.68,-4467.53,21.2746,0.833251,300,0,0,42,0,0,0,0,0), +(@GUID+17,35253,1,1,1,0,0,1182,-4463.02,21.2426,2.68915,300,0,0,42,0,0,0,0,0), +(@GUID+18,35253,1,1,1,0,0,1186.12,-4465.53,21.2886,1.73018,300,0,0,42,0,0,0,0,0), +(@GUID+19,35253,1,1,1,0,0,1176.79,-4460.38,21.4269,5.82603,300,0,0,42,0,0,0,0,0), +(@GUID+20,35251,1,1,1,0,0,1172.3,-4460.54,21.4697,6.19124,300,0,0,42,0,0,0,0,0), +(@GUID+21,35251,1,1,1,0,0,1180.91,-4471.22,21.1603,1.71055,300,0,0,42,0,0,0,0,0), +(@GUID+22,34483,530,1,1,0,0,9407.42,-6859.87,14.8699,3.93528,300,0,0,4890,7196,0,0,0,0), +(@GUID+23,35243,530,1,1,0,0,9409.6,-6847.61,15.5215,4.92881,300,0,0,40,120,0,0,0,0), +(@GUID+24,35243,530,1,1,0,0,9407.46,-6852.95,15.239,0.00436234,300,0,0,40,120,0,0,0,0), +(@GUID+25,35249,0,1,1,0,0,-9337.56,188.283,61.5117,3.72314,300,0,0,42,0,0,0,0,0), +(@GUID+26,35249,0,1,1,0,0,-9340.16,183.339,61.5512,0.349854,300,0,0,42,0,0,0,0,0), +(@GUID+27,35249,0,1,1,0,0,-9342.2,187.984,61.5586,5.25467,300,0,0,42,0,0,0,0,0), +(@GUID+28,35249,0,1,1,0,0,-9329.31,166.352,61.5815,1.76357,300,0,0,42,0,0,0,0,0), +(@GUID+29,35249,0,1,1,0,0,-9322.06,168.47,61.6066,2.40367,300,0,0,42,0,0,0,0,0), +(@GUID+30,35249,0,1,1,0,0,-9318.67,173.348,61.613,2.83957,300,0,0,42,0,0,0,0,0), +(@GUID+31,35249,0,1,1,0,0,-9346.44,171.041,61.5582,2.74061,300,0,0,42,0,0,0,0,0), +(@GUID+32,35249,0,1,1,0,0,-9344.05,175.877,61.5584,3.59669,300,0,0,42,0,0,0,0,0), +(@GUID+33,35249,0,1,1,0,0,-9349.19,176.153,61.726,5.18634,300,0,0,42,0,0,0,0,0), +(@GUID+34,35249,0,1,1,0,0,-9327.92,185.507,62.7096,4.07265,300,0,0,42,0,0,0,0,0), +(@GUID+35,34383,1,1,1,0,0,1184.43,-4467.28,21.3388,1.2079,300,0,0,12600,0,0,0,0,0), +(@GUID+36,34383,0,1,1,0,0,-9330.46,180.936,61.6792,4.1716,300,0,0,12600,0,0,0,0,0), +(@GUID+37,34382,1,1,1,0,0,1180.53,-4465.53,21.3293,0.944794,600,0,0,12600,0,0,0,0,0), +(@GUID+38,34382,0,1,1,0,0,-9327.6,178.975,61.6973,4.10484,600,0,0,12600,0,0,0,0,0), +(@GUID+39,34482,1,1,1,0,0,1181.51,-4469.65,21.2349,1.4121,300,0,0,2136,5751,0,0,0,0), +(@GUID+40,34435,0,1,1,0,0,-9354.72,167.942,61.665,0.27367,300,0,0,3052,0,0,0,0,0), +(@GUID+41,34477,1,1,1,0,0,1173.47,-4462.54,21.3309,0.60707,300,0,0,3052,0,0,0,0,0), +(@GUID+42,35256,571,1,65535,0,0,5831.01,751.564,641.134,3.40199,300,0,0,12600,0,0,0,0,0), +(@GUID+43,35254,571,1,65535,0,0,5829.42,754.776,640.729,5.14164,300,0,0,8508,7981,0,0,0,0), +(@GUID+44,35254,571,1,65535,0,0,5827.15,751.291,640.952,0.150437,300,0,0,8508,7981,0,0,0,0), +(@GUID+45,35254,571,1,65535,0,0,5830.31,746.699,641.251,1.36388,300,0,0,8508,7981,0,0,0,0), +(@GUID+46,35254,571,1,65535,0,0,5835.25,748.654,641.162,2.59303,300,0,0,8508,7981,0,0,0,0), +(@GUID+47,35254,571,1,65535,0,0,5835.24,754.043,641.008,3.64153,300,0,0,8508,7981,0,0,0,0), +(@GUID+48,35254,571,1,65535,0,0,5828.15,741.877,642.46,1.24607,300,0,0,8508,7981,0,0,0,0), +(@GUID+49,35254,571,1,65535,0,0,5846.77,755.676,640.68,0.837661,300,0,0,8508,7981,0,0,0,0), +(@GUID+50,35254,571,1,65535,0,0,5850.95,756.541,640.434,2.81294,300,0,0,8508,7981,0,0,0,0), +(@GUID+51,35254,571,1,65535,0,0,5848.22,760.619,641.147,4.64684,300,0,0,8508,7981,0,0,0,0), +(@GUID+52,35254,571,1,65535,0,0,5841.11,762.141,640.661,0.480303,300,0,0,8508,7981,0,0,0,0), +(@GUID+53,35244,0,1,1,0,0,1833.58,225.962,60.4294,4.33165,300,0,0,42,0,0,0,0,0), +(@GUID+54,35244,0,1,1,0,0,1828.46,224.586,60.4551,5.29769,300,0,0,42,0,0,0,0,0), +(@GUID+55,35244,0,1,1,0,0,1824.9,218.875,60.4469,0.0315971,300,0,0,42,0,0,0,0,0), +(@GUID+56,35244,0,1,1,0,0,1836.95,222.233,60.2385,3.22031,300,0,0,42,0,0,0,0,0), +(@GUID+57,35244,0,1,1,0,0,1834.67,215.873,60.1774,2.55665,300,0,0,42,0,0,0,0,0), +(@GUID+58,35244,0,1,1,0,0,1821.83,225.812,60.919,5.50582,300,0,0,42,0,0,0,0,0), +(@GUID+59,34476,0,1,1,0,0,1830.34,219.535,60.6017,4.58298,300,0,0,3052,0,0,0,0,0), +(@GUID+60,34382,571,1,65535,0,0,5844.1,764.778,640.546,4.20309,600,0,0,12600,0,0,0,0,0), +(@GUID+61,34382,0,1,1,0,0,1832.47,210.797,60.312,2.04222,600,0,0,12600,0,0,0,0,0), +(@GUID+62,34382,530,1,1,0,0,9406.42,-6864.02,14.8942,1.19424,600,0,0,12600,0,0,0,0,0), +(@GUID+63,34382,1,1,1,0,0,10058.2,2133,1329.66,4.43788,600,0,0,12600,0,0,0,0,0), +(@GUID+64,34382,1,1,1,0,0,-989.195,-59.6891,27.4632,5.21191,600,0,0,12600,0,0,0,0,0), +(@GUID+65,34382,530,1,1,0,0,-4320.01,-12433.4,17.9088,5.1906,600,0,0,12600,0,0,0,0,0), +(@GUID+66,34382,530,1,1,0,0,-1805.58,4911.74,-21.8346,1.35833,600,0,0,12600,0,0,0,0,0), +(@GUID+67,34382,0,1,1,0,0,-5151.65,-852.495,508.667,4.58185,600,0,0,12600,0,0,0,0,0), +(@GUID+68,34383,571,1,65535,0,0,5844.93,762.949,640.713,2.86791,300,0,0,12600,0,0,0,0,0), +(@GUID+69,34383,0,1,1,0,0,1828.96,210.695,60.2619,1.24504,300,0,0,12600,0,0,0,0,0), +(@GUID+70,34383,530,1,1,0,0,9403.71,-6861.68,15.0351,0.609119,300,0,0,12600,0,0,0,0,0), +(@GUID+71,34383,1,1,1,0,0,10067,2128.44,1329.66,3.57394,300,0,0,12600,0,0,0,0,0), +(@GUID+72,34383,1,1,1,0,0,-987.397,-58.6047,27.5876,4.96843,300,0,0,12600,0,0,0,0,0), +(@GUID+73,34383,530,1,1,0,0,-4317.46,-12431.3,17.755,5.11599,300,0,0,12600,0,0,0,0,0), +(@GUID+74,34383,530,1,1,0,0,-1809.42,4913.42,-21.8336,0.867451,300,0,0,12600,0,0,0,0,0), +(@GUID+75,34383,0,1,1,0,0,-5155.07,-854.489,508.115,5.0845,300,0,0,12600,0,0,0,0,0), +(@GUID+76,34480,1,1,1,0,0,-979.399,-75.0704,19.5113,0.118608,300,0,0,3052,0,0,0,0,0), +(@GUID+77,35252,1,1,1,0,0,-979.099,-78.4939,19.6825,0.8451,300,0,0,42,0,0,0,0,0), +(@GUID+78,35252,1,1,1,0,0,-979.773,-70.3366,19.8615,5.07447,300,0,0,42,0,0,0,0,0), +(@GUID+79,35252,1,1,1,0,0,-975.337,-71.6525,18.3695,3.78799,300,0,0,42,0,0,0,0,0), +(@GUID+80,35252,1,1,1,0,0,-975.356,-76.2146,18.7461,2.57848,300,0,0,42,0,0,0,0,0), +(@GUID+81,35252,1,1,1,0,0,-979.443,-57.4083,26.7673,4.68334,300,0,0,42,0,0,0,0,0), +(@GUID+82,34484,530,1,1,0,0,-4329.44,-12443.6,17.6841,5.62257,300,0,0,5589,3155,0,0,0,0), +(@GUID+83,35246,530,1,1,0,0,-4326.98,-12448.5,16.9294,5.47334,300,0,0,41,60,0,0,0,0), +(@GUID+84,35246,530,1,1,0,0,-4326.59,-12453.9,16.7549,0.721683,300,0,0,41,60,0,0,0,0), +(@GUID+85,35246,530,1,1,0,0,-4319.13,-12455.1,17.4243,2.4417,300,0,0,41,60,0,0,0,0), +(@GUID+86,35246,530,1,1,0,0,-4320.45,-12448.9,17.0584,3.68656,300,0,0,41,60,0,0,0,0), +(@GUID+87,35246,530,1,1,0,0,-4309.37,-12444,17.5071,3.15249,300,0,0,41,60,0,0,0,0), +(@GUID+88,35246,530,1,1,0,0,-4312.76,-12446.2,17.3102,1.3932,300,0,0,41,60,0,0,0,0), +(@GUID+89,35246,530,1,1,0,0,-4313.48,-12441,17.2002,5.26914,300,0,0,41,60,0,0,0,0), +(@GUID+90,35246,530,1,1,0,0,-4315.9,-12433.6,17.5953,2.19823,300,0,0,41,60,0,0,0,0), +(@GUID+91,35260,530,1,1,0,0,-1810.34,4923.26,-21.8439,5.41099,300,0,0,5589,3155,0,0,0,0), +(@GUID+92,35261,530,1,1,0,0,-1796.9,4928.76,-22.2745,3.23936,300,0,0,4890,7196,0,0,0,0), +(@GUID+93,35258,530,1,1,0,0,-1806.01,4925.33,-21.878,3.62813,300,0,0,4140,6443,0,0,0,0), +(@GUID+94,35258,530,1,1,0,0,-1812.25,4929.11,-21.6268,4.96723,300,0,0,4140,6443,0,0,0,0), +(@GUID+95,35258,530,1,1,0,0,-1814.69,4922.25,-22.0148,0.254842,300,0,0,4140,6443,0,0,0,0), +(@GUID+96,35258,530,1,1,0,0,-1809.16,4918.68,-21.982,1.82171,300,0,0,4140,6443,0,0,0,0), +(@GUID+97,35259,530,1,1,0,0,-1801.26,4929.1,-22.3108,6.17282,300,0,0,4140,6443,0,0,0,0), +(@GUID+98,35259,530,1,1,0,0,-1792.87,4928.28,-22.1848,2.99981,300,0,0,4140,6443,0,0,0,0), +(@GUID+99,35259,530,1,1,0,0,-1797.58,4924.28,-21.9414,1.31905,300,0,0,4140,6443,0,0,0,0), +(@GUID+100,35259,530,1,1,0,0,-1796.3,4933.33,-22.3432,4.54704,300,0,0,4140,6443,0,0,0,0), +(@GUID+101,34481,0,1,1,0,0,-5167.84,-870.949,506.706,1.024,300,0,0,2136,5751,0,0,0,0), +(@GUID+102,34478,0,1,1,0,0,-5165.9,-866.76,506.808,4.28811,300,0,0,3052,0,0,0,0,0), +(@GUID+103,35247,0,1,1,0,0,-5162.65,-873.025,507.206,1.00122,300,0,0,42,0,0,0,0,0), +(@GUID+104,35247,0,1,1,0,0,-5158.7,-872.414,507.406,2.72124,300,0,0,42,0,0,0,0,0), +(@GUID+105,35247,0,1,1,0,0,-5160.49,-869.137,507.265,4.21349,300,0,0,42,0,0,0,0,0), +(@GUID+106,35247,0,1,1,0,0,-5164.33,-869.728,507.01,5.69397,300,0,0,42,0,0,0,0,0), +(@GUID+107,35248,0,1,1,0,0,-5155,-856.249,508.059,1.51565,300,0,0,42,0,0,0,0,0), +(@GUID+108,35248,0,1,1,0,0,-5159.06,-867.484,507.333,0.859842,300,0,0,42,0,0,0,0,0), +(@GUID+109,35248,0,1,1,0,0,-5154.91,-867.566,507.758,2.45027,300,0,0,42,0,0,0,0,0), +(@GUID+110,35248,0,1,1,0,0,-5155.64,-863.343,507.652,4.05641,300,0,0,42,0,0,0,0,0), +(@GUID+111,35248,0,1,1,0,0,-5159.96,-863.16,507.247,5.49762,300,0,0,42,0,0,0,0,0), +(@GUID+112,18927,0,1,1,0,0,-8855.97,652.546,96.2675,5.07716,300,0,0,42,0,0,0,0,0), +(@GUID+113,18927,571,1,1,0,0,5678.09,658.93,647.134,0.088838,300,0,0,42,0,0,0,0,0), +(@GUID+114,18927,0,1,1,0,0,-8854.78,649.83,96.7417,1.43117,300,0,0,42,0,0,0,0,0), +(@GUID+115,18927,571,1,1,0,0,5719.3,687.257,645.752,5.72721,300,0,0,42,0,0,0,0,0), +(@GUID+116,19169,530,1,1,0,0,9659.86,-7115.63,14.3239,5.88552,300,0,0,42,0,0,0,0,0), +(@GUID+117,19169,571,1,1,0,0,5889.57,550.355,639.637,1.57167,300,0,0,42,0,0,0,0,0), +(@GUID+118,19169,571,1,1,0,0,5928.98,639.593,645.557,3.01052,300,0,0,42,0,0,0,0,0), +(@GUID+119,19169,530,1,1,0,0,9664.38,-7117.91,14.324,2.63397,300,0,0,42,0,0,0,0,0), +(@GUID+120,19148,0,1,1,0,0,-4914.82,-951.191,501.498,4.5773,300,0,0,42,0,0,0,0,0), +(@GUID+121,19148,0,1,1,0,0,-4915.33,-953.892,501.498,2.25016,300,0,0,42,0,0,0,0,0), +(@GUID+122,19171,530,1,1,0,0,-3910.91,-11612.4,-138.243,4.99941,300,0,0,42,0,0,0,0,0), +(@GUID+123,19171,530,1,1,0,0,-3909.22,-11614.8,-138.101,3.1765,300,0,0,42,0,0,0,0,0), +(@GUID+124,19172,0,1,1,0,0,-4826.78,-1175.89,502.193,2.45358,300,0,0,42,0,0,0,0,0), +(@GUID+125,19172,0,1,1,0,0,-4829.02,-1174.75,502.193,0.724139,300,0,0,42,0,0,0,0,0), +(@GUID+126,19173,1,1,1,0,0,9923.44,2496.95,1317.49,2.28359,300,0,0,42,0,0,0,0,0), +(@GUID+127,19173,1,1,1,0,0,9921.56,2499.58,1317.77,5.61996,300,0,0,42,0,0,0,0,0), +(@GUID+128,19178,0,1,1,0,0,1626.7,222.7,-43.1027,1.01229,300,0,0,42,0,0,0,0,0), +(@GUID+129,19178,0,1,1,0,0,1629.95,219.238,-43.1027,1.91079,300,0,0,42,0,0,0,0,0), +(@GUID+130,19177,1,1,1,0,0,1688.01,-4350.19,61.2691,2.56413,300,0,0,42,0,0,0,0,0), +(@GUID+131,19177,1,1,1,0,0,1685.07,-4352.88,61.7253,1.79601,300,0,0,42,0,0,0,0,0), +(@GUID+132,19176,1,1,1,0,0,-1241.98,81.7344,129.422,5.4992,300,0,0,42,0,0,0,0,0), +(@GUID+133,19176,1,1,1,0,0,-1242.68,76.7127,128.935,1.27376,300,0,0,42,0,0,0,0,0), +(@GUID+134,19175,1,1,1,0,0,1607.39,-4402.93,10.1664,3.11715,300,0,0,42,0,0,0,0,0), +(@GUID+135,19175,1,1,1,0,0,1603.36,-4404.49,9.30901,0.627438,300,0,0,42,0,0,0,0,0), +(@GUID+136,20102,1,1,1,0,0,6747.03,-4664.43,724.551,3.61009,300,0,0,42,0,0,0,0,0), +(@GUID+137,20102,1,1,1,0,0,-938.792,-3735.2,8.57162,3.66385,300,0,0,42,0,0,0,0,0), +(@GUID+138,20102,1,1,1,0,0,-7177.24,-3810.02,8.3753,0.711558,300,0,0,42,0,0,0,0,0), +(@GUID+139,20102,0,1,1,0,0,-14464.9,470.287,15.0369,5.96098,300,0,0,42,0,0,0,0,0), +(@GUID+140,20102,530,1,1,0,0,-1888.02,5400.44,-12.4278,5.97919,300,0,0,42,0,0,0,0,0), +(@GUID+141,20102,530,1,1,0,0,3035.51,3635.08,144.47,0.901821,300,0,0,42,0,0,0,0,0), +(@GUID+142,20102,1,1,1,0,0,6745.48,-4667.44,723.103,1.03712,300,0,0,42,0,0,0,0,0), +(@GUID+143,20102,1,1,1,0,0,-936.306,-3738.3,8.96324,3.35283,300,0,0,42,0,0,0,0,0), +(@GUID+144,20102,1,1,1,0,0,-7173.14,-3808.58,8.37043,3.3285,300,0,0,42,0,0,0,0,0), +(@GUID+145,20102,0,1,1,0,0,-14461.4,468.507,15.1232,2.66545,300,0,0,42,0,0,0,0,0), +(@GUID+146,20102,530,1,1,0,0,-1884.63,5397.52,-12.4278,2.51637,300,0,0,42,0,0,0,0,0); +-- Assignment of creatures to game event. +DELETE FROM `game_event_creature` WHERE `eventEntry`=51 AND `guid` BETWEEN @GUID AND @GUID+146; +INSERT INTO `game_event_creature` (`eventEntry`, `guid`) VALUES +(51,@GUID),(51,@GUID+1),(51,@GUID+2),(51,@GUID+3),(51,@GUID+4),(51,@GUID+5), +(51,@GUID+6),(51,@GUID+7),(51,@GUID+8),(51,@GUID+9),(51,@GUID+10), +(51,@GUID+11),(51,@GUID+12),(51,@GUID+13),(51,@GUID+14),(51,@GUID+15), +(51,@GUID+16),(51,@GUID+17),(51,@GUID+18),(51,@GUID+19),(51,@GUID+20), +(51,@GUID+21),(51,@GUID+22),(51,@GUID+23),(51,@GUID+24),(51,@GUID+25), +(51,@GUID+26),(51,@GUID+27),(51,@GUID+28),(51,@GUID+29),(51,@GUID+30), +(51,@GUID+31),(51,@GUID+32),(51,@GUID+33),(51,@GUID+34),(51,@GUID+35), +(51,@GUID+36),(51,@GUID+37),(51,@GUID+38),(51,@GUID+39),(51,@GUID+40), +(51,@GUID+41),(51,@GUID+42),(51,@GUID+43),(51,@GUID+44),(51,@GUID+45), +(51,@GUID+46),(51,@GUID+47),(51,@GUID+48),(51,@GUID+49),(51,@GUID+50), +(51,@GUID+51),(51,@GUID+52),(51,@GUID+53),(51,@GUID+54),(51,@GUID+55), +(51,@GUID+56),(51,@GUID+57),(51,@GUID+58),(51,@GUID+59),(51,@GUID+60), +(51,@GUID+61),(51,@GUID+62),(51,@GUID+63),(51,@GUID+64),(51,@GUID+65), +(51,@GUID+66),(51,@GUID+67),(51,@GUID+68),(51,@GUID+69),(51,@GUID+70), +(51,@GUID+71),(51,@GUID+72),(51,@GUID+73),(51,@GUID+74),(51,@GUID+75), +(51,@GUID+76),(51,@GUID+77),(51,@GUID+78),(51,@GUID+79),(51,@GUID+80), +(51,@GUID+81),(51,@GUID+82),(51,@GUID+83),(51,@GUID+84),(51,@GUID+85), +(51,@GUID+86),(51,@GUID+87),(51,@GUID+88),(51,@GUID+89),(51,@GUID+90), +(51,@GUID+91),(51,@GUID+92),(51,@GUID+93),(51,@GUID+94),(51,@GUID+95), +(51,@GUID+96),(51,@GUID+97),(51,@GUID+98),(51,@GUID+99),(51,@GUID+100), +(51,@GUID+101),(51,@GUID+102),(51,@GUID+103),(51,@GUID+104),(51,@GUID+105), +(51,@GUID+106),(51,@GUID+107),(51,@GUID+108),(51,@GUID+109),(51,@GUID+110), +(51,@GUID+111),(51,@GUID+112),(51,@GUID+113),(51,@GUID+114),(51,@GUID+115), +(51,@GUID+116),(51,@GUID+117),(51,@GUID+118),(51,@GUID+119),(51,@GUID+120), +(51,@GUID+121),(51,@GUID+122),(51,@GUID+123),(51,@GUID+124),(51,@GUID+125), +(51,@GUID+126),(51,@GUID+127),(51,@GUID+128),(51,@GUID+129),(51,@GUID+130), +(51,@GUID+131),(51,@GUID+132),(51,@GUID+133),(51,@GUID+134),(51,@GUID+135), +(51,@GUID+136),(51,@GUID+137),(51,@GUID+138),(51,@GUID+139),(51,@GUID+140), +(51,@GUID+141),(51,@GUID+142),(51,@GUID+143),(51,@GUID+144),(51,@GUID+145), +(51,@GUID+146); +-- Gameobject spawns +SET @GUID := 76237; +DELETE FROM `gameobject` WHERE `guid` BETWEEN @GUID AND @GUID+313; +INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(@GUID,195066,1,1,1,-984.309,-72.3299,20.9918,0,0,0,0,1,180,100,1), +(@GUID+1,195069,0,1,1,-9330.98,181.918,62.7222,2.54818,0,0,0,1,180,100,1), +(@GUID+2,182807,530,1,1,9672.12,-7346.44,11.9311,-0.244346,0,0,0.121869,-0.992546,180,100,1), +(@GUID+3,195307,0,1,1,1780.5,269.08,59.8237,3.00195,0,0,0,1,180,100,1), +(@GUID+4,195090,0,1,1,-5155.34,-862.141,507.655,4.22449,0,0,0.856962,-0.515379,300,0,1), +(@GUID+5,195307,1,1,1,10054.2,2129.03,1329.66,-2.30383,0,0,0,1,180,100,1), +(@GUID+6,195307,0,1,1,1792.51,241.774,60.5867,-2.30383,0,0,0,1,180,100,1), +(@GUID+7,195307,1,1,1,10053.8,2127.78,1329.67,-2.30383,0,0,0,1,180,100,1), +(@GUID+8,195307,1,1,1,10049.7,2113.11,1329.68,-2.79252,0,0,0,1,180,100,1), +(@GUID+9,195087,0,1,1,-9333.99,181.712,61.5651,4.14018,0,0,0.87792,-0.478807,300,0,1), +(@GUID+10,195087,1,1,1,1177.92,-4467.1,21.3191,1.02726,0,0,0.49134,0.870968,300,0,1), +(@GUID+11,195067,1,1,1,1179.08,-4469.52,21.5266,1.0194,0,0,0.487916,0.87289,300,0,1), +(@GUID+12,195067,1,1,1,1174.65,-4455.39,21.539,1.12543,0,0,0.533485,0.845809,300,0,1), +(@GUID+13,195067,1,1,1,1186.5,-4461.7,21.136,1.23932,0,0,0.580757,0.814077,300,0,1), +(@GUID+14,195087,571,1,65535,5851.71,759.739,640.824,0.177921,0,0,0.088843,0.996046,300,0,1), +(@GUID+15,195087,0,1,1,1831.24,213.873,60.339,4.59476,0,0,0.747449,-0.66432,300,0,1), +(@GUID+16,195087,530,1,1,9410.84,-6856.04,14.8094,5.30187,0,0,0.471204,-0.882024,300,0,1), +(@GUID+17,195087,1,1,1,10051.5,2108.48,1329.65,5.63954,0,0,0.316296,-0.948661,300,0,1), +(@GUID+18,195087,1,1,1,-978.502,-68.0701,19.8816,2.48265,0,0,0.946214,0.323543,300,0,1), +(@GUID+19,195087,530,1,1,-4320.88,-12435.8,17.794,2.95615,0,0,0.995704,0.0925905,300,0,1), +(@GUID+20,195087,530,1,1,-1795.3,4913.74,-21.6189,5.79582,0,0,0.241278,-0.970456,300,0,1), +(@GUID+21,195087,0,1,1,-5167.15,-868.97,506.692,3.55298,0,0,0.97892,-0.204245,300,0,1), +(@GUID+22,195067,571,1,65535,5842.99,757.208,641.032,3.23312,0,0,0.998953,-0.0457468,300,0,1), +(@GUID+23,195067,571,1,65535,5848.67,757.932,640.765,0.331072,0,0,0.164781,0.98633,300,0,1), +(@GUID+24,195067,571,1,65535,5826.98,742.899,642.182,0.40961,0,0,0.203376,0.979101,300,0,1), +(@GUID+25,195067,571,1,65535,5833.05,758.772,640.632,6.22548,0,0,0.0288469,-0.999584,300,0,1), +(@GUID+26,195067,571,1,65535,5838.49,754.714,640.99,5.00419,0,0,0.596791,-0.802397,300,0,1), +(@GUID+27,195067,0,1,1,-9325.85,176.738,61.6842,4.03415,0,0,0.902059,-0.431613,300,0,1), +(@GUID+28,195067,0,1,1,-9339.4,177.75,61.5578,2.84035,0,0,0.988678,0.150053,300,0,1), +(@GUID+29,195067,0,1,1,-9341.6,186.007,61.5588,0.590182,0,0,0.290827,0.956776,300,0,1), +(@GUID+30,195067,0,1,1,-9349.4,172.027,61.5583,3.72,0,0,0.958472,-0.285187,300,0,1), +(@GUID+31,195067,0,1,1,-9333.49,166.771,61.5731,4.50147,0,0,0.777611,-0.628745,300,0,1), +(@GUID+32,195067,0,1,1,1838.15,218.056,60.1301,6.04382,0,0,0.119397,-0.992847,300,0,1), +(@GUID+33,195067,0,1,1,1824.56,214.048,60.2184,2.55272,0,0,0.956966,0.290199,300,0,1), +(@GUID+34,195067,0,1,1,1826.85,224.597,60.3819,1.15864,0,0,0.547456,0.836835,300,0,1), +(@GUID+35,195067,0,1,1,1834.25,227.476,60.3832,0.0394494,0,0,0.0197234,0.999805,300,0,1), +(@GUID+36,195067,530,1,1,9408.5,-6861.43,14.8097,5.18014,0,0,0.523987,-0.851727,300,0,1), +(@GUID+37,195067,530,1,1,9414.83,-6847.96,15.2124,0.302815,0,0,0.15083,0.98856,300,0,1), +(@GUID+38,195067,530,1,1,9406.18,-6848.78,15.7346,4.10414,0,0,0.886406,-0.462909,300,0,1), +(@GUID+39,195067,1,1,1,10040.1,2118.35,1329.71,6.16969,0,0,0.0567171,-0.99839,300,0,1), +(@GUID+40,195067,1,1,1,10054.5,2128.79,1329.66,0.15354,0,0,0.0766945,0.997055,300,0,1), +(@GUID+41,195067,1,1,1,10064.3,2124.92,1329.66,5.938,0,0,0.171738,-0.985143,300,0,1), +(@GUID+42,195067,1,1,1,10048.2,2118.42,1329.87,6.00475,0,0,0.138768,-0.990325,300,0,1), +(@GUID+43,195067,1,1,1,-981.572,-70.544,20.3174,2.24703,0,0,0.901626,0.432516,300,0,1), +(@GUID+44,195067,1,1,1,-982.861,-78.1374,20.4409,2.76147,0,0,0.981992,0.188921,300,0,1), +(@GUID+45,195067,1,1,1,-979.741,-82.5911,20.4482,2.84001,0,0,0.988652,0.150222,300,0,1), +(@GUID+46,195067,1,1,1,-985.891,-59.0171,27.1512,2.98923,0,0,0.9971,0.0761065,300,0,1), +(@GUID+47,195067,530,1,1,-4330.57,-12441.9,18.6116,1.10261,0,0,0.523798,0.851843,300,0,1), +(@GUID+48,195067,530,1,1,-4331.79,-12444.3,18.6116,1.10261,0,0,0.523798,0.851843,300,0,1), +(@GUID+49,195067,530,1,1,-4320.15,-12431.6,18.6801,3.86328,0,0,0.935599,-0.353065,300,0,1), +(@GUID+50,195067,530,1,1,-4318.44,-12430.1,18.6801,3.84757,0,0,0.938343,-0.345706,300,0,1), +(@GUID+51,195067,530,1,1,-4322.19,-12440.2,17.4944,3.02291,0,0,0.99824,0.0593089,300,0,1), +(@GUID+52,195067,530,1,1,-4323.07,-12450.7,16.8485,5.33983,0,0,0.454382,-0.890807,300,0,1), +(@GUID+53,195067,530,1,1,-4311.45,-12442.3,17.3037,0.772738,0,0,0.376827,0.926284,300,0,1), +(@GUID+54,195067,530,1,1,-1791.77,4917.77,-21.025,1.42901,0,0,0.655244,0.755417,300,0,1), +(@GUID+55,195067,530,1,1,-1789.47,4922.28,-21.0992,1.01275,0,0,0.48501,0.874508,300,0,1), +(@GUID+56,195067,530,1,1,-1784.66,4926.07,-21.1388,0.521876,0,0,0.257987,0.966148,300,0,1), +(@GUID+57,195067,530,1,1,-1799.03,4911.63,-21.3716,4.9201,0,0,0.62999,-0.776603,300,0,1), +(@GUID+58,195067,530,1,1,-1811.06,4914.83,-21.8399,3.80091,0,0,0.946153,-0.32372,300,0,1), +(@GUID+59,195067,530,1,1,-1804.87,4922.87,-21.9285,0.341232,0,0,0.169789,0.98548,300,0,1), +(@GUID+60,195067,0,1,1,-5157.02,-875.2,507.717,5.59108,0,0,0.339185,-0.94072,300,0,1), +(@GUID+61,195067,0,1,1,-5162.53,-877.151,507.269,3.8475,0,0,0.938356,-0.345672,300,0,1), +(@GUID+62,195067,0,1,1,-5168.31,-872.67,506.918,4.71929,0,0,0.704662,-0.709544,300,0,1), +(@GUID+63,195067,0,1,1,-5159.9,-868.605,507.293,4.7782,0,0,0.683461,-0.729987,300,0,1), +(@GUID+64,195067,0,1,1,-5153.67,-856.503,508.317,1.38528,0,0,0.63857,0.769564,300,0,1), +(@GUID+65,195090,0,1,1,-5153.07,-855.424,508.469,2.04894,0,0,0.854438,0.519553,300,0,1), +(@GUID+66,195090,1,1,1,1187.46,-4465.48,21.3276,5.08777,0,0,0.562749,-0.826628,300,0,1), +(@GUID+67,195090,1,1,1,1184.69,-4469.05,21.3202,3.92145,0,0,0.924935,-0.380125,300,0,1), +(@GUID+68,195090,1,1,1,1178.71,-4465.61,21.3464,2.50381,0,0,0.949584,0.313514,300,0,1), +(@GUID+69,195090,1,1,1,1173.45,-4463.9,21.2566,2.95934,0,0,0.995851,0.0909994,300,0,1), +(@GUID+70,195090,1,1,1,1174.56,-4459.12,21.5159,1.31393,0,0,0.610717,0.791849,300,0,1), +(@GUID+71,195090,1,1,1,1178.38,-4459.37,21.4634,6.03418,0,0,0.124183,-0.992259,300,0,1), +(@GUID+72,195090,1,1,1,1183.11,-4462.38,21.173,0.457849,0,0,0.22693,0.973911,300,0,1), +(@GUID+73,195090,0,1,1,-9319.35,175.184,61.6322,5.94267,0,0,0.169436,-0.985541,300,0,1), +(@GUID+74,195090,0,1,1,-9321.89,177.068,61.6465,5.64422,0,0,0.314075,-0.949398,300,0,1), +(@GUID+75,195090,0,1,1,-9324.42,178.952,61.9249,5.64422,0,0,0.314075,-0.949398,300,0,1), +(@GUID+76,195090,0,1,1,-9327.35,181.579,61.6579,5.76203,0,0,0.257639,-0.966241,300,0,1), +(@GUID+77,195090,0,1,1,-9329.68,183.137,61.6151,5.69527,0,0,0.289742,-0.957105,300,0,1), +(@GUID+78,195090,0,1,1,-9332.5,185.014,61.5442,5.69527,0,0,0.289742,-0.957105,300,0,1), +(@GUID+79,195090,0,1,1,-9336.77,184.723,61.5328,1.08891,0,0,0.517952,0.85541,300,0,1), +(@GUID+80,195090,0,1,1,-9340.96,187.22,61.5554,0.865071,0,0,0.419174,0.907906,300,0,1), +(@GUID+81,195090,0,1,1,-9347.4,178.086,61.558,4.29726,0,0,0.837647,-0.546212,300,0,1), +(@GUID+82,195090,0,1,1,-9349.37,175.371,61.7816,4.06557,0,0,0.895168,-0.445729,300,0,1), +(@GUID+83,195090,0,1,1,-9351.22,172.514,61.5657,4.2737,0,0,0.844024,-0.536305,300,0,1), +(@GUID+84,195090,0,1,1,-9352.79,169.484,61.5833,4.19909,0,0,0.86344,-0.504452,300,0,1), +(@GUID+85,195090,0,1,1,-9328.38,163.069,62.1162,5.656,0,0,0.308476,-0.951232,300,0,1), +(@GUID+86,195090,0,1,1,-9324.64,167.678,61.5815,2.66756,0,0,0.972043,0.234801,300,0,1), +(@GUID+87,195090,0,1,1,-9327.99,170.234,61.6257,2.49478,0,0,0.948158,0.317799,300,0,1), +(@GUID+88,195090,0,1,1,-9330.76,172.21,61.6444,2.42016,0,0,0.935645,0.352943,300,0,1), +(@GUID+89,195090,0,1,1,-9333.31,174.06,61.6475,2.60866,0,0,0.964707,0.263324,300,0,1), +(@GUID+90,195090,0,1,1,-9335.44,175.283,61.6076,2.62044,0,0,0.966242,0.257637,300,0,1), +(@GUID+91,195090,0,1,1,-9329.47,179.114,61.7075,1.27741,0,0,0.596156,0.802868,300,0,1), +(@GUID+92,195090,571,1,65535,5853.87,762.992,641.211,6.18229,0,0,0.0504241,-0.998728,300,0,1), +(@GUID+93,195090,571,1,65535,5855.51,765.516,641.483,0.212483,0,0,0.106042,0.994362,300,0,1), +(@GUID+94,195090,571,1,65535,5853.92,767.065,641.349,0.656233,0,0,0.322261,0.946651,300,0,1), +(@GUID+95,195090,571,1,65535,5851.19,767.209,640.997,0.597328,0,0,0.294244,0.95573,300,0,1), +(@GUID+96,195090,571,1,65535,5851.3,769.624,640.886,1.09213,0,0,0.519328,0.854575,300,0,1), +(@GUID+97,195090,571,1,65535,5849.36,771.084,640.573,1.31204,0,0,0.609968,0.792426,300,0,1), +(@GUID+98,195090,571,1,65535,5843.35,763.212,640.647,3.49938,0,0,0.984042,-0.177939,300,0,1), +(@GUID+99,195090,571,1,65535,5832.79,754.608,640.935,4.05308,0,0,0.897934,-0.440131,300,0,1), +(@GUID+100,195090,571,1,65535,5828.7,749.25,641.164,4.17874,0,0,0.868526,-0.495643,300,0,1), +(@GUID+101,195090,571,1,65535,5835.35,751.259,641.084,0.400976,0,0,0.199148,0.97997,300,0,1), +(@GUID+102,195090,571,1,65535,5827.74,742.946,642.332,0.687646,0,0,0.337089,0.941473,300,0,1), +(@GUID+103,195090,571,1,65535,5809.37,743.705,640.998,3.12238,0,0,0.999954,0.00960593,300,0,1), +(@GUID+104,195090,571,1,65535,5822.29,758.23,640.365,1.61049,0,0,0.721,0.692935,300,0,1), +(@GUID+105,195090,571,1,65535,5811.39,757.19,640.324,2.50977,0,0,0.950514,0.310683,300,0,1), +(@GUID+106,195090,571,1,65535,5846.75,758.117,640.939,6.14616,0,0,0.0684576,-0.997654,300,0,1), +(@GUID+107,195090,0,1,1,1830.63,211.165,60.3098,4.80682,0,0,0.672944,-0.739693,300,0,1), +(@GUID+108,195090,0,1,1,1840.85,213.082,61.3837,5.26628,0,0,0.486826,-0.873499,300,0,1), +(@GUID+109,195090,0,1,1,1841.8,219.772,60.7409,1.28038,0,0,0.597349,0.801981,300,0,1), +(@GUID+110,195090,0,1,1,1823.03,229.093,60.4377,2.72944,0,0,0.978842,0.204619,300,0,1), +(@GUID+111,195090,0,1,1,1827.77,222.032,60.6016,4.97961,0,0,0.60661,-0.795,300,0,1), +(@GUID+112,195090,0,1,1,1827.52,217.594,60.5054,4.65367,0,0,0.72756,-0.686044,300,0,1), +(@GUID+113,195090,0,1,1,1832.1,217.303,60.342,6.21268,0,0,0.0352447,-0.999379,300,0,1), +(@GUID+114,195090,0,1,1,1834.79,220.5,60.2436,1.11937,0,0,0.530921,0.847421,300,0,1), +(@GUID+115,195090,0,1,1,1814.67,217.597,60.2211,3.50306,0,0,0.983712,-0.17975,300,0,1), +(@GUID+116,195090,530,1,1,9407.83,-6850.31,15.4148,6.05585,0,0,0.113421,-0.993547,300,0,1), +(@GUID+117,195090,530,1,1,9412.52,-6848.4,15.3197,0.703365,0,0,0.344478,0.938794,300,0,1), +(@GUID+118,195090,530,1,1,9414.82,-6851.42,15.0296,5.58069,0,0,0.344071,-0.938944,300,0,1), +(@GUID+119,195090,530,1,1,9410.57,-6853.66,14.9713,3.57007,0,0,0.977139,-0.212602,300,0,1), +(@GUID+120,195090,530,1,1,9405.72,-6861.46,14.9588,4.79136,0,0,0.678642,-0.734469,300,0,1), +(@GUID+121,195090,530,1,1,9412.52,-6861.73,14.6487,5.88699,0,0,0.196805,-0.980443,300,0,1), +(@GUID+122,195090,530,1,1,9416.75,-6856.38,14.8519,5.80845,0,0,0.235147,-0.97196,300,0,1), +(@GUID+123,195090,530,1,1,9418.64,-6852.18,14.9737,5.72205,0,0,0.2769,-0.960899,300,0,1), +(@GUID+124,195090,1,1,1,10062.7,2128.29,1329.77,1.94816,0,0,0.827186,0.561928,300,0,1), +(@GUID+125,195090,1,1,1,10066.2,2127.23,1329.66,4.62637,0,0,0.736856,-0.67605,300,0,1), +(@GUID+126,195090,1,1,1,10065.9,2121.66,1330.2,4.78738,0,0,0.680104,-0.733115,300,0,1), +(@GUID+127,195090,1,1,1,10064.8,2117.6,1330.03,4.56746,0,0,0.756445,-0.654057,300,0,1), +(@GUID+128,195090,1,1,1,10063.4,2113.77,1330.06,4.01769,0,0,0.905582,-0.424171,300,0,1), +(@GUID+129,195090,1,1,1,10054.1,2110.63,1329.93,3.8449,0,0,0.938805,-0.344449,300,0,1), +(@GUID+130,195090,1,1,1,10049.1,2112.98,1330.03,2.00314,0,0,0.842318,0.538981,300,0,1), +(@GUID+131,195090,1,1,1,10046.4,2109.25,1329.96,4.10408,0,0,0.88642,-0.462882,300,0,1), +(@GUID+132,195090,1,1,1,10053.1,2126.22,1330.07,1.08422,0,0,0.515946,0.856621,300,0,1), +(@GUID+133,195090,1,1,1,10054,2130.84,1330.02,1.00961,0,0,0.483637,0.875269,300,0,1), +(@GUID+134,195090,1,1,1,10060.3,2124.09,1330.01,4.74418,0,0,0.695778,-0.718257,300,0,1), +(@GUID+135,195090,1,1,1,10059.9,2135.05,1330.75,1.53583,0,0,0.694637,0.719361,300,0,1), +(@GUID+136,195090,1,1,1,10066.4,2132.16,1332.09,2.49402,0,0,0.948037,0.31816,300,0,1), +(@GUID+137,195090,1,1,1,10052.2,2104.91,1330.92,3.28727,0,0,0.997349,-0.0727721,300,0,1), +(@GUID+138,195090,1,1,1,-988.152,-59.1082,27.5232,5.15851,0,0,0.533167,-0.84601,300,0,1), +(@GUID+139,195090,1,1,1,-977.555,-56.5706,26.7082,5.00143,0,0,0.5979,-0.801571,300,0,1), +(@GUID+140,195090,1,1,1,-979.763,-72.5159,19.6852,3.24999,0,0,0.998531,-0.0541744,300,0,1), +(@GUID+141,195090,1,1,1,-979.359,-76.7106,19.6107,3.13611,0,0,0.999996,0.00274046,300,0,1), +(@GUID+142,195090,1,1,1,-976.6,-74.4185,18.8465,3.47776,0,0,0.985907,-0.167293,300,0,1), +(@GUID+143,195090,1,1,1,-981.652,-79.1964,20.249,3.91758,0,0,0.925669,-0.378334,300,0,1), +(@GUID+144,195090,1,1,1,-985.178,-75.001,21.0173,3.12433,0,0,0.999963,0.00863036,300,0,1), +(@GUID+145,195090,1,1,1,-981.153,-66.7737,20.9042,2.28788,0,0,0.910272,0.41401,300,0,1), +(@GUID+146,195090,530,1,1,-4319.45,-12430.9,18.6806,2.09613,0,0,0.866459,0.499248,300,0,1), +(@GUID+147,195090,530,1,1,-4320.99,-12432.3,18.6806,3.9536,0,0,0.918707,-0.394941,300,0,1), +(@GUID+148,195090,530,1,1,-4331.11,-12443.6,18.6114,2.34746,0,0,0.922199,0.386715,300,0,1), +(@GUID+149,195090,530,1,1,-4325.9,-12451.6,16.6623,0.839496,0,0,0.40753,0.913192,300,0,1), +(@GUID+150,195090,530,1,1,-4326.17,-12455.4,16.9729,0.509629,0,0,0.252066,0.96771,300,0,1), +(@GUID+151,195090,530,1,1,-4320.52,-12456.9,17.3025,0.721686,0,0,0.353063,0.9356,300,0,1), +(@GUID+152,195090,530,1,1,-4321.35,-12454.2,17.2013,0.914109,0,0,0.441307,0.897356,300,0,1), +(@GUID+153,195090,530,1,1,-4320.01,-12449.5,17.0817,0.800226,0,0,0.389522,0.921017,300,0,1), +(@GUID+154,195090,530,1,1,-4314.66,-12447.8,17.3873,1.00836,0,0,0.483088,0.875572,300,0,1), +(@GUID+155,195090,530,1,1,-4311.21,-12446.3,17.4275,1.0869,0,0,0.51709,0.855931,300,0,1), +(@GUID+156,195090,530,1,1,-4316.32,-12444.3,17.1922,0.88662,0,0,0.428932,0.903337,300,0,1), +(@GUID+157,195090,530,1,1,-4310.89,-12440.6,17.2147,1.05941,0,0,0.505278,0.862957,300,0,1), +(@GUID+158,195090,530,1,1,-1801.49,4910.65,-21.3903,5.6034,0,0,0.333386,-0.94279,300,0,1), +(@GUID+159,195090,530,1,1,-1796.61,4911.2,-21.382,0.113465,0,0,0.0567022,0.998391,300,0,1), +(@GUID+160,195090,530,1,1,-1792.12,4916.53,-21.0244,1.24837,0,0,0.584434,0.811441,300,0,1), +(@GUID+161,195090,530,1,1,-1788.82,4923.25,-21.0863,1.01275,0,0,0.485009,0.874509,300,0,1), +(@GUID+162,195090,530,1,1,-1786.08,4925.63,-21.1386,0.243056,0,0,0.121229,0.992625,300,0,1), +(@GUID+163,195090,530,1,1,-1806.29,4914.21,-22.0573,3.90301,0,0,0.928401,-0.371579,300,0,1), +(@GUID+164,195090,530,1,1,-1814.82,4912.82,-21.4843,3.71452,0,0,0.95925,-0.28256,300,0,1), +(@GUID+165,195090,530,1,1,-1808.63,4922.35,-21.8564,1.05594,0,0,0.503782,0.863831,300,0,1), +(@GUID+166,195090,530,1,1,-1810.52,4926.39,-21.734,1.05202,0,0,0.502085,0.864818,300,0,1), +(@GUID+167,195090,530,1,1,-1812.06,4920.92,-21.9526,0.945987,0,0,0.455553,0.890209,300,0,1), +(@GUID+168,195090,530,1,1,-1795.43,4927.2,-22.1493,0.270544,0,0,0.13486,0.990865,300,0,1), +(@GUID+169,195090,530,1,1,-1796.32,4931.29,-22.3174,0.129173,0,0,0.0645415,0.997915,300,0,1), +(@GUID+170,195090,530,1,1,-1799.12,4928.21,-22.2813,0.707226,0,0,0.346289,0.938128,300,0,1), +(@GUID+171,195090,530,1,1,-1783.82,4935.44,-22.5892,5.4471,0,0,0.405971,-0.913886,300,0,1), +(@GUID+172,195090,530,1,1,-1829.25,4920.79,-21.671,4.42216,0,0,0.801927,-0.597422,300,0,1), +(@GUID+173,195090,530,1,1,-1835.24,4924,-21.3785,4.00983,0,0,0.907242,-0.420609,300,0,1), +(@GUID+174,195090,530,1,1,-1798.26,4902.69,-21.4127,5.45889,0,0,0.400579,-0.916262,300,0,1), +(@GUID+175,195090,530,1,1,-1792.22,4911.42,-21.4162,5.16829,0,0,0.529021,-0.848609,300,0,1), +(@GUID+176,195090,0,1,1,-5146.92,-846.795,509.814,4.73578,0,0,0.698788,-0.715329,300,0,1), +(@GUID+177,195090,0,1,1,-5148.88,-848.813,510.175,3.96217,0,0,0.917006,-0.398873,300,0,1), +(@GUID+178,195090,0,1,1,-5154.23,-851.792,509.604,3.80116,0,0,0.946112,-0.323839,300,0,1), +(@GUID+179,195090,0,1,1,-5151.12,-850.78,510.203,2.82334,0,0,0.987366,0.158455,300,0,1), +(@GUID+180,195090,0,1,1,-5157.25,-865.505,507.488,4.03286,0,0,0.902338,-0.431029,300,0,1), +(@GUID+181,195090,0,1,1,-5162.21,-871.414,507.192,3.93861,0,0,0.921641,-0.388044,300,0,1), +(@GUID+182,195090,0,1,1,-5158.06,-875.801,507.508,4.08391,0,0,0.891043,-0.453918,300,0,1), +(@GUID+183,195090,0,1,1,-5163.62,-875.984,507.254,4.18994,0,0,0.865739,-0.500496,300,0,1), +(@GUID+184,195090,0,1,1,-5166.94,-874.019,507.083,2.13612,0,0,0.876268,0.481825,300,0,1), +(@GUID+185,195090,0,1,1,-5166.83,-871.411,506.884,1.14652,0,0,0.542373,0.840138,300,0,1), +(@GUID+186,195090,0,1,1,-5164.94,-867.229,506.913,1.14652,0,0,0.542373,0.840138,300,0,1), +(@GUID+187,195090,0,1,1,-5167.77,-861.231,506.701,0.420025,0,0,0.208472,0.978028,300,0,1), +(@GUID+188,195090,0,1,1,-5165.58,-860.107,506.446,0.475003,0,0,0.235275,0.971929,300,0,1), +(@GUID+189,195090,0,1,1,-5163.08,-858.823,506.659,0.475003,0,0,0.235275,0.971929,300,0,1), +(@GUID+190,195090,0,1,1,-5160.59,-857.539,506.642,0.475003,0,0,0.235275,0.971929,300,0,1), +(@GUID+191,195090,0,1,1,-5157.78,-856.092,507.248,0.475003,0,0,0.235275,0.971929,300,0,1), +(@GUID+192,195307,1,1,1,10054.6,2131.96,1329.66,-2.75761,0,0,0,1,180,100,1), +(@GUID+193,195307,1,1,1,10062.8,2129.42,1329.66,-2.30383,0,0,0,1,180,100,1), +(@GUID+194,195307,0,1,1,-5159.66,-869.708,507.315,3.00195,0,0,0,1,180,100,1), +(@GUID+195,195307,0,1,1,-5160.8,-869.684,507.251,-2.30383,0,0,0,1,180,100,1), +(@GUID+196,195307,0,1,1,-9328.34,171.941,62.8343,3.00195,0,0,0,1,180,100,1), +(@GUID+197,195307,0,1,1,-9351.13,177.262,62.7149,-2.30383,0,0,0,1,180,100,1), +(@GUID+198,195307,1,1,1,1171.94,-4462.66,21.3171,3.00195,0,0,0,1,180,100,1), +(@GUID+199,195307,1,1,1,1177.22,-4464.5,22.4542,-2.30383,0,0,0,1,180,100,1), +(@GUID+200,195307,1,1,1,-984.535,-75.8281,20.8642,3.00195,0,0,0,1,180,100,1), +(@GUID+201,195307,1,1,1,-979.977,-71.342,20.7172,-2.30383,0,0,0,1,180,100,1), +(@GUID+202,195068,0,1,1,1780.14,269.759,59.8725,0,0,0,0,1,180,100,1), +(@GUID+203,195068,0,1,1,1777.31,220.538,59.5768,0,0,0,0,1,180,100,1), +(@GUID+204,195068,1,1,1,10053.6,2109.59,1329.65,0,0,0,0,1,180,100,1), +(@GUID+205,195068,1,1,1,10065,2118.72,1329.66,0,0,0,0,1,180,100,1), +(@GUID+206,195068,1,1,1,10053.4,2128.55,1329.66,0,0,0,0,1,180,100,1), +(@GUID+207,195068,0,1,1,-5160.02,-869.03,507.29,0,0,0,0,1,180,100,1), +(@GUID+208,195068,0,1,1,-5159.92,-870.566,507.307,0,0,0,0,1,180,100,1), +(@GUID+209,195068,0,1,1,-9328.37,170.188,61.6268,0,0,0,0,1,180,100,1), +(@GUID+210,195068,0,1,1,-9327.13,181.863,61.6551,0,0,0,0,1,180,100,1), +(@GUID+211,195068,1,1,1,1180.13,-4457.48,21.4889,0,0,0,0,1,180,100,1), +(@GUID+212,195068,1,1,1,1186.07,-4471.15,21.3707,0,0,0,0,1,180,100,1), +(@GUID+213,195068,1,1,1,1172.28,-4463.25,21.2866,0,0,0,0,1,180,100,1), +(@GUID+214,195068,1,1,1,-983.009,-70.0955,20.7835,0,0,0,0,1,180,100,1), +(@GUID+215,195068,1,1,1,-984.639,-76.1319,20.8549,0,0,0,0,1,180,100,1), +(@GUID+216,195068,1,1,1,-984.92,-75.1719,20.9388,0,0,0,0,1,180,100,1), +(@GUID+217,195067,0,1,1,1778.85,260.073,59.498,0,0,0,0,1,180,100,1), +(@GUID+218,195067,1,1,1,10054.1,2124.82,1329.7,0,0,0,0,1,180,100,1), +(@GUID+219,195067,1,1,1,10047.4,2110.17,1329.65,0,0,0,0,1,180,100,1), +(@GUID+220,195067,1,1,1,10059.8,2122.52,1329.67,0,0,0,0,1,180,100,1), +(@GUID+221,195067,0,1,1,-5161.69,-869.67,507.202,0,0,0,0,1,180,100,1), +(@GUID+222,195067,0,1,1,-9352.43,172.927,61.5748,0,0,0,0,1,180,100,1), +(@GUID+223,195067,1,1,1,1175.47,-4455.32,21.5219,0,0,0,0,1,180,100,1), +(@GUID+224,195067,1,1,1,1185.36,-4460.86,21.102,0,0,0,0,1,180,100,1), +(@GUID+225,195067,1,1,1,1179.27,-4468.45,21.2471,0,0,0,0,1,180,100,1), +(@GUID+226,195067,1,1,1,-983.566,-73.3247,20.6424,0,0,0,0,1,180,100,1), +(@GUID+227,195067,1,1,1,-980.892,-79.2656,20.1022,0,0,0,0,1,180,100,1), +(@GUID+228,195063,1,1,1,1191.1,-4465.38,21.489,0,0,0,0,1,180,100,1), +(@GUID+229,195063,1,1,1,1176.06,-4456.3,21.5271,0,0,0,0,1,180,100,1), +(@GUID+230,195063,1,1,1,1185.15,-4469.57,21.3318,0,0,0,0,1,180,100,1), +(@GUID+231,195063,0,1,1,1776.75,250.743,59.8824,0,0,0,0,1,180,100,1), +(@GUID+232,195063,0,1,1,1782.6,260.549,59.42,0,0,0,0,1,180,100,1), +(@GUID+233,195063,0,1,1,1776.35,223.174,59.5078,0,0,0,0,1,180,100,1), +(@GUID+234,195063,0,1,1,1781.6,252.318,59.5262,0,0,0,0,1,180,100,1), +(@GUID+235,195063,0,1,1,1779.51,268.924,59.893,0,0,0,0,1,180,100,1), +(@GUID+236,195063,1,1,1,10066.4,2120.48,1329.66,0,0,0,0,1,180,100,1), +(@GUID+237,195063,1,1,1,10046.7,2110.08,1329.65,0,0,0,0,1,180,100,1), +(@GUID+238,195063,1,1,1,10050.3,2118.57,1331.05,0,0,0,0,1,180,100,1), +(@GUID+239,195063,1,1,1,10063.6,2112.16,1329.66,0,0,0,0,1,180,100,1), +(@GUID+240,195063,1,1,1,10055,2111.28,1329.65,0,0,0,0,1,180,100,1), +(@GUID+241,195063,0,1,1,-5158.94,-869.955,507.357,0,0,0,0,1,180,100,1), +(@GUID+242,195063,0,1,1,-5160.05,-871.753,507.315,0,0,0,0,1,180,100,1), +(@GUID+243,195063,0,1,1,-5161.04,-868.969,507.233,0,0,0,0,1,180,100,1), +(@GUID+244,195063,0,1,1,-5149.86,-882.234,508.225,0,0,0,0,1,180,100,1), +(@GUID+245,195063,0,1,1,-5162.1,-870.601,507.185,0,0,0,0,1,180,100,1), +(@GUID+246,195063,0,1,1,-5149.59,-854.429,509.499,0,0,0,0,1,180,100,1), +(@GUID+247,195063,0,1,1,-9323.89,179.863,64.6421,0,0,0,0,1,180,100,1), +(@GUID+248,195063,0,1,1,-9330.93,172.332,61.6442,0,0,0,0,1,180,100,1), +(@GUID+249,195063,0,1,1,-9331.52,182.493,61.6,0,0,0,0,1,180,100,1), +(@GUID+250,195063,0,1,1,-9334.96,176.014,63.3874,0,0,0,0,1,180,100,1), +(@GUID+251,195063,0,1,1,-9340.66,187.524,61.5517,0,0,0,0,1,180,100,1), +(@GUID+252,195063,1,1,1,1176.77,-4463.59,22.4735,0,0,0,0,1,180,100,1), +(@GUID+253,195063,1,1,1,1177.63,-4467.96,21.307,0,0,0,0,1,180,100,1), +(@GUID+254,195063,1,1,1,1174.72,-4455.49,21.5368,0,0,0,0,1,180,100,1), +(@GUID+255,195063,1,1,1,-980.41,-71.3438,20.7185,0,0,0,0,1,180,100,1), +(@GUID+256,195063,1,1,1,-983.493,-72.6302,20.6698,0,0,0,0,1,180,100,1), +(@GUID+257,195063,1,1,1,-982.13,-68.0764,20.8836,0,0,0,0,1,180,100,1), +(@GUID+258,195063,1,1,1,-984.149,-77.3333,20.7527,0,0,0,0,1,180,100,1), +(@GUID+259,195063,1,1,1,-980.212,-80.2552,20.0676,0,0,0,0,1,180,100,1), +(@GUID+260,182807,1,1,1,1184.02,-4469.83,21.2852,0,0,0,0,1,180,100,1), +(@GUID+261,182807,530,1,1,9672.12,-7346.44,11.9311,-0.244346,0,0,0.121869,-0.992546,180,100,1), +(@GUID+262,182807,0,1,1,1780.18,214.781,59.8534,0,0,0,0,1,180,100,1), +(@GUID+263,182807,0,1,1,1780.76,215.611,59.7988,0,0,0,0,1,180,100,1), +(@GUID+264,182807,1,1,1,10063.4,2111.85,1329.66,0,0,0,0,1,180,100,1), +(@GUID+265,182807,1,1,1,10062.7,2129.98,1329.66,0,0,0,0,1,180,100,1), +(@GUID+266,182807,1,1,1,10065.5,2118.46,1329.66,0,0,0,0,1,180,100,1), +(@GUID+267,182807,1,1,1,10054.8,2132.24,1329.66,0,0,0,0,1,180,100,1), +(@GUID+268,182807,1,1,1,10053.7,2125.31,1329.69,0,0,0,0,1,180,100,1), +(@GUID+269,182807,0,1,1,-5161.27,-870.734,507.233,0,0,0,0,1,180,100,1), +(@GUID+270,182807,0,1,1,-5160.73,-871.283,507.27,0,0,0,0,1,180,100,1), +(@GUID+271,182807,0,1,1,-9326.85,170.807,62.8254,0,0,0,0,1,180,100,1), +(@GUID+272,182807,0,1,1,-9335.46,175.405,61.6072,0,0,0,0,1,180,100,1), +(@GUID+273,182807,1,1,1,1174.36,-4455.34,21.5514,0,0,0,0,1,180,100,1), +(@GUID+274,182807,1,1,1,-984.738,-73.1875,20.9946,0,0,0,0,1,180,100,1), +(@GUID+275,182807,1,1,1,-980.771,-79.8229,20.1335,0,0,0,0,1,180,100,1), +(@GUID+276,180885,0,1,1,1805.89,217.134,60.6002,1.51844,0,0,0,1,180,100,1), +(@GUID+277,180885,1,1,1,10050.3,2118.06,1329.94,0.750491,0,0,0,1,180,100,1), +(@GUID+278,180885,0,1,1,-5149.52,-854.931,508.432,0.750491,0,0,0,1,180,100,1), +(@GUID+279,180885,0,1,1,-9331.44,181.991,61.63,0.750491,0,0,0,1,180,100,1), +(@GUID+280,180885,1,1,1,1176.85,-4464.09,21.3468,0.750491,0,0,0,1,180,100,1), +(@GUID+281,180885,1,1,1,-980.33,-71.8455,19.5878,0.750491,0,0,0,1,180,100,1), +(@GUID+282,195066,0,1,1,-9328.34,170.201,61.6675,0,0,0,0,1,180,100,1), +(@GUID+283,195069,0,1,1,-9331.48,181.45,62.7343,-0.890117,0,0,0,1,180,100,1), +(@GUID+284,195069,0,1,1,-9332.01,182.043,62.6892,-0.157079,0,0,0,1,180,100,1), +(@GUID+285,195066,0,1,1,-9327.13,181.875,61.6549,0,0,0,0,1,180,100,1), +(@GUID+286,195069,0,1,1,-5149.05,-855.003,509.504,2.54818,0,0,0,1,180,100,1), +(@GUID+287,195069,0,1,1,-5149.55,-855.472,509.469,-0.890117,0,0,0,1,180,100,1), +(@GUID+288,195069,0,1,1,-5150.07,-854.878,509.496,-0.157079,0,0,0,1,180,100,1), +(@GUID+289,195066,0,1,1,-5159.99,-869.016,507.291,0,0,0,0,1,180,100,1), +(@GUID+290,195066,0,1,1,-5159.91,-870.554,507.307,0,0,0,0,1,180,100,1), +(@GUID+291,195069,1,1,1,10049.8,2118.11,1331.01,-0.157079,0,0,0,1,180,100,1), +(@GUID+292,195069,1,1,1,10050.9,2117.89,1331.03,1.72787,0,0,0,1,180,100,1), +(@GUID+293,195066,1,1,1,10065.1,2118.72,1329.66,0,0,0,0,1,180,100,1), +(@GUID+294,195066,1,1,1,10053.5,2128.55,1329.66,0,0,0,0,1,180,100,1), +(@GUID+295,195069,1,1,1,10050.3,2117.48,1330.99,-0.890117,0,0,0,1,180,100,1), +(@GUID+296,195066,1,1,1,10053.6,2109.59,1329.65,0,0,0,0,1,180,100,1), +(@GUID+297,195066,0,1,1,1777.32,220.55,59.5767,0,0,0,0,1,180,100,1), +(@GUID+298,195066,0,1,1,1780.16,269.773,59.8725,0,0,0,0,1,180,100,1), +(@GUID+299,195069,0,1,1,1805.33,217.408,61.5327,-0.157079,0,0,0,1,180,100,1), +(@GUID+300,195069,0,1,1,1805.86,216.814,61.5886,-0.890117,0,0,0,1,180,100,1), +(@GUID+301,195069,0,1,1,1806.35,217.283,61.5437,2.54818,0,0,0,1,180,100,1), +(@GUID+302,195066,1,1,1,1186.07,-4471.14,21.3708,0,0,0,0,1,180,100,1), +(@GUID+303,195066,1,1,1,1180.13,-4457.47,21.4891,0,0,0,0,1,180,100,1), +(@GUID+304,195069,1,1,1,1176.29,-4464.04,22.4501,-0.157079,0,0,0,1,180,100,1), +(@GUID+305,195066,1,1,1,1172.31,-4463.23,21.2882,0,0,0,0,1,180,100,1), +(@GUID+306,195069,1,1,1,1177.32,-4464.16,22.4611,2.54818,0,0,0,1,180,100,1), +(@GUID+307,195069,1,1,1,1176.82,-4464.63,22.4507,-0.890117,0,0,0,1,180,100,1), +(@GUID+308,195066,1,1,1,-984.632,-76.1215,20.8542,0,0,0,0,1,180,100,1), +(@GUID+309,195069,1,1,1,-979.866,-71.9184,20.7017,2.54818,0,0,0,1,180,100,1), +(@GUID+310,195066,1,1,1,-983.002,-70.0833,20.7837,0,0,0,0,1,180,100,1), +(@GUID+311,195066,1,1,1,-984.913,-75.1597,20.9375,0,0,0,0,1,180,100,1), +(@GUID+312,195069,1,1,1,-980.894,-71.7934,20.7099,-0.157079,0,0,0,1,180,100,1), +(@GUID+313,195069,1,1,1,-980.365,-72.3872,20.7085,-0.890117,0,0,0,1,180,100,1); +-- Assignment of gameobjects to event +DELETE FROM `game_event_gameobject` WHERE `eventEntry`=51 AND `guid` BETWEEN @GUID AND @GUID+314; +INSERT INTO `game_event_gameobject` (`eventEntry`, `guid`) VALUES +(51,@GUID),(51,@GUID+1),(51,@GUID+2),(51,@GUID+3),(51,@GUID+4),(51,@GUID+5),(51,@GUID+6),(51,@GUID+7),(51,@GUID+8),(51,@GUID+9),(51,@GUID+10), +(51,@GUID+11),(51,@GUID+12),(51,@GUID+13),(51,@GUID+14),(51,@GUID+15),(51,@GUID+16),(51,@GUID+17),(51,@GUID+18),(51,@GUID+19),(51,@GUID+20), +(51,@GUID+21),(51,@GUID+22),(51,@GUID+23),(51,@GUID+24),(51,@GUID+25),(51,@GUID+26),(51,@GUID+27),(51,@GUID+28),(51,@GUID+29),(51,@GUID+30), +(51,@GUID+31),(51,@GUID+32),(51,@GUID+33),(51,@GUID+34),(51,@GUID+35),(51,@GUID+36),(51,@GUID+37),(51,@GUID+38),(51,@GUID+39),(51,@GUID+40), +(51,@GUID+41),(51,@GUID+42),(51,@GUID+43),(51,@GUID+44),(51,@GUID+45),(51,@GUID+46),(51,@GUID+47),(51,@GUID+48),(51,@GUID+49),(51,@GUID+50), +(51,@GUID+51),(51,@GUID+52),(51,@GUID+53),(51,@GUID+54),(51,@GUID+55),(51,@GUID+56),(51,@GUID+57),(51,@GUID+58),(51,@GUID+59),(51,@GUID+60), +(51,@GUID+61),(51,@GUID+62),(51,@GUID+63),(51,@GUID+64),(51,@GUID+65),(51,@GUID+66),(51,@GUID+67),(51,@GUID+68),(51,@GUID+69),(51,@GUID+70), +(51,@GUID+71),(51,@GUID+72),(51,@GUID+73),(51,@GUID+74),(51,@GUID+75),(51,@GUID+76),(51,@GUID+77),(51,@GUID+78),(51,@GUID+79),(51,@GUID+80), +(51,@GUID+81),(51,@GUID+82),(51,@GUID+83),(51,@GUID+84),(51,@GUID+85),(51,@GUID+86),(51,@GUID+87),(51,@GUID+88),(51,@GUID+89),(51,@GUID+90), +(51,@GUID+91),(51,@GUID+92),(51,@GUID+93),(51,@GUID+94),(51,@GUID+95),(51,@GUID+96),(51,@GUID+97),(51,@GUID+98),(51,@GUID+99),(51,@GUID+100), +(51,@GUID+101),(51,@GUID+102),(51,@GUID+103),(51,@GUID+104),(51,@GUID+105),(51,@GUID+106),(51,@GUID+107),(51,@GUID+108),(51,@GUID+109),(51,@GUID+110), +(51,@GUID+111),(51,@GUID+112),(51,@GUID+113),(51,@GUID+114),(51,@GUID+115),(51,@GUID+116),(51,@GUID+117),(51,@GUID+118),(51,@GUID+119),(51,@GUID+120), +(51,@GUID+121),(51,@GUID+122),(51,@GUID+123),(51,@GUID+124),(51,@GUID+125),(51,@GUID+126),(51,@GUID+127),(51,@GUID+128),(51,@GUID+129),(51,@GUID+130), +(51,@GUID+131),(51,@GUID+132),(51,@GUID+133),(51,@GUID+134),(51,@GUID+135),(51,@GUID+136),(51,@GUID+137),(51,@GUID+138),(51,@GUID+139),(51,@GUID+140), +(51,@GUID+141),(51,@GUID+142),(51,@GUID+143),(51,@GUID+144),(51,@GUID+145),(51,@GUID+146),(51,@GUID+147),(51,@GUID+148),(51,@GUID+149),(51,@GUID+150), +(51,@GUID+151),(51,@GUID+152),(51,@GUID+153),(51,@GUID+154),(51,@GUID+155),(51,@GUID+156),(51,@GUID+157),(51,@GUID+158),(51,@GUID+159),(51,@GUID+160), +(51,@GUID+161),(51,@GUID+162),(51,@GUID+163),(51,@GUID+164),(51,@GUID+165),(51,@GUID+166),(51,@GUID+167),(51,@GUID+168),(51,@GUID+169),(51,@GUID+170), +(51,@GUID+171),(51,@GUID+172),(51,@GUID+173),(51,@GUID+174),(51,@GUID+175),(51,@GUID+176),(51,@GUID+177),(51,@GUID+178),(51,@GUID+179),(51,@GUID+180), +(51,@GUID+181),(51,@GUID+182),(51,@GUID+183),(51,@GUID+184),(51,@GUID+185),(51,@GUID+186),(51,@GUID+187),(51,@GUID+188),(51,@GUID+189),(51,@GUID+190), +(51,@GUID+191),(51,@GUID+192),(51,@GUID+193),(51,@GUID+194),(51,@GUID+195),(51,@GUID+196),(51,@GUID+197),(51,@GUID+198),(51,@GUID+199),(51,@GUID+200), +(51,@GUID+201),(51,@GUID+202),(51,@GUID+203),(51,@GUID+204),(51,@GUID+205),(51,@GUID+206),(51,@GUID+207),(51,@GUID+208),(51,@GUID+209),(51,@GUID+210), +(51,@GUID+211),(51,@GUID+212),(51,@GUID+213),(51,@GUID+214),(51,@GUID+215),(51,@GUID+216),(51,@GUID+217),(51,@GUID+218),(51,@GUID+219),(51,@GUID+220), +(51,@GUID+221),(51,@GUID+222),(51,@GUID+223),(51,@GUID+224),(51,@GUID+225),(51,@GUID+226),(51,@GUID+227),(51,@GUID+228),(51,@GUID+229),(51,@GUID+230), +(51,@GUID+231),(51,@GUID+232),(51,@GUID+233),(51,@GUID+234),(51,@GUID+235),(51,@GUID+236),(51,@GUID+237),(51,@GUID+238),(51,@GUID+239),(51,@GUID+240), +(51,@GUID+241),(51,@GUID+242),(51,@GUID+243),(51,@GUID+244),(51,@GUID+245),(51,@GUID+246),(51,@GUID+247),(51,@GUID+248),(51,@GUID+249),(51,@GUID+250), +(51,@GUID+251),(51,@GUID+252),(51,@GUID+253),(51,@GUID+254),(51,@GUID+255),(51,@GUID+256),(51,@GUID+257),(51,@GUID+258),(51,@GUID+259),(51,@GUID+260), +(51,@GUID+261),(51,@GUID+262),(51,@GUID+263),(51,@GUID+264),(51,@GUID+265),(51,@GUID+266),(51,@GUID+267),(51,@GUID+268),(51,@GUID+269),(51,@GUID+270), +(51,@GUID+271),(51,@GUID+272),(51,@GUID+273),(51,@GUID+274),(51,@GUID+275),(51,@GUID+276),(51,@GUID+277),(51,@GUID+278),(51,@GUID+279),(51,@GUID+280), +(51,@GUID+281),(51,@GUID+282),(51,@GUID+283),(51,@GUID+284),(51,@GUID+285),(51,@GUID+286),(51,@GUID+287),(51,@GUID+288),(51,@GUID+289),(51,@GUID+290), +(51,@GUID+291),(51,@GUID+292),(51,@GUID+293),(51,@GUID+294),(51,@GUID+295),(51,@GUID+296),(51,@GUID+297),(51,@GUID+298),(51,@GUID+299),(51,@GUID+300), +(51,@GUID+301),(51,@GUID+302),(51,@GUID+303),(51,@GUID+304),(51,@GUID+305),(51,@GUID+306),(51,@GUID+307),(51,@GUID+308),(51,@GUID+309),(51,@GUID+310), +(51,@GUID+311),(51,@GUID+312),(51,@GUID+313); +-- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +-- Issue 4803: To Catch a Sparrowhawk +-- Sparrowhawk SAI +SET @Sparrowhawk := 22979; +SET @Net := 39810; +SET @ItemSpell := 39812; +SET @QuestItem := 32320; +SET @Script := 39810; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@Sparrowhawk; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@Sparrowhawk AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@Sparrowhawk,0,0,0,13,0,100,0,0,0,0,0,25,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Sparrowhawk - On target casting spell on it - Flee'), +(@Sparrowhawk,0,1,2,8,0,100,0,@Net,0,0,0,85,@ItemSpell,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Sparrowhawk - On spell hit by net - Ivoker cast on self spell for item'), +(@Sparrowhawk,0,2,3,61,0,100,0,0,0,0,0,47,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Sparrowhawk - Linked with previous event - Set unseen'), +(@Sparrowhawk,0,3,0,61,0,100,0,0,0,0,0,41,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Sparrowhawk - Linked with previous event - Despawn in 1 sec'); +-- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +-- Issue 4843: Stop the Ascension! +-- Halfdan SAI +SET @Halfdan := 23671; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@Halfdan; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@Halfdan AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@Halfdan,0,0,0,54,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,2000,0,0,0,0,0, 'Halfdan - On summoned - Say line 1'), +(@Halfdan,0,1,0,52,0,100,0,0,@Halfdan,0,0,1,1,2000,0,0,0,0,1,0,0,0,0,0,0,0, 'Halfdan - On text 1 over - Say line 2'), +(@Halfdan,0,2,3,52,0,100,0,1,@Halfdan,0,0,2,14,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Halfdan - IC - Change faction to unfriendly'), +(@Halfdan,0,3,0,61,0,100,0,0,0,0,0,46,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Halfdan - Linked with previous event - Move 1 forward to aggro'), +(@Halfdan,0,4,0,0,0,100,0,2000,5000,9500,11500,11,35263,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Halfdan - IC - Cast Frost attack'), +(@Halfdan,0,5,0,0,0,100,0,2500,5000,6000,10000,11,32736,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Halfdan - IC - Cast Mortal Strike'), +(@Halfdan,0,6,0,0,0,100,0,1250,5000,5000,6000,11,12169,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Halfdan - IC - Cast Shield Block'), +(@Halfdan,0,7,0,0,0,100,0,3000,8000,4000,12000,11,32015,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Halfdan - IC - Cast Knockdown'), +(@Halfdan,0,8,0,9,0,100,0,8,25,5000,5000,11,19131,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Halfdan - On target in range - Cast Shield Charge'), +(@Halfdan,0,9,10,2,0,100,1,75,75,120000,120000,1,2,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Halfdan - At 75% HP - Say line 3'), +(@Halfdan,0,10,0,61,0,100,0,0,0,0,0,11,8599,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Halfdan - Linked with previous event - Cast Enrage on self'), +(@Halfdan,0,11,0,2,0,100,1,25,25,120000,120000,1,3,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Halfdan - At 25% HP - Say line 4'), +(@Halfdan,0,12,13,1,0,100,0,20000,20000,20000,20000,47,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Halfdan - OOC more than 20 sec - Set unseen'), +(@Halfdan,0,13,0,61,0,100,0,0,0,0,0,41,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Halfdan - Linked with previous event - Despawn in 1 sec'); +-- Texts +DELETE FROM `creature_text` WHERE `entry`=@Halfdan; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@Halfdan,0,0, 'You think I do not know what you are trying to do? You think I haven''t been watching you?',12,0,100,1,2000,0, 'Halfdan'), +(@Halfdan,1,0, 'Hah! You thought to interfere with my ascension? Nothing can stop me now!',12,0,100,1,2000,0, 'Halfdan'), +(@Halfdan,2,0, 'You will not stop my ascension, tiny $C. Time to die!',14,0,100,1,2000,0, 'Halfdan'), +(@Halfdan,3,0, 'No! You will not defeat me!',14,0,100,1,1000,0, 'Halfdan'); +-- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +-- Issue 4996: Melding of Influences +-- Primal Ooze and Captured Fel Ooze SAIs +SET @POoze := 6557; +SET @CFOoze := 10290; +SET @GFOoze := 9621; -- Gargantuan Ooze = result of merging +SET @SpellTrigger := 16031; -- Cast Releasing Corrupt Ooze - can be used only with target of Primal Ooze to summon the Corrupted Ooze and trigger events +SET @MergingOozes := 16032; -- Spell visual for Oozes at the moment of meging +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (@POoze,@CFOoze); +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid` IN (@POoze,@CFOoze); +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 +(@POoze,0,0,0,8,0,100,0,@SpellTrigger,0,0,0,22,2,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Primal Ooze - On hit by spell Releasing Ooze - Set phase 2'), +-- Phase 2 - used to delay a bit Primal Ooze actions, so the Corrupted Ooze will be spawned +(@POoze,0,1,2,60,2,100,1,1500,1500,0,0,45,0,1,0,0,0,0,9,@CFOoze,0,35,0,0,0,0, 'Primal Ooze - On event update in phase 2 - Set data 0 1 on Corrupted Ooze'), +(@POoze,0,2,0,61,2,100,0,0,0,0,0,29,0,0,10290,1,1,0,9,@CFOoze,0,35,0,0,0,0, 'Primal Ooze - Linked with previous event - Follow Captured felwood ooze'), +(@POoze,0,3,4,65,2,100,0,0,0,0,0,47,0,0,0,0,0,0,0,0,1,0,0,0,0,0, 'Primal Ooze - On follow complete - Set unseen'), +(@POoze,0,4,5,61,2,100,0,0,0,0,0,12,@GFOoze,6,20000,0,0,0,1,0,0,0,0,0,0,0, 'Primal Ooze - Linked with previous event - Spawn Gargantuan Ooze'), +(@POoze,0,5,6,61,2,100,0,0,0,0,0,11,@MergingOozes,0,0,0,0,0,9,@GFOoze,0,5,0,0,0,0, 'Captured Fel Ooze - Linked with previous event - Cast Merging Oozes on Gargantuan Ooze'), +(@POoze,0,6,0,61,2,100,0,0,0,0,0,41,50,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Primal Ooze - Linked with previous event - Despawn self'), +-- <<<>>>> +(@CFOoze,0,0,0,38,0,100,0,0,1,0,0,29,0,0,@POoze,0,1,0,9,@POoze,0,20,0,0,0,0, 'Captured Fel Ooze - On data set 0 1 - Follow Primal Ooze in less than 20 range'), +(@CFOoze,0,1,2,65,0,100,0,0,0,0,0,47,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Captured Fel Ooze - On follow complete - Set unseen'), +(@CFOoze,0,2,0,61,0,100,0,0,0,0,0,41,1000,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Captured Fel Ooze - Linked with previous event - Despawn'); +-- Add conditions for Releasing Corrupt Ooze +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=@SpellTrigger; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition` ,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(17,0,@SpellTrigger,0,0,31,1,3,@POoze,0,0,0, '', 'Releasing Corrupted Ooze can be casted only on Primal Ooze'); +-- Condition for Merging Oozes so it can hit only Gargantuan Ooze +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=@MergingOozes; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition` ,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(13,1,@MergingOozes,0,0,31,0,3,@GFOoze,0,0,0, '', 'Merging Oozes can hit only Gargantuan Ooze'); +-- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +DELETE FROM `creature_addon` WHERE `guid`=53882; diff --git a/src/server/authserver/CMakeLists.txt b/src/server/authserver/CMakeLists.txt index 0d94dc47407..581b48f571c 100644 --- a/src/server/authserver/CMakeLists.txt +++ b/src/server/authserver/CMakeLists.txt @@ -15,15 +15,9 @@ file(GLOB_RECURSE sources_realms Realms/*.cpp Realms/*.h) file(GLOB_RECURSE sources_server Server/*.cpp Server/*.h) file(GLOB sources_localdir *.cpp *.h) -if( USE_COREPCH ) - include_directories(${CMAKE_CURRENT_BINARY_DIR}) -endif() - -if ( USE_COREPCH AND MSVC ) - set(authserver_SRCS - PrecompiledHeaders/authPCH.cpp - PrecompiledHeaders/authPCH.h - ) +if (USE_COREPCH) + set(authserver_PCH_HDR PrecompiledHeaders/authPCH.h) + set(authserver_PCH_SRC PrecompiledHeaders/authPCH.cpp) endif() set(authserver_SRCS @@ -62,34 +56,23 @@ include_directories( ${OPENSSL_INCLUDE_DIR} ) -set(authserver_LINK_FLAGS "") - add_executable(authserver ${authserver_SRCS} + ${authserver_PCH_SRC} ) add_dependencies(authserver revision.h) if( NOT WIN32 ) - add_definitions(-D_TRINITY_REALM_CONFIG='"${CONF_DIR}/authserver.conf"') -endif() - -if( UNIX ) - set(authserver_LINK_FLAGS "-pthread ${authserver_LINK_FLAGS}") -endif() - -if( CMAKE_SYSTEM_NAME MATCHES "Darwin" ) - set(authserver_LINK_FLAGS "-framework Carbon ${authserver_LINK_FLAGS}") + set_target_properties(authserver PROPERTIES + COMPILE_DEFINITIONS _TRINITY_REALM_CONFIG="${CONF_DIR}/authserver.conf" + ) endif() -set_target_properties(authserver PROPERTIES LINK_FLAGS "${authserver_LINK_FLAGS}") - target_link_libraries(authserver shared ${MYSQL_LIBRARY} ${OPENSSL_LIBRARIES} - ${OPENSSL_EXTRA_LIBRARIES} - ${OSX_LIBS} ) if( WIN32 ) @@ -108,11 +91,6 @@ elseif( WIN32 ) endif() # Generate precompiled header -if( USE_COREPCH ) - if(CMAKE_COMPILER_IS_GNUCXX) - add_precompiled_header(authserver ${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders/authPCH.h) - elseif(MSVC) - add_native_precompiled_header(authserver ${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders/authPCH) - endif() +if (USE_COREPCH) + add_cxx_pch(authserver ${authserver_PCH_HDR} ${authserver_PCH_SRC}) endif() - diff --git a/src/server/authserver/Server/AuthSocket.cpp b/src/server/authserver/Server/AuthSocket.cpp index fc4d4dfcc9b..ed3b3cf4145 100755 --- a/src/server/authserver/Server/AuthSocket.cpp +++ b/src/server/authserver/Server/AuthSocket.cpp @@ -280,7 +280,7 @@ void AuthSocket::_SetVSFields(const std::string& rI) v = g.ModExp(x, N); // No SQL injection (username escaped) - const char *v_hex, *s_hex; + char *v_hex, *s_hex; v_hex = v.AsHexStr(); s_hex = s.AsHexStr(); @@ -290,8 +290,8 @@ void AuthSocket::_SetVSFields(const std::string& rI) stmt->setString(2, _login); LoginDatabase.Execute(stmt); - OPENSSL_free((void*)v_hex); - OPENSSL_free((void*)s_hex); + OPENSSL_free(v_hex); + OPENSSL_free(s_hex); } // Logon Challenge command handler diff --git a/src/server/authserver/Server/RealmSocket.cpp b/src/server/authserver/Server/RealmSocket.cpp index c868bb43777..d65431eca44 100755 --- a/src/server/authserver/Server/RealmSocket.cpp +++ b/src/server/authserver/Server/RealmSocket.cpp @@ -79,7 +79,7 @@ int RealmSocket::open(void * arg) return 0; } -int RealmSocket::close(int) +int RealmSocket::close(u_long) { shutdown(); diff --git a/src/server/authserver/Server/RealmSocket.h b/src/server/authserver/Server/RealmSocket.h index c03a0e3ad1e..b093691047c 100755 --- a/src/server/authserver/Server/RealmSocket.h +++ b/src/server/authserver/Server/RealmSocket.h @@ -59,7 +59,7 @@ public: virtual int open(void *); - virtual int close(int); + virtual int close(u_long); virtual int handle_input(ACE_HANDLE = ACE_INVALID_HANDLE); virtual int handle_output(ACE_HANDLE = ACE_INVALID_HANDLE); diff --git a/src/server/collision/CMakeLists.txt b/src/server/collision/CMakeLists.txt index 9fc696ab19a..3182b20d008 100644 --- a/src/server/collision/CMakeLists.txt +++ b/src/server/collision/CMakeLists.txt @@ -17,12 +17,10 @@ file(GLOB_RECURSE sources_Maps Maps/*.cpp Maps/*.h) file(GLOB_RECURSE sources_Models Models/*.cpp Models/*.h) file(GLOB sources_localdir *.cpp *.h) -if( USE_COREPCH AND MSVC ) - set(collision_STAT_SRCS - PrecompiledHeaders/collisionPCH.cpp - PrecompiledHeaders/collisionPCH.h - ) -endif() +if (USE_COREPCH) + set(collision_STAT_PCH_HDR PrecompiledHeaders/collisionPCH.h) + set(collision_STAT_PCH_SRC PrecompiledHeaders/collisionPCH.cpp) +endif () set(collision_STAT_SRCS ${collision_STAT_SRCS} @@ -33,6 +31,7 @@ set(collision_STAT_SRCS ) include_directories( + ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/dep/g3dlite/include ${CMAKE_SOURCE_DIR}/src/server/shared ${CMAKE_SOURCE_DIR}/src/server/shared/Debugging @@ -73,20 +72,16 @@ include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/Management ${CMAKE_CURRENT_SOURCE_DIR}/Maps ${CMAKE_CURRENT_SOURCE_DIR}/Models - ${CMAKE_BINARY_DIR} ${ACE_INCLUDE_DIR} ${MYSQL_INCLUDE_DIR} - ${OPENSSL_INCLUDE_DIR} ) -add_library(collision STATIC ${collision_STAT_SRCS}) +add_library(collision STATIC + ${collision_STAT_SRCS} + ${collision_STAT_PCH_SRC} +) # Generate precompiled header -if( USE_COREPCH ) - if(CMAKE_COMPILER_IS_GNUCXX) - add_precompiled_header(collision ${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders/collisionPCH.h) - elseif(MSVC) - add_native_precompiled_header(collision ${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders/collisionPCH) - endif() -endif() - +if (USE_COREPCH) + add_cxx_pch(collision ${collision_STAT_PCH_HDR} ${collision_STAT_PCH_SRC}) +endif () diff --git a/src/server/collision/RegularGrid.h b/src/server/collision/RegularGrid.h index 00d7b0cd209..5b7d1d74987 100644 --- a/src/server/collision/RegularGrid.h +++ b/src/server/collision/RegularGrid.h @@ -86,7 +86,7 @@ public: static Cell ComputeCell(float fx, float fy) { - Cell c = {fx * (1.f/CELL_SIZE) + (CELL_NUMBER/2), fy * (1.f/CELL_SIZE) + (CELL_NUMBER/2)}; + Cell c = { int(fx * (1.f/CELL_SIZE) + (CELL_NUMBER/2)), int(fy * (1.f/CELL_SIZE) + (CELL_NUMBER/2)) }; return c; } diff --git a/src/server/game/AI/CoreAI/CombatAI.cpp b/src/server/game/AI/CoreAI/CombatAI.cpp index 5ab5f99310a..d9d19c2f009 100755 --- a/src/server/game/AI/CoreAI/CombatAI.cpp +++ b/src/server/game/AI/CoreAI/CombatAI.cpp @@ -21,6 +21,7 @@ #include "SpellInfo.h" #include "Vehicle.h" #include "ObjectAccessor.h" +#include "Player.h" int AggressorAI::Permissible(const Creature* creature) { diff --git a/src/server/game/AI/EventAI/CreatureEventAI.cpp b/src/server/game/AI/EventAI/CreatureEventAI.cpp index 78a84eb7ae4..84e44109e58 100755 --- a/src/server/game/AI/EventAI/CreatureEventAI.cpp +++ b/src/server/game/AI/EventAI/CreatureEventAI.cpp @@ -497,23 +497,6 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32 } break; } - case ACTION_T_SUMMON: - { - Unit* target = GetTargetByType(action.summon.target, actionInvoker); - - Creature* creature = NULL; - - if (action.summon.duration) - creature = me->SummonCreature(action.summon.creatureId, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, action.summon.duration); - else - creature = me->SummonCreature(action.summon.creatureId, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 0); - - if (!creature) - sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: failed to spawn creature %u. Spawn event %d is on creature %d", action.summon.creatureId, eventId, me->GetEntry()); - else if (action.summon.target != TARGET_T_SELF && target) - creature->AI()->AttackStart(target); - break; - } case ACTION_T_THREAT_SINGLE_PCT: if (Unit* target = GetTargetByType(action.threat_single_pct.target, actionInvoker)) me->getThreatManager().modifyThreatPercent(target, action.threat_single_pct.percent); @@ -663,30 +646,6 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32 else sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: ACTION_T_RANDOM_PHASE_RANGE cannot have Param2 < Param1. Event = %d. CreatureEntry = %d", eventId, me->GetEntry()); break; - case ACTION_T_SUMMON_ID: - { - Unit* target = GetTargetByType(action.summon_id.target, actionInvoker); - - CreatureEventAI_Summon_Map::const_iterator i = sEventAIMgr->GetCreatureEventAISummonMap().find(action.summon_id.spawnId); - if (i == sEventAIMgr->GetCreatureEventAISummonMap().end()) - { - sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: failed to spawn creature %u. Summon map index %u does not exist. EventID %d. CreatureID %d", action.summon_id.creatureId, action.summon_id.spawnId, eventId, me->GetEntry()); - return; - } - - Creature* creature = NULL; - if ((*i).second.SpawnTimeSecs) - creature = me->SummonCreature(action.summon_id.creatureId, (*i).second.position_x, (*i).second.position_y, (*i).second.position_z, (*i).second.orientation, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, (*i).second.SpawnTimeSecs); - else - creature = me->SummonCreature(action.summon_id.creatureId, (*i).second.position_x, (*i).second.position_y, (*i).second.position_z, (*i).second.orientation, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 0); - - if (!creature) - sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: failed to spawn creature %u. EventId %d.Creature %d", action.summon_id.creatureId, eventId, me->GetEntry()); - else if (action.summon_id.target != TARGET_T_SELF && target) - creature->AI()->AttackStart(target); - - break; - } case ACTION_T_KILLED_MONSTER: //first attempt player who tapped creature if (Player* player = me->GetLootRecipient()) @@ -798,7 +757,6 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32 } break; } - case ACTION_T_SET_SHEATH: { me->SetSheath(SheathState(action.set_sheath.sheath)); diff --git a/src/server/game/AI/EventAI/CreatureEventAIMgr.cpp b/src/server/game/AI/EventAI/CreatureEventAIMgr.cpp index 2d973d9eb8f..f3df332c1e9 100755 --- a/src/server/game/AI/EventAI/CreatureEventAIMgr.cpp +++ b/src/server/game/AI/EventAI/CreatureEventAIMgr.cpp @@ -26,6 +26,7 @@ #include "ConditionMgr.h" #include "SpellMgr.h" #include "SpellInfo.h" +#include "Player.h" // ------------------- void CreatureEventAIMgr::LoadCreatureEventAI_Texts() @@ -100,52 +101,6 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Texts() sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u additional CreatureEventAI Texts data in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } -void CreatureEventAIMgr::LoadCreatureEventAI_Summons() -{ - uint32 oldMSTime = getMSTime(); - - //Drop Existing EventSummon Map - m_CreatureEventAI_Summon_Map.clear(); - - // Gather additional data for EventAI - QueryResult result = WorldDatabase.Query("SELECT id, position_x, position_y, position_z, orientation, spawntimesecs FROM creature_ai_summons"); - - if (!result) - { - sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 CreatureEventAI Summon definitions. DB table `creature_ai_summons` is empty."); - return; - } - - uint32 count = 0; - - do - { - Field* fields = result->Fetch(); - - CreatureEventAI_Summon temp; - - uint32 i = fields[0].GetUInt32(); - temp.position_x = fields[1].GetFloat(); - temp.position_y = fields[2].GetFloat(); - temp.position_z = fields[3].GetFloat(); - temp.orientation = fields[4].GetFloat(); - temp.SpawnTimeSecs = fields[5].GetUInt32(); - - if (!Trinity::IsValidMapCoord(temp.position_x, temp.position_y, temp.position_z, temp.orientation)) - { - sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Summon id %u have wrong coordinates (%f, %f, %f, %f), skipping.", i, temp.position_x, temp.position_y, temp.position_z, temp.orientation); - continue; - } - - //Add to map - m_CreatureEventAI_Summon_Map[i] = temp; - ++count; - } - while (result->NextRow()); - - sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u CreatureEventAI summon definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); -} - void CreatureEventAIMgr::LoadCreatureEventAI_Scripts() { uint32 oldMSTime = getMSTime(); @@ -622,14 +577,6 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts() // equal case processed at call } break; - case ACTION_T_SUMMON_ID: - if (!sObjectMgr->GetCreatureTemplate(action.summon_id.creatureId)) - sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses non-existant creature entry %u.", i, j+1, action.summon_id.creatureId); - if (action.summon_id.target >= TARGET_T_END) - sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses incorrect Target type", i, j+1); - if (m_CreatureEventAI_Summon_Map.find(action.summon_id.spawnId) == m_CreatureEventAI_Summon_Map.end()) - sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u summons missing CreatureEventAI_Summon %u", i, j+1, action.summon_id.spawnId); - break; case ACTION_T_KILLED_MONSTER: if (!sObjectMgr->GetCreatureTemplate(action.killed_monster.creatureId)) sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses non-existant creature entry %u.", i, j+1, action.killed_monster.creatureId); diff --git a/src/server/game/AI/EventAI/CreatureEventAIMgr.h b/src/server/game/AI/EventAI/CreatureEventAIMgr.h index 93e953681b6..75e24266fb5 100755 --- a/src/server/game/AI/EventAI/CreatureEventAIMgr.h +++ b/src/server/game/AI/EventAI/CreatureEventAIMgr.h @@ -32,16 +32,13 @@ class CreatureEventAIMgr public: void LoadCreatureEventAI_Texts(); - void LoadCreatureEventAI_Summons(); void LoadCreatureEventAI_Scripts(); CreatureEventAI_Event_Map const& GetCreatureEventAIMap() const { return m_CreatureEventAI_Event_Map; } - CreatureEventAI_Summon_Map const& GetCreatureEventAISummonMap() const { return m_CreatureEventAI_Summon_Map; } CreatureEventAI_TextMap const& GetCreatureEventAITextMap() const { return m_CreatureEventAI_TextMap; } private: CreatureEventAI_Event_Map m_CreatureEventAI_Event_Map; - CreatureEventAI_Summon_Map m_CreatureEventAI_Summon_Map; CreatureEventAI_TextMap m_CreatureEventAI_TextMap; }; diff --git a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp index 9c666e7de32..3f5952a210d 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp +++ b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp @@ -12,6 +12,7 @@ EndScriptData */ #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" #include "Group.h" +#include "Player.h" enum ePoints { diff --git a/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp b/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp index ebb734156b4..96209084240 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp +++ b/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp @@ -12,6 +12,7 @@ EndScriptData */ #include "ScriptedCreature.h" #include "ScriptedFollowerAI.h" #include "Group.h" +#include "Player.h" const float MAX_PLAYER_DISTANCE = 100.0f; diff --git a/src/server/game/AI/ScriptedAI/ScriptedGossip.h b/src/server/game/AI/ScriptedAI/ScriptedGossip.h index 34300ff406c..ae1b5fcc12d 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedGossip.h +++ b/src/server/game/AI/ScriptedAI/ScriptedGossip.h @@ -8,7 +8,6 @@ #ifndef SC_GOSSIP_H #define SC_GOSSIP_H -#include "Player.h" #include "GossipDef.h" #include "QuestDef.h" diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp index a1fb2147cc2..61f848cd04c 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -472,6 +472,13 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr) { + // Special handling for vehicles + if (IsUnit(*itr)) + if (Vehicle* vehicle = (*itr)->ToUnit()->GetVehicleKit()) + for (SeatMap::iterator it = vehicle->Seats.begin(); it != vehicle->Seats.end(); ++it) + if (Player* player = ObjectAccessor::FindPlayer(it->second.Passenger)) + player->AreaExploredOrEventHappens(e.action.quest.quest); + if (IsPlayer(*itr)) { (*itr)->ToPlayer()->AreaExploredOrEventHappens(e.action.quest.quest); @@ -752,6 +759,11 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u sLog->outDebug(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction: SMART_ACTION_CALL_GROUPEVENTHAPPENS: Player %u, group credit for quest %u", unit->GetGUIDLow(), e.action.quest.quest); } + // Special handling for vehicles + if (Vehicle* vehicle = unit->GetVehicleKit()) + for (SeatMap::iterator it = vehicle->Seats.begin(); it != vehicle->Seats.end(); ++it) + if (Player* player = ObjectAccessor::FindPlayer(it->second.Passenger)) + player->GroupEventHappens(e.action.quest.quest, GetBaseObject()); break; } case SMART_ACTION_CALL_CASTEDCREATUREORGO: @@ -878,6 +890,13 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr) { + // Special handling for vehicles + if (IsUnit(*itr)) + if (Vehicle* vehicle = (*itr)->ToUnit()->GetVehicleKit()) + for (SeatMap::iterator it = vehicle->Seats.begin(); it != vehicle->Seats.end(); ++it) + if (Player* player = ObjectAccessor::FindPlayer(it->second.Passenger)) + player->RewardPlayerAndGroupAtEvent(e.action.killedMonster.creature, player); + if (!IsPlayer(*itr)) continue; diff --git a/src/server/game/Achievements/AchievementMgr.cpp b/src/server/game/Achievements/AchievementMgr.cpp index 0ee133edce9..0504effa651 100755 --- a/src/server/game/Achievements/AchievementMgr.cpp +++ b/src/server/game/Achievements/AchievementMgr.cpp @@ -1617,7 +1617,6 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui case ACHIEVEMENT_CRITERIA_TYPE_OWN_RANK: case ACHIEVEMENT_CRITERIA_TYPE_EARNED_PVP_TITLE: case ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE_TYPE: - case ACHIEVEMENT_CRITERIA_TYPE_TOTAL: break; // Not implemented yet :( } diff --git a/src/server/game/Battlefield/Battlefield.h b/src/server/game/Battlefield/Battlefield.h index 0752fa88fc1..77525b7d06e 100644 --- a/src/server/game/Battlefield/Battlefield.h +++ b/src/server/game/Battlefield/Battlefield.h @@ -79,6 +79,8 @@ class BfCapturePoint public: BfCapturePoint(Battlefield* bf); + virtual ~BfCapturePoint() { } + virtual void FillInitialWorldStates(WorldPacket& /*data*/) {} // Send world state update to all players present diff --git a/src/server/game/Battlefield/BattlefieldHandler.cpp b/src/server/game/Battlefield/BattlefieldHandler.cpp index 1ebeb664fb3..a2d8cec3936 100644 --- a/src/server/game/Battlefield/BattlefieldHandler.cpp +++ b/src/server/game/Battlefield/BattlefieldHandler.cpp @@ -25,6 +25,7 @@ #include "Battlefield.h" #include "BattlefieldMgr.h" #include "Opcodes.h" +#include "Player.h" //This send to player windows for invite player to join the war //Param1:(BattleId) the BattleId of Bf diff --git a/src/server/game/Battlefield/Zones/BattlefieldWG.cpp b/src/server/game/Battlefield/Zones/BattlefieldWG.cpp index 59dc6761583..505bfb353f2 100644 --- a/src/server/game/Battlefield/Zones/BattlefieldWG.cpp +++ b/src/server/game/Battlefield/Zones/BattlefieldWG.cpp @@ -24,6 +24,7 @@ #include "BattlefieldWG.h" #include "SpellAuras.h" #include "Vehicle.h" +#include "Player.h" enum WGVehicles { diff --git a/src/server/game/Battlefield/Zones/BattlefieldWG.h b/src/server/game/Battlefield/Zones/BattlefieldWG.h index 49ea25a5e04..0a81a7af992 100644 --- a/src/server/game/Battlefield/Zones/BattlefieldWG.h +++ b/src/server/game/Battlefield/Zones/BattlefieldWG.h @@ -21,11 +21,9 @@ #include "ObjectAccessor.h" #include "WorldPacket.h" -#include "World.h" -#include "Group.h" -#include "GroupMgr.h" #include "Battlefield.h" +class Group; class BattlefieldWG; class WintergraspCapturePoint; @@ -153,10 +151,10 @@ class BfGraveyardWG : public BfGraveyard public: BfGraveyardWG(BattlefieldWG* Bf); - void SetTextId(uint32 textid) { m_GossipTextId = textid; } - uint32 GetTextId() { return m_GossipTextId; } + void SetTextId(int32 textid) { m_GossipTextId = textid; } + int32 GetTextId() { return m_GossipTextId; } protected: - uint32 m_GossipTextId; + int32 m_GossipTextId; }; enum WGGraveyardId @@ -227,7 +225,7 @@ struct BfWGCoordGY float o; uint32 gyid; uint8 type; - uint32 textid; // for gossip menu + int32 textid; // for gossip menu TeamId startcontrol; }; diff --git a/src/server/game/Battlegrounds/ArenaTeam.cpp b/src/server/game/Battlegrounds/ArenaTeam.cpp index d763b29bbc1..0223541335c 100755 --- a/src/server/game/Battlegrounds/ArenaTeam.cpp +++ b/src/server/game/Battlegrounds/ArenaTeam.cpp @@ -22,6 +22,7 @@ #include "World.h" #include "Group.h" #include "ArenaTeamMgr.h" +#include "Player.h" ArenaTeam::ArenaTeam() : TeamId(0), Type(0), TeamName(), CaptainGuid(0), BackgroundColor(0), EmblemStyle(0), EmblemColor(0), diff --git a/src/server/game/Battlegrounds/ArenaTeamMgr.cpp b/src/server/game/Battlegrounds/ArenaTeamMgr.cpp index 55de445345b..8a2dcecd209 100644 --- a/src/server/game/Battlegrounds/ArenaTeamMgr.cpp +++ b/src/server/game/Battlegrounds/ArenaTeamMgr.cpp @@ -22,6 +22,7 @@ #include "DatabaseEnv.h" #include "Language.h" #include "ObjectAccessor.h" +#include "Player.h" ArenaTeamMgr::ArenaTeamMgr() { diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp index 50f8554d5db..d00bbcf098d 100755 --- a/src/server/game/Battlegrounds/Battleground.cpp +++ b/src/server/game/Battlegrounds/Battleground.cpp @@ -642,7 +642,12 @@ void Battleground::SendPacketToTeam(uint32 TeamID, WorldPacket* packet, Player* for (BattlegroundPlayerMap::const_iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr) if (Player* player = _GetPlayerForTeam(TeamID, itr, "SendPacketToTeam")) if (self || sender != player) - player->GetSession()->SendPacket(packet); + { + WorldSession* session = player->GetSession(); + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "%s %s - SendPacketToTeam %u, Player: %s", GetOpcodeNameForLogging(packet->GetOpcode()).c_str(), + session->GetPlayerInfo().c_str(), TeamID, sender ? sender->GetName().c_str() : "null"); + session->SendPacket(packet); + } } void Battleground::PlaySoundToAll(uint32 SoundID) @@ -1064,7 +1069,7 @@ void Battleground::RemovePlayerAtLeave(uint64 guid, bool Transport, bool SendPac if (Transport) player->TeleportToBGEntryPoint(); - sLog->outInfo(LOG_FILTER_BATTLEGROUND, "BATTLEGROUND: Removed player %s from Battleground.", player->GetName().c_str()); + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Removed player %s from Battleground.", player->GetName().c_str()); } //battleground object will be deleted next Battleground::Update() call @@ -1078,9 +1083,6 @@ void Battleground::Reset() SetStartTime(0); SetEndTime(0); SetLastResurrectTime(0); - SetArenaType(0); - SetRated(false); - m_Events = 0; if (m_InvitedAlliance > 0 || m_InvitedHorde > 0) @@ -1177,10 +1179,9 @@ void Battleground::AddPlayer(Player* player) player->ResetAllPowers(); } - WorldPacket teammate; - teammate.Initialize(SMSG_ARENA_OPPONENT_UPDATE, 8); - teammate << uint64(player->GetGUID()); - SendPacketToTeam(team, &teammate, player, false); + WorldPacket data(SMSG_ARENA_OPPONENT_UPDATE, 8); + data << uint64(player->GetGUID()); + SendPacketToTeam(team, &data, player, false); } else { @@ -1203,9 +1204,6 @@ void Battleground::AddPlayer(Player* player) // setup BG group membership PlayerAddedToBGCheckIfBGIsRunning(player); AddOrSetPlayerToCorrectBgGroup(player, team); - - // Log - sLog->outInfo(LOG_FILTER_BATTLEGROUND, "BATTLEGROUND: Player %s joined the battle.", player->GetName().c_str()); } // this method adds player to his team's bg group, or sets his correct group if player is already in bg group diff --git a/src/server/game/Battlegrounds/Battleground.h b/src/server/game/Battlegrounds/Battleground.h index 6d188d1367a..6e839bfa6e2 100755 --- a/src/server/game/Battlegrounds/Battleground.h +++ b/src/server/game/Battlegrounds/Battleground.h @@ -168,23 +168,6 @@ struct BattlegroundObjectInfo uint32 spellid; }; -// handle the queue types and bg types separately to enable joining queue for different sized arenas at the same time -enum BattlegroundQueueTypeId -{ - BATTLEGROUND_QUEUE_NONE = 0, - BATTLEGROUND_QUEUE_AV = 1, - BATTLEGROUND_QUEUE_WS = 2, - BATTLEGROUND_QUEUE_AB = 3, - BATTLEGROUND_QUEUE_EY = 4, - BATTLEGROUND_QUEUE_SA = 5, - BATTLEGROUND_QUEUE_IC = 6, - BATTLEGROUND_QUEUE_RB = 7, - BATTLEGROUND_QUEUE_2v2 = 8, - BATTLEGROUND_QUEUE_3v3 = 9, - BATTLEGROUND_QUEUE_5v5 = 10, - MAX_BATTLEGROUND_QUEUE_TYPES -}; - enum ScoreType { SCORE_KILLING_BLOWS = 1, @@ -253,27 +236,6 @@ enum BattlegroundStartingEventsIds }; #define BG_STARTING_EVENT_COUNT 4 -enum GroupJoinBattlegroundResult -{ - // positive values are indexes in BattlemasterList.dbc - ERR_GROUP_JOIN_BATTLEGROUND_FAIL = 0, // Your group has joined a battleground queue, but you are not eligible (showed for non existing BattlemasterList.dbc indexes) - ERR_BATTLEGROUND_NONE = -1, // not show anything - ERR_GROUP_JOIN_BATTLEGROUND_DESERTERS = -2, // You cannot join the battleground yet because you or one of your party members is flagged as a Deserter. - ERR_ARENA_TEAM_PARTY_SIZE = -3, // Incorrect party size for this arena. - ERR_BATTLEGROUND_TOO_MANY_QUEUES = -4, // You can only be queued for 2 battles at once - ERR_BATTLEGROUND_CANNOT_QUEUE_FOR_RATED = -5, // You cannot queue for a rated match while queued for other battles - ERR_BATTLEDGROUND_QUEUED_FOR_RATED = -6, // You cannot queue for another battle while queued for a rated arena match - ERR_BATTLEGROUND_TEAM_LEFT_QUEUE = -7, // Your team has left the arena queue - ERR_BATTLEGROUND_NOT_IN_BATTLEGROUND = -8, // You can't do that in a battleground. - ERR_BATTLEGROUND_JOIN_XP_GAIN = -9, // wtf, doesn't exist in client... - ERR_BATTLEGROUND_JOIN_RANGE_INDEX = -10, // Cannot join the queue unless all members of your party are in the same battleground level range. - ERR_BATTLEGROUND_JOIN_TIMED_OUT = -11, // %s was unavailable to join the queue. (uint64 guid exist in client cache) - ERR_BATTLEGROUND_JOIN_FAILED = -12, // Join as a group failed (uint64 guid doesn't exist in client cache) - ERR_LFG_CANT_USE_BATTLEGROUND = -13, // You cannot queue for a battleground or arena while using the dungeon system. - ERR_IN_RANDOM_BG = -14, // Can't do that while in a Random Battleground queue. - ERR_IN_NON_RANDOM_BG = -15 // Can't queue for Random Battleground while in another Battleground queue. -}; - struct BattlegroundScore { BattlegroundScore() : KillingBlows(0), Deaths(0), HonorableKills(0), BonusHonor(0), diff --git a/src/server/game/Battlegrounds/BattlegroundMgr.cpp b/src/server/game/Battlegrounds/BattlegroundMgr.cpp index bfa3b955427..6d472faf9c6 100755 --- a/src/server/game/Battlegrounds/BattlegroundMgr.cpp +++ b/src/server/game/Battlegrounds/BattlegroundMgr.cpp @@ -131,7 +131,7 @@ void BattlegroundMgr::Update(uint32 diff) if (m_NextRatedArenaUpdate < diff) { // forced update for rated arenas (scan all, but skipped non rated) - sLog->outDebug(LOG_FILTER_BATTLEGROUND, "BattlegroundMgr: UPDATING ARENA QUEUES"); + sLog->outTrace(LOG_FILTER_ARENAS, "BattlegroundMgr: UPDATING ARENA QUEUES"); for (int qtype = BATTLEGROUND_QUEUE_2v2; qtype <= BATTLEGROUND_QUEUE_5v5; ++qtype) for (int bracket = BG_BRACKET_ID_FIRST; bracket < MAX_BATTLEGROUND_BRACKETS; ++bracket) m_BattlegroundQueues[qtype].BattlegroundQueueUpdate(diff, @@ -904,25 +904,25 @@ BattlegroundQueueTypeId BattlegroundMgr::BGQueueTypeId(BattlegroundTypeId bgType { switch (bgTypeId) { - case BATTLEGROUND_WS: - return BATTLEGROUND_QUEUE_WS; case BATTLEGROUND_AB: return BATTLEGROUND_QUEUE_AB; case BATTLEGROUND_AV: return BATTLEGROUND_QUEUE_AV; case BATTLEGROUND_EY: return BATTLEGROUND_QUEUE_EY; - case BATTLEGROUND_SA: - return BATTLEGROUND_QUEUE_SA; case BATTLEGROUND_IC: return BATTLEGROUND_QUEUE_IC; case BATTLEGROUND_RB: return BATTLEGROUND_QUEUE_RB; + case BATTLEGROUND_SA: + return BATTLEGROUND_QUEUE_SA; + case BATTLEGROUND_WS: + return BATTLEGROUND_QUEUE_WS; case BATTLEGROUND_AA: - case BATTLEGROUND_NA: - case BATTLEGROUND_RL: case BATTLEGROUND_BE: case BATTLEGROUND_DS: + case BATTLEGROUND_NA: + case BATTLEGROUND_RL: case BATTLEGROUND_RV: switch (arenaType) { diff --git a/src/server/game/Battlegrounds/BattlegroundQueue.cpp b/src/server/game/Battlegrounds/BattlegroundQueue.cpp index 922cccb9186..cc53de7e39a 100755 --- a/src/server/game/Battlegrounds/BattlegroundQueue.cpp +++ b/src/server/game/Battlegrounds/BattlegroundQueue.cpp @@ -24,6 +24,7 @@ #include "ArenaTeamMgr.h" #include "Log.h" #include "Group.h" +#include "Player.h" /*********************************************************/ /*** BATTLEGROUND QUEUE SYSTEM ***/ @@ -216,7 +217,7 @@ GroupQueueInfo* BattlegroundQueue::AddGroup(Player* leader, Group* grp, Battlegr // Show queue status to player only (when joining queue) if (sWorld->getBoolConfig(CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_PLAYERONLY)) { - ChatHandler(leader).PSendSysMessage(LANG_BG_QUEUE_ANNOUNCE_SELF, bgName, q_min_level, q_max_level, + ChatHandler(leader->GetSession()).PSendSysMessage(LANG_BG_QUEUE_ANNOUNCE_SELF, bgName, q_min_level, q_max_level, qAlliance, (MinPlayers > qAlliance) ? MinPlayers - qAlliance : (uint32)0, qHorde, (MinPlayers > qHorde) ? MinPlayers - qHorde : (uint32)0); } // System message @@ -475,7 +476,7 @@ bool BattlegroundQueue::InviteGroupToBG(GroupQueueInfo* ginfo, Battleground* bg, uint32 queueSlot = player->GetBattlegroundQueueIndex(bgQueueTypeId); - sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Battleground: invited player %s (%u) to BG instance %u queueindex %u bgtype %u, I can't help it if they don't press the enter battle button.", + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Battleground: invited player %s (%u) to BG instance %u queueindex %u bgtype %u", player->GetName().c_str(), player->GetGUIDLow(), bg->GetInstanceID(), queueSlot, bg->GetTypeID()); // send status packet diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundIC.h b/src/server/game/Battlegrounds/Zones/BattlegroundIC.h index 1386af13186..9e58a93fd2d 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundIC.h +++ b/src/server/game/Battlegrounds/Zones/BattlegroundIC.h @@ -20,6 +20,8 @@ #define __BATTLEGROUNDIC_H #include "Battleground.h" +#include "Language.h" +#include "Object.h" const uint32 BG_IC_Factions[2] = { diff --git a/src/server/game/CMakeLists.txt b/src/server/game/CMakeLists.txt index 68ae2d8ea38..cf71bb1b2fa 100644 --- a/src/server/game/CMakeLists.txt +++ b/src/server/game/CMakeLists.txt @@ -8,10 +8,6 @@ # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -if( USE_COREPCH ) - include_directories(${CMAKE_CURRENT_BINARY_DIR}) -endif() - file(GLOB_RECURSE sources_Accounts Accounts/*.cpp Accounts/*.h) file(GLOB_RECURSE sources_Achievements Achievements/*.cpp Achievements/*.h) file(GLOB_RECURSE sources_Addons Addons/*.cpp Addons/*.h) @@ -55,12 +51,10 @@ file(GLOB_RECURSE sources_World World/*.cpp World/*.h) # Create game-libary -if( USE_COREPCH AND MSVC ) - set(game_STAT_SRCS - PrecompiledHeaders/gamePCH.cpp - PrecompiledHeaders/gamePCH.h - ) -endif() +if (USE_COREPCH) + set(game_STAT_PCH_HDR PrecompiledHeaders/gamePCH.h) + set(game_STAT_PCH_SRC PrecompiledHeaders/gamePCH.cpp) +endif () set(game_STAT_SRCS ${game_STAT_SRCS} @@ -205,15 +199,14 @@ include_directories( ${OPENSSL_INCLUDE_DIR} ) -add_library(game STATIC ${game_STAT_SRCS}) +add_library(game STATIC + ${game_STAT_SRCS} + ${game_STAT_PCH_SRC} +) add_dependencies(game revision.h) # Generate precompiled header -if( USE_COREPCH ) - if(CMAKE_COMPILER_IS_GNUCXX) - add_precompiled_header(game ${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders/gamePCH.h) - elseif(MSVC) - add_native_precompiled_header(game ${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders/gamePCH) - endif() -endif() +if (USE_COREPCH) + add_cxx_pch(game ${game_STAT_PCH_HDR} ${game_STAT_PCH_SRC}) +endif () diff --git a/src/server/game/Chat/Channels/Channel.cpp b/src/server/game/Chat/Channels/Channel.cpp index 66f964fb4cf..3ccab6e5c6c 100755 --- a/src/server/game/Chat/Channels/Channel.cpp +++ b/src/server/game/Chat/Channels/Channel.cpp @@ -23,6 +23,7 @@ #include "World.h" #include "DatabaseEnv.h" #include "AccountMgr.h" +#include "Player.h" Channel::Channel(const std::string& name, uint32 channel_id, uint32 Team) : m_announce(true), m_ownership(true), m_name(name), m_password(""), m_flags(0), m_channelId(channel_id), @@ -385,7 +386,7 @@ void Channel::Password(uint64 p, const char *pass) if (player) sec = player->GetSession()->GetSecurity(); - ChatHandler chat(player); + ChatHandler chat(player->GetSession()); if (!IsOn(p)) { diff --git a/src/server/game/Chat/Channels/Channel.h b/src/server/game/Chat/Channels/Channel.h index bdb5112c7ef..d33a19acc6e 100755 --- a/src/server/game/Chat/Channels/Channel.h +++ b/src/server/game/Chat/Channels/Channel.h @@ -26,7 +26,6 @@ #include "Common.h" #include "Opcodes.h" -#include "Player.h" #include "WorldPacket.h" enum ChatNotify diff --git a/src/server/game/Chat/Channels/ChannelMgr.cpp b/src/server/game/Chat/Channels/ChannelMgr.cpp index 78b71744e0e..66111e5a6db 100755 --- a/src/server/game/Chat/Channels/ChannelMgr.cpp +++ b/src/server/game/Chat/Channels/ChannelMgr.cpp @@ -17,7 +17,7 @@ */ #include "ChannelMgr.h" - +#include "Player.h" #include "World.h" ChannelMgr::~ChannelMgr() diff --git a/src/server/game/Chat/Chat.cpp b/src/server/game/Chat/Chat.cpp index 7faf05a577c..c1ea96b0db1 100755 --- a/src/server/game/Chat/Chat.cpp +++ b/src/server/game/Chat/Chat.cpp @@ -1169,6 +1169,11 @@ int ChatHandler::GetSessionDbLocaleIndex() const return m_session->GetSessionDbLocaleIndex(); } +std::string ChatHandler::GetNameLink(Player* chr) const +{ + return playerLink(chr->GetName()); +} + const char *CliHandler::GetTrinityString(int32 entry) const { return sObjectMgr->GetTrinityStringForDBCLocale(entry); diff --git a/src/server/game/Chat/Chat.h b/src/server/game/Chat/Chat.h index 0c1b22182e1..3b08fd9aa76 100755 --- a/src/server/game/Chat/Chat.h +++ b/src/server/game/Chat/Chat.h @@ -20,16 +20,18 @@ #define TRINITYCORE_CHAT_H #include "SharedDefines.h" -#include "Player.h" +#include "WorldSession.h" #include <vector> class ChatHandler; -class WorldSession; -class WorldObject; class Creature; +class Group; class Player; class Unit; +class WorldSession; +class WorldObject; + struct GameTele; class ChatCommand @@ -48,7 +50,6 @@ class ChatHandler public: WorldSession* GetSession() { return m_session; } explicit ChatHandler(WorldSession* session) : m_session(session), sentErrorMessage(false) {} - explicit ChatHandler(Player* player) : m_session(player->GetSession()), sentErrorMessage(false) {} virtual ~ChatHandler() {} static void FillMessageData(WorldPacket* data, WorldSession* session, uint8 type, uint32 language, const char *channelName, uint64 target_guid, const char *message, Unit* speaker); @@ -115,7 +116,7 @@ class ChatHandler bool extractPlayerTarget(char* args, Player** player, uint64* player_guid = NULL, std::string* player_name = NULL); std::string playerLink(std::string const& name) const { return m_session ? "|cffffffff|Hplayer:"+name+"|h["+name+"]|h|r" : name; } - std::string GetNameLink(Player* chr) const { return playerLink(chr->GetName()); } + std::string GetNameLink(Player* chr) const; GameObject* GetNearbyGameObject(); GameObject* GetObjectGlobalyWithGuidOrNearWithDbGuid(uint32 lowguid, uint32 entry); diff --git a/src/server/game/Chat/ChatLink.cpp b/src/server/game/Chat/ChatLink.cpp index d26f937c43d..8b9346be815 100644 --- a/src/server/game/Chat/ChatLink.cpp +++ b/src/server/game/Chat/ChatLink.cpp @@ -19,6 +19,7 @@ #include "SpellMgr.h" #include "ObjectMgr.h" #include "SpellInfo.h" +#include "DBCStores.h" // Supported shift-links (client generated and server side) // |color|Hachievement:achievement_id:player_guid:0:0:0:0:0:0:0:0|h[name]|h|r diff --git a/src/server/game/Conditions/DisableMgr.cpp b/src/server/game/Conditions/DisableMgr.cpp index a209d9b6cf6..cc23036c534 100755 --- a/src/server/game/Conditions/DisableMgr.cpp +++ b/src/server/game/Conditions/DisableMgr.cpp @@ -21,6 +21,7 @@ #include "OutdoorPvP.h" #include "SpellMgr.h" #include "VMapManager2.h" +#include "Player.h" namespace DisableMgr { diff --git a/src/server/game/DataStores/DBCEnums.h b/src/server/game/DataStores/DBCEnums.h index 12ec7206141..4fa2e3e748e 100755 --- a/src/server/game/DataStores/DBCEnums.h +++ b/src/server/game/DataStores/DBCEnums.h @@ -19,18 +19,21 @@ #ifndef DBCENUMS_H #define DBCENUMS_H -// Client expected level limitation, like as used in DBC item max levels for "until max player level" -// use as default max player level, must be fit max level for used client -// also see MAX_LEVEL and STRONG_MAX_LEVEL define -#define DEFAULT_MAX_LEVEL 80 - -// client supported max level for player/pets/etc. Avoid overflow or client stability affected. -// also see GT_MAX_LEVEL define -#define MAX_LEVEL 100 - -// Server side limitation. Base at used code requirements. -// also see MAX_LEVEL and GT_MAX_LEVEL define -#define STRONG_MAX_LEVEL 255 +enum LevelLimit +{ + // Client expected level limitation, like as used in DBC item max levels for "until max player level" + // use as default max player level, must be fit max level for used client + // also see MAX_LEVEL and STRONG_MAX_LEVEL define + DEFAULT_MAX_LEVEL = 80, + + // client supported max level for player/pets/etc. Avoid overflow or client stability affected. + // also see GT_MAX_LEVEL define + MAX_LEVEL = 100, + + // Server side limitation. Base at used code requirements. + // also see MAX_LEVEL and GT_MAX_LEVEL define + STRONG_MAX_LEVEL = 255, +}; enum BattlegroundBracketId // bracketId for level ranges { @@ -58,16 +61,16 @@ enum AchievementFaction enum AchievementFlags { - ACHIEVEMENT_FLAG_COUNTER = 0x00000001, // Just count statistic (never stop and complete) - ACHIEVEMENT_FLAG_HIDDEN = 0x00000002, // Not sent to client - internal use only - ACHIEVEMENT_FLAG_STORE_MAX_VALUE = 0x00000004, // Store only max value? used only in "Reach level xx" - ACHIEVEMENT_FLAG_SUMM = 0x00000008, // Use summ criteria value from all reqirements (and calculate max value) - ACHIEVEMENT_FLAG_MAX_USED = 0x00000010, // Show max criteria (and calculate max value ??) - ACHIEVEMENT_FLAG_REQ_COUNT = 0x00000020, // Use not zero req count (and calculate max value) - ACHIEVEMENT_FLAG_AVERAGE = 0x00000040, // Show as average value (value / time_in_days) depend from other flag (by def use last criteria value) - ACHIEVEMENT_FLAG_BAR = 0x00000080, // Show as progress bar (value / max vale) depend from other flag (by def use last criteria value) - ACHIEVEMENT_FLAG_REALM_FIRST_REACH = 0x00000100, // - ACHIEVEMENT_FLAG_REALM_FIRST_KILL = 0x00000200 // + ACHIEVEMENT_FLAG_COUNTER = 0x00000001, // Just count statistic (never stop and complete) + ACHIEVEMENT_FLAG_HIDDEN = 0x00000002, // Not sent to client - internal use only + ACHIEVEMENT_FLAG_STORE_MAX_VALUE = 0x00000004, // Store only max value? used only in "Reach level xx" + ACHIEVEMENT_FLAG_SUMM = 0x00000008, // Use summ criteria value from all requirements (and calculate max value) + ACHIEVEMENT_FLAG_MAX_USED = 0x00000010, // Show max criteria (and calculate max value ??) + ACHIEVEMENT_FLAG_REQ_COUNT = 0x00000020, // Use not zero req count (and calculate max value) + ACHIEVEMENT_FLAG_AVERAGE = 0x00000040, // Show as average value (value / time_in_days) depend from other flag (by def use last criteria value) + ACHIEVEMENT_FLAG_BAR = 0x00000080, // Show as progress bar (value / max vale) depend from other flag (by def use last criteria value) + ACHIEVEMENT_FLAG_REALM_FIRST_REACH = 0x00000100, // + ACHIEVEMENT_FLAG_REALM_FIRST_KILL = 0x00000200 // }; #define MAX_CRITERIA_REQUIREMENTS 2 @@ -108,124 +111,117 @@ enum AchievementCriteriaTimedTypes enum AchievementCriteriaTypes { - ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE = 0, - ACHIEVEMENT_CRITERIA_TYPE_WIN_BG = 1, - ACHIEVEMENT_CRITERIA_TYPE_REACH_LEVEL = 5, - ACHIEVEMENT_CRITERIA_TYPE_REACH_SKILL_LEVEL = 7, - ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_ACHIEVEMENT = 8, - ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUEST_COUNT = 9, - // you have to complete a daily quest x times in a row - ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_DAILY_QUEST_DAILY = 10, - ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUESTS_IN_ZONE = 11, - ACHIEVEMENT_CRITERIA_TYPE_DAMAGE_DONE = 13, - ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_DAILY_QUEST = 14, - ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_BATTLEGROUND= 15, - ACHIEVEMENT_CRITERIA_TYPE_DEATH_AT_MAP= 16, - ACHIEVEMENT_CRITERIA_TYPE_DEATH= 17, - ACHIEVEMENT_CRITERIA_TYPE_DEATH_IN_DUNGEON = 18, - ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_RAID = 19, - ACHIEVEMENT_CRITERIA_TYPE_KILLED_BY_CREATURE = 20, - ACHIEVEMENT_CRITERIA_TYPE_KILLED_BY_PLAYER = 23, - ACHIEVEMENT_CRITERIA_TYPE_FALL_WITHOUT_DYING = 24, - ACHIEVEMENT_CRITERIA_TYPE_DEATHS_FROM = 26, - ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUEST = 27, - ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET = 28, - ACHIEVEMENT_CRITERIA_TYPE_CAST_SPELL= 29, - ACHIEVEMENT_CRITERIA_TYPE_BG_OBJECTIVE_CAPTURE = 30, - ACHIEVEMENT_CRITERIA_TYPE_HONORABLE_KILL_AT_AREA = 31, - ACHIEVEMENT_CRITERIA_TYPE_WIN_ARENA = 32, - ACHIEVEMENT_CRITERIA_TYPE_PLAY_ARENA = 33, - ACHIEVEMENT_CRITERIA_TYPE_LEARN_SPELL = 34, - ACHIEVEMENT_CRITERIA_TYPE_HONORABLE_KILL = 35, - ACHIEVEMENT_CRITERIA_TYPE_OWN_ITEM = 36, - // TODO: the archievements 1162 and 1163 requires a special rating which can't be found in the dbc - ACHIEVEMENT_CRITERIA_TYPE_WIN_RATED_ARENA = 37, - ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_TEAM_RATING = 38, - ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_PERSONAL_RATING = 39, - ACHIEVEMENT_CRITERIA_TYPE_LEARN_SKILL_LEVEL = 40, - ACHIEVEMENT_CRITERIA_TYPE_USE_ITEM = 41, - ACHIEVEMENT_CRITERIA_TYPE_LOOT_ITEM= 42, - ACHIEVEMENT_CRITERIA_TYPE_EXPLORE_AREA = 43, - ACHIEVEMENT_CRITERIA_TYPE_OWN_RANK= 44, - ACHIEVEMENT_CRITERIA_TYPE_BUY_BANK_SLOT= 45, - ACHIEVEMENT_CRITERIA_TYPE_GAIN_REPUTATION= 46, - ACHIEVEMENT_CRITERIA_TYPE_GAIN_EXALTED_REPUTATION= 47, - // noted: rewarded as soon as the player payed, not at taking place at the seat - ACHIEVEMENT_CRITERIA_TYPE_VISIT_BARBER_SHOP= 48, - ACHIEVEMENT_CRITERIA_TYPE_EQUIP_EPIC_ITEM = 49, - // TODO: itemlevel is mentioned in text but not present in dbc - ACHIEVEMENT_CRITERIA_TYPE_ROLL_NEED_ON_LOOT = 50, - ACHIEVEMENT_CRITERIA_TYPE_ROLL_GREED_ON_LOOT= 51, - ACHIEVEMENT_CRITERIA_TYPE_HK_CLASS = 52, - ACHIEVEMENT_CRITERIA_TYPE_HK_RACE = 53, - ACHIEVEMENT_CRITERIA_TYPE_DO_EMOTE = 54, - ACHIEVEMENT_CRITERIA_TYPE_HEALING_DONE = 55, - // TODO: in some cases map not present, and in some cases need do without die - ACHIEVEMENT_CRITERIA_TYPE_GET_KILLING_BLOWS = 56, - ACHIEVEMENT_CRITERIA_TYPE_EQUIP_ITEM = 57, - ACHIEVEMENT_CRITERIA_TYPE_MONEY_FROM_VENDORS = 59, - ACHIEVEMENT_CRITERIA_TYPE_GOLD_SPENT_FOR_TALENTS = 60, - ACHIEVEMENT_CRITERIA_TYPE_NUMBER_OF_TALENT_RESETS = 61, - ACHIEVEMENT_CRITERIA_TYPE_MONEY_FROM_QUEST_REWARD = 62, - ACHIEVEMENT_CRITERIA_TYPE_GOLD_SPENT_FOR_TRAVELLING = 63, - ACHIEVEMENT_CRITERIA_TYPE_GOLD_SPENT_AT_BARBER = 65, - ACHIEVEMENT_CRITERIA_TYPE_GOLD_SPENT_FOR_MAIL = 66, - ACHIEVEMENT_CRITERIA_TYPE_LOOT_MONEY = 67, - ACHIEVEMENT_CRITERIA_TYPE_USE_GAMEOBJECT = 68, - ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET2= 69, - ACHIEVEMENT_CRITERIA_TYPE_SPECIAL_PVP_KILL= 70, - ACHIEVEMENT_CRITERIA_TYPE_FISH_IN_GAMEOBJECT = 72, - // TODO: title id is not mentioned in dbc - ACHIEVEMENT_CRITERIA_TYPE_EARNED_PVP_TITLE = 74, - ACHIEVEMENT_CRITERIA_TYPE_LEARN_SKILLLINE_SPELLS= 75, - ACHIEVEMENT_CRITERIA_TYPE_WIN_DUEL = 76, - ACHIEVEMENT_CRITERIA_TYPE_LOSE_DUEL = 77, - // TODO: creature type (demon, undead etc.) is not stored in dbc - ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE_TYPE = 78, - ACHIEVEMENT_CRITERIA_TYPE_GOLD_EARNED_BY_AUCTIONS= 80, - ACHIEVEMENT_CRITERIA_TYPE_CREATE_AUCTION= 82, - ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_AUCTION_BID= 83, - ACHIEVEMENT_CRITERIA_TYPE_WON_AUCTIONS= 84, - ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_AUCTION_SOLD = 85, - ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_GOLD_VALUE_OWNED = 86, - ACHIEVEMENT_CRITERIA_TYPE_GAIN_REVERED_REPUTATION = 87, - ACHIEVEMENT_CRITERIA_TYPE_GAIN_HONORED_REPUTATION = 88, - ACHIEVEMENT_CRITERIA_TYPE_KNOWN_FACTIONS = 89, - ACHIEVEMENT_CRITERIA_TYPE_LOOT_EPIC_ITEM = 90, - ACHIEVEMENT_CRITERIA_TYPE_RECEIVE_EPIC_ITEM = 91, - ACHIEVEMENT_CRITERIA_TYPE_ROLL_NEED = 93, - ACHIEVEMENT_CRITERIA_TYPE_ROLL_GREED = 94, - ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_HEALTH = 95, - ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_POWER = 96, - ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_STAT = 97, - ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_SPELLPOWER = 98, - ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_ARMOR = 99, - ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_RATING = 100, - ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_HIT_DEALT = 101, - ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_HIT_RECEIVED = 102, - ACHIEVEMENT_CRITERIA_TYPE_TOTAL_DAMAGE_RECEIVED = 103, - ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_HEAL_CASTED = 104, - ACHIEVEMENT_CRITERIA_TYPE_TOTAL_HEALING_RECEIVED = 105, - ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_HEALING_RECEIVED = 106, - ACHIEVEMENT_CRITERIA_TYPE_QUEST_ABANDONED = 107, - ACHIEVEMENT_CRITERIA_TYPE_FLIGHT_PATHS_TAKEN = 108, - ACHIEVEMENT_CRITERIA_TYPE_LOOT_TYPE = 109, - // TODO: target entry is missing - ACHIEVEMENT_CRITERIA_TYPE_CAST_SPELL2 = 110, - ACHIEVEMENT_CRITERIA_TYPE_LEARN_SKILL_LINE= 112, - ACHIEVEMENT_CRITERIA_TYPE_EARN_HONORABLE_KILL = 113, - ACHIEVEMENT_CRITERIA_TYPE_ACCEPTED_SUMMONINGS = 114, - // 0..115 => 116 criteria types total - ACHIEVEMENT_CRITERIA_TYPE_EARN_ACHIEVEMENT_POINTS = 115, + ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE = 0, + ACHIEVEMENT_CRITERIA_TYPE_WIN_BG = 1, + ACHIEVEMENT_CRITERIA_TYPE_REACH_LEVEL = 5, + ACHIEVEMENT_CRITERIA_TYPE_REACH_SKILL_LEVEL = 7, + ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_ACHIEVEMENT = 8, + ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUEST_COUNT = 9, + ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_DAILY_QUEST_DAILY = 10, // you have to complete a daily quest x times in a row + ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUESTS_IN_ZONE = 11, + ACHIEVEMENT_CRITERIA_TYPE_DAMAGE_DONE = 13, + ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_DAILY_QUEST = 14, + ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_BATTLEGROUND = 15, + ACHIEVEMENT_CRITERIA_TYPE_DEATH_AT_MAP = 16, + ACHIEVEMENT_CRITERIA_TYPE_DEATH = 17, + ACHIEVEMENT_CRITERIA_TYPE_DEATH_IN_DUNGEON = 18, + ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_RAID = 19, + ACHIEVEMENT_CRITERIA_TYPE_KILLED_BY_CREATURE = 20, + ACHIEVEMENT_CRITERIA_TYPE_KILLED_BY_PLAYER = 23, + ACHIEVEMENT_CRITERIA_TYPE_FALL_WITHOUT_DYING = 24, + ACHIEVEMENT_CRITERIA_TYPE_DEATHS_FROM = 26, + ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUEST = 27, + ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET = 28, + ACHIEVEMENT_CRITERIA_TYPE_CAST_SPELL = 29, + ACHIEVEMENT_CRITERIA_TYPE_BG_OBJECTIVE_CAPTURE = 30, + ACHIEVEMENT_CRITERIA_TYPE_HONORABLE_KILL_AT_AREA = 31, + ACHIEVEMENT_CRITERIA_TYPE_WIN_ARENA = 32, + ACHIEVEMENT_CRITERIA_TYPE_PLAY_ARENA = 33, + ACHIEVEMENT_CRITERIA_TYPE_LEARN_SPELL = 34, + ACHIEVEMENT_CRITERIA_TYPE_HONORABLE_KILL = 35, + ACHIEVEMENT_CRITERIA_TYPE_OWN_ITEM = 36, + ACHIEVEMENT_CRITERIA_TYPE_WIN_RATED_ARENA = 37, // TODO: the archievements 1162 and 1163 requires a special rating which can't be found in the dbc + ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_TEAM_RATING = 38, + ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_PERSONAL_RATING = 39, + ACHIEVEMENT_CRITERIA_TYPE_LEARN_SKILL_LEVEL = 40, + ACHIEVEMENT_CRITERIA_TYPE_USE_ITEM = 41, + ACHIEVEMENT_CRITERIA_TYPE_LOOT_ITEM = 42, + ACHIEVEMENT_CRITERIA_TYPE_EXPLORE_AREA = 43, + ACHIEVEMENT_CRITERIA_TYPE_OWN_RANK = 44, + ACHIEVEMENT_CRITERIA_TYPE_BUY_BANK_SLOT = 45, + ACHIEVEMENT_CRITERIA_TYPE_GAIN_REPUTATION = 46, + ACHIEVEMENT_CRITERIA_TYPE_GAIN_EXALTED_REPUTATION = 47, + ACHIEVEMENT_CRITERIA_TYPE_VISIT_BARBER_SHOP = 48, + ACHIEVEMENT_CRITERIA_TYPE_EQUIP_EPIC_ITEM = 49, + ACHIEVEMENT_CRITERIA_TYPE_ROLL_NEED_ON_LOOT = 50, // TODO: itemlevel is mentioned in text but not present in dbc + ACHIEVEMENT_CRITERIA_TYPE_ROLL_GREED_ON_LOOT = 51, + ACHIEVEMENT_CRITERIA_TYPE_HK_CLASS = 52, + ACHIEVEMENT_CRITERIA_TYPE_HK_RACE = 53, + ACHIEVEMENT_CRITERIA_TYPE_DO_EMOTE = 54, + ACHIEVEMENT_CRITERIA_TYPE_HEALING_DONE = 55, + ACHIEVEMENT_CRITERIA_TYPE_GET_KILLING_BLOWS = 56, // TODO: in some cases map not present, and in some cases need do without die + ACHIEVEMENT_CRITERIA_TYPE_EQUIP_ITEM = 57, + ACHIEVEMENT_CRITERIA_TYPE_MONEY_FROM_VENDORS = 59, + ACHIEVEMENT_CRITERIA_TYPE_GOLD_SPENT_FOR_TALENTS = 60, + ACHIEVEMENT_CRITERIA_TYPE_NUMBER_OF_TALENT_RESETS = 61, + ACHIEVEMENT_CRITERIA_TYPE_MONEY_FROM_QUEST_REWARD = 62, + ACHIEVEMENT_CRITERIA_TYPE_GOLD_SPENT_FOR_TRAVELLING = 63, + ACHIEVEMENT_CRITERIA_TYPE_GOLD_SPENT_AT_BARBER = 65, + ACHIEVEMENT_CRITERIA_TYPE_GOLD_SPENT_FOR_MAIL = 66, + ACHIEVEMENT_CRITERIA_TYPE_LOOT_MONEY = 67, + ACHIEVEMENT_CRITERIA_TYPE_USE_GAMEOBJECT = 68, + ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET2 = 69, + ACHIEVEMENT_CRITERIA_TYPE_SPECIAL_PVP_KILL = 70, + ACHIEVEMENT_CRITERIA_TYPE_FISH_IN_GAMEOBJECT = 72, + // TODO 73: Achievements 1515, 1241, 1103 (Name: Mal'Ganis) + ACHIEVEMENT_CRITERIA_TYPE_EARNED_PVP_TITLE = 74, // TODO: title id is not mentioned in dbc + ACHIEVEMENT_CRITERIA_TYPE_LEARN_SKILLLINE_SPELLS = 75, + ACHIEVEMENT_CRITERIA_TYPE_WIN_DUEL = 76, + ACHIEVEMENT_CRITERIA_TYPE_LOSE_DUEL = 77, + ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE_TYPE = 78, + ACHIEVEMENT_CRITERIA_TYPE_GOLD_EARNED_BY_AUCTIONS = 80, + ACHIEVEMENT_CRITERIA_TYPE_CREATE_AUCTION = 82, + ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_AUCTION_BID = 83, + ACHIEVEMENT_CRITERIA_TYPE_WON_AUCTIONS = 84, + ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_AUCTION_SOLD = 85, + ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_GOLD_VALUE_OWNED = 86, + ACHIEVEMENT_CRITERIA_TYPE_GAIN_REVERED_REPUTATION = 87, + ACHIEVEMENT_CRITERIA_TYPE_GAIN_HONORED_REPUTATION = 88, + ACHIEVEMENT_CRITERIA_TYPE_KNOWN_FACTIONS = 89, + ACHIEVEMENT_CRITERIA_TYPE_LOOT_EPIC_ITEM = 90, + ACHIEVEMENT_CRITERIA_TYPE_RECEIVE_EPIC_ITEM = 91, + ACHIEVEMENT_CRITERIA_TYPE_ROLL_NEED = 93, + ACHIEVEMENT_CRITERIA_TYPE_ROLL_GREED = 94, + ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_HEALTH = 95, + ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_POWER = 96, + ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_STAT = 97, + ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_SPELLPOWER = 98, + ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_ARMOR = 99, + ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_RATING = 100, + ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_HIT_DEALT = 101, + ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_HIT_RECEIVED = 102, + ACHIEVEMENT_CRITERIA_TYPE_TOTAL_DAMAGE_RECEIVED = 103, + ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_HEAL_CASTED = 104, + ACHIEVEMENT_CRITERIA_TYPE_TOTAL_HEALING_RECEIVED = 105, + ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_HEALING_RECEIVED = 106, + ACHIEVEMENT_CRITERIA_TYPE_QUEST_ABANDONED = 107, + ACHIEVEMENT_CRITERIA_TYPE_FLIGHT_PATHS_TAKEN = 108, + ACHIEVEMENT_CRITERIA_TYPE_LOOT_TYPE = 109, + ACHIEVEMENT_CRITERIA_TYPE_CAST_SPELL2 = 110, // TODO: target entry is missing + ACHIEVEMENT_CRITERIA_TYPE_LEARN_SKILL_LINE = 112, + ACHIEVEMENT_CRITERIA_TYPE_EARN_HONORABLE_KILL = 113, + ACHIEVEMENT_CRITERIA_TYPE_ACCEPTED_SUMMONINGS = 114, + ACHIEVEMENT_CRITERIA_TYPE_EARN_ACHIEVEMENT_POINTS = 115, ACHIEVEMENT_CRITERIA_TYPE_USE_LFD_TO_GROUP_WITH_PLAYERS = 119, // 120 // 121 // 122 // 123 // 0..123 => 124 criteria types total - ACHIEVEMENT_CRITERIA_TYPE_TOTAL = 124 }; +#define ACHIEVEMENT_CRITERIA_TYPE_TOTAL 124 + enum AchievementCategory { CATEGORY_CHILDRENS_WEEK = 163 @@ -286,7 +282,7 @@ enum Difficulty enum SpawnMask { - SPAWNMASK_CONTINENT = (1 << REGULAR_DIFFICULTY), // any any maps without spawn modes + SPAWNMASK_CONTINENT = (1 << REGULAR_DIFFICULTY), // any maps without spawn modes SPAWNMASK_DUNGEON_NORMAL = (1 << DUNGEON_DIFFICULTY_NORMAL), SPAWNMASK_DUNGEON_HEROIC = (1 << DUNGEON_DIFFICULTY_HEROIC), @@ -349,19 +345,19 @@ enum ItemEnchantmentType enum ItemLimitCategoryMode { - ITEM_LIMIT_CATEGORY_MODE_HAVE = 0, // limit applied to amount items in inventory/bank - ITEM_LIMIT_CATEGORY_MODE_EQUIP = 1 // limit applied to amount equipped items (including used gems) + ITEM_LIMIT_CATEGORY_MODE_HAVE = 0, // limit applied to amount items in inventory/bank + ITEM_LIMIT_CATEGORY_MODE_EQUIP = 1 // limit applied to amount equipped items (including used gems) }; enum TotemCategoryType { - TOTEM_CATEGORY_TYPE_KNIFE = 1, - TOTEM_CATEGORY_TYPE_TOTEM = 2, - TOTEM_CATEGORY_TYPE_ROD = 3, - TOTEM_CATEGORY_TYPE_PICK = 21, - TOTEM_CATEGORY_TYPE_STONE = 22, - TOTEM_CATEGORY_TYPE_HAMMER = 23, - TOTEM_CATEGORY_TYPE_SPANNER = 24 + TOTEM_CATEGORY_TYPE_KNIFE = 1, + TOTEM_CATEGORY_TYPE_TOTEM = 2, + TOTEM_CATEGORY_TYPE_ROD = 3, + TOTEM_CATEGORY_TYPE_PICK = 21, + TOTEM_CATEGORY_TYPE_STONE = 22, + TOTEM_CATEGORY_TYPE_HAMMER = 23, + TOTEM_CATEGORY_TYPE_SPANNER = 24 }; // SummonProperties.dbc, col 1 diff --git a/src/server/game/DungeonFinding/LFGQueue.cpp b/src/server/game/DungeonFinding/LFGQueue.cpp index cf600b0645f..3bcd1ee5643 100644 --- a/src/server/game/DungeonFinding/LFGQueue.cpp +++ b/src/server/game/DungeonFinding/LFGQueue.cpp @@ -639,7 +639,7 @@ void LFGQueue::FindBestCompatibleInQueue(LfgQueueDataContainer::iterator itrQueu std::string sguid = o.str(); for (LfgCompatibleContainer::const_iterator itr = CompatibleMapStore.begin(); itr != CompatibleMapStore.end(); ++itr) - if (itr->second.compatibility == LFG_COMPATIBLES_WITH_LESS_PLAYERS && + if (itr->second.compatibility == LFG_COMPATIBLES_WITH_LESS_PLAYERS && std::string::npos != itr->first.find(sguid)) { UpdateBestCompatibleInQueue(itrQueue, itr->first, itr->second.roles); @@ -650,7 +650,7 @@ void LFGQueue::UpdateBestCompatibleInQueue(LfgQueueDataContainer::iterator itrQu { LfgQueueData& queueData = itrQueue->second; - uint8 storedSize = queueData.bestCompatible.empty() ? 0 : + uint8 storedSize = queueData.bestCompatible.empty() ? 0 : std::count(queueData.bestCompatible.begin(), queueData.bestCompatible.end(), '|') + 1; uint8 size = std::count(key.begin(), key.end(), '|') + 1; diff --git a/src/server/game/DungeonFinding/LFGQueue.h b/src/server/game/DungeonFinding/LFGQueue.h index f937ac0d21a..e6ba038a9e6 100644 --- a/src/server/game/DungeonFinding/LFGQueue.h +++ b/src/server/game/DungeonFinding/LFGQueue.h @@ -42,7 +42,7 @@ struct LfgCompatibilityData compatibility(_compatibility), roles(_roles) { } LfgCompatibility compatibility; - LfgRolesMap roles; + LfgRolesMap roles; }; /// Stores player or group queue info diff --git a/src/server/game/Entities/Creature/TemporarySummon.cpp b/src/server/game/Entities/Creature/TemporarySummon.cpp index 43b29c600d6..a6b51a4d395 100755 --- a/src/server/game/Entities/Creature/TemporarySummon.cpp +++ b/src/server/game/Entities/Creature/TemporarySummon.cpp @@ -21,6 +21,8 @@ #include "CreatureAI.h" #include "ObjectMgr.h" #include "TemporarySummon.h" +#include "Pet.h" +#include "Player.h" TempSummon::TempSummon(SummonPropertiesEntry const* properties, Unit* owner, bool isWorldObject) : Creature(isWorldObject), m_Properties(properties), m_type(TEMPSUMMON_MANUAL_DESPAWN), diff --git a/src/server/game/Entities/Item/Container/Bag.cpp b/src/server/game/Entities/Item/Container/Bag.cpp index db563c712cd..73b38c1da83 100755 --- a/src/server/game/Entities/Item/Container/Bag.cpp +++ b/src/server/game/Entities/Item/Container/Bag.cpp @@ -23,6 +23,7 @@ #include "Bag.h" #include "Log.h" #include "UpdateData.h" +#include "Player.h" Bag::Bag(): Item() { diff --git a/src/server/game/Entities/Item/Item.cpp b/src/server/game/Entities/Item/Item.cpp index f1a7d646fe4..8711388a61c 100755 --- a/src/server/game/Entities/Item/Item.cpp +++ b/src/server/game/Entities/Item/Item.cpp @@ -26,6 +26,7 @@ #include "SpellInfo.h" #include "ScriptMgr.h" #include "ConditionMgr.h" +#include "Player.h" void AddItemsSetItem(Player* player, Item* item) { diff --git a/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp b/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp index f85bf80e145..cfb8c880479 100755 --- a/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp +++ b/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp @@ -25,6 +25,7 @@ #include <list> #include <vector> #include "Util.h" +#include "DBCStores.h" struct EnchStoreItem { diff --git a/src/server/game/Entities/Object/Object.cpp b/src/server/game/Entities/Object/Object.cpp index d75ef9aabf2..d8287b68fc5 100755 --- a/src/server/game/Entities/Object/Object.cpp +++ b/src/server/game/Entities/Object/Object.cpp @@ -1844,7 +1844,7 @@ bool WorldObject::CanDetect(WorldObject const* obj, bool ignoreStealth) const if (obj->IsAlwaysDetectableFor(seer)) return true; - if (!seer->CanDetectInvisibilityOf(obj)) + if (!ignoreStealth && !seer->CanDetectInvisibilityOf(obj)) return false; if (!ignoreStealth && !seer->CanDetectStealthOf(obj)) diff --git a/src/server/game/Entities/Pet/Pet.h b/src/server/game/Entities/Pet/Pet.h index f55d03ce081..38a39827956 100755 --- a/src/server/game/Entities/Pet/Pet.h +++ b/src/server/game/Entities/Pet/Pet.h @@ -85,26 +85,6 @@ enum PetTalk PET_TALK_ATTACK = 1 }; -enum PetNameInvalidReason -{ - // custom, not send - PET_NAME_SUCCESS = 0, - - PET_NAME_INVALID = 1, - PET_NAME_NO_NAME = 2, - PET_NAME_TOO_SHORT = 3, - PET_NAME_TOO_LONG = 4, - PET_NAME_MIXED_LANGUAGES = 6, - PET_NAME_PROFANE = 7, - PET_NAME_RESERVED = 8, - PET_NAME_THREE_CONSECUTIVE = 11, - PET_NAME_INVALID_SPACE = 12, - PET_NAME_CONSECUTIVE_SPACES = 13, - PET_NAME_RUSSIAN_CONSECUTIVE_SILENT_CHARACTERS = 14, - PET_NAME_RUSSIAN_SILENT_CHARACTER_AT_BEGINNING_OR_END = 15, - PET_NAME_DECLENSION_DOESNT_MATCH_BASE_NAME = 16 -}; - typedef UNORDERED_MAP<uint32, PetSpell> PetSpellMap; typedef std::vector<uint32> AutoSpellList; diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 46110a2cc11..21db9ac4ff9 100755 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -7259,7 +7259,7 @@ bool Player::RewardHonor(Unit* victim, uint32 groupsize, int32 honor, bool pvpto int32 count = sWorld->getIntConfig(CONFIG_PVP_TOKEN_COUNT); if (AddItem(itemId, count)) - ChatHandler(this).PSendSysMessage("You have been awarded a token for slaying another player."); + ChatHandler(GetSession()).PSendSysMessage("You have been awarded a token for slaying another player."); } } @@ -19967,7 +19967,7 @@ void Player::Whisper(const std::string& text, uint32 language, uint64 receiver) } else if (!isAddonMessage) // announce to player that player he is whispering to is dnd and cannot receive his message - ChatHandler(this).PSendSysMessage(LANG_PLAYER_DND, rPlayer->GetName().c_str(), rPlayer->dndMsg.c_str()); + ChatHandler(GetSession()).PSendSysMessage(LANG_PLAYER_DND, rPlayer->GetName().c_str(), rPlayer->dndMsg.c_str()); // rest stuff shouldn't happen in case of addon message if (isAddonMessage) @@ -19976,12 +19976,12 @@ void Player::Whisper(const std::string& text, uint32 language, uint64 receiver) if (!isAcceptWhispers() && !isGameMaster() && !rPlayer->isGameMaster()) { SetAcceptWhispers(true); - ChatHandler(this).SendSysMessage(LANG_COMMAND_WHISPERON); + ChatHandler(GetSession()).SendSysMessage(LANG_COMMAND_WHISPERON); } // announce to player that player he is whispering to is afk if (rPlayer->isAFK()) - ChatHandler(this).PSendSysMessage(LANG_PLAYER_AFK, rPlayer->GetName().c_str(), rPlayer->afkMsg.c_str()); + ChatHandler(GetSession()).PSendSysMessage(LANG_PLAYER_AFK, rPlayer->GetName().c_str(), rPlayer->afkMsg.c_str()); // if player whisper someone, auto turn of dnd to be able to receive an answer if (isDND() && !rPlayer->isGameMaster()) @@ -25330,7 +25330,7 @@ bool Player::AddItem(uint32 itemId, uint32 count) if (count == 0 || dest.empty()) { // -- TODO: Send to mailbox if no space - ChatHandler(this).PSendSysMessage("You don't have any space in your bags."); + ChatHandler(GetSession()).PSendSysMessage("You don't have any space in your bags."); return false; } diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h index fe1d1a5b798..3b1f47b8f69 100755 --- a/src/server/game/Entities/Player/Player.h +++ b/src/server/game/Entities/Player/Player.h @@ -20,26 +20,21 @@ #define _PLAYER_H #include "AchievementMgr.h" -#include "Battleground.h" -#include "Bag.h" #include "Common.h" #include "DatabaseEnv.h" #include "DBCEnums.h" #include "GroupReference.h" -#include "ItemPrototype.h" #include "Item.h" #include "MapReference.h" -#include "NPCHandler.h" #include "Pet.h" #include "QuestDef.h" #include "ReputationMgr.h" #include "Unit.h" -#include "Util.h" // for Tokens typedef #include "WorldSession.h" #include "SpellMgr.h" -#include<string> -#include<vector> +#include <string> +#include <vector> struct Mail; class Channel; @@ -242,9 +237,7 @@ typedef std::list<PlayerCreateInfoAction> PlayerCreateInfoActions; struct PlayerInfo { // existence checked by displayId != 0 - PlayerInfo() : displayId_m(0), displayId_f(0), levelInfo(NULL) - { - } + PlayerInfo() : displayId_m(0), displayId_f(0), levelInfo(NULL) { } uint32 mapId; uint32 areaId; @@ -725,13 +718,6 @@ enum RestType REST_TYPE_IN_CITY = 2 }; -enum DuelCompleteType -{ - DUEL_INTERRUPTED = 0, - DUEL_WON = 1, - DUEL_FLED = 2 -}; - enum TeleportToOptions { TELE_TO_GM_MODE = 0x01, @@ -834,17 +820,6 @@ struct InstancePlayerBind InstancePlayerBind() : save(NULL), perm(false) {} }; -enum DungeonStatusFlag -{ - DUNGEON_STATUSFLAG_NORMAL = 0x01, - DUNGEON_STATUSFLAG_HEROIC = 0x02, - - RAID_STATUSFLAG_10MAN_NORMAL = 0x01, - RAID_STATUSFLAG_25MAN_NORMAL = 0x02, - RAID_STATUSFLAG_10MAN_HEROIC = 0x04, - RAID_STATUSFLAG_25MAN_HEROIC = 0x08 -}; - struct AccessRequirement { uint8 levelMin; diff --git a/src/server/game/Entities/Transport/Transport.cpp b/src/server/game/Entities/Transport/Transport.cpp index f52d0059a36..6de359c67dd 100755 --- a/src/server/game/Entities/Transport/Transport.cpp +++ b/src/server/game/Entities/Transport/Transport.cpp @@ -26,6 +26,7 @@ #include "DBCStores.h" #include "World.h" #include "GameObjectAI.h" +#include "Player.h" void MapManager::LoadTransports() { diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index f8de93afc6d..c886c046427 100755 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -1328,7 +1328,7 @@ void Unit::DealMeleeDamage(CalcDamageInfo* damageInfo, bool durabilityLoss) // If this is a creature and it attacks from behind it has a probability to daze it's victim if ((damageInfo->hitOutCome == MELEE_HIT_CRIT || damageInfo->hitOutCome == MELEE_HIT_CRUSHING || damageInfo->hitOutCome == MELEE_HIT_NORMAL || damageInfo->hitOutCome == MELEE_HIT_GLANCING) && GetTypeId() != TYPEID_PLAYER && !ToCreature()->IsControlledByPlayer() && !victim->HasInArc(M_PI, this) - && (victim->GetTypeId() == TYPEID_PLAYER || !victim->ToCreature()->isWorldBoss())) + && (victim->GetTypeId() == TYPEID_PLAYER || !victim->ToCreature()->isWorldBoss())&& !victim->IsVehicle()) { // -probability is between 0% and 40% // 20% base chance @@ -1341,7 +1341,10 @@ void Unit::DealMeleeDamage(CalcDamageInfo* damageInfo, bool durabilityLoss) uint32 VictimDefense=victim->GetDefenseSkillValue(); uint32 AttackerMeleeSkill=GetUnitMeleeSkill(); - Probability *= AttackerMeleeSkill/(float)VictimDefense; + Probability *= AttackerMeleeSkill/(float)VictimDefense*0.16; + + if (Probability < 0) + Probability = 0; if (Probability > 40.0f) Probability = 40.0f; diff --git a/src/server/game/Entities/Vehicle/Vehicle.cpp b/src/server/game/Entities/Vehicle/Vehicle.cpp index 1159b935277..08d8349681b 100755 --- a/src/server/game/Entities/Vehicle/Vehicle.cpp +++ b/src/server/game/Entities/Vehicle/Vehicle.cpp @@ -29,6 +29,7 @@ #include "SpellMgr.h" #include "SpellInfo.h" #include "MoveSplineInit.h" +#include "TemporarySummon.h" Vehicle::Vehicle(Unit* unit, VehicleEntry const* vehInfo, uint32 creatureEntry) : _me(unit), _vehicleInfo(vehInfo), _usableSeatNum(0), _creatureEntry(creatureEntry) { diff --git a/src/server/game/Globals/ObjectAccessor.cpp b/src/server/game/Globals/ObjectAccessor.cpp index b19abc778a9..6999eb301f5 100755 --- a/src/server/game/Globals/ObjectAccessor.cpp +++ b/src/server/game/Globals/ObjectAccessor.cpp @@ -47,6 +47,12 @@ ObjectAccessor::~ObjectAccessor() { } +Player* ObjectAccessor::GetObjectInWorld(uint64 guid, Player* /*typeSpecifier*/) +{ + Player* player = HashMapHolder<Player>::Find(guid); + return player && player->IsInWorld() ? player : NULL; +} + WorldObject* ObjectAccessor::GetWorldObject(WorldObject const& p, uint64 guid) { switch (GUID_HIPART(guid)) diff --git a/src/server/game/Globals/ObjectAccessor.h b/src/server/game/Globals/ObjectAccessor.h index 41a7abc9a24..d2b532c9f94 100755 --- a/src/server/game/Globals/ObjectAccessor.h +++ b/src/server/game/Globals/ObjectAccessor.h @@ -28,7 +28,6 @@ #include "GridDefines.h" #include "Object.h" -#include "Player.h" #include <set> @@ -116,11 +115,7 @@ class ObjectAccessor } // Player may be not in world while in ObjectAccessor - static Player* GetObjectInWorld(uint64 guid, Player* /*typeSpecifier*/) - { - Player* player = HashMapHolder<Player>::Find(guid); - return player && player->IsInWorld() ? player : NULL; - } + static Player* GetObjectInWorld(uint64 guid, Player* /*typeSpecifier*/); static Unit* GetObjectInWorld(uint64 guid, Unit* /*typeSpecifier*/) { diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index db8a484ad76..245079f2495 100755 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -227,11 +227,29 @@ bool SpellClickInfo::IsFitToRequirements(Unit const* clicker, Unit const* clicke return true; } -ObjectMgr::ObjectMgr(): _auctionId(1), _equipmentSetGuid(1), - _itemTextId(1), _mailId(1), _hiPetNumber(1), _hiCharGuid(1), - _hiCreatureGuid(1), _hiPetGuid(1), _hiVehicleGuid(1), _hiItemGuid(1), - _hiGoGuid(1), _hiDoGuid(1), _hiCorpseGuid(1), _hiMoTransGuid(1) -{} +ObjectMgr::ObjectMgr(): + _auctionId(1), + _equipmentSetGuid(1), + _itemTextId(1), + _mailId(1), + _hiPetNumber(1), + _hiCharGuid(1), + _hiCreatureGuid(1), + _hiPetGuid(1), + _hiVehicleGuid(1), + _hiItemGuid(1), + _hiGoGuid(1), + _hiDoGuid(1), + _hiCorpseGuid(1), + _hiMoTransGuid(1) +{ + for (uint8 i = 0; i < MAX_CLASSES; ++i) + { + _playerClassInfo[i] = NULL; + for (uint8 j = 0; j < MAX_RACES; ++j) + _playerInfo[j][i] = NULL; + } +} ObjectMgr::~ObjectMgr() { @@ -243,11 +261,17 @@ ObjectMgr::~ObjectMgr() // free only if loaded for (int class_ = 0; class_ < MAX_CLASSES; ++class_) - delete[] _playerClassInfo[class_].levelInfo; + { + delete[] _playerClassInfo[class_]->levelInfo; + delete _playerClassInfo[class_]; + } for (int race = 0; race < MAX_RACES; ++race) for (int class_ = 0; class_ < MAX_CLASSES; ++class_) - delete[] _playerInfo[race][class_].levelInfo; + { + delete[] _playerInfo[race][class_]->levelInfo; + delete _playerInfo[race][class_]; + } for (CacheVendorItemContainer::iterator itr = _cacheVendorItemStore.begin(); itr != _cacheVendorItemStore.end(); ++itr) itr->second.Clear(); @@ -257,6 +281,9 @@ ObjectMgr::~ObjectMgr() for (DungeonEncounterContainer::iterator itr =_dungeonEncounterStore.begin(); itr != _dungeonEncounterStore.end(); ++itr) for (DungeonEncounterList::iterator encounterItr = itr->second.begin(); encounterItr != itr->second.end(); ++encounterItr) delete *encounterItr; + + for (AccessRequirementContainer::iterator itr = _accessRequirementStore.begin(); itr != _accessRequirementStore.end(); ++itr) + delete itr->second; } void ObjectMgr::AddLocaleString(std::string const& s, LocaleConstant locale, StringVector& data) @@ -2923,8 +2950,11 @@ PetLevelInfo const* ObjectMgr::GetPetLevelInfo(uint32 creature_id, uint8 level) void ObjectMgr::PlayerCreateInfoAddItemHelper(uint32 race_, uint32 class_, uint32 itemId, int32 count) { + if (!_playerInfo[race_][class_]) + return; + if (count > 0) - _playerInfo[race_][class_].item.push_back(PlayerCreateInfoItem(itemId, count)); + _playerInfo[race_][class_]->item.push_back(PlayerCreateInfoItem(itemId, count)); else { if (count < -1) @@ -3031,17 +3061,16 @@ void ObjectMgr::LoadPlayerInfo() continue; } - PlayerInfo* pInfo = &_playerInfo[current_race][current_class]; - - pInfo->mapId = mapId; - pInfo->areaId = areaId; - pInfo->positionX = positionX; - pInfo->positionY = positionY; - pInfo->positionZ = positionZ; - pInfo->orientation = orientation; - - pInfo->displayId_m = rEntry->model_m; - pInfo->displayId_f = rEntry->model_f; + PlayerInfo* info = new PlayerInfo(); + info->mapId = mapId; + info->areaId = areaId; + info->positionX = positionX; + info->positionY = positionY; + info->positionZ = positionZ; + info->orientation = orientation; + info->displayId_m = rEntry->model_m; + info->displayId_f = rEntry->model_f; + _playerInfo[current_race][current_class] = info; ++count; } @@ -3164,10 +3193,16 @@ void ObjectMgr::LoadPlayerInfo() uint32 max_class = current_class ? current_class + 1 : MAX_CLASSES; for (uint32 r = min_race; r < max_race; ++r) for (uint32 c = min_class; c < max_class; ++c) - _playerInfo[r][c].spell.push_back(fields[2].GetUInt32()); + if (PlayerInfo * info = _playerInfo[r][c]) + info->spell.push_back(fields[2].GetUInt32()); } + else if (PlayerInfo * info = _playerInfo[current_race][current_class]) + info->spell.push_back(fields[2].GetUInt32()); else - _playerInfo[current_race][current_class].spell.push_back(fields[2].GetUInt32()); + { + sLog->outError(LOG_FILTER_SQL, "Wrong race: %u, class: %u combination in `playercreateinfo_spell` table, ignoring.", current_race, current_class); + continue; + } ++count; } @@ -3212,8 +3247,8 @@ void ObjectMgr::LoadPlayerInfo() continue; } - PlayerInfo* pInfo = &_playerInfo[current_race][current_class]; - pInfo->action.push_back(PlayerCreateInfoAction(fields[2].GetUInt16(), fields[3].GetUInt32(), fields[4].GetUInt16())); + if (PlayerInfo* info = _playerInfo[current_race][current_class]) + info->action.push_back(PlayerCreateInfoAction(fields[2].GetUInt16(), fields[3].GetUInt32(), fields[4].GetUInt16())); ++count; } @@ -3228,13 +3263,12 @@ void ObjectMgr::LoadPlayerInfo() { uint32 oldMSTime = getMSTime(); - // 0 1 2 3 + // 0 1 2 3 QueryResult result = WorldDatabase.Query("SELECT class, level, basehp, basemana FROM player_classlevelstats"); if (!result) { sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 level health/mana definitions. DB table `game_event_condition` is empty."); - exit(1); } @@ -3259,15 +3293,18 @@ void ObjectMgr::LoadPlayerInfo() continue; } - PlayerClassInfo* pClassInfo = &_playerClassInfo[current_class]; - - if (!pClassInfo->levelInfo) - pClassInfo->levelInfo = new PlayerClassLevelInfo[sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)]; + PlayerClassInfo* info = _playerClassInfo[current_class]; + if (!info) + { + info = new PlayerClassInfo(); + info->levelInfo = new PlayerClassLevelInfo[sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)]; + _playerClassInfo[current_class] = info; + } - PlayerClassLevelInfo* pClassLevelInfo = &pClassInfo->levelInfo[current_level-1]; + PlayerClassLevelInfo& levelInfo = info->levelInfo[current_level-1]; - pClassLevelInfo->basehealth = fields[2].GetUInt16(); - pClassLevelInfo->basemana = fields[3].GetUInt16(); + levelInfo.basehealth = fields[2].GetUInt16(); + levelInfo.basemana = fields[3].GetUInt16(); ++count; } @@ -3280,7 +3317,7 @@ void ObjectMgr::LoadPlayerInfo() if (!sChrClassesStore.LookupEntry(class_)) continue; - PlayerClassInfo* pClassInfo = &_playerClassInfo[class_]; + PlayerClassInfo* pClassInfo = _playerClassInfo[class_]; // fatal error if no level 1 data if (!pClassInfo->levelInfo || pClassInfo->levelInfo[0].basehealth == 0) @@ -3351,16 +3388,14 @@ void ObjectMgr::LoadPlayerInfo() continue; } - PlayerInfo* pInfo = &_playerInfo[current_race][current_class]; - - if (!pInfo->levelInfo) - pInfo->levelInfo = new PlayerLevelInfo[sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)]; - - PlayerLevelInfo* pLevelInfo = &pInfo->levelInfo[current_level-1]; - - for (int i = 0; i < MAX_STATS; i++) + if (PlayerInfo* info = _playerInfo[current_race][current_class]) { - pLevelInfo->stats[i] = fields[i+3].GetUInt8(); + if (!info->levelInfo) + info->levelInfo = new PlayerLevelInfo[sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)]; + + PlayerLevelInfo& levelInfo = info->levelInfo[current_level-1]; + for (int i = 0; i < MAX_STATS; i++) + levelInfo.stats[i] = fields[i+3].GetUInt8(); } ++count; @@ -3380,10 +3415,8 @@ void ObjectMgr::LoadPlayerInfo() if (!sChrClassesStore.LookupEntry(class_)) continue; - PlayerInfo* pInfo = &_playerInfo[race][class_]; - - // skip non loaded combinations - if (!pInfo->displayId_m || !pInfo->displayId_f) + PlayerInfo* info = _playerInfo[race][class_]; + if (!info) continue; // skip expansion races if not playing with expansion @@ -3395,7 +3428,7 @@ void ObjectMgr::LoadPlayerInfo() continue; // fatal error if no level 1 data - if (!pInfo->levelInfo || pInfo->levelInfo[0].stats[0] == 0) + if (!info->levelInfo || info->levelInfo[0].stats[0] == 0) { sLog->outError(LOG_FILTER_SQL, "Race %i Class %i Level 1 does not have stats data!", race, class_); exit(1); @@ -3404,10 +3437,10 @@ void ObjectMgr::LoadPlayerInfo() // fill level gaps for (uint8 level = 1; level < sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL); ++level) { - if (pInfo->levelInfo[level].stats[0] == 0) + if (info->levelInfo[level].stats[0] == 0) { sLog->outError(LOG_FILTER_SQL, "Race %i Class %i Level %i does not have stats data. Using stats data of level %i.", race, class_, level+1, level); - pInfo->levelInfo[level] = pInfo->levelInfo[level-1]; + info->levelInfo[level] = info->levelInfo[level-1]; } } } @@ -3480,7 +3513,7 @@ void ObjectMgr::GetPlayerClassLevelInfo(uint32 class_, uint8 level, PlayerClassL if (level < 1 || class_ >= MAX_CLASSES) return; - PlayerClassInfo const* pInfo = &_playerClassInfo[class_]; + PlayerClassInfo const* pInfo = _playerClassInfo[class_]; if (level > sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)) level = sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL); @@ -3493,8 +3526,8 @@ void ObjectMgr::GetPlayerLevelInfo(uint32 race, uint32 class_, uint8 level, Play if (level < 1 || race >= MAX_RACES || class_ >= MAX_CLASSES) return; - PlayerInfo const* pInfo = &_playerInfo[race][class_]; - if (pInfo->displayId_m == 0 || pInfo->displayId_f == 0) + PlayerInfo const* pInfo = _playerInfo[race][class_]; + if (!pInfo) return; if (level <= sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)) @@ -3506,7 +3539,7 @@ void ObjectMgr::GetPlayerLevelInfo(uint32 race, uint32 class_, uint8 level, Play void ObjectMgr::BuildPlayerLevelInfo(uint8 race, uint8 _class, uint8 level, PlayerLevelInfo* info) const { // base data (last known level) - *info = _playerInfo[race][_class].levelInfo[sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)-1]; + *info = _playerInfo[race][_class]->levelInfo[sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)-1]; // if conversion from uint32 to uint8 causes unexpected behaviour, change lvl to uint32 for (uint8 lvl = sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)-1; lvl < level; ++lvl) @@ -5898,7 +5931,13 @@ void ObjectMgr::LoadAccessRequirements() { uint32 oldMSTime = getMSTime(); - _accessRequirementStore.clear(); // need for reload case + if (!_accessRequirementStore.empty()) + { + for (AccessRequirementContainer::iterator itr = _accessRequirementStore.begin(); itr != _accessRequirementStore.end(); ++itr) + delete itr->second; + + _accessRequirementStore.clear(); // need for reload case + } // 0 1 2 3 4 5 6 7 8 9 QueryResult result = WorldDatabase.Query("SELECT mapid, difficulty, level_min, level_max, item, item2, quest_done_A, quest_done_H, completed_achievement, quest_failed_text FROM access_requirement"); @@ -5920,61 +5959,61 @@ void ObjectMgr::LoadAccessRequirements() uint8 difficulty = fields[1].GetUInt8(); uint32 requirement_ID = MAKE_PAIR32(mapid, difficulty); - AccessRequirement ar; + AccessRequirement* ar = new AccessRequirement(); - ar.levelMin = fields[2].GetUInt8(); - ar.levelMax = fields[3].GetUInt8(); - ar.item = fields[4].GetUInt32(); - ar.item2 = fields[5].GetUInt32(); - ar.quest_A = fields[6].GetUInt32(); - ar.quest_H = fields[7].GetUInt32(); - ar.achievement = fields[8].GetUInt32(); - ar.questFailedText = fields[9].GetString(); + ar->levelMin = fields[2].GetUInt8(); + ar->levelMax = fields[3].GetUInt8(); + ar->item = fields[4].GetUInt32(); + ar->item2 = fields[5].GetUInt32(); + ar->quest_A = fields[6].GetUInt32(); + ar->quest_H = fields[7].GetUInt32(); + ar->achievement = fields[8].GetUInt32(); + ar->questFailedText = fields[9].GetString(); - if (ar.item) + if (ar->item) { - ItemTemplate const* pProto = GetItemTemplate(ar.item); + ItemTemplate const* pProto = GetItemTemplate(ar->item); if (!pProto) { - sLog->outError(LOG_FILTER_GENERAL, "Key item %u does not exist for map %u difficulty %u, removing key requirement.", ar.item, mapid, difficulty); - ar.item = 0; + sLog->outError(LOG_FILTER_GENERAL, "Key item %u does not exist for map %u difficulty %u, removing key requirement.", ar->item, mapid, difficulty); + ar->item = 0; } } - if (ar.item2) + if (ar->item2) { - ItemTemplate const* pProto = GetItemTemplate(ar.item2); + ItemTemplate const* pProto = GetItemTemplate(ar->item2); if (!pProto) { - sLog->outError(LOG_FILTER_GENERAL, "Second item %u does not exist for map %u difficulty %u, removing key requirement.", ar.item2, mapid, difficulty); - ar.item2 = 0; + sLog->outError(LOG_FILTER_GENERAL, "Second item %u does not exist for map %u difficulty %u, removing key requirement.", ar->item2, mapid, difficulty); + ar->item2 = 0; } } - if (ar.quest_A) + if (ar->quest_A) { - if (!GetQuestTemplate(ar.quest_A)) + if (!GetQuestTemplate(ar->quest_A)) { - sLog->outError(LOG_FILTER_SQL, "Required Alliance Quest %u not exist for map %u difficulty %u, remove quest done requirement.", ar.quest_A, mapid, difficulty); - ar.quest_A = 0; + sLog->outError(LOG_FILTER_SQL, "Required Alliance Quest %u not exist for map %u difficulty %u, remove quest done requirement.", ar->quest_A, mapid, difficulty); + ar->quest_A = 0; } } - if (ar.quest_H) + if (ar->quest_H) { - if (!GetQuestTemplate(ar.quest_H)) + if (!GetQuestTemplate(ar->quest_H)) { - sLog->outError(LOG_FILTER_SQL, "Required Horde Quest %u not exist for map %u difficulty %u, remove quest done requirement.", ar.quest_H, mapid, difficulty); - ar.quest_H = 0; + sLog->outError(LOG_FILTER_SQL, "Required Horde Quest %u not exist for map %u difficulty %u, remove quest done requirement.", ar->quest_H, mapid, difficulty); + ar->quest_H = 0; } } - if (ar.achievement) + if (ar->achievement) { - if (!sAchievementStore.LookupEntry(ar.achievement)) + if (!sAchievementStore.LookupEntry(ar->achievement)) { - sLog->outError(LOG_FILTER_SQL, "Required Achievement %u not exist for map %u difficulty %u, remove quest done requirement.", ar.achievement, mapid, difficulty); - ar.achievement = 0; + sLog->outError(LOG_FILTER_SQL, "Required Achievement %u not exist for map %u difficulty %u, remove quest done requirement.", ar->achievement, mapid, difficulty); + ar->achievement = 0; } } @@ -8202,7 +8241,7 @@ bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 item_id, int32 max if (!cInfo) { if (player) - ChatHandler(player).SendSysMessage(LANG_COMMAND_VENDORSELECTION); + ChatHandler(player->GetSession()).SendSysMessage(LANG_COMMAND_VENDORSELECTION); else sLog->outError(LOG_FILTER_SQL, "Table `(game_event_)npc_vendor` have data for not existed creature template (Entry: %u), ignore", vendor_entry); return false; @@ -8213,7 +8252,7 @@ bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 item_id, int32 max if (!skip_vendors || skip_vendors->count(vendor_entry) == 0) { if (player) - ChatHandler(player).SendSysMessage(LANG_COMMAND_VENDORSELECTION); + ChatHandler(player->GetSession()).SendSysMessage(LANG_COMMAND_VENDORSELECTION); else sLog->outError(LOG_FILTER_SQL, "Table `(game_event_)npc_vendor` have data for not creature template (Entry: %u) without vendor flag, ignore", vendor_entry); @@ -8226,7 +8265,7 @@ bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 item_id, int32 max if (!sObjectMgr->GetItemTemplate(item_id)) { if (player) - ChatHandler(player).PSendSysMessage(LANG_ITEM_NOT_FOUND, item_id); + ChatHandler(player->GetSession()).PSendSysMessage(LANG_ITEM_NOT_FOUND, item_id); else sLog->outError(LOG_FILTER_SQL, "Table `(game_event_)npc_vendor` for Vendor (Entry: %u) have in item list non-existed item (%u), ignore", vendor_entry, item_id); return false; @@ -8235,7 +8274,7 @@ bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 item_id, int32 max if (ExtendedCost && !sItemExtendedCostStore.LookupEntry(ExtendedCost)) { if (player) - ChatHandler(player).PSendSysMessage(LANG_EXTENDED_COST_NOT_EXIST, ExtendedCost); + ChatHandler(player->GetSession()).PSendSysMessage(LANG_EXTENDED_COST_NOT_EXIST, ExtendedCost); else sLog->outError(LOG_FILTER_SQL, "Table `(game_event_)npc_vendor` have Item (Entry: %u) with wrong ExtendedCost (%u) for vendor (%u), ignore", item_id, ExtendedCost, vendor_entry); return false; @@ -8244,7 +8283,7 @@ bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 item_id, int32 max if (maxcount > 0 && incrtime == 0) { if (player) - ChatHandler(player).PSendSysMessage("MaxCount != 0 (%u) but IncrTime == 0", maxcount); + ChatHandler(player->GetSession()).PSendSysMessage("MaxCount != 0 (%u) but IncrTime == 0", maxcount); else sLog->outError(LOG_FILTER_SQL, "Table `(game_event_)npc_vendor` has `maxcount` (%u) for item %u of vendor (Entry: %u) but `incrtime`=0, ignore", maxcount, item_id, vendor_entry); return false; @@ -8252,7 +8291,7 @@ bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 item_id, int32 max else if (maxcount == 0 && incrtime > 0) { if (player) - ChatHandler(player).PSendSysMessage("MaxCount == 0 but IncrTime<>= 0"); + ChatHandler(player->GetSession()).PSendSysMessage("MaxCount == 0 but IncrTime<>= 0"); else sLog->outError(LOG_FILTER_SQL, "Table `(game_event_)npc_vendor` has `maxcount`=0 for item %u of vendor (Entry: %u) but `incrtime`<>0, ignore", item_id, vendor_entry); return false; @@ -8265,7 +8304,7 @@ bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 item_id, int32 max if (vItems->FindItemCostPair(item_id, ExtendedCost)) { if (player) - ChatHandler(player).PSendSysMessage(LANG_ITEM_ALREADY_IN_LIST, item_id, ExtendedCost); + ChatHandler(player->GetSession()).PSendSysMessage(LANG_ITEM_ALREADY_IN_LIST, item_id, ExtendedCost); else sLog->outError(LOG_FILTER_SQL, "Table `npc_vendor` has duplicate items %u (with extended cost %u) for vendor (Entry: %u), ignoring", item_id, ExtendedCost, vendor_entry); return false; @@ -8274,7 +8313,7 @@ bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 item_id, int32 max if (vItems->GetItemCount() >= MAX_VENDOR_ITEMS) { if (player) - ChatHandler(player).SendSysMessage(LANG_COMMAND_ADDVENDORITEMITEMS); + ChatHandler(player->GetSession()).SendSysMessage(LANG_COMMAND_ADDVENDORITEMITEMS); else sLog->outError(LOG_FILTER_SQL, "Table `npc_vendor` has too many items (%u >= %i) for vendor (Entry: %u), ignore", vItems->GetItemCount(), MAX_VENDOR_ITEMS, vendor_entry); return false; @@ -8695,3 +8734,15 @@ VehicleAccessoryList const* ObjectMgr::GetVehicleAccessoryList(Vehicle* veh) con return &itr->second; return NULL; } + +PlayerInfo const* ObjectMgr::GetPlayerInfo(uint32 race, uint32 class_) const +{ + if (race >= MAX_RACES) + return NULL; + if (class_ >= MAX_CLASSES) + return NULL; + PlayerInfo const* info = _playerInfo[race][class_]; + if (!info) + return NULL; + return info; +} diff --git a/src/server/game/Globals/ObjectMgr.h b/src/server/game/Globals/ObjectMgr.h index 29ca353bdd7..c4d4299bbab 100755 --- a/src/server/game/Globals/ObjectMgr.h +++ b/src/server/game/Globals/ObjectMgr.h @@ -23,7 +23,6 @@ #include "Object.h" #include "Bag.h" #include "Creature.h" -#include "Player.h" #include "DynamicObject.h" #include "GameObject.h" #include "Corpse.h" @@ -44,6 +43,11 @@ #include <functional> class Item; +struct AccessRequirement; +struct PlayerClassInfo; +struct PlayerClassLevelInfo; +struct PlayerInfo; +struct PlayerLevelInfo; // GCC have alternative #pragma pack(N) syntax and old gcc version not support pack(push, N), also any gcc version not support it at some platform #if defined(__GNUC__) @@ -598,7 +602,7 @@ class ObjectMgr typedef UNORDERED_MAP<uint32, uint32> AreaTriggerScriptContainer; - typedef UNORDERED_MAP<uint32, AccessRequirement> AccessRequirementContainer; + typedef UNORDERED_MAP<uint32, AccessRequirement*> AccessRequirementContainer; typedef UNORDERED_MAP<uint32, RepRewardRate > RepRewardRateContainer; typedef UNORDERED_MAP<uint32, ReputationOnKillEntry> RepOnKillContainer; @@ -647,21 +651,11 @@ class ObjectMgr { if (class_ >= MAX_CLASSES) return NULL; - return &_playerClassInfo[class_]; + return _playerClassInfo[class_]; } void GetPlayerClassLevelInfo(uint32 class_, uint8 level, PlayerClassLevelInfo* info) const; - PlayerInfo const* GetPlayerInfo(uint32 race, uint32 class_) const - { - if (race >= MAX_RACES) - return NULL; - if (class_ >= MAX_CLASSES) - return NULL; - PlayerInfo const* info = &_playerInfo[race][class_]; - if (info->displayId_m == 0 || info->displayId_f == 0) - return NULL; - return info; - } + PlayerInfo const* GetPlayerInfo(uint32 race, uint32 class_) const; void GetPlayerLevelInfo(uint32 race, uint32 class_, uint8 level, PlayerLevelInfo* info) const; @@ -722,7 +716,7 @@ class ObjectMgr { AccessRequirementContainer::const_iterator itr = _accessRequirementStore.find(MAKE_PAIR32(mapid, difficulty)); if (itr != _accessRequirementStore.end()) - return &itr->second; + return itr->second; return NULL; } @@ -1233,11 +1227,11 @@ class ObjectMgr // PetLevelInfoContainer[creature_id][level] PetLevelInfoContainer _petInfoStore; // [creature_id][level] - PlayerClassInfo _playerClassInfo[MAX_CLASSES]; + PlayerClassInfo* _playerClassInfo[MAX_CLASSES]; void BuildPlayerLevelInfo(uint8 race, uint8 class_, uint8 level, PlayerLevelInfo* plinfo) const; - PlayerInfo _playerInfo[MAX_RACES][MAX_CLASSES]; + PlayerInfo* _playerInfo[MAX_RACES][MAX_CLASSES]; typedef std::vector<uint32> PlayerXPperLevel; // [level] PlayerXPperLevel _playerXPperLevel; diff --git a/src/server/game/Groups/Group.h b/src/server/game/Groups/Group.h index a00b7e1ef3a..b20a1bd9dd4 100755 --- a/src/server/game/Groups/Group.h +++ b/src/server/game/Groups/Group.h @@ -19,16 +19,14 @@ #ifndef TRINITYCORE_GROUP_H #define TRINITYCORE_GROUP_H -#include "Battleground.h" #include "DBCEnums.h" #include "GroupRefManager.h" #include "LootMgr.h" #include "QueryResult.h" #include "SharedDefines.h" -#include "Player.h" -#include "Battlefield.h" -#include "BattlefieldMgr.h" +class Battlefield; +class Battleground; class Creature; class GroupReference; class InstanceSave; diff --git a/src/server/game/Groups/GroupMgr.cpp b/src/server/game/Groups/GroupMgr.cpp index 77b3a304f6b..8283075a226 100644 --- a/src/server/game/Groups/GroupMgr.cpp +++ b/src/server/game/Groups/GroupMgr.cpp @@ -18,6 +18,8 @@ #include "Common.h" #include "GroupMgr.h" #include "InstanceSaveMgr.h" +#include "World.h" +#include "DBCStores.h" GroupMgr::GroupMgr() { diff --git a/src/server/game/Guilds/Guild.cpp b/src/server/game/Guilds/Guild.cpp index e41b8ff4ac8..4db293f0e89 100755 --- a/src/server/game/Guilds/Guild.cpp +++ b/src/server/game/Guilds/Guild.cpp @@ -29,6 +29,56 @@ #define MAX_GUILD_BANK_TAB_TEXT_LEN 500 #define EMBLEM_PRICE 10 * GOLD +std::string _GetGuildEventString(GuildEvents event) +{ + switch (event) + { + case GE_PROMOTION: + return "Member promotion"; + case GE_DEMOTION: + return "Member demotion"; + case GE_MOTD: + return "Guild MOTD"; + case GE_JOINED: + return "Member joined"; + case GE_LEFT: + return "Member left"; + case GE_REMOVED: + return "Member removed"; + case GE_LEADER_IS: + return "Leader is"; + case GE_LEADER_CHANGED: + return "Leader changed"; + case GE_DISBANDED: + return "Guild disbanded"; + case GE_TABARDCHANGE: + return "Tabard change"; + case GE_RANK_UPDATED: + return "Rank updated"; + case GE_RANK_DELETED: + return "Rank deleted"; + case GE_SIGNED_ON: + return "Member signed on"; + case GE_SIGNED_OFF: + return "Member signed off"; + case GE_GUILDBANKBAGSLOTS_CHANGED: + return "Bank bag slots changed"; + case GE_BANK_TAB_PURCHASED: + return "Bank tab purchased"; + case GE_BANK_TAB_UPDATED: + return "Bank tab updated"; + case GE_BANK_MONEY_SET: + return "Bank money set"; + case GE_BANK_MONEY_CHANGED: + return "Bank money changed"; + case GE_BANK_TEXT_CHANGED: + return "Bank tab text changed"; + default: + break; + } + return "<None>"; +} + inline uint32 _GetGuildBankTabPrice(uint8 tabId) { switch (tabId) @@ -223,10 +273,9 @@ void Guild::RankInfo::SaveToDB(SQLTransaction& trans) const CharacterDatabase.ExecuteOrAppend(trans, stmt); } -bool Guild::RankInfo::CreateMissingTabsIfNeeded(uint8 ranks, SQLTransaction& trans) +void Guild::RankInfo::CreateMissingTabsIfNeeded(uint8 tabs, SQLTransaction& trans, bool logOnCreate /* = false */) { - bool ret = false; - for (uint8 i = 0; i < ranks; ++i) + for (uint8 i = 0; i < tabs; ++i) { GuildBankRightsAndSlots& rightsAndSlots = m_bankTabRightsAndSlots[i]; if (rightsAndSlots.GetTabId() == i) @@ -236,17 +285,17 @@ bool Guild::RankInfo::CreateMissingTabsIfNeeded(uint8 ranks, SQLTransaction& tra if (m_rankId == GR_GUILDMASTER) rightsAndSlots.SetGuildMasterValues(); - ret = true; + if (logOnCreate) + sLog->outError(LOG_FILTER_GUILD, "Guild %u has broken Tab %u for rank %u. Created default tab.", m_guildId, i, m_rankId); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_GUILD_BANK_RIGHT); stmt->setUInt32(0, m_guildId); - stmt->setUInt8 (1, i); - stmt->setUInt8 (2, m_rankId); - stmt->setUInt32(3, rightsAndSlots.GetRights()); + stmt->setUInt8(1, i); + stmt->setUInt8(2, m_rankId); + stmt->setUInt8(3, rightsAndSlots.GetRights()); stmt->setUInt32(4, rightsAndSlots.GetSlots()); trans->Append(stmt); } - - return ret; } void Guild::RankInfo::WritePacket(WorldPacket& data) const @@ -1429,24 +1478,21 @@ void Guild::HandleBuyBankTab(WorldSession* session, uint8 tabId) if (_GetPurchasedTabsSize() >= GUILD_BANK_MAX_TABS) return; - if (tabId != _GetPurchasedTabsSize()) - return; + if (tabId != _GetPurchasedTabsSize()) + return; - uint32 tabCost = _GetGuildBankTabPrice(tabId) * GOLD; - if (!tabCost) - return; + uint32 tabCost = _GetGuildBankTabPrice(tabId) * GOLD; + if (!tabCost) + return; - if (!player->HasEnoughMoney(tabCost)) // Should not happen, this is checked by client - return; + if (!player->HasEnoughMoney(tabCost)) // Should not happen, this is checked by client + return; - player->ModifyMoney(-int32(tabCost)); + player->ModifyMoney(-int32(tabCost)); - uint8 rankId = member->GetRankId(); _CreateNewBankTab(); - _SetRankBankMoneyPerDay(rankId, uint32(GUILD_WITHDRAW_MONEY_UNLIMITED)); - GuildBankRightsAndSlots rightsAndSlots(tabId); - _SetRankBankTabRightsAndSlots(rankId, rightsAndSlots); - SendBankTabsInfo(session); + _BroadcastEvent(GE_BANK_TAB_PURCHASED, 0); + SendPermissions(session); /// Hack to force client to update permissions } void Guild::HandleInviteMember(WorldSession* session, std::string const& name) @@ -2018,11 +2064,8 @@ bool Guild::Validate() else { SQLTransaction trans = CharacterDatabase.BeginTransaction(); - if (rankInfo->CreateMissingTabsIfNeeded(_GetPurchasedTabsSize(), trans)) - { - sLog->outError(LOG_FILTER_GUILD, "Guild %u has broken Tabs for rank id %u, creating default tab...", m_id, rankId); - CharacterDatabase.CommitTransaction(trans); - } + rankInfo->CreateMissingTabsIfNeeded(_GetPurchasedTabsSize(), trans, true); + CharacterDatabase.CommitTransaction(trans); } } } @@ -2303,6 +2346,10 @@ void Guild::_CreateNewBankTab() stmt->setUInt8 (1, tabId); trans->Append(stmt); + ++tabId; + for (Ranks::iterator itr = m_ranks.begin(); itr != m_ranks.end(); ++itr) + (*itr).CreateMissingTabsIfNeeded(tabId, trans, false); + CharacterDatabase.CommitTransaction(trans); } @@ -2738,7 +2785,9 @@ void Guild::_BroadcastEvent(GuildEvents guildEvent, uint64 guid, const char* par data << uint64(guid); BroadcastPacket(&data); - sLog->outDebug(LOG_FILTER_GUILD, "SMSG_GUILD_EVENT [Broadcast] Event: %u", guildEvent); + + if (sLog->ShouldLog(LOG_FILTER_GUILD, LOG_LEVEL_DEBUG)) + sLog->outDebug(LOG_FILTER_GUILD, "SMSG_GUILD_EVENT [Broadcast] Event: %s (%u)", _GetGuildEventString(guildEvent).c_str(), guildEvent); } void Guild::_SendBankList(WorldSession* session /* = NULL*/, uint8 tabId /*= 0*/, bool sendAllSlots /*= false*/, SlotIds *slots /*= NULL*/) const diff --git a/src/server/game/Guilds/Guild.h b/src/server/game/Guilds/Guild.h index deb89c169b6..a8bf5dcdb62 100755 --- a/src/server/game/Guilds/Guild.h +++ b/src/server/game/Guilds/Guild.h @@ -500,7 +500,7 @@ private: } void SetBankTabSlotsAndRights(GuildBankRightsAndSlots rightsAndSlots, bool saveToDB); - bool CreateMissingTabsIfNeeded(uint8 ranks, SQLTransaction& trans); + void CreateMissingTabsIfNeeded(uint8 ranks, SQLTransaction& trans, bool logOnCreate = false); private: uint32 m_guildId; diff --git a/src/server/game/Handlers/BattleGroundHandler.cpp b/src/server/game/Handlers/BattleGroundHandler.cpp index 3a359704916..0a076dfaa34 100755 --- a/src/server/game/Handlers/BattleGroundHandler.cpp +++ b/src/server/game/Handlers/BattleGroundHandler.cpp @@ -342,8 +342,6 @@ void WorldSession::HandleBattlefieldListOpcode(WorldPacket &recvData) void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recvData) { - sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_BATTLEFIELD_PORT Message"); - uint8 type; // arenatype if arena uint8 unk2; // unk, can be 0x0 (may be if was invited?) and 0x1 uint32 bgTypeId_; // type id from dbc @@ -351,16 +349,17 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recvData) uint8 action; // enter battle 0x1, leave queue 0x0 recvData >> type >> unk2 >> bgTypeId_ >> unk >> action; - if (!sBattlemasterListStore.LookupEntry(bgTypeId_)) { - sLog->outDebug(LOG_FILTER_BATTLEGROUND, "BattlegroundHandler: invalid bgtype (%u) with player (Name: %s, GUID: %u) received.", bgTypeId_, _player->GetName().c_str(), _player->GetGUIDLow()); + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "CMSG_BATTLEFIELD_PORT %s ArenaType: %u, Unk: %u, BgType: %u, Action: %u. Invalid BgType!", + GetPlayerInfo().c_str(), type, unk2, bgTypeId_, action); return; } if (!_player->InBattlegroundQueue()) { - sLog->outDebug(LOG_FILTER_BATTLEGROUND, "BattlegroundHandler: Invalid CMSG_BATTLEFIELD_PORT received from player (Name: %s, GUID: %u), he is not in bg_queue.", _player->GetName().c_str(), _player->GetGUIDLow()); + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "CMSG_BATTLEFIELD_PORT %s ArenaType: %u, Unk: %u, BgType: %u, Action: %u. Player not in queue!", + GetPlayerInfo().c_str(), type, unk2, bgTypeId_, action); return; } @@ -372,27 +371,39 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recvData) GroupQueueInfo ginfo; if (!bgQueue.GetPlayerGroupInfoData(_player->GetGUID(), &ginfo)) { - sLog->outError(LOG_FILTER_NETWORKIO, "BattlegroundHandler: itrplayerstatus not found."); + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "CMSG_BATTLEFIELD_PORT %s ArenaType: %u, Unk: %u, BgType: %u, Action: %u. Player not in queue (No player Group Info)!", + GetPlayerInfo().c_str(), type, unk2, bgTypeId_, action); return; } // if action == 1, then instanceId is required if (!ginfo.IsInvitedToBGInstanceGUID && action == 1) { - sLog->outError(LOG_FILTER_NETWORKIO, "BattlegroundHandler: instance not found."); + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "CMSG_BATTLEFIELD_PORT %s ArenaType: %u, Unk: %u, BgType: %u, Action: %u. Player is not invited to any bg!", + GetPlayerInfo().c_str(), type, unk2, bgTypeId_, action); return; } Battleground* bg = sBattlegroundMgr->GetBattleground(ginfo.IsInvitedToBGInstanceGUID, bgTypeId); - - // bg template might and must be used in case of leaving queue, when instance is not created yet - if (!bg && action == 0) - bg = sBattlegroundMgr->GetBattlegroundTemplate(bgTypeId); if (!bg) { - sLog->outError(LOG_FILTER_NETWORKIO, "BattlegroundHandler: bg_template not found for type id %u.", bgTypeId); - return; + if (action) + { + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "CMSG_BATTLEFIELD_PORT %s ArenaType: %u, Unk: %u, BgType: %u, Action: %u. Cant find BG with id %u!", + GetPlayerInfo().c_str(), type, unk2, bgTypeId_, action, ginfo.IsInvitedToBGInstanceGUID); + return; + } + + bg = sBattlegroundMgr->GetBattlegroundTemplate(bgTypeId); + if (!bg) + { + sLog->outError(LOG_FILTER_NETWORKIO, "BattlegroundHandler: bg_template not found for type id %u.", bgTypeId); + return; + } } + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "CMSG_BATTLEFIELD_PORT %s ArenaType: %u, Unk: %u, BgType: %u, Action: %u.", + GetPlayerInfo().c_str(), type, unk2, bgTypeId_, action); + // expected bracket entry PvPDifficultyEntry const* bracketEntry = GetBattlegroundBracketByLevel(bg->GetMapId(), _player->getLevel()); if (!bracketEntry) @@ -409,86 +420,82 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recvData) sBattlegroundMgr->BuildGroupJoinedBattlegroundPacket(&data2, ERR_GROUP_JOIN_BATTLEGROUND_DESERTERS); _player->GetSession()->SendPacket(&data2); action = 0; - sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Battleground: player %s (%u) has a deserter debuff, do not port him to battleground!", _player->GetName().c_str(), _player->GetGUIDLow()); + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Player %s (%u) has a deserter debuff, do not port him to battleground!", _player->GetName().c_str(), _player->GetGUIDLow()); } //if player don't match battleground max level, then do not allow him to enter! (this might happen when player leveled up during his waiting in queue if (_player->getLevel() > bg->GetMaxLevel()) { - sLog->outError(LOG_FILTER_NETWORKIO, "Battleground: Player %s (%u) has level (%u) higher than maxlevel (%u) of battleground (%u)! Do not port him to battleground!", + sLog->outError(LOG_FILTER_NETWORKIO, "Player %s (%u) has level (%u) higher than maxlevel (%u) of battleground (%u)! Do not port him to battleground!", _player->GetName().c_str(), _player->GetGUIDLow(), _player->getLevel(), bg->GetMaxLevel(), bg->GetTypeID()); action = 0; } } uint32 queueSlot = _player->GetBattlegroundQueueIndex(bgQueueTypeId); WorldPacket data; - switch (action) + if (action) { - case 1: // port to battleground - if (!_player->IsInvitedForBattlegroundQueueType(bgQueueTypeId)) - return; // cheating? + if (!_player->IsInvitedForBattlegroundQueueType(bgQueueTypeId)) + return; // cheating? - if (!_player->InBattleground()) - _player->SetBattlegroundEntryPoint(); + if (!_player->InBattleground()) + _player->SetBattlegroundEntryPoint(); - // resurrect the player - if (!_player->isAlive()) - { - _player->ResurrectPlayer(1.0f); - _player->SpawnCorpseBones(); - } - // stop taxi flight at port - if (_player->isInFlight()) - { - _player->GetMotionMaster()->MovementExpired(); - _player->CleanupAfterTaxiFlight(); - } + // resurrect the player + if (!_player->isAlive()) + { + _player->ResurrectPlayer(1.0f); + _player->SpawnCorpseBones(); + } + // stop taxi flight at port + if (_player->isInFlight()) + { + _player->GetMotionMaster()->MovementExpired(); + _player->CleanupAfterTaxiFlight(); + } - sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, bg, queueSlot, STATUS_IN_PROGRESS, 0, bg->GetStartTime(), bg->GetArenaType()); - _player->GetSession()->SendPacket(&data); - // remove battleground queue status from BGmgr - bgQueue.RemovePlayer(_player->GetGUID(), false); - // this is still needed here if battleground "jumping" shouldn't add deserter debuff - // also this is required to prevent stuck at old battleground after SetBattlegroundId set to new - if (Battleground* currentBg = _player->GetBattleground()) - currentBg->RemovePlayerAtLeave(_player->GetGUID(), false, true); - - // set the destination instance id - _player->SetBattlegroundId(bg->GetInstanceID(), bgTypeId); - // set the destination team - _player->SetBGTeam(ginfo.Team); - // bg->HandleBeforeTeleportToBattleground(_player); - sBattlegroundMgr->SendToBattleground(_player, ginfo.IsInvitedToBGInstanceGUID, bgTypeId); - // add only in HandleMoveWorldPortAck() - // bg->AddPlayer(_player, team); - sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Battleground: player %s (%u) joined battle for bg %u, bgtype %u, queue type %u.", _player->GetName().c_str(), _player->GetGUIDLow(), bg->GetInstanceID(), bg->GetTypeID(), bgQueueTypeId); - break; - case 0: // leave queue - if (bg->isArena() && bg->GetStatus() > STATUS_WAIT_QUEUE) - return; + sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, bg, queueSlot, STATUS_IN_PROGRESS, 0, bg->GetStartTime(), bg->GetArenaType()); + _player->GetSession()->SendPacket(&data); + // remove battleground queue status from BGmgr + bgQueue.RemovePlayer(_player->GetGUID(), false); + // this is still needed here if battleground "jumping" shouldn't add deserter debuff + // also this is required to prevent stuck at old battleground after SetBattlegroundId set to new + if (Battleground* currentBg = _player->GetBattleground()) + currentBg->RemovePlayerAtLeave(_player->GetGUID(), false, true); + + // set the destination instance id + _player->SetBattlegroundId(bg->GetInstanceID(), bgTypeId); + // set the destination team + _player->SetBGTeam(ginfo.Team); + // bg->HandleBeforeTeleportToBattleground(_player); + sBattlegroundMgr->SendToBattleground(_player, ginfo.IsInvitedToBGInstanceGUID, bgTypeId); + // add only in HandleMoveWorldPortAck() + // bg->AddPlayer(_player, team); + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Battleground: player %s (%u) joined battle for bg %u, bgtype %u, queue type %u.", _player->GetName().c_str(), _player->GetGUIDLow(), bg->GetInstanceID(), bg->GetTypeID(), bgQueueTypeId); + } + else // leave queue + { + if (bg->isArena() && bg->GetStatus() > STATUS_WAIT_QUEUE) + return; - // if player leaves rated arena match before match start, it is counted as he played but he lost - if (ginfo.IsRated && ginfo.IsInvitedToBGInstanceGUID) + // if player leaves rated arena match before match start, it is counted as he played but he lost + if (ginfo.IsRated && ginfo.IsInvitedToBGInstanceGUID) + { + ArenaTeam* at = sArenaTeamMgr->GetArenaTeamById(ginfo.Team); + if (at) { - ArenaTeam* at = sArenaTeamMgr->GetArenaTeamById(ginfo.Team); - if (at) - { - sLog->outDebug(LOG_FILTER_BATTLEGROUND, "UPDATING memberLost's personal arena rating for %u by opponents rating: %u, because he has left queue!", GUID_LOPART(_player->GetGUID()), ginfo.OpponentsTeamRating); - at->MemberLost(_player, ginfo.OpponentsMatchmakerRating); - at->SaveToDB(); - } + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "UPDATING memberLost's personal arena rating for %u by opponents rating: %u, because he has left queue!", GUID_LOPART(_player->GetGUID()), ginfo.OpponentsTeamRating); + at->MemberLost(_player, ginfo.OpponentsMatchmakerRating); + at->SaveToDB(); } - _player->RemoveBattlegroundQueueId(bgQueueTypeId); // must be called this way, because if you move this call to queue->removeplayer, it causes bugs - sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, bg, queueSlot, STATUS_NONE, 0, 0, 0); - bgQueue.RemovePlayer(_player->GetGUID(), true); - // player left queue, we should update it - do not update Arena Queue - if (!ginfo.ArenaType) - sBattlegroundMgr->ScheduleQueueUpdate(ginfo.ArenaMatchmakerRating, ginfo.ArenaType, bgQueueTypeId, bgTypeId, bracketEntry->GetBracketId()); - SendPacket(&data); - sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Battleground: player %s (%u) left queue for bgtype %u, queue type %u.", _player->GetName().c_str(), _player->GetGUIDLow(), bg->GetTypeID(), bgQueueTypeId); - break; - default: - sLog->outError(LOG_FILTER_NETWORKIO, "Battleground port: unknown action %u", action); - break; + } + _player->RemoveBattlegroundQueueId(bgQueueTypeId); // must be called this way, because if you move this call to queue->removeplayer, it causes bugs + sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, bg, queueSlot, STATUS_NONE, 0, 0, 0); + bgQueue.RemovePlayer(_player->GetGUID(), true); + // player left queue, we should update it - do not update Arena Queue + if (!ginfo.ArenaType) + sBattlegroundMgr->ScheduleQueueUpdate(ginfo.ArenaMatchmakerRating, ginfo.ArenaType, bgQueueTypeId, bgTypeId, bracketEntry->GetBracketId()); + SendPacket(&data); + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Battleground: player %s (%u) left queue for bgtype %u, queue type %u.", _player->GetName().c_str(), _player->GetGUIDLow(), bg->GetTypeID(), bgQueueTypeId); } } diff --git a/src/server/game/Handlers/ChannelHandler.cpp b/src/server/game/Handlers/ChannelHandler.cpp index a65e3830a81..dd5d08eb3fc 100755 --- a/src/server/game/Handlers/ChannelHandler.cpp +++ b/src/server/game/Handlers/ChannelHandler.cpp @@ -18,6 +18,7 @@ #include "ObjectMgr.h" // for normalizePlayerName #include "ChannelMgr.h" +#include "Player.h" void WorldSession::HandleJoinChannel(WorldPacket& recvPacket) { diff --git a/src/server/game/Handlers/CharacterHandler.cpp b/src/server/game/Handlers/CharacterHandler.cpp index 258878b1f87..8e6cdbc9dc2 100644 --- a/src/server/game/Handlers/CharacterHandler.cpp +++ b/src/server/game/Handlers/CharacterHandler.cpp @@ -772,7 +772,7 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder* holder) Player* pCurrChar = new Player(this); // for send server info and strings (config) - ChatHandler chH = ChatHandler(pCurrChar); + ChatHandler chH = ChatHandler(pCurrChar->GetSession()); // "GetAccountId() == db stored account id" checked in LoadFromDB (prevent login not own character using cheating tools) if (!pCurrChar->LoadFromDB(GUID_LOPART(playerGuid), holder)) diff --git a/src/server/game/Handlers/ChatHandler.cpp b/src/server/game/Handlers/ChatHandler.cpp index 8b7fc5542ab..e4989816998 100755 --- a/src/server/game/Handlers/ChatHandler.cpp +++ b/src/server/game/Handlers/ChatHandler.cpp @@ -114,7 +114,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData) return; break; default: - sLog->outError(LOG_FILTER_NETWORKIO, "Player %s (GUID: %u) sent a chatmessage with an invalid language/message type combination", + sLog->outError(LOG_FILTER_NETWORKIO, "Player %s (GUID: %u) sent a chatmessage with an invalid language/message type combination", GetPlayer()->GetName().c_str(), GetPlayer()->GetGUIDLow()); recvData.rfinish(); @@ -561,8 +561,8 @@ void WorldSession::HandleTextEmoteOpcode(WorldPacket& recvData) // Only allow text-emotes for "dead" entities (feign death included) if (GetPlayer()->HasUnitState(UNIT_STATE_DIED)) break; - GetPlayer()->HandleEmoteCommand(emote_anim); - break; + GetPlayer()->HandleEmoteCommand(emote_anim); + break; } Unit* unit = ObjectAccessor::GetUnit(*_player, guid); diff --git a/src/server/game/Handlers/CombatHandler.cpp b/src/server/game/Handlers/CombatHandler.cpp index 1cd86afc6d2..391a6fc0831 100755 --- a/src/server/game/Handlers/CombatHandler.cpp +++ b/src/server/game/Handlers/CombatHandler.cpp @@ -25,6 +25,7 @@ #include "ObjectDefines.h" #include "Vehicle.h" #include "VehicleDefines.h" +#include "Player.h" void WorldSession::HandleAttackSwingOpcode(WorldPacket& recvData) { diff --git a/src/server/game/Handlers/MiscHandler.cpp b/src/server/game/Handlers/MiscHandler.cpp index 8928a7c15a1..aa182a16d91 100755 --- a/src/server/game/Handlers/MiscHandler.cpp +++ b/src/server/game/Handlers/MiscHandler.cpp @@ -888,7 +888,7 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPacket& recvData) } if (player->isDebugAreaTriggers) - ChatHandler(player).PSendSysMessage(LANG_DEBUG_AREATRIGGER_REACHED, triggerId); + ChatHandler(player->GetSession()).PSendSysMessage(LANG_DEBUG_AREATRIGGER_REACHED, triggerId); if (sScriptMgr->OnAreaTrigger(player, atEntry)) return; @@ -1382,25 +1382,21 @@ void WorldSession::HandleFarSightOpcode(WorldPacket& recvData) { sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_FAR_SIGHT"); - uint8 apply; + bool apply; recvData >> apply; - switch (apply) + if (apply) { - case 0: - sLog->outDebug(LOG_FILTER_NETWORKIO, "Player %u set vision to self", _player->GetGUIDLow()); - _player->SetSeer(_player); - break; - case 1: - sLog->outDebug(LOG_FILTER_NETWORKIO, "Added FarSight " UI64FMTD " to player %u", _player->GetUInt64Value(PLAYER_FARSIGHT), _player->GetGUIDLow()); - if (WorldObject* target = _player->GetViewpoint()) - _player->SetSeer(target); - else - sLog->outError(LOG_FILTER_NETWORKIO, "Player %s requests non-existing seer " UI64FMTD, _player->GetName().c_str(), _player->GetUInt64Value(PLAYER_FARSIGHT)); - break; - default: - sLog->outDebug(LOG_FILTER_NETWORKIO, "Unhandled mode in CMSG_FAR_SIGHT: %u", apply); - return; + sLog->outDebug(LOG_FILTER_NETWORKIO, "Added FarSight " UI64FMTD " to player %u", _player->GetUInt64Value(PLAYER_FARSIGHT), _player->GetGUIDLow()); + if (WorldObject* target = _player->GetViewpoint()) + _player->SetSeer(target); + else + sLog->outError(LOG_FILTER_NETWORKIO, "Player %s requests non-existing seer " UI64FMTD, _player->GetName().c_str(), _player->GetUInt64Value(PLAYER_FARSIGHT)); + } + else + { + sLog->outDebug(LOG_FILTER_NETWORKIO, "Player %u set vision to self", _player->GetGUIDLow()); + _player->SetSeer(_player); } GetPlayer()->UpdateVisibilityForPlayer(); @@ -1467,7 +1463,7 @@ void WorldSession::HandleSetDungeonDifficultyOpcode(WorldPacket& recvData) if (mode >= MAX_DUNGEON_DIFFICULTY) { - sLog->outError(LOG_FILTER_NETWORKIO, "WorldSession::HandleSetDungeonDifficultyOpcode: player %d sent an invalid instance mode %d!", _player->GetGUIDLow(), mode); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WorldSession::HandleSetDungeonDifficultyOpcode: player %d sent an invalid instance mode %d!", _player->GetGUIDLow(), mode); return; } @@ -1478,7 +1474,7 @@ void WorldSession::HandleSetDungeonDifficultyOpcode(WorldPacket& recvData) Map* map = _player->FindMap(); if (map && map->IsDungeon()) { - sLog->outError(LOG_FILTER_NETWORKIO, "WorldSession::HandleSetDungeonDifficultyOpcode: player (Name: %s, GUID: %u) tried to reset the instance while player is inside!", + sLog->outDebug(LOG_FILTER_NETWORKIO, "WorldSession::HandleSetDungeonDifficultyOpcode: player (Name: %s, GUID: %u) tried to reset the instance while player is inside!", _player->GetName().c_str(), _player->GetGUIDLow()); return; } @@ -1499,7 +1495,7 @@ void WorldSession::HandleSetDungeonDifficultyOpcode(WorldPacket& recvData) if (groupGuy->GetMap()->IsNonRaidDungeon()) { - sLog->outError(LOG_FILTER_NETWORKIO, "WorldSession::HandleSetDungeonDifficultyOpcode: player %d tried to reset the instance while group member (Name: %s, GUID: %u) is inside!", + sLog->outDebug(LOG_FILTER_NETWORKIO, "WorldSession::HandleSetDungeonDifficultyOpcode: player %d tried to reset the instance while group member (Name: %s, GUID: %u) is inside!", _player->GetGUIDLow(), groupGuy->GetName().c_str(), groupGuy->GetGUIDLow()); return; } @@ -1534,7 +1530,7 @@ void WorldSession::HandleSetRaidDifficultyOpcode(WorldPacket& recvData) Map* map = _player->FindMap(); if (map && map->IsDungeon()) { - sLog->outError(LOG_FILTER_NETWORKIO, "WorldSession::HandleSetRaidDifficultyOpcode: player %d tried to reset the instance while inside!", _player->GetGUIDLow()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WorldSession::HandleSetRaidDifficultyOpcode: player %d tried to reset the instance while inside!", _player->GetGUIDLow()); return; } @@ -1557,7 +1553,7 @@ void WorldSession::HandleSetRaidDifficultyOpcode(WorldPacket& recvData) if (groupGuy->GetMap()->IsRaid()) { - sLog->outError(LOG_FILTER_NETWORKIO, "WorldSession::HandleSetRaidDifficultyOpcode: player %d tried to reset the instance while inside!", _player->GetGUIDLow()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WorldSession::HandleSetRaidDifficultyOpcode: player %d tried to reset the instance while inside!", _player->GetGUIDLow()); return; } } diff --git a/src/server/game/Handlers/PetHandler.cpp b/src/server/game/Handlers/PetHandler.cpp index cb6e5265c76..daba55e5aa8 100755 --- a/src/server/game/Handlers/PetHandler.cpp +++ b/src/server/game/Handlers/PetHandler.cpp @@ -31,8 +31,9 @@ #include "World.h" #include "Group.h" #include "SpellInfo.h" +#include "Player.h" -void WorldSession::HandleDismissCritter(WorldPacket &recvData) +void WorldSession::HandleDismissCritter(WorldPacket& recvData) { uint64 guid; recvData >> guid; @@ -138,7 +139,7 @@ void WorldSession::HandlePetStopAttack(WorldPacket &recvData) pet->AttackStop(); } -void WorldSession::HandlePetActionHelper(Unit* pet, uint64 guid1, uint16 spellid, uint16 flag, uint64 guid2) +void WorldSession::HandlePetActionHelper(Unit* pet, uint64 guid1, uint32 spellid, uint16 flag, uint64 guid2) { CharmInfo* charmInfo = pet->GetCharmInfo(); if (!charmInfo) @@ -855,15 +856,15 @@ void WorldSession::SendPetNameInvalid(uint32 error, const std::string& name, Dec SendPacket(&data); } -void WorldSession::HandlePetLearnTalent(WorldPacket & recvData) +void WorldSession::HandlePetLearnTalent(WorldPacket& recvData) { sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_PET_LEARN_TALENT"); uint64 guid; - uint32 talent_id, requested_rank; - recvData >> guid >> talent_id >> requested_rank; + uint32 talentId, requestedRank; + recvData >> guid >> talentId >> requestedRank; - _player->LearnPetTalent(guid, talent_id, requested_rank); + _player->LearnPetTalent(guid, talentId, requestedRank); _player->SendTalentsInfoData(true); } diff --git a/src/server/game/Handlers/SpellHandler.cpp b/src/server/game/Handlers/SpellHandler.cpp index 1c834b323ac..270980c8e7c 100755 --- a/src/server/game/Handlers/SpellHandler.cpp +++ b/src/server/game/Handlers/SpellHandler.cpp @@ -32,6 +32,7 @@ #include "ScriptMgr.h" #include "GameObjectAI.h" #include "SpellAuraEffects.h" +#include "Player.h" void WorldSession::HandleClientCastFlags(WorldPacket& recvPacket, uint8 castFlags, SpellCastTargets& targets) { diff --git a/src/server/game/Loot/LootMgr.cpp b/src/server/game/Loot/LootMgr.cpp index fca8d78a3de..ef3d2b9fbd6 100755 --- a/src/server/game/Loot/LootMgr.cpp +++ b/src/server/game/Loot/LootMgr.cpp @@ -25,6 +25,7 @@ #include "SpellMgr.h" #include "SpellInfo.h" #include "Group.h" +#include "Player.h" static Rates const qualityToRate[MAX_ITEM_QUALITY] = { diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index 5ef0769e5c2..d40be13c6d8 100755 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -33,6 +33,7 @@ #include "LFGMgr.h" #include "DynamicTree.h" #include "Vehicle.h" +#include "Battleground.h" union u_map_magic { @@ -144,7 +145,7 @@ void Map::LoadMap(int gx, int gy, bool reload) // load grid map for base map if (!m_parentMap->GridMaps[gx][gy]) - m_parentMap->EnsureGridCreated(GridCoord(63-gx, 63-gy)); + m_parentMap->EnsureGridCreated_i(GridCoord(63-gx, 63-gy)); ((MapInstanced*)(m_parentMap))->AddGridMapReference(GridCoord(gx, gy)); GridMaps[gx][gy] = m_parentMap->GridMaps[gx][gy]; @@ -307,32 +308,34 @@ void Map::DeleteFromWorld(Player* player) delete player; } +void Map::EnsureGridCreated(const GridCoord &p) +{ + TRINITY_GUARD(ACE_Thread_Mutex, Lock); + EnsureGridCreated_i(p); +} + //Create NGrid so the object can be added to it //But object data is not loaded here -void Map::EnsureGridCreated(const GridCoord &p) +void Map::EnsureGridCreated_i(const GridCoord &p) { if (!getNGrid(p.x_coord, p.y_coord)) { - TRINITY_GUARD(ACE_Thread_Mutex, Lock); - if (!getNGrid(p.x_coord, p.y_coord)) - { - sLog->outDebug(LOG_FILTER_MAPS, "Creating grid[%u, %u] for map %u instance %u", p.x_coord, p.y_coord, GetId(), i_InstanceId); + sLog->outDebug(LOG_FILTER_MAPS, "Creating grid[%u, %u] for map %u instance %u", p.x_coord, p.y_coord, GetId(), i_InstanceId); - setNGrid(new NGridType(p.x_coord*MAX_NUMBER_OF_GRIDS + p.y_coord, p.x_coord, p.y_coord, i_gridExpiry, sWorld->getBoolConfig(CONFIG_GRID_UNLOAD)), - p.x_coord, p.y_coord); + setNGrid(new NGridType(p.x_coord*MAX_NUMBER_OF_GRIDS + p.y_coord, p.x_coord, p.y_coord, i_gridExpiry, sWorld->getBoolConfig(CONFIG_GRID_UNLOAD)), + p.x_coord, p.y_coord); - // build a linkage between this map and NGridType - buildNGridLinkage(getNGrid(p.x_coord, p.y_coord)); + // build a linkage between this map and NGridType + buildNGridLinkage(getNGrid(p.x_coord, p.y_coord)); - getNGrid(p.x_coord, p.y_coord)->SetGridState(GRID_STATE_IDLE); + getNGrid(p.x_coord, p.y_coord)->SetGridState(GRID_STATE_IDLE); - //z coord - int gx = (MAX_NUMBER_OF_GRIDS - 1) - p.x_coord; - int gy = (MAX_NUMBER_OF_GRIDS - 1) - p.y_coord; + //z coord + int gx = (MAX_NUMBER_OF_GRIDS - 1) - p.x_coord; + int gy = (MAX_NUMBER_OF_GRIDS - 1) - p.y_coord; - if (!GridMaps[gx][gy]) - LoadMapAndVMap(gx, gy); - } + if (!GridMaps[gx][gy]) + LoadMapAndVMap(gx, gy); } } diff --git a/src/server/game/Maps/Map.h b/src/server/game/Maps/Map.h index 0743c4e545f..4e4b638faa4 100755 --- a/src/server/game/Maps/Map.h +++ b/src/server/game/Maps/Map.h @@ -499,6 +499,7 @@ class Map : public GridRefManager<NGridType> bool IsGridLoaded(const GridCoord &) const; void EnsureGridCreated(const GridCoord &); + void EnsureGridCreated_i(const GridCoord &); bool EnsureGridLoaded(Cell const&); void EnsureGridLoadedForActiveObject(Cell const&, WorldObject* object); diff --git a/src/server/game/Maps/MapInstanced.cpp b/src/server/game/Maps/MapInstanced.cpp index 5fcca05361b..9ca8155e83b 100755 --- a/src/server/game/Maps/MapInstanced.cpp +++ b/src/server/game/Maps/MapInstanced.cpp @@ -24,6 +24,7 @@ #include "InstanceSaveMgr.h" #include "World.h" #include "Group.h" +#include "Player.h" MapInstanced::MapInstanced(uint32 id, time_t expiry) : Map(id, expiry, 0, DUNGEON_DIFFICULTY_NORMAL) { @@ -280,4 +281,4 @@ bool MapInstanced::CanEnter(Player* /*player*/) { //ASSERT(false); return true; -}
\ No newline at end of file +} diff --git a/src/server/game/Maps/MapManager.cpp b/src/server/game/Maps/MapManager.cpp index f6aa6ff7dc3..c1df52c51be 100755 --- a/src/server/game/Maps/MapManager.cpp +++ b/src/server/game/Maps/MapManager.cpp @@ -33,6 +33,7 @@ #include "Language.h" #include "WorldPacket.h" #include "Group.h" +#include "Player.h" extern GridState* si_GridStates[]; // debugging code, should be deleted some day @@ -439,4 +440,4 @@ void MapManager::FreeInstanceId(uint32 instanceId) SetNextInstanceId(instanceId); _instanceIds[instanceId] = false; -}
\ No newline at end of file +} diff --git a/src/server/game/Maps/MapUpdater.cpp b/src/server/game/Maps/MapUpdater.cpp index b747d065a14..5e5f520505c 100644 --- a/src/server/game/Maps/MapUpdater.cpp +++ b/src/server/game/Maps/MapUpdater.cpp @@ -69,7 +69,7 @@ MapUpdater::~MapUpdater() int MapUpdater::activate(size_t num_threads) { - return m_executor.activate((int)num_threads, new WDBThreadStartReq1, new WDBThreadEndReq1); + return m_executor.start((int)num_threads, new WDBThreadStartReq1, new WDBThreadEndReq1); } int MapUpdater::deactivate() diff --git a/src/server/game/Miscellaneous/Formulas.h b/src/server/game/Miscellaneous/Formulas.h index dac5b1ef9a2..4f358d7a145 100755 --- a/src/server/game/Miscellaneous/Formulas.h +++ b/src/server/game/Miscellaneous/Formulas.h @@ -22,6 +22,7 @@ #include "World.h" #include "SharedDefines.h" #include "ScriptMgr.h" +#include "Player.h" namespace Trinity { diff --git a/src/server/game/Miscellaneous/Language.h b/src/server/game/Miscellaneous/Language.h index 07bfd284a7d..5321202b256 100755 --- a/src/server/game/Miscellaneous/Language.h +++ b/src/server/game/Miscellaneous/Language.h @@ -950,8 +950,8 @@ enum TrinityStrings LANG_BATTLEGROUND = 5015, LANG_ARENA = 5016, LANG_RAID = 5017, - LANG_HEROIC = 5018, - LANG_MOUNTABLE = 5019, + //= 5018, + //= 5019, LANG_NPCINFO_PHASEMASK = 5020, LANG_NPCINFO_ARMOR = 5021, LANG_CHANNEL_ENABLE_OWNERSHIP = 5022, diff --git a/src/server/game/Miscellaneous/SharedDefines.h b/src/server/game/Miscellaneous/SharedDefines.h index 422385f406f..57e92c77655 100755 --- a/src/server/game/Miscellaneous/SharedDefines.h +++ b/src/server/game/Miscellaneous/SharedDefines.h @@ -3422,7 +3422,12 @@ enum ActivateTaxiReply ERR_TAXINOTSTANDING = 12 }; -// Calendar - start +enum DuelCompleteType +{ + DUEL_INTERRUPTED = 0, + DUEL_WON = 1, + DUEL_FLED = 2 +}; enum CalendarFlags { @@ -3521,6 +3526,73 @@ enum CalendarError CALENDAR_ERROR_NO_MODERATOR = 40 }; -// Calendar - end +// handle the queue types and bg types separately to enable joining queue for different sized arenas at the same time +enum BattlegroundQueueTypeId +{ + BATTLEGROUND_QUEUE_NONE = 0, + BATTLEGROUND_QUEUE_AV = 1, + BATTLEGROUND_QUEUE_WS = 2, + BATTLEGROUND_QUEUE_AB = 3, + BATTLEGROUND_QUEUE_EY = 4, + BATTLEGROUND_QUEUE_SA = 5, + BATTLEGROUND_QUEUE_IC = 6, + BATTLEGROUND_QUEUE_RB = 7, + BATTLEGROUND_QUEUE_2v2 = 8, + BATTLEGROUND_QUEUE_3v3 = 9, + BATTLEGROUND_QUEUE_5v5 = 10, + MAX_BATTLEGROUND_QUEUE_TYPES +}; + +enum GroupJoinBattlegroundResult +{ + // positive values are indexes in BattlemasterList.dbc + ERR_GROUP_JOIN_BATTLEGROUND_FAIL = 0, // Your group has joined a battleground queue, but you are not eligible (showed for non existing BattlemasterList.dbc indexes) + ERR_BATTLEGROUND_NONE = -1, // not show anything + ERR_GROUP_JOIN_BATTLEGROUND_DESERTERS = -2, // You cannot join the battleground yet because you or one of your party members is flagged as a Deserter. + ERR_ARENA_TEAM_PARTY_SIZE = -3, // Incorrect party size for this arena. + ERR_BATTLEGROUND_TOO_MANY_QUEUES = -4, // You can only be queued for 2 battles at once + ERR_BATTLEGROUND_CANNOT_QUEUE_FOR_RATED = -5, // You cannot queue for a rated match while queued for other battles + ERR_BATTLEDGROUND_QUEUED_FOR_RATED = -6, // You cannot queue for another battle while queued for a rated arena match + ERR_BATTLEGROUND_TEAM_LEFT_QUEUE = -7, // Your team has left the arena queue + ERR_BATTLEGROUND_NOT_IN_BATTLEGROUND = -8, // You can't do that in a battleground. + ERR_BATTLEGROUND_JOIN_XP_GAIN = -9, // wtf, doesn't exist in client... + ERR_BATTLEGROUND_JOIN_RANGE_INDEX = -10, // Cannot join the queue unless all members of your party are in the same battleground level range. + ERR_BATTLEGROUND_JOIN_TIMED_OUT = -11, // %s was unavailable to join the queue. (uint64 guid exist in client cache) + ERR_BATTLEGROUND_JOIN_FAILED = -12, // Join as a group failed (uint64 guid doesn't exist in client cache) + ERR_LFG_CANT_USE_BATTLEGROUND = -13, // You cannot queue for a battleground or arena while using the dungeon system. + ERR_IN_RANDOM_BG = -14, // Can't do that while in a Random Battleground queue. + ERR_IN_NON_RANDOM_BG = -15 // Can't queue for Random Battleground while in another Battleground queue. +}; + +enum PetNameInvalidReason +{ + // custom, not send + PET_NAME_SUCCESS = 0, + + PET_NAME_INVALID = 1, + PET_NAME_NO_NAME = 2, + PET_NAME_TOO_SHORT = 3, + PET_NAME_TOO_LONG = 4, + PET_NAME_MIXED_LANGUAGES = 6, + PET_NAME_PROFANE = 7, + PET_NAME_RESERVED = 8, + PET_NAME_THREE_CONSECUTIVE = 11, + PET_NAME_INVALID_SPACE = 12, + PET_NAME_CONSECUTIVE_SPACES = 13, + PET_NAME_RUSSIAN_CONSECUTIVE_SILENT_CHARACTERS = 14, + PET_NAME_RUSSIAN_SILENT_CHARACTER_AT_BEGINNING_OR_END = 15, + PET_NAME_DECLENSION_DOESNT_MATCH_BASE_NAME = 16 +}; + +enum DungeonStatusFlag +{ + DUNGEON_STATUSFLAG_NORMAL = 0x01, + DUNGEON_STATUSFLAG_HEROIC = 0x02, + + RAID_STATUSFLAG_10MAN_NORMAL = 0x01, + RAID_STATUSFLAG_25MAN_NORMAL = 0x02, + RAID_STATUSFLAG_10MAN_HEROIC = 0x04, + RAID_STATUSFLAG_25MAN_HEROIC = 0x08 +}; #endif diff --git a/src/server/game/Movement/MovementGenerator.h b/src/server/game/Movement/MovementGenerator.h index 0a2ebcfaeee..0c1fc8114ca 100755 --- a/src/server/game/Movement/MovementGenerator.h +++ b/src/server/game/Movement/MovementGenerator.h @@ -52,29 +52,23 @@ class MovementGeneratorMedium : public MovementGenerator void Initialize(Unit &u) { //u->AssertIsType<T>(); - (static_cast<D*>(this))->Initialize(*((T*)&u)); + (static_cast<D*>(this))->DoInitialize(*((T*)&u)); } void Finalize(Unit &u) { //u->AssertIsType<T>(); - (static_cast<D*>(this))->Finalize(*((T*)&u)); + (static_cast<D*>(this))->DoFinalize(*((T*)&u)); } void Reset(Unit &u) { //u->AssertIsType<T>(); - (static_cast<D*>(this))->Reset(*((T*)&u)); + (static_cast<D*>(this))->DoReset(*((T*)&u)); } bool Update(Unit &u, const uint32& time_diff) { //u->AssertIsType<T>(); - return (static_cast<D*>(this))->Update(*((T*)&u), time_diff); + return (static_cast<D*>(this))->DoUpdate(*((T*)&u), time_diff); } - public: - // will not link if not overridden in the generators - void Initialize(T &u); - void Finalize(T &u); - void Reset(T &u); - bool Update(T &u, const uint32& time_diff); }; struct SelectableMovement : public FactoryHolder<MovementGenerator, MovementGeneratorType> diff --git a/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.cpp index bd75e1c8912..b8925c8b512 100755 --- a/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.cpp @@ -30,7 +30,7 @@ #endif template<class T> -void ConfusedMovementGenerator<T>::Initialize(T &unit) +void ConfusedMovementGenerator<T>::DoInitialize(T &unit) { unit.StopMoving(); float const wander_distance = 4; @@ -100,7 +100,7 @@ void ConfusedMovementGenerator<Player>::_InitSpecific(Player &, bool &is_water_o } template<class T> -void ConfusedMovementGenerator<T>::Reset(T &unit) +void ConfusedMovementGenerator<T>::DoReset(T &unit) { i_nextMove = 1; i_nextMoveTime.Reset(0); @@ -109,7 +109,7 @@ void ConfusedMovementGenerator<T>::Reset(T &unit) } template<class T> -bool ConfusedMovementGenerator<T>::Update(T &unit, const uint32 &diff) +bool ConfusedMovementGenerator<T>::DoUpdate(T &unit, const uint32 &diff) { if (unit.HasUnitState(UNIT_STATE_ROOT | UNIT_STATE_STUNNED | UNIT_STATE_DISTRACTED)) return true; @@ -149,14 +149,14 @@ bool ConfusedMovementGenerator<T>::Update(T &unit, const uint32 &diff) } template<> -void ConfusedMovementGenerator<Player>::Finalize(Player &unit) +void ConfusedMovementGenerator<Player>::DoFinalize(Player &unit) { unit.RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_CONFUSED); unit.ClearUnitState(UNIT_STATE_CONFUSED | UNIT_STATE_CONFUSED_MOVE); } template<> -void ConfusedMovementGenerator<Creature>::Finalize(Creature &unit) +void ConfusedMovementGenerator<Creature>::DoFinalize(Creature &unit) { unit.RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_CONFUSED); unit.ClearUnitState(UNIT_STATE_CONFUSED | UNIT_STATE_CONFUSED_MOVE); @@ -164,10 +164,10 @@ void ConfusedMovementGenerator<Creature>::Finalize(Creature &unit) unit.SetTarget(unit.getVictim()->GetGUID()); } -template void ConfusedMovementGenerator<Player>::Initialize(Player &player); -template void ConfusedMovementGenerator<Creature>::Initialize(Creature &creature); -template void ConfusedMovementGenerator<Player>::Reset(Player &player); -template void ConfusedMovementGenerator<Creature>::Reset(Creature &creature); -template bool ConfusedMovementGenerator<Player>::Update(Player &player, const uint32 &diff); -template bool ConfusedMovementGenerator<Creature>::Update(Creature &creature, const uint32 &diff); +template void ConfusedMovementGenerator<Player>::DoInitialize(Player &player); +template void ConfusedMovementGenerator<Creature>::DoInitialize(Creature &creature); +template void ConfusedMovementGenerator<Player>::DoReset(Player &player); +template void ConfusedMovementGenerator<Creature>::DoReset(Creature &creature); +template bool ConfusedMovementGenerator<Player>::DoUpdate(Player &player, const uint32 &diff); +template bool ConfusedMovementGenerator<Creature>::DoUpdate(Creature &creature, const uint32 &diff); diff --git a/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.h b/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.h index 7f2226ea069..1943b113888 100755 --- a/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.h +++ b/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.h @@ -30,10 +30,10 @@ class ConfusedMovementGenerator : public MovementGeneratorMedium< T, ConfusedMov public: explicit ConfusedMovementGenerator() : i_nextMoveTime(0) {} - void Initialize(T &); - void Finalize(T &); - void Reset(T &); - bool Update(T &, const uint32 &); + void DoInitialize(T &); + void DoFinalize(T &); + void DoReset(T &); + bool DoUpdate(T &, const uint32 &); MovementGeneratorType GetMovementGeneratorType() { return CONFUSED_MOTION_TYPE; } private: diff --git a/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp index c9497784988..ceeb8c18201 100755 --- a/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp @@ -23,6 +23,7 @@ #include "ObjectAccessor.h" #include "MoveSplineInit.h" #include "MoveSpline.h" +#include "Player.h" #define MIN_QUIET_DISTANCE 28.0f #define MAX_QUIET_DISTANCE 43.0f @@ -282,7 +283,7 @@ bool FleeingMovementGenerator<T>::_setMoveData(T &owner) } template<class T> -void FleeingMovementGenerator<T>::Initialize(T &owner) +void FleeingMovementGenerator<T>::DoInitialize(T &owner) { if (!&owner) return; @@ -331,7 +332,7 @@ void FleeingMovementGenerator<Player>::_Init(Player &) } template<> -void FleeingMovementGenerator<Player>::Finalize(Player &owner) +void FleeingMovementGenerator<Player>::DoFinalize(Player &owner) { owner.RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_FLEEING); owner.ClearUnitState(UNIT_STATE_FLEEING|UNIT_STATE_FLEEING_MOVE); @@ -339,7 +340,7 @@ void FleeingMovementGenerator<Player>::Finalize(Player &owner) } template<> -void FleeingMovementGenerator<Creature>::Finalize(Creature &owner) +void FleeingMovementGenerator<Creature>::DoFinalize(Creature &owner) { owner.RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_FLEEING); owner.ClearUnitState(UNIT_STATE_FLEEING|UNIT_STATE_FLEEING_MOVE); @@ -348,13 +349,13 @@ void FleeingMovementGenerator<Creature>::Finalize(Creature &owner) } template<class T> -void FleeingMovementGenerator<T>::Reset(T &owner) +void FleeingMovementGenerator<T>::DoReset(T &owner) { - Initialize(owner); + DoInitialize(owner); } template<class T> -bool FleeingMovementGenerator<T>::Update(T &owner, const uint32 &time_diff) +bool FleeingMovementGenerator<T>::DoUpdate(T &owner, const uint32 &time_diff) { if (!&owner || !owner.isAlive()) return false; @@ -371,18 +372,18 @@ bool FleeingMovementGenerator<T>::Update(T &owner, const uint32 &time_diff) return true; } -template void FleeingMovementGenerator<Player>::Initialize(Player &); -template void FleeingMovementGenerator<Creature>::Initialize(Creature &); +template void FleeingMovementGenerator<Player>::DoInitialize(Player &); +template void FleeingMovementGenerator<Creature>::DoInitialize(Creature &); template bool FleeingMovementGenerator<Player>::_setMoveData(Player &); template bool FleeingMovementGenerator<Creature>::_setMoveData(Creature &); template bool FleeingMovementGenerator<Player>::_getPoint(Player &, float &, float &, float &); template bool FleeingMovementGenerator<Creature>::_getPoint(Creature &, float &, float &, float &); template void FleeingMovementGenerator<Player>::_setTargetLocation(Player &); template void FleeingMovementGenerator<Creature>::_setTargetLocation(Creature &); -template void FleeingMovementGenerator<Player>::Reset(Player &); -template void FleeingMovementGenerator<Creature>::Reset(Creature &); -template bool FleeingMovementGenerator<Player>::Update(Player &, const uint32 &); -template bool FleeingMovementGenerator<Creature>::Update(Creature &, const uint32 &); +template void FleeingMovementGenerator<Player>::DoReset(Player &); +template void FleeingMovementGenerator<Creature>::DoReset(Creature &); +template bool FleeingMovementGenerator<Player>::DoUpdate(Player &, const uint32 &); +template bool FleeingMovementGenerator<Creature>::DoUpdate(Creature &, const uint32 &); void TimedFleeingMovementGenerator::Finalize(Unit &owner) { diff --git a/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.h b/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.h index aec93ad3375..288abbb5753 100755 --- a/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.h +++ b/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.h @@ -27,10 +27,10 @@ class FleeingMovementGenerator : public MovementGeneratorMedium< T, FleeingMovem public: FleeingMovementGenerator(uint64 fright) : i_frightGUID(fright), i_nextCheckTime(0) {} - void Initialize(T &); - void Finalize(T &); - void Reset(T &); - bool Update(T &, const uint32 &); + void DoInitialize(T &); + void DoFinalize(T &); + void DoReset(T &); + bool DoUpdate(T &, const uint32 &); MovementGeneratorType GetMovementGeneratorType() { return FLEEING_MOTION_TYPE; } diff --git a/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.cpp index a8bdb698432..1e9ea3156d8 100755 --- a/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.cpp @@ -23,12 +23,12 @@ #include "MoveSplineInit.h" #include "MoveSpline.h" -void HomeMovementGenerator<Creature>::Initialize(Creature & owner) +void HomeMovementGenerator<Creature>::DoInitialize(Creature & owner) { _setTargetLocation(owner); } -void HomeMovementGenerator<Creature>::Reset(Creature &) +void HomeMovementGenerator<Creature>::DoReset(Creature &) { } @@ -53,13 +53,13 @@ void HomeMovementGenerator<Creature>::_setTargetLocation(Creature & owner) owner.ClearUnitState(UNIT_STATE_ALL_STATE & ~UNIT_STATE_EVADE); } -bool HomeMovementGenerator<Creature>::Update(Creature &owner, const uint32 /*time_diff*/) +bool HomeMovementGenerator<Creature>::DoUpdate(Creature &owner, const uint32 /*time_diff*/) { arrived = owner.movespline->Finalized(); return !arrived; } -void HomeMovementGenerator<Creature>::Finalize(Creature& owner) +void HomeMovementGenerator<Creature>::DoFinalize(Creature& owner) { if (arrived) { diff --git a/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.h b/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.h index 95eb05f281c..a3d53e24510 100755 --- a/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.h +++ b/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.h @@ -34,10 +34,10 @@ class HomeMovementGenerator<Creature> : public MovementGeneratorMedium< Creature HomeMovementGenerator() : arrived(false) {} ~HomeMovementGenerator() {} - void Initialize(Creature &); - void Finalize(Creature &); - void Reset(Creature &); - bool Update(Creature &, const uint32); + void DoInitialize(Creature &); + void DoFinalize(Creature &); + void DoReset(Creature &); + bool DoUpdate(Creature &, const uint32); MovementGeneratorType GetMovementGeneratorType() { return HOME_MOTION_TYPE; } private: diff --git a/src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp index 07a5761517e..91f77e8ebfe 100755 --- a/src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp @@ -27,7 +27,7 @@ //----- Point Movement Generator template<class T> -void PointMovementGenerator<T>::Initialize(T &unit) +void PointMovementGenerator<T>::DoInitialize(T &unit) { if (!unit.IsStopped()) unit.StopMoving(); @@ -42,7 +42,7 @@ void PointMovementGenerator<T>::Initialize(T &unit) } template<class T> -bool PointMovementGenerator<T>::Update(T &unit, const uint32 & /*diff*/) +bool PointMovementGenerator<T>::DoUpdate(T &unit, const uint32 & /*diff*/) { if (!&unit) return false; @@ -69,7 +69,7 @@ bool PointMovementGenerator<T>::Update(T &unit, const uint32 & /*diff*/) } template<class T> -void PointMovementGenerator<T>::Finalize(T &unit) +void PointMovementGenerator<T>::DoFinalize(T &unit) { unit.ClearUnitState(UNIT_STATE_ROAMING|UNIT_STATE_ROAMING_MOVE); @@ -78,7 +78,7 @@ void PointMovementGenerator<T>::Finalize(T &unit) } template<class T> -void PointMovementGenerator<T>::Reset(T &unit) +void PointMovementGenerator<T>::DoReset(T &unit) { if (!unit.IsStopped()) unit.StopMoving(); @@ -97,14 +97,14 @@ template <> void PointMovementGenerator<Creature>::MovementInform(Creature &unit unit.AI()->MovementInform(POINT_MOTION_TYPE, id); } -template void PointMovementGenerator<Player>::Initialize(Player&); -template void PointMovementGenerator<Creature>::Initialize(Creature&); -template void PointMovementGenerator<Player>::Finalize(Player&); -template void PointMovementGenerator<Creature>::Finalize(Creature&); -template void PointMovementGenerator<Player>::Reset(Player&); -template void PointMovementGenerator<Creature>::Reset(Creature&); -template bool PointMovementGenerator<Player>::Update(Player &, const uint32 &); -template bool PointMovementGenerator<Creature>::Update(Creature&, const uint32 &); +template void PointMovementGenerator<Player>::DoInitialize(Player&); +template void PointMovementGenerator<Creature>::DoInitialize(Creature&); +template void PointMovementGenerator<Player>::DoFinalize(Player&); +template void PointMovementGenerator<Creature>::DoFinalize(Creature&); +template void PointMovementGenerator<Player>::DoReset(Player&); +template void PointMovementGenerator<Creature>::DoReset(Creature&); +template bool PointMovementGenerator<Player>::DoUpdate(Player &, const uint32 &); +template bool PointMovementGenerator<Creature>::DoUpdate(Creature&, const uint32 &); void AssistanceMovementGenerator::Finalize(Unit &unit) { diff --git a/src/server/game/Movement/MovementGenerators/PointMovementGenerator.h b/src/server/game/Movement/MovementGenerators/PointMovementGenerator.h index d2833a5ee10..62ffb931e6d 100755 --- a/src/server/game/Movement/MovementGenerators/PointMovementGenerator.h +++ b/src/server/game/Movement/MovementGenerators/PointMovementGenerator.h @@ -29,10 +29,10 @@ class PointMovementGenerator : public MovementGeneratorMedium< T, PointMovementG PointMovementGenerator(uint32 _id, float _x, float _y, float _z, float _speed = 0.0f) : id(_id), i_x(_x), i_y(_y), i_z(_z), speed(_speed) {} - void Initialize(T &); - void Finalize(T &); - void Reset(T &); - bool Update(T &, const uint32 &); + void DoInitialize(T &); + void DoFinalize(T &); + void DoReset(T &); + bool DoUpdate(T &, const uint32 &); void MovementInform(T &); diff --git a/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp index 72725570826..4d74ba20d96 100755 --- a/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp @@ -114,7 +114,7 @@ void RandomMovementGenerator<Creature>::_setRandomLocation(Creature& creature) } template<> -void RandomMovementGenerator<Creature>::Initialize(Creature &creature) +void RandomMovementGenerator<Creature>::DoInitialize(Creature &creature) { if (!creature.isAlive()) return; @@ -127,20 +127,20 @@ void RandomMovementGenerator<Creature>::Initialize(Creature &creature) } template<> -void RandomMovementGenerator<Creature>::Reset(Creature &creature) +void RandomMovementGenerator<Creature>::DoReset(Creature &creature) { - Initialize(creature); + DoInitialize(creature); } template<> -void RandomMovementGenerator<Creature>::Finalize(Creature &creature) +void RandomMovementGenerator<Creature>::DoFinalize(Creature &creature) { creature.ClearUnitState(UNIT_STATE_ROAMING|UNIT_STATE_ROAMING_MOVE); creature.SetWalk(false); } template<> -bool RandomMovementGenerator<Creature>::Update(Creature &creature, const uint32 diff) +bool RandomMovementGenerator<Creature>::DoUpdate(Creature &creature, const uint32 diff) { if (creature.HasUnitState(UNIT_STATE_ROOT | UNIT_STATE_STUNNED | UNIT_STATE_DISTRACTED)) { diff --git a/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.h b/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.h index 07ec3647052..449b2686a2d 100755 --- a/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.h +++ b/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.h @@ -28,10 +28,10 @@ class RandomMovementGenerator : public MovementGeneratorMedium< T, RandomMovemen RandomMovementGenerator(float spawn_dist = 0.0f) : i_nextMoveTime(0), wander_distance(spawn_dist) {} void _setRandomLocation(T &); - void Initialize(T &); - void Finalize(T &); - void Reset(T &); - bool Update(T &, const uint32); + void DoInitialize(T &); + void DoFinalize(T &); + void DoReset(T &); + bool DoUpdate(T &, const uint32); bool GetResetPosition(T&, float& x, float& y, float& z); MovementGeneratorType GetMovementGeneratorType() { return RANDOM_MOTION_TYPE; } private: diff --git a/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp index fdff5a92564..7e74907040f 100755 --- a/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp @@ -120,7 +120,7 @@ void TargetedMovementGeneratorMedium<Creature,FollowMovementGenerator<Creature> } template<class T, typename D> -bool TargetedMovementGeneratorMedium<T,D>::Update(T &owner, const uint32 & time_diff) +bool TargetedMovementGeneratorMedium<T,D>::DoUpdate(T &owner, const uint32 & time_diff) { if (!i_target.isValid() || !i_target->IsInWorld()) return false; @@ -189,14 +189,14 @@ void ChaseMovementGenerator<T>::_reachTarget(T &owner) } template<> -void ChaseMovementGenerator<Player>::Initialize(Player &owner) +void ChaseMovementGenerator<Player>::DoInitialize(Player &owner) { owner.AddUnitState(UNIT_STATE_CHASE|UNIT_STATE_CHASE_MOVE); _setTargetLocation(owner); } template<> -void ChaseMovementGenerator<Creature>::Initialize(Creature &owner) +void ChaseMovementGenerator<Creature>::DoInitialize(Creature &owner) { owner.SetWalk(false); owner.AddUnitState(UNIT_STATE_CHASE|UNIT_STATE_CHASE_MOVE); @@ -204,15 +204,15 @@ void ChaseMovementGenerator<Creature>::Initialize(Creature &owner) } template<class T> -void ChaseMovementGenerator<T>::Finalize(T &owner) +void ChaseMovementGenerator<T>::DoFinalize(T &owner) { owner.ClearUnitState(UNIT_STATE_CHASE|UNIT_STATE_CHASE_MOVE); } template<class T> -void ChaseMovementGenerator<T>::Reset(T &owner) +void ChaseMovementGenerator<T>::DoReset(T &owner) { - Initialize(owner); + DoInitialize(owner); } template<class T> @@ -260,7 +260,7 @@ void FollowMovementGenerator<Creature>::_updateSpeed(Creature &u) } template<> -void FollowMovementGenerator<Player>::Initialize(Player &owner) +void FollowMovementGenerator<Player>::DoInitialize(Player &owner) { owner.AddUnitState(UNIT_STATE_FOLLOW|UNIT_STATE_FOLLOW_MOVE); _updateSpeed(owner); @@ -268,7 +268,7 @@ void FollowMovementGenerator<Player>::Initialize(Player &owner) } template<> -void FollowMovementGenerator<Creature>::Initialize(Creature &owner) +void FollowMovementGenerator<Creature>::DoInitialize(Creature &owner) { owner.AddUnitState(UNIT_STATE_FOLLOW|UNIT_STATE_FOLLOW_MOVE); _updateSpeed(owner); @@ -276,16 +276,16 @@ void FollowMovementGenerator<Creature>::Initialize(Creature &owner) } template<class T> -void FollowMovementGenerator<T>::Finalize(T &owner) +void FollowMovementGenerator<T>::DoFinalize(T &owner) { owner.ClearUnitState(UNIT_STATE_FOLLOW|UNIT_STATE_FOLLOW_MOVE); _updateSpeed(owner); } template<class T> -void FollowMovementGenerator<T>::Reset(T &owner) +void FollowMovementGenerator<T>::DoReset(T &owner) { - Initialize(owner); + DoInitialize(owner); } template<class T> @@ -306,21 +306,21 @@ template void TargetedMovementGeneratorMedium<Player,ChaseMovementGenerator<Play template void TargetedMovementGeneratorMedium<Player,FollowMovementGenerator<Player> >::_setTargetLocation(Player &); template void TargetedMovementGeneratorMedium<Creature,ChaseMovementGenerator<Creature> >::_setTargetLocation(Creature &); template void TargetedMovementGeneratorMedium<Creature,FollowMovementGenerator<Creature> >::_setTargetLocation(Creature &); -template bool TargetedMovementGeneratorMedium<Player,ChaseMovementGenerator<Player> >::Update(Player &, const uint32 &); -template bool TargetedMovementGeneratorMedium<Player,FollowMovementGenerator<Player> >::Update(Player &, const uint32 &); -template bool TargetedMovementGeneratorMedium<Creature,ChaseMovementGenerator<Creature> >::Update(Creature &, const uint32 &); -template bool TargetedMovementGeneratorMedium<Creature,FollowMovementGenerator<Creature> >::Update(Creature &, const uint32 &); +template bool TargetedMovementGeneratorMedium<Player,ChaseMovementGenerator<Player> >::DoUpdate(Player &, const uint32 &); +template bool TargetedMovementGeneratorMedium<Player,FollowMovementGenerator<Player> >::DoUpdate(Player &, const uint32 &); +template bool TargetedMovementGeneratorMedium<Creature,ChaseMovementGenerator<Creature> >::DoUpdate(Creature &, const uint32 &); +template bool TargetedMovementGeneratorMedium<Creature,FollowMovementGenerator<Creature> >::DoUpdate(Creature &, const uint32 &); template void ChaseMovementGenerator<Player>::_reachTarget(Player &); template void ChaseMovementGenerator<Creature>::_reachTarget(Creature &); -template void ChaseMovementGenerator<Player>::Finalize(Player &); -template void ChaseMovementGenerator<Creature>::Finalize(Creature &); -template void ChaseMovementGenerator<Player>::Reset(Player &); -template void ChaseMovementGenerator<Creature>::Reset(Creature &); +template void ChaseMovementGenerator<Player>::DoFinalize(Player &); +template void ChaseMovementGenerator<Creature>::DoFinalize(Creature &); +template void ChaseMovementGenerator<Player>::DoReset(Player &); +template void ChaseMovementGenerator<Creature>::DoReset(Creature &); template void ChaseMovementGenerator<Player>::MovementInform(Player &unit); -template void FollowMovementGenerator<Player>::Finalize(Player &); -template void FollowMovementGenerator<Creature>::Finalize(Creature &); -template void FollowMovementGenerator<Player>::Reset(Player &); -template void FollowMovementGenerator<Creature>::Reset(Creature &); +template void FollowMovementGenerator<Player>::DoFinalize(Player &); +template void FollowMovementGenerator<Creature>::DoFinalize(Creature &); +template void FollowMovementGenerator<Player>::DoReset(Player &); +template void FollowMovementGenerator<Creature>::DoReset(Creature &); template void FollowMovementGenerator<Player>::MovementInform(Player &unit); diff --git a/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.h b/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.h index 29fd73624e1..94b4078efbd 100755 --- a/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.h +++ b/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.h @@ -46,7 +46,7 @@ class TargetedMovementGeneratorMedium : public MovementGeneratorMedium< T, D >, ~TargetedMovementGeneratorMedium() {} public: - bool Update(T &, const uint32 &); + bool DoUpdate(T &, const uint32 &); Unit* GetTarget() const { return i_target.getTarget(); } void unitSpeedChanged() { i_recalculateTravel=true; } @@ -74,9 +74,9 @@ class ChaseMovementGenerator : public TargetedMovementGeneratorMedium<T, ChaseMo MovementGeneratorType GetMovementGeneratorType() { return CHASE_MOTION_TYPE; } - void Initialize(T &); - void Finalize(T &); - void Reset(T &); + void DoInitialize(T &); + void DoFinalize(T &); + void DoReset(T &); void MovementInform(T &); static void _clearUnitStateMove(T &u) { u.ClearUnitState(UNIT_STATE_CHASE_MOVE); } @@ -98,9 +98,9 @@ class FollowMovementGenerator : public TargetedMovementGeneratorMedium<T, Follow MovementGeneratorType GetMovementGeneratorType() { return FOLLOW_MOTION_TYPE; } - void Initialize(T &); - void Finalize(T &); - void Reset(T &); + void DoInitialize(T &); + void DoFinalize(T &); + void DoReset(T &); void MovementInform(T &); static void _clearUnitStateMove(T &u) { u.ClearUnitState(UNIT_STATE_FOLLOW_MOVE); } diff --git a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp index 37a1fa84d80..5a65e6e3493 100755 --- a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp @@ -48,19 +48,19 @@ void WaypointMovementGenerator<Creature>::LoadPath(Creature &creature) StartMoveNow(creature); } -void WaypointMovementGenerator<Creature>::Initialize(Creature &creature) +void WaypointMovementGenerator<Creature>::DoInitialize(Creature &creature) { LoadPath(creature); creature.AddUnitState(UNIT_STATE_ROAMING|UNIT_STATE_ROAMING_MOVE); } -void WaypointMovementGenerator<Creature>::Finalize(Creature &creature) +void WaypointMovementGenerator<Creature>::DoFinalize(Creature &creature) { creature.ClearUnitState(UNIT_STATE_ROAMING|UNIT_STATE_ROAMING_MOVE); creature.SetWalk(false); } -void WaypointMovementGenerator<Creature>::Reset(Creature &creature) +void WaypointMovementGenerator<Creature>::DoReset(Creature &creature) { creature.AddUnitState(UNIT_STATE_ROAMING|UNIT_STATE_ROAMING_MOVE); StartMoveNow(creature); @@ -130,7 +130,7 @@ bool WaypointMovementGenerator<Creature>::StartMove(Creature &creature) return true; } -bool WaypointMovementGenerator<Creature>::Update(Creature &creature, const uint32 &diff) +bool WaypointMovementGenerator<Creature>::DoUpdate(Creature &creature, const uint32 &diff) { // Waypoint movement can be switched on/off // This is quite handy for escort quests and other stuff @@ -196,13 +196,13 @@ uint32 FlightPathMovementGenerator::GetPathAtMapEnd() const return i_path->size(); } -void FlightPathMovementGenerator::Initialize(Player &player) +void FlightPathMovementGenerator::DoInitialize(Player &player) { - Reset(player); + DoReset(player); InitEndGridInfo(); } -void FlightPathMovementGenerator::Finalize(Player& player) +void FlightPathMovementGenerator::DoFinalize(Player& player) { // remove flag to prevent send object build movement packets for flight state and crash (movement generator already not at top of stack) player.ClearUnitState(UNIT_STATE_IN_FLIGHT); @@ -222,7 +222,7 @@ void FlightPathMovementGenerator::Finalize(Player& player) #define PLAYER_FLIGHT_SPEED 32.0f -void FlightPathMovementGenerator::Reset(Player & player) +void FlightPathMovementGenerator::DoReset(Player & player) { player.getHostileRefManager().setOnlineOfflineState(false); player.AddUnitState(UNIT_STATE_IN_FLIGHT); @@ -241,7 +241,7 @@ void FlightPathMovementGenerator::Reset(Player & player) init.Launch(); } -bool FlightPathMovementGenerator::Update(Player &player, const uint32& /*diff*/) +bool FlightPathMovementGenerator::DoUpdate(Player &player, const uint32& /*diff*/) { uint32 pointId = (uint32)player.movespline->currentPathIdx(); if (pointId > i_currentNode) diff --git a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.h b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.h index 0d8f047c83a..bb6381da2f0 100755 --- a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.h +++ b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.h @@ -65,10 +65,10 @@ class WaypointMovementGenerator<Creature> : public MovementGeneratorMedium< Crea WaypointMovementGenerator(uint32 _path_id = 0, bool _repeating = true) : i_nextMoveTime(0), m_isArrivalDone(false), path_id(_path_id), repeating(_repeating) {} ~WaypointMovementGenerator() { i_path = NULL; } - void Initialize(Creature &); - void Finalize(Creature &); - void Reset(Creature &); - bool Update(Creature &, const uint32 &diff); + void DoInitialize(Creature &); + void DoFinalize(Creature &); + void DoReset(Creature &); + bool DoUpdate(Creature &, const uint32 &diff); void MovementInform(Creature &); @@ -118,10 +118,10 @@ class FlightPathMovementGenerator : public MovementGeneratorMedium< Player, Flig i_path = &pathnodes; i_currentNode = startNode; } - void Initialize(Player &); - void Reset(Player &); - void Finalize(Player &); - bool Update(Player &, const uint32&); + void DoInitialize(Player &); + void DoReset(Player &); + void DoFinalize(Player &); + bool DoUpdate(Player &, const uint32&); MovementGeneratorType GetMovementGeneratorType() { return FLIGHT_MOTION_TYPE; } TaxiPathNodeList const& GetPath() { return *i_path; } diff --git a/src/server/game/Movement/Spline/MoveSpline.cpp b/src/server/game/Movement/Spline/MoveSpline.cpp index 7160f64c0fb..1821a78d993 100644 --- a/src/server/game/Movement/Spline/MoveSpline.cpp +++ b/src/server/game/Movement/Spline/MoveSpline.cpp @@ -201,7 +201,7 @@ bool MoveSplineInitArgs::Validate(Unit* unit) const #define CHECK(exp) \ if (!(exp))\ {\ - sLog->outError(LOG_FILTER_GENERAL, "MoveSplineInitArgs::Validate: expression '%s' failed for GUID: %u", #exp, unit->GetTypeId() == TYPEID_PLAYER ? unit->GetGUIDLow() : unit->ToCreature()->GetDBTableGUIDLow());\ + sLog->outError(LOG_FILTER_GENERAL, "MoveSplineInitArgs::Validate: expression '%s' failed for GUID: %u Entry: %u", #exp, unit->GetTypeId() == TYPEID_PLAYER ? unit->GetGUIDLow() : unit->ToCreature()->GetDBTableGUIDLow(), unit->GetEntry());\ return false;\ } CHECK(path.size() > 1); diff --git a/src/server/game/Scripting/ScriptMgr.cpp b/src/server/game/Scripting/ScriptMgr.cpp index 47ce6c17b28..d1e7f87ccff 100755 --- a/src/server/game/Scripting/ScriptMgr.cpp +++ b/src/server/game/Scripting/ScriptMgr.cpp @@ -30,6 +30,7 @@ #include "SpellScript.h" #include "GossipDef.h" #include "CreatureAI.h" +#include "Player.h" // This is the global static registry of scripts. template<class TScript> diff --git a/src/server/game/Scripting/ScriptMgr.h b/src/server/game/Scripting/ScriptMgr.h index 270182509f9..0f16c648b20 100755 --- a/src/server/game/Scripting/ScriptMgr.h +++ b/src/server/game/Scripting/ScriptMgr.h @@ -24,7 +24,6 @@ #include <ace/Atomic_Op.h> #include "DBCStores.h" -#include "Player.h" #include "SharedDefines.h" #include "World.h" #include "Weather.h" diff --git a/src/server/game/Server/WorldSession.h b/src/server/game/Server/WorldSession.h index 7d5dba847d4..1158559f315 100755 --- a/src/server/game/Server/WorldSession.h +++ b/src/server/game/Server/WorldSession.h @@ -750,7 +750,7 @@ class WorldSession //Pet void HandlePetAction(WorldPacket& recvData); void HandlePetStopAttack(WorldPacket& recvData); - void HandlePetActionHelper(Unit* pet, uint64 guid1, uint16 spellid, uint16 flag, uint64 guid2); + void HandlePetActionHelper(Unit* pet, uint64 guid1, uint32 spellid, uint16 flag, uint64 guid2); void HandlePetNameQuery(WorldPacket& recvData); void HandlePetSetAction(WorldPacket& recvData); void HandlePetAbandon(WorldPacket& recvData); diff --git a/src/server/game/Server/WorldSocket.cpp b/src/server/game/Server/WorldSocket.cpp index ee54c8d662c..3b143c443f3 100755 --- a/src/server/game/Server/WorldSocket.cpp +++ b/src/server/game/Server/WorldSocket.cpp @@ -29,7 +29,7 @@ #include "WorldSocket.h" #include "Common.h" - +#include "Player.h" #include "Util.h" #include "World.h" #include "WorldPacket.h" @@ -857,6 +857,17 @@ int WorldSocket::HandleAuthSession(WorldPacket& recvPacket) uint32 recruiter = fields[9].GetUInt32(); std::string os = fields[10].GetString(); + // Must be done before WorldSession is created + if (sWorld->getBoolConfig(CONFIG_WARDEN_ENABLED) && os != "Win" && os != "OSX") + { + packet.Initialize(SMSG_AUTH_RESPONSE, 1); + packet << uint8(AUTH_REJECT); + SendPacket(packet); + + sLog->outError(LOG_FILTER_NETWORKIO, "WorldSocket::HandleAuthSession: Client %s attempted to log in using invalid client OS (%s).", GetRemoteAddress().c_str(), os.c_str()); + return -1; + } + // Checks gmlevel per Realm stmt = LoginDatabase.GetPreparedStatement(LOGIN_GET_GMLEVEL_BY_REALMID); diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 86fc27af1f2..b27ae461323 100755 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -5436,6 +5436,9 @@ SpellCastResult Spell::CheckCast(bool strict) if (target->GetCharmerGUID()) return SPELL_FAILED_CHARMED; + + if (target->GetOwner() && target->GetOwner()->GetTypeId() == TYPEID_PLAYER) + return SPELL_FAILED_TARGET_IS_PLAYER_CONTROLLED; int32 damage = CalculateDamage(i, target); if (damage && int32(target->getLevel()) > damage) diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp index 27b4f22bbcf..be4c522956c 100644 --- a/src/server/game/Spells/SpellInfo.cpp +++ b/src/server/game/Spells/SpellInfo.cpp @@ -21,6 +21,8 @@ #include "Spell.h" #include "DBCStores.h" #include "ConditionMgr.h" +#include "Player.h" +#include "Battleground.h" uint32 GetTargetFlagMask(SpellTargetObjectTypes objType) { diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index 4ffbab6cb63..f3317f3a424 100755 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -32,6 +32,7 @@ #include "BattlegroundIC.h" #include "BattlefieldWG.h" #include "BattlefieldMgr.h" +#include "Player.h" bool IsPrimaryProfessionSkill(uint32 skill) { @@ -373,7 +374,7 @@ bool SpellMgr::IsSpellValid(SpellInfo const* spellInfo, Player* player, bool msg if (msg) { if (player) - ChatHandler(player).PSendSysMessage("Craft spell %u not have create item entry.", spellInfo->Id); + ChatHandler(player->GetSession()).PSendSysMessage("Craft spell %u not have create item entry.", spellInfo->Id); else sLog->outError(LOG_FILTER_SQL, "Craft spell %u not have create item entry.", spellInfo->Id); } @@ -387,7 +388,7 @@ bool SpellMgr::IsSpellValid(SpellInfo const* spellInfo, Player* player, bool msg if (msg) { if (player) - ChatHandler(player).PSendSysMessage("Craft spell %u create not-exist in DB item (Entry: %u) and then...", spellInfo->Id, spellInfo->Effects[i].ItemType); + ChatHandler(player->GetSession()).PSendSysMessage("Craft spell %u create not-exist in DB item (Entry: %u) and then...", spellInfo->Id, spellInfo->Effects[i].ItemType); else sLog->outError(LOG_FILTER_SQL, "Craft spell %u create not-exist in DB item (Entry: %u) and then...", spellInfo->Id, spellInfo->Effects[i].ItemType); } @@ -405,7 +406,7 @@ bool SpellMgr::IsSpellValid(SpellInfo const* spellInfo, Player* player, bool msg if (msg) { if (player) - ChatHandler(player).PSendSysMessage("Spell %u learn to broken spell %u, and then...", spellInfo->Id, spellInfo->Effects[i].TriggerSpell); + ChatHandler(player->GetSession()).PSendSysMessage("Spell %u learn to broken spell %u, and then...", spellInfo->Id, spellInfo->Effects[i].TriggerSpell); else sLog->outError(LOG_FILTER_SQL, "Spell %u learn to invalid spell %u, and then...", spellInfo->Id, spellInfo->Effects[i].TriggerSpell); } @@ -425,7 +426,7 @@ bool SpellMgr::IsSpellValid(SpellInfo const* spellInfo, Player* player, bool msg if (msg) { if (player) - ChatHandler(player).PSendSysMessage("Craft spell %u have not-exist reagent in DB item (Entry: %u) and then...", spellInfo->Id, spellInfo->Reagent[j]); + ChatHandler(player->GetSession()).PSendSysMessage("Craft spell %u have not-exist reagent in DB item (Entry: %u) and then...", spellInfo->Id, spellInfo->Reagent[j]); else sLog->outError(LOG_FILTER_SQL, "Craft spell %u have not-exist reagent in DB item (Entry: %u) and then...", spellInfo->Id, spellInfo->Reagent[j]); } diff --git a/src/server/game/Texts/CreatureTextMgr.cpp b/src/server/game/Texts/CreatureTextMgr.cpp index 5c2639175d2..89b75fd1695 100755 --- a/src/server/game/Texts/CreatureTextMgr.cpp +++ b/src/server/game/Texts/CreatureTextMgr.cpp @@ -65,6 +65,47 @@ class CreatureTextBuilder uint64 _targetGUID; }; +class PlayerTextBuilder +{ + public: + PlayerTextBuilder(WorldObject* obj, WorldObject* speaker, ChatMsg msgtype, uint8 textGroup, uint32 id, uint32 language, uint64 targetGUID) + : _source(obj), _talker(speaker), _msgType(msgtype), _textGroup(textGroup), _textId(id), _language(language), _targetGUID(targetGUID) + { + } + + size_t operator()(WorldPacket* data, LocaleConstant locale) const + { + std::string const& text = sCreatureTextMgr->GetLocalizedChatString(_source->GetEntry(), _textGroup, _textId, locale); + + *data << uint8(_msgType); + *data << uint32(_language); + *data << uint64(_talker->GetGUID()); + *data << uint32(1); // 2.1.0 + *data << uint32(_talker->GetName().size() + 1); + *data << _talker->GetName(); + size_t whisperGUIDpos = data->wpos(); + *data << uint64(_targetGUID); // Unit Target + if (_targetGUID && !IS_PLAYER_GUID(_targetGUID)) + { + *data << uint32(1); // target name length + *data << uint8(0); // target name + } + *data << uint32(text.length() + 1); + *data << text; + *data << uint8(0); // ChatTag + + return whisperGUIDpos; + } + + WorldObject* _source; + WorldObject* _talker; + ChatMsg _msgType; + uint8 _textGroup; + uint32 _textId; + uint32 _language; + uint64 _targetGUID; +}; + void CreatureTextMgr::LoadCreatureTexts() { uint32 oldMSTime = getMSTime(); @@ -170,7 +211,7 @@ void CreatureTextMgr::LoadCreatureTextLocales() } -uint32 CreatureTextMgr::SendChat(Creature* source, uint8 textGroup, uint64 whisperGuid /*= 0*/, ChatMsg msgType /*= CHAT_MSG_ADDON*/, Language language /*= LANG_ADDON*/, TextRange range /*= TEXT_RANGE_NORMAL*/, uint32 sound /*= 0*/, Team team /*= TEAM_OTHER*/, bool gmOnly /*= false*/, Player* srcPlr /*= NULL*/) +uint32 CreatureTextMgr::SendChat(Creature* source, uint8 textGroup, uint64 whisperGuid /*= 0*/, ChatMsg msgType /*= CHAT_MSG_ADDON*/, Language language /*= LANG_ADDON*/, CreatureTextRange range /*= TEXT_RANGE_NORMAL*/, uint32 sound /*= 0*/, Team team /*= TEAM_OTHER*/, bool gmOnly /*= false*/, Player* srcPlr /*= NULL*/) { if (!source) return 0; @@ -261,8 +302,16 @@ uint32 CreatureTextMgr::SendChat(Creature* source, uint8 textGroup, uint64 whisp if (iter->emote) SendEmote(finalSource, iter->emote); - CreatureTextBuilder builder(finalSource, finalType, iter->group, iter->id, finalLang, whisperGuid); - SendChatPacket(finalSource, builder, finalType, whisperGuid, range, team, gmOnly); + if (srcPlr) + { + PlayerTextBuilder builder(source, finalSource, finalType, iter->group, iter->id, finalLang, whisperGuid); + SendChatPacket(finalSource, builder, finalType, whisperGuid, range, team, gmOnly); + } + else + { + CreatureTextBuilder builder(finalSource, finalType, iter->group, iter->id, finalLang, whisperGuid); + SendChatPacket(finalSource, builder, finalType, whisperGuid, range, team, gmOnly); + } if (isEqualChanced || (!isEqualChanced && totalChance == 100.0f)) SetRepeatId(source, textGroup, iter->id); @@ -288,7 +337,7 @@ float CreatureTextMgr::GetRangeForChatType(ChatMsg msgType) const return dist; } -void CreatureTextMgr::SendSound(Creature* source, uint32 sound, ChatMsg msgType, uint64 whisperGuid, TextRange range, Team team, bool gmOnly) +void CreatureTextMgr::SendSound(Creature* source, uint32 sound, ChatMsg msgType, uint64 whisperGuid, CreatureTextRange range, Team team, bool gmOnly) { if (!sound || !source) return; @@ -298,7 +347,7 @@ void CreatureTextMgr::SendSound(Creature* source, uint32 sound, ChatMsg msgType, SendNonChatPacket(source, &data, msgType, whisperGuid, range, team, gmOnly); } -void CreatureTextMgr::SendNonChatPacket(WorldObject* source, WorldPacket* data, ChatMsg msgType, uint64 whisperGuid, TextRange range, Team team, bool gmOnly) const +void CreatureTextMgr::SendNonChatPacket(WorldObject* source, WorldPacket* data, ChatMsg msgType, uint64 whisperGuid, CreatureTextRange range, Team team, bool gmOnly) const { float dist = GetRangeForChatType(msgType); diff --git a/src/server/game/Texts/CreatureTextMgr.h b/src/server/game/Texts/CreatureTextMgr.h index 8ed0b01fcd5..a86a1059e7d 100755 --- a/src/server/game/Texts/CreatureTextMgr.h +++ b/src/server/game/Texts/CreatureTextMgr.h @@ -37,7 +37,7 @@ struct CreatureTextEntry uint32 sound; }; -enum TextRange +enum CreatureTextRange { TEXT_RANGE_NORMAL = 0, TEXT_RANGE_AREA = 1, @@ -89,21 +89,21 @@ class CreatureTextMgr void LoadCreatureTextLocales(); CreatureTextMap const& GetTextMap() const { return mTextMap; } - void SendSound(Creature* source, uint32 sound, ChatMsg msgType, uint64 whisperGuid, TextRange range, Team team, bool gmOnly); + void SendSound(Creature* source, uint32 sound, ChatMsg msgType, uint64 whisperGuid, CreatureTextRange range, Team team, bool gmOnly); void SendEmote(Unit* source, uint32 emote); //if sent, returns the 'duration' of the text else 0 if error - uint32 SendChat(Creature* source, uint8 textGroup, uint64 whisperGuid = 0, ChatMsg msgType = CHAT_MSG_ADDON, Language language = LANG_ADDON, TextRange range = TEXT_RANGE_NORMAL, uint32 sound = 0, Team team = TEAM_OTHER, bool gmOnly = false, Player* srcPlr = NULL); + uint32 SendChat(Creature* source, uint8 textGroup, uint64 whisperGuid = 0, ChatMsg msgType = CHAT_MSG_ADDON, Language language = LANG_ADDON, CreatureTextRange range = TEXT_RANGE_NORMAL, uint32 sound = 0, Team team = TEAM_OTHER, bool gmOnly = false, Player* srcPlr = NULL); bool TextExist(uint32 sourceEntry, uint8 textGroup); std::string GetLocalizedChatString(uint32 entry, uint8 textGroup, uint32 id, LocaleConstant locale) const; template<class Builder> - void SendChatPacket(WorldObject* source, Builder const& builder, ChatMsg msgType, uint64 whisperGuid = 0, TextRange range = TEXT_RANGE_NORMAL, Team team = TEAM_OTHER, bool gmOnly = false) const; + void SendChatPacket(WorldObject* source, Builder const& builder, ChatMsg msgType, uint64 whisperGuid = 0, CreatureTextRange range = TEXT_RANGE_NORMAL, Team team = TEAM_OTHER, bool gmOnly = false) const; private: CreatureTextRepeatIds GetRepeatGroup(Creature* source, uint8 textGroup); void SetRepeatId(Creature* source, uint8 textGroup, uint8 id); - void SendNonChatPacket(WorldObject* source, WorldPacket* data, ChatMsg msgType, uint64 whisperGuid, TextRange range, Team team, bool gmOnly) const; + void SendNonChatPacket(WorldObject* source, WorldPacket* data, ChatMsg msgType, uint64 whisperGuid, CreatureTextRange range, Team team, bool gmOnly) const; float GetRangeForChatType(ChatMsg msgType) const; CreatureTextMap mTextMap; @@ -172,7 +172,7 @@ class CreatureTextLocalizer }; template<class Builder> -void CreatureTextMgr::SendChatPacket(WorldObject* source, Builder const& builder, ChatMsg msgType, uint64 whisperGuid, TextRange range, Team team, bool gmOnly) const +void CreatureTextMgr::SendChatPacket(WorldObject* source, Builder const& builder, ChatMsg msgType, uint64 whisperGuid, CreatureTextRange range, Team team, bool gmOnly) const { if (!source) return; diff --git a/src/server/game/Tickets/TicketMgr.cpp b/src/server/game/Tickets/TicketMgr.cpp index 51e17cb9076..5667b31048e 100755 --- a/src/server/game/Tickets/TicketMgr.cpp +++ b/src/server/game/Tickets/TicketMgr.cpp @@ -24,6 +24,7 @@ #include "WorldSession.h" #include "Chat.h" #include "World.h" +#include "Player.h" inline float GetAge(uint64 t) { return float(time(NULL) - t) / DAY; } diff --git a/src/server/game/Warden/Warden.cpp b/src/server/game/Warden/Warden.cpp index ce64dbd1a94..06f8454fda7 100644 --- a/src/server/game/Warden/Warden.cpp +++ b/src/server/game/Warden/Warden.cpp @@ -151,13 +151,28 @@ bool Warden::IsValidCheckSum(uint32 checksum, const uint8* data, const uint16 le } } +struct keyData { + union + { + struct + { + uint8 bytes[20]; + } bytes; + + struct + { + uint32 ints[5]; + } ints; + }; +}; + uint32 Warden::BuildChecksum(const uint8* data, uint32 length) { - uint8 hash[20]; - SHA1(data, length, hash); + keyData hash; + SHA1(data, length, hash.bytes.bytes); uint32 checkSum = 0; for (uint8 i = 0; i < 5; ++i) - checkSum = checkSum ^ *(uint32*)(&hash[0] + i * 4); + checkSum = checkSum ^ hash.ints.ints[i]; return checkSum; } diff --git a/src/server/game/Warden/WardenMac.cpp b/src/server/game/Warden/WardenMac.cpp index e08d24ecbcd..c6ce33fe131 100644 --- a/src/server/game/Warden/WardenMac.cpp +++ b/src/server/game/Warden/WardenMac.cpp @@ -114,17 +114,32 @@ void WardenMac::RequestHash() _session->SendPacket(&pkt); } +struct keyData { + union + { + struct + { + uint8 bytes[16]; + } bytes; + + struct + { + int ints[4]; + } ints; + }; +}; + void WardenMac::HandleHashResult(ByteBuffer &buff) { // test int keyIn[4]; - uint8 mod_seed[16] = { 0x4D, 0x80, 0x8D, 0x2C, 0x77, 0xD9, 0x05, 0xC4, 0x1A, 0x63, 0x80, 0xEC, 0x08, 0x58, 0x6A, 0xFE }; + keyData mod_seed = { { { { 0x4D, 0x80, 0x8D, 0x2C, 0x77, 0xD9, 0x05, 0xC4, 0x1A, 0x63, 0x80, 0xEC, 0x08, 0x58, 0x6A, 0xFE } } } }; for (int i = 0; i < 4; ++i) { - keyIn[i] = *(int*)(&mod_seed[0] + i * 4); + keyIn[i] = mod_seed.ints.ints[i]; } int keyOut[4]; diff --git a/src/server/game/Weather/WeatherMgr.cpp b/src/server/game/Weather/WeatherMgr.cpp index da62122d7a3..3371691fa41 100755 --- a/src/server/game/Weather/WeatherMgr.cpp +++ b/src/server/game/Weather/WeatherMgr.cpp @@ -25,6 +25,7 @@ #include "Log.h" #include "ObjectMgr.h" #include "AutoPtr.h" +#include "Player.h" namespace WeatherMgr { diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp index 2e5c7b19800..5a776126d33 100755 --- a/src/server/game/World/World.cpp +++ b/src/server/game/World/World.cpp @@ -1660,9 +1660,6 @@ void World::SetInitialWorldSettings() sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading CreatureEventAI Texts..."); sEventAIMgr->LoadCreatureEventAI_Texts(); - sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading CreatureEventAI Summons..."); - sEventAIMgr->LoadCreatureEventAI_Summons(); - sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading CreatureEventAI Scripts..."); sEventAIMgr->LoadCreatureEventAI_Scripts(); diff --git a/src/server/scripts/CMakeLists.txt b/src/server/scripts/CMakeLists.txt index 59dfc0f990f..8e636ee1208 100644 --- a/src/server/scripts/CMakeLists.txt +++ b/src/server/scripts/CMakeLists.txt @@ -9,18 +9,11 @@ # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # Enable precompiled headers when using the GCC compiler. -if( USE_SCRIPTPCH ) - include_directories( - ${CMAKE_CURRENT_BINARY_DIR} - ) -endif() -if( USE_SCRIPTPCH AND MSVC ) - set(scripts_STAT_SRCS - PrecompiledHeaders/ScriptPCH.cpp - PrecompiledHeaders/ScriptPCH.h - ) -endif() +if (USE_SCRIPTPCH) + set(scripts_STAT_PCH_HDR PrecompiledHeaders/ScriptPCH.h) + set(scripts_STAT_PCH_SRC PrecompiledHeaders/ScriptPCH.cpp) +endif () message(STATUS "SCRIPT PREPARATIONS") include(Spells/CMakeLists.txt) @@ -148,15 +141,14 @@ include_directories( ${MYSQL_INCLUDE_DIR} ) -add_library(scripts STATIC ${scripts_STAT_SRCS}) +add_library(scripts STATIC + ${scripts_STAT_SRCS} + ${scripts_STAT_PCH_SRC} +) add_dependencies(scripts revision.h) # Generate precompiled header -if( USE_SCRIPTPCH ) - if(CMAKE_COMPILER_IS_GNUCXX) - add_precompiled_header(scripts ${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders/ScriptPCH.h) - elseif(MSVC) - add_native_precompiled_header(scripts ${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders/ScriptPCH) - endif() +if (USE_SCRIPTPCH) + add_cxx_pch(scripts ${scripts_STAT_PCH_HDR} ${scripts_STAT_PCH_SRC}) endif() diff --git a/src/server/scripts/Commands/cs_account.cpp b/src/server/scripts/Commands/cs_account.cpp index 15a724e69d1..6b6e94f75fb 100644 --- a/src/server/scripts/Commands/cs_account.cpp +++ b/src/server/scripts/Commands/cs_account.cpp @@ -25,6 +25,7 @@ EndScriptData */ #include "ScriptMgr.h" #include "AccountMgr.h" #include "Chat.h" +#include "Player.h" class account_commandscript : public CommandScript { diff --git a/src/server/scripts/Commands/cs_achievement.cpp b/src/server/scripts/Commands/cs_achievement.cpp index 7667e79ece7..1cb9c4829ec 100644 --- a/src/server/scripts/Commands/cs_achievement.cpp +++ b/src/server/scripts/Commands/cs_achievement.cpp @@ -24,6 +24,7 @@ EndScriptData */ #include "ScriptMgr.h" #include "Chat.h" +#include "Player.h" class achievement_commandscript : public CommandScript { diff --git a/src/server/scripts/Commands/cs_ban.cpp b/src/server/scripts/Commands/cs_ban.cpp index bfb52d342e1..af04a3b7989 100644 --- a/src/server/scripts/Commands/cs_ban.cpp +++ b/src/server/scripts/Commands/cs_ban.cpp @@ -27,6 +27,7 @@ EndScriptData */ #include "AccountMgr.h" #include "ObjectAccessor.h" #include "ObjectMgr.h" +#include "Player.h" class ban_commandscript : public CommandScript { diff --git a/src/server/scripts/Commands/cs_cast.cpp b/src/server/scripts/Commands/cs_cast.cpp index 70cfb8cb830..5a45f980c2c 100644 --- a/src/server/scripts/Commands/cs_cast.cpp +++ b/src/server/scripts/Commands/cs_cast.cpp @@ -24,6 +24,7 @@ EndScriptData */ #include "ScriptMgr.h" #include "Chat.h" +#include "Player.h" class cast_commandscript : public CommandScript { diff --git a/src/server/scripts/Commands/cs_character.cpp b/src/server/scripts/Commands/cs_character.cpp index 2202edbe4aa..a352f930410 100644 --- a/src/server/scripts/Commands/cs_character.cpp +++ b/src/server/scripts/Commands/cs_character.cpp @@ -27,6 +27,7 @@ EndScriptData */ #include "AccountMgr.h" #include "ObjectMgr.h" #include "PlayerDump.h" +#include "Player.h" class character_commandscript : public CommandScript { @@ -238,11 +239,11 @@ public: if (handler->needReportToTarget(player)) { if (oldLevel == newLevel) - ChatHandler(player).PSendSysMessage(LANG_YOURS_LEVEL_PROGRESS_RESET, handler->GetNameLink().c_str()); + ChatHandler(player->GetSession()).PSendSysMessage(LANG_YOURS_LEVEL_PROGRESS_RESET, handler->GetNameLink().c_str()); else if (oldLevel < newLevel) - ChatHandler(player).PSendSysMessage(LANG_YOURS_LEVEL_UP, handler->GetNameLink().c_str(), newLevel); + ChatHandler(player->GetSession()).PSendSysMessage(LANG_YOURS_LEVEL_UP, handler->GetNameLink().c_str(), newLevel); else // if (oldlevel > newlevel) - ChatHandler(player).PSendSysMessage(LANG_YOURS_LEVEL_DOWN, handler->GetNameLink().c_str(), newLevel); + ChatHandler(player->GetSession()).PSendSysMessage(LANG_YOURS_LEVEL_DOWN, handler->GetNameLink().c_str(), newLevel); } } else diff --git a/src/server/scripts/Commands/cs_cheat.cpp b/src/server/scripts/Commands/cs_cheat.cpp index 4f503fdbb76..1fe50038d59 100644 --- a/src/server/scripts/Commands/cs_cheat.cpp +++ b/src/server/scripts/Commands/cs_cheat.cpp @@ -25,6 +25,7 @@ EndScriptData */ #include "ScriptMgr.h" #include "ObjectMgr.h" #include "Chat.h" +#include "Player.h" class cheat_commandscript : public CommandScript { @@ -233,7 +234,7 @@ public: chr->SetTaxiCheater(true); handler->PSendSysMessage(LANG_YOU_GIVE_TAXIS, handler->GetNameLink(chr).c_str()); if (handler->needReportToTarget(chr)) - ChatHandler(chr).PSendSysMessage(LANG_YOURS_TAXIS_ADDED, handler->GetNameLink().c_str()); + ChatHandler(chr->GetSession()).PSendSysMessage(LANG_YOURS_TAXIS_ADDED, handler->GetNameLink().c_str()); return true; } @@ -242,7 +243,7 @@ public: chr->SetTaxiCheater(false); handler->PSendSysMessage(LANG_YOU_REMOVE_TAXIS, handler->GetNameLink(chr).c_str()); if (handler->needReportToTarget(chr)) - ChatHandler(chr).PSendSysMessage(LANG_YOURS_TAXIS_REMOVED, handler->GetNameLink().c_str()); + ChatHandler(chr->GetSession()).PSendSysMessage(LANG_YOURS_TAXIS_REMOVED, handler->GetNameLink().c_str()); return true; } @@ -271,13 +272,13 @@ public: { handler->PSendSysMessage(LANG_YOU_SET_EXPLORE_ALL, handler->GetNameLink(chr).c_str()); if (handler->needReportToTarget(chr)) - ChatHandler(chr).PSendSysMessage(LANG_YOURS_EXPLORE_SET_ALL, handler->GetNameLink().c_str()); + ChatHandler(chr->GetSession()).PSendSysMessage(LANG_YOURS_EXPLORE_SET_ALL, handler->GetNameLink().c_str()); } else { handler->PSendSysMessage(LANG_YOU_SET_EXPLORE_NOTHING, handler->GetNameLink(chr).c_str()); if (handler->needReportToTarget(chr)) - ChatHandler(chr).PSendSysMessage(LANG_YOURS_EXPLORE_SET_NOTHING, handler->GetNameLink().c_str()); + ChatHandler(chr->GetSession()).PSendSysMessage(LANG_YOURS_EXPLORE_SET_NOTHING, handler->GetNameLink().c_str()); } for (uint8 i = 0; i < PLAYER_EXPLORED_ZONES_SIZE; ++i) diff --git a/src/server/scripts/Commands/cs_disable.cpp b/src/server/scripts/Commands/cs_disable.cpp index 0bb376b08dd..d9be14f67e4 100644 --- a/src/server/scripts/Commands/cs_disable.cpp +++ b/src/server/scripts/Commands/cs_disable.cpp @@ -27,6 +27,8 @@ EndScriptData */ #include "Chat.h" #include "DisableMgr.h" #include "OutdoorPvP.h" +#include "SpellMgr.h" +#include "Player.h" class disable_commandscript : public CommandScript { diff --git a/src/server/scripts/Commands/cs_event.cpp b/src/server/scripts/Commands/cs_event.cpp index 4f6acd7b629..8d053a2f061 100644 --- a/src/server/scripts/Commands/cs_event.cpp +++ b/src/server/scripts/Commands/cs_event.cpp @@ -25,6 +25,7 @@ EndScriptData */ #include "ScriptMgr.h" #include "GameEventMgr.h" #include "Chat.h" +#include "Player.h" class event_commandscript : public CommandScript { diff --git a/src/server/scripts/Commands/cs_gm.cpp b/src/server/scripts/Commands/cs_gm.cpp index 4c6e36d3f71..520df4b7b85 100644 --- a/src/server/scripts/Commands/cs_gm.cpp +++ b/src/server/scripts/Commands/cs_gm.cpp @@ -27,6 +27,7 @@ EndScriptData */ #include "Chat.h" #include "AccountMgr.h" #include "World.h" +#include "Player.h" class gm_commandscript : public CommandScript { diff --git a/src/server/scripts/Commands/cs_go.cpp b/src/server/scripts/Commands/cs_go.cpp index f7371884da2..82ca77eb65b 100644 --- a/src/server/scripts/Commands/cs_go.cpp +++ b/src/server/scripts/Commands/cs_go.cpp @@ -27,6 +27,7 @@ EndScriptData */ #include "MapManager.h" #include "TicketMgr.h" #include "Chat.h" +#include "Player.h" class go_commandscript : public CommandScript { diff --git a/src/server/scripts/Commands/cs_gobject.cpp b/src/server/scripts/Commands/cs_gobject.cpp index 6803354d29b..7955678b8fd 100644 --- a/src/server/scripts/Commands/cs_gobject.cpp +++ b/src/server/scripts/Commands/cs_gobject.cpp @@ -28,6 +28,7 @@ EndScriptData */ #include "PoolMgr.h" #include "MapManager.h" #include "Chat.h" +#include "Player.h" class gobject_commandscript : public CommandScript { diff --git a/src/server/scripts/Commands/cs_honor.cpp b/src/server/scripts/Commands/cs_honor.cpp index 4edc5f6fea0..76f5badb707 100644 --- a/src/server/scripts/Commands/cs_honor.cpp +++ b/src/server/scripts/Commands/cs_honor.cpp @@ -25,6 +25,7 @@ EndScriptData */ #include "ScriptMgr.h" #include "ObjectMgr.h" #include "Chat.h" +#include "Player.h" class honor_commandscript : public CommandScript { diff --git a/src/server/scripts/Commands/cs_instance.cpp b/src/server/scripts/Commands/cs_instance.cpp index f51727af2ef..ffd8a5a7cf7 100644 --- a/src/server/scripts/Commands/cs_instance.cpp +++ b/src/server/scripts/Commands/cs_instance.cpp @@ -28,6 +28,7 @@ EndScriptData */ #include "InstanceSaveMgr.h" #include "InstanceScript.h" #include "MapManager.h" +#include "Player.h" class instance_commandscript : public CommandScript { diff --git a/src/server/scripts/Commands/cs_learn.cpp b/src/server/scripts/Commands/cs_learn.cpp index cfdfc66f991..786b949b5b4 100644 --- a/src/server/scripts/Commands/cs_learn.cpp +++ b/src/server/scripts/Commands/cs_learn.cpp @@ -27,6 +27,7 @@ EndScriptData */ #include "ObjectMgr.h" #include "SpellMgr.h" #include "SpellInfo.h" +#include "Player.h" class learn_commandscript : public CommandScript { diff --git a/src/server/scripts/Commands/cs_lfg.cpp b/src/server/scripts/Commands/cs_lfg.cpp index 5f1ed59176f..6739694f228 100644 --- a/src/server/scripts/Commands/cs_lfg.cpp +++ b/src/server/scripts/Commands/cs_lfg.cpp @@ -19,6 +19,7 @@ #include "Chat.h" #include "LFGMgr.h" #include "Group.h" +#include "Player.h" void GetPlayerInfo(ChatHandler* handler, Player* player) { diff --git a/src/server/scripts/Commands/cs_list.cpp b/src/server/scripts/Commands/cs_list.cpp index 5c16a0963d3..8d333338be3 100644 --- a/src/server/scripts/Commands/cs_list.cpp +++ b/src/server/scripts/Commands/cs_list.cpp @@ -27,6 +27,7 @@ EndScriptData */ #include "SpellAuraEffects.h" #include "ObjectAccessor.h" #include "ObjectMgr.h" +#include "Player.h" class list_commandscript : public CommandScript { diff --git a/src/server/scripts/Commands/cs_lookup.cpp b/src/server/scripts/Commands/cs_lookup.cpp index 8f7e3ed3247..f07862342fd 100644 --- a/src/server/scripts/Commands/cs_lookup.cpp +++ b/src/server/scripts/Commands/cs_lookup.cpp @@ -28,6 +28,7 @@ EndScriptData */ #include "GameEventMgr.h" #include "ObjectAccessor.h" #include "ObjectMgr.h" +#include "Player.h" class lookup_commandscript : public CommandScript { @@ -1156,109 +1157,72 @@ public: return true; } - static bool HandleLookupMapCommand(ChatHandler* /*handler*/, char const* args) + static bool HandleLookupMapCommand(ChatHandler* handler, char const* args) { if (!*args) return false; - /* + std::string namePart = args; std::wstring wNamePart; - // converting string that we try to find to lower case if (!Utf8toWStr(namePart, wNamePart)) return false; wstrToLower(wNamePart); - bool found = false; + uint32 counter = 0; + uint32 maxResults = sWorld->getIntConfig(CONFIG_MAX_RESULTS_LOOKUP_COMMANDS); + uint8 locale = handler->GetSession() ? handler->GetSession()->GetSessionDbcLocale() : sWorld->GetDefaultDbcLocale(); // search in Map.dbc for (uint32 id = 0; id < sMapStore.GetNumRows(); id++) { - MapEntry const* MapInfo = sMapStore.LookupEntry(id); - if (MapInfo) + if (MapEntry const* mapInfo = sMapStore.LookupEntry(id)) { - uint8 locale = handler->GetSession() ? handler->GetSession()->GetSessionDbcLocale() : sWorld->GetDefaultDbcLocale(); - - std::string name = MapInfo->name[locale]; + std::string name = mapInfo->name[locale]; if (name.empty()) continue; - if (!Utf8FitTo(name, wNamePart)) + if (Utf8FitTo(name, wNamePart) && locale < TOTAL_LOCALES) { - locale = LOCALE_enUS; - for (; locale < TOTAL_LOCALES; locale++) + if (maxResults && counter == maxResults) { - if (handler->GetSession() && locale == handler->GetSession()->GetSessionDbcLocale()) - continue; - - name = MapInfo->name[locale]; - if (name.empty()) - continue; - - if (Utf8FitTo(name, wNamePart)) - break; + handler->PSendSysMessage(LANG_COMMAND_LOOKUP_MAX_RESULTS, maxResults); + return true; } - } - if (locale < TOTAL_LOCALES) - { - // send map in "id - [name][Continent][Instance/Battleground/Arena][Raid reset time:][Heroic reset time:][Mountable]" format std::ostringstream ss; + ss << id << " - [" << name << ']'; - if (handler->GetSession()) - ss << id << " - |cffffffff|Hmap:" << id << "|h[" << name << ']'; - else // console - ss << id << " - [" << name << ']'; - - if (MapInfo->IsContinent()) + if (mapInfo->IsContinent()) ss << handler->GetTrinityString(LANG_CONTINENT); - switch (MapInfo->map_type) + switch (mapInfo->map_type) { - case MAP_INSTANCE: ss << handler->GetTrinityString(LANG_INSTANCE); break; - case MAP_BATTLEGROUND: ss << handler->GetTrinityString(LANG_BATTLEGROUND); break; - case MAP_ARENA: ss << handler->GetTrinityString(LANG_ARENA); break; + case MAP_INSTANCE: + ss << handler->GetTrinityString(LANG_INSTANCE); + break; + case MAP_RAID: + ss << handler->GetTrinityString(LANG_RAID); + break; + case MAP_BATTLEGROUND: + ss << handler->GetTrinityString(LANG_BATTLEGROUND); + break; + case MAP_ARENA: + ss << handler->GetTrinityString(LANG_ARENA); + break; } - if (MapInfo->IsRaid()) - ss << handler->GetTrinityString(LANG_RAID); - - if (MapInfo->SupportsHeroicMode()) - ss << handler->GetTrinityString(LANG_HEROIC); - - uint32 ResetTimeRaid = MapInfo->resetTimeRaid; - - std::string ResetTimeRaidStr; - if (ResetTimeRaid) - ResetTimeRaidStr = secsToTimeString(ResetTimeRaid, true, false); - - uint32 ResetTimeHeroic = MapInfo->resetTimeHeroic; - std::string ResetTimeHeroicStr; - if (ResetTimeHeroic) - ResetTimeHeroicStr = secsToTimeString(ResetTimeHeroic, true, false); - - if (MapInfo->IsMountAllowed()) - ss << handler->GetTrinityString(LANG_MOUNTABLE); - - if (ResetTimeRaid && !ResetTimeHeroic) - handler->PSendSysMessage(ss.str().c_str(), ResetTimeRaidStr.c_str()); - else if (!ResetTimeRaid && ResetTimeHeroic) - handler->PSendSysMessage(ss.str().c_str(), ResetTimeHeroicStr.c_str()); - else if (ResetTimeRaid && ResetTimeHeroic) - handler->PSendSysMessage(ss.str().c_str(), ResetTimeRaidStr.c_str(), ResetTimeHeroicStr.c_str()); - else - handler->SendSysMessage(ss.str().c_str()); + handler->SendSysMessage(ss.str().c_str()); - if (!found) - found = true; + ++counter; } } } - if (!found) + if (!counter) handler->SendSysMessage(LANG_COMMAND_NOMAPFOUND); - */ + return true; } diff --git a/src/server/scripts/Commands/cs_message.cpp b/src/server/scripts/Commands/cs_message.cpp index de2fcf26943..d7c2f6117ac 100644 --- a/src/server/scripts/Commands/cs_message.cpp +++ b/src/server/scripts/Commands/cs_message.cpp @@ -25,6 +25,7 @@ EndScriptData */ #include "ScriptMgr.h" #include "Chat.h" #include "ChannelMgr.h" +#include "Player.h" class message_commandscript : public CommandScript { diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp index 7e460c7482f..1cd78759d60 100644 --- a/src/server/scripts/Commands/cs_misc.cpp +++ b/src/server/scripts/Commands/cs_misc.cpp @@ -29,6 +29,7 @@ #include "TargetedMovementGenerator.h" #include "WeatherMgr.h" #include "ace/INET_Addr.h" +#include "Player.h" class misc_commandscript : public CommandScript { @@ -495,7 +496,7 @@ public: handler->PSendSysMessage(LANG_SUMMONING, nameLink.c_str(), ""); if (handler->needReportToTarget(target)) - ChatHandler(target).PSendSysMessage(LANG_SUMMONED_BY, handler->playerLink(_player->GetName()).c_str()); + ChatHandler(target->GetSession()).PSendSysMessage(LANG_SUMMONED_BY, handler->playerLink(_player->GetName()).c_str()); // stop flight if need if (target->isInFlight()) @@ -606,7 +607,7 @@ public: handler->PSendSysMessage(LANG_SUMMONING, plNameLink.c_str(), ""); if (handler->needReportToTarget(player)) - ChatHandler(player).PSendSysMessage(LANG_SUMMONED_BY, handler->GetNameLink().c_str()); + ChatHandler(player->GetSession()).PSendSysMessage(LANG_SUMMONED_BY, handler->GetNameLink().c_str()); // stop flight if need if (player->isInFlight()) @@ -1804,7 +1805,7 @@ public: int64 muteTime = time(NULL) + notSpeakTime * MINUTE; target->GetSession()->m_muteTime = muteTime; stmt->setInt64(0, muteTime); - ChatHandler(target).PSendSysMessage(LANG_YOUR_CHAT_DISABLED, notSpeakTime, muteReasonStr.c_str()); + ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOUR_CHAT_DISABLED, notSpeakTime, muteReasonStr.c_str()); } else { @@ -1860,7 +1861,7 @@ public: LoginDatabase.Execute(stmt); if (target) - ChatHandler(target).PSendSysMessage(LANG_YOUR_CHAT_ENABLED); + ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOUR_CHAT_ENABLED); std::string nameLink = handler->playerLink(targetName); @@ -2137,7 +2138,7 @@ public: handler->PSendSysMessage(LANG_YOU_REPAIR_ITEMS, handler->GetNameLink(target).c_str()); if (handler->needReportToTarget(target)) - ChatHandler(target).PSendSysMessage(LANG_YOUR_ITEMS_REPAIRED, handler->GetNameLink().c_str()); + ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOUR_ITEMS_REPAIRED, handler->GetNameLink().c_str()); return true; } diff --git a/src/server/scripts/Commands/cs_modify.cpp b/src/server/scripts/Commands/cs_modify.cpp index ff74ae83c20..1fc5e99a094 100644 --- a/src/server/scripts/Commands/cs_modify.cpp +++ b/src/server/scripts/Commands/cs_modify.cpp @@ -25,6 +25,7 @@ EndScriptData */ #include "ScriptMgr.h" #include "ObjectMgr.h" #include "Chat.h" +#include "Player.h" class modify_commandscript : public CommandScript { @@ -106,7 +107,7 @@ public: handler->PSendSysMessage(LANG_YOU_CHANGE_HP, handler->GetNameLink(target).c_str(), hp, hpm); if (handler->needReportToTarget(target)) - (ChatHandler(target)).PSendSysMessage(LANG_YOURS_HP_CHANGED, handler->GetNameLink().c_str(), hp, hpm); + ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_HP_CHANGED, handler->GetNameLink().c_str(), hp, hpm); target->SetMaxHealth(hpm); target->SetHealth(hp); @@ -144,7 +145,7 @@ public: handler->PSendSysMessage(LANG_YOU_CHANGE_MANA, handler->GetNameLink(target).c_str(), mana, manam); if (handler->needReportToTarget(target)) - (ChatHandler(target)).PSendSysMessage(LANG_YOURS_MANA_CHANGED, handler->GetNameLink().c_str(), mana, manam); + ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_MANA_CHANGED, handler->GetNameLink().c_str(), mana, manam); target->SetMaxPower(POWER_MANA, manam); target->SetPower(POWER_MANA, mana); @@ -193,7 +194,7 @@ public: handler->PSendSysMessage(LANG_YOU_CHANGE_ENERGY, handler->GetNameLink(target).c_str(), energy/10, energym/10); if (handler->needReportToTarget(target)) - (ChatHandler(target)).PSendSysMessage(LANG_YOURS_ENERGY_CHANGED, handler->GetNameLink().c_str(), energy/10, energym/10); + ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_ENERGY_CHANGED, handler->GetNameLink().c_str(), energy/10, energym/10); target->SetMaxPower(POWER_ENERGY, energym); target->SetPower(POWER_ENERGY, energy); @@ -244,7 +245,7 @@ public: handler->PSendSysMessage(LANG_YOU_CHANGE_RAGE, handler->GetNameLink(target).c_str(), rage/10, ragem/10); if (handler->needReportToTarget(target)) - (ChatHandler(target)).PSendSysMessage(LANG_YOURS_RAGE_CHANGED, handler->GetNameLink().c_str(), rage/10, ragem/10); + ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_RAGE_CHANGED, handler->GetNameLink().c_str(), rage/10, ragem/10); target->SetMaxPower(POWER_RAGE, ragem); target->SetPower(POWER_RAGE, rage); @@ -278,7 +279,7 @@ public: handler->PSendSysMessage(LANG_YOU_CHANGE_RUNIC_POWER, handler->GetNameLink(target).c_str(), rune/10, runem/10); if (handler->needReportToTarget(target)) - (ChatHandler(target)).PSendSysMessage(LANG_YOURS_RUNIC_POWER_CHANGED, handler->GetNameLink().c_str(), rune/10, runem/10); + ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_RUNIC_POWER_CHANGED, handler->GetNameLink().c_str(), rune/10, runem/10); target->SetMaxPower(POWER_RUNIC_POWER, runem); target->SetPower(POWER_RUNIC_POWER, rune); @@ -408,7 +409,7 @@ public: handler->PSendSysMessage(LANG_YOU_CHANGE_SPELLFLATID, spellflatid, val, mark, handler->GetNameLink(target).c_str()); if (handler->needReportToTarget(target)) - (ChatHandler(target)).PSendSysMessage(LANG_YOURS_SPELLFLATID_CHANGED, handler->GetNameLink().c_str(), spellflatid, val, mark); + ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_SPELLFLATID_CHANGED, handler->GetNameLink().c_str(), spellflatid, val, mark); WorldPacket data(SMSG_SET_FLAT_SPELL_MODIFIER, (1+1+2+2)); data << uint8(spellflatid); @@ -504,7 +505,7 @@ public: handler->PSendSysMessage(LANG_YOU_CHANGE_ASPEED, ASpeed, targetNameLink.c_str()); if (handler->needReportToTarget(target)) - (ChatHandler(target)).PSendSysMessage(LANG_YOURS_ASPEED_CHANGED, handler->GetNameLink().c_str(), ASpeed); + ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_ASPEED_CHANGED, handler->GetNameLink().c_str(), ASpeed); target->SetSpeed(MOVE_WALK, ASpeed, true); target->SetSpeed(MOVE_RUN, ASpeed, true); @@ -552,7 +553,7 @@ public: handler->PSendSysMessage(LANG_YOU_CHANGE_SPEED, Speed, targetNameLink.c_str()); if (handler->needReportToTarget(target)) - (ChatHandler(target)).PSendSysMessage(LANG_YOURS_SPEED_CHANGED, handler->GetNameLink().c_str(), Speed); + ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_SPEED_CHANGED, handler->GetNameLink().c_str(), Speed); target->SetSpeed(MOVE_RUN, Speed, true); @@ -597,7 +598,7 @@ public: handler->PSendSysMessage(LANG_YOU_CHANGE_SWIM_SPEED, Swim, targetNameLink.c_str()); if (handler->needReportToTarget(target)) - (ChatHandler(target)).PSendSysMessage(LANG_YOURS_SWIM_SPEED_CHANGED, handler->GetNameLink().c_str(), Swim); + ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_SWIM_SPEED_CHANGED, handler->GetNameLink().c_str(), Swim); target->SetSpeed(MOVE_SWIM, Swim, true); @@ -642,7 +643,7 @@ public: handler->PSendSysMessage(LANG_YOU_CHANGE_BACK_SPEED, BSpeed, targetNameLink.c_str()); if (handler->needReportToTarget(target)) - (ChatHandler(target)).PSendSysMessage(LANG_YOURS_BACK_SPEED_CHANGED, handler->GetNameLink().c_str(), BSpeed); + ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_BACK_SPEED_CHANGED, handler->GetNameLink().c_str(), BSpeed); target->SetSpeed(MOVE_RUN_BACK, BSpeed, true); @@ -678,7 +679,7 @@ public: handler->PSendSysMessage(LANG_YOU_CHANGE_FLY_SPEED, FSpeed, handler->GetNameLink(target).c_str()); if (handler->needReportToTarget(target)) - (ChatHandler(target)).PSendSysMessage(LANG_YOURS_FLY_SPEED_CHANGED, handler->GetNameLink().c_str(), FSpeed); + ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_FLY_SPEED_CHANGED, handler->GetNameLink().c_str(), FSpeed); target->SetSpeed(MOVE_FLIGHT, FSpeed, true); @@ -715,7 +716,7 @@ public: handler->PSendSysMessage(LANG_YOU_CHANGE_SIZE, Scale, handler->GetNameLink(player).c_str()); if (handler->needReportToTarget(player)) - (ChatHandler(player)).PSendSysMessage(LANG_YOURS_SIZE_CHANGED, handler->GetNameLink().c_str(), Scale); + ChatHandler(player->GetSession()).PSendSysMessage(LANG_YOURS_SIZE_CHANGED, handler->GetNameLink().c_str(), Scale); } target->SetObjectScale(Scale); @@ -963,7 +964,7 @@ public: handler->PSendSysMessage(LANG_YOU_GIVE_MOUNT, handler->GetNameLink(target).c_str()); if (handler->needReportToTarget(target)) - (ChatHandler(target)).PSendSysMessage(LANG_MOUNT_GIVED, handler->GetNameLink().c_str()); + ChatHandler(target->GetSession()).PSendSysMessage(LANG_MOUNT_GIVED, handler->GetNameLink().c_str()); target->SetUInt32Value(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP); target->Mount(mId); @@ -1019,7 +1020,7 @@ public: { handler->PSendSysMessage(LANG_YOU_TAKE_ALL_MONEY, handler->GetNameLink(target).c_str()); if (handler->needReportToTarget(target)) - (ChatHandler(target)).PSendSysMessage(LANG_YOURS_ALL_MONEY_GONE, handler->GetNameLink().c_str()); + ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_ALL_MONEY_GONE, handler->GetNameLink().c_str()); target->SetMoney(0); } @@ -1030,7 +1031,7 @@ public: handler->PSendSysMessage(LANG_YOU_TAKE_MONEY, abs(moneyToAdd), handler->GetNameLink(target).c_str()); if (handler->needReportToTarget(target)) - (ChatHandler(target)).PSendSysMessage(LANG_YOURS_MONEY_TAKEN, handler->GetNameLink().c_str(), abs(moneyToAdd)); + ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_MONEY_TAKEN, handler->GetNameLink().c_str(), abs(moneyToAdd)); target->SetMoney(newmoney); } } @@ -1038,7 +1039,7 @@ public: { handler->PSendSysMessage(LANG_YOU_GIVE_MONEY, moneyToAdd, handler->GetNameLink(target).c_str()); if (handler->needReportToTarget(target)) - (ChatHandler(target)).PSendSysMessage(LANG_YOURS_MONEY_GIVEN, handler->GetNameLink().c_str(), moneyToAdd); + ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_MONEY_GIVEN, handler->GetNameLink().c_str(), moneyToAdd); if (moneyToAdd >= MAX_MONEY_AMOUNT) target->SetMoney(MAX_MONEY_AMOUNT); @@ -1378,7 +1379,7 @@ public: handler->PSendSysMessage(LANG_YOU_CHANGE_GENDER, handler->GetNameLink(target).c_str(), gender_full); if (handler->needReportToTarget(target)) - (ChatHandler(target)).PSendSysMessage(LANG_YOUR_GENDER_CHANGED, gender_full, handler->GetNameLink().c_str()); + ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOUR_GENDER_CHANGED, gender_full, handler->GetNameLink().c_str()); return true; } diff --git a/src/server/scripts/Commands/cs_npc.cpp b/src/server/scripts/Commands/cs_npc.cpp index ba7342caa80..91711072545 100644 --- a/src/server/scripts/Commands/cs_npc.cpp +++ b/src/server/scripts/Commands/cs_npc.cpp @@ -29,6 +29,7 @@ EndScriptData */ #include "CreatureGroups.h" #include "TargetedMovementGenerator.h" // for HandleNpcUnFollowCommand #include "CreatureAI.h" +#include "Player.h" class npc_commandscript : public CommandScript { diff --git a/src/server/scripts/Commands/cs_quest.cpp b/src/server/scripts/Commands/cs_quest.cpp index c2ec563b3c7..5776022e59f 100644 --- a/src/server/scripts/Commands/cs_quest.cpp +++ b/src/server/scripts/Commands/cs_quest.cpp @@ -25,6 +25,7 @@ EndScriptData */ #include "ScriptMgr.h" #include "ObjectMgr.h" #include "Chat.h" +#include "Player.h" class quest_commandscript : public CommandScript { diff --git a/src/server/scripts/Commands/cs_reload.cpp b/src/server/scripts/Commands/cs_reload.cpp index 25f4c176bfc..10b3fd1b997 100644 --- a/src/server/scripts/Commands/cs_reload.cpp +++ b/src/server/scripts/Commands/cs_reload.cpp @@ -78,7 +78,6 @@ public: { "config", SEC_ADMINISTRATOR, true, &HandleReloadConfigCommand, "", NULL }, { "creature_text", SEC_ADMINISTRATOR, true, &HandleReloadCreatureText, "", NULL }, { "creature_ai_scripts", SEC_ADMINISTRATOR, true, &HandleReloadEventAIScriptsCommand, "", NULL }, - { "creature_ai_summons", SEC_ADMINISTRATOR, true, &HandleReloadEventAISummonsCommand, "", NULL }, { "creature_ai_texts", SEC_ADMINISTRATOR, true, &HandleReloadEventAITextsCommand, "", NULL }, { "creature_involvedrelation", SEC_ADMINISTRATOR, true, &HandleReloadCreatureQuestInvRelationsCommand, "", NULL }, { "creature_linked_respawn", SEC_GAMEMASTER, true, &HandleReloadLinkedRespawnCommand, "", NULL }, @@ -276,7 +275,6 @@ public: static bool HandleReloadAllEventAICommand(ChatHandler* handler, const char* /*args*/) { HandleReloadEventAITextsCommand(handler, "a"); - HandleReloadEventAISummonsCommand(handler, "a"); HandleReloadEventAIScriptsCommand(handler, "a"); return true; } @@ -1037,14 +1035,6 @@ public: return true; } - static bool HandleReloadEventAISummonsCommand(ChatHandler* handler, const char* /*args*/) - { - sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Summons from `creature_ai_summons`..."); - sEventAIMgr->LoadCreatureEventAI_Summons(); - handler->SendGlobalGMSysMessage("DB table `creature_ai_summons` reloaded."); - return true; - } - static bool HandleReloadEventAIScriptsCommand(ChatHandler* handler, const char* /*args*/) { sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Scripts from `creature_ai_scripts`..."); diff --git a/src/server/scripts/Commands/cs_reset.cpp b/src/server/scripts/Commands/cs_reset.cpp index 76a4eb5d943..d4610d57292 100644 --- a/src/server/scripts/Commands/cs_reset.cpp +++ b/src/server/scripts/Commands/cs_reset.cpp @@ -25,6 +25,7 @@ EndScriptData */ #include "ScriptMgr.h" #include "Chat.h" #include "ObjectAccessor.h" +#include "Player.h" class reset_commandscript : public CommandScript { @@ -168,7 +169,7 @@ public: { target->resetSpells(/* bool myClassOnly */); - ChatHandler(target).SendSysMessage(LANG_RESET_SPELLS); + ChatHandler(target->GetSession()).SendSysMessage(LANG_RESET_SPELLS); if (!handler->GetSession() || handler->GetSession()->GetPlayer() != target) handler->PSendSysMessage(LANG_RESET_SPELLS_ONLINE, handler->GetNameLink(target).c_str()); } @@ -220,7 +221,7 @@ public: creature->ToPet()->resetTalents(); owner->ToPlayer()->SendTalentsInfoData(true); - ChatHandler(owner->ToPlayer()).SendSysMessage(LANG_RESET_PET_TALENTS); + ChatHandler(owner->ToPlayer()->GetSession()).SendSysMessage(LANG_RESET_PET_TALENTS); if (!handler->GetSession() || handler->GetSession()->GetPlayer() != owner->ToPlayer()) handler->PSendSysMessage(LANG_RESET_PET_TALENTS_ONLINE, handler->GetNameLink(owner->ToPlayer()).c_str()); } @@ -236,7 +237,7 @@ public: { target->resetTalents(true); target->SendTalentsInfoData(false); - ChatHandler(target).SendSysMessage(LANG_RESET_TALENTS); + ChatHandler(target->GetSession()).SendSysMessage(LANG_RESET_TALENTS); if (!handler->GetSession() || handler->GetSession()->GetPlayer() != target) handler->PSendSysMessage(LANG_RESET_TALENTS_ONLINE, handler->GetNameLink(target).c_str()); diff --git a/src/server/scripts/Commands/cs_server.cpp b/src/server/scripts/Commands/cs_server.cpp index db1995ebb6e..131d7a4149a 100644 --- a/src/server/scripts/Commands/cs_server.cpp +++ b/src/server/scripts/Commands/cs_server.cpp @@ -27,6 +27,7 @@ EndScriptData */ #include "SystemConfig.h" #include "Config.h" #include "ObjectAccessor.h" +#include "Player.h" class server_commandscript : public CommandScript { diff --git a/src/server/scripts/Commands/cs_tele.cpp b/src/server/scripts/Commands/cs_tele.cpp index 8f390d17cd4..553559afd1c 100644 --- a/src/server/scripts/Commands/cs_tele.cpp +++ b/src/server/scripts/Commands/cs_tele.cpp @@ -27,6 +27,7 @@ EndScriptData */ #include "MapManager.h" #include "Chat.h" #include "Group.h" +#include "Player.h" class tele_commandscript : public CommandScript { @@ -178,7 +179,7 @@ public: handler->PSendSysMessage(LANG_TELEPORTING_TO, chrNameLink.c_str(), "", tele->name.c_str()); if (handler->needReportToTarget(target)) - (ChatHandler(target)).PSendSysMessage(LANG_TELEPORTED_TO_BY, handler->GetNameLink().c_str()); + ChatHandler(target->GetSession()).PSendSysMessage(LANG_TELEPORTED_TO_BY, handler->GetNameLink().c_str()); // stop flight if need if (target->isInFlight()) @@ -274,7 +275,7 @@ public: handler->PSendSysMessage(LANG_TELEPORTING_TO, plNameLink.c_str(), "", tele->name.c_str()); if (handler->needReportToTarget(player)) - (ChatHandler(player)).PSendSysMessage(LANG_TELEPORTED_TO_BY, nameLink.c_str()); + ChatHandler(player->GetSession()).PSendSysMessage(LANG_TELEPORTED_TO_BY, nameLink.c_str()); // stop flight if need if (player->isInFlight()) diff --git a/src/server/scripts/Commands/cs_ticket.cpp b/src/server/scripts/Commands/cs_ticket.cpp index c99931a90fb..72804ed5727 100644 --- a/src/server/scripts/Commands/cs_ticket.cpp +++ b/src/server/scripts/Commands/cs_ticket.cpp @@ -27,6 +27,7 @@ EndScriptData */ #include "AccountMgr.h" #include "ObjectMgr.h" #include "TicketMgr.h" +#include "Player.h" class ticket_commandscript : public CommandScript { diff --git a/src/server/scripts/Commands/cs_titles.cpp b/src/server/scripts/Commands/cs_titles.cpp index e1b30d122de..d25899cb094 100644 --- a/src/server/scripts/Commands/cs_titles.cpp +++ b/src/server/scripts/Commands/cs_titles.cpp @@ -25,6 +25,7 @@ EndScriptData */ #include "ScriptMgr.h" #include "ObjectMgr.h" #include "Chat.h" +#include "Player.h" class titles_commandscript : public CommandScript { diff --git a/src/server/scripts/Commands/cs_wp.cpp b/src/server/scripts/Commands/cs_wp.cpp index e3cd185e4a3..33adfe62391 100644 --- a/src/server/scripts/Commands/cs_wp.cpp +++ b/src/server/scripts/Commands/cs_wp.cpp @@ -26,6 +26,7 @@ EndScriptData */ #include "ObjectMgr.h" #include "WaypointManager.h" #include "Chat.h" +#include "Player.h" class wp_commandscript : public CommandScript { @@ -941,7 +942,7 @@ public: { wpCreature->SetDisplayId(target->GetDisplayId()); wpCreature->SetObjectScale(0.5f); - wpCreature->SetLevel(point > STRONG_MAX_LEVEL ? STRONG_MAX_LEVEL : point); + wpCreature->SetLevel(std::min<uint32>(point, STRONG_MAX_LEVEL)); } } while (result->NextRow()); diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/alterac_valley.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/alterac_valley.cpp index b2b4083f9c6..cef95b607c7 100644 --- a/src/server/scripts/EasternKingdoms/AlteracValley/alterac_valley.cpp +++ b/src/server/scripts/EasternKingdoms/AlteracValley/alterac_valley.cpp @@ -24,8 +24,8 @@ enum Spells SPELL_CLEAVE = 40504, SPELL_DEMORALIZING_SHOUT = 23511, SPELL_ENRAGE = 8599, - SPELL_WHIRLWIND1 = 15589, - SPELL_WHIRLWIND2 = 13736, + SPELL_WHIRLWIND = 13736, + SPELL_NORTH_MARSHAL = 45828, SPELL_SOUTH_MARSHAL = 45829, SPELL_STONEHEARTH_MARSHAL = 45830, @@ -48,38 +48,55 @@ enum Creatures NPC_WEST_FROSTWOLF_WARMASTER = 14777 }; +enum Events +{ + EVENT_CHARGE_TARGET = 1, + EVENT_CLEAVE = 2, + EVENT_DEMORALIZING_SHOUT = 3, + EVENT_WHIRLWIND = 4, + EVENT_ENRAGE = 5, + EVENT_CHECK_RESET = 6 +}; + +struct SpellPair +{ + uint32 npcEntry; + uint32 spellId; +}; + +uint8 const MAX_SPELL_PAIRS = 8; +SpellPair const _auraPairs[MAX_SPELL_PAIRS] = +{ + { NPC_NORTH_MARSHAL, SPELL_NORTH_MARSHAL }, + { NPC_SOUTH_MARSHAL, SPELL_SOUTH_MARSHAL }, + { NPC_STONEHEARTH_MARSHAL, SPELL_STONEHEARTH_MARSHAL }, + { NPC_ICEWING_MARSHAL, SPELL_ICEWING_MARSHAL }, + { NPC_EAST_FROSTWOLF_WARMASTER, SPELL_EAST_FROSTWOLF_WARMASTER }, + { NPC_WEST_FROSTWOLF_WARMASTER, SPELL_WEST_FROSTWOLF_WARMASTER }, + { NPC_TOWER_POINT_WARMASTER, SPELL_TOWER_POINT_WARMASTER }, + { NPC_ICEBLOOD_WARMASTER, SPELL_ICEBLOOD_WARMASTER } +}; + class mob_av_marshal_or_warmaster : public CreatureScript { public: - - mob_av_marshal_or_warmaster() - : CreatureScript("mob_av_marshal_or_warmaster") {} + mob_av_marshal_or_warmaster() : CreatureScript("mob_av_marshal_or_warmaster") { } struct mob_av_marshal_or_warmasterAI : public ScriptedAI { - mob_av_marshal_or_warmasterAI(Creature* creature) : ScriptedAI(creature) {} - - uint32 ChargeTimer; - uint32 CleaveTimer; - uint32 DemoralizingShoutTimer; - uint32 Whirlwind1Timer; - uint32 Whirlwind2Timer; - uint32 EnrageTimer; - uint32 ResetTimer; - - bool bHasAura; + mob_av_marshal_or_warmasterAI(Creature* creature) : ScriptedAI(creature) { } void Reset() { - ChargeTimer = urand(2 * IN_MILLISECONDS, 12 * IN_MILLISECONDS); - CleaveTimer = urand(1 * IN_MILLISECONDS, 11 * IN_MILLISECONDS); - DemoralizingShoutTimer = urand(2 * IN_MILLISECONDS, 2 * IN_MILLISECONDS); - Whirlwind1Timer = urand(1 * IN_MILLISECONDS, 12 * IN_MILLISECONDS); - Whirlwind2Timer = urand(5 * IN_MILLISECONDS, 20 * IN_MILLISECONDS); - EnrageTimer = urand(5 * IN_MILLISECONDS, 20 * IN_MILLISECONDS); - ResetTimer = 5 * IN_MILLISECONDS; - - bHasAura = false; + events.Reset(); + events.ScheduleEvent(EVENT_CHARGE_TARGET, urand(2 * IN_MILLISECONDS, 12 * IN_MILLISECONDS)); + events.ScheduleEvent(EVENT_CLEAVE, urand(1 * IN_MILLISECONDS, 11 * IN_MILLISECONDS)); + events.ScheduleEvent(EVENT_DEMORALIZING_SHOUT, 2000); + events.ScheduleEvent(EVENT_WHIRLWIND, urand(5 * IN_MILLISECONDS, 20 * IN_MILLISECONDS)); + events.ScheduleEvent(EVENT_ENRAGE, urand(5 * IN_MILLISECONDS, 20 * IN_MILLISECONDS)); + events.ScheduleEvent(EVENT_CHECK_RESET, 5000); + + _hasAura = false; } void JustRespawned() @@ -87,90 +104,70 @@ class mob_av_marshal_or_warmaster : public CreatureScript Reset(); } - void UpdateAI(const uint32 diff) + void UpdateAI(uint32 const diff) { - if (!bHasAura) + // I have a feeling this isn't blizzlike, but owell, I'm only passing by and cleaning up. + if (!_hasAura) { - switch (me->GetEntry()) - { - case NPC_NORTH_MARSHAL: - DoCast(me, SPELL_NORTH_MARSHAL); - break; - case NPC_SOUTH_MARSHAL: - DoCast(me, SPELL_SOUTH_MARSHAL); - break; - case NPC_STONEHEARTH_MARSHAL: - DoCast(me, SPELL_STONEHEARTH_MARSHAL); - break; - case NPC_ICEWING_MARSHAL: - DoCast(me, SPELL_ICEWING_MARSHAL); - break; - case NPC_EAST_FROSTWOLF_WARMASTER: - DoCast(me, SPELL_EAST_FROSTWOLF_WARMASTER); - break; - case NPC_WEST_FROSTWOLF_WARMASTER: - DoCast(me, SPELL_WEST_FROSTWOLF_WARMASTER); - break; - case NPC_ICEBLOOD_WARMASTER: - DoCast(me, SPELL_ICEBLOOD_WARMASTER); - break; - case NPC_TOWER_POINT_WARMASTER: - DoCast(me, SPELL_TOWER_POINT_WARMASTER); - break; - } + for (uint8 i = 0; i < MAX_SPELL_PAIRS; ++i) + if (_auraPairs[i].npcEntry == me->GetEntry()) + DoCast(me, _auraPairs[i].spellId); - bHasAura = true; + _hasAura = true; } if (!UpdateVictim()) return; - if (ChargeTimer <= diff) - { - DoCast(me->getVictim(), SPELL_CHARGE); - ChargeTimer = urand(10 * IN_MILLISECONDS, 25 * IN_MILLISECONDS); - } else ChargeTimer -= diff; - - if (CleaveTimer <= diff) - { - DoCast(me->getVictim(), SPELL_CLEAVE); - CleaveTimer = urand(10 * IN_MILLISECONDS, 16 * IN_MILLISECONDS); - } else CleaveTimer -= diff; - - if (DemoralizingShoutTimer <= diff) - { - DoCast(me->getVictim(), SPELL_DEMORALIZING_SHOUT); - DemoralizingShoutTimer = urand(10 * IN_MILLISECONDS, 15 * IN_MILLISECONDS); - } else DemoralizingShoutTimer -= diff; + events.Update(diff); - if (Whirlwind1Timer <= diff) - { - DoCast(me->getVictim(), SPELL_WHIRLWIND1); - Whirlwind1Timer = urand(6 * IN_MILLISECONDS, 20 * IN_MILLISECONDS); - } else Whirlwind1Timer -= diff; - - if (Whirlwind2Timer <= diff) - { - DoCast(me->getVictim(), SPELL_WHIRLWIND2); - Whirlwind2Timer = urand(10 * IN_MILLISECONDS, 25 * IN_MILLISECONDS); - } else Whirlwind2Timer -= diff; - - if (EnrageTimer <= diff) - { - DoCast(me->getVictim(), SPELL_ENRAGE); - EnrageTimer = urand(10 * IN_MILLISECONDS, 30 * IN_MILLISECONDS); - }else EnrageTimer -= diff; + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; - // check if creature is not outside of building - if (ResetTimer <= diff) + while (uint32 eventId = events.ExecuteEvent()) { - if (me->GetDistance2d(me->GetHomePosition().GetPositionX(), me->GetHomePosition().GetPositionY()) > 50) - EnterEvadeMode(); - ResetTimer = 5 * IN_MILLISECONDS; - } else ResetTimer -= diff; + switch (eventId) + { + case EVENT_CHARGE_TARGET: + DoCast(me->getVictim(), SPELL_CHARGE); + events.ScheduleEvent(EVENT_CHARGE, urand(10 * IN_MILLISECONDS, 25 * IN_MILLISECONDS)); + break; + case EVENT_CLEAVE: + DoCast(me->getVictim(), SPELL_CLEAVE); + events.ScheduleEvent(EVENT_CLEAVE, urand(10 * IN_MILLISECONDS, 16 * IN_MILLISECONDS)); + break; + case EVENT_DEMORALIZING_SHOUT: + DoCast(me, SPELL_DEMORALIZING_SHOUT); + events.ScheduleEvent(EVENT_DEMORALIZING_SHOUT, urand(10 * IN_MILLISECONDS, 15 * IN_MILLISECONDS)); + break; + case EVENT_WHIRLWIND: + DoCast(me, SPELL_WHIRLWIND); + events.ScheduleEvent(EVENT_WHIRLWIND, urand(10 * IN_MILLISECONDS, 25 * IN_MILLISECONDS)); + break; + case EVENT_ENRAGE: + DoCast(me, SPELL_ENRAGE); + events.ScheduleEvent(EVENT_ENRAGE, urand(10 * IN_MILLISECONDS, 30 * IN_MILLISECONDS)); + break; + case EVENT_CHECK_RESET: + { + Position const& _homePosition = me->GetHomePosition(); + if (me->GetDistance2d(_homePosition.GetPositionX(), _homePosition.GetPositionY()) > 50.0f) + { + EnterEvadeMode(); + return; + } + events.ScheduleEvent(EVENT_CHECK_RESET, 5000); + break; + } + } + } DoMeleeAttackIfReady(); } + + private: + EventMap events; + bool _hasAura; }; CreatureAI* GetAI(Creature* creature) const diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp index 263897edfad..5c65531c615 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp @@ -20,6 +20,7 @@ #include "ScriptedEscortAI.h" #include "ScriptedGossip.h" #include "blackrock_depths.h" +#include "Player.h" //go_shadowforge_brazier class go_shadowforge_brazier : public GameObjectScript diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_tomb_of_seven.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_tomb_of_seven.cpp index 347aff2ce0b..ecdcb4b0b82 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_tomb_of_seven.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_tomb_of_seven.cpp @@ -20,6 +20,7 @@ #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "blackrock_depths.h" +#include "Player.h" enum Spells { diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_vaelastrasz.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_vaelastrasz.cpp index 8cc42baff8e..359f218cd5c 100644 --- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_vaelastrasz.cpp +++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_vaelastrasz.cpp @@ -26,6 +26,7 @@ EndScriptData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" +#include "Player.h" enum Says { diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_victor_nefarius.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_victor_nefarius.cpp index 30638e9edeb..a93519bcbe7 100644 --- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_victor_nefarius.cpp +++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_victor_nefarius.cpp @@ -26,6 +26,7 @@ EndScriptData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" +#include "Player.h" enum Says { diff --git a/src/server/scripts/EasternKingdoms/Deadmines/deadmines.cpp b/src/server/scripts/EasternKingdoms/Deadmines/deadmines.cpp index 888171c5415..ae9071f3fd0 100644 --- a/src/server/scripts/EasternKingdoms/Deadmines/deadmines.cpp +++ b/src/server/scripts/EasternKingdoms/Deadmines/deadmines.cpp @@ -27,6 +27,7 @@ EndScriptData */ #include "ScriptedCreature.h" #include "deadmines.h" #include "Spell.h" +#include "Player.h" /*##### # item_Defias_Gunpowder diff --git a/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp b/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp index 8e0fb9ff411..54d8c4f853b 100644 --- a/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp +++ b/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp @@ -26,6 +26,7 @@ EndScriptData */ #include "ScriptMgr.h" #include "InstanceScript.h" #include "deadmines.h" +#include "TemporarySummon.h" enum Sounds { diff --git a/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp b/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp index 8f79c4973f7..71cd69caeb5 100644 --- a/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp +++ b/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp @@ -27,6 +27,7 @@ Script Data End */ #include "ScriptedGossip.h" #include "gnomeregan.h" #include "ScriptedEscortAI.h" +#include "Player.h" #define GOSSIP_START_EVENT "I am ready to being" diff --git a/src/server/scripts/EasternKingdoms/Gnomeregan/instance_gnomeregan.cpp b/src/server/scripts/EasternKingdoms/Gnomeregan/instance_gnomeregan.cpp index 931c0bb90fc..2e520351150 100644 --- a/src/server/scripts/EasternKingdoms/Gnomeregan/instance_gnomeregan.cpp +++ b/src/server/scripts/EasternKingdoms/Gnomeregan/instance_gnomeregan.cpp @@ -18,6 +18,7 @@ #include "ScriptMgr.h" #include "InstanceScript.h" #include "gnomeregan.h" +#include "Player.h" #define MAX_ENCOUNTER 1 diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp index c6587c3cd8a..c3e571ad376 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp @@ -26,6 +26,7 @@ EndScriptData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "karazhan.h" +#include "Player.h" #define EMOTE_PHASE_PORTAL -1532089 #define EMOTE_PHASE_BANISH -1532090 diff --git a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp index a4f4f603206..2c1d4ac0e71 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp @@ -27,6 +27,7 @@ EndScriptData */ #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "karazhan.h" +#include "Player.h" /***********************************/ /*** OPERA WIZARD OF OZ EVENT *****/ diff --git a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp index 3bdfeab30da..d2b83c6ac54 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp @@ -34,6 +34,7 @@ EndContentData */ #include "ScriptedGossip.h" #include "karazhan.h" #include "ScriptedEscortAI.h" +#include "Player.h" /*###### # npc_barnesAI diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.cpp index 64b6c8d75b2..37b2dd18afe 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.cpp @@ -30,6 +30,7 @@ EndContentData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" +#include "Player.h" /*###### ## npc_kalecgos diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_majordomo_executus.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/boss_majordomo_executus.cpp index f085e15fcb7..c7d6b31d2ea 100644 --- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_majordomo_executus.cpp +++ b/src/server/scripts/EasternKingdoms/MoltenCore/boss_majordomo_executus.cpp @@ -28,6 +28,7 @@ EndScriptData */ #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "molten_core.h" +#include "Player.h" enum Texts { diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/instance_molten_core.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/instance_molten_core.cpp index f6a6e647a1d..33719f8f1f6 100644 --- a/src/server/scripts/EasternKingdoms/MoltenCore/instance_molten_core.cpp +++ b/src/server/scripts/EasternKingdoms/MoltenCore/instance_molten_core.cpp @@ -28,6 +28,7 @@ EndScriptData */ #include "InstanceScript.h" #include "CreatureAI.h" #include "molten_core.h" +#include "TemporarySummon.h" Position const SummonPositions[10] = { diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp index c17a059d007..a65edcd63bc 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp @@ -23,6 +23,7 @@ #include "ScriptedEscortAI.h" #include "CombatAI.h" #include "PassiveAI.h" +#include "Player.h" /*###### ##Quest 12848 diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp index b4c6268a43e..51581b53e5f 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp @@ -18,6 +18,7 @@ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" +#include "Player.h" //How to win friends and influence enemies // texts signed for creature 28939 but used for 28939, 28940, 28610 diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp index 4d1552b932e..686f5954e77 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp @@ -19,6 +19,7 @@ #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "ScriptedEscortAI.h" +#include "Player.h" #define LESS_MOB // if you do not have a good server and do not want it to be laggy as hell //Light of Dawn diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/the_scarlet_enclave.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/the_scarlet_enclave.cpp index 81211f36df3..6e7f7e103c5 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/the_scarlet_enclave.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/the_scarlet_enclave.cpp @@ -18,6 +18,7 @@ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "PassiveAI.h" +#include "Player.h" /*#### ## npc_valkyr_battle_maiden diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp index 5e7fa111a7b..fc2e53aedfb 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp @@ -28,6 +28,7 @@ EndScriptData */ #include "SpellMgr.h" #include "scarlet_monastery.h" #include "LFGMgr.h" +#include "Player.h" //this texts are already used by 3975 and 3976 enum Says diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp b/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp index b405f9eba85..f219875b057 100644 --- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp +++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp @@ -26,6 +26,7 @@ EndScriptData */ #include "ScriptMgr.h" #include "InstanceScript.h" #include "shadowfang_keep.h" +#include "TemporarySummon.h" #define MAX_ENCOUNTER 4 diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp b/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp index 9ee3428c7dd..5fc41b3b267 100644 --- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp +++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp @@ -34,6 +34,7 @@ EndContentData */ #include "SpellAuraEffects.h" #include "ScriptedEscortAI.h" #include "shadowfang_keep.h" +#include "Player.h" /*###### ## npc_shadowfang_prisoner diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_order_of_silver_hand.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_order_of_silver_hand.cpp index 47c6b66f4bb..96e59a657a3 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_order_of_silver_hand.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_order_of_silver_hand.cpp @@ -26,6 +26,7 @@ EndScriptData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "stratholme.h" +#include "Player.h" /*##### # Additional: diff --git a/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp b/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp index 98df9638bae..17eedb87896 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp @@ -27,6 +27,7 @@ EndScriptData */ #include "ScriptedCreature.h" #include "InstanceScript.h" #include "stratholme.h" +#include "Player.h" #define GO_SERVICE_ENTRANCE 175368 #define GO_GAUNTLET_GATE1 175357 diff --git a/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp b/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp index 9b4591bc633..188739a934d 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp @@ -34,6 +34,7 @@ EndContentData */ #include "ScriptedCreature.h" #include "stratholme.h" #include "Group.h" +#include "Player.h" /*###### ## go_gauntlet_gate (this is the _first_ of the gauntlet gates, two exist) diff --git a/src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.cpp b/src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.cpp index 83ff86f5b88..040e2153c2d 100644 --- a/src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.cpp +++ b/src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.cpp @@ -30,6 +30,7 @@ EndContentData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "sunken_temple.h" +#include "Player.h" /*##### # at_malfurion_Stormrage_trigger diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp index 3e503a547d8..53696fbed7a 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp @@ -26,6 +26,7 @@ EndScriptData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "sunwell_plateau.h" +#include "Player.h" enum Yells { diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp index 096f6daaec2..ce8338e2b2d 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp @@ -28,6 +28,7 @@ EndScriptData */ #include "ScriptedCreature.h" #include "sunwell_plateau.h" #include <math.h> +#include "Player.h" /*** Speech and sounds***/ enum Yells diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp index 9fd0a5eb5d8..6ce1bf7a414 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp @@ -24,6 +24,7 @@ SDComment: all sounds, black hole effect triggers to often (46228) #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "sunwell_plateau.h" +#include "Player.h" // Muru & Entropius's spells enum Spells diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp index bea73837304..bf31557d8a8 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp @@ -26,6 +26,7 @@ EndScriptData */ #include "ScriptMgr.h" #include "InstanceScript.h" #include "sunwell_plateau.h" +#include "Player.h" #define MAX_ENCOUNTER 6 diff --git a/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp b/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp index 74fad4f94d8..0b7a62f6563 100644 --- a/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp +++ b/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp @@ -29,6 +29,7 @@ EndScriptData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "uldaman.h" +#include "Player.h" #define SAY_AGGRO "Who dares awaken Archaedas? Who dares the wrath of the makers!" #define SOUND_AGGRO 5855 diff --git a/src/server/scripts/EasternKingdoms/Uldaman/uldaman.cpp b/src/server/scripts/EasternKingdoms/Uldaman/uldaman.cpp index 2b8d4e37b65..d86da3efce5 100644 --- a/src/server/scripts/EasternKingdoms/Uldaman/uldaman.cpp +++ b/src/server/scripts/EasternKingdoms/Uldaman/uldaman.cpp @@ -33,6 +33,7 @@ EndContentData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "uldaman.h" +#include "Player.h" /*###### ## mob_jadespine_basilisk diff --git a/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp b/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp index 235bec7cc8a..b113c7c68b9 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp @@ -26,6 +26,7 @@ EndScriptData */ #include "ScriptMgr.h" #include "InstanceScript.h" #include "zulaman.h" +#include "Player.h" #define MAX_ENCOUNTER 6 #define RAND_VENDOR 2 diff --git a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp index f0bea065eb6..2c9b838a2ed 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp @@ -31,6 +31,7 @@ EndContentData */ #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "zulaman.h" +#include "Player.h" /*###### ## npc_forest_frog diff --git a/src/server/scripts/EasternKingdoms/arathi_highlands.cpp b/src/server/scripts/EasternKingdoms/arathi_highlands.cpp index b0d59fe8b5a..7f96706f48e 100644 --- a/src/server/scripts/EasternKingdoms/arathi_highlands.cpp +++ b/src/server/scripts/EasternKingdoms/arathi_highlands.cpp @@ -30,6 +30,7 @@ EndContentData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" +#include "Player.h" /*###### ## npc_professor_phizzlethorpe diff --git a/src/server/scripts/EasternKingdoms/blasted_lands.cpp b/src/server/scripts/EasternKingdoms/blasted_lands.cpp index 75109f3a2f6..47fb8298ca7 100644 --- a/src/server/scripts/EasternKingdoms/blasted_lands.cpp +++ b/src/server/scripts/EasternKingdoms/blasted_lands.cpp @@ -30,6 +30,7 @@ EndContentData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" +#include "Player.h" /*###### ## npc_deathly_usher diff --git a/src/server/scripts/EasternKingdoms/burning_steppes.cpp b/src/server/scripts/EasternKingdoms/burning_steppes.cpp index eec747d6d73..ba1d339730a 100644 --- a/src/server/scripts/EasternKingdoms/burning_steppes.cpp +++ b/src/server/scripts/EasternKingdoms/burning_steppes.cpp @@ -30,6 +30,7 @@ EndContentData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" +#include "Player.h" /*###### ## npc_ragged_john diff --git a/src/server/scripts/EasternKingdoms/duskwood.cpp b/src/server/scripts/EasternKingdoms/duskwood.cpp index e5af5344dc1..fbb98979e77 100644 --- a/src/server/scripts/EasternKingdoms/duskwood.cpp +++ b/src/server/scripts/EasternKingdoms/duskwood.cpp @@ -25,6 +25,7 @@ EndScriptData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" +#include "Player.h" enum Yells { diff --git a/src/server/scripts/EasternKingdoms/eastern_plaguelands.cpp b/src/server/scripts/EasternKingdoms/eastern_plaguelands.cpp index 7ca76e38fce..c5dcbaba01d 100644 --- a/src/server/scripts/EasternKingdoms/eastern_plaguelands.cpp +++ b/src/server/scripts/EasternKingdoms/eastern_plaguelands.cpp @@ -33,6 +33,7 @@ EndContentData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" +#include "Player.h" class mobs_ghoul_flayer : public CreatureScript { diff --git a/src/server/scripts/EasternKingdoms/eversong_woods.cpp b/src/server/scripts/EasternKingdoms/eversong_woods.cpp index d69ae3454b4..f62273e583d 100644 --- a/src/server/scripts/EasternKingdoms/eversong_woods.cpp +++ b/src/server/scripts/EasternKingdoms/eversong_woods.cpp @@ -35,6 +35,7 @@ EndContentData */ #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "ScriptedEscortAI.h" +#include "Player.h" /*###### ## Quest 9686 Second Trial diff --git a/src/server/scripts/EasternKingdoms/ghostlands.cpp b/src/server/scripts/EasternKingdoms/ghostlands.cpp index 9793c6fd31c..6a7544b5393 100644 --- a/src/server/scripts/EasternKingdoms/ghostlands.cpp +++ b/src/server/scripts/EasternKingdoms/ghostlands.cpp @@ -34,6 +34,7 @@ EndContentData */ #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "ScriptedEscortAI.h" +#include "Player.h" /*###### ## npc_budd_nedreck diff --git a/src/server/scripts/EasternKingdoms/hinterlands.cpp b/src/server/scripts/EasternKingdoms/hinterlands.cpp index a6d01f0ca93..fc7f52ae9b5 100644 --- a/src/server/scripts/EasternKingdoms/hinterlands.cpp +++ b/src/server/scripts/EasternKingdoms/hinterlands.cpp @@ -31,6 +31,7 @@ EndContentData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" +#include "Player.h" /*###### ## npc_00x09hl diff --git a/src/server/scripts/EasternKingdoms/ironforge.cpp b/src/server/scripts/EasternKingdoms/ironforge.cpp index 2915ee1f3cb..fdd9f5f9a86 100644 --- a/src/server/scripts/EasternKingdoms/ironforge.cpp +++ b/src/server/scripts/EasternKingdoms/ironforge.cpp @@ -30,6 +30,7 @@ EndContentData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" +#include "Player.h" /*###### ## npc_royal_historian_archesonus diff --git a/src/server/scripts/EasternKingdoms/isle_of_queldanas.cpp b/src/server/scripts/EasternKingdoms/isle_of_queldanas.cpp index e448ccda14c..ca5385caffe 100644 --- a/src/server/scripts/EasternKingdoms/isle_of_queldanas.cpp +++ b/src/server/scripts/EasternKingdoms/isle_of_queldanas.cpp @@ -30,6 +30,7 @@ EndContentData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" +#include "Player.h" /*###### ## npc_converted_sentry diff --git a/src/server/scripts/EasternKingdoms/loch_modan.cpp b/src/server/scripts/EasternKingdoms/loch_modan.cpp index 4e3aaae71a1..0937e3cbb30 100644 --- a/src/server/scripts/EasternKingdoms/loch_modan.cpp +++ b/src/server/scripts/EasternKingdoms/loch_modan.cpp @@ -30,6 +30,7 @@ EndContentData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" +#include "Player.h" /*###### ## npc_mountaineer_pebblebitty diff --git a/src/server/scripts/EasternKingdoms/redridge_mountains.cpp b/src/server/scripts/EasternKingdoms/redridge_mountains.cpp index 2473fec899a..f04b0111da7 100644 --- a/src/server/scripts/EasternKingdoms/redridge_mountains.cpp +++ b/src/server/scripts/EasternKingdoms/redridge_mountains.cpp @@ -24,6 +24,7 @@ Script Data End */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" +#include "Player.h" enum eCorporalKeeshan { diff --git a/src/server/scripts/EasternKingdoms/silvermoon_city.cpp b/src/server/scripts/EasternKingdoms/silvermoon_city.cpp index 954f21f73f5..e56a1e72294 100644 --- a/src/server/scripts/EasternKingdoms/silvermoon_city.cpp +++ b/src/server/scripts/EasternKingdoms/silvermoon_city.cpp @@ -29,6 +29,7 @@ EndContentData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" +#include "Player.h" /*####### # npc_blood_knight_stillblade diff --git a/src/server/scripts/EasternKingdoms/silverpine_forest.cpp b/src/server/scripts/EasternKingdoms/silverpine_forest.cpp index b2cd3b16e7b..905d34221ed 100644 --- a/src/server/scripts/EasternKingdoms/silverpine_forest.cpp +++ b/src/server/scripts/EasternKingdoms/silverpine_forest.cpp @@ -31,6 +31,7 @@ EndContentData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" +#include "Player.h" /*###### ## npc_deathstalker_erland diff --git a/src/server/scripts/EasternKingdoms/stormwind_city.cpp b/src/server/scripts/EasternKingdoms/stormwind_city.cpp index 560214d4085..188f2c77fa1 100644 --- a/src/server/scripts/EasternKingdoms/stormwind_city.cpp +++ b/src/server/scripts/EasternKingdoms/stormwind_city.cpp @@ -37,6 +37,7 @@ EndContentData */ #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "ScriptedEscortAI.h" +#include "Player.h" /*###### ## npc_archmage_malin diff --git a/src/server/scripts/EasternKingdoms/stranglethorn_vale.cpp b/src/server/scripts/EasternKingdoms/stranglethorn_vale.cpp index 40f046a5075..26e0dffb5af 100644 --- a/src/server/scripts/EasternKingdoms/stranglethorn_vale.cpp +++ b/src/server/scripts/EasternKingdoms/stranglethorn_vale.cpp @@ -29,6 +29,7 @@ EndContentData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" +#include "Player.h" /*###### ## mob_yenniku diff --git a/src/server/scripts/EasternKingdoms/swamp_of_sorrows.cpp b/src/server/scripts/EasternKingdoms/swamp_of_sorrows.cpp index 4c81380fb60..4997fc49da9 100644 --- a/src/server/scripts/EasternKingdoms/swamp_of_sorrows.cpp +++ b/src/server/scripts/EasternKingdoms/swamp_of_sorrows.cpp @@ -19,6 +19,7 @@ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" +#include "Player.h" /*###### ## npc_galen_goodward diff --git a/src/server/scripts/EasternKingdoms/tirisfal_glades.cpp b/src/server/scripts/EasternKingdoms/tirisfal_glades.cpp index 70f9f93c7a7..041f5976a6e 100644 --- a/src/server/scripts/EasternKingdoms/tirisfal_glades.cpp +++ b/src/server/scripts/EasternKingdoms/tirisfal_glades.cpp @@ -31,6 +31,7 @@ EndContentData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" +#include "Player.h" /*###### ## npc_calvin_montague diff --git a/src/server/scripts/EasternKingdoms/undercity.cpp b/src/server/scripts/EasternKingdoms/undercity.cpp index 0d44db01592..6aaf2df0b22 100644 --- a/src/server/scripts/EasternKingdoms/undercity.cpp +++ b/src/server/scripts/EasternKingdoms/undercity.cpp @@ -32,6 +32,7 @@ EndContentData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" +#include "Player.h" /*###### ## npc_lady_sylvanas_windrunner diff --git a/src/server/scripts/EasternKingdoms/western_plaguelands.cpp b/src/server/scripts/EasternKingdoms/western_plaguelands.cpp index 31dea10453a..285e5bb4e17 100644 --- a/src/server/scripts/EasternKingdoms/western_plaguelands.cpp +++ b/src/server/scripts/EasternKingdoms/western_plaguelands.cpp @@ -34,6 +34,7 @@ EndContentData */ #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "ScriptedEscortAI.h" +#include "Player.h" /*###### ## npcs_dithers_and_arbington diff --git a/src/server/scripts/EasternKingdoms/westfall.cpp b/src/server/scripts/EasternKingdoms/westfall.cpp index 478c5f6c0d6..c6cf1b4361c 100644 --- a/src/server/scripts/EasternKingdoms/westfall.cpp +++ b/src/server/scripts/EasternKingdoms/westfall.cpp @@ -31,6 +31,7 @@ EndContentData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" +#include "Player.h" /*###### ## npc_daphne_stilwell diff --git a/src/server/scripts/EasternKingdoms/wetlands.cpp b/src/server/scripts/EasternKingdoms/wetlands.cpp index 34e6e7c9ddf..98f7b0ac967 100644 --- a/src/server/scripts/EasternKingdoms/wetlands.cpp +++ b/src/server/scripts/EasternKingdoms/wetlands.cpp @@ -31,6 +31,7 @@ EndContentData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" +#include "Player.h" /*###### ## npc_tapoke_slim_jahn diff --git a/src/server/scripts/Events/childrens_week.cpp b/src/server/scripts/Events/childrens_week.cpp index 763961271d8..28d033f9d48 100644 --- a/src/server/scripts/Events/childrens_week.cpp +++ b/src/server/scripts/Events/childrens_week.cpp @@ -18,6 +18,7 @@ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellAuras.h" +#include "Player.h" enum Orphans { diff --git a/src/server/scripts/Examples/example_creature.cpp b/src/server/scripts/Examples/example_creature.cpp index 17b9aae732b..1ef15c0ca61 100644 --- a/src/server/scripts/Examples/example_creature.cpp +++ b/src/server/scripts/Examples/example_creature.cpp @@ -26,6 +26,7 @@ EndScriptData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" +#include "Player.h" // **** This script is designed as an example for others to build on **** // **** Please modify whatever you'd like to as this script is only for developement **** diff --git a/src/server/scripts/Examples/example_escort.cpp b/src/server/scripts/Examples/example_escort.cpp index 20e4c5614e9..8cf0dad25d2 100644 --- a/src/server/scripts/Examples/example_escort.cpp +++ b/src/server/scripts/Examples/example_escort.cpp @@ -27,6 +27,7 @@ EndScriptData */ #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "ScriptedEscortAI.h" +#include "Player.h" enum eEnums { diff --git a/src/server/scripts/Examples/example_gossip_codebox.cpp b/src/server/scripts/Examples/example_gossip_codebox.cpp index d6936c8fb9e..352c43fc1de 100644 --- a/src/server/scripts/Examples/example_gossip_codebox.cpp +++ b/src/server/scripts/Examples/example_gossip_codebox.cpp @@ -26,6 +26,7 @@ EndScriptData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" +#include "Player.h" #include <cstring> enum eEnums diff --git a/src/server/scripts/Examples/example_misc.cpp b/src/server/scripts/Examples/example_misc.cpp index 3aa4bac3f1e..5ff66c4a7ed 100644 --- a/src/server/scripts/Examples/example_misc.cpp +++ b/src/server/scripts/Examples/example_misc.cpp @@ -24,6 +24,7 @@ SDCategory: Script Examples EndScriptData */ #include "ScriptMgr.h" +#include "Player.h" enum eSay { diff --git a/src/server/scripts/Examples/example_spell.cpp b/src/server/scripts/Examples/example_spell.cpp index cc27392919f..35e61a5300d 100644 --- a/src/server/scripts/Examples/example_spell.cpp +++ b/src/server/scripts/Examples/example_spell.cpp @@ -26,6 +26,7 @@ #include "SpellAuras.h" #include "SpellAuraEffects.h" #include "SpellScript.h" +#include "Player.h" enum Spells { diff --git a/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp b/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp index a70d05fa0ef..9cc515c1b0d 100644 --- a/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp +++ b/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp @@ -20,6 +20,7 @@ #include "ScriptedGossip.h" #include "blackfathom_deeps.h" #include "ScriptedEscortAI.h" +#include "Player.h" enum Spells { diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp index 1c91d78cd29..afd7603a506 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp @@ -28,6 +28,7 @@ EndScriptData */ #include "hyjal.h" #include "SpellAuras.h" #include "hyjal_trash.h" +#include "Player.h" enum Texts { diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.cpp index 48dd847b190..3ab06642fb5 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.cpp @@ -33,6 +33,7 @@ EndContentData */ #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "hyjalAI.h" +#include "Player.h" #define GOSSIP_ITEM_BEGIN_ALLY "My companions and I are with you, Lady Proudmoore." #define GOSSIP_ITEM_ANETHERON "We are ready for whatever Archimonde might send our way, Lady Proudmoore." diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp index caff71c7320..6ab3e42dcb9 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp @@ -27,6 +27,7 @@ EndScriptData */ #include "InstanceScript.h" #include "ScriptedCreature.h" #include "hyjal_trash.h" +#include "Player.h" enum Misc { diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp index e74ba833908..22ae808e348 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp @@ -21,6 +21,7 @@ #include "culling_of_stratholme.h" #include "ScriptedEscortAI.h" #include "PassiveAI.h" +#include "Player.h" enum Says { diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/instance_culling_of_stratholme.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/instance_culling_of_stratholme.cpp index ea02e8f50b5..9a5bc95853c 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/instance_culling_of_stratholme.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/instance_culling_of_stratholme.cpp @@ -19,6 +19,7 @@ #include "InstanceScript.h" #include "CreatureTextMgr.h" #include "culling_of_stratholme.h" +#include "Player.h" #define MAX_ENCOUNTER 5 diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.cpp index bed3cde6fa4..8fa6c239858 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.cpp @@ -33,6 +33,7 @@ EndContentData */ #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "dark_portal.h" +#include "Player.h" #define SAY_ENTER -1269020 //where does this belong? #define SAY_INTRO -1269021 diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/instance_dark_portal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/instance_dark_portal.cpp index da34eff7b77..926f48a17a2 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/instance_dark_portal.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/instance_dark_portal.cpp @@ -26,6 +26,7 @@ EndScriptData */ #include "ScriptMgr.h" #include "InstanceScript.h" #include "dark_portal.h" +#include "Player.h" #define MAX_ENCOUNTER 2 diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp index 7f7cbeaf566..6995ca5add5 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp @@ -27,6 +27,7 @@ EndScriptData */ #include "ScriptedCreature.h" #include "InstanceScript.h" #include "old_hillsbrad.h" +#include "Player.h" #define MAX_ENCOUNTER 6 diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp index 0158d470ef9..2000d8a52f8 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp @@ -34,6 +34,7 @@ EndContentData */ #include "ScriptedGossip.h" #include "ScriptedEscortAI.h" #include "old_hillsbrad.h" +#include "Player.h" #define QUEST_ENTRY_HILLSBRAD 10282 #define QUEST_ENTRY_DIVERSION 10283 diff --git a/src/server/scripts/Kalimdor/RazorfenDowns/instance_razorfen_downs.cpp b/src/server/scripts/Kalimdor/RazorfenDowns/instance_razorfen_downs.cpp index a0a8bb02d90..a90d465c1ca 100644 --- a/src/server/scripts/Kalimdor/RazorfenDowns/instance_razorfen_downs.cpp +++ b/src/server/scripts/Kalimdor/RazorfenDowns/instance_razorfen_downs.cpp @@ -18,6 +18,7 @@ #include "ScriptMgr.h" #include "InstanceScript.h" #include "razorfen_downs.h" +#include "Player.h" #define MAX_ENCOUNTER 1 diff --git a/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.cpp b/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.cpp index 3a147007fce..443c9f73cfb 100644 --- a/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.cpp +++ b/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.cpp @@ -31,6 +31,7 @@ EndContentData */ #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "razorfen_downs.h" +#include "Player.h" /*### # npc_henry_stern diff --git a/src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp b/src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp index cce0f8b180e..152c38a6b58 100644 --- a/src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp +++ b/src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp @@ -26,6 +26,7 @@ EndScriptData */ #include "ScriptMgr.h" #include "InstanceScript.h" #include "razorfen_kraul.h" +#include "Player.h" #define WARD_KEEPERS_NR 2 diff --git a/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp b/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp index 374059c46ac..7b3cd9f9900 100644 --- a/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp +++ b/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp @@ -31,6 +31,7 @@ EndContentData */ #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" #include "razorfen_kraul.h" +#include "Player.h" #define SAY_READY -1047000 #define SAY_POINT -1047001 diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp index 95c6d033aab..6b569bbd3e5 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp @@ -26,6 +26,7 @@ EndScriptData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "temple_of_ahnqiraj.h" +#include "Player.h" /* * This is a 2 phases events. Here follows an explanation of the main events and transition between phases and sub-phases. diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp index 36388cfbe9c..917c790f42b 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp @@ -27,6 +27,7 @@ EndScriptData */ #include "ScriptedCreature.h" #include "temple_of_ahnqiraj.h" #include "Group.h" +#include "Player.h" #define SAY_AGGRO1 -1531000 #define SAY_AGGRO2 -1531001 diff --git a/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp b/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp index 0d4efac4321..e1a3c3aeb45 100644 --- a/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp +++ b/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp @@ -31,6 +31,7 @@ EndContentData */ #include "ScriptedGossip.h" #include "ScriptedEscortAI.h" #include "wailing_caverns.h" +#include "Player.h" /*###### ## npc_disciple_of_naralex diff --git a/src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp b/src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp index 3a6a3f6241c..4e1508d7cc9 100644 --- a/src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp +++ b/src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp @@ -18,6 +18,7 @@ #include "ScriptMgr.h" #include "InstanceScript.h" #include "zulfarrak.h" +#include "Player.h" #define NPC_GAHZRILLA 7273 #define PATH_ADDS 81553 diff --git a/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp b/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp index 03e3756f964..f288db920f4 100644 --- a/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp +++ b/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp @@ -32,6 +32,7 @@ EndContentData */ #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "zulfarrak.h" +#include "Player.h" /*###### ## npc_sergeant_bly diff --git a/src/server/scripts/Kalimdor/ashenvale.cpp b/src/server/scripts/Kalimdor/ashenvale.cpp index 6a9dd77433a..0e44da371d6 100644 --- a/src/server/scripts/Kalimdor/ashenvale.cpp +++ b/src/server/scripts/Kalimdor/ashenvale.cpp @@ -31,6 +31,7 @@ EndContentData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" +#include "Player.h" /*#### # npc_torek diff --git a/src/server/scripts/Kalimdor/azshara.cpp b/src/server/scripts/Kalimdor/azshara.cpp index 8d08c26f0a7..cf4bb38d559 100644 --- a/src/server/scripts/Kalimdor/azshara.cpp +++ b/src/server/scripts/Kalimdor/azshara.cpp @@ -33,6 +33,7 @@ EndContentData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" +#include "Player.h" /*###### ## mobs_spitelashes diff --git a/src/server/scripts/Kalimdor/bloodmyst_isle.cpp b/src/server/scripts/Kalimdor/bloodmyst_isle.cpp index 3883b740d02..339cd02c2e3 100644 --- a/src/server/scripts/Kalimdor/bloodmyst_isle.cpp +++ b/src/server/scripts/Kalimdor/bloodmyst_isle.cpp @@ -31,6 +31,7 @@ EndContentData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" +#include "Player.h" /*###### ## mob_webbed_creature diff --git a/src/server/scripts/Kalimdor/darkshore.cpp b/src/server/scripts/Kalimdor/darkshore.cpp index 0e02a77169e..4b8329cfaa6 100644 --- a/src/server/scripts/Kalimdor/darkshore.cpp +++ b/src/server/scripts/Kalimdor/darkshore.cpp @@ -34,6 +34,7 @@ EndContentData */ #include "ScriptedGossip.h" #include "ScriptedEscortAI.h" #include "ScriptedFollowerAI.h" +#include "Player.h" /*#### # npc_kerlonian diff --git a/src/server/scripts/Kalimdor/desolace.cpp b/src/server/scripts/Kalimdor/desolace.cpp index e196c71f681..d34c72226b2 100644 --- a/src/server/scripts/Kalimdor/desolace.cpp +++ b/src/server/scripts/Kalimdor/desolace.cpp @@ -34,6 +34,7 @@ EndContentData */ #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "ScriptedEscortAI.h" +#include "Player.h" enum DyingKodo { diff --git a/src/server/scripts/Kalimdor/durotar.cpp b/src/server/scripts/Kalimdor/durotar.cpp index ec06a542b6f..83111829c9e 100644 --- a/src/server/scripts/Kalimdor/durotar.cpp +++ b/src/server/scripts/Kalimdor/durotar.cpp @@ -19,6 +19,7 @@ #include "ScriptedCreature.h" #include "Vehicle.h" #include "SpellScript.h" +#include "Player.h" /*###### ##Quest 5441: Lazy Peons diff --git a/src/server/scripts/Kalimdor/dustwallow_marsh.cpp b/src/server/scripts/Kalimdor/dustwallow_marsh.cpp index 5800a6a58a0..ef7a5a1d8f3 100644 --- a/src/server/scripts/Kalimdor/dustwallow_marsh.cpp +++ b/src/server/scripts/Kalimdor/dustwallow_marsh.cpp @@ -36,6 +36,7 @@ EndContentData */ #include "ScriptedEscortAI.h" #include "ScriptedGossip.h" #include "SpellScript.h" +#include "Player.h" /*###### ## mobs_risen_husk_spirit diff --git a/src/server/scripts/Kalimdor/felwood.cpp b/src/server/scripts/Kalimdor/felwood.cpp index 1a0aa7b21c0..f1d9a9028e1 100644 --- a/src/server/scripts/Kalimdor/felwood.cpp +++ b/src/server/scripts/Kalimdor/felwood.cpp @@ -30,6 +30,7 @@ EndContentData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" +#include "Player.h" /*###### ## npcs_riverbreeze_and_silversky diff --git a/src/server/scripts/Kalimdor/feralas.cpp b/src/server/scripts/Kalimdor/feralas.cpp index c1e247044f7..db2a125bc71 100644 --- a/src/server/scripts/Kalimdor/feralas.cpp +++ b/src/server/scripts/Kalimdor/feralas.cpp @@ -28,6 +28,7 @@ EndScriptData */ #include "ScriptedEscortAI.h" #include "ScriptedGossip.h" #include "SpellScript.h" +#include "Player.h" /*###### ## npc_gregan_brewspewer diff --git a/src/server/scripts/Kalimdor/moonglade.cpp b/src/server/scripts/Kalimdor/moonglade.cpp index 3c8d2267903..8a24828bcc3 100644 --- a/src/server/scripts/Kalimdor/moonglade.cpp +++ b/src/server/scripts/Kalimdor/moonglade.cpp @@ -35,6 +35,7 @@ EndContentData */ #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" #include "ScriptedGossip.h" +#include "Player.h" /*###### ## npc_bunthen_plainswind diff --git a/src/server/scripts/Kalimdor/mulgore.cpp b/src/server/scripts/Kalimdor/mulgore.cpp index 5b35688c2b8..0aa1f55fa32 100644 --- a/src/server/scripts/Kalimdor/mulgore.cpp +++ b/src/server/scripts/Kalimdor/mulgore.cpp @@ -32,6 +32,7 @@ EndContentData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" +#include "Player.h" /*###### # npc_skorn_whitecloud diff --git a/src/server/scripts/Kalimdor/orgrimmar.cpp b/src/server/scripts/Kalimdor/orgrimmar.cpp index fca8d0f5fc5..5080daefbf9 100644 --- a/src/server/scripts/Kalimdor/orgrimmar.cpp +++ b/src/server/scripts/Kalimdor/orgrimmar.cpp @@ -31,6 +31,7 @@ EndContentData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" +#include "Player.h" /*###### ## npc_shenthul diff --git a/src/server/scripts/Kalimdor/silithus.cpp b/src/server/scripts/Kalimdor/silithus.cpp index 45a2fad9999..df7d3b1ee89 100644 --- a/src/server/scripts/Kalimdor/silithus.cpp +++ b/src/server/scripts/Kalimdor/silithus.cpp @@ -33,6 +33,7 @@ EndContentData */ #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "Group.h" +#include "Player.h" /*### ## npc_highlord_demitrian diff --git a/src/server/scripts/Kalimdor/stonetalon_mountains.cpp b/src/server/scripts/Kalimdor/stonetalon_mountains.cpp index d38395c7b37..5cf6d141805 100644 --- a/src/server/scripts/Kalimdor/stonetalon_mountains.cpp +++ b/src/server/scripts/Kalimdor/stonetalon_mountains.cpp @@ -32,6 +32,7 @@ EndContentData */ #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "ScriptedEscortAI.h" +#include "Player.h" /*###### ## npc_braug_dimspirit diff --git a/src/server/scripts/Kalimdor/tanaris.cpp b/src/server/scripts/Kalimdor/tanaris.cpp index 417c8b338c7..8e6f8d57165 100644 --- a/src/server/scripts/Kalimdor/tanaris.cpp +++ b/src/server/scripts/Kalimdor/tanaris.cpp @@ -38,6 +38,7 @@ EndContentData */ #include "ScriptedGossip.h" #include "ScriptedEscortAI.h" #include "ScriptedFollowerAI.h" +#include "Player.h" /*###### ## mob_aquementas diff --git a/src/server/scripts/Kalimdor/teldrassil.cpp b/src/server/scripts/Kalimdor/teldrassil.cpp index 7f2b2fc7f05..6c1993d6447 100644 --- a/src/server/scripts/Kalimdor/teldrassil.cpp +++ b/src/server/scripts/Kalimdor/teldrassil.cpp @@ -30,6 +30,7 @@ EndContentData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedFollowerAI.h" +#include "Player.h" /*#### # npc_mist diff --git a/src/server/scripts/Kalimdor/the_barrens.cpp b/src/server/scripts/Kalimdor/the_barrens.cpp index f4983558b67..228d1fc360a 100644 --- a/src/server/scripts/Kalimdor/the_barrens.cpp +++ b/src/server/scripts/Kalimdor/the_barrens.cpp @@ -36,6 +36,7 @@ EndContentData */ #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "ScriptedEscortAI.h" +#include "Player.h" /*###### ## npc_beaten_corpse diff --git a/src/server/scripts/Kalimdor/thousand_needles.cpp b/src/server/scripts/Kalimdor/thousand_needles.cpp index b9ae356ddf1..7667a8b312c 100644 --- a/src/server/scripts/Kalimdor/thousand_needles.cpp +++ b/src/server/scripts/Kalimdor/thousand_needles.cpp @@ -36,6 +36,7 @@ EndContentData */ #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "ScriptedEscortAI.h" +#include "Player.h" /*##### # npc_kanati diff --git a/src/server/scripts/Kalimdor/thunder_bluff.cpp b/src/server/scripts/Kalimdor/thunder_bluff.cpp index b8b05b9692f..1b10a3a204b 100644 --- a/src/server/scripts/Kalimdor/thunder_bluff.cpp +++ b/src/server/scripts/Kalimdor/thunder_bluff.cpp @@ -26,6 +26,7 @@ EndScriptData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" +#include "Player.h" /*##### # npc_cairne_bloodhoof diff --git a/src/server/scripts/Kalimdor/ungoro_crater.cpp b/src/server/scripts/Kalimdor/ungoro_crater.cpp index 786d2fc0cd3..3da23bea489 100644 --- a/src/server/scripts/Kalimdor/ungoro_crater.cpp +++ b/src/server/scripts/Kalimdor/ungoro_crater.cpp @@ -32,6 +32,7 @@ EndContentData */ #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" #include "ScriptedFollowerAI.h" +#include "Player.h" enum AmeData { diff --git a/src/server/scripts/Kalimdor/winterspring.cpp b/src/server/scripts/Kalimdor/winterspring.cpp index 2c4da0fdf7c..483ee472721 100644 --- a/src/server/scripts/Kalimdor/winterspring.cpp +++ b/src/server/scripts/Kalimdor/winterspring.cpp @@ -30,6 +30,7 @@ EndContentData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" +#include "Player.h" /*###### ## npc_rivern_frostwind diff --git a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_herald_volazj.cpp b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_herald_volazj.cpp index 3a937942118..ff05d6c62d7 100644 --- a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_herald_volazj.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_herald_volazj.cpp @@ -22,6 +22,7 @@ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ahnkahet.h" +#include "Player.h" enum Spells { diff --git a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp index 8e91691bc26..2bb2b1c3cd7 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp +++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp @@ -24,6 +24,7 @@ #include "GameObjectAI.h" #include "ScriptedCreature.h" #include "ruby_sanctum.h" +#include "Player.h" /* ScriptData SDName: ruby_sanctum @@ -1370,7 +1371,7 @@ class spell_halion_combustion_consumption : public SpellScriptLoader public: spell_halion_combustion_consumption_AuraScript(uint32 spellID) : AuraScript(), _markSpell(spellID) { } - bool Validate(SpellEntry const* /*spell*/) + bool Validate(SpellInfo const* /*spell*/) { if (!sSpellMgr->GetSpellInfo(_markSpell)) return false; @@ -1429,7 +1430,7 @@ class spell_halion_marks : public SpellScriptLoader spell_halion_marks_AuraScript(uint32 summonSpell, uint32 removeSpell) : AuraScript(), _summonSpellId(summonSpell), _removeSpellId(removeSpell) { } - bool Validate(SpellEntry const* /*spell*/) + bool Validate(SpellInfo const* /*spell*/) { if (!sSpellMgr->GetSpellInfo(_summonSpellId)) return false; diff --git a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/instance_ruby_sanctum.cpp b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/instance_ruby_sanctum.cpp index bf48132b2b2..3f710d7fedd 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/instance_ruby_sanctum.cpp +++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/instance_ruby_sanctum.cpp @@ -18,7 +18,7 @@ #include "ScriptMgr.h" #include "InstanceScript.h" #include "ruby_sanctum.h" - +#include "Player.h" DoorData const doorData[] = { diff --git a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/ruby_sanctum.cpp b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/ruby_sanctum.cpp index 273c860a2ad..ce543b95fd5 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/ruby_sanctum.cpp +++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/ruby_sanctum.cpp @@ -19,6 +19,7 @@ #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "ruby_sanctum.h" +#include "Player.h" enum Texts { diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_grand_champions.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_grand_champions.cpp index f3b6078d536..35a22c6bf37 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_grand_champions.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_grand_champions.cpp @@ -28,6 +28,7 @@ EndScriptData */ #include "ScriptedEscortAI.h" #include "Vehicle.h" #include "trial_of_the_champion.h" +#include "Player.h" enum eSpells { diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/instance_trial_of_the_champion.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/instance_trial_of_the_champion.cpp index 310dd1003c3..412951b17d4 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/instance_trial_of_the_champion.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/instance_trial_of_the_champion.cpp @@ -25,6 +25,7 @@ EndScriptData */ #include "ScriptedCreature.h" #include "InstanceScript.h" #include "trial_of_the_champion.h" +#include "Player.h" #define MAX_ENCOUNTER 4 diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.cpp index a2488513d63..ffda3d12e2f 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.cpp @@ -31,6 +31,7 @@ EndContentData */ #include "ScriptedGossip.h" #include "trial_of_the_champion.h" #include "Vehicle.h" +#include "Player.h" #define GOSSIP_START_EVENT1 "I'm ready to start challenge." #define GOSSIP_START_EVENT2 "I'm ready for the next challenge." diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp index 564df34462b..0f33c3866dd 100755 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp @@ -34,6 +34,7 @@ EndScriptData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "trial_of_the_crusader.h" +#include "Player.h" enum Yells { diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp index c662daf3671..e376a97dd36 100755 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp @@ -32,6 +32,7 @@ EndScriptData */ #include "SpellScript.h" #include "SpellAuraEffects.h" #include "trial_of_the_crusader.h" +#include "Player.h" enum Yells { diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp index 506467be8a5..e55cd550a95 100755 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp @@ -32,6 +32,7 @@ EndScriptData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "trial_of_the_crusader.h" +#include "Player.h" enum Yells { diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp index af6104008ff..98c1cf24f2b 100755 --- 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 @@ -26,6 +26,7 @@ EndScriptData */ #include "ScriptMgr.h" #include "InstanceScript.h" #include "trial_of_the_crusader.h" +#include "Player.h" class instance_trial_of_the_crusader : public InstanceMapScript { diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp index 0476b2cbacb..2494fec87a9 100755 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp @@ -30,6 +30,7 @@ EndScriptData */ #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "trial_of_the_crusader.h" +#include "Player.h" enum eYells { diff --git a/src/server/scripts/Northrend/DraktharonKeep/boss_tharon_ja.cpp b/src/server/scripts/Northrend/DraktharonKeep/boss_tharon_ja.cpp index 969ccf4a059..79739280055 100644 --- a/src/server/scripts/Northrend/DraktharonKeep/boss_tharon_ja.cpp +++ b/src/server/scripts/Northrend/DraktharonKeep/boss_tharon_ja.cpp @@ -18,6 +18,7 @@ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "drak_tharon_keep.h" +#include "Player.h" enum Spells { diff --git a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp index 4fdcf96192b..9bd0bfc8f6a 100644 --- a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp @@ -18,6 +18,7 @@ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "forge_of_souls.h" +#include "Player.h" /* * TODO: diff --git a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.cpp b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.cpp index c23479eea22..2f89d3bd503 100644 --- a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.cpp @@ -19,6 +19,7 @@ #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "forge_of_souls.h" +#include "Player.h" enum Events { diff --git a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/instance_forge_of_souls.cpp b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/instance_forge_of_souls.cpp index 618b2b6a9a6..135976dde18 100644 --- a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/instance_forge_of_souls.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/instance_forge_of_souls.cpp @@ -18,6 +18,7 @@ #include "ScriptMgr.h" #include "InstanceScript.h" #include "forge_of_souls.h" +#include "Player.h" #define MAX_ENCOUNTER 2 diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp index 26ec9e53213..4f80fd746ee 100644 --- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp @@ -19,6 +19,7 @@ #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "halls_of_reflection.h" +#include "Player.h" enum Yells { diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp index e3604890e39..db2f2051f94 100644 --- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp @@ -19,6 +19,7 @@ #include "ScriptedCreature.h" #include "InstanceScript.h" #include "halls_of_reflection.h" +#include "Player.h" #define MAX_ENCOUNTER 3 diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp index 0d6e779c006..41cfc300958 100644 --- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp @@ -21,6 +21,7 @@ #include "SpellAuraEffects.h" #include "pit_of_saron.h" #include "Vehicle.h" +#include "Player.h" enum Spells { diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp index ef4d9182f82..44d9230a8d2 100644 --- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp @@ -21,6 +21,7 @@ #include "SpellAuraEffects.h" #include "pit_of_saron.h" #include "Vehicle.h" +#include "Player.h" enum Yells { diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp index a6537c45d6f..dcca892358d 100644 --- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp @@ -18,6 +18,7 @@ #include "ScriptMgr.h" #include "InstanceScript.h" #include "pit_of_saron.h" +#include "Player.h" // positions for Martin Victus (37591) and Gorkun Ironskull (37592) Position const SlaveLeaderPos = {689.7158f, -104.8736f, 513.7360f, 0.0f}; diff --git a/src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp b/src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp index 251c9ec2b83..f35228d44d9 100644 --- a/src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp +++ b/src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp @@ -19,6 +19,7 @@ #include "ScriptedCreature.h" #include "SpellAuras.h" #include "gundrak.h" +#include "Player.h" //Spells enum Spells @@ -324,4 +325,4 @@ void AddSC_boss_slad_ran() new mob_slad_ran_constrictor(); new mob_slad_ran_viper(); new achievement_snakes_whyd_it_have_to_be_snakes(); -}
\ No newline at end of file +} diff --git a/src/server/scripts/Northrend/Gundrak/instance_gundrak.cpp b/src/server/scripts/Northrend/Gundrak/instance_gundrak.cpp index 15315c721d7..ae3447b9c68 100644 --- a/src/server/scripts/Northrend/Gundrak/instance_gundrak.cpp +++ b/src/server/scripts/Northrend/Gundrak/instance_gundrak.cpp @@ -18,6 +18,7 @@ #include "ScriptMgr.h" #include "InstanceScript.h" #include "gundrak.h" +#include "Player.h" #define MAX_ENCOUNTER 5 diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp index 1b12f17ce64..f28b94c858e 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp @@ -20,6 +20,7 @@ #include "ScriptedCreature.h" #include "SpellAuraEffects.h" #include "icecrown_citadel.h" +#include "Player.h" enum Texts { diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp index 5d3a6814eb2..70795b38b2a 100755 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp @@ -21,6 +21,7 @@ #include "ScriptedGossip.h" #include "SpellAuras.h" #include "icecrown_citadel.h" +#include "Player.h" enum ScriptTexts { diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp index e2f9faf6a97..8e7f891663e 100755 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp @@ -22,6 +22,7 @@ #include "Group.h" #include "icecrown_citadel.h" #include "SpellInfo.h" +#include "Player.h" enum ScriptTexts { diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp index 0c5cb0aba52..31d57e2ca4e 100755 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp @@ -21,6 +21,7 @@ #include "SpellAuras.h" #include "MapManager.h" #include "icecrown_citadel.h" +#include "Player.h" enum ScriptTexts { diff --git a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h index 31639a698ef..4e117d9f3e3 100755 --- a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h +++ b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h @@ -21,6 +21,7 @@ #include "SpellScript.h" #include "Map.h" #include "Creature.h" +#include "SpellMgr.h" #define ICCScriptName "instance_icecrown_citadel" diff --git a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp index af8aba57a6d..7ff995d4bcf 100755 --- a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp @@ -20,6 +20,7 @@ #include "InstanceScript.h" #include "icecrown_citadel.h" #include "Spell.h" +#include "Player.h" #define GOSSIP_SENDER_ICC_PORT 631 diff --git a/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp index 650f426d29c..dd0068f6327 100755 --- a/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp @@ -23,6 +23,7 @@ #include "PoolMgr.h" #include "AccountMgr.h" #include "icecrown_citadel.h" +#include "Player.h" enum EventIds { diff --git a/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp b/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp index 93eab5df237..95839ef134f 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp @@ -19,6 +19,7 @@ #include "ScriptedCreature.h" #include "SpellScript.h" #include "naxxramas.h" +#include "Player.h" #define SAY_AGGRO RAND(-1533109, -1533110, -1533111) #define SAY_SLAY -1533112 diff --git a/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp b/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp index c88377da3f3..9167db45d20 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp @@ -28,6 +28,7 @@ EndScriptData */ #include "SpellScript.h" #include "SpellAuraEffects.h" #include "naxxramas.h" +#include "Player.h" enum Yells { diff --git a/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp b/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp index a2acf8a64da..ad31ed5e21d 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp @@ -18,6 +18,7 @@ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "naxxramas.h" +#include "Player.h" #define EMOTE_BREATH -1533082 #define EMOTE_ENRAGE -1533083 diff --git a/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp b/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp index e45700ebd72..75b851a2b22 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp @@ -18,7 +18,7 @@ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellScript.h" - +#include "Player.h" #include "naxxramas.h" //Stalagg diff --git a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp index 28f73ed14b0..ab9ed76cb1f 100644 --- a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp +++ b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp @@ -34,6 +34,7 @@ Script Data End */ #include "PassiveAI.h" #include "eye_of_eternity.h" #include "ScriptedEscortAI.h" +#include "Player.h" enum Achievements { diff --git a/src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp b/src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp index f6a12eee519..6e85e701a27 100644 --- a/src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp +++ b/src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp @@ -19,6 +19,7 @@ #include "ScriptedCreature.h" #include "InstanceScript.h" #include "eye_of_eternity.h" +#include "Player.h" class instance_eye_of_eternity : public InstanceMapScript { diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp index 9e6930118f7..bbd86ec6a9f 100644 --- a/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp +++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp @@ -21,6 +21,7 @@ #include "SpellScript.h" #include "SpellAuraEffects.h" #include "nexus.h" +#include "Player.h" enum Spells { diff --git a/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp b/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp index 5d430ae048d..c571def96d7 100644 --- a/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp +++ b/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp @@ -19,6 +19,7 @@ #include "ScriptMgr.h" #include "InstanceScript.h" #include "nexus.h" +#include "Player.h" #define NUMBER_OF_ENCOUNTERS 4 diff --git a/src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp b/src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp index a0b5aded315..0543a317ffa 100644 --- a/src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp +++ b/src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp @@ -19,6 +19,7 @@ #include "ScriptedCreature.h" #include "InstanceScript.h" #include "oculus.h" +#include "Player.h" #define MAX_ENCOUNTER 4 diff --git a/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp b/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp index f00369fd9e2..0e73e929aef 100644 --- a/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp +++ b/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp @@ -23,6 +23,7 @@ #include "Vehicle.h" #include "CombatAI.h" #include "oculus.h" +#include "Player.h" #define GOSSIP_ITEM_DRAKES "So where do we go from here?" #define GOSSIP_ITEM_BELGARISTRASZ1 "I want to fly on the wings of the Red Flight" diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp index fe41e7a12dc..c8ce409213f 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp @@ -26,6 +26,7 @@ EndScriptData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "halls_of_lightning.h" +#include "Player.h" enum eEnums { diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.cpp index a90c346e470..3f5f2deb631 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.cpp @@ -20,6 +20,7 @@ #include "ScriptedGossip.h" #include "ScriptedEscortAI.h" #include "halls_of_stone.h" +#include "Player.h" enum Texts { diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp index 9d8dfa48a68..f53b4a6cae3 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp @@ -24,6 +24,7 @@ #include "MapManager.h" #include "MoveSplineInit.h" #include "ulduar.h" +#include "Player.h" enum Texts { diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp index 8090b9e8a3e..845e694e842 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp @@ -20,6 +20,7 @@ #include "SpellScript.h" #include "SpellAuraEffects.h" #include "ulduar.h" +#include "Player.h" enum VezaxYells { diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp index 24a9171e29f..c5c1f291637 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp @@ -21,6 +21,7 @@ #include "SpellAuraEffects.h" #include "ulduar.h" #include "Vehicle.h" +#include "Player.h" /* ScriptData SDName: boss_kologarn diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp index 6038b7ed9d6..2830e3ada04 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp @@ -23,6 +23,7 @@ #include "SpellScript.h" #include "ulduar.h" #include "SpellInfo.h" +#include "Player.h" enum Says { diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp index 7ada42144a8..afb60e60bf2 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp @@ -29,6 +29,7 @@ #include "SpellAuraEffects.h" #include "ulduar.h" #include "Vehicle.h" +#include "Player.h" enum Spells { diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp index 2f37fb06f24..cc8ff9996f3 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp @@ -19,6 +19,7 @@ #include "ScriptedCreature.h" #include "InstanceScript.h" #include "ulduar.h" +#include "Player.h" static DoorData const doorData[] = { diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar_teleporter.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar_teleporter.cpp index 29eb5ad3367..ab2f778ba9d 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar_teleporter.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar_teleporter.cpp @@ -20,6 +20,7 @@ #include "ScriptedGossip.h" #include "ulduar.h" #include "InstanceScript.h" +#include "Player.h" /* The teleporter appears to be active and stable. diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/instance_utgarde_keep.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/instance_utgarde_keep.cpp index 1e79cc1c5bf..919b0da5fc0 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/instance_utgarde_keep.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/instance_utgarde_keep.cpp @@ -25,6 +25,7 @@ EndScriptData */ #include "ScriptMgr.h" #include "InstanceScript.h" #include "utgarde_keep.h" +#include "Player.h" #define MAX_ENCOUNTER 3 diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp index c694aa88338..e587a864fd6 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp @@ -143,17 +143,10 @@ public: } } } - - switch (near_f) - { - case 1: return 1; - case 2: return 2; - case 3: return 3; - default: return 0; - } + return near_f > 0 && near_f < 4 ? near_f : 0; } - void UpdateAI(const uint32 /*diff*/) + void UpdateAI(uint32 const /* diff */) { if (fm_Type == 0) fm_Type = GetForgeMasterType(); @@ -239,9 +232,115 @@ class spell_fixate : public SpellScriptLoader return new spell_fixate_SpellScript(); } }; + +enum EnslavedProtoDrake +{ + TYPE_PROTODRAKE_AT = 28, + DATA_PROTODRAKE_MOVE = 6, + + PATH_PROTODRAKE = 125946, + + EVENT_REND = 1, + EVENT_FLAME_BREATH = 2, + EVENT_KNOCKAWAY = 3, + + SPELL_REND = 43931, + SPELL_FLAME_BREATH = 50653, + SPELL_KNOCK_AWAY = 49722, + + POINT_LAST = 5, +}; + +const Position protodrakeCheckPos = {206.24f, -190.28f, 200.11f, 0.f}; + +class npc_enslaved_proto_drake : public CreatureScript +{ +public: + npc_enslaved_proto_drake() : CreatureScript("npc_enslaved_proto_drake") { } + + struct npc_enslaved_proto_drakeAI : public ScriptedAI + { + npc_enslaved_proto_drakeAI(Creature* creature) : ScriptedAI(creature) + { + _setData = false; + } + + void Reset() + { + _events.Reset(); + _events.ScheduleEvent(EVENT_REND, urand(2000, 3000)); + _events.ScheduleEvent(EVENT_FLAME_BREATH, urand(5500, 7000)); + _events.ScheduleEvent(EVENT_KNOCKAWAY, urand(3500, 6000)); + } + + void MovementInform(uint32 type, uint32 id) + { + if (type == WAYPOINT_MOTION_TYPE && id == POINT_LAST) + { + me->RemoveByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_HOVER); + } + } + + void SetData(uint32 type, uint32 data) + { + if (type == TYPE_PROTODRAKE_AT && data == DATA_PROTODRAKE_MOVE && !_setData && me->GetDistance(protodrakeCheckPos) < 5.0f) + { + _setData = true; + me->SetByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_HOVER); + me->GetMotionMaster()->MovePath(PATH_PROTODRAKE, false); + } + } + + void UpdateAI(uint32 const diff) + { + if (!UpdateVictim()) + return; + + _events.Update(diff); + + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; + + while (uint32 eventid = _events.ExecuteEvent()) + { + switch (eventid) + { + case EVENT_REND: + DoCast(SPELL_REND); + _events.ScheduleEvent(EVENT_REND, urand(15000, 20000)); + break; + case EVENT_FLAME_BREATH: + DoCast(SPELL_FLAME_BREATH); + _events.ScheduleEvent(EVENT_FLAME_BREATH, urand(11000, 12000)); + break; + case EVENT_KNOCKAWAY: + DoCast(SPELL_KNOCK_AWAY); + _events.ScheduleEvent(EVENT_KNOCKAWAY, urand(7000, 8500)); + break; + default: + break; + } + } + + DoMeleeAttackIfReady(); + } + + private: + bool _setData; + EventMap _events; + + }; + + CreatureAI* GetAI(Creature* creature) const + { + return new npc_enslaved_proto_drakeAI(creature); + } +}; + void AddSC_utgarde_keep() { new npc_dragonflayer_forge_master(); + new npc_enslaved_proto_drake(); new spell_ticking_time_bomb(); new spell_fixate(); } diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp index a6ad7befc38..1635aaac918 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp @@ -28,6 +28,7 @@ Script Data End */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "utgarde_pinnacle.h" +#include "Player.h" //Yell enum eYells diff --git a/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp b/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp index a01b41bfbcf..58d7b59c7dd 100644 --- a/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp +++ b/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp @@ -18,6 +18,7 @@ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "violet_hold.h" +#include "Player.h" enum Spells { diff --git a/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp b/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp index 4b6fed181e4..ed039728bb4 100644 --- a/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp +++ b/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp @@ -18,6 +18,7 @@ #include "ScriptMgr.h" #include "InstanceScript.h" #include "violet_hold.h" +#include "Player.h" #define MAX_ENCOUNTER 3 diff --git a/src/server/scripts/Northrend/VioletHold/violet_hold.cpp b/src/server/scripts/Northrend/VioletHold/violet_hold.cpp index 870ea893b78..c73cb97f2d1 100644 --- a/src/server/scripts/Northrend/VioletHold/violet_hold.cpp +++ b/src/server/scripts/Northrend/VioletHold/violet_hold.cpp @@ -20,6 +20,7 @@ #include "ScriptedGossip.h" #include "ScriptedEscortAI.h" #include "violet_hold.h" +#include "Player.h" #define GOSSIP_START_EVENT "Get your people to safety, we'll keep the Blue Dragonflight's forces at bay." #define GOSSIP_ITEM_1 "Activate the crystals when we get in trouble, right" diff --git a/src/server/scripts/Northrend/borean_tundra.cpp b/src/server/scripts/Northrend/borean_tundra.cpp index 224d06e9d3c..2a83a03caff 100644 --- a/src/server/scripts/Northrend/borean_tundra.cpp +++ b/src/server/scripts/Northrend/borean_tundra.cpp @@ -42,6 +42,7 @@ EndContentData */ #include "ScriptedGossip.h" #include "ScriptedEscortAI.h" #include "ScriptedFollowerAI.h" +#include "Player.h" /*###### ## npc_sinkhole_kill_credit diff --git a/src/server/scripts/Northrend/crystalsong_forest.cpp b/src/server/scripts/Northrend/crystalsong_forest.cpp index 7b8eb331702..09df0acc467 100644 --- a/src/server/scripts/Northrend/crystalsong_forest.cpp +++ b/src/server/scripts/Northrend/crystalsong_forest.cpp @@ -25,6 +25,7 @@ Script Data End */ #include "ScriptMgr.h" #include "ScriptedCreature.h" +#include "Player.h" /******************************************************* * npc_warmage_violetstand @@ -108,4 +109,4 @@ public: void AddSC_crystalsong_forest() { new npc_warmage_violetstand; -}
\ No newline at end of file +} diff --git a/src/server/scripts/Northrend/dalaran.cpp b/src/server/scripts/Northrend/dalaran.cpp index c19effbab1b..371ac897e4e 100644 --- a/src/server/scripts/Northrend/dalaran.cpp +++ b/src/server/scripts/Northrend/dalaran.cpp @@ -26,6 +26,7 @@ Script Data End */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" +#include "Player.h" /******************************************************* * npc_mageguard_dalaran diff --git a/src/server/scripts/Northrend/dragonblight.cpp b/src/server/scripts/Northrend/dragonblight.cpp index a26ee4e9270..13a8370690e 100644 --- a/src/server/scripts/Northrend/dragonblight.cpp +++ b/src/server/scripts/Northrend/dragonblight.cpp @@ -33,6 +33,7 @@ EndContentData */ #include "SpellScript.h" #include "SpellAuraEffects.h" #include "ScriptedEscortAI.h" +#include "Player.h" enum eEnums { diff --git a/src/server/scripts/Northrend/grizzly_hills.cpp b/src/server/scripts/Northrend/grizzly_hills.cpp index 4ca12bc82a1..400fe58d4c4 100644 --- a/src/server/scripts/Northrend/grizzly_hills.cpp +++ b/src/server/scripts/Northrend/grizzly_hills.cpp @@ -19,6 +19,7 @@ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" +#include "Player.h" /*###### ## Quest 12027: Mr. Floppy's Perilous Adventure diff --git a/src/server/scripts/Northrend/howling_fjord.cpp b/src/server/scripts/Northrend/howling_fjord.cpp index ffe38d6aade..e04531954ea 100644 --- a/src/server/scripts/Northrend/howling_fjord.cpp +++ b/src/server/scripts/Northrend/howling_fjord.cpp @@ -31,6 +31,7 @@ EndContentData */ #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "ScriptedEscortAI.h" +#include "Player.h" /*###### ## npc_apothecary_hanes diff --git a/src/server/scripts/Northrend/icecrown.cpp b/src/server/scripts/Northrend/icecrown.cpp index 5989b5bad2e..030df23028c 100644 --- a/src/server/scripts/Northrend/icecrown.cpp +++ b/src/server/scripts/Northrend/icecrown.cpp @@ -31,6 +31,7 @@ EndContentData */ #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "SpellAuras.h" +#include "Player.h" /*###### ## npc_arete diff --git a/src/server/scripts/Northrend/isle_of_conquest.cpp b/src/server/scripts/Northrend/isle_of_conquest.cpp index 1cf8f54b4fe..88d262a1579 100644 --- a/src/server/scripts/Northrend/isle_of_conquest.cpp +++ b/src/server/scripts/Northrend/isle_of_conquest.cpp @@ -19,6 +19,7 @@ #include "ScriptedCreature.h" #include "PassiveAI.h" #include "BattlegroundIC.h" +#include "Player.h" // TO-DO: This should be done with SmartAI, but yet it does not correctly support vehicles's AIs. // Even adding ReactState Passive we still have issues using SmartAI. diff --git a/src/server/scripts/Northrend/sholazar_basin.cpp b/src/server/scripts/Northrend/sholazar_basin.cpp index 63960f13bb7..8404413ad9d 100644 --- a/src/server/scripts/Northrend/sholazar_basin.cpp +++ b/src/server/scripts/Northrend/sholazar_basin.cpp @@ -34,6 +34,7 @@ EndContentData */ #include "ScriptedEscortAI.h" #include "SpellScript.h" #include "SpellAuras.h" +#include "Player.h" /*###### ## npc_injured_rainspeaker_oracle diff --git a/src/server/scripts/Northrend/storm_peaks.cpp b/src/server/scripts/Northrend/storm_peaks.cpp index 1733af17580..7cd87be8370 100644 --- a/src/server/scripts/Northrend/storm_peaks.cpp +++ b/src/server/scripts/Northrend/storm_peaks.cpp @@ -23,6 +23,7 @@ #include "SpellAuraEffects.h" #include "Vehicle.h" #include "CombatAI.h" +#include "Player.h" /*###### ## npc_agnetta_tyrsdottar diff --git a/src/server/scripts/Northrend/wintergrasp.cpp b/src/server/scripts/Northrend/wintergrasp.cpp index d4a3f83ab70..8935c77b30e 100644 --- a/src/server/scripts/Northrend/wintergrasp.cpp +++ b/src/server/scripts/Northrend/wintergrasp.cpp @@ -25,6 +25,7 @@ #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "SpellScript.h" +#include "Player.h" #define GOSSIP_HELLO_DEMO1 "Build catapult." #define GOSSIP_HELLO_DEMO2 "Build demolisher." @@ -560,7 +561,7 @@ public: if (Battlefield* wg = sBattlefieldMgr->GetBattlefieldByBattleId(BATTLEFIELD_BATTLEID_WG)) if (Player* target = GetExplTargetUnit()->ToPlayer()) // check if we are in Wintergrasp at all, SotA uses same teleport spells - if ((target->GetZoneId() == 4197) && target->GetTeamId() != wg->GetDefenderTeam() || target->HasAura(SPELL_WINTERGRASP_TELEPORT_TRIGGER)) + if ((target->GetZoneId() == 4197 && target->GetTeamId() != wg->GetDefenderTeam()) || target->HasAura(SPELL_WINTERGRASP_TELEPORT_TRIGGER)) return SPELL_FAILED_BAD_TARGETS; return SPELL_CAST_OK; } diff --git a/src/server/scripts/Northrend/zuldrak.cpp b/src/server/scripts/Northrend/zuldrak.cpp index 6af96f3fdfd..7acdcae8a77 100644 --- a/src/server/scripts/Northrend/zuldrak.cpp +++ b/src/server/scripts/Northrend/zuldrak.cpp @@ -19,6 +19,7 @@ #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "ScriptedEscortAI.h" +#include "Player.h" /*#### ## npc_drakuru_shackles diff --git a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_shirrak_the_dead_watcher.cpp b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_shirrak_the_dead_watcher.cpp index f678cf9c198..d6465bfe006 100644 --- a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_shirrak_the_dead_watcher.cpp +++ b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_shirrak_the_dead_watcher.cpp @@ -25,6 +25,7 @@ EndScriptData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" +#include "Player.h" #define SPELL_INHIBITMAGIC 32264 #define SPELL_ATTRACTMAGIC 32265 diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_grandmaster_vorpil.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_grandmaster_vorpil.cpp index a1780d1d4a8..303a30bea8f 100644 --- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_grandmaster_vorpil.cpp +++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_grandmaster_vorpil.cpp @@ -26,6 +26,7 @@ EndScriptData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "shadow_labyrinth.h" +#include "Player.h" #define SAY_INTRO -1555028 #define SAY_AGGRO1 -1555029 diff --git a/src/server/scripts/Outland/BlackTemple/black_temple.cpp b/src/server/scripts/Outland/BlackTemple/black_temple.cpp index 5fe5b8aab0c..a100f5848af 100644 --- a/src/server/scripts/Outland/BlackTemple/black_temple.cpp +++ b/src/server/scripts/Outland/BlackTemple/black_temple.cpp @@ -29,8 +29,9 @@ EndContentData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" - #include "ScriptedGossip.h" +#include "ScriptedGossip.h" #include "black_temple.h" +#include "Player.h" /*### # npc_spirit_of_olum diff --git a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp index f812b1b35cd..18145df7302 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp @@ -28,6 +28,7 @@ EndScriptData */ #include "ScriptedGossip.h" #include "PassiveAI.h" #include "black_temple.h" +#include "Player.h" #define GETGO(obj, guid) GameObject* obj = instance->instance->GetGameObject(guid) #define GETUNIT(unit, guid) Unit* unit = Unit::GetUnit(*me, guid) diff --git a/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp b/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp index 2757a862c93..6e770249cf0 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp @@ -27,6 +27,7 @@ EndScriptData */ #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "black_temple.h" +#include "Player.h" #define SAY_DEATH -1564013 #define SAY_LOW_HEALTH -1564014 diff --git a/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp b/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp index e8bee95865f..10f787bee88 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp @@ -26,6 +26,7 @@ EndScriptData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "black_temple.h" +#include "Player.h" enum eEnums { diff --git a/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp b/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp index 98d90aa1818..a1e45fa4d15 100644 --- a/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp +++ b/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp @@ -26,6 +26,7 @@ EndScriptData */ #include "ScriptMgr.h" #include "InstanceScript.h" #include "black_temple.h" +#include "Player.h" #define MAX_ENCOUNTER 9 diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp index 3b94feda02b..ffb4ed3aa12 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp @@ -27,6 +27,7 @@ EndScriptData */ #include "ScriptedCreature.h" #include "serpent_shrine.h" #include "Spell.h" +#include "Player.h" #define SAY_INTRO -1548042 #define SAY_AGGRO1 -1548043 diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp index 9b739a1a6ac..0c6917b320f 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp @@ -26,6 +26,7 @@ EndScriptData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "serpent_shrine.h" +#include "Player.h" // --- Spells used by Leotheras The Blind #define SPELL_WHIRLWIND 37640 diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp index b9e530996af..5bc2344fd70 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp @@ -27,6 +27,7 @@ EndScriptData */ #include "ScriptedCreature.h" #include "serpent_shrine.h" #include "Spell.h" +#include "Player.h" #define SPELL_SPOUT 37433 #define SPELL_SPOUT_ANIM 42835 diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp index 87053d1de1c..e1cd3e69887 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp @@ -26,6 +26,7 @@ EndScriptData */ #include "ScriptMgr.h" #include "InstanceScript.h" #include "serpent_shrine.h" +#include "Player.h" #define MAX_ENCOUNTER 6 #define SPELL_SCALDINGWATER 37284 diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp index 714ea275471..56365216be5 100644 --- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp @@ -25,6 +25,7 @@ EndScriptData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" +#include "Player.h" enum eSays { diff --git a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp index bbf03e39f9b..ebe30166902 100644 --- a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp @@ -26,6 +26,7 @@ EndScriptData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "magtheridons_lair.h" +#include "Player.h" struct Yell { diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp index d2b0475fa77..697d2c9f9f9 100644 --- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp +++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp @@ -20,6 +20,7 @@ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellScript.h" +#include "Player.h" enum Spells { diff --git a/src/server/scripts/Outland/hellfire_peninsula.cpp b/src/server/scripts/Outland/hellfire_peninsula.cpp index 4c44d4e828e..4c0ed3c1d4e 100644 --- a/src/server/scripts/Outland/hellfire_peninsula.cpp +++ b/src/server/scripts/Outland/hellfire_peninsula.cpp @@ -37,6 +37,7 @@ EndContentData */ #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "ScriptedEscortAI.h" +#include "Player.h" /*###### ## npc_aeranas diff --git a/src/server/scripts/Outland/nagrand.cpp b/src/server/scripts/Outland/nagrand.cpp index 977ec57e2df..13adf9182a3 100644 --- a/src/server/scripts/Outland/nagrand.cpp +++ b/src/server/scripts/Outland/nagrand.cpp @@ -32,6 +32,7 @@ EndContentData */ #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "ScriptedEscortAI.h" +#include "Player.h" /*###### ## npc_greatmother_geyah diff --git a/src/server/scripts/Outland/netherstorm.cpp b/src/server/scripts/Outland/netherstorm.cpp index 8533491c15f..eaea4960712 100644 --- a/src/server/scripts/Outland/netherstorm.cpp +++ b/src/server/scripts/Outland/netherstorm.cpp @@ -36,6 +36,7 @@ EndContentData */ #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "ScriptedEscortAI.h" +#include "Player.h" /*###### ## npc_manaforge_control_console diff --git a/src/server/scripts/Outland/shadowmoon_valley.cpp b/src/server/scripts/Outland/shadowmoon_valley.cpp index c84df2ee3d4..5ec017d88b0 100644 --- a/src/server/scripts/Outland/shadowmoon_valley.cpp +++ b/src/server/scripts/Outland/shadowmoon_valley.cpp @@ -46,6 +46,7 @@ EndContentData */ #include "ScriptedEscortAI.h" #include "Group.h" #include "SpellScript.h" +#include "Player.h" /*##### # mob_mature_netherwing_drake diff --git a/src/server/scripts/Outland/shattrath_city.cpp b/src/server/scripts/Outland/shattrath_city.cpp index 8ad2c311fc5..e9264233621 100644 --- a/src/server/scripts/Outland/shattrath_city.cpp +++ b/src/server/scripts/Outland/shattrath_city.cpp @@ -38,6 +38,7 @@ EndContentData */ #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "ScriptedEscortAI.h" +#include "Player.h" /*###### ## npc_raliq_the_drunk diff --git a/src/server/scripts/Outland/terokkar_forest.cpp b/src/server/scripts/Outland/terokkar_forest.cpp index 707cabfcf0c..0963ac63556 100644 --- a/src/server/scripts/Outland/terokkar_forest.cpp +++ b/src/server/scripts/Outland/terokkar_forest.cpp @@ -38,6 +38,7 @@ EndContentData */ #include "ScriptedGossip.h" #include "ScriptedEscortAI.h" #include "Group.h" +#include "Player.h" /*###### ## mob_unkor_the_ruthless diff --git a/src/server/scripts/Outland/zangarmarsh.cpp b/src/server/scripts/Outland/zangarmarsh.cpp index a48866a2f83..0d38a49e11d 100644 --- a/src/server/scripts/Outland/zangarmarsh.cpp +++ b/src/server/scripts/Outland/zangarmarsh.cpp @@ -36,6 +36,7 @@ EndContentData */ #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "ScriptedEscortAI.h" +#include "Player.h" /*###### ## npcs_ashyen_and_keleth diff --git a/src/server/scripts/Spells/spell_dk.cpp b/src/server/scripts/Spells/spell_dk.cpp index b46d2083ecd..224e909ca57 100644 --- a/src/server/scripts/Spells/spell_dk.cpp +++ b/src/server/scripts/Spells/spell_dk.cpp @@ -21,6 +21,7 @@ * Scriptnames of files in this file should be prefixed with "spell_dk_". */ +#include "Player.h" #include "ScriptMgr.h" #include "SpellScript.h" #include "SpellAuraEffects.h" diff --git a/src/server/scripts/Spells/spell_druid.cpp b/src/server/scripts/Spells/spell_druid.cpp index 6119c9050fa..0fe6c367a9a 100644 --- a/src/server/scripts/Spells/spell_druid.cpp +++ b/src/server/scripts/Spells/spell_druid.cpp @@ -21,6 +21,7 @@ * Scriptnames of files in this file should be prefixed with "spell_dru_". */ +#include "Player.h" #include "ScriptMgr.h" #include "SpellScript.h" #include "SpellAuraEffects.h" diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp index 519d79add6d..8e3be212081 100644 --- a/src/server/scripts/Spells/spell_generic.cpp +++ b/src/server/scripts/Spells/spell_generic.cpp @@ -33,6 +33,7 @@ #include "InstanceScript.h" #include "Group.h" #include "LFGMgr.h" +#include "Battleground.h" class spell_gen_absorb0_hitlimit1 : public SpellScriptLoader { diff --git a/src/server/scripts/Spells/spell_holiday.cpp b/src/server/scripts/Spells/spell_holiday.cpp index a1ecac6256a..5b1cbe0c36a 100644 --- a/src/server/scripts/Spells/spell_holiday.cpp +++ b/src/server/scripts/Spells/spell_holiday.cpp @@ -20,6 +20,7 @@ * Scriptnames in this file should be prefixed with "spell_#holidayname_". */ +#include "Player.h" #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellScript.h" diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp index 9d0e084cfb8..0f8fa9614a7 100644 --- a/src/server/scripts/Spells/spell_hunter.cpp +++ b/src/server/scripts/Spells/spell_hunter.cpp @@ -21,6 +21,7 @@ * Scriptnames of files in this file should be prefixed with "spell_hun_". */ +#include "Player.h" #include "ScriptMgr.h" #include "Cell.h" #include "CellImpl.h" diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp index ef810b50b6f..e0c88ad6846 100644 --- a/src/server/scripts/Spells/spell_item.cpp +++ b/src/server/scripts/Spells/spell_item.cpp @@ -21,11 +21,13 @@ * Scriptnames of files in this file should be prefixed with "spell_item_". */ +#include "Player.h" #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellScript.h" #include "SpellAuraEffects.h" #include "SkillDiscovery.h" +#include "Battleground.h" // Generic script for handling item dummy effects which trigger another spell. class spell_item_trigger_spell : public SpellScriptLoader diff --git a/src/server/scripts/Spells/spell_mage.cpp b/src/server/scripts/Spells/spell_mage.cpp index f4bbccc8587..cd096ebed5e 100644 --- a/src/server/scripts/Spells/spell_mage.cpp +++ b/src/server/scripts/Spells/spell_mage.cpp @@ -21,11 +21,11 @@ * Scriptnames of files in this file should be prefixed with "spell_mage_". */ +#include "Player.h" #include "ScriptMgr.h" #include "SpellScript.h" #include "SpellAuraEffects.h" - enum MageSpells { SPELL_MAGE_COLD_SNAP = 11958, diff --git a/src/server/scripts/Spells/spell_paladin.cpp b/src/server/scripts/Spells/spell_paladin.cpp index 41bda3c163d..58f94edb387 100644 --- a/src/server/scripts/Spells/spell_paladin.cpp +++ b/src/server/scripts/Spells/spell_paladin.cpp @@ -21,12 +21,12 @@ * Scriptnames of files in this file should be prefixed with "spell_pal_". */ +#include "Player.h" #include "ScriptMgr.h" #include "SpellScript.h" #include "SpellAuraEffects.h" #include "Group.h" - enum PaladinSpells { PALADIN_SPELL_DIVINE_PLEA = 54428, diff --git a/src/server/scripts/Spells/spell_priest.cpp b/src/server/scripts/Spells/spell_priest.cpp index aee3889e93b..a15eb7ddc2c 100644 --- a/src/server/scripts/Spells/spell_priest.cpp +++ b/src/server/scripts/Spells/spell_priest.cpp @@ -21,6 +21,7 @@ * Scriptnames of files in this file should be prefixed with "spell_pri_". */ +#include "Player.h" #include "ScriptMgr.h" #include "SpellScript.h" #include "SpellAuraEffects.h" diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp index 06d3602d8e8..da80ec8f1da 100644 --- a/src/server/scripts/Spells/spell_quest.cpp +++ b/src/server/scripts/Spells/spell_quest.cpp @@ -21,6 +21,7 @@ * Scriptnames of files in this file should be prefixed with "spell_q#questID_". */ +#include "Player.h" #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellScript.h" diff --git a/src/server/scripts/Spells/spell_rogue.cpp b/src/server/scripts/Spells/spell_rogue.cpp index 68cc50a3022..0294533bdcd 100644 --- a/src/server/scripts/Spells/spell_rogue.cpp +++ b/src/server/scripts/Spells/spell_rogue.cpp @@ -21,6 +21,7 @@ * Scriptnames of files in this file should be prefixed with "spell_rog_". */ +#include "Player.h" #include "ScriptMgr.h" #include "SpellScript.h" #include "SpellAuraEffects.h" diff --git a/src/server/scripts/Spells/spell_shaman.cpp b/src/server/scripts/Spells/spell_shaman.cpp index e107ea954e4..1ba962982e4 100644 --- a/src/server/scripts/Spells/spell_shaman.cpp +++ b/src/server/scripts/Spells/spell_shaman.cpp @@ -21,6 +21,7 @@ * Scriptnames of files in this file should be prefixed with "spell_sha_". */ +#include "Player.h" #include "ScriptMgr.h" #include "GridNotifiers.h" #include "Unit.h" diff --git a/src/server/scripts/Spells/spell_warlock.cpp b/src/server/scripts/Spells/spell_warlock.cpp index aa56f8300bc..f83056aa8b6 100644 --- a/src/server/scripts/Spells/spell_warlock.cpp +++ b/src/server/scripts/Spells/spell_warlock.cpp @@ -21,6 +21,7 @@ * Scriptnames of files in this file should be prefixed with "spell_warl_". */ +#include "Player.h" #include "ScriptMgr.h" #include "SpellScript.h" #include "SpellAuraEffects.h" diff --git a/src/server/scripts/Spells/spell_warrior.cpp b/src/server/scripts/Spells/spell_warrior.cpp index cc8dbe35703..613bf0fef5d 100644 --- a/src/server/scripts/Spells/spell_warrior.cpp +++ b/src/server/scripts/Spells/spell_warrior.cpp @@ -21,6 +21,7 @@ * Scriptnames of files in this file should be prefixed with "spell_warr_". */ +#include "Player.h" #include "ScriptMgr.h" #include "SpellScript.h" #include "SpellAuraEffects.h" diff --git a/src/server/scripts/World/achievement_scripts.cpp b/src/server/scripts/World/achievement_scripts.cpp index a6f4f7f64f9..665acbe86c8 100755 --- a/src/server/scripts/World/achievement_scripts.cpp +++ b/src/server/scripts/World/achievement_scripts.cpp @@ -23,6 +23,7 @@ #include "BattlegroundSA.h" #include "BattlegroundAV.h" #include "Vehicle.h" +#include "Player.h" class achievement_resilient_victory : public AchievementCriteriaScript { diff --git a/src/server/scripts/World/areatrigger_scripts.cpp b/src/server/scripts/World/areatrigger_scripts.cpp index 67aeda314bf..db3c6dd2274 100644 --- a/src/server/scripts/World/areatrigger_scripts.cpp +++ b/src/server/scripts/World/areatrigger_scripts.cpp @@ -37,6 +37,7 @@ EndContentData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" +#include "Player.h" /*###### ## at_coilfang_waterfall diff --git a/src/server/scripts/World/boss_emerald_dragons.cpp b/src/server/scripts/World/boss_emerald_dragons.cpp index abb20130ef8..65677959135 100644 --- a/src/server/scripts/World/boss_emerald_dragons.cpp +++ b/src/server/scripts/World/boss_emerald_dragons.cpp @@ -22,6 +22,7 @@ #include "SpellScript.h" #include "Spell.h" #include "SpellAuraEffects.h" +#include "PassiveAI.h" // // Emerald Dragon NPCs and IDs (kept here for reference) @@ -91,14 +92,12 @@ struct emerald_dragonAI : public WorldBossAI { emerald_dragonAI(Creature* creature) : WorldBossAI(creature) { -// me->m_CombatDistance = 12.0f; -// me->m_SightDistance = 60.0f; } void Reset() { - _Reset(); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE|UNIT_FLAG_NON_ATTACKABLE); + WorldBossAI::Reset(); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE); me->SetReactState(REACT_AGGRESSIVE); DoCast(me, SPELL_MARK_OF_NATURE_AURA, true); events.ScheduleEvent(EVENT_TAIL_SWEEP, 4000); @@ -109,7 +108,8 @@ struct emerald_dragonAI : public WorldBossAI // Target killed during encounter, mark them as suspectible for Aura Of Nature void KilledUnit(Unit* who) { - who->CastSpell(who, SPELL_MARK_OF_NATURE, true); + if (who->GetTypeId() == TYPEID_PLAYER) + who->CastSpell(who, SPELL_MARK_OF_NATURE, true); } // Execute and reschedule base events shared between all Emerald Dragons @@ -216,109 +216,6 @@ class npc_dream_fog : public CreatureScript }; /* - * --- Spell: Dream Fog - */ - -class DreamFogTargetSelector -{ - public: - DreamFogTargetSelector() { } - - bool operator()(WorldObject* object) const - { - return object->ToUnit() && object->ToUnit()->HasAura(SPELL_SLEEP); - } -}; - -class spell_dream_fog_sleep : public SpellScriptLoader -{ - public: - spell_dream_fog_sleep() : SpellScriptLoader("spell_dream_fog_sleep") { } - - class spell_dream_fog_sleep_SpellScript : public SpellScript - { - PrepareSpellScript(spell_dream_fog_sleep_SpellScript); - - void FilterTargets(std::list<WorldObject*>& unitList) - { - unitList.remove_if(DreamFogTargetSelector()); - } - - void Register() - { - OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_dream_fog_sleep_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_DEST_AREA_ENEMY); - } - }; - - SpellScript* GetSpellScript() const - { - return new spell_dream_fog_sleep_SpellScript(); - } -}; - -/* - * --- Spell: Mark of Nature - */ - -class MarkOfNatureTargetSelector -{ - public: - MarkOfNatureTargetSelector() { } - - bool operator()(WorldObject* object) const - { - if (Unit* unit = object->ToUnit()) - // return anyone that isn't tagged or already under the influence of Aura of Nature - return !(unit->HasAura(SPELL_MARK_OF_NATURE) && !unit->HasAura(SPELL_AURA_OF_NATURE)); - return true; - } -}; - -class spell_mark_of_nature : public SpellScriptLoader -{ - public: - spell_mark_of_nature() : SpellScriptLoader("spell_mark_of_nature") { } - - class spell_mark_of_nature_SpellScript : public SpellScript - { - PrepareSpellScript(spell_mark_of_nature_SpellScript); - - bool Validate(SpellInfo const* /*spellInfo*/) - { - if (!sSpellMgr->GetSpellInfo(SPELL_MARK_OF_NATURE)) - return false; - if (!sSpellMgr->GetSpellInfo(SPELL_AURA_OF_NATURE)) - return false; - return true; - } - - void FilterTargets(std::list<WorldObject*>& targets) - { - targets.remove_if(MarkOfNatureTargetSelector()); - } - - void HandleEffect(SpellEffIndex effIndex) - { - PreventHitDefaultEffect(effIndex); - - if (GetHitUnit()) - GetHitUnit()->CastSpell(GetHitUnit(), SPELL_AURA_OF_NATURE, true); - } - - void Register() - { - OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_mark_of_nature_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY); - OnEffectHitTarget += SpellEffectFn(spell_mark_of_nature_SpellScript::HandleEffect, EFFECT_0, SPELL_EFFECT_APPLY_AURA); - } - }; - - SpellScript* GetSpellScript() const - { - return new spell_mark_of_nature_SpellScript(); - } -}; - -/* * --- * --- Dragonspecific scripts and handling: YSONDRE * --- @@ -355,7 +252,6 @@ class boss_ysondre : public CreatureScript void Reset() { _stage = 1; - _Reset(); emerald_dragonAI::Reset(); events.ScheduleEvent(EVENT_LIGHTNING_WAVE, 12000); } @@ -394,7 +290,7 @@ class boss_ysondre : public CreatureScript } private: - uint8 _stage; + uint8 _stage; }; CreatureAI* GetAI(Creature* creature) const @@ -409,8 +305,6 @@ class boss_ysondre : public CreatureScript * --- * * TODO: - * - NPC helper for spirit shades(?) - * - Spirit shade NPC moves towards Lethon and heals him if close enough (each shade heals for 15000 HP) * - Spell: Shadow bolt whirl casts needs custom handling (spellscript) */ @@ -424,7 +318,12 @@ enum LethonSpells { SPELL_DRAW_SPIRIT = 24811, SPELL_SHADOW_BOLT_WHIRL = 24834, - SPELL_SPIRIT_SHADE_VISUAL = 24908, + SPELL_DARK_OFFERING = 24804, +}; + +enum LethonCreatures +{ + NPC_SPIRIT_SHADE = 15261, }; class boss_lethon : public CreatureScript @@ -441,7 +340,6 @@ class boss_lethon : public CreatureScript void Reset() { _stage = 1; - _Reset(); emerald_dragonAI::Reset(); events.ScheduleEvent(EVENT_SHADOW_BOLT_WHIRL, 10000); } @@ -462,12 +360,22 @@ class boss_lethon : public CreatureScript } } + void SpellHitTarget(Unit* target, SpellInfo const* spell) + { + if (spell->Id == SPELL_DRAW_SPIRIT && target->GetTypeId() == TYPEID_PLAYER) + { + Position targetPos; + target->GetPosition(&targetPos); + me->GetMap()->SummonCreature(NPC_SPIRIT_SHADE, targetPos, NULL, 50000, (Unit*)this); + } + } + void ExecuteEvent(uint32 const eventId) { switch (eventId) { case EVENT_SHADOW_BOLT_WHIRL: - DoCast(me, SPELL_SHADOW_BOLT_WHIRL, true); + me->CastSpell((Unit*)NULL, SPELL_SHADOW_BOLT_WHIRL, false); events.ScheduleEvent(EVENT_SHADOW_BOLT_WHIRL, urand(15000, 30000)); break; default: @@ -477,7 +385,7 @@ class boss_lethon : public CreatureScript } private: - uint8 _stage; + uint8 _stage; }; CreatureAI* GetAI(Creature* creature) const @@ -486,6 +394,42 @@ class boss_lethon : public CreatureScript } }; +class npc_spirit_shade : public CreatureScript +{ + public: + npc_spirit_shade() : CreatureScript("npc_spirit_shade") { } + + struct npc_spirit_shadeAI : public PassiveAI + { + npc_spirit_shadeAI(Creature* creature) : PassiveAI(creature), _summonerGuid(0) + { + } + + void IsSummonedBy(Unit* summoner) + { + _summonerGuid = summoner->GetGUID(); + me->GetMotionMaster()->MoveFollow(summoner, 0.0f, 0.0f); + } + + void MovementInform(uint32 moveType, uint32 data) + { + if (moveType == FOLLOW_MOTION_TYPE && data == _summonerGuid) + { + me->CastSpell((Unit*)NULL, SPELL_DARK_OFFERING, false); + me->DespawnOrUnsummon(1000); + } + } + + private: + uint64 _summonerGuid; + }; + + CreatureAI* GetAI(Creature* creature) const + { + return new npc_spirit_shadeAI(creature); + } +}; + /* * --- * --- Dragonspecific scripts and handling: EMERISS @@ -519,7 +463,6 @@ class boss_emeriss : public CreatureScript void Reset() { _stage = 1; - _Reset(); emerald_dragonAI::Reset(); events.ScheduleEvent(EVENT_VOLATILE_INFECTION, 12000); } @@ -562,7 +505,7 @@ class boss_emeriss : public CreatureScript } private: - uint8 _stage; + uint8 _stage; }; CreatureAI* GetAI(Creature* creature) const @@ -607,10 +550,6 @@ class boss_taerar : public CreatureScript { boss_taerarAI(Creature* creature) : emerald_dragonAI(creature) { - _stage = 1; - _shades = 0; - _banished = false; - _banishedTimer = 0; } void Reset() @@ -622,7 +561,6 @@ class boss_taerar : public CreatureScript _banished = false; _banishedTimer = 0; - _Reset(); emerald_dragonAI::Reset(); events.ScheduleEvent(EVENT_ARCANE_BLAST, 12000); events.ScheduleEvent(EVENT_BELLOWING_ROAR, 30000); @@ -655,11 +593,11 @@ class boss_taerar : public CreatureScript uint32 count = sizeof(TaerarShadeSpells) / sizeof(uint32); for (uint32 i = 0; i < count; ++i) - DoCastVictim(TaerarShadeSpells[i], true); + DoCast(me->getVictim(), TaerarShadeSpells[i], true); _shades += count; DoCast(SPELL_SHADE); - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE|UNIT_FLAG_NON_ATTACKABLE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE); me->SetReactState(REACT_PASSIVE); ++_stage; @@ -696,7 +634,7 @@ class boss_taerar : public CreatureScript { _banished = false; - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE|UNIT_FLAG_NON_ATTACKABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE); me->RemoveAurasDueToSpell(SPELL_SHADE); me->SetReactState(REACT_AGGRESSIVE); } @@ -714,10 +652,10 @@ class boss_taerar : public CreatureScript } private: - bool _banished; // used for shades activation testing - uint32 _banishedTimer; // counter for banishment timeout - uint8 _shades; // keep track of how many shades are dead - uint8 _stage; // check which "shade phase" we're at (75-50-25 percentage counters) + bool _banished; // used for shades activation testing + uint32 _banishedTimer; // counter for banishment timeout + uint8 _shades; // keep track of how many shades are dead + uint8 _stage; // check which "shade phase" we're at (75-50-25 percentage counters) }; CreatureAI* GetAI(Creature* creature) const @@ -726,18 +664,122 @@ class boss_taerar : public CreatureScript } }; +/* + * --- Spell: Dream Fog + */ + +class DreamFogTargetSelector +{ + public: + DreamFogTargetSelector() { } + + bool operator()(WorldObject* object) + { + if (Unit* unit = object->ToUnit()) + return unit->HasAura(SPELL_SLEEP); + return true; + } +}; + +class spell_dream_fog_sleep : public SpellScriptLoader +{ + public: + spell_dream_fog_sleep() : SpellScriptLoader("spell_dream_fog_sleep") { } + + class spell_dream_fog_sleep_SpellScript : public SpellScript + { + PrepareSpellScript(spell_dream_fog_sleep_SpellScript); + + void FilterTargets(std::list<WorldObject*>& targets) + { + targets.remove_if(DreamFogTargetSelector()); + } + + void Register() + { + OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_dream_fog_sleep_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_DEST_AREA_ENEMY); + } + }; + + SpellScript* GetSpellScript() const + { + return new spell_dream_fog_sleep_SpellScript(); + } +}; + +/* + * --- Spell: Mark of Nature + */ + +class MarkOfNatureTargetSelector +{ + public: + MarkOfNatureTargetSelector() { } + + bool operator()(WorldObject* object) + { + // return those not tagged or already under the influence of Aura of Nature + if (Unit* unit = object->ToUnit()) + return !(unit->HasAura(SPELL_MARK_OF_NATURE) && !unit->HasAura(SPELL_AURA_OF_NATURE)); + return true; + } +}; + +class spell_mark_of_nature : public SpellScriptLoader +{ + public: + spell_mark_of_nature() : SpellScriptLoader("spell_mark_of_nature") { } + + class spell_mark_of_nature_SpellScript : public SpellScript + { + PrepareSpellScript(spell_mark_of_nature_SpellScript); + + bool Validate(SpellInfo const* /*spellInfo*/) + { + if (!sSpellMgr->GetSpellInfo(SPELL_MARK_OF_NATURE)) + return false; + if (!sSpellMgr->GetSpellInfo(SPELL_AURA_OF_NATURE)) + return false; + return true; + } + + void FilterTargets(std::list<WorldObject*>& targets) + { + targets.remove_if(MarkOfNatureTargetSelector()); + } + + void HandleEffect(SpellEffIndex effIndex) + { + PreventHitDefaultEffect(effIndex); + GetHitUnit()->CastSpell(GetHitUnit(), SPELL_AURA_OF_NATURE, true); + } + + void Register() + { + OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_mark_of_nature_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY); + OnEffectHitTarget += SpellEffectFn(spell_mark_of_nature_SpellScript::HandleEffect, EFFECT_0, SPELL_EFFECT_APPLY_AURA); + } + }; + + SpellScript* GetSpellScript() const + { + return new spell_mark_of_nature_SpellScript(); + } +}; + void AddSC_emerald_dragons() { // helper NPC scripts new npc_dream_fog(); - - // dragon spellscripts - new spell_dream_fog_sleep(); - new spell_mark_of_nature(); + new npc_spirit_shade(); // dragons new boss_ysondre(); new boss_taerar(); new boss_emeriss(); new boss_lethon(); + + // dragon spellscripts + new spell_dream_fog_sleep(); + new spell_mark_of_nature(); }; diff --git a/src/server/scripts/World/go_scripts.cpp b/src/server/scripts/World/go_scripts.cpp index ddb0044a888..4abb06198ba 100644 --- a/src/server/scripts/World/go_scripts.cpp +++ b/src/server/scripts/World/go_scripts.cpp @@ -55,6 +55,7 @@ EndContentData */ #include "ScriptedGossip.h" #include "GameObjectAI.h" #include "Spell.h" +#include "Player.h" /*###### ## go_cat_figurine diff --git a/src/server/scripts/World/guards.cpp b/src/server/scripts/World/guards.cpp index 4b0433fe0c7..5ca3984f92a 100644 --- a/src/server/scripts/World/guards.cpp +++ b/src/server/scripts/World/guards.cpp @@ -32,6 +32,7 @@ EndContentData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "GuardAI.h" +#include "Player.h" enum GuardGeneric { diff --git a/src/server/scripts/World/item_scripts.cpp b/src/server/scripts/World/item_scripts.cpp index d888e6cb56b..535bebd9415 100644 --- a/src/server/scripts/World/item_scripts.cpp +++ b/src/server/scripts/World/item_scripts.cpp @@ -33,6 +33,7 @@ EndContentData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "Spell.h" +#include "Player.h" /*##### # item_only_for_flight diff --git a/src/server/scripts/World/npc_innkeeper.cpp b/src/server/scripts/World/npc_innkeeper.cpp index f57af517db2..e02e67e97f6 100644 --- a/src/server/scripts/World/npc_innkeeper.cpp +++ b/src/server/scripts/World/npc_innkeeper.cpp @@ -27,6 +27,7 @@ EndScriptData */ #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "GameEventMgr.h" +#include "Player.h" #define HALLOWEEN_EVENTID 12 #define SPELL_TRICK_OR_TREATED 24755 diff --git a/src/server/scripts/World/npc_professions.cpp b/src/server/scripts/World/npc_professions.cpp index 175cfb190d7..69111b3b058 100644 --- a/src/server/scripts/World/npc_professions.cpp +++ b/src/server/scripts/World/npc_professions.cpp @@ -26,6 +26,7 @@ EndScriptData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" +#include "Player.h" /* A few notes for future developement: diff --git a/src/server/scripts/World/npc_taxi.cpp b/src/server/scripts/World/npc_taxi.cpp index efdd4da73d6..5414d896dd0 100644 --- a/src/server/scripts/World/npc_taxi.cpp +++ b/src/server/scripts/World/npc_taxi.cpp @@ -27,6 +27,7 @@ EndScriptData #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" +#include "Player.h" #define GOSSIP_SUSURRUS "I am ready." #define GOSSIP_NETHER_DRAKE "I'm ready to fly! Take me up, dragon!" @@ -51,8 +52,6 @@ EndScriptData #define GOSSIP_TARIOLSTRASZ2 "Can you spare a drake to travel to Lord Of Afrasastrasz, in the middle of the temple?" #define GOSSIP_TORASTRASZA1 "I would like to see Lord Of Afrasastrasz, in the middle of the temple." #define GOSSIP_TORASTRASZA2 "Yes, Please. I would like to return to the ground floor of the temple." -#define GOSSIP_CAMILLE1 "I need to fly to the Windrunner Official business!" -#define GOSSIP_CAMILLE2 "<The riding bat for the special task is necessary to me.>" #define GOSSIP_CRIMSONWING "<Ride the gryphons to Survey Alcaz Island>" #define GOSSIP_THRICESTAR1 "Do you think I could take a ride on one of those flying machines?" #define GOSSIP_THRICESTAR2 "Kara, I need to be flown out the Dens of Dying to find Bixie." @@ -159,12 +158,6 @@ public: // top -> ground player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TORASTRASZA2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 22); break; - case 23816: // Howling Fjord - Bat Handler Camille - if (!player->GetQuestRewardStatus(11229)) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_CAMILLE1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 23); - if (player->GetQuestStatus(11170) == QUEST_STATUS_INCOMPLETE) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_CAMILLE2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 24); - break; case 23704: // Dustwallow Marsh - Cassa Crimsonwing if (player->GetQuestStatus(11142) == QUEST_STATUS_INCOMPLETE) player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_CRIMSONWING, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+25); diff --git a/src/server/shared/AutoPtr.h b/src/server/shared/AutoPtr.h index f4199880abd..9afa05325c9 100644 --- a/src/server/shared/AutoPtr.h +++ b/src/server/shared/AutoPtr.h @@ -22,32 +22,32 @@ namespace Trinity { - template <class Pointer, class Lock> - class AutoPtr : public ACE_Strong_Bound_Ptr<Pointer, Lock> + +template <class Pointer, class Lock> +class AutoPtr : public ACE_Strong_Bound_Ptr<Pointer, Lock> +{ + typedef ACE_Strong_Bound_Ptr<Pointer, Lock> Base; + +public: + AutoPtr() + : Base() + { } + + AutoPtr(Pointer* x) + : Base(x) + { } + + operator bool() const + { + return !Base::null(); + } + + bool operator !() const { - public: - AutoPtr() : ACE_Strong_Bound_Ptr<Pointer, Lock>() {} - - AutoPtr(Pointer* x) - { - ACE_Strong_Bound_Ptr<Pointer, Lock>::reset(x); - } - - operator bool() const - { - return ACE_Strong_Bound_Ptr<Pointer, Lock>::get() != NULL; - } - - bool operator !() const - { - return ACE_Strong_Bound_Ptr<Pointer, Lock>::get() == NULL; - } - - bool operator !=(Pointer* x) const - { - return ACE_Strong_Bound_Ptr<Pointer, Lock>::get() != x; - } - }; -} + return Base::null(); + } +}; + +} // namespace Trinity #endif diff --git a/src/server/shared/CMakeLists.txt b/src/server/shared/CMakeLists.txt index de998442419..e9f414d34e5 100644 --- a/src/server/shared/CMakeLists.txt +++ b/src/server/shared/CMakeLists.txt @@ -28,11 +28,9 @@ file(GLOB sources_localdir *.cpp *.h) # Build shared sourcelist # -if( USE_COREPCH AND MSVC ) - set(shared_STAT_SRCS - PrecompiledHeaders/sharedPCH.cpp - PrecompiledHeaders/sharedPCH.h - ) +if (USE_COREPCH) + set(shared_STAT_PCH_HDR PrecompiledHeaders/sharedPCH.h) + set(shared_STAT_PCH_SRC PrecompiledHeaders/sharedPCH.cpp) endif() set(shared_STAT_SRCS @@ -73,18 +71,16 @@ include_directories( ${OPENSSL_INCLUDE_DIR} ) -add_library(shared STATIC ${shared_STAT_SRCS}) +add_library(shared STATIC + ${shared_STAT_SRCS} + ${shared_STAT_PCH_SRC} +) target_link_libraries(shared ${ACE_LIBRARY} ) # Generate precompiled header -if( USE_COREPCH ) - if(CMAKE_COMPILER_IS_GNUCXX) - add_precompiled_header(shared ${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders/sharedPCH.h) - elseif(MSVC) - add_native_precompiled_header(shared ${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders/sharedPCH) - endif() -endif() - +if (USE_COREPCH) + add_cxx_pch(shared ${shared_STAT_PCH_HDR} ${shared_STAT_PCH_SRC}) +endif () diff --git a/src/server/shared/Cryptography/BigNumber.cpp b/src/server/shared/Cryptography/BigNumber.cpp index 8e424e9bcdb..def0a7fd02e 100755 --- a/src/server/shared/Cryptography/BigNumber.cpp +++ b/src/server/shared/Cryptography/BigNumber.cpp @@ -192,12 +192,12 @@ uint8 *BigNumber::AsByteArray(int minSize, bool reverse) return _array; } -const char *BigNumber::AsHexStr() +char * BigNumber::AsHexStr() const { return BN_bn2hex(_bn); } -const char *BigNumber::AsDecStr() +char * BigNumber::AsDecStr() const { return BN_bn2dec(_bn); } diff --git a/src/server/shared/Cryptography/BigNumber.h b/src/server/shared/Cryptography/BigNumber.h index a27d74fb5c7..36a618056a5 100755 --- a/src/server/shared/Cryptography/BigNumber.h +++ b/src/server/shared/Cryptography/BigNumber.h @@ -84,8 +84,8 @@ class BigNumber uint32 AsDword(); uint8* AsByteArray(int minSize = 0, bool reverse = true); - const char *AsHexStr(); - const char *AsDecStr(); + char * AsHexStr() const; + char * AsDecStr() const; private: struct bignum_st *_bn; diff --git a/src/server/shared/Database/PreparedStatement.h b/src/server/shared/Database/PreparedStatement.h index 11ece3e3032..90ea435d1f9 100755 --- a/src/server/shared/Database/PreparedStatement.h +++ b/src/server/shared/Database/PreparedStatement.h @@ -21,6 +21,10 @@ #include "SQLOperation.h" #include <ace/Future.h> +#ifdef __APPLE__ +#undef TYPE_BOOL +#endif + //- Union for data buffer (upper-level bind -> queue -> lower-level bind) union PreparedStatementDataUnion { @@ -157,4 +161,4 @@ class PreparedStatementTask : public SQLOperation bool m_has_result; PreparedQueryResultFuture m_result; }; -#endif
\ No newline at end of file +#endif diff --git a/src/server/shared/Database/QueryResult.h b/src/server/shared/Database/QueryResult.h index e32b16555bc..be7fa7b649c 100755 --- a/src/server/shared/Database/QueryResult.h +++ b/src/server/shared/Database/QueryResult.h @@ -23,7 +23,6 @@ #include <ace/Thread_Mutex.h> #include "Field.h" -#include "Log.h" #ifdef _WIN32 #include <winsock2.h> diff --git a/src/server/shared/Packets/ByteBuffer.h b/src/server/shared/Packets/ByteBuffer.h index 1fa3148504a..e79544e7315 100755 --- a/src/server/shared/Packets/ByteBuffer.h +++ b/src/server/shared/Packets/ByteBuffer.h @@ -372,7 +372,7 @@ class ByteBuffer lt.tm_mon = (packedDate >> 20) & 0xF; lt.tm_year = ((packedDate >> 24) & 0x1F) + 100; - return mktime(<) + timezone; + return uint32(mktime(<) + timezone); } ByteBuffer& ReadPackedTime(uint32& time) diff --git a/src/server/shared/Threading/DelayExecutor.cpp b/src/server/shared/Threading/DelayExecutor.cpp index cfc4987387f..685e86e2a2f 100644 --- a/src/server/shared/Threading/DelayExecutor.cpp +++ b/src/server/shared/Threading/DelayExecutor.cpp @@ -59,7 +59,7 @@ int DelayExecutor::svc() return 0; } -int DelayExecutor::activate(int num_threads, ACE_Method_Request* pre_svc_hook, ACE_Method_Request* post_svc_hook) +int DelayExecutor::start(int num_threads, ACE_Method_Request* pre_svc_hook, ACE_Method_Request* post_svc_hook) { if (activated()) return -1; diff --git a/src/server/shared/Threading/DelayExecutor.h b/src/server/shared/Threading/DelayExecutor.h index 664d8ca78a2..5eaaacdb98b 100644 --- a/src/server/shared/Threading/DelayExecutor.h +++ b/src/server/shared/Threading/DelayExecutor.h @@ -16,7 +16,7 @@ class DelayExecutor : protected ACE_Task_Base int execute(ACE_Method_Request* new_req); - int activate(int num_threads = 1, ACE_Method_Request* pre_svc_hook = NULL, ACE_Method_Request* post_svc_hook = NULL); + int start(int num_threads = 1, ACE_Method_Request* pre_svc_hook = NULL, ACE_Method_Request* post_svc_hook = NULL); int deactivate(); diff --git a/src/server/worldserver/CMakeLists.txt b/src/server/worldserver/CMakeLists.txt index eb5bb04d766..58167aad703 100644 --- a/src/server/worldserver/CMakeLists.txt +++ b/src/server/worldserver/CMakeLists.txt @@ -14,15 +14,9 @@ file(GLOB_RECURSE sources_TCSoap TCSoap/*.cpp TCSoap/*.h) file(GLOB_RECURSE sources_WorldThread WorldThread/*.cpp WorldThread/*.h) file(GLOB sources_localdir *.cpp *.h) -if( USE_COREPCH ) - include_directories(${CMAKE_CURRENT_BINARY_DIR}) -endif() - -if ( USE_COREPCH AND MSVC ) - set(worldserver_SRCS - PrecompiledHeaders/worldPCH.cpp - PrecompiledHeaders/worldPCH.h - ) +if (USE_COREPCH) + set(worldserver_PCH_HDR PrecompiledHeaders/worldPCH.h) + set(worldserver_PCH_SRC PrecompiledHeaders/worldPCH.cpp) endif() set(worldserver_SRCS @@ -143,17 +137,21 @@ include_directories( ${OPENSSL_INCLUDE_DIR} ) -set(worldserver_LINK_FLAGS "") - -add_executable(worldserver ${worldserver_SRCS}) +add_executable(worldserver + ${worldserver_SRCS} + ${worldserver_PCH_SRC} +) if( NOT WIN32 ) - add_definitions(-D_TRINITY_CORE_CONFIG='"${CONF_DIR}/worldserver.conf"') + set_target_properties(worldserver PROPERTIES + COMPILE_DEFINITIONS _TRINITY_CORE_CONFIG="${CONF_DIR}/worldserver.conf" + ) endif() add_dependencies(worldserver revision.h) -if( UNIX ) + +if( UNIX AND NOT NOJEM ) set(worldserver_LINK_FLAGS "-pthread -lncurses ${worldserver_LINK_FLAGS}") endif() @@ -172,9 +170,7 @@ target_link_libraries(worldserver ${ACE_LIBRARY} ${MYSQL_LIBRARY} ${OPENSSL_LIBRARIES} - ${OPENSSL_EXTRA_LIBRARIES} ${ZLIB_LIBRARIES} - ${OSX_LIBS} ) if( WIN32 ) @@ -194,9 +190,5 @@ endif() # Generate precompiled header if( USE_COREPCH ) - if(CMAKE_COMPILER_IS_GNUCXX) - add_precompiled_header(worldserver ${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders/worldPCH.h) - elseif(MSVC) - add_native_precompiled_header(worldserver ${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders/worldPCH) - endif() + add_cxx_pch(worldserver ${worldserver_PCH_HDR} ${worldserver_PCH_SRC}) endif() |