From 9ee32331d7083a19ebfd17b32ec6779426140618 Mon Sep 17 00:00:00 2001 From: ille Date: Sat, 3 Nov 2012 15:48:27 +0100 Subject: use Thread-Safe Interface design pattern to allow recursive calls on non windows os described here http://wiki.hsr.ch/PnProg/files/ThreadSafeInterface.pdf http://www.aoc.nrao.edu/php/tjuerges/ALMA/ACE-5.5.2/html/ace/classACE__Thread__Mutex.html#_details recursion in : EnsureGridCreated() -> LoadMapAndVMap() -> LoadMap() -> EnsureGridCreated() --- src/server/game/Maps/Map.cpp | 36 +++++++++++++++++++----------------- src/server/game/Maps/Map.h | 1 + 2 files changed, 20 insertions(+), 17 deletions(-) (limited to 'src/server/game/Maps') diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index 5ef0769e5c2..934aa1dc4bc 100755 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -144,7 +144,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 +307,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 bool IsGridLoaded(const GridCoord &) const; void EnsureGridCreated(const GridCoord &); + void EnsureGridCreated_i(const GridCoord &); bool EnsureGridLoaded(Cell const&); void EnsureGridLoadedForActiveObject(Cell const&, WorldObject* object); -- cgit v1.2.3 From 333b8e5159ada2f1b8cbfd1dd8eb9072754477d7 Mon Sep 17 00:00:00 2001 From: Spp Date: Fri, 9 Nov 2012 13:13:45 +0100 Subject: Core/Build: Enable Clang PCH support and OS X specific features Core: Fix warnings here and there --- .gitignore | 4 +- cmake/compiler/clang/settings.cmake | 15 + cmake/compiler/gcc/settings.cmake | 20 +- cmake/compiler/xcode/settings.cmake | 2 - cmake/macros/FindOpenSSL.cmake | 180 ---------- cmake/macros/FindPCHSupport.cmake | 399 +++++---------------- cmake/platform/osx/settings.cmake | 8 +- cmake/platform/unix/settings.cmake | 1 + src/server/authserver/CMakeLists.txt | 40 +-- src/server/authserver/Server/AuthSocket.cpp | 6 +- src/server/authserver/Server/RealmSocket.cpp | 2 +- src/server/authserver/Server/RealmSocket.h | 2 +- src/server/collision/CMakeLists.txt | 28 +- src/server/collision/RegularGrid.h | 2 +- src/server/game/Achievements/AchievementMgr.cpp | 1 - src/server/game/Battlefield/Battlefield.h | 2 + src/server/game/Battlefield/Zones/BattlefieldWG.h | 8 +- src/server/game/CMakeLists.txt | 29 +- src/server/game/DataStores/DBCEnums.h | 280 +++++++-------- src/server/game/Handlers/ChatHandler.cpp | 4 +- src/server/game/Handlers/PetHandler.cpp | 12 +- src/server/game/Maps/MapUpdater.cpp | 2 +- src/server/game/Movement/MovementGenerator.h | 14 +- .../ConfusedMovementGenerator.cpp | 22 +- .../MovementGenerators/ConfusedMovementGenerator.h | 8 +- .../FleeingMovementGenerator.cpp | 24 +- .../MovementGenerators/FleeingMovementGenerator.h | 8 +- .../MovementGenerators/HomeMovementGenerator.cpp | 8 +- .../MovementGenerators/HomeMovementGenerator.h | 8 +- .../MovementGenerators/PointMovementGenerator.cpp | 24 +- .../MovementGenerators/PointMovementGenerator.h | 8 +- .../MovementGenerators/RandomMovementGenerator.cpp | 10 +- .../MovementGenerators/RandomMovementGenerator.h | 8 +- .../TargetedMovementGenerator.cpp | 46 +-- .../MovementGenerators/TargetedMovementGenerator.h | 14 +- .../WaypointMovementGenerator.cpp | 18 +- .../MovementGenerators/WaypointMovementGenerator.h | 16 +- src/server/game/Server/WorldSession.h | 2 +- src/server/game/Texts/CreatureTextMgr.cpp | 6 +- src/server/game/Texts/CreatureTextMgr.h | 12 +- src/server/scripts/CMakeLists.txt | 28 +- src/server/scripts/Commands/cs_wp.cpp | 2 +- .../ChamberOfAspects/RubySanctum/boss_halion.cpp | 4 +- src/server/scripts/Northrend/wintergrasp.cpp | 2 +- src/server/shared/AutoPtr.h | 52 +-- src/server/shared/CMakeLists.txt | 25 +- src/server/shared/Cryptography/BigNumber.cpp | 4 +- src/server/shared/Cryptography/BigNumber.h | 4 +- src/server/shared/Database/PreparedStatement.h | 6 +- src/server/shared/Database/QueryResult.h | 1 - src/server/shared/Threading/DelayExecutor.cpp | 2 +- src/server/shared/Threading/DelayExecutor.h | 2 +- src/server/worldserver/CMakeLists.txt | 34 +- 53 files changed, 517 insertions(+), 952 deletions(-) create mode 100644 cmake/compiler/clang/settings.cmake delete mode 100644 cmake/compiler/xcode/settings.cmake delete mode 100644 cmake/macros/FindOpenSSL.cmake (limited to 'src/server/game/Maps') 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/FindOpenSSL.cmake b/cmake/macros/FindOpenSSL.cmake deleted file mode 100644 index 245a91d4199..00000000000 --- a/cmake/macros/FindOpenSSL.cmake +++ /dev/null @@ -1,180 +0,0 @@ -# - Try to find the OpenSSL encryption library -# Once done this will define -# -# OPENSSL_ROOT_DIR - Set this variable to the root installation of OpenSSL -# -# Read-Only variables: -# OPENSSL_FOUND - system has the OpenSSL library -# OPENSSL_INCLUDE_DIR - the OpenSSL include directory -# OPENSSL_LIBRARIES - The libraries needed to use OpenSSL - -#============================================================================= -# Copyright 2006-2009 Kitware, Inc. -# Copyright 2006 Alexander Neundorf -# Copyright 2009-2010 Mathieu Malaterre -# -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file Copyright.txt for details. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= -# (To distributed this file outside of CMake, substitute the full -# License text for the above reference.) - -# http://www.slproweb.com/products/Win32OpenSSL.html - -SET(_OPENSSL_ROOT_HINTS - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (32-bit)_is1;Inno Setup: App Path]" - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (64-bit)_is1;Inno Setup: App Path]" - ) - -IF(PLATFORM EQUAL 64) - SET(_OPENSSL_ROOT_PATHS - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (64-bit)_is1;InstallLocation]" - "C:/OpenSSL-Win64/" - "C:/OpenSSL/" - ) -ELSE() - SET(_OPENSSL_ROOT_PATHS - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (32-bit)_is1;InstallLocation]" - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (32-bit)_is1;InstallLocation]" - "C:/OpenSSL/" - ) -ENDIF() - -FIND_PATH(OPENSSL_ROOT_DIR - NAMES - include/openssl/ssl.h - HINTS - ${_OPENSSL_ROOT_HINTS} - PATHS - ${_OPENSSL_ROOT_PATHS} -) -MARK_AS_ADVANCED(OPENSSL_ROOT_DIR) - -# Re-use the previous path: -FIND_PATH(OPENSSL_INCLUDE_DIR openssl/ssl.h - ${OPENSSL_ROOT_DIR}/include -) - -IF(WIN32 AND NOT CYGWIN) - # MINGW should go here too - IF(MSVC) - # /MD and /MDd are the standard values - if someone wants to use - # others, the libnames have to change here too - # use also ssl and ssleay32 in debug as fallback for openssl < 0.9.8b - # TODO: handle /MT and static lib - # In Visual C++ naming convention each of these four kinds of Windows libraries has it's standard suffix: - # * MD for dynamic-release - # * MDd for dynamic-debug - # * MT for static-release - # * MTd for static-debug - - # Implementation details: - # We are using the libraries located in the VC subdir instead of the parent directory eventhough : - # libeay32MD.lib is identical to ../libeay32.lib, and - # ssleay32MD.lib is identical to ../ssleay32.lib - - FIND_LIBRARY(LIB_EAY_DEBUG - NAMES - libeay32MDd libeay32 - PATHS - ${OPENSSL_ROOT_DIR}/lib/VC - ) - - FIND_LIBRARY(LIB_EAY_RELEASE - NAMES - libeay32MD libeay32 - PATHS - ${OPENSSL_ROOT_DIR}/lib/VC - ) - - FIND_LIBRARY(SSL_EAY_DEBUG - NAMES - ssleay32MDd ssleay32 ssl - PATHS - ${OPENSSL_ROOT_DIR}/lib/VC - ) - - FIND_LIBRARY(SSL_EAY_RELEASE - NAMES - ssleay32MD ssleay32 ssl - PATHS - ${OPENSSL_ROOT_DIR}/lib/VC - ) - - if( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE ) - set( OPENSSL_LIBRARIES - optimized ${SSL_EAY_RELEASE} ${LIB_EAY_RELEASE} - debug ${SSL_EAY_DEBUG} ${LIB_EAY_DEBUG} - ) - else() - set( OPENSSL_LIBRARIES - ${SSL_EAY_RELEASE} - ${LIB_EAY_RELEASE} - ) - endif() - - MARK_AS_ADVANCED(SSL_EAY_DEBUG SSL_EAY_RELEASE LIB_EAY_DEBUG LIB_EAY_RELEASE) - ELSEIF(MINGW) - - # same player, for MingW - FIND_LIBRARY(LIB_EAY - NAMES - libeay32 - PATHS - ${OPENSSL_ROOT_DIR}/lib/MinGW - ) - - FIND_LIBRARY(SSL_EAY NAMES - NAMES - ssleay32 - PATHS - ${OPENSSL_ROOT_DIR}/lib/MinGW - ) - - MARK_AS_ADVANCED(SSL_EAY LIB_EAY) - - set( OPENSSL_LIBRARIES - ${SSL_EAY} - ${LIB_EAY} - ) - ELSE(MSVC) - # Not sure what to pick for -say- intel, let's use the toplevel ones and hope someone report issues: - FIND_LIBRARY(LIB_EAY - NAMES - libeay32 - PATHS - ${OPENSSL_ROOT_DIR}/lib - ${OPENSSL_ROOT_DIR}/lib/VC - ) - - FIND_LIBRARY(SSL_EAY - NAMES - ssleay32 - PATHS - ${OPENSSL_ROOT_DIR}/lib - ${OPENSSL_ROOT_DIR}/lib/VC - ) - MARK_AS_ADVANCED(SSL_EAY LIB_EAY) - - SET( OPENSSL_LIBRARIES ${SSL_EAY} ${LIB_EAY} ) - ENDIF(MSVC) -ELSE(WIN32 AND NOT CYGWIN) - FIND_LIBRARY(OPENSSL_SSL_LIBRARIES NAMES ssl ssleay32 ssleay32MD) - FIND_LIBRARY(OPENSSL_CRYPTO_LIBRARIES NAMES crypto) - MARK_AS_ADVANCED(OPENSSL_CRYPTO_LIBRARIES OPENSSL_SSL_LIBRARIES) - - SET(OPENSSL_LIBRARIES ${OPENSSL_SSL_LIBRARIES} ${OPENSSL_CRYPTO_LIBRARIES}) - -ENDIF(WIN32 AND NOT CYGWIN) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(OpenSSL DEFAULT_MSG - OPENSSL_LIBRARIES - OPENSSL_INCLUDE_DIR -) - -MARK_AS_ADVANCED(OPENSSL_INCLUDE_DIR OPENSSL_LIBRARIES) 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/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..9a6b8ee75f4 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} @@ -73,20 +71,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/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/Zones/BattlefieldWG.h b/src/server/game/Battlefield/Zones/BattlefieldWG.h index 49ea25a5e04..68072a68249 100644 --- a/src/server/game/Battlefield/Zones/BattlefieldWG.h +++ b/src/server/game/Battlefield/Zones/BattlefieldWG.h @@ -153,10 +153,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 +227,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/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/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/Handlers/ChatHandler.cpp b/src/server/game/Handlers/ChatHandler.cpp index 535fda34c49..e4989816998 100755 --- a/src/server/game/Handlers/ChatHandler.cpp +++ b/src/server/game/Handlers/ChatHandler.cpp @@ -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/PetHandler.cpp b/src/server/game/Handlers/PetHandler.cpp index cb6e5265c76..5b690a1b9a2 100755 --- a/src/server/game/Handlers/PetHandler.cpp +++ b/src/server/game/Handlers/PetHandler.cpp @@ -32,7 +32,7 @@ #include "Group.h" #include "SpellInfo.h" -void WorldSession::HandleDismissCritter(WorldPacket &recvData) +void WorldSession::HandleDismissCritter(WorldPacket& recvData) { uint64 guid; recvData >> guid; @@ -138,7 +138,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 +855,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/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/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(); - (static_cast(this))->Initialize(*((T*)&u)); + (static_cast(this))->DoInitialize(*((T*)&u)); } void Finalize(Unit &u) { //u->AssertIsType(); - (static_cast(this))->Finalize(*((T*)&u)); + (static_cast(this))->DoFinalize(*((T*)&u)); } void Reset(Unit &u) { //u->AssertIsType(); - (static_cast(this))->Reset(*((T*)&u)); + (static_cast(this))->DoReset(*((T*)&u)); } bool Update(Unit &u, const uint32& time_diff) { //u->AssertIsType(); - return (static_cast(this))->Update(*((T*)&u), time_diff); + return (static_cast(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 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 -void ConfusedMovementGenerator::Initialize(T &unit) +void ConfusedMovementGenerator::DoInitialize(T &unit) { unit.StopMoving(); float const wander_distance = 4; @@ -100,7 +100,7 @@ void ConfusedMovementGenerator::_InitSpecific(Player &, bool &is_water_o } template -void ConfusedMovementGenerator::Reset(T &unit) +void ConfusedMovementGenerator::DoReset(T &unit) { i_nextMove = 1; i_nextMoveTime.Reset(0); @@ -109,7 +109,7 @@ void ConfusedMovementGenerator::Reset(T &unit) } template -bool ConfusedMovementGenerator::Update(T &unit, const uint32 &diff) +bool ConfusedMovementGenerator::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::Update(T &unit, const uint32 &diff) } template<> -void ConfusedMovementGenerator::Finalize(Player &unit) +void ConfusedMovementGenerator::DoFinalize(Player &unit) { unit.RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_CONFUSED); unit.ClearUnitState(UNIT_STATE_CONFUSED | UNIT_STATE_CONFUSED_MOVE); } template<> -void ConfusedMovementGenerator::Finalize(Creature &unit) +void ConfusedMovementGenerator::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::Finalize(Creature &unit) unit.SetTarget(unit.getVictim()->GetGUID()); } -template void ConfusedMovementGenerator::Initialize(Player &player); -template void ConfusedMovementGenerator::Initialize(Creature &creature); -template void ConfusedMovementGenerator::Reset(Player &player); -template void ConfusedMovementGenerator::Reset(Creature &creature); -template bool ConfusedMovementGenerator::Update(Player &player, const uint32 &diff); -template bool ConfusedMovementGenerator::Update(Creature &creature, const uint32 &diff); +template void ConfusedMovementGenerator::DoInitialize(Player &player); +template void ConfusedMovementGenerator::DoInitialize(Creature &creature); +template void ConfusedMovementGenerator::DoReset(Player &player); +template void ConfusedMovementGenerator::DoReset(Creature &creature); +template bool ConfusedMovementGenerator::DoUpdate(Player &player, const uint32 &diff); +template bool ConfusedMovementGenerator::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..e57e8ac7390 100755 --- a/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp @@ -282,7 +282,7 @@ bool FleeingMovementGenerator::_setMoveData(T &owner) } template -void FleeingMovementGenerator::Initialize(T &owner) +void FleeingMovementGenerator::DoInitialize(T &owner) { if (!&owner) return; @@ -331,7 +331,7 @@ void FleeingMovementGenerator::_Init(Player &) } template<> -void FleeingMovementGenerator::Finalize(Player &owner) +void FleeingMovementGenerator::DoFinalize(Player &owner) { owner.RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_FLEEING); owner.ClearUnitState(UNIT_STATE_FLEEING|UNIT_STATE_FLEEING_MOVE); @@ -339,7 +339,7 @@ void FleeingMovementGenerator::Finalize(Player &owner) } template<> -void FleeingMovementGenerator::Finalize(Creature &owner) +void FleeingMovementGenerator::DoFinalize(Creature &owner) { owner.RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_FLEEING); owner.ClearUnitState(UNIT_STATE_FLEEING|UNIT_STATE_FLEEING_MOVE); @@ -348,13 +348,13 @@ void FleeingMovementGenerator::Finalize(Creature &owner) } template -void FleeingMovementGenerator::Reset(T &owner) +void FleeingMovementGenerator::DoReset(T &owner) { - Initialize(owner); + DoInitialize(owner); } template -bool FleeingMovementGenerator::Update(T &owner, const uint32 &time_diff) +bool FleeingMovementGenerator::DoUpdate(T &owner, const uint32 &time_diff) { if (!&owner || !owner.isAlive()) return false; @@ -371,18 +371,18 @@ bool FleeingMovementGenerator::Update(T &owner, const uint32 &time_diff) return true; } -template void FleeingMovementGenerator::Initialize(Player &); -template void FleeingMovementGenerator::Initialize(Creature &); +template void FleeingMovementGenerator::DoInitialize(Player &); +template void FleeingMovementGenerator::DoInitialize(Creature &); template bool FleeingMovementGenerator::_setMoveData(Player &); template bool FleeingMovementGenerator::_setMoveData(Creature &); template bool FleeingMovementGenerator::_getPoint(Player &, float &, float &, float &); template bool FleeingMovementGenerator::_getPoint(Creature &, float &, float &, float &); template void FleeingMovementGenerator::_setTargetLocation(Player &); template void FleeingMovementGenerator::_setTargetLocation(Creature &); -template void FleeingMovementGenerator::Reset(Player &); -template void FleeingMovementGenerator::Reset(Creature &); -template bool FleeingMovementGenerator::Update(Player &, const uint32 &); -template bool FleeingMovementGenerator::Update(Creature &, const uint32 &); +template void FleeingMovementGenerator::DoReset(Player &); +template void FleeingMovementGenerator::DoReset(Creature &); +template bool FleeingMovementGenerator::DoUpdate(Player &, const uint32 &); +template bool FleeingMovementGenerator::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::Initialize(Creature & owner) +void HomeMovementGenerator::DoInitialize(Creature & owner) { _setTargetLocation(owner); } -void HomeMovementGenerator::Reset(Creature &) +void HomeMovementGenerator::DoReset(Creature &) { } @@ -53,13 +53,13 @@ void HomeMovementGenerator::_setTargetLocation(Creature & owner) owner.ClearUnitState(UNIT_STATE_ALL_STATE & ~UNIT_STATE_EVADE); } -bool HomeMovementGenerator::Update(Creature &owner, const uint32 /*time_diff*/) +bool HomeMovementGenerator::DoUpdate(Creature &owner, const uint32 /*time_diff*/) { arrived = owner.movespline->Finalized(); return !arrived; } -void HomeMovementGenerator::Finalize(Creature& owner) +void HomeMovementGenerator::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 : 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 -void PointMovementGenerator::Initialize(T &unit) +void PointMovementGenerator::DoInitialize(T &unit) { if (!unit.IsStopped()) unit.StopMoving(); @@ -42,7 +42,7 @@ void PointMovementGenerator::Initialize(T &unit) } template -bool PointMovementGenerator::Update(T &unit, const uint32 & /*diff*/) +bool PointMovementGenerator::DoUpdate(T &unit, const uint32 & /*diff*/) { if (!&unit) return false; @@ -69,7 +69,7 @@ bool PointMovementGenerator::Update(T &unit, const uint32 & /*diff*/) } template -void PointMovementGenerator::Finalize(T &unit) +void PointMovementGenerator::DoFinalize(T &unit) { unit.ClearUnitState(UNIT_STATE_ROAMING|UNIT_STATE_ROAMING_MOVE); @@ -78,7 +78,7 @@ void PointMovementGenerator::Finalize(T &unit) } template -void PointMovementGenerator::Reset(T &unit) +void PointMovementGenerator::DoReset(T &unit) { if (!unit.IsStopped()) unit.StopMoving(); @@ -97,14 +97,14 @@ template <> void PointMovementGenerator::MovementInform(Creature &unit unit.AI()->MovementInform(POINT_MOTION_TYPE, id); } -template void PointMovementGenerator::Initialize(Player&); -template void PointMovementGenerator::Initialize(Creature&); -template void PointMovementGenerator::Finalize(Player&); -template void PointMovementGenerator::Finalize(Creature&); -template void PointMovementGenerator::Reset(Player&); -template void PointMovementGenerator::Reset(Creature&); -template bool PointMovementGenerator::Update(Player &, const uint32 &); -template bool PointMovementGenerator::Update(Creature&, const uint32 &); +template void PointMovementGenerator::DoInitialize(Player&); +template void PointMovementGenerator::DoInitialize(Creature&); +template void PointMovementGenerator::DoFinalize(Player&); +template void PointMovementGenerator::DoFinalize(Creature&); +template void PointMovementGenerator::DoReset(Player&); +template void PointMovementGenerator::DoReset(Creature&); +template bool PointMovementGenerator::DoUpdate(Player &, const uint32 &); +template bool PointMovementGenerator::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::_setRandomLocation(Creature& creature) } template<> -void RandomMovementGenerator::Initialize(Creature &creature) +void RandomMovementGenerator::DoInitialize(Creature &creature) { if (!creature.isAlive()) return; @@ -127,20 +127,20 @@ void RandomMovementGenerator::Initialize(Creature &creature) } template<> -void RandomMovementGenerator::Reset(Creature &creature) +void RandomMovementGenerator::DoReset(Creature &creature) { - Initialize(creature); + DoInitialize(creature); } template<> -void RandomMovementGenerator::Finalize(Creature &creature) +void RandomMovementGenerator::DoFinalize(Creature &creature) { creature.ClearUnitState(UNIT_STATE_ROAMING|UNIT_STATE_ROAMING_MOVE); creature.SetWalk(false); } template<> -bool RandomMovementGenerator::Update(Creature &creature, const uint32 diff) +bool RandomMovementGenerator::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 } template -bool TargetedMovementGeneratorMedium::Update(T &owner, const uint32 & time_diff) +bool TargetedMovementGeneratorMedium::DoUpdate(T &owner, const uint32 & time_diff) { if (!i_target.isValid() || !i_target->IsInWorld()) return false; @@ -189,14 +189,14 @@ void ChaseMovementGenerator::_reachTarget(T &owner) } template<> -void ChaseMovementGenerator::Initialize(Player &owner) +void ChaseMovementGenerator::DoInitialize(Player &owner) { owner.AddUnitState(UNIT_STATE_CHASE|UNIT_STATE_CHASE_MOVE); _setTargetLocation(owner); } template<> -void ChaseMovementGenerator::Initialize(Creature &owner) +void ChaseMovementGenerator::DoInitialize(Creature &owner) { owner.SetWalk(false); owner.AddUnitState(UNIT_STATE_CHASE|UNIT_STATE_CHASE_MOVE); @@ -204,15 +204,15 @@ void ChaseMovementGenerator::Initialize(Creature &owner) } template -void ChaseMovementGenerator::Finalize(T &owner) +void ChaseMovementGenerator::DoFinalize(T &owner) { owner.ClearUnitState(UNIT_STATE_CHASE|UNIT_STATE_CHASE_MOVE); } template -void ChaseMovementGenerator::Reset(T &owner) +void ChaseMovementGenerator::DoReset(T &owner) { - Initialize(owner); + DoInitialize(owner); } template @@ -260,7 +260,7 @@ void FollowMovementGenerator::_updateSpeed(Creature &u) } template<> -void FollowMovementGenerator::Initialize(Player &owner) +void FollowMovementGenerator::DoInitialize(Player &owner) { owner.AddUnitState(UNIT_STATE_FOLLOW|UNIT_STATE_FOLLOW_MOVE); _updateSpeed(owner); @@ -268,7 +268,7 @@ void FollowMovementGenerator::Initialize(Player &owner) } template<> -void FollowMovementGenerator::Initialize(Creature &owner) +void FollowMovementGenerator::DoInitialize(Creature &owner) { owner.AddUnitState(UNIT_STATE_FOLLOW|UNIT_STATE_FOLLOW_MOVE); _updateSpeed(owner); @@ -276,16 +276,16 @@ void FollowMovementGenerator::Initialize(Creature &owner) } template -void FollowMovementGenerator::Finalize(T &owner) +void FollowMovementGenerator::DoFinalize(T &owner) { owner.ClearUnitState(UNIT_STATE_FOLLOW|UNIT_STATE_FOLLOW_MOVE); _updateSpeed(owner); } template -void FollowMovementGenerator::Reset(T &owner) +void FollowMovementGenerator::DoReset(T &owner) { - Initialize(owner); + DoInitialize(owner); } template @@ -306,21 +306,21 @@ template void TargetedMovementGeneratorMedium >::_setTargetLocation(Player &); template void TargetedMovementGeneratorMedium >::_setTargetLocation(Creature &); template void TargetedMovementGeneratorMedium >::_setTargetLocation(Creature &); -template bool TargetedMovementGeneratorMedium >::Update(Player &, const uint32 &); -template bool TargetedMovementGeneratorMedium >::Update(Player &, const uint32 &); -template bool TargetedMovementGeneratorMedium >::Update(Creature &, const uint32 &); -template bool TargetedMovementGeneratorMedium >::Update(Creature &, const uint32 &); +template bool TargetedMovementGeneratorMedium >::DoUpdate(Player &, const uint32 &); +template bool TargetedMovementGeneratorMedium >::DoUpdate(Player &, const uint32 &); +template bool TargetedMovementGeneratorMedium >::DoUpdate(Creature &, const uint32 &); +template bool TargetedMovementGeneratorMedium >::DoUpdate(Creature &, const uint32 &); template void ChaseMovementGenerator::_reachTarget(Player &); template void ChaseMovementGenerator::_reachTarget(Creature &); -template void ChaseMovementGenerator::Finalize(Player &); -template void ChaseMovementGenerator::Finalize(Creature &); -template void ChaseMovementGenerator::Reset(Player &); -template void ChaseMovementGenerator::Reset(Creature &); +template void ChaseMovementGenerator::DoFinalize(Player &); +template void ChaseMovementGenerator::DoFinalize(Creature &); +template void ChaseMovementGenerator::DoReset(Player &); +template void ChaseMovementGenerator::DoReset(Creature &); template void ChaseMovementGenerator::MovementInform(Player &unit); -template void FollowMovementGenerator::Finalize(Player &); -template void FollowMovementGenerator::Finalize(Creature &); -template void FollowMovementGenerator::Reset(Player &); -template void FollowMovementGenerator::Reset(Creature &); +template void FollowMovementGenerator::DoFinalize(Player &); +template void FollowMovementGenerator::DoFinalize(Creature &); +template void FollowMovementGenerator::DoReset(Player &); +template void FollowMovementGenerator::DoReset(Creature &); template void FollowMovementGenerator::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::LoadPath(Creature &creature) StartMoveNow(creature); } -void WaypointMovementGenerator::Initialize(Creature &creature) +void WaypointMovementGenerator::DoInitialize(Creature &creature) { LoadPath(creature); creature.AddUnitState(UNIT_STATE_ROAMING|UNIT_STATE_ROAMING_MOVE); } -void WaypointMovementGenerator::Finalize(Creature &creature) +void WaypointMovementGenerator::DoFinalize(Creature &creature) { creature.ClearUnitState(UNIT_STATE_ROAMING|UNIT_STATE_ROAMING_MOVE); creature.SetWalk(false); } -void WaypointMovementGenerator::Reset(Creature &creature) +void WaypointMovementGenerator::DoReset(Creature &creature) { creature.AddUnitState(UNIT_STATE_ROAMING|UNIT_STATE_ROAMING_MOVE); StartMoveNow(creature); @@ -130,7 +130,7 @@ bool WaypointMovementGenerator::StartMove(Creature &creature) return true; } -bool WaypointMovementGenerator::Update(Creature &creature, const uint32 &diff) +bool WaypointMovementGenerator::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 : 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/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/Texts/CreatureTextMgr.cpp b/src/server/game/Texts/CreatureTextMgr.cpp index 5c2639175d2..d50757868ed 100755 --- a/src/server/game/Texts/CreatureTextMgr.cpp +++ b/src/server/game/Texts/CreatureTextMgr.cpp @@ -170,7 +170,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; @@ -288,7 +288,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 +298,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 - 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 -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/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_wp.cpp b/src/server/scripts/Commands/cs_wp.cpp index e3cd185e4a3..10a18c3ed36 100644 --- a/src/server/scripts/Commands/cs_wp.cpp +++ b/src/server/scripts/Commands/cs_wp.cpp @@ -941,7 +941,7 @@ public: { wpCreature->SetDisplayId(target->GetDisplayId()); wpCreature->SetObjectScale(0.5f); - wpCreature->SetLevel(point > STRONG_MAX_LEVEL ? STRONG_MAX_LEVEL : point); + wpCreature->SetLevel(std::min(point, STRONG_MAX_LEVEL)); } } while (result->NextRow()); diff --git a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp index 82739c0026a..1d0b0fd6ee6 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp +++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp @@ -1375,7 +1375,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; @@ -1434,7 +1434,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/wintergrasp.cpp b/src/server/scripts/Northrend/wintergrasp.cpp index d4a3f83ab70..b7901f1a44a 100644 --- a/src/server/scripts/Northrend/wintergrasp.cpp +++ b/src/server/scripts/Northrend/wintergrasp.cpp @@ -560,7 +560,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/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 AutoPtr : public ACE_Strong_Bound_Ptr + +template +class AutoPtr : public ACE_Strong_Bound_Ptr +{ + typedef ACE_Strong_Bound_Ptr Base; + +public: + AutoPtr() + : Base() + { } + + AutoPtr(Pointer* x) + : Base(x) + { } + + operator bool() const + { + return !Base::null(); + } + + bool operator !() const { - public: - AutoPtr() : ACE_Strong_Bound_Ptr() {} - - AutoPtr(Pointer* x) - { - ACE_Strong_Bound_Ptr::reset(x); - } - - operator bool() const - { - return ACE_Strong_Bound_Ptr::get() != NULL; - } - - bool operator !() const - { - return ACE_Strong_Bound_Ptr::get() == NULL; - } - - bool operator !=(Pointer* x) const - { - return ACE_Strong_Bound_Ptr::get() != x; - } - }; -} + return Base::null(); + } +}; + +} // namespace Trinity #endif diff --git a/src/server/shared/CMakeLists.txt b/src/server/shared/CMakeLists.txt index de998442419..f057527c284 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 @@ -51,7 +49,6 @@ set(shared_STAT_SRCS ) include_directories( - ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/dep/SFMT ${CMAKE_SOURCE_DIR}/dep/sockets/include ${CMAKE_SOURCE_DIR}/dep/utf8cpp @@ -73,18 +70,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 +#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 #include "Field.h" -#include "Log.h" #ifdef _WIN32 #include 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() -- cgit v1.2.3 From b99c3477470eddea62095a3ffbf97ffa9240c821 Mon Sep 17 00:00:00 2001 From: Spp Date: Sat, 17 Nov 2012 05:18:37 +0100 Subject: Core: Remove Player.h dependency from all the possible headers --- src/server/game/AI/CoreAI/CombatAI.cpp | 1 + src/server/game/AI/EventAI/CreatureEventAIMgr.cpp | 1 + src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp | 1 + .../game/AI/ScriptedAI/ScriptedFollowerAI.cpp | 1 + src/server/game/AI/ScriptedAI/ScriptedGossip.h | 1 - src/server/game/Battlefield/BattlefieldHandler.cpp | 1 + .../game/Battlefield/Zones/BattlefieldWG.cpp | 1 + src/server/game/Battlefield/Zones/BattlefieldWG.h | 4 +- src/server/game/Battlegrounds/ArenaTeam.cpp | 1 + src/server/game/Battlegrounds/ArenaTeamMgr.cpp | 1 + src/server/game/Battlegrounds/Battleground.h | 38 ---- .../game/Battlegrounds/BattlegroundQueue.cpp | 3 +- .../game/Battlegrounds/Zones/BattlegroundIC.h | 2 + src/server/game/Chat/Channels/Channel.cpp | 3 +- src/server/game/Chat/Channels/Channel.h | 1 - src/server/game/Chat/Channels/ChannelMgr.cpp | 2 +- src/server/game/Chat/Chat.cpp | 5 + src/server/game/Chat/Chat.h | 11 +- src/server/game/Chat/ChatLink.cpp | 1 + src/server/game/Conditions/DisableMgr.cpp | 1 + .../game/Entities/Creature/TemporarySummon.cpp | 2 + src/server/game/Entities/Item/Container/Bag.cpp | 1 + src/server/game/Entities/Item/Item.cpp | 1 + .../game/Entities/Item/ItemEnchantmentMgr.cpp | 1 + src/server/game/Entities/Pet/Pet.h | 20 -- src/server/game/Entities/Player/Player.cpp | 10 +- src/server/game/Entities/Player/Player.h | 23 +-- src/server/game/Entities/Transport/Transport.cpp | 1 + src/server/game/Entities/Vehicle/Vehicle.cpp | 1 + src/server/game/Globals/ObjectAccessor.cpp | 6 + src/server/game/Globals/ObjectAccessor.h | 7 +- src/server/game/Globals/ObjectMgr.cpp | 209 +++++++++++++-------- src/server/game/Globals/ObjectMgr.h | 28 ++- src/server/game/Groups/Group.h | 6 +- src/server/game/Groups/GroupMgr.cpp | 2 + src/server/game/Handlers/ChannelHandler.cpp | 1 + src/server/game/Handlers/CharacterHandler.cpp | 2 +- src/server/game/Handlers/CombatHandler.cpp | 1 + src/server/game/Handlers/MiscHandler.cpp | 2 +- src/server/game/Handlers/PetHandler.cpp | 1 + src/server/game/Handlers/SpellHandler.cpp | 1 + src/server/game/Loot/LootMgr.cpp | 1 + src/server/game/Maps/Map.cpp | 1 + src/server/game/Maps/MapInstanced.cpp | 3 +- src/server/game/Maps/MapManager.cpp | 3 +- src/server/game/Miscellaneous/Formulas.h | 1 + src/server/game/Miscellaneous/SharedDefines.h | 76 +++++++- .../FleeingMovementGenerator.cpp | 1 + src/server/game/Scripting/ScriptMgr.cpp | 1 + src/server/game/Scripting/ScriptMgr.h | 1 - src/server/game/Server/WorldSocket.cpp | 2 +- src/server/game/Spells/SpellInfo.cpp | 2 + src/server/game/Spells/SpellMgr.cpp | 9 +- src/server/game/Tickets/TicketMgr.cpp | 1 + src/server/game/Weather/WeatherMgr.cpp | 1 + src/server/scripts/Commands/cs_account.cpp | 1 + src/server/scripts/Commands/cs_achievement.cpp | 1 + src/server/scripts/Commands/cs_ban.cpp | 1 + src/server/scripts/Commands/cs_cast.cpp | 1 + src/server/scripts/Commands/cs_character.cpp | 7 +- src/server/scripts/Commands/cs_cheat.cpp | 9 +- src/server/scripts/Commands/cs_disable.cpp | 2 + src/server/scripts/Commands/cs_event.cpp | 1 + src/server/scripts/Commands/cs_gm.cpp | 1 + src/server/scripts/Commands/cs_go.cpp | 1 + src/server/scripts/Commands/cs_gobject.cpp | 1 + src/server/scripts/Commands/cs_honor.cpp | 1 + src/server/scripts/Commands/cs_instance.cpp | 1 + src/server/scripts/Commands/cs_learn.cpp | 1 + src/server/scripts/Commands/cs_lfg.cpp | 1 + src/server/scripts/Commands/cs_list.cpp | 1 + src/server/scripts/Commands/cs_lookup.cpp | 1 + src/server/scripts/Commands/cs_message.cpp | 1 + src/server/scripts/Commands/cs_misc.cpp | 11 +- src/server/scripts/Commands/cs_modify.cpp | 35 ++-- src/server/scripts/Commands/cs_npc.cpp | 1 + src/server/scripts/Commands/cs_quest.cpp | 1 + src/server/scripts/Commands/cs_reset.cpp | 7 +- src/server/scripts/Commands/cs_server.cpp | 1 + src/server/scripts/Commands/cs_tele.cpp | 5 +- src/server/scripts/Commands/cs_ticket.cpp | 1 + src/server/scripts/Commands/cs_titles.cpp | 1 + src/server/scripts/Commands/cs_wp.cpp | 1 + .../BlackrockDepths/blackrock_depths.cpp | 1 + .../BlackrockDepths/boss_tomb_of_seven.cpp | 1 + .../BlackwingLair/boss_vaelastrasz.cpp | 1 + .../BlackwingLair/boss_victor_nefarius.cpp | 1 + .../EasternKingdoms/Deadmines/deadmines.cpp | 1 + .../Deadmines/instance_deadmines.cpp | 1 + .../EasternKingdoms/Gnomeregan/gnomeregan.cpp | 1 + .../Gnomeregan/instance_gnomeregan.cpp | 1 + .../EasternKingdoms/Karazhan/boss_netherspite.cpp | 1 + .../EasternKingdoms/Karazhan/bosses_opera.cpp | 1 + .../scripts/EasternKingdoms/Karazhan/karazhan.cpp | 1 + .../MagistersTerrace/magisters_terrace.cpp | 1 + .../MoltenCore/boss_majordomo_executus.cpp | 1 + .../MoltenCore/instance_molten_core.cpp | 1 + .../EasternKingdoms/ScarletEnclave/chapter1.cpp | 1 + .../EasternKingdoms/ScarletEnclave/chapter2.cpp | 1 + .../EasternKingdoms/ScarletEnclave/chapter5.cpp | 1 + .../ScarletEnclave/the_scarlet_enclave.cpp | 1 + .../ScarletMonastery/boss_headless_horseman.cpp | 1 + .../ShadowfangKeep/instance_shadowfang_keep.cpp | 1 + .../ShadowfangKeep/shadowfang_keep.cpp | 1 + .../Stratholme/boss_order_of_silver_hand.cpp | 1 + .../Stratholme/instance_stratholme.cpp | 1 + .../EasternKingdoms/Stratholme/stratholme.cpp | 1 + .../EasternKingdoms/SunkenTemple/sunken_temple.cpp | 1 + .../SunwellPlateau/boss_kalecgos.cpp | 1 + .../SunwellPlateau/boss_kiljaeden.cpp | 1 + .../EasternKingdoms/SunwellPlateau/boss_muru.cpp | 1 + .../SunwellPlateau/instance_sunwell_plateau.cpp | 1 + .../EasternKingdoms/Uldaman/boss_archaedas.cpp | 1 + .../scripts/EasternKingdoms/Uldaman/uldaman.cpp | 1 + .../EasternKingdoms/ZulAman/instance_zulaman.cpp | 1 + .../scripts/EasternKingdoms/ZulAman/zulaman.cpp | 1 + .../scripts/EasternKingdoms/arathi_highlands.cpp | 1 + .../scripts/EasternKingdoms/blasted_lands.cpp | 1 + .../scripts/EasternKingdoms/burning_steppes.cpp | 1 + src/server/scripts/EasternKingdoms/duskwood.cpp | 1 + .../EasternKingdoms/eastern_plaguelands.cpp | 1 + .../scripts/EasternKingdoms/eversong_woods.cpp | 1 + src/server/scripts/EasternKingdoms/ghostlands.cpp | 1 + src/server/scripts/EasternKingdoms/hinterlands.cpp | 1 + src/server/scripts/EasternKingdoms/ironforge.cpp | 1 + .../scripts/EasternKingdoms/isle_of_queldanas.cpp | 1 + src/server/scripts/EasternKingdoms/loch_modan.cpp | 1 + .../scripts/EasternKingdoms/redridge_mountains.cpp | 1 + .../scripts/EasternKingdoms/silvermoon_city.cpp | 1 + .../scripts/EasternKingdoms/silverpine_forest.cpp | 1 + .../scripts/EasternKingdoms/stormwind_city.cpp | 1 + .../scripts/EasternKingdoms/stranglethorn_vale.cpp | 1 + .../scripts/EasternKingdoms/swamp_of_sorrows.cpp | 1 + .../scripts/EasternKingdoms/tirisfal_glades.cpp | 1 + src/server/scripts/EasternKingdoms/undercity.cpp | 1 + .../EasternKingdoms/western_plaguelands.cpp | 1 + src/server/scripts/EasternKingdoms/westfall.cpp | 1 + src/server/scripts/EasternKingdoms/wetlands.cpp | 1 + src/server/scripts/Events/childrens_week.cpp | 1 + src/server/scripts/Examples/example_creature.cpp | 1 + src/server/scripts/Examples/example_escort.cpp | 1 + .../scripts/Examples/example_gossip_codebox.cpp | 1 + src/server/scripts/Examples/example_misc.cpp | 1 + src/server/scripts/Examples/example_spell.cpp | 1 + .../BlackfathomDeeps/blackfathom_deeps.cpp | 1 + .../BattleForMountHyjal/boss_archimonde.cpp | 1 + .../CavernsOfTime/BattleForMountHyjal/hyjal.cpp | 1 + .../BattleForMountHyjal/instance_hyjal.cpp | 1 + .../CullingOfStratholme/culling_of_stratholme.cpp | 1 + .../instance_culling_of_stratholme.cpp | 1 + .../CavernsOfTime/DarkPortal/dark_portal.cpp | 1 + .../DarkPortal/instance_dark_portal.cpp | 1 + .../instance_old_hillsbrad.cpp | 1 + .../EscapeFromDurnholdeKeep/old_hillsbrad.cpp | 1 + .../RazorfenDowns/instance_razorfen_downs.cpp | 1 + .../Kalimdor/RazorfenDowns/razorfen_downs.cpp | 1 + .../RazorfenKraul/instance_razorfen_kraul.cpp | 1 + .../Kalimdor/RazorfenKraul/razorfen_kraul.cpp | 1 + .../Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp | 1 + .../Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp | 1 + .../Kalimdor/WailingCaverns/wailing_caverns.cpp | 1 + .../Kalimdor/ZulFarrak/instance_zulfarrak.cpp | 1 + .../scripts/Kalimdor/ZulFarrak/zulfarrak.cpp | 1 + src/server/scripts/Kalimdor/ashenvale.cpp | 1 + src/server/scripts/Kalimdor/azshara.cpp | 1 + src/server/scripts/Kalimdor/bloodmyst_isle.cpp | 1 + src/server/scripts/Kalimdor/darkshore.cpp | 1 + src/server/scripts/Kalimdor/desolace.cpp | 1 + src/server/scripts/Kalimdor/durotar.cpp | 1 + src/server/scripts/Kalimdor/dustwallow_marsh.cpp | 1 + src/server/scripts/Kalimdor/felwood.cpp | 1 + src/server/scripts/Kalimdor/feralas.cpp | 1 + src/server/scripts/Kalimdor/moonglade.cpp | 1 + src/server/scripts/Kalimdor/mulgore.cpp | 1 + src/server/scripts/Kalimdor/orgrimmar.cpp | 1 + src/server/scripts/Kalimdor/silithus.cpp | 1 + .../scripts/Kalimdor/stonetalon_mountains.cpp | 1 + src/server/scripts/Kalimdor/tanaris.cpp | 1 + src/server/scripts/Kalimdor/teldrassil.cpp | 1 + src/server/scripts/Kalimdor/the_barrens.cpp | 1 + src/server/scripts/Kalimdor/thousand_needles.cpp | 1 + src/server/scripts/Kalimdor/thunder_bluff.cpp | 1 + src/server/scripts/Kalimdor/ungoro_crater.cpp | 1 + src/server/scripts/Kalimdor/winterspring.cpp | 1 + .../AzjolNerub/Ahnkahet/boss_herald_volazj.cpp | 1 + .../ChamberOfAspects/RubySanctum/boss_halion.cpp | 1 + .../RubySanctum/instance_ruby_sanctum.cpp | 2 +- .../ChamberOfAspects/RubySanctum/ruby_sanctum.cpp | 1 + .../TrialOfTheChampion/boss_grand_champions.cpp | 1 + .../instance_trial_of_the_champion.cpp | 1 + .../TrialOfTheChampion/trial_of_the_champion.cpp | 1 + .../TrialOfTheCrusader/boss_anubarak_trial.cpp | 1 + .../TrialOfTheCrusader/boss_faction_champions.cpp | 1 + .../TrialOfTheCrusader/boss_northrend_beasts.cpp | 1 + .../instance_trial_of_the_crusader.cpp | 1 + .../TrialOfTheCrusader/trial_of_the_crusader.cpp | 1 + .../Northrend/DraktharonKeep/boss_tharon_ja.cpp | 1 + .../ForgeOfSouls/boss_devourer_of_souls.cpp | 1 + .../FrozenHalls/ForgeOfSouls/forge_of_souls.cpp | 1 + .../ForgeOfSouls/instance_forge_of_souls.cpp | 1 + .../HallsOfReflection/halls_of_reflection.cpp | 1 + .../instance_halls_of_reflection.cpp | 1 + .../FrozenHalls/PitOfSaron/boss_krickandick.cpp | 1 + .../PitOfSaron/boss_scourgelord_tyrannus.cpp | 1 + .../PitOfSaron/instance_pit_of_saron.cpp | 1 + .../scripts/Northrend/Gundrak/boss_slad_ran.cpp | 3 +- .../scripts/Northrend/Gundrak/instance_gundrak.cpp | 1 + .../IcecrownCitadel/boss_blood_prince_council.cpp | 1 + .../IcecrownCitadel/boss_deathbringer_saurfang.cpp | 1 + .../IcecrownCitadel/boss_lady_deathwhisper.cpp | 1 + .../IcecrownCitadel/boss_lord_marrowgar.cpp | 1 + .../Northrend/IcecrownCitadel/icecrown_citadel.h | 1 + .../IcecrownCitadel/icecrown_citadel_teleport.cpp | 1 + .../IcecrownCitadel/instance_icecrown_citadel.cpp | 1 + .../scripts/Northrend/Naxxramas/boss_heigan.cpp | 1 + .../scripts/Northrend/Naxxramas/boss_kelthuzad.cpp | 1 + .../scripts/Northrend/Naxxramas/boss_sapphiron.cpp | 1 + .../scripts/Northrend/Naxxramas/boss_thaddius.cpp | 2 +- .../Northrend/Nexus/EyeOfEternity/boss_malygos.cpp | 1 + .../EyeOfEternity/instance_eye_of_eternity.cpp | 1 + .../Northrend/Nexus/Nexus/boss_keristrasza.cpp | 1 + .../Northrend/Nexus/Nexus/instance_nexus.cpp | 1 + .../Northrend/Nexus/Oculus/instance_oculus.cpp | 1 + .../scripts/Northrend/Nexus/Oculus/oculus.cpp | 1 + .../Ulduar/HallsOfLightning/boss_volkhan.cpp | 1 + .../Ulduar/HallsOfStone/halls_of_stone.cpp | 1 + .../Ulduar/Ulduar/boss_algalon_the_observer.cpp | 1 + .../Northrend/Ulduar/Ulduar/boss_general_vezax.cpp | 1 + .../Northrend/Ulduar/Ulduar/boss_kologarn.cpp | 1 + .../Northrend/Ulduar/Ulduar/boss_razorscale.cpp | 1 + .../scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp | 1 + .../Northrend/Ulduar/Ulduar/instance_ulduar.cpp | 1 + .../Northrend/Ulduar/Ulduar/ulduar_teleporter.cpp | 1 + .../UtgardeKeep/instance_utgarde_keep.cpp | 1 + .../UtgardeKeep/UtgardePinnacle/boss_skadi.cpp | 1 + .../scripts/Northrend/VioletHold/boss_xevozz.cpp | 1 + .../Northrend/VioletHold/instance_violet_hold.cpp | 1 + .../scripts/Northrend/VioletHold/violet_hold.cpp | 1 + src/server/scripts/Northrend/borean_tundra.cpp | 1 + .../scripts/Northrend/crystalsong_forest.cpp | 3 +- src/server/scripts/Northrend/dalaran.cpp | 1 + src/server/scripts/Northrend/dragonblight.cpp | 1 + src/server/scripts/Northrend/grizzly_hills.cpp | 1 + src/server/scripts/Northrend/howling_fjord.cpp | 1 + src/server/scripts/Northrend/icecrown.cpp | 1 + src/server/scripts/Northrend/isle_of_conquest.cpp | 1 + src/server/scripts/Northrend/sholazar_basin.cpp | 1 + src/server/scripts/Northrend/storm_peaks.cpp | 1 + src/server/scripts/Northrend/wintergrasp.cpp | 1 + src/server/scripts/Northrend/zuldrak.cpp | 1 + .../boss_shirrak_the_dead_watcher.cpp | 1 + .../ShadowLabyrinth/boss_grandmaster_vorpil.cpp | 1 + .../scripts/Outland/BlackTemple/black_temple.cpp | 3 +- .../scripts/Outland/BlackTemple/boss_illidan.cpp | 1 + .../Outland/BlackTemple/boss_shade_of_akama.cpp | 1 + .../Outland/BlackTemple/boss_warlord_najentus.cpp | 1 + .../Outland/BlackTemple/instance_black_temple.cpp | 1 + .../SerpentShrine/boss_lady_vashj.cpp | 1 + .../SerpentShrine/boss_leotheras_the_blind.cpp | 1 + .../SerpentShrine/boss_lurker_below.cpp | 1 + .../SerpentShrine/instance_serpent_shrine.cpp | 1 + .../HellfireRamparts/boss_omor_the_unscarred.cpp | 1 + .../MagtheridonsLair/boss_magtheridon.cpp | 1 + .../Mechanar/boss_mechano_lord_capacitus.cpp | 1 + src/server/scripts/Outland/hellfire_peninsula.cpp | 1 + src/server/scripts/Outland/nagrand.cpp | 1 + src/server/scripts/Outland/netherstorm.cpp | 1 + src/server/scripts/Outland/shadowmoon_valley.cpp | 1 + src/server/scripts/Outland/shattrath_city.cpp | 1 + src/server/scripts/Outland/terokkar_forest.cpp | 1 + src/server/scripts/Outland/zangarmarsh.cpp | 1 + src/server/scripts/Spells/spell_dk.cpp | 1 + src/server/scripts/Spells/spell_druid.cpp | 1 + src/server/scripts/Spells/spell_generic.cpp | 1 + src/server/scripts/Spells/spell_holiday.cpp | 1 + src/server/scripts/Spells/spell_hunter.cpp | 1 + src/server/scripts/Spells/spell_item.cpp | 2 + src/server/scripts/Spells/spell_mage.cpp | 2 +- src/server/scripts/Spells/spell_paladin.cpp | 2 +- src/server/scripts/Spells/spell_priest.cpp | 1 + src/server/scripts/Spells/spell_quest.cpp | 1 + src/server/scripts/Spells/spell_rogue.cpp | 1 + src/server/scripts/Spells/spell_shaman.cpp | 1 + src/server/scripts/Spells/spell_warlock.cpp | 1 + src/server/scripts/Spells/spell_warrior.cpp | 1 + src/server/scripts/World/achievement_scripts.cpp | 1 + src/server/scripts/World/areatrigger_scripts.cpp | 1 + src/server/scripts/World/go_scripts.cpp | 1 + src/server/scripts/World/guards.cpp | 1 + src/server/scripts/World/item_scripts.cpp | 1 + src/server/scripts/World/npc_innkeeper.cpp | 1 + src/server/scripts/World/npc_professions.cpp | 1 + src/server/scripts/World/npc_taxi.cpp | 1 + 293 files changed, 567 insertions(+), 260 deletions(-) (limited to 'src/server/game/Maps') 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/CreatureEventAIMgr.cpp b/src/server/game/AI/EventAI/CreatureEventAIMgr.cpp index b8bb99f7b14..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() 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/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 68072a68249..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; 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.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/BattlegroundQueue.cpp b/src/server/game/Battlegrounds/BattlegroundQueue.cpp index 012d970901d..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 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/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 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/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 #include #include "Util.h" +#include "DBCStores.h" struct EnchStoreItem { 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 PetSpellMap; typedef std::vector 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..d55d070614a 100755 --- a/src/server/game/Entities/Player/Player.h +++ b/src/server/game/Entities/Player/Player.h @@ -20,7 +20,6 @@ #define _PLAYER_H #include "AchievementMgr.h" -#include "Battleground.h" #include "Bag.h" #include "Common.h" #include "DatabaseEnv.h" @@ -242,9 +241,7 @@ typedef std::list 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 +722,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 +824,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/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::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 @@ -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::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..6af9ffdf235 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) @@ -2924,7 +2951,7 @@ PetLevelInfo const* ObjectMgr::GetPetLevelInfo(uint32 creature_id, uint8 level) void ObjectMgr::PlayerCreateInfoAddItemHelper(uint32 race_, uint32 class_, uint32 itemId, int32 count) { 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 +3058,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 +3190,11 @@ 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 - _playerInfo[current_race][current_class].spell.push_back(fields[2].GetUInt32()); + _playerInfo[current_race][current_class]->spell.push_back(fields[2].GetUInt32()); ++count; } @@ -3212,7 +3239,7 @@ void ObjectMgr::LoadPlayerInfo() continue; } - PlayerInfo* pInfo = &_playerInfo[current_race][current_class]; + PlayerInfo* pInfo = _playerInfo[current_race][current_class]; pInfo->action.push_back(PlayerCreateInfoAction(fields[2].GetUInt16(), fields[3].GetUInt32(), fields[4].GetUInt16())); ++count; @@ -3228,13 +3255,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 +3285,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 +3309,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,7 +3380,7 @@ void ObjectMgr::LoadPlayerInfo() continue; } - PlayerInfo* pInfo = &_playerInfo[current_race][current_class]; + PlayerInfo* pInfo = _playerInfo[current_race][current_class]; if (!pInfo->levelInfo) pInfo->levelInfo = new PlayerLevelInfo[sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)]; @@ -3380,10 +3409,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 +3422,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 +3431,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 +3507,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 +3520,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 +3533,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 +5925,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 +5953,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 +8235,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 +8246,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 +8259,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 +8268,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 +8277,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 +8285,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 +8298,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 +8307,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 +8728,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 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 AreaTriggerScriptContainer; - typedef UNORDERED_MAP AccessRequirementContainer; + typedef UNORDERED_MAP AccessRequirementContainer; typedef UNORDERED_MAP RepRewardRateContainer; typedef UNORDERED_MAP 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 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/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/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 2ac0e7df808..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; diff --git a/src/server/game/Handlers/PetHandler.cpp b/src/server/game/Handlers/PetHandler.cpp index 5b690a1b9a2..daba55e5aa8 100755 --- a/src/server/game/Handlers/PetHandler.cpp +++ b/src/server/game/Handlers/PetHandler.cpp @@ -31,6 +31,7 @@ #include "World.h" #include "Group.h" #include "SpellInfo.h" +#include "Player.h" void WorldSession::HandleDismissCritter(WorldPacket& recvData) { 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 934aa1dc4bc..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 { 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/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/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/MovementGenerators/FleeingMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp index e57e8ac7390..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 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 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 #include "DBCStores.h" -#include "Player.h" #include "SharedDefines.h" #include "World.h" #include "Weather.h" diff --git a/src/server/game/Server/WorldSocket.cpp b/src/server/game/Server/WorldSocket.cpp index 377f0cb3a1f..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" 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/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/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/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 9889b4752c8..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 { 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_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 10a18c3ed36..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 { 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 +#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 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 1d0b0fd6ee6..db31f91ca63 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 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/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 b7901f1a44a..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." 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/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 18f776e7171..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!" -- cgit v1.2.3 From 81606e5d1ea562b6842ff327fffb551aecd5a79c Mon Sep 17 00:00:00 2001 From: Spp Date: Tue, 20 Nov 2012 09:29:52 +0100 Subject: Core/Misc: Define some methods const --- src/server/game/AI/CoreAI/GameObjectAI.h | 6 ++-- src/server/game/AI/CoreAI/UnitAI.h | 4 +-- src/server/game/AI/ScriptedAI/ScriptedCreature.cpp | 10 ++----- src/server/game/AI/ScriptedAI/ScriptedCreature.h | 2 +- src/server/game/AI/SmartScripts/SmartAI.cpp | 4 +-- src/server/game/AI/SmartScripts/SmartAI.h | 4 +-- src/server/game/Battlefield/Battlefield.cpp | 6 ++-- src/server/game/Battlefield/Battlefield.h | 10 +++---- .../game/Battlefield/Zones/BattlefieldWG.cpp | 8 +++--- src/server/game/Battlefield/Zones/BattlefieldWG.h | 4 +-- src/server/game/Entities/Pet/Pet.cpp | 4 +-- src/server/game/Entities/Pet/Pet.h | 8 +++--- src/server/game/Maps/ZoneScript.h | 15 +++++----- .../BlackrockDepths/instance_blackrock_depths.cpp | 4 +-- .../BlackrockSpire/instance_blackrock_spire.cpp | 2 +- .../Deadmines/instance_deadmines.cpp | 4 +-- .../Gnomeregan/instance_gnomeregan.cpp | 4 +-- .../EasternKingdoms/Karazhan/instance_karazhan.cpp | 4 +-- .../MagistersTerrace/boss_selin_fireheart.cpp | 1 + .../instance_magisters_terrace.cpp | 33 +++++++++------------- .../MoltenCore/instance_molten_core.cpp | 4 +-- .../EasternKingdoms/ScarletEnclave/chapter1.cpp | 2 +- .../instance_scarlet_monastery.cpp | 4 +-- .../Scholomance/boss_doctor_theolen_krastinov.cpp | 3 ++ .../Scholomance/boss_illucia_barov.cpp | 3 ++ .../Scholomance/boss_instructor_malicia.cpp | 3 ++ .../Scholomance/boss_lord_alexei_barov.cpp | 3 ++ .../Scholomance/boss_lorekeeper_polkelt.cpp | 3 ++ .../Scholomance/boss_the_ravenian.cpp | 3 ++ .../Scholomance/instance_scholomance.cpp | 17 ++++------- .../ShadowfangKeep/instance_shadowfang_keep.cpp | 2 +- .../Stratholme/instance_stratholme.cpp | 4 +-- .../SunkenTemple/instance_sunken_temple.cpp | 2 +- .../SunwellPlateau/instance_sunwell_plateau.cpp | 10 +++---- .../EasternKingdoms/Uldaman/instance_uldaman.cpp | 33 +++++++++++++--------- .../EasternKingdoms/ZulAman/instance_zulaman.cpp | 2 +- .../EasternKingdoms/ZulGurub/instance_zulgurub.cpp | 6 ++-- .../instance_blackfathom_deeps.cpp | 4 +-- .../BattleForMountHyjal/instance_hyjal.cpp | 4 +-- .../instance_culling_of_stratholme.cpp | 4 +-- .../DarkPortal/instance_dark_portal.cpp | 4 +-- .../instance_old_hillsbrad.cpp | 4 +-- .../Kalimdor/OnyxiasLair/instance_onyxias_lair.cpp | 4 +-- .../RazorfenDowns/instance_razorfen_downs.cpp | 4 +-- .../RuinsOfAhnQiraj/instance_ruins_of_ahnqiraj.cpp | 2 +- .../instance_temple_of_ahnqiraj.cpp | 4 +-- .../WailingCaverns/instance_wailing_caverns.cpp | 4 +-- .../Kalimdor/ZulFarrak/instance_zulfarrak.cpp | 4 +-- .../AzjolNerub/Ahnkahet/boss_elder_nadox.cpp | 2 +- .../Ahnkahet/boss_jedoga_shadowseeker.cpp | 2 +- .../AzjolNerub/Ahnkahet/instance_ahnkahet.cpp | 4 +-- .../AzjolNerub/AzjolNerub/instance_azjol_nerub.cpp | 4 +-- .../ObsidianSanctum/boss_sartharion.cpp | 2 +- .../ObsidianSanctum/instance_obsidian_sanctum.cpp | 4 +-- .../RubySanctum/instance_ruby_sanctum.cpp | 4 +-- .../instance_trial_of_the_champion.cpp | 4 +-- .../TrialOfTheCrusader/boss_twin_valkyr.cpp | 2 +- .../instance_trial_of_the_crusader.cpp | 19 ++++++------- .../scripts/Northrend/DraktharonKeep/boss_dred.cpp | 2 +- .../Northrend/DraktharonKeep/boss_novos.cpp | 2 +- .../Northrend/DraktharonKeep/boss_trollgore.cpp | 2 +- .../DraktharonKeep/instance_drak_tharon_keep.cpp | 4 +-- .../ForgeOfSouls/boss_devourer_of_souls.cpp | 2 +- .../ForgeOfSouls/instance_forge_of_souls.cpp | 4 +-- .../instance_halls_of_reflection.cpp | 4 +-- .../PitOfSaron/boss_forgemaster_garfrost.cpp | 2 +- .../PitOfSaron/instance_pit_of_saron.cpp | 4 +-- .../Northrend/Gundrak/boss_drakkari_colossus.cpp | 2 +- .../scripts/Northrend/Gundrak/boss_gal_darah.cpp | 2 +- .../scripts/Northrend/Gundrak/boss_moorabi.cpp | 2 +- .../scripts/Northrend/Gundrak/instance_gundrak.cpp | 4 +-- .../IcecrownCitadel/boss_deathbringer_saurfang.cpp | 2 +- .../Northrend/IcecrownCitadel/boss_festergut.cpp | 2 +- .../IcecrownCitadel/boss_lord_marrowgar.cpp | 2 +- .../IcecrownCitadel/boss_professor_putricide.cpp | 16 +++++------ .../Northrend/IcecrownCitadel/boss_sindragosa.cpp | 4 +-- .../IcecrownCitadel/boss_the_lich_king.cpp | 2 +- .../IcecrownCitadel/boss_valithria_dreamwalker.cpp | 4 +-- .../IcecrownCitadel/instance_icecrown_citadel.cpp | 4 +-- .../scripts/Northrend/Naxxramas/boss_faerlina.cpp | 2 +- .../scripts/Northrend/Naxxramas/boss_heigan.cpp | 2 +- .../scripts/Northrend/Naxxramas/boss_loatheb.cpp | 2 +- .../scripts/Northrend/Naxxramas/boss_thaddius.cpp | 2 +- .../Northrend/Naxxramas/instance_naxxramas.cpp | 4 +-- .../Northrend/Nexus/EyeOfEternity/boss_malygos.cpp | 2 +- .../EyeOfEternity/instance_eye_of_eternity.cpp | 2 +- .../Northrend/Nexus/Nexus/boss_anomalus.cpp | 2 +- .../Northrend/Nexus/Nexus/boss_magus_telestra.cpp | 2 +- .../scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp | 2 +- .../Northrend/Nexus/Nexus/instance_nexus.cpp | 4 +-- .../scripts/Northrend/Nexus/Oculus/boss_eregos.cpp | 2 +- .../Northrend/Nexus/Oculus/instance_oculus.cpp | 4 +-- .../instance_halls_of_lightning.cpp | 4 +-- .../Northrend/Ulduar/HallsOfStone/boss_sjonnir.cpp | 2 +- .../Ulduar/HallsOfStone/halls_of_stone.cpp | 2 +- .../HallsOfStone/instance_halls_of_stone.cpp | 4 +-- .../Ulduar/Ulduar/boss_algalon_the_observer.cpp | 4 +-- .../Northrend/Ulduar/Ulduar/boss_auriaya.cpp | 2 +- .../Ulduar/Ulduar/boss_flame_leviathan.cpp | 2 +- .../scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp | 2 +- .../Northrend/Ulduar/Ulduar/boss_general_vezax.cpp | 2 +- .../scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp | 2 +- .../Northrend/Ulduar/Ulduar/boss_razorscale.cpp | 4 +-- .../scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp | 2 +- .../Northrend/Ulduar/Ulduar/instance_ulduar.cpp | 4 +-- .../UtgardeKeep/UtgardeKeep/boss_keleseth.cpp | 2 +- .../UtgardeKeep/instance_utgarde_keep.cpp | 4 +-- .../UtgardeKeep/UtgardePinnacle/boss_svala.cpp | 2 +- .../UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp | 2 +- .../UtgardePinnacle/instance_pinnacle.cpp | 4 +-- .../VaultOfArchavon/instance_vault_of_archavon.cpp | 2 +- .../scripts/Northrend/VioletHold/boss_ichoron.cpp | 2 +- .../scripts/Northrend/VioletHold/boss_zuramat.cpp | 2 +- .../Northrend/VioletHold/instance_violet_hold.cpp | 4 +-- .../ShadowLabyrinth/instance_shadow_labyrinth.cpp | 4 +-- .../Outland/BlackTemple/instance_black_temple.cpp | 4 +-- .../SerpentShrine/boss_leotheras_the_blind.cpp | 2 +- .../SerpentShrine/instance_serpent_shrine.cpp | 4 +-- .../SteamVault/instance_steam_vault.cpp | 4 +-- .../Outland/GruulsLair/instance_gruuls_lair.cpp | 4 +-- .../BloodFurnace/instance_blood_furnace.cpp | 4 +-- .../instance_magtheridons_lair.cpp | 4 +-- .../ShatteredHalls/instance_shattered_halls.cpp | 4 +-- .../Outland/TempestKeep/Eye/instance_the_eye.cpp | 4 +-- .../TempestKeep/Mechanar/instance_mechanar.cpp | 4 +-- .../TempestKeep/arcatraz/instance_arcatraz.cpp | 4 +-- src/server/scripts/World/npcs_special.cpp | 2 +- 127 files changed, 273 insertions(+), 269 deletions(-) (limited to 'src/server/game/Maps') diff --git a/src/server/game/AI/CoreAI/GameObjectAI.h b/src/server/game/AI/CoreAI/GameObjectAI.h index 195f8d19c86..4561aa92741 100644 --- a/src/server/game/AI/CoreAI/GameObjectAI.h +++ b/src/server/game/AI/CoreAI/GameObjectAI.h @@ -42,7 +42,7 @@ class GameObjectAI // Pass parameters between AI virtual void DoAction(const int32 /*param = 0 */) {} virtual void SetGUID(uint64 /*guid*/, int32 /*id = 0 */) {} - virtual uint64 GetGUID(int32 /*id = 0 */) { return 0; } + virtual uint64 GetGUID(int32 /*id = 0 */) const { return 0; } static int Permissible(GameObject const* go); @@ -53,9 +53,9 @@ class GameObjectAI virtual bool QuestReward(Player* /*player*/, Quest const* /*quest*/, uint32 /*opt*/) { return false; } virtual uint32 GetDialogStatus(Player* /*player*/) { return 100; } virtual void Destroyed(Player* /*player*/, uint32 /*eventId*/) {} - virtual uint32 GetData(uint32 /*id*/) { return 0; } + virtual uint32 GetData(uint32 /*id*/) const { return 0; } virtual void SetData64(uint32 /*id*/, uint64 /*value*/) {} - virtual uint64 GetData64(uint32 /*id*/) { return 0; } + virtual uint64 GetData64(uint32 /*id*/) const { return 0; } virtual void SetData(uint32 /*id*/, uint32 /*value*/) {} virtual void OnGameEvent(bool /*start*/, uint16 /*eventId*/) {} virtual void OnStateChanged(uint32 /*state*/, Unit* /*unit*/) {} diff --git a/src/server/game/AI/CoreAI/UnitAI.h b/src/server/game/AI/CoreAI/UnitAI.h index b07c766ae0b..59604f395f9 100755 --- a/src/server/game/AI/CoreAI/UnitAI.h +++ b/src/server/game/AI/CoreAI/UnitAI.h @@ -146,10 +146,10 @@ class UnitAI // Pass parameters between AI virtual void DoAction(int32 const /*param*/) {} - virtual uint32 GetData(uint32 /*id = 0*/) { return 0; } + virtual uint32 GetData(uint32 /*id = 0*/) const { return 0; } virtual void SetData(uint32 /*id*/, uint32 /*value*/) {} virtual void SetGUID(uint64 /*guid*/, int32 /*id*/ = 0) {} - virtual uint64 GetGUID(int32 /*id*/ = 0) { return 0; } + virtual uint64 GetGUID(int32 /*id*/ = 0) const { return 0; } Unit* SelectTarget(SelectAggroTarget targetType, uint32 position = 0, float dist = 0.0f, bool playerOnly = false, int32 aura = 0); // Select the targets satifying the predicate. diff --git a/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp b/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp index f8025a32b7f..67cabc6ccb1 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp +++ b/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp @@ -77,17 +77,13 @@ void SummonList::RemoveNotExisting() } } -bool SummonList::HasEntry(uint32 entry) +bool SummonList::HasEntry(uint32 entry) const { - for (iterator i = begin(); i != end();) + for (const_iterator i = begin(); i != end(); ++i) { Creature* summon = Unit::GetCreature(*me, *i); - if (!summon) - erase(i++); - else if (summon->GetEntry() == entry) + if (summon && summon->GetEntry() == entry) return true; - else - ++i; } return false; diff --git a/src/server/game/AI/ScriptedAI/ScriptedCreature.h b/src/server/game/AI/ScriptedAI/ScriptedCreature.h index aa46d555b7d..2a221d04404 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedCreature.h +++ b/src/server/game/AI/ScriptedAI/ScriptedCreature.h @@ -54,7 +54,7 @@ class SummonList : public std::list void DoZoneInCombat(uint32 entry = 0); void RemoveNotExisting(); - bool HasEntry(uint32 entry); + bool HasEntry(uint32 entry) const; private: Creature* me; }; diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp index 7dd4053b82f..6aebcbb2d8a 100644 --- a/src/server/game/AI/SmartScripts/SmartAI.cpp +++ b/src/server/game/AI/SmartScripts/SmartAI.cpp @@ -698,7 +698,7 @@ void SmartAI::DoAction(const int32 param) GetScript()->ProcessEventsFor(SMART_EVENT_ACTION_DONE, NULL, param); } -uint32 SmartAI::GetData(uint32 /*id*/) +uint32 SmartAI::GetData(uint32 /*id*/) const { return 0; } @@ -712,7 +712,7 @@ void SmartAI::SetGUID(uint64 /*guid*/, int32 /*id*/) { } -uint64 SmartAI::GetGUID(int32 /*id*/) +uint64 SmartAI::GetGUID(int32 /*id*/) const { return 0; } diff --git a/src/server/game/AI/SmartScripts/SmartAI.h b/src/server/game/AI/SmartScripts/SmartAI.h index f81d6e86850..ca6450aa746 100644 --- a/src/server/game/AI/SmartScripts/SmartAI.h +++ b/src/server/game/AI/SmartScripts/SmartAI.h @@ -151,7 +151,7 @@ class SmartAI : public CreatureAI void DoAction(const int32 param = 0); // Used in scripts to share variables - uint32 GetData(uint32 id = 0); + uint32 GetData(uint32 id = 0) const; // Used in scripts to share variables void SetData(uint32 id, uint32 value); @@ -160,7 +160,7 @@ class SmartAI : public CreatureAI void SetGUID(uint64 guid, int32 id = 0); // Used in scripts to share variables - uint64 GetGUID(int32 id = 0); + uint64 GetGUID(int32 id = 0) const; //core related static int Permissible(const Creature*); diff --git a/src/server/game/Battlefield/Battlefield.cpp b/src/server/game/Battlefield/Battlefield.cpp index b3f5c7bf704..7e3b3cc0f1a 100644 --- a/src/server/game/Battlefield/Battlefield.cpp +++ b/src/server/game/Battlefield/Battlefield.cpp @@ -587,12 +587,12 @@ bool Battlefield::AddOrSetPlayerToCorrectBfGroup(Player* player) //-------------------- //-Battlefield Method- //-------------------- -BfGraveyard* Battlefield::GetGraveyardById(uint32 id) +BfGraveyard* Battlefield::GetGraveyardById(uint32 id) const { if (id < m_GraveyardList.size()) { - if (m_GraveyardList[id]) - return m_GraveyardList[id]; + if (BfGraveyard* graveyard = m_GraveyardList.at(id)) + return graveyard; else sLog->outError(LOG_FILTER_BATTLEFIELD, "Battlefield::GetGraveyardById Id:%u not existed", id); } diff --git a/src/server/game/Battlefield/Battlefield.h b/src/server/game/Battlefield/Battlefield.h index 77525b7d06e..4533c666869 100644 --- a/src/server/game/Battlefield/Battlefield.h +++ b/src/server/game/Battlefield/Battlefield.h @@ -147,7 +147,7 @@ class BfGraveyard // Method to changing who controls the graveyard void GiveControlTo(TeamId team); - TeamId GetControlTeamId() { return m_ControlTeam; } + TeamId GetControlTeamId() const { return m_ControlTeam; } // Find the nearest graveyard to a player float GetDistance(Player* player); @@ -187,7 +187,7 @@ class BfGraveyard bool HasPlayer(uint64 guid) { return m_ResurrectQueue.find(guid) != m_ResurrectQueue.end(); } // Get the graveyard's ID. - uint32 GetGraveyardId() { return m_GraveyardId; } + uint32 GetGraveyardId() const { return m_GraveyardId; } protected: TeamId m_ControlTeam; @@ -260,11 +260,11 @@ class Battlefield : public ZoneScript void HandlePlayerLeaveZone(Player* player, uint32 zone); // All-purpose data storage 64 bit - virtual uint64 GetData64(uint32 dataId) { return m_Data64[dataId]; } + virtual uint64 GetData64(uint32 dataId) const { return m_Data64[dataId]; } virtual void SetData64(uint32 dataId, uint64 value) { m_Data64[dataId] = value; } // All-purpose data storage 32 bit - virtual uint32 GetData(uint32 dataId) { return m_Data32[dataId]; } + virtual uint32 GetData(uint32 dataId) const { return m_Data32[dataId]; } virtual void SetData(uint32 dataId, uint32 value) { m_Data32[dataId] = value; } virtual void UpdateData(uint32 index, int32 pad) { m_Data32[index] += pad; } @@ -292,7 +292,7 @@ class Battlefield : public ZoneScript virtual void AddPlayerToResurrectQueue(uint64 npc_guid, uint64 player_guid); void RemovePlayerFromResurrectQueue(uint64 player_guid); void SetGraveyardNumber(uint32 number) { m_GraveyardList.resize(number); } - BfGraveyard* GetGraveyardById(uint32 id); + BfGraveyard* GetGraveyardById(uint32 id) const; // Misc methods Creature* SpawnCreature(uint32 entry, float x, float y, float z, float o, TeamId team); diff --git a/src/server/game/Battlefield/Zones/BattlefieldWG.cpp b/src/server/game/Battlefield/Zones/BattlefieldWG.cpp index 505bfb353f2..9d48bc6115f 100644 --- a/src/server/game/Battlefield/Zones/BattlefieldWG.cpp +++ b/src/server/game/Battlefield/Zones/BattlefieldWG.cpp @@ -454,7 +454,7 @@ void BattlefieldWG::OnStartGrouping() SendWarningToAllInZone(BATTLEFIELD_WG_TEXT_WILL_START); } -uint8 BattlefieldWG::GetSpiritGraveyardId(uint32 areaId) +uint8 BattlefieldWG::GetSpiritGraveyardId(uint32 areaId) const { switch (areaId) { @@ -802,7 +802,7 @@ void BattlefieldWG::OnPlayerEnterZone(Player* player) SendInitWorldStatesTo(player); } -uint32 BattlefieldWG::GetData(uint32 data) +uint32 BattlefieldWG::GetData(uint32 data) const { switch (data) { @@ -813,8 +813,8 @@ uint32 BattlefieldWG::GetData(uint32 data) case AREA_WESTPARK_WORKSHOP: case AREA_EASTPARK_WORKSHOP: // Graveyards and Workshops are controlled by the same team. - if (m_GraveyardList[GetSpiritGraveyardId(data)]) - return m_GraveyardList[GetSpiritGraveyardId(data)]->GetControlTeamId(); + if (BfGraveyard const* graveyard = GetGraveyardById(GetSpiritGraveyardId(data))) + return graveyard->GetControlTeamId(); } return Battlefield::GetData(data); diff --git a/src/server/game/Battlefield/Zones/BattlefieldWG.h b/src/server/game/Battlefield/Zones/BattlefieldWG.h index 0a81a7af992..2aa38b6811a 100644 --- a/src/server/game/Battlefield/Zones/BattlefieldWG.h +++ b/src/server/game/Battlefield/Zones/BattlefieldWG.h @@ -410,9 +410,9 @@ class BattlefieldWG : public Battlefield bool FindAndRemoveVehicleFromList(Unit* vehicle); // returns the graveyardId in the specified area. - uint8 GetSpiritGraveyardId(uint32 areaId); + uint8 GetSpiritGraveyardId(uint32 areaId) const; - uint32 GetData(uint32 data); + uint32 GetData(uint32 data) const; protected: bool m_isRelicInteractible; diff --git a/src/server/game/Entities/Pet/Pet.cpp b/src/server/game/Entities/Pet/Pet.cpp index d2d9bdac4b3..45b6e452054 100755 --- a/src/server/game/Entities/Pet/Pet.cpp +++ b/src/server/game/Entities/Pet/Pet.cpp @@ -1077,7 +1077,7 @@ bool Pet::HaveInDiet(ItemTemplate const* item) const return diet & FoodMask; } -uint32 Pet::GetCurrentFoodBenefitLevel(uint32 itemlevel) +uint32 Pet::GetCurrentFoodBenefitLevel(uint32 itemlevel) const { // -5 or greater food level if (getLevel() <= itemlevel + 5) //possible to feed level 60 pet with level 55 level food for full effect @@ -1881,7 +1881,7 @@ void Pet::ToggleAutocast(SpellInfo const* spellInfo, bool apply) } } -bool Pet::IsPermanentPetFor(Player* owner) +bool Pet::IsPermanentPetFor(Player* owner) const { switch (getPetType()) { diff --git a/src/server/game/Entities/Pet/Pet.h b/src/server/game/Entities/Pet/Pet.h index 38a39827956..f24bb665710 100755 --- a/src/server/game/Entities/Pet/Pet.h +++ b/src/server/game/Entities/Pet/Pet.h @@ -112,9 +112,9 @@ class Pet : public Guardian bool isControlled() const { return getPetType() == SUMMON_PET || getPetType() == HUNTER_PET; } bool isTemporarySummoned() const { return m_duration > 0; } - bool IsPermanentPetFor(Player* owner); // pet have tab in character windows and set UNIT_FIELD_PETNUMBER + bool IsPermanentPetFor(Player* owner) const; // pet have tab in character windows and set UNIT_FIELD_PETNUMBER - bool Create (uint32 guidlow, Map* map, uint32 phaseMask, uint32 Entry, uint32 pet_number); + bool Create(uint32 guidlow, Map* map, uint32 phaseMask, uint32 Entry, uint32 pet_number); bool CreateBaseAtCreature(Creature* creature); bool CreateBaseAtCreatureInfo(CreatureTemplate const* cinfo, Unit* owner); bool CreateBaseAtTamed(CreatureTemplate const* cinfo, Map* map, uint32 phaseMask); @@ -142,9 +142,9 @@ class Pet : public Guardian void GivePetLevel(uint8 level); void SynchronizeLevelWithOwner(); bool HaveInDiet(ItemTemplate const* item) const; - uint32 GetCurrentFoodBenefitLevel(uint32 itemlevel); + uint32 GetCurrentFoodBenefitLevel(uint32 itemlevel) const; void SetDuration(int32 dur) { m_duration = dur; } - int32 GetDuration() { return m_duration; } + int32 GetDuration() const { return m_duration; } /* bool UpdateStats(Stats stat); diff --git a/src/server/game/Maps/ZoneScript.h b/src/server/game/Maps/ZoneScript.h index df6349a7664..7b20b0ee676 100755 --- a/src/server/game/Maps/ZoneScript.h +++ b/src/server/game/Maps/ZoneScript.h @@ -32,19 +32,20 @@ class ZoneScript virtual uint32 GetCreatureEntry(uint32 /*guidlow*/, CreatureData const* data) { return data->id; } virtual uint32 GetGameObjectEntry(uint32 /*guidlow*/, uint32 entry) { return entry; } - virtual void OnCreatureCreate(Creature* /*creature*/) {} - virtual void OnCreatureRemove(Creature* /*creature*/) {} - virtual void OnGameObjectCreate(GameObject* /*go*/) {} - virtual void OnGameObjectRemove(GameObject* /*go*/) {} + virtual void OnCreatureCreate(Creature *) { } + virtual void OnCreatureRemove(Creature *) { } - virtual void OnUnitDeath(Unit* /*unit*/) {} + virtual void OnGameObjectCreate(GameObject *) { } + virtual void OnGameObjectRemove(GameObject *) { } + + virtual void OnUnitDeath(Unit*) { } //All-purpose data storage 64 bit - virtual uint64 GetData64(uint32 /*DataId*/) { return 0; } + virtual uint64 GetData64(uint32 /*DataId*/) const { return 0; } virtual void SetData64(uint32 /*DataId*/, uint64 /*Value*/) {} //All-purpose data storage 32 bit - virtual uint32 GetData(uint32 /*DataId*/) { return 0; } + virtual uint32 GetData(uint32 /*DataId*/) const { return 0; } virtual void SetData(uint32 /*DataId*/, uint32 /*Value*/) {} virtual void ProcessEvent(WorldObject* /*obj*/, uint32 /*eventId*/) {} diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/instance_blackrock_depths.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/instance_blackrock_depths.cpp index 0d02e4495a5..2c2ae3a79c5 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockDepths/instance_blackrock_depths.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/instance_blackrock_depths.cpp @@ -273,7 +273,7 @@ public: } } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { switch (type) { @@ -298,7 +298,7 @@ public: return 0; } - uint64 GetData64(uint32 data) + uint64 GetData64(uint32 data) const { switch (data) { diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/instance_blackrock_spire.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/instance_blackrock_spire.cpp index fdb73fe1196..124743174b6 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/instance_blackrock_spire.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/instance_blackrock_spire.cpp @@ -222,7 +222,7 @@ public: } } - uint64 GetData64(uint32 type) + uint64 GetData64(uint32 type) const { switch (type) { diff --git a/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp b/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp index e97215a696d..8ee4ab0f594 100644 --- a/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp +++ b/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp @@ -214,7 +214,7 @@ class instance_deadmines : public InstanceMapScript } } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { switch (type) { @@ -225,7 +225,7 @@ class instance_deadmines : public InstanceMapScript return 0; } - uint64 GetData64(uint32 data) + uint64 GetData64(uint32 data) const { switch (data) { diff --git a/src/server/scripts/EasternKingdoms/Gnomeregan/instance_gnomeregan.cpp b/src/server/scripts/EasternKingdoms/Gnomeregan/instance_gnomeregan.cpp index 2e520351150..8e126fae588 100644 --- a/src/server/scripts/EasternKingdoms/Gnomeregan/instance_gnomeregan.cpp +++ b/src/server/scripts/EasternKingdoms/Gnomeregan/instance_gnomeregan.cpp @@ -114,7 +114,7 @@ public: } } - uint32 GetData(uint32 uiType) + uint32 GetData(uint32 uiType) const { switch (uiType) { @@ -123,7 +123,7 @@ public: return 0; } - uint64 GetData64(uint32 uiType) + uint64 GetData64(uint32 uiType) const { switch (uiType) { diff --git a/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp b/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp index 2ecd98cbc4c..2937d0ab700 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp @@ -241,7 +241,7 @@ public: return strSaveData; } - uint32 GetData(uint32 uiData) + uint32 GetData(uint32 uiData) const { switch (uiData) { @@ -264,7 +264,7 @@ public: return 0; } - uint64 GetData64(uint32 uiData) + uint64 GetData64(uint32 uiData) const { switch (uiData) { diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp index 74d1b5b9f1b..7b79c18239e 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp @@ -75,6 +75,7 @@ public: uint32 size = instance->GetData(DATA_FEL_CRYSTAL_SIZE); for (uint8 i = 0; i < size; ++i) { + instance->SetData64(DATA_FEL_CRYSTAL, i); uint64 guid = instance->GetData64(DATA_FEL_CRYSTAL); sLog->outDebug(LOG_FILTER_TSCR, "Selin: Adding Fel Crystal " UI64FMTD " to list", guid); Crystals.push_back(guid); diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp index da15f9020da..c8bf50c0bcc 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp @@ -72,8 +72,7 @@ public: uint32 Encounter[MAX_ENCOUNTER]; uint32 DelrissaDeathCount; - std::list FelCrystals; - std::list::const_iterator CrystalItr; + std::vector FelCrystals; uint64 SelinGUID; uint64 DelrissaGUID; @@ -85,8 +84,7 @@ public: uint64 KaelStatue[2]; uint64 EscapeOrbGUID; uint32 StatuesState; - - bool InitializedItr; + uint8 felCristalIndex; void Initialize() { @@ -107,8 +105,7 @@ public: KaelStatue[1] = 0; EscapeOrbGUID = 0; StatuesState = 0; - - InitializedItr = false; + felCristalIndex = 0; } bool IsEncounterInProgress() const @@ -119,7 +116,7 @@ public: return false; } - uint32 GetData(uint32 identifier) + uint32 GetData(uint32 identifier) const { switch (identifier) { @@ -276,7 +273,7 @@ public: OUT_LOAD_INST_DATA_COMPLETE; } - uint64 GetData64(uint32 identifier) + uint64 GetData64(uint32 identifier) const { switch (identifier) { @@ -297,26 +294,22 @@ public: case DATA_ESCAPE_ORB: return EscapeOrbGUID; case DATA_FEL_CRYSTAL: - { - if (FelCrystals.empty()) + if (FelCrystals.size() < felCristalIndex) { sLog->outError(LOG_FILTER_TSCR, "Magisters Terrace: No Fel Crystals loaded in Inst Data"); return 0; } - if (!InitializedItr) - { - CrystalItr = FelCrystals.begin(); - InitializedItr = true; - } - - uint64 guid = *CrystalItr; - ++CrystalItr; - return guid; - } + return FelCrystals.at(felCristalIndex); } return 0; } + + void SetData64(uint32 identifier, uint64 value) + { + if (identifier == DATA_FEL_CRYSTAL) + felCristalIndex = value; + } }; }; diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/instance_molten_core.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/instance_molten_core.cpp index 33719f8f1f6..1a055b9bce0 100644 --- a/src/server/scripts/EasternKingdoms/MoltenCore/instance_molten_core.cpp +++ b/src/server/scripts/EasternKingdoms/MoltenCore/instance_molten_core.cpp @@ -117,7 +117,7 @@ class instance_molten_core : public InstanceMapScript } } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { switch (type) { @@ -128,7 +128,7 @@ class instance_molten_core : public InstanceMapScript return 0; } - uint64 GetData64(uint32 type) + uint64 GetData64(uint32 type) const { switch (type) { diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp index a65edcd63bc..eb695e984cb 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp @@ -308,7 +308,7 @@ public: prisonerGUID = guid; } - uint64 GetGUID(int32 /*id*/) + uint64 GetGUID(int32 /*id*/) const { return prisonerGUID; } diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp index 3d3d9ae52ae..e65ab21b8cf 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp @@ -132,7 +132,7 @@ public: } } - uint64 GetData64(uint32 type) + uint64 GetData64(uint32 type) const { switch (type) { @@ -147,7 +147,7 @@ public: return 0; } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { if (type == TYPE_MOGRAINE_AND_WHITE_EVENT) return encounter[0]; diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_doctor_theolen_krastinov.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_doctor_theolen_krastinov.cpp index 197ee9a5bfe..5151268b70d 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_doctor_theolen_krastinov.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_doctor_theolen_krastinov.cpp @@ -67,7 +67,10 @@ public: instance->SetData(DATA_DOCTORTHEOLENKRASTINOV_DEATH, 0); if (instance->GetData(TYPE_GANDLING) == IN_PROGRESS) + { + instance->SetData(TYPE_GANDLING, IN_PROGRESS); me->SummonCreature(1853, 180.73f, -9.43856f, 75.507f, 1.61399f, TEMPSUMMON_DEAD_DESPAWN, 0); + } } } diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_illucia_barov.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_illucia_barov.cpp index b6b5cc0acbd..e1cffbaf90d 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_illucia_barov.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_illucia_barov.cpp @@ -67,7 +67,10 @@ public: instance->SetData(DATA_LADYILLUCIABAROV_DEATH, 0); if (instance->GetData(TYPE_GANDLING) == IN_PROGRESS) + { + instance->SetData(TYPE_GANDLING, IN_PROGRESS); me->SummonCreature(1853, 180.73f, -9.43856f, 75.507f, 1.61399f, TEMPSUMMON_DEAD_DESPAWN, 0); + } } } diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_instructor_malicia.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_instructor_malicia.cpp index 406b1a6b10d..1768584cb25 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_instructor_malicia.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_instructor_malicia.cpp @@ -74,7 +74,10 @@ public: instance->SetData(DATA_INSTRUCTORMALICIA_DEATH, 0); if (instance->GetData(TYPE_GANDLING) == IN_PROGRESS) + { + instance->SetData(TYPE_GANDLING, IN_PROGRESS); me->SummonCreature(1853, 180.73f, -9.43856f, 75.507f, 1.61399f, TEMPSUMMON_DEAD_DESPAWN, 0); + } } } diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_lord_alexei_barov.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_lord_alexei_barov.cpp index 438c3c88bb4..3035688343c 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_lord_alexei_barov.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_lord_alexei_barov.cpp @@ -63,7 +63,10 @@ public: instance->SetData(DATA_LORDALEXEIBAROV_DEATH, 0); if (instance->GetData(TYPE_GANDLING) == IN_PROGRESS) + { + instance->SetData(TYPE_GANDLING, IN_PROGRESS); me->SummonCreature(1853, 180.73f, -9.43856f, 75.507f, 1.61399f, TEMPSUMMON_DEAD_DESPAWN, 0); + } } } diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_lorekeeper_polkelt.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_lorekeeper_polkelt.cpp index 64bbbbe9514..dfab9dd37df 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_lorekeeper_polkelt.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_lorekeeper_polkelt.cpp @@ -67,7 +67,10 @@ public: instance->SetData(DATA_LOREKEEPERPOLKELT_DEATH, 0); if (instance->GetData(TYPE_GANDLING) == IN_PROGRESS) + { + instance->SetData(TYPE_GANDLING, IN_PROGRESS); me->SummonCreature(1853, 180.73f, -9.43856f, 75.507f, 1.61399f, TEMPSUMMON_DEAD_DESPAWN, 0); + } } } diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_the_ravenian.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_the_ravenian.cpp index 381a039d609..b3d42d4676a 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_the_ravenian.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_the_ravenian.cpp @@ -69,7 +69,10 @@ public: instance->SetData(DATA_THERAVENIAN_DEATH, 0); if (instance->GetData(TYPE_GANDLING) == IN_PROGRESS) + { + instance->SetData(TYPE_GANDLING, IN_PROGRESS); me->SummonCreature(1853, 180.73f, -9.43856f, 75.507f, 1.61399f, TEMPSUMMON_DEAD_DESPAWN, 0); + } } } diff --git a/src/server/scripts/EasternKingdoms/Scholomance/instance_scholomance.cpp b/src/server/scripts/EasternKingdoms/Scholomance/instance_scholomance.cpp index c3b3724ec3d..f8a0c0010d2 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/instance_scholomance.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/instance_scholomance.cpp @@ -128,21 +128,14 @@ public: } } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { - if (type == TYPE_GANDLING) - { - if (IsBossDied[0] && IsBossDied[1] && IsBossDied[2] && IsBossDied[3] && IsBossDied[4] && IsBossDied[5]) - { - m_auiEncounter[0] = IN_PROGRESS; - return IN_PROGRESS; - } - } - - return 0; + return (type == TYPE_GANDLING && + IsBossDied[0] && IsBossDied[1] && IsBossDied[2] && + IsBossDied[3] && IsBossDied[4] && IsBossDied[5]) + ? IN_PROGRESS : 0; } }; - }; void AddSC_instance_scholomance() diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp b/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp index f219875b057..509fcdd845e 100644 --- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp +++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp @@ -192,7 +192,7 @@ public: } } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { switch (type) { diff --git a/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp b/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp index 17eedb87896..2e4ec7278fc 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp @@ -402,7 +402,7 @@ class instance_stratholme : public InstanceMapScript OUT_LOAD_INST_DATA_COMPLETE; } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { switch (type) { @@ -426,7 +426,7 @@ class instance_stratholme : public InstanceMapScript return 0; } - uint64 GetData64(uint32 data) + uint64 GetData64(uint32 data) const { switch (data) { diff --git a/src/server/scripts/EasternKingdoms/SunkenTemple/instance_sunken_temple.cpp b/src/server/scripts/EasternKingdoms/SunkenTemple/instance_sunken_temple.cpp index e0987961f7e..624e5460213 100644 --- a/src/server/scripts/EasternKingdoms/SunkenTemple/instance_sunken_temple.cpp +++ b/src/server/scripts/EasternKingdoms/SunkenTemple/instance_sunken_temple.cpp @@ -193,7 +193,7 @@ public: State = data; } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { if (type == EVENT_STATE) return State; diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp index bf31557d8a8..c4bb41036bc 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp @@ -122,7 +122,7 @@ public: return false; } - Player* GetPlayerInMap() + Player const * GetPlayerInMap() const { Map::PlayerList const& players = instance->GetPlayers(); @@ -182,7 +182,7 @@ public: } } - uint32 GetData(uint32 id) + uint32 GetData(uint32 id) const { switch (id) { @@ -196,7 +196,7 @@ public: return 0; } - uint64 GetData64(uint32 id) + uint64 GetData64(uint32 id) const { switch (id) { @@ -215,8 +215,8 @@ public: case DATA_ANVEENA: return Anveena; case DATA_KALECGOS_KJ: return KalecgosKJ; case DATA_PLAYER_GUID: - Player* Target = GetPlayerInMap(); - return Target->GetGUID(); + Player const* target = GetPlayerInMap(); + return target ? target->GetGUID() : 0; } return 0; } diff --git a/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp b/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp index ee82da668f8..eeb1df7b693 100644 --- a/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp +++ b/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp @@ -466,20 +466,27 @@ class instance_uldaman : public InstanceMapScript } } - uint64 GetData64(uint32 identifier) + uint64 GetData64(uint32 identifier) const { - if (identifier == 0) return uiWhoWokeuiArchaedasGUID; - if (identifier == 1) return vVaultWalker[0]; // VaultWalker1 - if (identifier == 2) return vVaultWalker[1]; // VaultWalker2 - if (identifier == 3) return vVaultWalker[2]; // VaultWalker3 - if (identifier == 4) return vVaultWalker[3]; // VaultWalker4 - - if (identifier == 5) return vEarthenGuardian[0]; - if (identifier == 6) return vEarthenGuardian[1]; - if (identifier == 7) return vEarthenGuardian[2]; - if (identifier == 8) return vEarthenGuardian[3]; - if (identifier == 9) return vEarthenGuardian[4]; - if (identifier == 10) return vEarthenGuardian[5]; + switch (identifier) + { + case 0: + return uiWhoWokeuiArchaedasGUID; + case 1: + case 2: + case 3: + case 4: + return vVaultWalker.at(identifier); + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + return vEarthenGuardian.at(identifier - 5); + default: + break; + } return 0; } // end GetData64 diff --git a/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp b/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp index b113c7c68b9..c692e18e6ca 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp @@ -283,7 +283,7 @@ class instance_zulaman : public InstanceMapScript } } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { switch (type) { diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp index 104d479383b..8d17a18bb1b 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp @@ -113,7 +113,7 @@ class instance_zulgurub : public InstanceMapScript } } - uint32 GetData(uint32 uiType) + uint32 GetData(uint32 uiType) const { switch (uiType) { @@ -137,7 +137,7 @@ class instance_zulgurub : public InstanceMapScript return 0; } - uint64 GetData64(uint32 uiData) + uint64 GetData64(uint32 uiData) const { switch (uiData) { @@ -163,4 +163,4 @@ class instance_zulgurub : public InstanceMapScript void AddSC_instance_zulgurub() { new instance_zulgurub(); -} \ No newline at end of file +} diff --git a/src/server/scripts/Kalimdor/BlackfathomDeeps/instance_blackfathom_deeps.cpp b/src/server/scripts/Kalimdor/BlackfathomDeeps/instance_blackfathom_deeps.cpp index 236c7b1ba69..8df5c5cdfd4 100644 --- a/src/server/scripts/Kalimdor/BlackfathomDeeps/instance_blackfathom_deeps.cpp +++ b/src/server/scripts/Kalimdor/BlackfathomDeeps/instance_blackfathom_deeps.cpp @@ -212,7 +212,7 @@ public: } } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { switch (type) { @@ -233,7 +233,7 @@ public: return 0; } - uint64 GetData64(uint32 data) + uint64 GetData64(uint32 data) const { switch (data) { diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp index 6ab3e42dcb9..1fe3ac60260 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp @@ -157,7 +157,7 @@ public: } } - uint64 GetData64(uint32 identifier) + uint64 GetData64(uint32 identifier) const { switch (identifier) { @@ -294,7 +294,7 @@ public: } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { switch (type) { 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 9a5bc95853c..0ec7d1bdd25 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 @@ -196,7 +196,7 @@ class instance_culling_of_stratholme : public InstanceMapScript SaveToDB(); } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { switch (type) { @@ -216,7 +216,7 @@ class instance_culling_of_stratholme : public InstanceMapScript return 0; } - uint64 GetData64(uint32 identifier) + uint64 GetData64(uint32 identifier) const { switch (identifier) { 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 926f48a17a2..879b0ed4aee 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/instance_dark_portal.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/instance_dark_portal.cpp @@ -237,7 +237,7 @@ public: } } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { switch (type) { @@ -253,7 +253,7 @@ public: return 0; } - uint64 GetData64(uint32 data) + uint64 GetData64(uint32 data) const { if (data == DATA_MEDIVH) return MedivhGUID; 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 6995ca5add5..5f7af55358e 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp @@ -203,7 +203,7 @@ public: } } - uint32 GetData(uint32 data) + uint32 GetData(uint32 data) const { switch (data) { @@ -223,7 +223,7 @@ public: return 0; } - uint64 GetData64(uint32 data) + uint64 GetData64(uint32 data) const { switch (data) { diff --git a/src/server/scripts/Kalimdor/OnyxiasLair/instance_onyxias_lair.cpp b/src/server/scripts/Kalimdor/OnyxiasLair/instance_onyxias_lair.cpp index 0689a8872bb..22ec68eba5e 100644 --- a/src/server/scripts/Kalimdor/OnyxiasLair/instance_onyxias_lair.cpp +++ b/src/server/scripts/Kalimdor/OnyxiasLair/instance_onyxias_lair.cpp @@ -189,7 +189,7 @@ public: } } - uint32 GetData(uint32 Type) + uint32 GetData(uint32 Type) const { switch (Type) { @@ -200,7 +200,7 @@ public: return 0; } - uint64 GetData64(uint32 Data) + uint64 GetData64(uint32 Data) const { switch (Data) { diff --git a/src/server/scripts/Kalimdor/RazorfenDowns/instance_razorfen_downs.cpp b/src/server/scripts/Kalimdor/RazorfenDowns/instance_razorfen_downs.cpp index a90d465c1ca..3acf9bc7029 100644 --- a/src/server/scripts/Kalimdor/RazorfenDowns/instance_razorfen_downs.cpp +++ b/src/server/scripts/Kalimdor/RazorfenDowns/instance_razorfen_downs.cpp @@ -186,7 +186,7 @@ public: } } - uint32 GetData(uint32 uiType) + uint32 GetData(uint32 uiType) const { switch (uiType) { @@ -197,7 +197,7 @@ public: return 0; } - uint64 GetData64(uint32 uiType) + uint64 GetData64(uint32 uiType) const { switch (uiType) { diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/instance_ruins_of_ahnqiraj.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/instance_ruins_of_ahnqiraj.cpp index 1fa2f8bc713..d61d9416ac6 100644 --- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/instance_ruins_of_ahnqiraj.cpp +++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/instance_ruins_of_ahnqiraj.cpp @@ -71,7 +71,7 @@ class instance_ruins_of_ahnqiraj : public InstanceMapScript return true; } - uint64 GetData64(uint32 type) + uint64 GetData64(uint32 type) const { switch (type) { diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp index 887ca4f3ad5..c8a1ff63925 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp @@ -90,7 +90,7 @@ public: return false; } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { switch (type) { @@ -118,7 +118,7 @@ public: return 0; } - uint64 GetData64(uint32 identifier) + uint64 GetData64(uint32 identifier) const { switch (identifier) { diff --git a/src/server/scripts/Kalimdor/WailingCaverns/instance_wailing_caverns.cpp b/src/server/scripts/Kalimdor/WailingCaverns/instance_wailing_caverns.cpp index 1bb5c1180bd..afd4d834f07 100644 --- a/src/server/scripts/Kalimdor/WailingCaverns/instance_wailing_caverns.cpp +++ b/src/server/scripts/Kalimdor/WailingCaverns/instance_wailing_caverns.cpp @@ -80,7 +80,7 @@ public: if (data == DONE)SaveToDB(); } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { switch (type) { @@ -98,7 +98,7 @@ public: return 0; } - uint64 GetData64(uint32 data) + uint64 GetData64(uint32 data) const { if (data == DATA_NARALEX)return NaralexGUID; return 0; diff --git a/src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp b/src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp index 4e1508d7cc9..2706b638573 100644 --- a/src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp +++ b/src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp @@ -180,7 +180,7 @@ public: } } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { switch (type) { @@ -190,7 +190,7 @@ public: return 0; } - uint64 GetData64(uint32 data) + uint64 GetData64(uint32 data) const { switch (data) { diff --git a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_elder_nadox.cpp b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_elder_nadox.cpp index fe86f54ae15..9b48d7a9e1c 100644 --- a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_elder_nadox.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_elder_nadox.cpp @@ -116,7 +116,7 @@ class boss_elder_nadox : public CreatureScript GuardianDied = true; } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { if (type == DATA_RESPECT_YOUR_ELDERS) return !GuardianDied ? 1 : 0; diff --git a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_jedoga_shadowseeker.cpp b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_jedoga_shadowseeker.cpp index 02dcc04abd6..e6bb23b61d7 100644 --- a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_jedoga_shadowseeker.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_jedoga_shadowseeker.cpp @@ -156,7 +156,7 @@ public: volunteerWork = false; } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { if (type == DATA_VOLUNTEER_WORK) return volunteerWork ? 1 : 0; diff --git a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/instance_ahnkahet.cpp b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/instance_ahnkahet.cpp index f870c61dd5f..7eaf8368c21 100644 --- a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/instance_ahnkahet.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/instance_ahnkahet.cpp @@ -160,7 +160,7 @@ public: } } - uint64 GetData64(uint32 identifier) + uint64 GetData64(uint32 identifier) const { switch (identifier) { @@ -252,7 +252,7 @@ public: SaveToDB(); } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { switch (type) { diff --git a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/instance_azjol_nerub.cpp b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/instance_azjol_nerub.cpp index 4e06ac0ba3a..10575ae288c 100644 --- a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/instance_azjol_nerub.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/instance_azjol_nerub.cpp @@ -105,7 +105,7 @@ public: } } - uint64 GetData64(uint32 identifier) + uint64 GetData64(uint32 identifier) const { switch (identifier) { @@ -149,7 +149,7 @@ public: } } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { switch (type) { diff --git a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp index a9d6d9d91ba..e20b08c515e 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp +++ b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp @@ -404,7 +404,7 @@ public: me->AddLootMode(LOOT_MODE_HARD_MODE_1); // Add 1st Drake loot mode } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { if (type == TWILIGHT_ACHIEVEMENTS) return drakeCount; diff --git a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/instance_obsidian_sanctum.cpp b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/instance_obsidian_sanctum.cpp index 7d4438ed7c7..c39d7fbeb09 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/instance_obsidian_sanctum.cpp +++ b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/instance_obsidian_sanctum.cpp @@ -108,7 +108,7 @@ public: m_bVesperonKilled = true; } - uint32 GetData(uint32 uiType) + uint32 GetData(uint32 uiType) const { if (uiType == TYPE_SARTHARION_EVENT) return m_auiEncounter[0]; @@ -122,7 +122,7 @@ public: return 0; } - uint64 GetData64(uint32 uiData) + uint64 GetData64(uint32 uiData) const { switch (uiData) { 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 3f710d7fedd..059f8c606a0 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/instance_ruby_sanctum.cpp +++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/instance_ruby_sanctum.cpp @@ -162,7 +162,7 @@ class instance_ruby_sanctum : public InstanceMapScript } } - uint64 GetData64(uint32 type) + uint64 GetData64(uint32 type) const { switch (type) { @@ -272,7 +272,7 @@ class instance_ruby_sanctum : public InstanceMapScript BaltharusSharedHealth = data; } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { if (type != DATA_BALTHARUS_SHARED_HEALTH) return 0; 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 412951b17d4..d2a01003324 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 @@ -235,7 +235,7 @@ public: SaveToDB(); } - uint32 GetData(uint32 uiData) + uint32 GetData(uint32 uiData) const { switch (uiData) { @@ -251,7 +251,7 @@ public: return 0; } - uint64 GetData64(uint32 uiData) + uint64 GetData64(uint32 uiData) const { switch (uiData) { diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp index 4d99429bcb8..0c081da5204 100755 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp @@ -499,7 +499,7 @@ class mob_essence_of_twin : public CreatureScript { mob_essence_of_twinAI(Creature* creature) : ScriptedAI(creature) { } - uint32 GetData(uint32 data) + uint32 GetData(uint32 data) const { uint32 spellReturned = 0; switch (me->GetEntry()) 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 7b0cd31bc67..917ad206b77 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 @@ -43,7 +43,6 @@ class instance_trial_of_the_crusader : public InstanceMapScript MistressOfPainCount = 0; TributeToImmortalityElegible = true; NeedSave = false; - EventNPCId = 0; TirionFordringGUID = 0; BarrentGUID = 0; @@ -470,7 +469,7 @@ class instance_trial_of_the_crusader : public InstanceMapScript } } - uint64 GetData64(uint32 type) + uint64 GetData64(uint32 type) const { switch (type) { @@ -521,7 +520,7 @@ class instance_trial_of_the_crusader : public InstanceMapScript return 0; } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { switch (type) { @@ -575,7 +574,7 @@ class instance_trial_of_the_crusader : public InstanceMapScript case 6000: case 6005: case 6010: - EventNPCId = NPC_TIRION; + return NPC_TIRION; break; case 5010: case 5030: @@ -584,7 +583,7 @@ class instance_trial_of_the_crusader : public InstanceMapScript case 5060: case 5070: case 5080: - EventNPCId = NPC_LICH_KING_1; + return NPC_LICH_KING_1; break; case 120: case 122: @@ -593,7 +592,7 @@ class instance_trial_of_the_crusader : public InstanceMapScript case 3051: case 3071: case 4020: - EventNPCId = NPC_VARIAN; + return NPC_VARIAN; break; case 130: case 132: @@ -602,7 +601,7 @@ class instance_trial_of_the_crusader : public InstanceMapScript case 3070: case 3081: case 4030: - EventNPCId = NPC_GARROSH; + return NPC_GARROSH; break; case 1110: case 1120: @@ -614,13 +613,12 @@ class instance_trial_of_the_crusader : public InstanceMapScript case 1142: case 1144: case 1150: - EventNPCId = NPC_FIZZLEBANG; + return NPC_FIZZLEBANG; break; default: - EventNPCId = NPC_TIRION; + return NPC_TIRION; break; }; - return EventNPCId; default: break; } @@ -737,7 +735,6 @@ class instance_trial_of_the_crusader : public InstanceMapScript uint32 TrialCounter; uint32 EventStage; uint32 EventTimer; - uint32 EventNPCId; uint32 NorthrendBeasts; bool NeedSave; std::string SaveDataBuffer; diff --git a/src/server/scripts/Northrend/DraktharonKeep/boss_dred.cpp b/src/server/scripts/Northrend/DraktharonKeep/boss_dred.cpp index 8b39fc51766..759f8df7153 100644 --- a/src/server/scripts/Northrend/DraktharonKeep/boss_dred.cpp +++ b/src/server/scripts/Northrend/DraktharonKeep/boss_dred.cpp @@ -154,7 +154,7 @@ class boss_dred : public CreatureScript ++raptorsKilled; } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { if (type == DATA_KING_DRED) return raptorsKilled; diff --git a/src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp b/src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp index 5d9acf4fca7..6ce56958d60 100644 --- a/src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp +++ b/src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp @@ -208,7 +208,7 @@ public: ohNovos = false; } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { if (type == DATA_OH_NOVOS) return ohNovos ? 1 : 0; diff --git a/src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp b/src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp index 31b7787623c..d8c720b6f95 100644 --- a/src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp +++ b/src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp @@ -168,7 +168,7 @@ public: instance->SetData(DATA_TROLLGORE_EVENT, DONE); } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { if (type == DATA_CONSUMPTION_JUNCTION) return consumptionJunction ? 1 : 0; diff --git a/src/server/scripts/Northrend/DraktharonKeep/instance_drak_tharon_keep.cpp b/src/server/scripts/Northrend/DraktharonKeep/instance_drak_tharon_keep.cpp index 99401c1d944..552798e96eb 100644 --- a/src/server/scripts/Northrend/DraktharonKeep/instance_drak_tharon_keep.cpp +++ b/src/server/scripts/Northrend/DraktharonKeep/instance_drak_tharon_keep.cpp @@ -129,7 +129,7 @@ public: } } - uint64 GetData64(uint32 identifier) + uint64 GetData64(uint32 identifier) const { switch (identifier) { @@ -174,7 +174,7 @@ public: } } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { switch (type) { 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 9bd0bfc8f6a..e0d3cc5dd4c 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 @@ -246,7 +246,7 @@ class boss_devourer_of_souls : public CreatureScript threeFaced = false; } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { if (type == DATA_THREE_FACED) return threeFaced; 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 135976dde18..3afc248ab9d 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 @@ -73,7 +73,7 @@ class instance_forge_of_souls : public InstanceMapScript } } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { switch (type) { @@ -86,7 +86,7 @@ class instance_forge_of_souls : public InstanceMapScript return 0; } - uint64 GetData64(uint32 type) + uint64 GetData64(uint32 type) const { switch (type) { 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 db2f2051f94..2e0c3364bbd 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 @@ -245,7 +245,7 @@ public: SaveToDB(); } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { switch (type) { @@ -259,7 +259,7 @@ public: return 0; } - uint64 GetData64(uint32 identifier) + uint64 GetData64(uint32 identifier) const { switch (identifier) { diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp index a12bd96f6df..cdc21eb25ec 100644 --- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp @@ -186,7 +186,7 @@ class boss_garfrost : public CreatureScript } } - uint32 GetData(uint32 /*type*/) + uint32 GetData(uint32 /*type*/) const { return _permafrostStack; } 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 dcca892358d..df0829b3376 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 @@ -224,7 +224,7 @@ class instance_pit_of_saron : public InstanceMapScript return true; } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { switch (type) { @@ -237,7 +237,7 @@ class instance_pit_of_saron : public InstanceMapScript return 0; } - uint64 GetData64(uint32 type) + uint64 GetData64(uint32 type) const { switch (type) { diff --git a/src/server/scripts/Northrend/Gundrak/boss_drakkari_colossus.cpp b/src/server/scripts/Northrend/Gundrak/boss_drakkari_colossus.cpp index fd1aba79e83..446c26c9567 100644 --- a/src/server/scripts/Northrend/Gundrak/boss_drakkari_colossus.cpp +++ b/src/server/scripts/Northrend/Gundrak/boss_drakkari_colossus.cpp @@ -190,7 +190,7 @@ class boss_drakkari_colossus : public CreatureScript } } - uint32 GetData(uint32 data) + uint32 GetData(uint32 data) const { if (data == DATA_COLOSSUS_PHASE) return phase; diff --git a/src/server/scripts/Northrend/Gundrak/boss_gal_darah.cpp b/src/server/scripts/Northrend/Gundrak/boss_gal_darah.cpp index 0d89c402054..595331d99d7 100644 --- a/src/server/scripts/Northrend/Gundrak/boss_gal_darah.cpp +++ b/src/server/scripts/Northrend/Gundrak/boss_gal_darah.cpp @@ -258,7 +258,7 @@ public: impaledList.push_back(guid); } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { if (type == DATA_SHARE_THE_LOVE) return shareTheLove; diff --git a/src/server/scripts/Northrend/Gundrak/boss_moorabi.cpp b/src/server/scripts/Northrend/Gundrak/boss_moorabi.cpp index c1301dbd2d0..45c55f7ec9b 100644 --- a/src/server/scripts/Northrend/Gundrak/boss_moorabi.cpp +++ b/src/server/scripts/Northrend/Gundrak/boss_moorabi.cpp @@ -144,7 +144,7 @@ public: DoMeleeAttackIfReady(); } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { if (type == DATA_LESS_RABI) return bPhase ? 0 : 1; diff --git a/src/server/scripts/Northrend/Gundrak/instance_gundrak.cpp b/src/server/scripts/Northrend/Gundrak/instance_gundrak.cpp index ae3447b9c68..2a89a73dbb2 100644 --- a/src/server/scripts/Northrend/Gundrak/instance_gundrak.cpp +++ b/src/server/scripts/Northrend/Gundrak/instance_gundrak.cpp @@ -318,7 +318,7 @@ public: } } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { switch (type) { @@ -339,7 +339,7 @@ public: return 0; } - uint64 GetData64(uint32 type) + uint64 GetData64(uint32 type) const { switch (type) { diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp index 70795b38b2a..9ee4bcea4d9 100755 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp @@ -497,7 +497,7 @@ class boss_deathbringer_saurfang : public CreatureScript DoMeleeAttackIfReady(); } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { if (type == DATA_MADE_A_MESS) if (_fallenChampionCastCount < RAID_MODE(3, 5, 3, 5)) diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp index 58856f9fb44..9c0f2139b1b 100755 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp @@ -244,7 +244,7 @@ class boss_festergut : public CreatureScript _maxInoculatedStack = data; } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { if (type == DATA_INOCULATED_STACK) return uint32(_maxInoculatedStack); diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp index 31d57e2ca4e..263d70c6a50 100755 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp @@ -247,7 +247,7 @@ class boss_lord_marrowgar : public CreatureScript return &_coldflameLastPos; } - uint64 GetGUID(int32 type/* = 0 */) + uint64 GetGUID(int32 type/* = 0 */) const { if (type == DATA_COLDFLAME_GUID) return _coldflameTarget; diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp index 64f49c6e0e7..a950a74e59c 100755 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp @@ -536,21 +536,15 @@ class boss_professor_putricide : public CreatureScript } } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { switch (type) { case DATA_EXPERIMENT_STAGE: - { - // ALSO MODIFIES! - uint32 ret = uint32(_experimentState); - _experimentState ^= true; - return ret; - } + return _experimentState; case DATA_PHASE: return _phase; case DATA_ABOMINATION: - summons.RemoveNotExisting(); return uint32(summons.HasEntry(NPC_MUTATED_ABOMINATION_10) || summons.HasEntry(NPC_MUTATED_ABOMINATION_25)); default: break; @@ -1010,7 +1004,11 @@ class spell_putricide_unstable_experiment : public SpellScriptLoader if (GetCaster()->GetTypeId() != TYPEID_UNIT) return; - uint32 stage = GetCaster()->ToCreature()->AI()->GetData(DATA_EXPERIMENT_STAGE); + Creature* creature = GetCaster()->ToCreature(); + + uint32 stage = creature->AI()->GetData(DATA_EXPERIMENT_STAGE); + creature->AI()->SetData(DATA_EXPERIMENT_STAGE, !stage); + Creature* target = NULL; std::list creList; GetCreatureListWithEntryInGrid(creList, GetCaster(), NPC_ABOMINATION_WING_MAD_SCIENTIST_STALKER, 200.0f); diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp index e3c0f2260df..a12a38b2f62 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp @@ -290,7 +290,7 @@ class boss_sindragosa : public CreatureScript } } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { if (type == DATA_MYSTIC_BUFFET_STACK) return _mysticBuffetStack; @@ -978,7 +978,7 @@ class npc_sindragosa_trash : public CreatureScript _isTaunted = data != 0; } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { if (type == DATA_FROSTWYRM_OWNER) return _frostwyrmId; diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp index ba1a0614cdf..ec5172aeb83 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp @@ -636,7 +636,7 @@ class boss_the_lich_king : public CreatureScript } } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { switch (type) { diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_valithria_dreamwalker.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_valithria_dreamwalker.cpp index 826c62a4390..cc40a076300 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_valithria_dreamwalker.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_valithria_dreamwalker.cpp @@ -460,7 +460,7 @@ class boss_valithria_dreamwalker : public CreatureScript } } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { if (type == MISSED_PORTALS) return _missedPortals; @@ -1019,7 +1019,7 @@ class npc_dream_portal : public CreatureScript me->DespawnOrUnsummon(); } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { return (type == MISSED_PORTALS && _used) ? 0 : 1; } diff --git a/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp index dd0068f6327..3be76715f6c 100755 --- a/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp @@ -590,7 +590,7 @@ class instance_icecrown_citadel : public InstanceMapScript } } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { switch (type) { @@ -615,7 +615,7 @@ class instance_icecrown_citadel : public InstanceMapScript return 0; } - uint64 GetData64(uint32 type) + uint64 GetData64(uint32 type) const { switch (type) { diff --git a/src/server/scripts/Northrend/Naxxramas/boss_faerlina.cpp b/src/server/scripts/Northrend/Naxxramas/boss_faerlina.cpp index 636f2318712..3c6e4b50d24 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_faerlina.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_faerlina.cpp @@ -117,7 +117,7 @@ class boss_faerlina : public CreatureScript } } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { if (type == DATA_FRENZY_DISPELS) return _frenzyDispels; diff --git a/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp b/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp index 95839ef134f..e7126ba7e33 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp @@ -81,7 +81,7 @@ public: safetyDance = data ? true : false; } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { if (type == DATA_SAFETY_DANCE) return safetyDance ? 1 : 0; diff --git a/src/server/scripts/Northrend/Naxxramas/boss_loatheb.cpp b/src/server/scripts/Northrend/Naxxramas/boss_loatheb.cpp index 71623cb1959..183d56a48c0 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_loatheb.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_loatheb.cpp @@ -85,7 +85,7 @@ class boss_loatheb : public CreatureScript _sporeLoserData = false; } - uint32 GetData(uint32 id) + uint32 GetData(uint32 id) const { if (id != DATA_ACHIEVEMENT_SPORE_LOSER) return 0; diff --git a/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp b/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp index 75b851a2b22..482f8a1200d 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp @@ -215,7 +215,7 @@ public: polaritySwitch = data ? true : false; } - uint32 GetData(uint32 id) + uint32 GetData(uint32 id) const { if (id != DATA_POLARITY_SWITCH) return 0; diff --git a/src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp b/src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp index e806b60c848..b68d8d4a33c 100644 --- a/src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp +++ b/src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp @@ -316,7 +316,7 @@ public: } } - uint32 GetData(uint32 id) + uint32 GetData(uint32 id) const { switch (id) { @@ -329,7 +329,7 @@ public: return 0; } - uint64 GetData64(uint32 id) + uint64 GetData64(uint32 id) const { switch (id) { diff --git a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp index ab9ed76cb1f..5e7104fd83a 100644 --- a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp +++ b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp @@ -251,7 +251,7 @@ public: instance->DoStopTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT); } - uint32 GetData(uint32 data) + uint32 GetData(uint32 data) const { if (data == DATA_SUMMON_DEATHS) return _summonDeaths; 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 6e85e701a27..4ca28943be3 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 @@ -226,7 +226,7 @@ public: } } - uint64 GetData64(uint32 data) + uint64 GetData64(uint32 data) const { switch (data) { diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp index af0ca6b3a3f..80a5336a30c 100644 --- a/src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp +++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp @@ -110,7 +110,7 @@ class boss_anomalus : public CreatureScript instance->SetData(DATA_ANOMALUS_EVENT, DONE); } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { if (type == DATA_CHAOS_THEORY) return chaosTheory ? 1 : 0; diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp index 9602d1bc876..317a9845e87 100644 --- a/src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp +++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp @@ -155,7 +155,7 @@ public: } } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { if (type == DATA_SPLIT_PERSONALITY) return splitPersonality; diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp index b17494800f1..11b1bce9ab7 100644 --- a/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp +++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp @@ -214,7 +214,7 @@ public: _despawntimer = 2000; } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { return type == DATA_COUNT ? _count : 0; } diff --git a/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp b/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp index c571def96d7..f06800cd201 100644 --- a/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp +++ b/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp @@ -154,7 +154,7 @@ public: } } - uint32 GetData(uint32 identifier) + uint32 GetData(uint32 identifier) const { switch (identifier) { @@ -221,7 +221,7 @@ public: } } - uint64 GetData64(uint32 uiIdentifier) + uint64 GetData64(uint32 uiIdentifier) const { switch (uiIdentifier) { diff --git a/src/server/scripts/Northrend/Nexus/Oculus/boss_eregos.cpp b/src/server/scripts/Northrend/Nexus/Oculus/boss_eregos.cpp index c691db4230c..4bbb4c1a5ed 100644 --- a/src/server/scripts/Northrend/Nexus/Oculus/boss_eregos.cpp +++ b/src/server/scripts/Northrend/Nexus/Oculus/boss_eregos.cpp @@ -117,7 +117,7 @@ public: _amberVoid = false; } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { switch (type) { diff --git a/src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp b/src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp index 0543a317ffa..7035e0534aa 100644 --- a/src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp +++ b/src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp @@ -232,7 +232,7 @@ public: } } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { switch (type) { @@ -244,7 +244,7 @@ public: return 0; } - uint64 GetData64(uint32 identifier) + uint64 GetData64(uint32 identifier) const { switch (identifier) { diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/instance_halls_of_lightning.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/instance_halls_of_lightning.cpp index 93b246e9ddc..e399c5548e3 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/instance_halls_of_lightning.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/instance_halls_of_lightning.cpp @@ -174,7 +174,7 @@ public: SaveToDB(); } - uint32 GetData(uint32 uiType) + uint32 GetData(uint32 uiType) const { switch (uiType) { @@ -190,7 +190,7 @@ public: return 0; } - uint64 GetData64(uint32 uiData) + uint64 GetData64(uint32 uiData) const { switch (uiData) { diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_sjonnir.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_sjonnir.cpp index 28052a57576..c3e815f57dd 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_sjonnir.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_sjonnir.cpp @@ -236,7 +236,7 @@ public: ++abuseTheOoze; } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { if (type == DATA_ABUSE_THE_OOZE) return abuseTheOoze; 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 3f5f2deb631..3c03508a14c 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.cpp @@ -430,7 +430,7 @@ public: brannSparklinNews = false; } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { if (type == DATA_BRANN_SPARKLIN_NEWS) return brannSparklinNews ? 1 : 0; diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfStone/instance_halls_of_stone.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfStone/instance_halls_of_stone.cpp index 869cf46e74d..7a2b579dca9 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfStone/instance_halls_of_stone.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfStone/instance_halls_of_stone.cpp @@ -186,7 +186,7 @@ public: SaveToDB(); } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { switch (type) { @@ -199,7 +199,7 @@ public: return 0; } - uint64 GetData64(uint32 identifier) + uint64 GetData64(uint32 identifier) const { switch (identifier) { 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 afd31331b7d..e52f1efcd73 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 @@ -378,7 +378,7 @@ class boss_algalon_the_observer : public CreatureScript } } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { return type == DATA_HAS_FED_ON_TEARS ? _fedOnTears : 1; } @@ -728,7 +728,7 @@ class npc_living_constellation : public CreatureScript _isActive = false; } - uint32 GetData(uint32 /*type*/) + uint32 GetData(uint32 /*type*/) const { return _isActive ? 1 : 0; } diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_auriaya.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_auriaya.cpp index ec3125f7c0a..bfe158051b1 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_auriaya.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_auriaya.cpp @@ -178,7 +178,7 @@ class boss_auriaya : public CreatureScript } } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { switch (type) { diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp index 9d5adf39817..a26f5763472 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp @@ -349,7 +349,7 @@ class boss_flame_leviathan : public CreatureScript ++Shutdown; } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { switch (type) { diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp index a3c9cb847e5..f60922c426c 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp @@ -381,7 +381,7 @@ class boss_freya : public CreatureScript events.ScheduleEvent(EVENT_SUNBEAM, urand(5000, 15000)); } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { switch (type) { 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 845e694e842..1232c1b9051 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp @@ -235,7 +235,7 @@ class boss_general_vezax : public CreatureScript } } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { switch (type) { diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp index 540876f421b..c0fb4e3ecc8 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp @@ -154,7 +154,7 @@ class boss_ignis : public CreatureScript DoScriptText(SAY_DEATH, me); } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { if (type == DATA_SHATTERED) return _shattered ? 1 : 0; diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp index 2830e3ada04..5ea2678adfe 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp @@ -378,7 +378,7 @@ class boss_razorscale : public CreatureScript } } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { if (type == DATA_QUICK_SHAVE) if (FlyCount <= 2) @@ -896,7 +896,7 @@ class npc_darkrune_guardian : public CreatureScript killedByBreath = false; } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { return type == DATA_IRON_DWARF_MEDIUM_RARE ? killedByBreath : 0; } diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp index afb60e60bf2..76aaf61f94d 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp @@ -327,7 +327,7 @@ class boss_xt002 : public CreatureScript } } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { switch (type) { diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp index cc8ff9996f3..f1bfddcbd87 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp @@ -655,7 +655,7 @@ class instance_ulduar : public InstanceMapScript { } - uint64 GetData64(uint32 data) + uint64 GetData64(uint32 data) const { switch (data) { @@ -741,7 +741,7 @@ class instance_ulduar : public InstanceMapScript return 0; } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { switch (type) { diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_keleseth.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_keleseth.cpp index e718942d091..9a50e1cbfa3 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_keleseth.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_keleseth.cpp @@ -185,7 +185,7 @@ public: onTheRocks = value; } - uint32 GetData(uint32 data) + uint32 GetData(uint32 data) const { if (data == DATA_ON_THE_ROCKS) return onTheRocks; 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 919b0da5fc0..c236b36312d 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/instance_utgarde_keep.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/instance_utgarde_keep.cpp @@ -166,7 +166,7 @@ public: } } - uint64 GetData64(uint32 identifier) + uint64 GetData64(uint32 identifier) const { switch (identifier) { @@ -247,7 +247,7 @@ public: } } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { switch (type) { diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp index f2f03ff602b..fc82ad1b526 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp @@ -588,7 +588,7 @@ class npc_scourge_hulk : public CreatureScript killedByRitualStrike = false; } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { return type == DATA_INCREDIBLE_HULK ? killedByRitualStrike : 0; } diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp index 39fd01a9269..3d0df453c0c 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp @@ -201,7 +201,7 @@ public: kingsBane = false; } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { if (type == DATA_KINGS_BANE) return kingsBane ? 1 : 0; diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/instance_pinnacle.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/instance_pinnacle.cpp index c5d50d4e7fd..a76c5a61109 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/instance_pinnacle.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/instance_pinnacle.cpp @@ -180,7 +180,7 @@ public: } } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { switch (type) { @@ -192,7 +192,7 @@ public: return 0; } - uint64 GetData64(uint32 identifier) + uint64 GetData64(uint32 identifier) const { switch (identifier) { diff --git a/src/server/scripts/Northrend/VaultOfArchavon/instance_vault_of_archavon.cpp b/src/server/scripts/Northrend/VaultOfArchavon/instance_vault_of_archavon.cpp index d1209b40a19..de557e10e7f 100644 --- a/src/server/scripts/Northrend/VaultOfArchavon/instance_vault_of_archavon.cpp +++ b/src/server/scripts/Northrend/VaultOfArchavon/instance_vault_of_archavon.cpp @@ -62,7 +62,7 @@ class instance_archavon : public InstanceMapScript } } - uint64 GetData64(uint32 identifier) + uint64 GetData64(uint32 identifier) const { switch (identifier) { diff --git a/src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp b/src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp index f6d918e0493..cea00417233 100644 --- a/src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp +++ b/src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp @@ -197,7 +197,7 @@ public: me->GetMotionMaster()->MoveChase(me->getVictim()); } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { if (type == DATA_DEHYDRATION) return dehydration ? 1 : 0; diff --git a/src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp b/src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp index d1c65259738..408a7083383 100644 --- a/src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp +++ b/src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp @@ -158,7 +158,7 @@ public: voidDance = false; } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { if (type == DATA_VOID_DANCE) return voidDance ? 1 : 0; diff --git a/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp b/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp index ed039728bb4..9f74cf0e5ca 100644 --- a/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp +++ b/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp @@ -418,7 +418,7 @@ public: } } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { switch (type) { @@ -439,7 +439,7 @@ public: return 0; } - uint64 GetData64(uint32 identifier) + uint64 GetData64(uint32 identifier) const { switch (identifier) { diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/instance_shadow_labyrinth.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/instance_shadow_labyrinth.cpp index 9facb42107b..9fa90be9765 100644 --- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/instance_shadow_labyrinth.cpp +++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/instance_shadow_labyrinth.cpp @@ -179,7 +179,7 @@ public: } } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { switch (type) { @@ -191,7 +191,7 @@ public: return false; } - uint64 GetData64(uint32 identifier) + uint64 GetData64(uint32 identifier) const { if (identifier == DATA_GRANDMASTERVORPIL) return m_uiGrandmasterVorpil; diff --git a/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp b/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp index a1e45fa4d15..8a2e25b176a 100644 --- a/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp +++ b/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp @@ -238,7 +238,7 @@ public: } } - uint64 GetData64(uint32 identifier) + uint64 GetData64(uint32 identifier) const { switch (identifier) { @@ -348,7 +348,7 @@ public: } } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { switch (type) { 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 0c6917b320f..1221e59b96e 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 @@ -104,7 +104,7 @@ public: victimGUID = guid; } - uint64 GetGUID(int32 id/* = 0 */) + uint64 GetGUID(int32 id/* = 0 */) const { if (id == INNER_DEMON_VICTIM) return victimGUID; 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 e1cd3e69887..f280ad77b42 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp @@ -243,7 +243,7 @@ class instance_serpent_shrine : public InstanceMapScript LeotherasEventStarter = data; } - uint64 GetData64(uint32 identifier) + uint64 GetData64(uint32 identifier) const { switch (identifier) { @@ -341,7 +341,7 @@ class instance_serpent_shrine : public InstanceMapScript SaveToDB(); } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { switch (type) { diff --git a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/instance_steam_vault.cpp b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/instance_steam_vault.cpp index dd0b5ea9160..e8a096a83a1 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/instance_steam_vault.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/instance_steam_vault.cpp @@ -167,7 +167,7 @@ public: SaveToDB(); } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { switch (type) { @@ -183,7 +183,7 @@ public: return 0; } - uint64 GetData64(uint32 data) + uint64 GetData64(uint32 data) const { switch (data) { diff --git a/src/server/scripts/Outland/GruulsLair/instance_gruuls_lair.cpp b/src/server/scripts/Outland/GruulsLair/instance_gruuls_lair.cpp index fa67659ca66..120e550bd4e 100644 --- a/src/server/scripts/Outland/GruulsLair/instance_gruuls_lair.cpp +++ b/src/server/scripts/Outland/GruulsLair/instance_gruuls_lair.cpp @@ -117,7 +117,7 @@ public: MaulgarEvent_Tank = data; } - uint64 GetData64(uint32 identifier) + uint64 GetData64(uint32 identifier) const { switch (identifier) { @@ -156,7 +156,7 @@ public: SaveToDB(); } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { switch (type) { diff --git a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/instance_blood_furnace.cpp b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/instance_blood_furnace.cpp index 233a8d82497..11e75f054ad 100644 --- a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/instance_blood_furnace.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/instance_blood_furnace.cpp @@ -175,7 +175,7 @@ class instance_blood_furnace : public InstanceMapScript BroggokLeverGUID = go->GetGUID(); //Broggok lever } - uint64 GetData64(uint32 data) + uint64 GetData64(uint32 data) const { switch (data) { @@ -231,7 +231,7 @@ class instance_blood_furnace : public InstanceMapScript } } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { switch (type) { diff --git a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/instance_magtheridons_lair.cpp b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/instance_magtheridons_lair.cpp index 640e4439593..0bb949d3b90 100644 --- a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/instance_magtheridons_lair.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/instance_magtheridons_lair.cpp @@ -123,7 +123,7 @@ class instance_magtheridons_lair : public InstanceMapScript } } - uint64 GetData64(uint32 type) + uint64 GetData64(uint32 type) const { switch (type) { @@ -211,7 +211,7 @@ class instance_magtheridons_lair : public InstanceMapScript } } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { if (type == DATA_MAGTHERIDON_EVENT) return m_auiEncounter[0]; diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/instance_shattered_halls.cpp b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/instance_shattered_halls.cpp index 4105a7d5821..c7c1cbba880 100644 --- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/instance_shattered_halls.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/instance_shattered_halls.cpp @@ -87,7 +87,7 @@ class instance_shattered_halls : public InstanceMapScript } } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { switch (type) { @@ -99,7 +99,7 @@ class instance_shattered_halls : public InstanceMapScript return 0; } - uint64 GetData64(uint32 data) + uint64 GetData64(uint32 data) const { switch (data) { diff --git a/src/server/scripts/Outland/TempestKeep/Eye/instance_the_eye.cpp b/src/server/scripts/Outland/TempestKeep/Eye/instance_the_eye.cpp index 1230b7e88cf..e9ee5a62bb8 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/instance_the_eye.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/instance_the_eye.cpp @@ -113,7 +113,7 @@ class instance_the_eye : public InstanceMapScript } } - uint64 GetData64(uint32 identifier) + uint64 GetData64(uint32 identifier) const { switch (identifier) { @@ -151,7 +151,7 @@ class instance_the_eye : public InstanceMapScript SaveToDB(); } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { switch (type) { diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/instance_mechanar.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/instance_mechanar.cpp index a96666705d1..37e314b6576 100644 --- a/src/server/scripts/Outland/TempestKeep/Mechanar/instance_mechanar.cpp +++ b/src/server/scripts/Outland/TempestKeep/Mechanar/instance_mechanar.cpp @@ -57,7 +57,7 @@ class instance_mechanar : public InstanceMapScript return false; } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { switch (type) { @@ -67,7 +67,7 @@ class instance_mechanar : public InstanceMapScript return false; } - uint64 GetData64(uint32 /*identifier*/) + uint64 GetData64(uint32 /*identifier*/) const { return 0; } diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/instance_arcatraz.cpp b/src/server/scripts/Outland/TempestKeep/arcatraz/instance_arcatraz.cpp index d5b61b87fc2..e956ea0ed85 100644 --- a/src/server/scripts/Outland/TempestKeep/arcatraz/instance_arcatraz.cpp +++ b/src/server/scripts/Outland/TempestKeep/arcatraz/instance_arcatraz.cpp @@ -230,7 +230,7 @@ class instance_arcatraz : public InstanceMapScript } } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { switch (type) { @@ -244,7 +244,7 @@ class instance_arcatraz : public InstanceMapScript return 0; } - uint64 GetData64(uint32 data) + uint64 GetData64(uint32 data) const { switch (data) { diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp index 4f0687ef11d..1d7154376a7 100644 --- a/src/server/scripts/World/npcs_special.cpp +++ b/src/server/scripts/World/npcs_special.cpp @@ -2284,7 +2284,7 @@ class npc_wormhole : public CreatureScript _showUnderground = urand(0, 100) == 0; // Guessed value, it is really rare though } - uint32 GetData(uint32 type) + uint32 GetData(uint32 type) const { return (type == DATA_SHOW_UNDERGROUND && _showUnderground) ? 1 : 0; } -- cgit v1.2.3 From b5c9ab88023c49ab0e3ab2365c789cd27a6629f1 Mon Sep 17 00:00:00 2001 From: Spp Date: Tue, 20 Nov 2012 12:30:30 +0100 Subject: Core/Misc: Reduction of header dependencies - Step II --- src/server/game/AI/SmartScripts/SmartAI.h | 1 - src/server/game/AI/SmartScripts/SmartScript.cpp | 22 +- src/server/game/AI/SmartScripts/SmartScript.h | 1 - src/server/game/Achievements/AchievementMgr.cpp | 34 +-- .../game/Battlefield/Zones/BattlefieldWG.cpp | 5 +- src/server/game/Battlegrounds/Battleground.cpp | 14 +- .../game/Battlegrounds/BattlegroundQueue.cpp | 9 +- .../game/Battlegrounds/Zones/BattlegroundDS.cpp | 5 +- src/server/game/Conditions/ConditionMgr.cpp | 13 +- src/server/game/Conditions/ConditionMgr.h | 5 +- src/server/game/DungeonFinding/LFGMgr.cpp | 1 + src/server/game/Entities/Creature/Creature.cpp | 54 ++--- src/server/game/Entities/Object/Object.cpp | 113 ---------- src/server/game/Entities/Pet/Pet.h | 67 +----- src/server/game/Entities/Pet/PetDefines.h | 80 +++++++ src/server/game/Entities/Player/Player.cpp | 250 +++++++++++++++------ src/server/game/Entities/Player/Player.h | 26 ++- src/server/game/Entities/Unit/Unit.cpp | 65 +++--- src/server/game/Globals/ObjectAccessor.cpp | 26 +-- src/server/game/Globals/ObjectMgr.cpp | 44 ++-- src/server/game/Guilds/Guild.cpp | 11 +- src/server/game/Handlers/AuctionHouseHandler.cpp | 1 + src/server/game/Handlers/CharacterHandler.cpp | 36 +-- src/server/game/Handlers/GroupHandler.cpp | 15 +- src/server/game/Handlers/LootHandler.cpp | 2 +- src/server/game/Handlers/NPCHandler.cpp | 1 + src/server/game/Handlers/SkillHandler.cpp | 7 +- src/server/game/Instances/InstanceScript.cpp | 13 +- src/server/game/Maps/Map.cpp | 21 +- src/server/game/Scripting/MapScripts.cpp | 13 +- src/server/game/Scripting/ScriptMgr.cpp | 4 +- src/server/game/Scripting/ScriptMgr.h | 2 +- src/server/game/Spells/Auras/SpellAuraEffects.cpp | 2 + src/server/game/Spells/SpellEffects.cpp | 1 + src/server/game/Tickets/TicketMgr.cpp | 1 + src/server/scripts/Commands/cs_account.cpp | 3 +- src/server/scripts/Commands/cs_achievement.cpp | 3 +- src/server/scripts/Commands/cs_ban.cpp | 5 +- src/server/scripts/Commands/cs_cast.cpp | 2 + src/server/scripts/Commands/cs_character.cpp | 5 +- src/server/scripts/Commands/cs_cheat.cpp | 5 +- src/server/scripts/Commands/cs_debug.cpp | 1 + src/server/scripts/Commands/cs_disable.cpp | 7 +- src/server/scripts/Commands/cs_event.cpp | 5 +- src/server/scripts/Commands/cs_gm.cpp | 1 + src/server/scripts/Commands/cs_go.cpp | 1 + src/server/scripts/Commands/cs_gobject.cpp | 1 + src/server/scripts/Commands/cs_guild.cpp | 3 +- src/server/scripts/Commands/cs_honor.cpp | 5 +- src/server/scripts/Commands/cs_learn.cpp | 2 + src/server/scripts/Commands/cs_lfg.cpp | 1 + src/server/scripts/Commands/cs_list.cpp | 1 + src/server/scripts/Commands/cs_lookup.cpp | 5 +- src/server/scripts/Commands/cs_message.cpp | 1 + src/server/scripts/Commands/cs_misc.cpp | 2 + src/server/scripts/Commands/cs_modify.cpp | 6 +- src/server/scripts/Commands/cs_npc.cpp | 2 + src/server/scripts/Commands/cs_quest.cpp | 5 +- src/server/scripts/Commands/cs_reload.cpp | 22 +- src/server/scripts/Commands/cs_reset.cpp | 5 +- src/server/scripts/Commands/cs_server.cpp | 5 +- src/server/scripts/Commands/cs_tele.cpp | 7 +- src/server/scripts/Commands/cs_ticket.cpp | 7 +- src/server/scripts/Commands/cs_titles.cpp | 5 +- src/server/scripts/Commands/cs_wp.cpp | 7 +- src/server/scripts/Spells/spell_generic.cpp | 12 +- src/server/scripts/Spells/spell_hunter.cpp | 2 +- .../shared/Dynamic/LinkedReference/Reference.h | 1 + 68 files changed, 602 insertions(+), 508 deletions(-) create mode 100644 src/server/game/Entities/Pet/PetDefines.h (limited to 'src/server/game/Maps') diff --git a/src/server/game/AI/SmartScripts/SmartAI.h b/src/server/game/AI/SmartScripts/SmartAI.h index ca6450aa746..6f748f9dee2 100644 --- a/src/server/game/AI/SmartScripts/SmartAI.h +++ b/src/server/game/AI/SmartScripts/SmartAI.h @@ -22,7 +22,6 @@ #include "Creature.h" #include "CreatureAI.h" #include "Unit.h" -#include "ConditionMgr.h" #include "Spell.h" #include "SmartScript.h" diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp index b8c0f952df9..a22978632fe 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -15,25 +15,25 @@ * with this program. If not, see . */ +#include "Cell.h" +#include "CellImpl.h" +#include "CreatureTextMgr.h" #include "DatabaseEnv.h" -#include "ObjectMgr.h" -#include "ObjectDefines.h" +#include "GossipDef.h" #include "GridDefines.h" #include "GridNotifiers.h" -#include "SpellMgr.h" #include "GridNotifiersImpl.h" -#include "Cell.h" -#include "CellImpl.h" +#include "Group.h" #include "InstanceScript.h" +#include "Language.h" +#include "ObjectDefines.h" +#include "ObjectMgr.h" #include "ScriptedCreature.h" -#include "GossipDef.h" -#include "ScriptedCreature.h" -#include "SmartScript.h" +#include "ScriptedGossip.h" #include "SmartAI.h" -#include "Group.h" +#include "SmartScript.h" +#include "SpellMgr.h" #include "Vehicle.h" -#include "ScriptedGossip.h" -#include "CreatureTextMgr.h" class TrinityStringTextBuilder { diff --git a/src/server/game/AI/SmartScripts/SmartScript.h b/src/server/game/AI/SmartScripts/SmartScript.h index 2a0eceb574a..61e22b25d17 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.h +++ b/src/server/game/AI/SmartScripts/SmartScript.h @@ -22,7 +22,6 @@ #include "Creature.h" #include "CreatureAI.h" #include "Unit.h" -#include "ConditionMgr.h" #include "Spell.h" #include "GridNotifiers.h" diff --git a/src/server/game/Achievements/AchievementMgr.cpp b/src/server/game/Achievements/AchievementMgr.cpp index 0504effa651..2c20db8e5d4 100755 --- a/src/server/game/Achievements/AchievementMgr.cpp +++ b/src/server/game/Achievements/AchievementMgr.cpp @@ -16,30 +16,32 @@ * with this program. If not, see . */ -#include "Common.h" -#include "DBCEnums.h" -#include "ObjectMgr.h" -#include "ArenaTeamMgr.h" -#include "GuildMgr.h" -#include "World.h" -#include "WorldPacket.h" -#include "DatabaseEnv.h" #include "AchievementMgr.h" #include "ArenaTeam.h" +#include "ArenaTeamMgr.h" +#include "BattlegroundAB.h" +#include "Battleground.h" #include "CellImpl.h" +#include "Common.h" +#include "DatabaseEnv.h" +#include "DBCEnums.h" +#include "DisableMgr.h" #include "GameEventMgr.h" #include "GridNotifiersImpl.h" #include "Guild.h" +#include "GuildMgr.h" +#include "InstanceScript.h" #include "Language.h" +#include "Map.h" +#include "MapManager.h" +#include "ObjectMgr.h" #include "Player.h" -#include "SpellMgr.h" -#include "DisableMgr.h" +#include "ReputationMgr.h" #include "ScriptMgr.h" -#include "MapManager.h" -#include "Battleground.h" -#include "BattlegroundAB.h" -#include "Map.h" -#include "InstanceScript.h" +#include "SpellMgr.h" +#include "World.h" +#include "WorldPacket.h" + namespace Trinity { @@ -355,7 +357,7 @@ bool AchievementCriteriaData::Meets(uint32 criteria_id, Player const* source, Un return false; return target->getGender() == gender.gender; case ACHIEVEMENT_CRITERIA_DATA_TYPE_SCRIPT: - return sScriptMgr->OnCriteriaCheck(this, const_cast(source), const_cast(target)); + return sScriptMgr->OnCriteriaCheck(ScriptId, const_cast(source), const_cast(target)); case ACHIEVEMENT_CRITERIA_DATA_TYPE_MAP_DIFFICULTY: if (source->GetMap()->IsRaid()) if (source->GetMap()->Is25ManRaid() != ((difficulty.difficulty & RAID_DIFFICULTY_MASK_25MAN) != 0)) diff --git a/src/server/game/Battlefield/Zones/BattlefieldWG.cpp b/src/server/game/Battlefield/Zones/BattlefieldWG.cpp index 9d48bc6115f..812dd5a1c2a 100644 --- a/src/server/game/Battlefield/Zones/BattlefieldWG.cpp +++ b/src/server/game/Battlefield/Zones/BattlefieldWG.cpp @@ -20,11 +20,12 @@ // TODO: Use spell victory/defeat in wg instead of RewardMarkOfHonor() && RewardHonor // TODO: Add proper implement of achievement -#include "ObjectMgr.h" #include "BattlefieldWG.h" +#include "ObjectMgr.h" +#include "Player.h" #include "SpellAuras.h" +#include "TemporarySummon.h" #include "Vehicle.h" -#include "Player.h" enum WGVehicles { diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp index 54422a8c5d3..40a74a49b69 100755 --- a/src/server/game/Battlegrounds/Battleground.cpp +++ b/src/server/game/Battlegrounds/Battleground.cpp @@ -16,24 +16,24 @@ * with this program. If not, see . */ -#include "Player.h" -#include "ObjectMgr.h" -#include "ArenaTeamMgr.h" -#include "World.h" -#include "WorldPacket.h" #include "ArenaTeam.h" +#include "ArenaTeamMgr.h" #include "Battleground.h" #include "BattlegroundMgr.h" #include "Creature.h" #include "Formulas.h" #include "GridNotifiersImpl.h" #include "Group.h" -#include "Language.h" #include "MapManager.h" #include "Object.h" -#include "SpellAuras.h" +#include "ObjectMgr.h" +#include "Player.h" +#include "ReputationMgr.h" #include "SpellAuraEffects.h" +#include "SpellAuras.h" #include "Util.h" +#include "World.h" +#include "WorldPacket.h" namespace Trinity { diff --git a/src/server/game/Battlegrounds/BattlegroundQueue.cpp b/src/server/game/Battlegrounds/BattlegroundQueue.cpp index cc53de7e39a..c610cafa1b1 100755 --- a/src/server/game/Battlegrounds/BattlegroundQueue.cpp +++ b/src/server/game/Battlegrounds/BattlegroundQueue.cpp @@ -16,14 +16,15 @@ * with this program. If not, see . */ -#include "BattlegroundQueue.h" #include "ArenaTeam.h" +#include "ArenaTeamMgr.h" #include "BattlegroundMgr.h" +#include "BattlegroundQueue.h" #include "Chat.h" -#include "ObjectMgr.h" -#include "ArenaTeamMgr.h" -#include "Log.h" #include "Group.h" +#include "Log.h" +#include "Language.h" +#include "ObjectMgr.h" #include "Player.h" /*********************************************************/ diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundDS.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundDS.cpp index a64184261c7..02c5167c9ec 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundDS.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundDS.cpp @@ -17,11 +17,12 @@ */ #include "BattlegroundDS.h" -#include "ObjectAccessor.h" +#include "Creature.h" +#include "GameObject.h" #include "Language.h" +#include "ObjectAccessor.h" #include "Player.h" #include "WorldPacket.h" -#include "GameObject.h" BattlegroundDS::BattlegroundDS() { diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp index 72f00406c69..2f3cb0fbaaf 100755 --- a/src/server/game/Conditions/ConditionMgr.cpp +++ b/src/server/game/Conditions/ConditionMgr.cpp @@ -16,15 +16,16 @@ * with this program. If not, see . */ -#include "Player.h" -#include "SpellAuras.h" -#include "SpellMgr.h" +#include "ConditionMgr.h" #include "GameEventMgr.h" -#include "ObjectMgr.h" #include "InstanceScript.h" -#include "ConditionMgr.h" -#include "ScriptMgr.h" +#include "ObjectMgr.h" +#include "Player.h" +#include "ReputationMgr.h" #include "ScriptedCreature.h" +#include "ScriptMgr.h" +#include "SpellAuras.h" +#include "SpellMgr.h" #include "Spell.h" // Checks if object meets the condition diff --git a/src/server/game/Conditions/ConditionMgr.h b/src/server/game/Conditions/ConditionMgr.h index 57af0562dcd..7b0dc1f20bf 100755 --- a/src/server/game/Conditions/ConditionMgr.h +++ b/src/server/game/Conditions/ConditionMgr.h @@ -19,8 +19,11 @@ #ifndef TRINITY_CONDITIONMGR_H #define TRINITY_CONDITIONMGR_H -#include "LootMgr.h" +#include "Define.h" +#include "Errors.h" #include +#include +#include class Player; class Unit; diff --git a/src/server/game/DungeonFinding/LFGMgr.cpp b/src/server/game/DungeonFinding/LFGMgr.cpp index c91be00080e..7cb9efa2f2f 100755 --- a/src/server/game/DungeonFinding/LFGMgr.cpp +++ b/src/server/game/DungeonFinding/LFGMgr.cpp @@ -21,6 +21,7 @@ #include "DisableMgr.h" #include "ObjectMgr.h" #include "SocialMgr.h" +#include "Language.h" #include "LFGMgr.h" #include "LFGScripts.h" #include "LFGGroupData.h" diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index 9bcd4d9c1e2..2300876048b 100755 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -16,40 +16,42 @@ * with this program. If not, see . */ +#include "BattlegroundMgr.h" +#include "CellImpl.h" #include "Common.h" -#include "DatabaseEnv.h" -#include "WorldPacket.h" -#include "World.h" -#include "ObjectMgr.h" -#include "GroupMgr.h" -#include "SpellMgr.h" -#include "Creature.h" -#include "QuestDef.h" -#include "GossipDef.h" -#include "Player.h" -#include "PoolMgr.h" -#include "Opcodes.h" -#include "Log.h" -#include "LootMgr.h" -#include "MapManager.h" #include "CreatureAI.h" #include "CreatureAISelector.h" +#include "CreatureGroups.h" +#include "Creature.h" +#include "DatabaseEnv.h" #include "Formulas.h" -#include "WaypointMovementGenerator.h" -#include "InstanceScript.h" -#include "BattlegroundMgr.h" -#include "Util.h" +#include "GameEventMgr.h" +#include "GossipDef.h" #include "GridNotifiers.h" #include "GridNotifiersImpl.h" -#include "CellImpl.h" -#include "OutdoorPvPMgr.h" -#include "GameEventMgr.h" -#include "CreatureGroups.h" -#include "Vehicle.h" -#include "SpellAuraEffects.h" #include "Group.h" -#include "MoveSplineInit.h" +#include "GroupMgr.h" +#include "InstanceScript.h" +#include "Log.h" +#include "LootMgr.h" +#include "MapManager.h" #include "MoveSpline.h" +#include "MoveSplineInit.h" +#include "ObjectMgr.h" +#include "Opcodes.h" +#include "OutdoorPvPMgr.h" +#include "Player.h" +#include "PoolMgr.h" +#include "QuestDef.h" +#include "SpellAuraEffects.h" +#include "SpellMgr.h" +#include "TemporarySummon.h" +#include "Util.h" +#include "Vehicle.h" +#include "WaypointMovementGenerator.h" +#include "World.h" +#include "WorldPacket.h" + // apply implementation of the singletons TrainerSpell const* TrainerSpellData::Find(uint32 spell_id) const diff --git a/src/server/game/Entities/Object/Object.cpp b/src/server/game/Entities/Object/Object.cpp index d8287b68fc5..7818cdc6942 100755 --- a/src/server/game/Entities/Object/Object.cpp +++ b/src/server/game/Entities/Object/Object.cpp @@ -2360,119 +2360,6 @@ TempSummon* WorldObject::SummonCreature(uint32 entry, const Position &pos, TempS return NULL; } -Pet* Player::SummonPet(uint32 entry, float x, float y, float z, float ang, PetType petType, uint32 duration) -{ - Pet* pet = new Pet(this, petType); - - if (petType == SUMMON_PET && pet->LoadPetFromDB(this, entry)) - { - // Remove Demonic Sacrifice auras (known pet) - Unit::AuraEffectList const& auraClassScripts = GetAuraEffectsByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS); - for (Unit::AuraEffectList::const_iterator itr = auraClassScripts.begin(); itr != auraClassScripts.end();) - { - if ((*itr)->GetMiscValue() == 2228) - { - RemoveAurasDueToSpell((*itr)->GetId()); - itr = auraClassScripts.begin(); - } - else - ++itr; - } - - if (duration > 0) - pet->SetDuration(duration); - - return NULL; - } - - // petentry == 0 for hunter "call pet" (current pet summoned if any) - if (!entry) - { - delete pet; - return NULL; - } - - pet->Relocate(x, y, z, ang); - if (!pet->IsPositionValid()) - { - sLog->outError(LOG_FILTER_GENERAL, "Pet (guidlow %d, entry %d) not summoned. Suggested coordinates isn't valid (X: %f Y: %f)", pet->GetGUIDLow(), pet->GetEntry(), pet->GetPositionX(), pet->GetPositionY()); - delete pet; - return NULL; - } - - Map* map = GetMap(); - uint32 pet_number = sObjectMgr->GeneratePetNumber(); - if (!pet->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_PET), map, GetPhaseMask(), entry, pet_number)) - { - sLog->outError(LOG_FILTER_GENERAL, "no such creature entry %u", entry); - delete pet; - return NULL; - } - - pet->SetCreatorGUID(GetGUID()); - pet->SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE, getFaction()); - - pet->setPowerType(POWER_MANA); - pet->SetUInt32Value(UNIT_NPC_FLAGS, 0); - pet->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); - pet->InitStatsForLevel(getLevel()); - - SetMinion(pet, true); - - switch (petType) - { - case SUMMON_PET: - // this enables pet details window (Shift+P) - pet->GetCharmInfo()->SetPetNumber(pet_number, true); - pet->SetUInt32Value(UNIT_FIELD_BYTES_0, 2048); - pet->SetUInt32Value(UNIT_FIELD_PETEXPERIENCE, 0); - pet->SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, 1000); - pet->SetFullHealth(); - pet->SetPower(POWER_MANA, pet->GetMaxPower(POWER_MANA)); - pet->SetUInt32Value(UNIT_FIELD_PET_NAME_TIMESTAMP, uint32(time(NULL))); // cast can't be helped in this case - break; - default: - break; - } - - map->AddToMap(pet->ToCreature()); - - switch (petType) - { - case SUMMON_PET: - pet->InitPetCreateSpells(); - pet->InitTalentForLevel(); - pet->SavePetToDB(PET_SAVE_AS_CURRENT); - PetSpellInitialize(); - break; - default: - break; - } - - if (petType == SUMMON_PET) - { - // Remove Demonic Sacrifice auras (known pet) - Unit::AuraEffectList const& auraClassScripts = GetAuraEffectsByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS); - for (Unit::AuraEffectList::const_iterator itr = auraClassScripts.begin(); itr != auraClassScripts.end();) - { - if ((*itr)->GetMiscValue() == 2228) - { - RemoveAurasDueToSpell((*itr)->GetId()); - itr = auraClassScripts.begin(); - } - else - ++itr; - } - } - - if (duration > 0) - pet->SetDuration(duration); - - //ObjectAccessor::UpdateObjectVisibility(pet); - - return pet; -} - GameObject* WorldObject::SummonGameObject(uint32 entry, float x, float y, float z, float ang, float rotation0, float rotation1, float rotation2, float rotation3, uint32 respawnTime) { if (!IsInWorld()) diff --git a/src/server/game/Entities/Pet/Pet.h b/src/server/game/Entities/Pet/Pet.h index f24bb665710..a1dd57a26cc 100755 --- a/src/server/game/Entities/Pet/Pet.h +++ b/src/server/game/Entities/Pet/Pet.h @@ -19,50 +19,11 @@ #ifndef TRINITYCORE_PET_H #define TRINITYCORE_PET_H -#include "ObjectDefines.h" -#include "Unit.h" +#include "PetDefines.h" #include "TemporarySummon.h" -enum PetType -{ - SUMMON_PET = 0, - HUNTER_PET = 1, - MAX_PET_TYPE = 4 -}; - -#define MAX_PET_STABLES 4 - -// stored in character_pet.slot -enum PetSaveMode -{ - PET_SAVE_AS_DELETED = -1, // not saved in fact - PET_SAVE_AS_CURRENT = 0, // in current slot (with player) - PET_SAVE_FIRST_STABLE_SLOT = 1, - PET_SAVE_LAST_STABLE_SLOT = MAX_PET_STABLES, // last in DB stable slot index (including), all higher have same meaning as PET_SAVE_NOT_IN_SLOT - PET_SAVE_NOT_IN_SLOT = 100 // for avoid conflict with stable size grow will use 100 -}; - -enum HappinessState -{ - UNHAPPY = 1, - CONTENT = 2, - HAPPY = 3 -}; - -enum PetSpellState -{ - PETSPELL_UNCHANGED = 0, - PETSPELL_CHANGED = 1, - PETSPELL_NEW = 2, - PETSPELL_REMOVED = 3 -}; - -enum PetSpellType -{ - PETSPELL_NORMAL = 0, - PETSPELL_FAMILY = 1, - PETSPELL_TALENT = 2 -}; +#define PET_FOCUS_REGEN_INTERVAL 4 * IN_MILLISECONDS +#define HAPPINESS_LEVEL_SIZE 333000 struct PetSpell { @@ -71,31 +32,9 @@ struct PetSpell PetSpellType type; }; -enum ActionFeedback -{ - FEEDBACK_NONE = 0, - FEEDBACK_PET_DEAD = 1, - FEEDBACK_NOTHING_TO_ATT = 2, - FEEDBACK_CANT_ATT_TARGET = 3 -}; - -enum PetTalk -{ - PET_TALK_SPECIAL_SPELL = 0, - PET_TALK_ATTACK = 1 -}; - typedef UNORDERED_MAP PetSpellMap; typedef std::vector AutoSpellList; -#define HAPPINESS_LEVEL_SIZE 333000 - -#define ACTIVE_SPELLS_MAX 4 - -#define PET_FOLLOW_DIST 1.0f -#define PET_FOLLOW_ANGLE (M_PI/2) -#define PET_FOCUS_REGEN_INTERVAL 4 * IN_MILLISECONDS - class Player; class Pet : public Guardian diff --git a/src/server/game/Entities/Pet/PetDefines.h b/src/server/game/Entities/Pet/PetDefines.h new file mode 100644 index 00000000000..76de2647c8c --- /dev/null +++ b/src/server/game/Entities/Pet/PetDefines.h @@ -0,0 +1,80 @@ +/* + * Copyright (C) 2008-2012 TrinityCore + * Copyright (C) 2005-2009 MaNGOS + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef TRINITYCORE_PET_DEFINES_H +#define TRINITYCORE_PET_DEFINES_H + +enum PetType +{ + SUMMON_PET = 0, + HUNTER_PET = 1, + MAX_PET_TYPE = 4 +}; + +#define MAX_PET_STABLES 4 + +// stored in character_pet.slot +enum PetSaveMode +{ + PET_SAVE_AS_DELETED = -1, // not saved in fact + PET_SAVE_AS_CURRENT = 0, // in current slot (with player) + PET_SAVE_FIRST_STABLE_SLOT = 1, + PET_SAVE_LAST_STABLE_SLOT = MAX_PET_STABLES, // last in DB stable slot index (including), all higher have same meaning as PET_SAVE_NOT_IN_SLOT + PET_SAVE_NOT_IN_SLOT = 100 // for avoid conflict with stable size grow will use 100 +}; + +enum HappinessState +{ + UNHAPPY = 1, + CONTENT = 2, + HAPPY = 3 +}; + +enum PetSpellState +{ + PETSPELL_UNCHANGED = 0, + PETSPELL_CHANGED = 1, + PETSPELL_NEW = 2, + PETSPELL_REMOVED = 3 +}; + +enum PetSpellType +{ + PETSPELL_NORMAL = 0, + PETSPELL_FAMILY = 1, + PETSPELL_TALENT = 2 +}; + +enum ActionFeedback +{ + FEEDBACK_NONE = 0, + FEEDBACK_PET_DEAD = 1, + FEEDBACK_NOTHING_TO_ATT = 2, + FEEDBACK_CANT_ATT_TARGET = 3 +}; + +enum PetTalk +{ + PET_TALK_SPECIAL_SPELL = 0, + PET_TALK_ATTACK = 1 +}; + +#define PET_FOLLOW_DIST 1.0f +#define PET_FOLLOW_ANGLE (M_PI/2) + +#endif diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 21db9ac4ff9..a95ce52c3f6 100755 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -16,67 +16,68 @@ * with this program. If not, see . */ -#include "Common.h" -#include "Language.h" -#include "DatabaseEnv.h" -#include "Log.h" -#include "Opcodes.h" -#include "SpellMgr.h" -#include "World.h" -#include "WorldPacket.h" -#include "WorldSession.h" -#include "UpdateMask.h" #include "Player.h" -#include "Vehicle.h" -#include "SkillDiscovery.h" -#include "QuestDef.h" -#include "GossipDef.h" -#include "UpdateData.h" +#include "AccountMgr.h" +#include "AchievementMgr.h" +#include "ArenaTeam.h" +#include "ArenaTeamMgr.h" +#include "Battlefield.h" +#include "BattlefieldMgr.h" +#include "BattlefieldWG.h" +#include "BattlegroundAV.h" +#include "Battleground.h" +#include "BattlegroundMgr.h" +#include "CellImpl.h" #include "Channel.h" #include "ChannelMgr.h" -#include "MapManager.h" -#include "MapInstanced.h" -#include "InstanceSaveMgr.h" -#include "GridNotifiers.h" -#include "GridNotifiersImpl.h" -#include "CellImpl.h" -#include "ObjectMgr.h" -#include "ArenaTeamMgr.h" -#include "GuildMgr.h" -#include "GroupMgr.h" -#include "ObjectAccessor.h" +#include "CharacterDatabaseCleaner.h" +#include "Chat.h" +#include +#include "Common.h" +#include "ConditionMgr.h" #include "CreatureAI.h" +#include "DatabaseEnv.h" +#include "DisableMgr.h" #include "Formulas.h" +#include "GameEventMgr.h" +#include "GossipDef.h" +#include "GridNotifiers.h" +#include "GridNotifiersImpl.h" #include "Group.h" +#include "GroupMgr.h" #include "Guild.h" -#include "Pet.h" -#include "Util.h" -#include "Transport.h" -#include "Weather.h" -#include "Battleground.h" -#include "BattlegroundAV.h" -#include "BattlegroundMgr.h" +#include "GuildMgr.h" +#include "InstanceSaveMgr.h" +#include "InstanceScript.h" +#include "Language.h" +#include "LFGMgr.h" +#include "Log.h" +#include "MapInstanced.h" +#include "MapManager.h" +#include "ObjectAccessor.h" +#include "ObjectMgr.h" +#include "Opcodes.h" #include "OutdoorPvP.h" #include "OutdoorPvPMgr.h" -#include "ArenaTeam.h" -#include "Chat.h" -#include "Spell.h" +#include "ReputationMgr.h" +#include "Pet.h" +#include "QuestDef.h" +#include "SkillDiscovery.h" #include "SocialMgr.h" -#include "GameEventMgr.h" -#include "AchievementMgr.h" -#include "SpellAuras.h" #include "SpellAuraEffects.h" -#include "ConditionMgr.h" -#include "DisableMgr.h" +#include "SpellAuras.h" +#include "Spell.h" +#include "SpellMgr.h" +#include "Transport.h" +#include "UpdateData.h" +#include "UpdateMask.h" +#include "Util.h" +#include "Vehicle.h" +#include "Weather.h" #include "WeatherMgr.h" -#include "LFGMgr.h" -#include "CharacterDatabaseCleaner.h" -#include "InstanceScript.h" -#include -#include "AccountMgr.h" -#include "Battlefield.h" -#include "BattlefieldMgr.h" -#include "BattlefieldWG.h" +#include "World.h" +#include "WorldPacket.h" +#include "WorldSession.h" #define ZONE_UPDATE_INTERVAL (1*IN_MILLISECONDS) @@ -643,7 +644,7 @@ void KillRewarder::Reward() #ifdef _MSC_VER #pragma warning(disable:4355) #endif -Player::Player(WorldSession* session): Unit(true), m_achievementMgr(this), m_reputationMgr(this) +Player::Player(WorldSession* session): Unit(true) { #ifdef _MSC_VER #pragma warning(default:4355) @@ -869,6 +870,8 @@ Player::Player(WorldSession* session): Unit(true), m_achievementMgr(this), m_rep SetPendingBind(0, 0); _activeCheats = CHEAT_NONE; + m_achievementMgr = new AchievementMgr(this); + m_reputationMgr = new ReputationMgr(this); } Player::~Player() @@ -904,6 +907,8 @@ Player::~Player() delete m_declinedname; delete m_runes; + delete m_achievementMgr; + delete m_reputationMgr; sWorld->DecreasePlayerCount(); } @@ -1609,7 +1614,7 @@ void Player::Update(uint32 p_time) } } - m_achievementMgr.UpdateTimedAchievements(p_time); + m_achievementMgr->UpdateTimedAchievements(p_time); if (HasUnitState(UNIT_STATE_MELEE_ATTACKING) && !HasUnitState(UNIT_STATE_CASTING)) { @@ -16732,7 +16737,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder) SetFloatValue(UNIT_FIELD_HOVERHEIGHT, 1.0f); // load achievements before anything else to prevent multiple gains for the same achievement/criteria on every loading (as loading does call UpdateAchievementCriteria) - m_achievementMgr.LoadFromDB(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADACHIEVEMENTS), holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADCRITERIAPROGRESS)); + m_achievementMgr->LoadFromDB(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADACHIEVEMENTS), holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADCRITERIAPROGRESS)); uint32 money = fields[8].GetUInt32(); if (money > MAX_MONEY_AMOUNT) @@ -17176,7 +17181,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder) learnDefaultSpells(); // must be before inventory (some items required reputation check) - m_reputationMgr.LoadFromDB(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADREPUTATION)); + m_reputationMgr->LoadFromDB(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADREPUTATION)); _LoadInventory(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADINVENTORY), time_diff); @@ -17284,7 +17289,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder) _LoadDeclinedNames(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADDECLINEDNAMES)); - m_achievementMgr.CheckAllAchievementCriteria(); + m_achievementMgr->CheckAllAchievementCriteria(); _LoadEquipmentSets(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADEQUIPMENTSETS)); @@ -18828,8 +18833,8 @@ void Player::SaveToDB(bool create /*=false*/) _SaveActions(trans); _SaveAuras(trans); _SaveSkills(trans); - m_achievementMgr.SaveToDB(trans); - m_reputationMgr.SaveToDB(trans); + m_achievementMgr->SaveToDB(trans); + m_reputationMgr->SaveToDB(trans); _SaveEquipmentSets(trans); GetSession()->SaveTutorialsData(trans); // changed only while character in game _SaveGlyphs(trans); @@ -22077,8 +22082,8 @@ void Player::SendInitialPacketsBeforeAddToMap() GetSession()->SendPacket(&data); SendInitialActionButtons(); - m_reputationMgr.SendInitialReputations(); - m_achievementMgr.SendAllAchievementData(); + m_reputationMgr->SendInitialReputations(); + m_achievementMgr->SendAllAchievementData(); SendEquipmentSetList(); @@ -24189,42 +24194,42 @@ void Player::HandleFall(MovementInfo const& movementInfo) void Player::ResetAchievements() { - m_achievementMgr.Reset(); + m_achievementMgr->Reset(); } void Player::SendRespondInspectAchievements(Player* player) const { - m_achievementMgr.SendRespondInspectAchievements(player); + m_achievementMgr->SendRespondInspectAchievements(player); } bool Player::HasAchieved(uint32 achievementId) const { - return m_achievementMgr.HasAchieved(achievementId); + return m_achievementMgr->HasAchieved(achievementId); } void Player::StartTimedAchievement(AchievementCriteriaTimedTypes type, uint32 entry, uint32 timeLost/* = 0*/) { - m_achievementMgr.StartTimedAchievement(type, entry, timeLost); + m_achievementMgr->StartTimedAchievement(type, entry, timeLost); } void Player::RemoveTimedAchievement(AchievementCriteriaTimedTypes type, uint32 entry) { - m_achievementMgr.RemoveTimedAchievement(type, entry); + m_achievementMgr->RemoveTimedAchievement(type, entry); } void Player::ResetAchievementCriteria(AchievementCriteriaTypes type, uint32 miscValue1 /*= 0*/, uint32 miscValue2 /*= 0*/, bool evenIfCriteriaComplete /* = false*/) { - m_achievementMgr.ResetAchievementCriteria(type, miscValue1, miscValue2, evenIfCriteriaComplete); + m_achievementMgr->ResetAchievementCriteria(type, miscValue1, miscValue2, evenIfCriteriaComplete); } void Player::UpdateAchievementCriteria(AchievementCriteriaTypes type, uint32 miscValue1 /*= 0*/, uint32 miscValue2 /*= 0*/, Unit* unit /*= NULL*/) { - m_achievementMgr.UpdateAchievementCriteria(type, miscValue1, miscValue2, unit); + m_achievementMgr->UpdateAchievementCriteria(type, miscValue1, miscValue2, unit); } void Player::CompletedAchievement(AchievementEntry const* entry) { - m_achievementMgr.CompletedAchievement(entry); + m_achievementMgr->CompletedAchievement(entry); } void Player::LearnTalent(uint32 talentId, uint32 talentRank) @@ -25594,3 +25599,116 @@ Guild* Player::GetGuild() uint32 guildId = GetGuildId(); return guildId ? sGuildMgr->GetGuildById(guildId) : NULL; } + +Pet* Player::SummonPet(uint32 entry, float x, float y, float z, float ang, PetType petType, uint32 duration) +{ + Pet* pet = new Pet(this, petType); + + if (petType == SUMMON_PET && pet->LoadPetFromDB(this, entry)) + { + // Remove Demonic Sacrifice auras (known pet) + Unit::AuraEffectList const& auraClassScripts = GetAuraEffectsByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS); + for (Unit::AuraEffectList::const_iterator itr = auraClassScripts.begin(); itr != auraClassScripts.end();) + { + if ((*itr)->GetMiscValue() == 2228) + { + RemoveAurasDueToSpell((*itr)->GetId()); + itr = auraClassScripts.begin(); + } + else + ++itr; + } + + if (duration > 0) + pet->SetDuration(duration); + + return NULL; + } + + // petentry == 0 for hunter "call pet" (current pet summoned if any) + if (!entry) + { + delete pet; + return NULL; + } + + pet->Relocate(x, y, z, ang); + if (!pet->IsPositionValid()) + { + sLog->outError(LOG_FILTER_GENERAL, "Pet (guidlow %d, entry %d) not summoned. Suggested coordinates isn't valid (X: %f Y: %f)", pet->GetGUIDLow(), pet->GetEntry(), pet->GetPositionX(), pet->GetPositionY()); + delete pet; + return NULL; + } + + Map* map = GetMap(); + uint32 pet_number = sObjectMgr->GeneratePetNumber(); + if (!pet->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_PET), map, GetPhaseMask(), entry, pet_number)) + { + sLog->outError(LOG_FILTER_GENERAL, "no such creature entry %u", entry); + delete pet; + return NULL; + } + + pet->SetCreatorGUID(GetGUID()); + pet->SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE, getFaction()); + + pet->setPowerType(POWER_MANA); + pet->SetUInt32Value(UNIT_NPC_FLAGS, 0); + pet->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); + pet->InitStatsForLevel(getLevel()); + + SetMinion(pet, true); + + switch (petType) + { + case SUMMON_PET: + // this enables pet details window (Shift+P) + pet->GetCharmInfo()->SetPetNumber(pet_number, true); + pet->SetUInt32Value(UNIT_FIELD_BYTES_0, 2048); + pet->SetUInt32Value(UNIT_FIELD_PETEXPERIENCE, 0); + pet->SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, 1000); + pet->SetFullHealth(); + pet->SetPower(POWER_MANA, pet->GetMaxPower(POWER_MANA)); + pet->SetUInt32Value(UNIT_FIELD_PET_NAME_TIMESTAMP, uint32(time(NULL))); // cast can't be helped in this case + break; + default: + break; + } + + map->AddToMap(pet->ToCreature()); + + switch (petType) + { + case SUMMON_PET: + pet->InitPetCreateSpells(); + pet->InitTalentForLevel(); + pet->SavePetToDB(PET_SAVE_AS_CURRENT); + PetSpellInitialize(); + break; + default: + break; + } + + if (petType == SUMMON_PET) + { + // Remove Demonic Sacrifice auras (known pet) + Unit::AuraEffectList const& auraClassScripts = GetAuraEffectsByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS); + for (Unit::AuraEffectList::const_iterator itr = auraClassScripts.begin(); itr != auraClassScripts.end();) + { + if ((*itr)->GetMiscValue() == 2228) + { + RemoveAurasDueToSpell((*itr)->GetId()); + itr = auraClassScripts.begin(); + } + else + ++itr; + } + } + + if (duration > 0) + pet->SetDuration(duration); + + //ObjectAccessor::UpdateObjectVisibility(pet); + + return pet; +} diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h index 3b1f47b8f69..07c00031e6b 100755 --- a/src/server/game/Entities/Player/Player.h +++ b/src/server/game/Entities/Player/Player.h @@ -19,26 +19,27 @@ #ifndef _PLAYER_H #define _PLAYER_H -#include "AchievementMgr.h" -#include "Common.h" -#include "DatabaseEnv.h" -#include "DBCEnums.h" +#include "DBCStores.h" #include "GroupReference.h" -#include "Item.h" #include "MapReference.h" -#include "Pet.h" + +#include "Item.h" +#include "PetDefines.h" #include "QuestDef.h" -#include "ReputationMgr.h" #include "Unit.h" -#include "WorldSession.h" #include "SpellMgr.h" #include #include struct Mail; +struct VendorItem; + +class AchievementMgr; +class ReputationMgr; class Channel; class Creature; +class CreatureTemplate; class DynamicObject; class Group; class Guild; @@ -47,6 +48,7 @@ class Pet; class PlayerMenu; class PlayerSocial; class SpellCastTargets; +class TrainerSpell; class UpdateMask; typedef std::deque PlayerMails; @@ -2012,8 +2014,8 @@ class Player : public Unit, public GridObject uint8 GetGrantableLevels() { return m_grantableLevels; } void SetGrantableLevels(uint8 val) { m_grantableLevels = val; } - ReputationMgr& GetReputationMgr() { return m_reputationMgr; } - ReputationMgr const& GetReputationMgr() const { return m_reputationMgr; } + ReputationMgr& GetReputationMgr() { return *m_reputationMgr; } + ReputationMgr const& GetReputationMgr() const { return *m_reputationMgr; } ReputationRank GetReputationRank(uint32 faction_id) const; void RewardReputation(Unit* victim, float rate); void RewardReputation(Quest const* quest); @@ -2835,8 +2837,8 @@ class Player : public Unit, public GridObject uint32 m_temporaryUnsummonedPetNumber; uint32 m_oldpetspell; - AchievementMgr m_achievementMgr; - ReputationMgr m_reputationMgr; + AchievementMgr* m_achievementMgr; + ReputationMgr* m_reputationMgr; SpellCooldowns m_spellCooldowns; diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index c886c046427..13b3335cfdc 100755 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -16,49 +16,50 @@ * with this program. If not, see . */ +#include "Battlefield.h" +#include "BattlefieldMgr.h" +#include "Battleground.h" +#include "CellImpl.h" #include "Common.h" +#include "ConditionMgr.h" +#include "CreatureAI.h" #include "CreatureAIImpl.h" -#include "Log.h" -#include "Opcodes.h" -#include "WorldPacket.h" -#include "WorldSession.h" -#include "World.h" -#include "ObjectMgr.h" -#include "SpellMgr.h" -#include "Unit.h" -#include "QuestDef.h" -#include "Player.h" +#include "CreatureGroups.h" #include "Creature.h" -#include "Spell.h" +#include "Formulas.h" +#include "GridNotifiersImpl.h" #include "Group.h" -#include "SpellAuras.h" -#include "SpellAuraEffects.h" +#include "InstanceSaveMgr.h" +#include "InstanceScript.h" +#include "Log.h" #include "MapManager.h" +#include "MoveSpline.h" +#include "MoveSplineInit.h" #include "ObjectAccessor.h" -#include "CreatureAI.h" -#include "Formulas.h" -#include "Pet.h" -#include "Util.h" -#include "Totem.h" -#include "Battleground.h" +#include "ObjectMgr.h" +#include "Opcodes.h" #include "OutdoorPvP.h" -#include "InstanceSaveMgr.h" -#include "GridNotifiersImpl.h" -#include "CellImpl.h" -#include "CreatureGroups.h" -#include "PetAI.h" #include "PassiveAI.h" +#include "PetAI.h" +#include "Pet.h" +#include "Player.h" +#include "QuestDef.h" +#include "ReputationMgr.h" +#include "SpellAuraEffects.h" +#include "SpellAuras.h" +#include "Spell.h" +#include "SpellInfo.h" +#include "SpellMgr.h" #include "TemporarySummon.h" -#include "Vehicle.h" +#include "Totem.h" #include "Transport.h" -#include "InstanceScript.h" -#include "SpellInfo.h" -#include "MoveSplineInit.h" -#include "MoveSpline.h" -#include "ConditionMgr.h" +#include "Unit.h" #include "UpdateFieldFlags.h" -#include "Battlefield.h" -#include "BattlefieldMgr.h" +#include "Util.h" +#include "Vehicle.h" +#include "World.h" +#include "WorldPacket.h" +#include "WorldSession.h" #include diff --git a/src/server/game/Globals/ObjectAccessor.cpp b/src/server/game/Globals/ObjectAccessor.cpp index 6999eb301f5..cedb20eccf1 100755 --- a/src/server/game/Globals/ObjectAccessor.cpp +++ b/src/server/game/Globals/ObjectAccessor.cpp @@ -17,25 +17,25 @@ */ #include "ObjectAccessor.h" -#include "ObjectMgr.h" - -#include "Player.h" +#include "CellImpl.h" +#include "Corpse.h" #include "Creature.h" -#include "GameObject.h" #include "DynamicObject.h" -#include "Vehicle.h" -#include "WorldPacket.h" -#include "Item.h" -#include "Corpse.h" +#include "GameObject.h" #include "GridNotifiers.h" -#include "MapManager.h" -#include "Map.h" -#include "CellImpl.h" #include "GridNotifiersImpl.h" -#include "Opcodes.h" -#include "ObjectDefines.h" +#include "Item.h" +#include "Map.h" #include "MapInstanced.h" +#include "MapManager.h" +#include "ObjectDefines.h" +#include "ObjectMgr.h" +#include "Opcodes.h" +#include "Pet.h" +#include "Player.h" +#include "Vehicle.h" #include "World.h" +#include "WorldPacket.h" #include diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index 245079f2495..a94a12a99fe 100755 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -16,36 +16,38 @@ * with this program. If not, see . */ +#include "AccountMgr.h" +#include "AchievementMgr.h" +#include "ArenaTeam.h" +#include "ArenaTeamMgr.h" +#include "Chat.h" #include "Common.h" #include "DatabaseEnv.h" +#include "DisableMgr.h" +#include "GameEventMgr.h" +#include "GossipDef.h" +#include "GroupMgr.h" +#include "GuildMgr.h" +#include "InstanceSaveMgr.h" +#include "Language.h" +#include "LFGMgr.h" #include "Log.h" #include "MapManager.h" #include "ObjectMgr.h" -#include "ArenaTeamMgr.h" -#include "GuildMgr.h" -#include "GroupMgr.h" +#include "Pet.h" +#include "PoolMgr.h" +#include "ReputationMgr.h" +#include "ScriptMgr.h" +#include "SpellAuras.h" +#include "Spell.h" #include "SpellMgr.h" -#include "UpdateMask.h" -#include "World.h" -#include "ArenaTeam.h" +#include "SpellScript.h" #include "Transport.h" -#include "Language.h" -#include "GameEventMgr.h" -#include "Spell.h" -#include "Chat.h" -#include "AccountMgr.h" -#include "InstanceSaveMgr.h" -#include "SpellAuras.h" +#include "UpdateMask.h" #include "Util.h" -#include "WaypointManager.h" -#include "GossipDef.h" #include "Vehicle.h" -#include "AchievementMgr.h" -#include "DisableMgr.h" -#include "ScriptMgr.h" -#include "SpellScript.h" -#include "PoolMgr.h" -#include "LFGMgr.h" +#include "WaypointManager.h" +#include "World.h" ScriptMapMap sQuestEndScripts; ScriptMapMap sQuestStartScripts; diff --git a/src/server/game/Guilds/Guild.cpp b/src/server/game/Guilds/Guild.cpp index e1be2049dad..5cb02603598 100755 --- a/src/server/game/Guilds/Guild.cpp +++ b/src/server/game/Guilds/Guild.cpp @@ -16,16 +16,17 @@ * with this program. If not, see . */ +#include "AccountMgr.h" +#include "CalendarMgr.h" +#include "Chat.h" +#include "Config.h" #include "DatabaseEnv.h" #include "Guild.h" #include "GuildMgr.h" +#include "Language.h" +#include "Log.h" #include "ScriptMgr.h" -#include "Chat.h" -#include "Config.h" #include "SocialMgr.h" -#include "Log.h" -#include "AccountMgr.h" -#include "CalendarMgr.h" #define MAX_GUILD_BANK_TAB_TEXT_LEN 500 #define EMBLEM_PRICE 10 * GOLD diff --git a/src/server/game/Handlers/AuctionHouseHandler.cpp b/src/server/game/Handlers/AuctionHouseHandler.cpp index 3c3a6978384..7e23429be2f 100755 --- a/src/server/game/Handlers/AuctionHouseHandler.cpp +++ b/src/server/game/Handlers/AuctionHouseHandler.cpp @@ -24,6 +24,7 @@ #include "AuctionHouseMgr.h" #include "Log.h" +#include "Language.h" #include "Opcodes.h" #include "UpdateMask.h" #include "Util.h" diff --git a/src/server/game/Handlers/CharacterHandler.cpp b/src/server/game/Handlers/CharacterHandler.cpp index d0aad7072f7..0b01c796511 100644 --- a/src/server/game/Handlers/CharacterHandler.cpp +++ b/src/server/game/Handlers/CharacterHandler.cpp @@ -16,35 +16,37 @@ * with this program. If not, see . */ -#include "Common.h" -#include "ObjectAccessor.h" -#include "ObjectMgr.h" -#include "ArenaTeamMgr.h" -#include "GuildMgr.h" -#include "SystemConfig.h" -#include "World.h" -#include "WorldPacket.h" -#include "WorldSession.h" -#include "DatabaseEnv.h" - +#include "AccountMgr.h" #include "ArenaTeam.h" +#include "ArenaTeamMgr.h" +#include "Battleground.h" +#include "CalendarMgr.h" #include "Chat.h" +#include "Common.h" +#include "DatabaseEnv.h" #include "Group.h" #include "Guild.h" +#include "GuildMgr.h" #include "Language.h" +#include "LFGMgr.h" #include "Log.h" +#include "ObjectAccessor.h" +#include "ObjectMgr.h" #include "Opcodes.h" -#include "Player.h" +#include "Pet.h" #include "PlayerDump.h" +#include "Player.h" +#include "ReputationMgr.h" +#include "ScriptMgr.h" #include "SharedDefines.h" #include "SocialMgr.h" +#include "SystemConfig.h" #include "UpdateMask.h" #include "Util.h" -#include "ScriptMgr.h" -#include "Battleground.h" -#include "AccountMgr.h" -#include "LFGMgr.h" -#include "CalendarMgr.h" +#include "World.h" +#include "WorldPacket.h" +#include "WorldSession.h" + class LoginQueryHolder : public SQLQueryHolder { diff --git a/src/server/game/Handlers/GroupHandler.cpp b/src/server/game/Handlers/GroupHandler.cpp index 223a5316c7a..8555b4a6a1f 100755 --- a/src/server/game/Handlers/GroupHandler.cpp +++ b/src/server/game/Handlers/GroupHandler.cpp @@ -18,19 +18,20 @@ #include "Common.h" #include "DatabaseEnv.h" -#include "Opcodes.h" +#include "Group.h" +#include "GroupMgr.h" #include "Log.h" -#include "WorldPacket.h" -#include "WorldSession.h" -#include "World.h" #include "ObjectMgr.h" -#include "GroupMgr.h" +#include "Opcodes.h" +#include "Pet.h" #include "Player.h" -#include "Group.h" #include "SocialMgr.h" -#include "Util.h" #include "SpellAuras.h" +#include "Util.h" #include "Vehicle.h" +#include "World.h" +#include "WorldPacket.h" +#include "WorldSession.h" class Aura; diff --git a/src/server/game/Handlers/LootHandler.cpp b/src/server/game/Handlers/LootHandler.cpp index 83deaaa1bc6..635afd55a87 100755 --- a/src/server/game/Handlers/LootHandler.cpp +++ b/src/server/game/Handlers/LootHandler.cpp @@ -28,7 +28,7 @@ #include "Object.h" #include "Group.h" #include "World.h" -#include "Util.h" +#include "Creature.h" void WorldSession::HandleAutostoreLootItemOpcode(WorldPacket & recvData) { diff --git a/src/server/game/Handlers/NPCHandler.cpp b/src/server/game/Handlers/NPCHandler.cpp index 0265d1e6f60..ef0f8e130b6 100755 --- a/src/server/game/Handlers/NPCHandler.cpp +++ b/src/server/game/Handlers/NPCHandler.cpp @@ -31,6 +31,7 @@ #include "ObjectAccessor.h" #include "Creature.h" #include "Pet.h" +#include "ReputationMgr.h" #include "BattlegroundMgr.h" #include "Battleground.h" #include "ScriptMgr.h" diff --git a/src/server/game/Handlers/SkillHandler.cpp b/src/server/game/Handlers/SkillHandler.cpp index 88ae01f59be..ec389142182 100755 --- a/src/server/game/Handlers/SkillHandler.cpp +++ b/src/server/game/Handlers/SkillHandler.cpp @@ -18,13 +18,14 @@ #include "Common.h" #include "DatabaseEnv.h" -#include "Opcodes.h" #include "Log.h" +#include "ObjectAccessor.h" +#include "Opcodes.h" #include "Player.h" +#include "Pet.h" +#include "UpdateMask.h" #include "WorldPacket.h" #include "WorldSession.h" -#include "ObjectAccessor.h" -#include "UpdateMask.h" void WorldSession::HandleLearnTalentOpcode(WorldPacket & recvData) { diff --git a/src/server/game/Instances/InstanceScript.cpp b/src/server/game/Instances/InstanceScript.cpp index f8df5862df0..a2628fbb265 100755 --- a/src/server/game/Instances/InstanceScript.cpp +++ b/src/server/game/Instances/InstanceScript.cpp @@ -16,15 +16,16 @@ * with this program. If not, see . */ -#include "InstanceScript.h" -#include "DatabaseEnv.h" -#include "Map.h" -#include "Player.h" -#include "GameObject.h" #include "Creature.h" #include "CreatureAI.h" -#include "Log.h" +#include "DatabaseEnv.h" +#include "GameObject.h" +#include "InstanceScript.h" #include "LFGMgr.h" +#include "Log.h" +#include "Map.h" +#include "Player.h" +#include "Pet.h" void InstanceScript::SaveToDB() { diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index d40be13c6d8..115d56a607c 100755 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -17,23 +17,24 @@ */ #include "Map.h" -#include "GridStates.h" -#include "ScriptMgr.h" -#include "VMapFactory.h" -#include "MapInstanced.h" +#include "Battleground.h" #include "CellImpl.h" +#include "DynamicTree.h" #include "GridNotifiers.h" #include "GridNotifiersImpl.h" -#include "Transport.h" +#include "GridStates.h" +#include "Group.h" #include "InstanceScript.h" -#include "ObjectAccessor.h" +#include "LFGMgr.h" +#include "MapInstanced.h" #include "MapManager.h" +#include "ObjectAccessor.h" #include "ObjectMgr.h" -#include "Group.h" -#include "LFGMgr.h" -#include "DynamicTree.h" +#include "Pet.h" +#include "ScriptMgr.h" +#include "Transport.h" #include "Vehicle.h" -#include "Battleground.h" +#include "VMapFactory.h" union u_map_magic { diff --git a/src/server/game/Scripting/MapScripts.cpp b/src/server/game/Scripting/MapScripts.cpp index 517ea6cb6bd..069ae71b7cb 100755 --- a/src/server/game/Scripting/MapScripts.cpp +++ b/src/server/game/Scripting/MapScripts.cpp @@ -16,19 +16,20 @@ * with this program. If not, see . */ -#include "Map.h" -#include "World.h" #include "CellImpl.h" #include "GridNotifiers.h" #include "GridNotifiersImpl.h" -#include "Transport.h" -#include "ScriptedCreature.h" -#include "WaypointManager.h" #include "GossipDef.h" +#include "Map.h" #include "MapManager.h" -#include "ObjectMgr.h" #include "MapRefManager.h" +#include "ObjectMgr.h" +#include "Pet.h" +#include "ScriptedCreature.h" #include "ScriptMgr.h" +#include "Transport.h" +#include "WaypointManager.h" +#include "World.h" /// Put scripts in the execution queue void Map::ScriptsStart(ScriptMapMap const& scripts, uint32 id, Object* source, Object* target) diff --git a/src/server/game/Scripting/ScriptMgr.cpp b/src/server/game/Scripting/ScriptMgr.cpp index d1e7f87ccff..ac745eb1b5f 100755 --- a/src/server/game/Scripting/ScriptMgr.cpp +++ b/src/server/game/Scripting/ScriptMgr.cpp @@ -1187,12 +1187,12 @@ void ScriptMgr::OnShutdown() FOREACH_SCRIPT(WorldScript)->OnShutdown(); } -bool ScriptMgr::OnCriteriaCheck(AchievementCriteriaData const* data, Player* source, Unit* target) +bool ScriptMgr::OnCriteriaCheck(uint32 scriptId, Player* source, Unit* target) { ASSERT(source); // target can be NULL. - GET_SCRIPT_RET(AchievementCriteriaScript, data->ScriptId, tmpscript, false); + GET_SCRIPT_RET(AchievementCriteriaScript, scriptId, tmpscript, false); return tmpscript->OnCheck(source, target); } diff --git a/src/server/game/Scripting/ScriptMgr.h b/src/server/game/Scripting/ScriptMgr.h index 0f16c648b20..947be2b73fe 100755 --- a/src/server/game/Scripting/ScriptMgr.h +++ b/src/server/game/Scripting/ScriptMgr.h @@ -979,7 +979,7 @@ class ScriptMgr public: /* AchievementCriteriaScript */ - bool OnCriteriaCheck(AchievementCriteriaData const* data, Player* source, Unit* target); + bool OnCriteriaCheck(uint32 scriptId, Player* source, Unit* target); public: /* PlayerScript */ diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index 5e9e8cc090b..b29f1498152 100755 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -38,6 +38,8 @@ #include "Vehicle.h" #include "Battlefield.h" #include "BattlefieldMgr.h" +#include "Pet.h" +#include "ReputationMgr.h" class Aura; // diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index 1f0532d9b1e..15a3887ac0e 100755 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -63,6 +63,7 @@ #include "GameObjectAI.h" #include "AccountMgr.h" #include "InstanceScript.h" +#include "ReputationMgr.h" pEffect SpellEffects[TOTAL_SPELL_EFFECTS]= { diff --git a/src/server/game/Tickets/TicketMgr.cpp b/src/server/game/Tickets/TicketMgr.cpp index 5667b31048e..3003221b650 100755 --- a/src/server/game/Tickets/TicketMgr.cpp +++ b/src/server/game/Tickets/TicketMgr.cpp @@ -20,6 +20,7 @@ #include "TicketMgr.h" #include "DatabaseEnv.h" #include "Log.h" +#include "Language.h" #include "WorldPacket.h" #include "WorldSession.h" #include "Chat.h" diff --git a/src/server/scripts/Commands/cs_account.cpp b/src/server/scripts/Commands/cs_account.cpp index 6b6e94f75fb..9269bbb07ee 100644 --- a/src/server/scripts/Commands/cs_account.cpp +++ b/src/server/scripts/Commands/cs_account.cpp @@ -22,10 +22,11 @@ Comment: All account related commands Category: commandscripts EndScriptData */ -#include "ScriptMgr.h" #include "AccountMgr.h" #include "Chat.h" +#include "Language.h" #include "Player.h" +#include "ScriptMgr.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 1cb9c4829ec..9f5c861c52f 100644 --- a/src/server/scripts/Commands/cs_achievement.cpp +++ b/src/server/scripts/Commands/cs_achievement.cpp @@ -22,9 +22,10 @@ Comment: All achievement related commands Category: commandscripts EndScriptData */ -#include "ScriptMgr.h" #include "Chat.h" +#include "Language.h" #include "Player.h" +#include "ScriptMgr.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 af04a3b7989..3d340f3aaea 100644 --- a/src/server/scripts/Commands/cs_ban.cpp +++ b/src/server/scripts/Commands/cs_ban.cpp @@ -22,12 +22,13 @@ Comment: All ban related commands Category: commandscripts EndScriptData */ -#include "ScriptMgr.h" -#include "Chat.h" #include "AccountMgr.h" +#include "Chat.h" +#include "Language.h" #include "ObjectAccessor.h" #include "ObjectMgr.h" #include "Player.h" +#include "ScriptMgr.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 5a45f980c2c..7539ebd2b0c 100644 --- a/src/server/scripts/Commands/cs_cast.cpp +++ b/src/server/scripts/Commands/cs_cast.cpp @@ -24,6 +24,8 @@ EndScriptData */ #include "ScriptMgr.h" #include "Chat.h" +#include "Creature.h" +#include "Language.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 a352f930410..f8db39e0338 100644 --- a/src/server/scripts/Commands/cs_character.cpp +++ b/src/server/scripts/Commands/cs_character.cpp @@ -22,12 +22,13 @@ Comment: All character related commands Category: commandscripts EndScriptData */ -#include "ScriptMgr.h" -#include "Chat.h" #include "AccountMgr.h" +#include "Chat.h" #include "ObjectMgr.h" #include "PlayerDump.h" #include "Player.h" +#include "ReputationMgr.h" +#include "ScriptMgr.h" class character_commandscript : public CommandScript { diff --git a/src/server/scripts/Commands/cs_cheat.cpp b/src/server/scripts/Commands/cs_cheat.cpp index 1fe50038d59..026177ece6d 100644 --- a/src/server/scripts/Commands/cs_cheat.cpp +++ b/src/server/scripts/Commands/cs_cheat.cpp @@ -22,10 +22,11 @@ Comment: All cheat related commands Category: commandscripts EndScriptData */ -#include "ScriptMgr.h" -#include "ObjectMgr.h" #include "Chat.h" +#include "Language.h" +#include "ObjectMgr.h" #include "Player.h" +#include "ScriptMgr.h" class cheat_commandscript : public CommandScript { diff --git a/src/server/scripts/Commands/cs_debug.cpp b/src/server/scripts/Commands/cs_debug.cpp index 99ed8cc4301..956d9ac3376 100644 --- a/src/server/scripts/Commands/cs_debug.cpp +++ b/src/server/scripts/Commands/cs_debug.cpp @@ -31,6 +31,7 @@ EndScriptData */ #include "GridNotifiers.h" #include "GridNotifiersImpl.h" #include "GossipDef.h" +#include "Language.h" #include diff --git a/src/server/scripts/Commands/cs_disable.cpp b/src/server/scripts/Commands/cs_disable.cpp index d9be14f67e4..73ed341a21c 100644 --- a/src/server/scripts/Commands/cs_disable.cpp +++ b/src/server/scripts/Commands/cs_disable.cpp @@ -22,13 +22,14 @@ Comment: All disable related commands Category: commandscripts EndScriptData */ -#include "ScriptMgr.h" -#include "ObjectMgr.h" #include "Chat.h" #include "DisableMgr.h" +#include "Language.h" +#include "ObjectMgr.h" #include "OutdoorPvP.h" -#include "SpellMgr.h" #include "Player.h" +#include "ScriptMgr.h" +#include "SpellMgr.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 8d053a2f061..b0a646b7288 100644 --- a/src/server/scripts/Commands/cs_event.cpp +++ b/src/server/scripts/Commands/cs_event.cpp @@ -22,10 +22,11 @@ Comment: All event related commands Category: commandscripts EndScriptData */ -#include "ScriptMgr.h" -#include "GameEventMgr.h" #include "Chat.h" +#include "GameEventMgr.h" +#include "Language.h" #include "Player.h" +#include "ScriptMgr.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 520df4b7b85..0c24a9d8746 100644 --- a/src/server/scripts/Commands/cs_gm.cpp +++ b/src/server/scripts/Commands/cs_gm.cpp @@ -26,6 +26,7 @@ EndScriptData */ #include "ObjectMgr.h" #include "Chat.h" #include "AccountMgr.h" +#include "Language.h" #include "World.h" #include "Player.h" diff --git a/src/server/scripts/Commands/cs_go.cpp b/src/server/scripts/Commands/cs_go.cpp index 82ca77eb65b..6d75e63d053 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 "Language.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 7955678b8fd..5a24df4ee66 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 "Language.h" #include "Player.h" class gobject_commandscript : public CommandScript diff --git a/src/server/scripts/Commands/cs_guild.cpp b/src/server/scripts/Commands/cs_guild.cpp index a453122aef6..73955a6b9b2 100644 --- a/src/server/scripts/Commands/cs_guild.cpp +++ b/src/server/scripts/Commands/cs_guild.cpp @@ -22,11 +22,12 @@ Comment: All guild related commands Category: commandscripts EndScriptData */ -#include "ScriptMgr.h" #include "Chat.h" +#include "Language.h" #include "Guild.h" #include "GuildMgr.h" #include "ObjectAccessor.h" +#include "ScriptMgr.h" class guild_commandscript : public CommandScript { diff --git a/src/server/scripts/Commands/cs_honor.cpp b/src/server/scripts/Commands/cs_honor.cpp index 76f5badb707..c1d9229ccd3 100644 --- a/src/server/scripts/Commands/cs_honor.cpp +++ b/src/server/scripts/Commands/cs_honor.cpp @@ -22,10 +22,11 @@ Comment: All honor related commands Category: commandscripts EndScriptData */ -#include "ScriptMgr.h" -#include "ObjectMgr.h" #include "Chat.h" +#include "Language.h" +#include "ObjectMgr.h" #include "Player.h" +#include "ScriptMgr.h" class honor_commandscript : public CommandScript { diff --git a/src/server/scripts/Commands/cs_learn.cpp b/src/server/scripts/Commands/cs_learn.cpp index 786b949b5b4..9c383153d46 100644 --- a/src/server/scripts/Commands/cs_learn.cpp +++ b/src/server/scripts/Commands/cs_learn.cpp @@ -25,9 +25,11 @@ EndScriptData */ #include "Chat.h" #include "ScriptMgr.h" #include "ObjectMgr.h" +#include "Language.h" #include "SpellMgr.h" #include "SpellInfo.h" #include "Player.h" +#include "Pet.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 6739694f228..c4da37d032c 100644 --- a/src/server/scripts/Commands/cs_lfg.cpp +++ b/src/server/scripts/Commands/cs_lfg.cpp @@ -17,6 +17,7 @@ #include "ScriptMgr.h" #include "Chat.h" +#include "Language.h" #include "LFGMgr.h" #include "Group.h" #include "Player.h" diff --git a/src/server/scripts/Commands/cs_list.cpp b/src/server/scripts/Commands/cs_list.cpp index 8d333338be3..977369d1405 100644 --- a/src/server/scripts/Commands/cs_list.cpp +++ b/src/server/scripts/Commands/cs_list.cpp @@ -25,6 +25,7 @@ EndScriptData */ #include "ScriptMgr.h" #include "Chat.h" #include "SpellAuraEffects.h" +#include "Language.h" #include "ObjectAccessor.h" #include "ObjectMgr.h" #include "Player.h" diff --git a/src/server/scripts/Commands/cs_lookup.cpp b/src/server/scripts/Commands/cs_lookup.cpp index f07862342fd..e7e86fedef0 100644 --- a/src/server/scripts/Commands/cs_lookup.cpp +++ b/src/server/scripts/Commands/cs_lookup.cpp @@ -22,13 +22,14 @@ Comment: All lookup related commands Category: commandscripts EndScriptData */ -#include "ScriptMgr.h" -#include "Chat.h" #include "AccountMgr.h" +#include "Chat.h" #include "GameEventMgr.h" #include "ObjectAccessor.h" #include "ObjectMgr.h" #include "Player.h" +#include "ReputationMgr.h" +#include "ScriptMgr.h" class lookup_commandscript : public CommandScript { diff --git a/src/server/scripts/Commands/cs_message.cpp b/src/server/scripts/Commands/cs_message.cpp index d7c2f6117ac..30c94442c51 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 "Language.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 1cd78759d60..8a5af6c0df3 100644 --- a/src/server/scripts/Commands/cs_misc.cpp +++ b/src/server/scripts/Commands/cs_misc.cpp @@ -23,6 +23,7 @@ #include "GridNotifiers.h" #include "Group.h" #include "InstanceSaveMgr.h" +#include "Language.h" #include "MovementGenerator.h" #include "ObjectAccessor.h" #include "SpellAuras.h" @@ -30,6 +31,7 @@ #include "WeatherMgr.h" #include "ace/INET_Addr.h" #include "Player.h" +#include "Pet.h" class misc_commandscript : public CommandScript { diff --git a/src/server/scripts/Commands/cs_modify.cpp b/src/server/scripts/Commands/cs_modify.cpp index 1fc5e99a094..23a1d90368f 100644 --- a/src/server/scripts/Commands/cs_modify.cpp +++ b/src/server/scripts/Commands/cs_modify.cpp @@ -22,10 +22,12 @@ Comment: All modify related commands Category: commandscripts EndScriptData */ -#include "ScriptMgr.h" -#include "ObjectMgr.h" #include "Chat.h" +#include "ObjectMgr.h" +#include "Pet.h" #include "Player.h" +#include "ReputationMgr.h" +#include "ScriptMgr.h" class modify_commandscript : public CommandScript { diff --git a/src/server/scripts/Commands/cs_npc.cpp b/src/server/scripts/Commands/cs_npc.cpp index 91711072545..28e0744c29d 100644 --- a/src/server/scripts/Commands/cs_npc.cpp +++ b/src/server/scripts/Commands/cs_npc.cpp @@ -27,9 +27,11 @@ EndScriptData */ #include "Chat.h" #include "Transport.h" #include "CreatureGroups.h" +#include "Language.h" #include "TargetedMovementGenerator.h" // for HandleNpcUnFollowCommand #include "CreatureAI.h" #include "Player.h" +#include "Pet.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 5776022e59f..22d6e0831d6 100644 --- a/src/server/scripts/Commands/cs_quest.cpp +++ b/src/server/scripts/Commands/cs_quest.cpp @@ -22,10 +22,11 @@ Comment: All quest related commands Category: commandscripts EndScriptData */ -#include "ScriptMgr.h" -#include "ObjectMgr.h" #include "Chat.h" +#include "ObjectMgr.h" #include "Player.h" +#include "ReputationMgr.h" +#include "ScriptMgr.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 10b3fd1b997..c2791c815ad 100644 --- a/src/server/scripts/Commands/cs_reload.cpp +++ b/src/server/scripts/Commands/cs_reload.cpp @@ -22,22 +22,24 @@ Comment: All reload related commands Category: commandscripts EndScriptData */ -#include "ScriptMgr.h" -#include "ObjectMgr.h" -#include "SpellMgr.h" -#include "TicketMgr.h" -#include "MapManager.h" +#include "AchievementMgr.h" +#include "AuctionHouseMgr.h" +#include "Chat.h" #include "CreatureEventAIMgr.h" +#include "CreatureTextMgr.h" #include "DisableMgr.h" +#include "Language.h" #include "LFGMgr.h" -#include "AuctionHouseMgr.h" -#include "CreatureTextMgr.h" -#include "SmartAI.h" +#include "MapManager.h" +#include "ObjectMgr.h" +#include "ScriptMgr.h" #include "SkillDiscovery.h" #include "SkillExtraItems.h" -#include "Chat.h" -#include "WaypointManager.h" +#include "SmartAI.h" +#include "SpellMgr.h" +#include "TicketMgr.h" #include "WardenCheckMgr.h" +#include "WaypointManager.h" class reload_commandscript : public CommandScript { diff --git a/src/server/scripts/Commands/cs_reset.cpp b/src/server/scripts/Commands/cs_reset.cpp index d4610d57292..21a22381ae0 100644 --- a/src/server/scripts/Commands/cs_reset.cpp +++ b/src/server/scripts/Commands/cs_reset.cpp @@ -22,10 +22,13 @@ Comment: All reset related commands Category: commandscripts EndScriptData */ -#include "ScriptMgr.h" +#include "AchievementMgr.h" #include "Chat.h" +#include "Language.h" #include "ObjectAccessor.h" #include "Player.h" +#include "Pet.h" +#include "ScriptMgr.h" class reset_commandscript : public CommandScript { diff --git a/src/server/scripts/Commands/cs_server.cpp b/src/server/scripts/Commands/cs_server.cpp index 131d7a4149a..bb4f9be5ffe 100644 --- a/src/server/scripts/Commands/cs_server.cpp +++ b/src/server/scripts/Commands/cs_server.cpp @@ -22,12 +22,13 @@ Comment: All server related commands Category: commandscripts EndScriptData */ -#include "ScriptMgr.h" #include "Chat.h" -#include "SystemConfig.h" #include "Config.h" +#include "Language.h" #include "ObjectAccessor.h" #include "Player.h" +#include "ScriptMgr.h" +#include "SystemConfig.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 553559afd1c..756bd75387b 100644 --- a/src/server/scripts/Commands/cs_tele.cpp +++ b/src/server/scripts/Commands/cs_tele.cpp @@ -22,12 +22,13 @@ Comment: All tele related commands Category: commandscripts EndScriptData */ -#include "ScriptMgr.h" -#include "ObjectMgr.h" -#include "MapManager.h" #include "Chat.h" #include "Group.h" +#include "Language.h" +#include "MapManager.h" +#include "ObjectMgr.h" #include "Player.h" +#include "ScriptMgr.h" class tele_commandscript : public CommandScript { diff --git a/src/server/scripts/Commands/cs_ticket.cpp b/src/server/scripts/Commands/cs_ticket.cpp index 72804ed5727..c0b3809c836 100644 --- a/src/server/scripts/Commands/cs_ticket.cpp +++ b/src/server/scripts/Commands/cs_ticket.cpp @@ -22,12 +22,13 @@ Comment: All ticket related commands Category: commandscripts EndScriptData */ -#include "ScriptMgr.h" -#include "Chat.h" #include "AccountMgr.h" +#include "Chat.h" +#include "Language.h" #include "ObjectMgr.h" -#include "TicketMgr.h" #include "Player.h" +#include "TicketMgr.h" +#include "ScriptMgr.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 d25899cb094..c6e11c930fb 100644 --- a/src/server/scripts/Commands/cs_titles.cpp +++ b/src/server/scripts/Commands/cs_titles.cpp @@ -22,10 +22,11 @@ Comment: All titles related commands Category: commandscripts EndScriptData */ -#include "ScriptMgr.h" -#include "ObjectMgr.h" #include "Chat.h" +#include "Language.h" +#include "ObjectMgr.h" #include "Player.h" +#include "ScriptMgr.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 33adfe62391..c0b2938c156 100644 --- a/src/server/scripts/Commands/cs_wp.cpp +++ b/src/server/scripts/Commands/cs_wp.cpp @@ -22,11 +22,12 @@ Comment: All wp related commands Category: commandscripts EndScriptData */ -#include "ScriptMgr.h" -#include "ObjectMgr.h" -#include "WaypointManager.h" #include "Chat.h" +#include "Language.h" +#include "ObjectMgr.h" #include "Player.h" +#include "ScriptMgr.h" +#include "WaypointManager.h" class wp_commandscript : public CommandScript { diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp index 8e3be212081..026a0c7b280 100644 --- a/src/server/scripts/Spells/spell_generic.cpp +++ b/src/server/scripts/Spells/spell_generic.cpp @@ -23,17 +23,19 @@ */ #include "ScriptMgr.h" -#include "SpellScript.h" -#include "SpellAuraEffects.h" -#include "SkillDiscovery.h" +#include "Battleground.h" #include "Cell.h" #include "CellImpl.h" #include "GridNotifiers.h" #include "GridNotifiersImpl.h" -#include "InstanceScript.h" #include "Group.h" +#include "InstanceScript.h" #include "LFGMgr.h" -#include "Battleground.h" +#include "Pet.h" +#include "ReputationMgr.h" +#include "SkillDiscovery.h" +#include "SpellScript.h" +#include "SpellAuraEffects.h" class spell_gen_absorb0_hitlimit1 : public SpellScriptLoader { diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp index 0f8fa9614a7..a73af6892ca 100644 --- a/src/server/scripts/Spells/spell_hunter.cpp +++ b/src/server/scripts/Spells/spell_hunter.cpp @@ -21,7 +21,7 @@ * Scriptnames of files in this file should be prefixed with "spell_hun_". */ -#include "Player.h" +#include "Pet.h" #include "ScriptMgr.h" #include "Cell.h" #include "CellImpl.h" diff --git a/src/server/shared/Dynamic/LinkedReference/Reference.h b/src/server/shared/Dynamic/LinkedReference/Reference.h index 6c9710381b9..22921b075fe 100755 --- a/src/server/shared/Dynamic/LinkedReference/Reference.h +++ b/src/server/shared/Dynamic/LinkedReference/Reference.h @@ -20,6 +20,7 @@ #define _REFERENCE_H #include "Dynamic/LinkedList.h" +#include //===================================================== -- cgit v1.2.3 From 7bef4ce4014cc0ea967d3e80eda740b8c518653c Mon Sep 17 00:00:00 2001 From: Spp Date: Tue, 20 Nov 2012 14:54:33 +0100 Subject: Core/Misc: Reduce header dependencies - Step III --- src/server/collision/Models/GameObjectModel.cpp | 1 + src/server/game/AI/CoreAI/UnitAI.h | 3 +- src/server/game/Accounts/AccountMgr.cpp | 1 + .../game/Battlefield/Zones/BattlefieldWG.cpp | 2 ++ src/server/game/Battlefield/Zones/BattlefieldWG.h | 1 + src/server/game/Battlegrounds/ArenaTeam.cpp | 2 ++ src/server/game/Battlegrounds/BattlegroundMgr.cpp | 1 + .../game/Battlegrounds/Zones/BattlegroundAB.cpp | 1 + .../game/Battlegrounds/Zones/BattlegroundAV.cpp | 7 +++-- .../game/Battlegrounds/Zones/BattlegroundIC.cpp | 1 + .../game/Battlegrounds/Zones/BattlegroundSA.cpp | 1 + src/server/game/Calendar/CalendarMgr.cpp | 1 + src/server/game/DungeonFinding/LFGMgr.cpp | 1 + src/server/game/DungeonFinding/LFGScripts.cpp | 1 + src/server/game/Entities/Item/Item.cpp | 1 + src/server/game/Entities/Pet/Pet.cpp | 1 + src/server/game/Entities/Player/Player.cpp | 13 ++++++++ src/server/game/Entities/Player/Player.h | 16 ++++------ src/server/game/Entities/Totem/Totem.cpp | 5 ++-- src/server/game/Entities/Unit/Unit.h | 21 ++++--------- src/server/game/Globals/ObjectMgr.h | 35 ++++++++++++++++++++++ src/server/game/Grids/Notifiers/GridNotifiers.h | 1 + .../game/Grids/Notifiers/GridNotifiersImpl.h | 1 + src/server/game/Guilds/Guild.cpp | 1 + src/server/game/Handlers/ArenaTeamHandler.cpp | 1 + src/server/game/Handlers/CombatHandler.cpp | 1 + src/server/game/Handlers/LFGHandler.cpp | 1 + src/server/game/Handlers/LootHandler.cpp | 13 ++++---- src/server/game/Handlers/TicketHandler.cpp | 9 +++--- src/server/game/Instances/InstanceScript.cpp | 2 ++ src/server/game/Maps/MapManager.cpp | 2 ++ src/server/game/Miscellaneous/SharedDefines.h | 33 ++++++++++++++++++++ src/server/game/Movement/Spline/MoveSplineInit.cpp | 2 ++ src/server/game/Reputation/ReputationMgr.cpp | 1 + src/server/game/Scripting/ScriptMgr.cpp | 1 + src/server/game/Server/WorldSession.h | 34 --------------------- src/server/game/Texts/CreatureTextMgr.h | 1 + src/server/game/Tickets/TicketMgr.cpp | 1 + src/server/game/Tools/PlayerDump.cpp | 1 + src/server/game/Weather/Weather.cpp | 1 + src/server/game/Weather/WeatherMgr.cpp | 2 ++ src/server/game/World/World.h | 35 ---------------------- src/server/scripts/Commands/cs_gm.cpp | 1 + src/server/scripts/Commands/cs_gobject.cpp | 1 + src/server/scripts/Commands/cs_lookup.cpp | 1 + src/server/scripts/Commands/cs_misc.cpp | 1 + src/server/scripts/Commands/cs_modify.cpp | 2 ++ src/server/scripts/Commands/cs_ticket.cpp | 1 + .../BlackrockDepths/blackrock_depths.cpp | 1 + .../EasternKingdoms/Deadmines/deadmines.cpp | 1 + .../Deadmines/instance_deadmines.cpp | 2 ++ .../EasternKingdoms/Karazhan/boss_midnight.cpp | 1 + .../Karazhan/boss_prince_malchezaar.cpp | 1 + .../Karazhan/boss_shade_of_aran.cpp | 1 + .../EasternKingdoms/Karazhan/bosses_opera.cpp | 1 + .../MagistersTerrace/boss_felblood_kaelthas.cpp | 1 + .../MagistersTerrace/magisters_terrace.cpp | 1 + .../EasternKingdoms/ScarletEnclave/chapter1.cpp | 1 + .../EasternKingdoms/ScarletEnclave/chapter2.cpp | 1 + .../ScarletMonastery/boss_headless_horseman.cpp | 1 + .../boss_mograine_and_whitemane.cpp | 1 + .../EasternKingdoms/Stratholme/stratholme.cpp | 1 + .../SunwellPlateau/boss_eredar_twins.cpp | 1 + .../SunwellPlateau/boss_kalecgos.cpp | 1 + .../EasternKingdoms/SunwellPlateau/boss_muru.cpp | 1 + .../EasternKingdoms/ZulAman/boss_halazzi.cpp | 2 +- .../EasternKingdoms/ZulAman/boss_zuljin.cpp | 1 + .../EasternKingdoms/ZulAman/instance_zulaman.cpp | 1 + .../scripts/EasternKingdoms/ZulAman/zulaman.cpp | 1 + .../EasternKingdoms/eastern_plaguelands.cpp | 1 + src/server/scripts/EasternKingdoms/ghostlands.cpp | 1 + .../scripts/EasternKingdoms/isle_of_queldanas.cpp | 2 ++ .../scripts/EasternKingdoms/silvermoon_city.cpp | 1 + .../scripts/EasternKingdoms/stranglethorn_vale.cpp | 1 + .../EasternKingdoms/western_plaguelands.cpp | 1 + .../BattleForMountHyjal/instance_hyjal.cpp | 2 ++ .../CullingOfStratholme/culling_of_stratholme.cpp | 1 + .../instance_culling_of_stratholme.cpp | 2 ++ .../CavernsOfTime/DarkPortal/dark_portal.cpp | 1 + .../DarkPortal/instance_dark_portal.cpp | 2 ++ .../Kalimdor/OnyxiasLair/instance_onyxias_lair.cpp | 1 + .../RazorfenDowns/instance_razorfen_downs.cpp | 1 + .../Kalimdor/RuinsOfAhnQiraj/boss_ossirian.cpp | 3 ++ .../Kalimdor/ZulFarrak/instance_zulfarrak.cpp | 1 + src/server/scripts/Kalimdor/azshara.cpp | 2 ++ src/server/scripts/Kalimdor/darkshore.cpp | 1 + src/server/scripts/Kalimdor/desolace.cpp | 1 + src/server/scripts/Kalimdor/dustwallow_marsh.cpp | 1 + src/server/scripts/Kalimdor/feralas.cpp | 1 + src/server/scripts/Kalimdor/moonglade.cpp | 1 + src/server/scripts/Kalimdor/mulgore.cpp | 1 + src/server/scripts/Kalimdor/tanaris.cpp | 1 + src/server/scripts/Kalimdor/the_barrens.cpp | 1 + src/server/scripts/Kalimdor/ungoro_crater.cpp | 1 + src/server/scripts/Kalimdor/winterspring.cpp | 1 + .../AzjolNerub/Ahnkahet/boss_herald_volazj.cpp | 1 + .../RubySanctum/instance_ruby_sanctum.cpp | 2 ++ .../instance_trial_of_the_crusader.cpp | 1 + .../ForgeOfSouls/boss_devourer_of_souls.cpp | 1 + .../Northrend/Gundrak/boss_drakkari_colossus.cpp | 1 + .../scripts/Northrend/Gundrak/instance_gundrak.cpp | 1 + .../IcecrownCitadel/instance_icecrown_citadel.cpp | 2 ++ .../scripts/Northrend/Naxxramas/boss_faerlina.cpp | 1 + .../scripts/Northrend/Naxxramas/boss_grobbulus.cpp | 1 + .../scripts/Northrend/Naxxramas/boss_sapphiron.cpp | 1 + .../scripts/Northrend/Nexus/Oculus/boss_urom.cpp | 1 + .../Ulduar/HallsOfLightning/boss_ionar.cpp | 1 + .../Ulduar/HallsOfLightning/boss_volkhan.cpp | 1 + .../scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp | 2 ++ .../Northrend/Ulduar/Ulduar/instance_ulduar.cpp | 1 + .../UtgardeKeep/UtgardePinnacle/boss_skadi.cpp | 1 + .../UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp | 1 + .../Northrend/VioletHold/instance_violet_hold.cpp | 1 + src/server/scripts/Northrend/borean_tundra.cpp | 2 ++ src/server/scripts/Northrend/dalaran.cpp | 1 + src/server/scripts/Northrend/grizzly_hills.cpp | 1 + src/server/scripts/Northrend/storm_peaks.cpp | 1 + src/server/scripts/Northrend/zuldrak.cpp | 1 + src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp | 1 + .../Auchindoun/ShadowLabyrinth/boss_murmur.cpp | 1 + .../scripts/Outland/BlackTemple/boss_illidan.cpp | 1 + .../Outland/BlackTemple/boss_warlord_najentus.cpp | 1 + .../SerpentShrine/boss_lady_vashj.cpp | 1 + .../SerpentShrine/instance_serpent_shrine.cpp | 1 + .../SteamVault/boss_warlord_kalithresh.cpp | 1 + .../HellfireRamparts/boss_vazruden_the_herald.cpp | 1 + .../MagtheridonsLair/boss_magtheridon.cpp | 1 + .../scripts/Outland/TempestKeep/Eye/boss_alar.cpp | 1 + .../Outland/TempestKeep/Eye/boss_kaelthas.cpp | 1 + src/server/scripts/Outland/hellfire_peninsula.cpp | 1 + src/server/scripts/Outland/nagrand.cpp | 1 + src/server/scripts/Outland/shadowmoon_valley.cpp | 1 + src/server/scripts/Outland/shattrath_city.cpp | 1 + src/server/scripts/Outland/terokkar_forest.cpp | 1 + src/server/scripts/Outland/zangarmarsh.cpp | 1 + src/server/scripts/World/achievement_scripts.cpp | 1 + src/server/scripts/World/go_scripts.cpp | 1 + src/server/scripts/World/guards.cpp | 1 + src/server/scripts/World/npc_innkeeper.cpp | 1 + src/server/scripts/World/npc_professions.cpp | 2 ++ src/server/scripts/World/npc_taxi.cpp | 1 + src/server/scripts/World/npcs_special.cpp | 1 + 142 files changed, 264 insertions(+), 111 deletions(-) (limited to 'src/server/game/Maps') diff --git a/src/server/collision/Models/GameObjectModel.cpp b/src/server/collision/Models/GameObjectModel.cpp index d8c39925dc6..ae8465843b5 100644 --- a/src/server/collision/Models/GameObjectModel.cpp +++ b/src/server/collision/Models/GameObjectModel.cpp @@ -28,6 +28,7 @@ #include "TemporarySummon.h" #include "Object.h" #include "DBCStores.h" +#include "World.h" using G3D::Vector3; using G3D::Ray; diff --git a/src/server/game/AI/CoreAI/UnitAI.h b/src/server/game/AI/CoreAI/UnitAI.h index 59604f395f9..2eab0e89fcd 100755 --- a/src/server/game/AI/CoreAI/UnitAI.h +++ b/src/server/game/AI/CoreAI/UnitAI.h @@ -24,8 +24,9 @@ #include "Containers.h" #include -class Unit; class Player; +class Quest; +class Unit; struct AISpellInfoType; // Default script texts diff --git a/src/server/game/Accounts/AccountMgr.cpp b/src/server/game/Accounts/AccountMgr.cpp index 2b67acfd6d0..a82de501ea6 100755 --- a/src/server/game/Accounts/AccountMgr.cpp +++ b/src/server/game/Accounts/AccountMgr.cpp @@ -22,6 +22,7 @@ #include "Player.h" #include "Util.h" #include "SHA1.h" +#include "WorldSession.h" namespace AccountMgr { diff --git a/src/server/game/Battlefield/Zones/BattlefieldWG.cpp b/src/server/game/Battlefield/Zones/BattlefieldWG.cpp index 812dd5a1c2a..0ea4266cc22 100644 --- a/src/server/game/Battlefield/Zones/BattlefieldWG.cpp +++ b/src/server/game/Battlefield/Zones/BattlefieldWG.cpp @@ -22,10 +22,12 @@ #include "BattlefieldWG.h" #include "ObjectMgr.h" +#include "Opcodes.h" #include "Player.h" #include "SpellAuras.h" #include "TemporarySummon.h" #include "Vehicle.h" +#include "WorldSession.h" enum WGVehicles { diff --git a/src/server/game/Battlefield/Zones/BattlefieldWG.h b/src/server/game/Battlefield/Zones/BattlefieldWG.h index 2aa38b6811a..bd616167e8b 100644 --- a/src/server/game/Battlefield/Zones/BattlefieldWG.h +++ b/src/server/game/Battlefield/Zones/BattlefieldWG.h @@ -22,6 +22,7 @@ #include "ObjectAccessor.h" #include "WorldPacket.h" #include "Battlefield.h" +#include "World.h" class Group; class BattlefieldWG; diff --git a/src/server/game/Battlegrounds/ArenaTeam.cpp b/src/server/game/Battlegrounds/ArenaTeam.cpp index cc543544c7a..fd58765b056 100755 --- a/src/server/game/Battlegrounds/ArenaTeam.cpp +++ b/src/server/game/Battlegrounds/ArenaTeam.cpp @@ -23,6 +23,8 @@ #include "Group.h" #include "ArenaTeamMgr.h" #include "Player.h" +#include "WorldSession.h" +#include "Opcodes.h" ArenaTeam::ArenaTeam() : TeamId(0), Type(0), TeamName(), CaptainGuid(0), BackgroundColor(0), EmblemStyle(0), EmblemColor(0), diff --git a/src/server/game/Battlegrounds/BattlegroundMgr.cpp b/src/server/game/Battlegrounds/BattlegroundMgr.cpp index 6d472faf9c6..0604cadd5ee 100755 --- a/src/server/game/Battlegrounds/BattlegroundMgr.cpp +++ b/src/server/game/Battlegrounds/BattlegroundMgr.cpp @@ -44,6 +44,7 @@ #include "SharedDefines.h" #include "Formulas.h" #include "DisableMgr.h" +#include "Opcodes.h" /*********************************************************/ /*** BATTLEGROUND MANAGER ***/ diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp index 8f7231ba66e..47320db27cf 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp @@ -26,6 +26,7 @@ #include "Object.h" #include "Player.h" #include "Util.h" +#include "WorldSession.h" BattlegroundAB::BattlegroundAB() { diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp index 95aa0308c7d..918cef4d261 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp @@ -21,11 +21,12 @@ #include "ObjectMgr.h" #include "WorldPacket.h" -#include "Miscellaneous/Formulas.h" +#include "Formulas.h" #include "GameObject.h" -#include "Miscellaneous/Language.h" +#include "Language.h" #include "Player.h" #include "SpellAuras.h" +#include "WorldSession.h" BattlegroundAV::BattlegroundAV() { @@ -1707,4 +1708,4 @@ uint32 BattlegroundAV::GetPrematureWinner() return HORDE; return Battleground::GetPrematureWinner(); -} \ No newline at end of file +} diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp index 90c0dae9f5e..dbffc318c78 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp @@ -25,6 +25,7 @@ #include "ObjectMgr.h" #include "Vehicle.h" #include "Transport.h" +#include "WorldSession.h" BattlegroundIC::BattlegroundIC() { diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp index 7dba811c1a1..ab479eeff2d 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp @@ -22,6 +22,7 @@ #include "GameObject.h" #include "ObjectMgr.h" #include "WorldPacket.h" +#include "WorldSession.h" BattlegroundSA::BattlegroundSA() { diff --git a/src/server/game/Calendar/CalendarMgr.cpp b/src/server/game/Calendar/CalendarMgr.cpp index 993eb139a55..9f4816d6c7c 100644 --- a/src/server/game/Calendar/CalendarMgr.cpp +++ b/src/server/game/Calendar/CalendarMgr.cpp @@ -22,6 +22,7 @@ #include "Player.h" #include "GuildMgr.h" #include "ObjectAccessor.h" +#include "Opcodes.h" CalendarInvite::~CalendarInvite() { diff --git a/src/server/game/DungeonFinding/LFGMgr.cpp b/src/server/game/DungeonFinding/LFGMgr.cpp index 7cb9efa2f2f..41d3b540089 100755 --- a/src/server/game/DungeonFinding/LFGMgr.cpp +++ b/src/server/game/DungeonFinding/LFGMgr.cpp @@ -31,6 +31,7 @@ #include "Player.h" #include "GroupMgr.h" #include "GameEventMgr.h" +#include "WorldSession.h" LFGMgr::LFGMgr(): m_QueueTimer(0), m_lfgProposalId(1), m_options(sWorld->getIntConfig(CONFIG_LFG_OPTIONSMASK)) diff --git a/src/server/game/DungeonFinding/LFGScripts.cpp b/src/server/game/DungeonFinding/LFGScripts.cpp index 91314e64285..930367a0745 100644 --- a/src/server/game/DungeonFinding/LFGScripts.cpp +++ b/src/server/game/DungeonFinding/LFGScripts.cpp @@ -27,6 +27,7 @@ #include "LFGMgr.h" #include "ScriptMgr.h" #include "ObjectAccessor.h" +#include "WorldSession.h" LFGPlayerScript::LFGPlayerScript() : PlayerScript("LFGPlayerScript") { diff --git a/src/server/game/Entities/Item/Item.cpp b/src/server/game/Entities/Item/Item.cpp index 8711388a61c..a1ff6cf2ce8 100755 --- a/src/server/game/Entities/Item/Item.cpp +++ b/src/server/game/Entities/Item/Item.cpp @@ -27,6 +27,7 @@ #include "ScriptMgr.h" #include "ConditionMgr.h" #include "Player.h" +#include "Opcodes.h" void AddItemsSetItem(Player* player, Item* item) { diff --git a/src/server/game/Entities/Pet/Pet.cpp b/src/server/game/Entities/Pet/Pet.cpp index 45b6e452054..b6417681f4a 100755 --- a/src/server/game/Entities/Pet/Pet.cpp +++ b/src/server/game/Entities/Pet/Pet.cpp @@ -30,6 +30,7 @@ #include "Unit.h" #include "Util.h" #include "Group.h" +#include "Opcodes.h" #define PET_XP_FACTOR 0.05f diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index a95ce52c3f6..973eca27c56 100755 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -16653,6 +16653,11 @@ float Player::GetFloatValueFromArray(Tokenizer const& data, uint16 index) return result; } +bool Player::isBeingLoaded() const +{ + return GetSession()->PlayerLoading(); +} + bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder) { //// 0 1 2 3 4 5 6 7 8 9 10 11 @@ -18514,6 +18519,14 @@ bool Player::CheckInstanceLoginValid() return sMapMgr->CanPlayerEnter(GetMap()->GetId(), this, true); } +bool Player::CheckInstanceCount(uint32 instanceId) const +{ + if (_instanceResetTimes.size() < sWorld->getIntConfig(CONFIG_MAX_INSTANCES_PER_HOUR)) + return true; + return _instanceResetTimes.find(instanceId) != _instanceResetTimes.end(); +} + + bool Player::_LoadHomeBind(PreparedQueryResult result) { PlayerInfo const* info = sObjectMgr->GetPlayerInfo(getRace(), getClass()); diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h index 07c00031e6b..3ff70e76cec 100755 --- a/src/server/game/Entities/Player/Player.h +++ b/src/server/game/Entities/Player/Player.h @@ -26,20 +26,22 @@ #include "Item.h" #include "PetDefines.h" #include "QuestDef.h" -#include "Unit.h" #include "SpellMgr.h" +#include "Unit.h" #include #include +struct CreatureTemplate; struct Mail; +struct TrainerSpell; struct VendorItem; class AchievementMgr; class ReputationMgr; class Channel; +class CharacterCreateInfo; class Creature; -class CreatureTemplate; class DynamicObject; class Group; class Guild; @@ -48,7 +50,6 @@ class Pet; class PlayerMenu; class PlayerSocial; class SpellCastTargets; -class TrainerSpell; class UpdateMask; typedef std::deque PlayerMails; @@ -1490,7 +1491,7 @@ class Player : public Unit, public GridObject /*********************************************************/ bool LoadFromDB(uint32 guid, SQLQueryHolder *holder); - bool isBeingLoaded() const { return GetSession()->PlayerLoading();} + bool isBeingLoaded() const; void Initialize(uint32 guid); static uint32 GetUInt32ValueFromArray(Tokenizer const& data, uint16 index); @@ -2375,12 +2376,7 @@ class Player : public Unit, public GridObject static void ConvertInstancesToGroup(Player* player, Group* group, bool switchLeader); bool Satisfy(AccessRequirement const* ar, uint32 target_map, bool report = false); bool CheckInstanceLoginValid(); - bool CheckInstanceCount(uint32 instanceId) const - { - if (_instanceResetTimes.size() < sWorld->getIntConfig(CONFIG_MAX_INSTANCES_PER_HOUR)) - return true; - return _instanceResetTimes.find(instanceId) != _instanceResetTimes.end(); - } + bool CheckInstanceCount(uint32 instanceId) const; void AddInstanceEnterTime(uint32 instanceId, time_t enterTime) { diff --git a/src/server/game/Entities/Totem/Totem.cpp b/src/server/game/Entities/Totem/Totem.cpp index d5d1bd99277..4d726181c4f 100755 --- a/src/server/game/Entities/Totem/Totem.cpp +++ b/src/server/game/Entities/Totem/Totem.cpp @@ -17,13 +17,14 @@ */ #include "Totem.h" -#include "WorldPacket.h" #include "Log.h" #include "Group.h" -#include "Player.h" #include "ObjectMgr.h" +#include "Opcodes.h" +#include "Player.h" #include "SpellMgr.h" #include "SpellInfo.h" +#include "WorldPacket.h" Totem::Totem(SummonPropertiesEntry const* properties, Unit* owner) : Minion(properties, owner, false) { diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h index d3a87a1c44e..b6c0b0059b6 100755 --- a/src/server/game/Entities/Unit/Unit.h +++ b/src/server/game/Entities/Unit/Unit.h @@ -19,24 +19,14 @@ #ifndef __UNIT_H #define __UNIT_H -#include "Common.h" -#include "Object.h" -#include "Opcodes.h" -#include "SpellAuraDefines.h" -#include "UpdateFields.h" -#include "SharedDefines.h" -#include "ThreatManager.h" -#include "HostileRefManager.h" +#include "EventProcessor.h" #include "FollowerReference.h" #include "FollowerRefManager.h" -#include "EventProcessor.h" +#include "HostileRefManager.h" #include "MotionMaster.h" -#include "DBCStructure.h" -#include "SpellInfo.h" -#include "Path.h" -#include "WorldPacket.h" -#include "Timer.h" -#include +#include "Object.h" +#include "SpellAuraDefines.h" +#include "ThreatManager.h" #define WORLD_TRIGGER 12999 @@ -342,6 +332,7 @@ class Totem; class Transport; class Vehicle; class TransportBase; +class SpellCastTargets; typedef std::list UnitList; typedef std::list< std::pair > DispelChargesList; diff --git a/src/server/game/Globals/ObjectMgr.h b/src/server/game/Globals/ObjectMgr.h index c4d4299bbab..3dcab3df951 100755 --- a/src/server/game/Globals/ObjectMgr.h +++ b/src/server/game/Globals/ObjectMgr.h @@ -69,6 +69,41 @@ struct PageText #pragma pack(pop) #endif +// DB scripting commands +enum ScriptCommands +{ + SCRIPT_COMMAND_TALK = 0, // source/target = Creature, target = any, datalong = talk type (0=say, 1=whisper, 2=yell, 3=emote text, 4=boss emote text), datalong2 & 1 = player talk (instead of creature), dataint = string_id + SCRIPT_COMMAND_EMOTE = 1, // source/target = Creature, datalong = emote id, datalong2 = 0: set emote state; > 0: play emote state + SCRIPT_COMMAND_FIELD_SET = 2, // source/target = Creature, datalong = field id, datalog2 = value + SCRIPT_COMMAND_MOVE_TO = 3, // source/target = Creature, datalong2 = time to reach, x/y/z = destination + SCRIPT_COMMAND_FLAG_SET = 4, // source/target = Creature, datalong = field id, datalog2 = bitmask + SCRIPT_COMMAND_FLAG_REMOVE = 5, // source/target = Creature, datalong = field id, datalog2 = bitmask + SCRIPT_COMMAND_TELEPORT_TO = 6, // source/target = Creature/Player (see datalong2), datalong = map_id, datalong2 = 0: Player; 1: Creature, x/y/z = destination, o = orientation + SCRIPT_COMMAND_QUEST_EXPLORED = 7, // target/source = Player, target/source = GO/Creature, datalong = quest id, datalong2 = distance or 0 + SCRIPT_COMMAND_KILL_CREDIT = 8, // target/source = Player, datalong = creature entry, datalong2 = 0: personal credit, 1: group credit + SCRIPT_COMMAND_RESPAWN_GAMEOBJECT = 9, // source = WorldObject (summoner), datalong = GO guid, datalong2 = despawn delay + SCRIPT_COMMAND_TEMP_SUMMON_CREATURE = 10, // source = WorldObject (summoner), datalong = creature entry, datalong2 = despawn delay, x/y/z = summon position, o = orientation + SCRIPT_COMMAND_OPEN_DOOR = 11, // source = Unit, datalong = GO guid, datalong2 = reset delay (min 15) + SCRIPT_COMMAND_CLOSE_DOOR = 12, // source = Unit, datalong = GO guid, datalong2 = reset delay (min 15) + SCRIPT_COMMAND_ACTIVATE_OBJECT = 13, // source = Unit, target = GO + SCRIPT_COMMAND_REMOVE_AURA = 14, // source (datalong2 != 0) or target (datalong2 == 0) = Unit, datalong = spell id + SCRIPT_COMMAND_CAST_SPELL = 15, // source and/or target = Unit, datalong2 = cast direction (0: s->t 1: s->s 2: t->t 3: t->s 4: s->creature with dataint entry), dataint & 1 = triggered flag + SCRIPT_COMMAND_PLAY_SOUND = 16, // source = WorldObject, target = none/Player, datalong = sound id, datalong2 (bitmask: 0/1=anyone/player, 0/2=without/with distance dependency, so 1|2 = 3 is target with distance dependency) + SCRIPT_COMMAND_CREATE_ITEM = 17, // target/source = Player, datalong = item entry, datalong2 = amount + SCRIPT_COMMAND_DESPAWN_SELF = 18, // target/source = Creature, datalong = despawn delay + + SCRIPT_COMMAND_LOAD_PATH = 20, // source = Unit, datalong = path id, datalong2 = is repeatable + SCRIPT_COMMAND_CALLSCRIPT_TO_UNIT = 21, // source = WorldObject (if present used as a search center), datalong = script id, datalong2 = unit lowguid, dataint = script table to use (see ScriptsType) + SCRIPT_COMMAND_KILL = 22, // source/target = Creature, dataint = remove corpse attribute + + // TrinityCore only + SCRIPT_COMMAND_ORIENTATION = 30, // source = Unit, target (datalong > 0) = Unit, datalong = > 0 turn source to face target, o = orientation + SCRIPT_COMMAND_EQUIP = 31, // soucre = Creature, datalong = equipment id + SCRIPT_COMMAND_MODEL = 32, // source = Creature, datalong = model id + SCRIPT_COMMAND_CLOSE_GOSSIP = 33, // source = Player + SCRIPT_COMMAND_PLAYMOVIE = 34 // source = Player, datalong = movie id +}; + // Benchmarked: Faster than UNORDERED_MAP (insert/find) typedef std::map PageTextContainer; diff --git a/src/server/game/Grids/Notifiers/GridNotifiers.h b/src/server/game/Grids/Notifiers/GridNotifiers.h index db4dc819557..752c6ec068e 100755 --- a/src/server/game/Grids/Notifiers/GridNotifiers.h +++ b/src/server/game/Grids/Notifiers/GridNotifiers.h @@ -31,6 +31,7 @@ #include "Unit.h" #include "CreatureAI.h" #include "Spell.h" +#include "WorldSession.h" class Player; //class Map; diff --git a/src/server/game/Grids/Notifiers/GridNotifiersImpl.h b/src/server/game/Grids/Notifiers/GridNotifiersImpl.h index e3cda4dd76d..2d60678d4ff 100755 --- a/src/server/game/Grids/Notifiers/GridNotifiersImpl.h +++ b/src/server/game/Grids/Notifiers/GridNotifiersImpl.h @@ -26,6 +26,7 @@ #include "UpdateData.h" #include "CreatureAI.h" #include "SpellAuras.h" +#include "Opcodes.h" template inline void Trinity::VisibleNotifier::Visit(GridRefManager &m) diff --git a/src/server/game/Guilds/Guild.cpp b/src/server/game/Guilds/Guild.cpp index 5cb02603598..a03e94ff190 100755 --- a/src/server/game/Guilds/Guild.cpp +++ b/src/server/game/Guilds/Guild.cpp @@ -27,6 +27,7 @@ #include "Log.h" #include "ScriptMgr.h" #include "SocialMgr.h" +#include "Opcodes.h" #define MAX_GUILD_BANK_TAB_TEXT_LEN 500 #define EMBLEM_PRICE 10 * GOLD diff --git a/src/server/game/Handlers/ArenaTeamHandler.cpp b/src/server/game/Handlers/ArenaTeamHandler.cpp index d3738883d6d..b8592fd846e 100755 --- a/src/server/game/Handlers/ArenaTeamHandler.cpp +++ b/src/server/game/Handlers/ArenaTeamHandler.cpp @@ -27,6 +27,7 @@ #include "ObjectMgr.h" #include "SocialMgr.h" #include "ArenaTeamMgr.h" +#include "Opcodes.h" void WorldSession::HandleInspectArenaTeamsOpcode(WorldPacket & recvData) { diff --git a/src/server/game/Handlers/CombatHandler.cpp b/src/server/game/Handlers/CombatHandler.cpp index 391a6fc0831..d30164b2592 100755 --- a/src/server/game/Handlers/CombatHandler.cpp +++ b/src/server/game/Handlers/CombatHandler.cpp @@ -26,6 +26,7 @@ #include "Vehicle.h" #include "VehicleDefines.h" #include "Player.h" +#include "Opcodes.h" void WorldSession::HandleAttackSwingOpcode(WorldPacket& recvData) { diff --git a/src/server/game/Handlers/LFGHandler.cpp b/src/server/game/Handlers/LFGHandler.cpp index 9926c75eb2a..92d70c8a19f 100755 --- a/src/server/game/Handlers/LFGHandler.cpp +++ b/src/server/game/Handlers/LFGHandler.cpp @@ -23,6 +23,7 @@ #include "LFGMgr.h" #include "ObjectMgr.h" #include "GroupMgr.h" +#include "Opcodes.h" void BuildPlayerLockDungeonBlock(WorldPacket& data, const LfgLockMap& lock) { diff --git a/src/server/game/Handlers/LootHandler.cpp b/src/server/game/Handlers/LootHandler.cpp index 635afd55a87..1c9719a210f 100755 --- a/src/server/game/Handlers/LootHandler.cpp +++ b/src/server/game/Handlers/LootHandler.cpp @@ -17,18 +17,19 @@ */ #include "Common.h" -#include "WorldPacket.h" #include "Log.h" #include "Corpse.h" +#include "Creature.h" #include "GameObject.h" -#include "Player.h" -#include "ObjectAccessor.h" -#include "WorldSession.h" +#include "Group.h" #include "LootMgr.h" +#include "ObjectAccessor.h" #include "Object.h" -#include "Group.h" +#include "Opcodes.h" +#include "Player.h" #include "World.h" -#include "Creature.h" +#include "WorldPacket.h" +#include "WorldSession.h" void WorldSession::HandleAutostoreLootItemOpcode(WorldPacket & recvData) { diff --git a/src/server/game/Handlers/TicketHandler.cpp b/src/server/game/Handlers/TicketHandler.cpp index 41e834d84e8..1571d857f41 100755 --- a/src/server/game/Handlers/TicketHandler.cpp +++ b/src/server/game/Handlers/TicketHandler.cpp @@ -17,15 +17,16 @@ */ #include "zlib.h" -#include "Language.h" -#include "WorldPacket.h" #include "Common.h" +#include "Language.h" #include "ObjectMgr.h" -#include "TicketMgr.h" +#include "Opcodes.h" #include "Player.h" +#include "TicketMgr.h" +#include "Util.h" #include "World.h" +#include "WorldPacket.h" #include "WorldSession.h" -#include "Util.h" void WorldSession::HandleGMTicketCreateOpcode(WorldPacket& recvData) { diff --git a/src/server/game/Instances/InstanceScript.cpp b/src/server/game/Instances/InstanceScript.cpp index a2628fbb265..a370cf25d97 100755 --- a/src/server/game/Instances/InstanceScript.cpp +++ b/src/server/game/Instances/InstanceScript.cpp @@ -26,6 +26,8 @@ #include "Map.h" #include "Player.h" #include "Pet.h" +#include "WorldSession.h" +#include "Opcodes.h" void InstanceScript::SaveToDB() { diff --git a/src/server/game/Maps/MapManager.cpp b/src/server/game/Maps/MapManager.cpp index c1df52c51be..96a2a44655d 100755 --- a/src/server/game/Maps/MapManager.cpp +++ b/src/server/game/Maps/MapManager.cpp @@ -34,6 +34,8 @@ #include "WorldPacket.h" #include "Group.h" #include "Player.h" +#include "WorldSession.h" +#include "Opcodes.h" extern GridState* si_GridStates[]; // debugging code, should be deleted some day diff --git a/src/server/game/Miscellaneous/SharedDefines.h b/src/server/game/Miscellaneous/SharedDefines.h index 810419bc2ea..8fa6adaf525 100755 --- a/src/server/game/Miscellaneous/SharedDefines.h +++ b/src/server/game/Miscellaneous/SharedDefines.h @@ -3497,4 +3497,37 @@ enum DungeonStatusFlag RAID_STATUSFLAG_25MAN_HEROIC = 0x08 }; +enum PartyResult +{ + ERR_PARTY_RESULT_OK = 0, + ERR_BAD_PLAYER_NAME_S = 1, + ERR_TARGET_NOT_IN_GROUP_S = 2, + ERR_TARGET_NOT_IN_INSTANCE_S = 3, + ERR_GROUP_FULL = 4, + ERR_ALREADY_IN_GROUP_S = 5, + ERR_NOT_IN_GROUP = 6, + ERR_NOT_LEADER = 7, + ERR_PLAYER_WRONG_FACTION = 8, + ERR_IGNORING_YOU_S = 9, + ERR_LFG_PENDING = 12, + ERR_INVITE_RESTRICTED = 13, + ERR_GROUP_SWAP_FAILED = 14, // if (PartyOperation == PARTY_OP_SWAP) ERR_GROUP_SWAP_FAILED else ERR_INVITE_IN_COMBAT + ERR_INVITE_UNKNOWN_REALM = 15, + ERR_INVITE_NO_PARTY_SERVER = 16, + ERR_INVITE_PARTY_BUSY = 17, + ERR_PARTY_TARGET_AMBIGUOUS = 18, + ERR_PARTY_LFG_INVITE_RAID_LOCKED = 19, + ERR_PARTY_LFG_BOOT_LIMIT = 20, + ERR_PARTY_LFG_BOOT_COOLDOWN_S = 21, + ERR_PARTY_LFG_BOOT_IN_PROGRESS = 22, + ERR_PARTY_LFG_BOOT_TOO_FEW_PLAYERS = 23, + ERR_PARTY_LFG_BOOT_NOT_ELIGIBLE_S = 24, + ERR_RAID_DISALLOWED_BY_LEVEL = 25, + ERR_PARTY_LFG_BOOT_IN_COMBAT = 26, + ERR_VOTE_KICK_REASON_NEEDED = 27, + ERR_PARTY_LFG_BOOT_DUNGEON_COMPLETE = 28, + ERR_PARTY_LFG_BOOT_LOOT_ROLLS = 29, + ERR_PARTY_LFG_TELEPORT_IN_COMBAT = 30 +}; + #endif diff --git a/src/server/game/Movement/Spline/MoveSplineInit.cpp b/src/server/game/Movement/Spline/MoveSplineInit.cpp index 7d533593878..df0b3e3944f 100644 --- a/src/server/game/Movement/Spline/MoveSplineInit.cpp +++ b/src/server/game/Movement/Spline/MoveSplineInit.cpp @@ -22,6 +22,8 @@ #include "Unit.h" #include "Transport.h" #include "Vehicle.h" +#include "WorldPacket.h" +#include "Opcodes.h" namespace Movement { diff --git a/src/server/game/Reputation/ReputationMgr.cpp b/src/server/game/Reputation/ReputationMgr.cpp index 356a70ba6a5..3a8dc7c5e63 100755 --- a/src/server/game/Reputation/ReputationMgr.cpp +++ b/src/server/game/Reputation/ReputationMgr.cpp @@ -24,6 +24,7 @@ #include "World.h" #include "ObjectMgr.h" #include "ScriptMgr.h" +#include "Opcodes.h" const int32 ReputationMgr::PointsInRank[MAX_REPUTATION_RANK] = {36000, 3000, 3000, 3000, 6000, 12000, 21000, 1000}; diff --git a/src/server/game/Scripting/ScriptMgr.cpp b/src/server/game/Scripting/ScriptMgr.cpp index ac745eb1b5f..6682d3c11e3 100755 --- a/src/server/game/Scripting/ScriptMgr.cpp +++ b/src/server/game/Scripting/ScriptMgr.cpp @@ -31,6 +31,7 @@ #include "GossipDef.h" #include "CreatureAI.h" #include "Player.h" +#include "WorldPacket.h" // This is the global static registry of scripts. template diff --git a/src/server/game/Server/WorldSession.h b/src/server/game/Server/WorldSession.h index 2060ab54cba..a442bb45a69 100755 --- a/src/server/game/Server/WorldSession.h +++ b/src/server/game/Server/WorldSession.h @@ -91,40 +91,6 @@ enum PartyOperation PARTY_OP_SWAP = 4 }; -enum PartyResult -{ - ERR_PARTY_RESULT_OK = 0, - ERR_BAD_PLAYER_NAME_S = 1, - ERR_TARGET_NOT_IN_GROUP_S = 2, - ERR_TARGET_NOT_IN_INSTANCE_S = 3, - ERR_GROUP_FULL = 4, - ERR_ALREADY_IN_GROUP_S = 5, - ERR_NOT_IN_GROUP = 6, - ERR_NOT_LEADER = 7, - ERR_PLAYER_WRONG_FACTION = 8, - ERR_IGNORING_YOU_S = 9, - ERR_LFG_PENDING = 12, - ERR_INVITE_RESTRICTED = 13, - ERR_GROUP_SWAP_FAILED = 14, // if (PartyOperation == PARTY_OP_SWAP) ERR_GROUP_SWAP_FAILED else ERR_INVITE_IN_COMBAT - ERR_INVITE_UNKNOWN_REALM = 15, - ERR_INVITE_NO_PARTY_SERVER = 16, - ERR_INVITE_PARTY_BUSY = 17, - ERR_PARTY_TARGET_AMBIGUOUS = 18, - ERR_PARTY_LFG_INVITE_RAID_LOCKED = 19, - ERR_PARTY_LFG_BOOT_LIMIT = 20, - ERR_PARTY_LFG_BOOT_COOLDOWN_S = 21, - ERR_PARTY_LFG_BOOT_IN_PROGRESS = 22, - ERR_PARTY_LFG_BOOT_TOO_FEW_PLAYERS = 23, - ERR_PARTY_LFG_BOOT_NOT_ELIGIBLE_S = 24, - ERR_RAID_DISALLOWED_BY_LEVEL = 25, - ERR_PARTY_LFG_BOOT_IN_COMBAT = 26, - ERR_VOTE_KICK_REASON_NEEDED = 27, - ERR_PARTY_LFG_BOOT_DUNGEON_COMPLETE = 28, - ERR_PARTY_LFG_BOOT_LOOT_ROLLS = 29, - ERR_PARTY_LFG_TELEPORT_IN_COMBAT = 30 -}; - - enum BFLeaveReason { BF_LEAVE_REASON_CLOSE = 0x00000001, diff --git a/src/server/game/Texts/CreatureTextMgr.h b/src/server/game/Texts/CreatureTextMgr.h index a86a1059e7d..df6dd7fe4f3 100755 --- a/src/server/game/Texts/CreatureTextMgr.h +++ b/src/server/game/Texts/CreatureTextMgr.h @@ -22,6 +22,7 @@ #include "GridNotifiers.h" #include "ObjectAccessor.h" #include "SharedDefines.h" +#include "Opcodes.h" struct CreatureTextEntry { diff --git a/src/server/game/Tickets/TicketMgr.cpp b/src/server/game/Tickets/TicketMgr.cpp index 3003221b650..3f0e608ec14 100755 --- a/src/server/game/Tickets/TicketMgr.cpp +++ b/src/server/game/Tickets/TicketMgr.cpp @@ -26,6 +26,7 @@ #include "Chat.h" #include "World.h" #include "Player.h" +#include "Opcodes.h" inline float GetAge(uint64 t) { return float(time(NULL) - t) / DAY; } diff --git a/src/server/game/Tools/PlayerDump.cpp b/src/server/game/Tools/PlayerDump.cpp index ec7d2e08001..57986243879 100644 --- a/src/server/game/Tools/PlayerDump.cpp +++ b/src/server/game/Tools/PlayerDump.cpp @@ -22,6 +22,7 @@ #include "UpdateFields.h" #include "ObjectMgr.h" #include "AccountMgr.h" +#include "World.h" #define DUMP_TABLE_COUNT 27 struct DumpTable diff --git a/src/server/game/Weather/Weather.cpp b/src/server/game/Weather/Weather.cpp index 896e7161606..e119ebf5f2e 100755 --- a/src/server/game/Weather/Weather.cpp +++ b/src/server/game/Weather/Weather.cpp @@ -28,6 +28,7 @@ #include "ObjectMgr.h" #include "Util.h" #include "ScriptMgr.h" +#include "Opcodes.h" /// Create the Weather object Weather::Weather(uint32 zone, WeatherData const* weatherChances) diff --git a/src/server/game/Weather/WeatherMgr.cpp b/src/server/game/Weather/WeatherMgr.cpp index 3371691fa41..c96ec1742cf 100755 --- a/src/server/game/Weather/WeatherMgr.cpp +++ b/src/server/game/Weather/WeatherMgr.cpp @@ -26,6 +26,8 @@ #include "ObjectMgr.h" #include "AutoPtr.h" #include "Player.h" +#include "WorldPacket.h" +#include "Opcodes.h" namespace WeatherMgr { diff --git a/src/server/game/World/World.h b/src/server/game/World/World.h index ee4bfdfd208..40ef0d7a8e5 100755 --- a/src/server/game/World/World.h +++ b/src/server/game/World/World.h @@ -474,41 +474,6 @@ enum WorldStates WS_GUILD_DAILY_RESET_TIME = 20006, // Next guild cap reset time }; -// DB scripting commands -enum ScriptCommands -{ - SCRIPT_COMMAND_TALK = 0, // source/target = Creature, target = any, datalong = talk type (0=say, 1=whisper, 2=yell, 3=emote text, 4=boss emote text), datalong2 & 1 = player talk (instead of creature), dataint = string_id - SCRIPT_COMMAND_EMOTE = 1, // source/target = Creature, datalong = emote id, datalong2 = 0: set emote state; > 0: play emote state - SCRIPT_COMMAND_FIELD_SET = 2, // source/target = Creature, datalong = field id, datalog2 = value - SCRIPT_COMMAND_MOVE_TO = 3, // source/target = Creature, datalong2 = time to reach, x/y/z = destination - SCRIPT_COMMAND_FLAG_SET = 4, // source/target = Creature, datalong = field id, datalog2 = bitmask - SCRIPT_COMMAND_FLAG_REMOVE = 5, // source/target = Creature, datalong = field id, datalog2 = bitmask - SCRIPT_COMMAND_TELEPORT_TO = 6, // source/target = Creature/Player (see datalong2), datalong = map_id, datalong2 = 0: Player; 1: Creature, x/y/z = destination, o = orientation - SCRIPT_COMMAND_QUEST_EXPLORED = 7, // target/source = Player, target/source = GO/Creature, datalong = quest id, datalong2 = distance or 0 - SCRIPT_COMMAND_KILL_CREDIT = 8, // target/source = Player, datalong = creature entry, datalong2 = 0: personal credit, 1: group credit - SCRIPT_COMMAND_RESPAWN_GAMEOBJECT = 9, // source = WorldObject (summoner), datalong = GO guid, datalong2 = despawn delay - SCRIPT_COMMAND_TEMP_SUMMON_CREATURE = 10, // source = WorldObject (summoner), datalong = creature entry, datalong2 = despawn delay, x/y/z = summon position, o = orientation - SCRIPT_COMMAND_OPEN_DOOR = 11, // source = Unit, datalong = GO guid, datalong2 = reset delay (min 15) - SCRIPT_COMMAND_CLOSE_DOOR = 12, // source = Unit, datalong = GO guid, datalong2 = reset delay (min 15) - SCRIPT_COMMAND_ACTIVATE_OBJECT = 13, // source = Unit, target = GO - SCRIPT_COMMAND_REMOVE_AURA = 14, // source (datalong2 != 0) or target (datalong2 == 0) = Unit, datalong = spell id - SCRIPT_COMMAND_CAST_SPELL = 15, // source and/or target = Unit, datalong2 = cast direction (0: s->t 1: s->s 2: t->t 3: t->s 4: s->creature with dataint entry), dataint & 1 = triggered flag - SCRIPT_COMMAND_PLAY_SOUND = 16, // source = WorldObject, target = none/Player, datalong = sound id, datalong2 (bitmask: 0/1=anyone/player, 0/2=without/with distance dependency, so 1|2 = 3 is target with distance dependency) - SCRIPT_COMMAND_CREATE_ITEM = 17, // target/source = Player, datalong = item entry, datalong2 = amount - SCRIPT_COMMAND_DESPAWN_SELF = 18, // target/source = Creature, datalong = despawn delay - - SCRIPT_COMMAND_LOAD_PATH = 20, // source = Unit, datalong = path id, datalong2 = is repeatable - SCRIPT_COMMAND_CALLSCRIPT_TO_UNIT = 21, // source = WorldObject (if present used as a search center), datalong = script id, datalong2 = unit lowguid, dataint = script table to use (see ScriptsType) - SCRIPT_COMMAND_KILL = 22, // source/target = Creature, dataint = remove corpse attribute - - // TrinityCore only - SCRIPT_COMMAND_ORIENTATION = 30, // source = Unit, target (datalong > 0) = Unit, datalong = > 0 turn source to face target, o = orientation - SCRIPT_COMMAND_EQUIP = 31, // soucre = Creature, datalong = equipment id - SCRIPT_COMMAND_MODEL = 32, // source = Creature, datalong = model id - SCRIPT_COMMAND_CLOSE_GOSSIP = 33, // source = Player - SCRIPT_COMMAND_PLAYMOVIE = 34 // source = Player, datalong = movie id -}; - /// Storage class for commands issued for delayed execution struct CliCommandHolder { diff --git a/src/server/scripts/Commands/cs_gm.cpp b/src/server/scripts/Commands/cs_gm.cpp index 0c24a9d8746..b46f99eaa8f 100644 --- a/src/server/scripts/Commands/cs_gm.cpp +++ b/src/server/scripts/Commands/cs_gm.cpp @@ -29,6 +29,7 @@ EndScriptData */ #include "Language.h" #include "World.h" #include "Player.h" +#include "Opcodes.h" class gm_commandscript : public CommandScript { diff --git a/src/server/scripts/Commands/cs_gobject.cpp b/src/server/scripts/Commands/cs_gobject.cpp index 5a24df4ee66..c9f07c90259 100644 --- a/src/server/scripts/Commands/cs_gobject.cpp +++ b/src/server/scripts/Commands/cs_gobject.cpp @@ -30,6 +30,7 @@ EndScriptData */ #include "Chat.h" #include "Language.h" #include "Player.h" +#include "Opcodes.h" class gobject_commandscript : public CommandScript { diff --git a/src/server/scripts/Commands/cs_lookup.cpp b/src/server/scripts/Commands/cs_lookup.cpp index e7e86fedef0..c265cd1faa5 100644 --- a/src/server/scripts/Commands/cs_lookup.cpp +++ b/src/server/scripts/Commands/cs_lookup.cpp @@ -30,6 +30,7 @@ EndScriptData */ #include "Player.h" #include "ReputationMgr.h" #include "ScriptMgr.h" +#include "SpellInfo.h" class lookup_commandscript : public CommandScript { diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp index 8a5af6c0df3..5e54778b14a 100644 --- a/src/server/scripts/Commands/cs_misc.cpp +++ b/src/server/scripts/Commands/cs_misc.cpp @@ -26,6 +26,7 @@ #include "Language.h" #include "MovementGenerator.h" #include "ObjectAccessor.h" +#include "Opcodes.h" #include "SpellAuras.h" #include "TargetedMovementGenerator.h" #include "WeatherMgr.h" diff --git a/src/server/scripts/Commands/cs_modify.cpp b/src/server/scripts/Commands/cs_modify.cpp index 23a1d90368f..16599e5d892 100644 --- a/src/server/scripts/Commands/cs_modify.cpp +++ b/src/server/scripts/Commands/cs_modify.cpp @@ -24,11 +24,13 @@ EndScriptData */ #include "Chat.h" #include "ObjectMgr.h" +#include "Opcodes.h" #include "Pet.h" #include "Player.h" #include "ReputationMgr.h" #include "ScriptMgr.h" + class modify_commandscript : public CommandScript { public: diff --git a/src/server/scripts/Commands/cs_ticket.cpp b/src/server/scripts/Commands/cs_ticket.cpp index c0b3809c836..c2c5a0909d6 100644 --- a/src/server/scripts/Commands/cs_ticket.cpp +++ b/src/server/scripts/Commands/cs_ticket.cpp @@ -26,6 +26,7 @@ EndScriptData */ #include "Chat.h" #include "Language.h" #include "ObjectMgr.h" +#include "Opcodes.h" #include "Player.h" #include "TicketMgr.h" #include "ScriptMgr.h" diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp index 5c65531c615..b5283900eb0 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp @@ -21,6 +21,7 @@ #include "ScriptedGossip.h" #include "blackrock_depths.h" #include "Player.h" +#include "WorldSession.h" //go_shadowforge_brazier class go_shadowforge_brazier : public GameObjectScript diff --git a/src/server/scripts/EasternKingdoms/Deadmines/deadmines.cpp b/src/server/scripts/EasternKingdoms/Deadmines/deadmines.cpp index ae9071f3fd0..5ce55307675 100644 --- a/src/server/scripts/EasternKingdoms/Deadmines/deadmines.cpp +++ b/src/server/scripts/EasternKingdoms/Deadmines/deadmines.cpp @@ -28,6 +28,7 @@ EndScriptData */ #include "deadmines.h" #include "Spell.h" #include "Player.h" +#include "WorldSession.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 8ee4ab0f594..1b2beb11351 100644 --- a/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp +++ b/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp @@ -27,6 +27,8 @@ EndScriptData */ #include "InstanceScript.h" #include "deadmines.h" #include "TemporarySummon.h" +#include "WorldPacket.h" +#include "Opcodes.h" enum Sounds { diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp index 7eeced1d970..580acf2c489 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp @@ -25,6 +25,7 @@ EndScriptData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" +#include "SpellInfo.h" #define SAY_MIDNIGHT_KILL -1532000 #define SAY_APPEAR1 -1532001 diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp index d1c4790d705..242940bd5e7 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp @@ -26,6 +26,7 @@ EndScriptData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "karazhan.h" +#include "SpellInfo.h" #define SAY_AGGRO -1532091 #define SAY_AXE_TOSS1 -1532092 diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp index 25fafdfcd0d..8eecc5618ee 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp @@ -27,6 +27,7 @@ EndScriptData */ #include "ScriptedCreature.h" #include "karazhan.h" #include "GameObject.h" +#include "SpellInfo.h" #define SAY_AGGRO1 -1532073 #define SAY_AGGRO2 -1532074 diff --git a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp index 2c1d4ac0e71..cd1a803e478 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp @@ -28,6 +28,7 @@ EndScriptData */ #include "ScriptedGossip.h" #include "karazhan.h" #include "Player.h" +#include "SpellInfo.h" /***********************************/ /*** OPERA WIZARD OF OZ EVENT *****/ diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp index 047809286f7..eec520f04e2 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp @@ -27,6 +27,7 @@ EndScriptData */ #include "ScriptedCreature.h" #include "magisters_terrace.h" #include "WorldPacket.h" +#include "Opcodes.h" #define SAY_AGGRO -1585023 //This yell should be done when the room is cleared. For now, set it as a movelineofsight yell. #define SAY_PHOENIX -1585024 diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.cpp index 37b2dd18afe..5925be5f415 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.cpp @@ -31,6 +31,7 @@ EndContentData */ #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "Player.h" +#include "SpellInfo.h" /*###### ## npc_kalecgos diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp index eb695e984cb..0cb2bd7f7bc 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp @@ -24,6 +24,7 @@ #include "CombatAI.h" #include "PassiveAI.h" #include "Player.h" +#include "SpellInfo.h" /*###### ##Quest 12848 diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp index 51581b53e5f..7a6e9aab31d 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp @@ -19,6 +19,7 @@ #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" #include "Player.h" +#include "SpellInfo.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/ScarletMonastery/boss_headless_horseman.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp index fc2e53aedfb..fe67245b7a9 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp @@ -29,6 +29,7 @@ EndScriptData */ #include "scarlet_monastery.h" #include "LFGMgr.h" #include "Player.h" +#include "SpellInfo.h" //this texts are already used by 3975 and 3976 enum Says diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp index 0aad2857a45..4b3c8f2160e 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp @@ -26,6 +26,7 @@ EndScriptData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "scarlet_monastery.h" +#include "SpellInfo.h" enum Says { diff --git a/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp b/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp index 188739a934d..467b532163b 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp @@ -35,6 +35,7 @@ EndContentData */ #include "stratholme.h" #include "Group.h" #include "Player.h" +#include "SpellInfo.h" /*###### ## go_gauntlet_gate (this is the _first_ of the gauntlet gates, two exist) diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp index 34548ec9116..95dde4f0ada 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp @@ -24,6 +24,7 @@ EndScriptData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "sunwell_plateau.h" +#include "SpellInfo.h" enum Quotes { diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp index 53696fbed7a..1239ca88d03 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp @@ -27,6 +27,7 @@ EndScriptData */ #include "ScriptedCreature.h" #include "sunwell_plateau.h" #include "Player.h" +#include "WorldSession.h" enum Yells { diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp index 6ce1bf7a414..d23ca834f86 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp @@ -25,6 +25,7 @@ SDComment: all sounds, black hole effect triggers to often (46228) #include "ScriptedCreature.h" #include "sunwell_plateau.h" #include "Player.h" +#include "SpellInfo.h" // Muru & Entropius's spells enum Spells diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp index a8afd19cd96..f7f279cf716 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp @@ -26,7 +26,7 @@ EndScriptData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "zulaman.h" -//#include "spell.h" +#include "SpellInfo.h" #define YELL_AGGRO "Get on your knees and bow to da fang and claw!" #define SOUND_AGGRO 12020 diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp index 8fb3dd55077..5aa74fbbe89 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp @@ -25,6 +25,7 @@ EndScriptData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "zulaman.h" +#include "SpellInfo.h" //Speech const char* YELL_TRANSFORM_TO_LYNX = "Let me introduce to you my new bruddahs: fang and claw!"; diff --git a/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp b/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp index c692e18e6ca..7273ca99c7c 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp @@ -27,6 +27,7 @@ EndScriptData */ #include "InstanceScript.h" #include "zulaman.h" #include "Player.h" +#include "TemporarySummon.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 2c9b838a2ed..61c7bda00ac 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp @@ -32,6 +32,7 @@ EndContentData */ #include "ScriptedGossip.h" #include "zulaman.h" #include "Player.h" +#include "SpellInfo.h" /*###### ## npc_forest_frog diff --git a/src/server/scripts/EasternKingdoms/eastern_plaguelands.cpp b/src/server/scripts/EasternKingdoms/eastern_plaguelands.cpp index c5dcbaba01d..c9b60f847e8 100644 --- a/src/server/scripts/EasternKingdoms/eastern_plaguelands.cpp +++ b/src/server/scripts/EasternKingdoms/eastern_plaguelands.cpp @@ -34,6 +34,7 @@ EndContentData */ #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "Player.h" +#include "WorldSession.h" class mobs_ghoul_flayer : public CreatureScript { diff --git a/src/server/scripts/EasternKingdoms/ghostlands.cpp b/src/server/scripts/EasternKingdoms/ghostlands.cpp index 6a7544b5393..5d97735ab5d 100644 --- a/src/server/scripts/EasternKingdoms/ghostlands.cpp +++ b/src/server/scripts/EasternKingdoms/ghostlands.cpp @@ -35,6 +35,7 @@ EndContentData */ #include "ScriptedGossip.h" #include "ScriptedEscortAI.h" #include "Player.h" +#include "WorldSession.h" /*###### ## npc_budd_nedreck diff --git a/src/server/scripts/EasternKingdoms/isle_of_queldanas.cpp b/src/server/scripts/EasternKingdoms/isle_of_queldanas.cpp index ca5385caffe..c3a725f2f45 100644 --- a/src/server/scripts/EasternKingdoms/isle_of_queldanas.cpp +++ b/src/server/scripts/EasternKingdoms/isle_of_queldanas.cpp @@ -31,6 +31,8 @@ EndContentData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "Player.h" +#include "Pet.h" +#include "SpellInfo.h" /*###### ## npc_converted_sentry diff --git a/src/server/scripts/EasternKingdoms/silvermoon_city.cpp b/src/server/scripts/EasternKingdoms/silvermoon_city.cpp index e56a1e72294..28af25d39de 100644 --- a/src/server/scripts/EasternKingdoms/silvermoon_city.cpp +++ b/src/server/scripts/EasternKingdoms/silvermoon_city.cpp @@ -30,6 +30,7 @@ EndContentData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "Player.h" +#include "SpellInfo.h" /*####### # npc_blood_knight_stillblade diff --git a/src/server/scripts/EasternKingdoms/stranglethorn_vale.cpp b/src/server/scripts/EasternKingdoms/stranglethorn_vale.cpp index 26e0dffb5af..2217eba7d1b 100644 --- a/src/server/scripts/EasternKingdoms/stranglethorn_vale.cpp +++ b/src/server/scripts/EasternKingdoms/stranglethorn_vale.cpp @@ -30,6 +30,7 @@ EndContentData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "Player.h" +#include "SpellInfo.h" /*###### ## mob_yenniku diff --git a/src/server/scripts/EasternKingdoms/western_plaguelands.cpp b/src/server/scripts/EasternKingdoms/western_plaguelands.cpp index 285e5bb4e17..1c2f2624b34 100644 --- a/src/server/scripts/EasternKingdoms/western_plaguelands.cpp +++ b/src/server/scripts/EasternKingdoms/western_plaguelands.cpp @@ -35,6 +35,7 @@ EndContentData */ #include "ScriptedGossip.h" #include "ScriptedEscortAI.h" #include "Player.h" +#include "WorldSession.h" /*###### ## npcs_dithers_and_arbington diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp index 1fe3ac60260..df180bf5568 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp @@ -28,6 +28,8 @@ EndScriptData */ #include "ScriptedCreature.h" #include "hyjal_trash.h" #include "Player.h" +#include "WorldPacket.h" +#include "Opcodes.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 22ae808e348..365c5dd7300 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp @@ -22,6 +22,7 @@ #include "ScriptedEscortAI.h" #include "PassiveAI.h" #include "Player.h" +#include "SpellInfo.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 0ec7d1bdd25..0467109effc 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 @@ -20,6 +20,8 @@ #include "CreatureTextMgr.h" #include "culling_of_stratholme.h" #include "Player.h" +#include "TemporarySummon.h" +#include "SpellInfo.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 8fa6c239858..8ca14d72b94 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.cpp @@ -34,6 +34,7 @@ EndContentData */ #include "ScriptedGossip.h" #include "dark_portal.h" #include "Player.h" +#include "SpellInfo.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 879b0ed4aee..b7820bae920 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/instance_dark_portal.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/instance_dark_portal.cpp @@ -27,6 +27,8 @@ EndScriptData */ #include "InstanceScript.h" #include "dark_portal.h" #include "Player.h" +#include "TemporarySummon.h" +#include "SpellInfo.h" #define MAX_ENCOUNTER 2 diff --git a/src/server/scripts/Kalimdor/OnyxiasLair/instance_onyxias_lair.cpp b/src/server/scripts/Kalimdor/OnyxiasLair/instance_onyxias_lair.cpp index 22ec68eba5e..adcec659fa3 100644 --- a/src/server/scripts/Kalimdor/OnyxiasLair/instance_onyxias_lair.cpp +++ b/src/server/scripts/Kalimdor/OnyxiasLair/instance_onyxias_lair.cpp @@ -29,6 +29,7 @@ EndScriptData */ #include "GridNotifiers.h" #include "GridNotifiersImpl.h" #include "onyxias_lair.h" +#include "TemporarySummon.h" class instance_onyxias_lair : public InstanceMapScript { diff --git a/src/server/scripts/Kalimdor/RazorfenDowns/instance_razorfen_downs.cpp b/src/server/scripts/Kalimdor/RazorfenDowns/instance_razorfen_downs.cpp index 3acf9bc7029..f7161638909 100644 --- a/src/server/scripts/Kalimdor/RazorfenDowns/instance_razorfen_downs.cpp +++ b/src/server/scripts/Kalimdor/RazorfenDowns/instance_razorfen_downs.cpp @@ -19,6 +19,7 @@ #include "InstanceScript.h" #include "razorfen_downs.h" #include "Player.h" +#include "TemporarySummon.h" #define MAX_ENCOUNTER 1 diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ossirian.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ossirian.cpp index c43d46c4789..2bbdaa389ad 100644 --- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ossirian.cpp +++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ossirian.cpp @@ -19,6 +19,9 @@ #include "ScriptedCreature.h" #include "ruins_of_ahnqiraj.h" #include "Player.h" +#include "SpellInfo.h" +#include "WorldPacket.h" +#include "Opcodes.h" enum Texts { diff --git a/src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp b/src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp index 2706b638573..4cdddb2d9da 100644 --- a/src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp +++ b/src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp @@ -19,6 +19,7 @@ #include "InstanceScript.h" #include "zulfarrak.h" #include "Player.h" +#include "TemporarySummon.h" #define NPC_GAHZRILLA 7273 #define PATH_ADDS 81553 diff --git a/src/server/scripts/Kalimdor/azshara.cpp b/src/server/scripts/Kalimdor/azshara.cpp index cf4bb38d559..c8eb5daef68 100644 --- a/src/server/scripts/Kalimdor/azshara.cpp +++ b/src/server/scripts/Kalimdor/azshara.cpp @@ -34,6 +34,8 @@ EndContentData */ #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "Player.h" +#include "SpellInfo.h" +#include "WorldSession.h" /*###### ## mobs_spitelashes diff --git a/src/server/scripts/Kalimdor/darkshore.cpp b/src/server/scripts/Kalimdor/darkshore.cpp index 4b8329cfaa6..5d10076c114 100644 --- a/src/server/scripts/Kalimdor/darkshore.cpp +++ b/src/server/scripts/Kalimdor/darkshore.cpp @@ -35,6 +35,7 @@ EndContentData */ #include "ScriptedEscortAI.h" #include "ScriptedFollowerAI.h" #include "Player.h" +#include "SpellInfo.h" /*#### # npc_kerlonian diff --git a/src/server/scripts/Kalimdor/desolace.cpp b/src/server/scripts/Kalimdor/desolace.cpp index d34c72226b2..30a87ef0197 100644 --- a/src/server/scripts/Kalimdor/desolace.cpp +++ b/src/server/scripts/Kalimdor/desolace.cpp @@ -35,6 +35,7 @@ EndContentData */ #include "ScriptedGossip.h" #include "ScriptedEscortAI.h" #include "Player.h" +#include "SpellInfo.h" enum DyingKodo { diff --git a/src/server/scripts/Kalimdor/dustwallow_marsh.cpp b/src/server/scripts/Kalimdor/dustwallow_marsh.cpp index ef7a5a1d8f3..6ab9b653c5d 100644 --- a/src/server/scripts/Kalimdor/dustwallow_marsh.cpp +++ b/src/server/scripts/Kalimdor/dustwallow_marsh.cpp @@ -37,6 +37,7 @@ EndContentData */ #include "ScriptedGossip.h" #include "SpellScript.h" #include "Player.h" +#include "WorldSession.h" /*###### ## mobs_risen_husk_spirit diff --git a/src/server/scripts/Kalimdor/feralas.cpp b/src/server/scripts/Kalimdor/feralas.cpp index db2a125bc71..df4345b3aae 100644 --- a/src/server/scripts/Kalimdor/feralas.cpp +++ b/src/server/scripts/Kalimdor/feralas.cpp @@ -29,6 +29,7 @@ EndScriptData */ #include "ScriptedGossip.h" #include "SpellScript.h" #include "Player.h" +#include "WorldSession.h" /*###### ## npc_gregan_brewspewer diff --git a/src/server/scripts/Kalimdor/moonglade.cpp b/src/server/scripts/Kalimdor/moonglade.cpp index 8a24828bcc3..6d93e074e79 100644 --- a/src/server/scripts/Kalimdor/moonglade.cpp +++ b/src/server/scripts/Kalimdor/moonglade.cpp @@ -36,6 +36,7 @@ EndContentData */ #include "ScriptedEscortAI.h" #include "ScriptedGossip.h" #include "Player.h" +#include "SpellInfo.h" /*###### ## npc_bunthen_plainswind diff --git a/src/server/scripts/Kalimdor/mulgore.cpp b/src/server/scripts/Kalimdor/mulgore.cpp index 0aa1f55fa32..8ed26b8cf38 100644 --- a/src/server/scripts/Kalimdor/mulgore.cpp +++ b/src/server/scripts/Kalimdor/mulgore.cpp @@ -33,6 +33,7 @@ EndContentData */ #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "Player.h" +#include "SpellInfo.h" /*###### # npc_skorn_whitecloud diff --git a/src/server/scripts/Kalimdor/tanaris.cpp b/src/server/scripts/Kalimdor/tanaris.cpp index 8e6f8d57165..7341ccb1e2c 100644 --- a/src/server/scripts/Kalimdor/tanaris.cpp +++ b/src/server/scripts/Kalimdor/tanaris.cpp @@ -39,6 +39,7 @@ EndContentData */ #include "ScriptedEscortAI.h" #include "ScriptedFollowerAI.h" #include "Player.h" +#include "WorldSession.h" /*###### ## mob_aquementas diff --git a/src/server/scripts/Kalimdor/the_barrens.cpp b/src/server/scripts/Kalimdor/the_barrens.cpp index 228d1fc360a..8a24f696a23 100644 --- a/src/server/scripts/Kalimdor/the_barrens.cpp +++ b/src/server/scripts/Kalimdor/the_barrens.cpp @@ -37,6 +37,7 @@ EndContentData */ #include "ScriptedGossip.h" #include "ScriptedEscortAI.h" #include "Player.h" +#include "SpellInfo.h" /*###### ## npc_beaten_corpse diff --git a/src/server/scripts/Kalimdor/ungoro_crater.cpp b/src/server/scripts/Kalimdor/ungoro_crater.cpp index 3da23bea489..e00ea566c8f 100644 --- a/src/server/scripts/Kalimdor/ungoro_crater.cpp +++ b/src/server/scripts/Kalimdor/ungoro_crater.cpp @@ -33,6 +33,7 @@ EndContentData */ #include "ScriptedEscortAI.h" #include "ScriptedFollowerAI.h" #include "Player.h" +#include "SpellInfo.h" enum AmeData { diff --git a/src/server/scripts/Kalimdor/winterspring.cpp b/src/server/scripts/Kalimdor/winterspring.cpp index 483ee472721..73b8bfe9af1 100644 --- a/src/server/scripts/Kalimdor/winterspring.cpp +++ b/src/server/scripts/Kalimdor/winterspring.cpp @@ -31,6 +31,7 @@ EndContentData */ #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "Player.h" +#include "WorldSession.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 ff05d6c62d7..b4756a33b38 100644 --- a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_herald_volazj.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_herald_volazj.cpp @@ -23,6 +23,7 @@ #include "ScriptedCreature.h" #include "ahnkahet.h" #include "Player.h" +#include "SpellInfo.h" enum Spells { 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 059f8c606a0..939c22325d7 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/instance_ruby_sanctum.cpp +++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/instance_ruby_sanctum.cpp @@ -19,6 +19,8 @@ #include "InstanceScript.h" #include "ruby_sanctum.h" #include "Player.h" +#include "TemporarySummon.h" +#include "WorldPacket.h" DoorData const doorData[] = { 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 917ad206b77..6623d8e8765 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 @@ -20,6 +20,7 @@ #include "InstanceScript.h" #include "trial_of_the_crusader.h" #include "Player.h" +#include "TemporarySummon.h" class instance_trial_of_the_crusader : public InstanceMapScript { 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 e0d3cc5dd4c..714e5df6444 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 @@ -19,6 +19,7 @@ #include "ScriptedCreature.h" #include "forge_of_souls.h" #include "Player.h" +#include "SpellInfo.h" /* * TODO: diff --git a/src/server/scripts/Northrend/Gundrak/boss_drakkari_colossus.cpp b/src/server/scripts/Northrend/Gundrak/boss_drakkari_colossus.cpp index 446c26c9567..3724aaf69e2 100644 --- a/src/server/scripts/Northrend/Gundrak/boss_drakkari_colossus.cpp +++ b/src/server/scripts/Northrend/Gundrak/boss_drakkari_colossus.cpp @@ -22,6 +22,7 @@ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "gundrak.h" +#include "SpellInfo.h" enum Spells { diff --git a/src/server/scripts/Northrend/Gundrak/instance_gundrak.cpp b/src/server/scripts/Northrend/Gundrak/instance_gundrak.cpp index 2a89a73dbb2..b8b9c2e9053 100644 --- a/src/server/scripts/Northrend/Gundrak/instance_gundrak.cpp +++ b/src/server/scripts/Northrend/Gundrak/instance_gundrak.cpp @@ -19,6 +19,7 @@ #include "InstanceScript.h" #include "gundrak.h" #include "Player.h" +#include "TemporarySummon.h" #define MAX_ENCOUNTER 5 diff --git a/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp index 3be76715f6c..89d7b0f764d 100755 --- a/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp @@ -24,6 +24,8 @@ #include "AccountMgr.h" #include "icecrown_citadel.h" #include "Player.h" +#include "WorldPacket.h" +#include "WorldSession.h" enum EventIds { diff --git a/src/server/scripts/Northrend/Naxxramas/boss_faerlina.cpp b/src/server/scripts/Northrend/Naxxramas/boss_faerlina.cpp index 3c6e4b50d24..a75f87e91af 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_faerlina.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_faerlina.cpp @@ -18,6 +18,7 @@ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "naxxramas.h" +#include "SpellInfo.h" enum Yells { diff --git a/src/server/scripts/Northrend/Naxxramas/boss_grobbulus.cpp b/src/server/scripts/Northrend/Naxxramas/boss_grobbulus.cpp index 5a55a4f1c4b..7ed9e950b53 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_grobbulus.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_grobbulus.cpp @@ -18,6 +18,7 @@ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "naxxramas.h" +#include "SpellInfo.h" #define SPELL_BOMBARD_SLIME 28280 diff --git a/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp b/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp index ad31ed5e21d..5a8f004788d 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp @@ -19,6 +19,7 @@ #include "ScriptedCreature.h" #include "naxxramas.h" #include "Player.h" +#include "SpellInfo.h" #define EMOTE_BREATH -1533082 #define EMOTE_ENRAGE -1533083 diff --git a/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp b/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp index 179dedb290b..51e476785ff 100644 --- a/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp +++ b/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp @@ -25,6 +25,7 @@ EndScriptData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "oculus.h" +#include "SpellInfo.h" enum Spells { diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_ionar.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_ionar.cpp index d964f619a6e..6f54ce50a94 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_ionar.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_ionar.cpp @@ -23,6 +23,7 @@ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "halls_of_lightning.h" +#include "SpellInfo.h" enum Spells { diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp index c8ce409213f..33e6e2846e4 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp @@ -27,6 +27,7 @@ EndScriptData */ #include "ScriptedCreature.h" #include "halls_of_lightning.h" #include "Player.h" +#include "SpellInfo.h" enum eEnums { diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp index 76aaf61f94d..30f60da178a 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp @@ -30,6 +30,8 @@ #include "ulduar.h" #include "Vehicle.h" #include "Player.h" +#include "WorldPacket.h" +#include "Opcodes.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 f1bfddcbd87..7d3b943f7b0 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp @@ -20,6 +20,7 @@ #include "InstanceScript.h" #include "ulduar.h" #include "Player.h" +#include "WorldPacket.h" static DoorData const doorData[] = { diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp index 1635aaac918..63898e57c08 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp @@ -29,6 +29,7 @@ Script Data End */ #include "ScriptedCreature.h" #include "utgarde_pinnacle.h" #include "Player.h" +#include "SpellInfo.h" //Yell enum eYells diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp index 3d0df453c0c..0278125deb3 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp @@ -26,6 +26,7 @@ Script Data End */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "utgarde_pinnacle.h" +#include "SpellInfo.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 9f74cf0e5ca..5e3bbc01025 100644 --- a/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp +++ b/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp @@ -19,6 +19,7 @@ #include "InstanceScript.h" #include "violet_hold.h" #include "Player.h" +#include "TemporarySummon.h" #define MAX_ENCOUNTER 3 diff --git a/src/server/scripts/Northrend/borean_tundra.cpp b/src/server/scripts/Northrend/borean_tundra.cpp index 2a83a03caff..6eed82991b8 100644 --- a/src/server/scripts/Northrend/borean_tundra.cpp +++ b/src/server/scripts/Northrend/borean_tundra.cpp @@ -43,6 +43,8 @@ EndContentData */ #include "ScriptedEscortAI.h" #include "ScriptedFollowerAI.h" #include "Player.h" +#include "SpellInfo.h" +#include "WorldSession.h" /*###### ## npc_sinkhole_kill_credit diff --git a/src/server/scripts/Northrend/dalaran.cpp b/src/server/scripts/Northrend/dalaran.cpp index 371ac897e4e..b662442ef93 100644 --- a/src/server/scripts/Northrend/dalaran.cpp +++ b/src/server/scripts/Northrend/dalaran.cpp @@ -27,6 +27,7 @@ Script Data End */ #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "Player.h" +#include "WorldSession.h" /******************************************************* * npc_mageguard_dalaran diff --git a/src/server/scripts/Northrend/grizzly_hills.cpp b/src/server/scripts/Northrend/grizzly_hills.cpp index 400fe58d4c4..0363e0c892d 100644 --- a/src/server/scripts/Northrend/grizzly_hills.cpp +++ b/src/server/scripts/Northrend/grizzly_hills.cpp @@ -20,6 +20,7 @@ #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" #include "Player.h" +#include "SpellInfo.h" /*###### ## Quest 12027: Mr. Floppy's Perilous Adventure diff --git a/src/server/scripts/Northrend/storm_peaks.cpp b/src/server/scripts/Northrend/storm_peaks.cpp index 7cd87be8370..b3a379d903d 100644 --- a/src/server/scripts/Northrend/storm_peaks.cpp +++ b/src/server/scripts/Northrend/storm_peaks.cpp @@ -24,6 +24,7 @@ #include "Vehicle.h" #include "CombatAI.h" #include "Player.h" +#include "WorldSession.h" /*###### ## npc_agnetta_tyrsdottar diff --git a/src/server/scripts/Northrend/zuldrak.cpp b/src/server/scripts/Northrend/zuldrak.cpp index 7acdcae8a77..e5763e5baf6 100644 --- a/src/server/scripts/Northrend/zuldrak.cpp +++ b/src/server/scripts/Northrend/zuldrak.cpp @@ -20,6 +20,7 @@ #include "ScriptedGossip.h" #include "ScriptedEscortAI.h" #include "Player.h" +#include "SpellInfo.h" /*#### ## npc_drakuru_shackles diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp index c70e4168826..9411bd8a363 100755 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp @@ -23,6 +23,7 @@ #include "MapManager.h" #include "ObjectMgr.h" #include "OutdoorPvPMgr.h" +#include "ReputationMgr.h" #include "Language.h" #include "World.h" diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp index 0f3bcce6493..1503c9f7234 100644 --- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp +++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp @@ -26,6 +26,7 @@ EndScriptData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "shadow_labyrinth.h" +#include "SpellInfo.h" #define EMOTE_SONIC_BOOM -1555036 diff --git a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp index 18145df7302..1029648561f 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp @@ -29,6 +29,7 @@ EndScriptData */ #include "PassiveAI.h" #include "black_temple.h" #include "Player.h" +#include "SpellInfo.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_warlord_najentus.cpp b/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp index 10f787bee88..9924bf1ffab 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp @@ -27,6 +27,7 @@ EndScriptData */ #include "ScriptedCreature.h" #include "black_temple.h" #include "Player.h" +#include "SpellInfo.h" enum eEnums { 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 ffb4ed3aa12..a934d03349c 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp @@ -28,6 +28,7 @@ EndScriptData */ #include "serpent_shrine.h" #include "Spell.h" #include "Player.h" +#include "WorldSession.h" #define SAY_INTRO -1548042 #define SAY_AGGRO1 -1548043 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 f280ad77b42..4af38888758 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp @@ -27,6 +27,7 @@ EndScriptData */ #include "InstanceScript.h" #include "serpent_shrine.h" #include "Player.h" +#include "TemporarySummon.h" #define MAX_ENCOUNTER 6 #define SPELL_SCALDINGWATER 37284 diff --git a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_warlord_kalithresh.cpp b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_warlord_kalithresh.cpp index d81a021c4bc..ac730292545 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_warlord_kalithresh.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_warlord_kalithresh.cpp @@ -26,6 +26,7 @@ EndScriptData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "steam_vault.h" +#include "SpellInfo.h" #define SAY_INTRO -1545016 #define SAY_REGEN -1545017 diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp index 3bb0858d2be..f0c4330c9a3 100644 --- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp @@ -25,6 +25,7 @@ EndScriptData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" +#include "SpellInfo.h" enum eSpells { diff --git a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp index ebe30166902..94272e4a50f 100644 --- a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp @@ -27,6 +27,7 @@ EndScriptData */ #include "ScriptedCreature.h" #include "magtheridons_lair.h" #include "Player.h" +#include "SpellInfo.h" struct Yell { diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp index 3770ac3ba09..a8be934c710 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp @@ -26,6 +26,7 @@ EndScriptData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "the_eye.h" +#include "SpellInfo.h" enum eSpells { diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp index 2008a1bc640..2dbfb7b46c5 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp @@ -27,6 +27,7 @@ EndScriptData */ #include "ScriptedCreature.h" #include "the_eye.h" #include "WorldPacket.h" +#include "Opcodes.h" enum eEnums { diff --git a/src/server/scripts/Outland/hellfire_peninsula.cpp b/src/server/scripts/Outland/hellfire_peninsula.cpp index 4c0ed3c1d4e..4da98281eb2 100644 --- a/src/server/scripts/Outland/hellfire_peninsula.cpp +++ b/src/server/scripts/Outland/hellfire_peninsula.cpp @@ -38,6 +38,7 @@ EndContentData */ #include "ScriptedGossip.h" #include "ScriptedEscortAI.h" #include "Player.h" +#include "WorldSession.h" /*###### ## npc_aeranas diff --git a/src/server/scripts/Outland/nagrand.cpp b/src/server/scripts/Outland/nagrand.cpp index 13adf9182a3..0c9a60603f5 100644 --- a/src/server/scripts/Outland/nagrand.cpp +++ b/src/server/scripts/Outland/nagrand.cpp @@ -33,6 +33,7 @@ EndContentData */ #include "ScriptedGossip.h" #include "ScriptedEscortAI.h" #include "Player.h" +#include "SpellInfo.h" /*###### ## npc_greatmother_geyah diff --git a/src/server/scripts/Outland/shadowmoon_valley.cpp b/src/server/scripts/Outland/shadowmoon_valley.cpp index 5ec017d88b0..dc91fb2c14f 100644 --- a/src/server/scripts/Outland/shadowmoon_valley.cpp +++ b/src/server/scripts/Outland/shadowmoon_valley.cpp @@ -47,6 +47,7 @@ EndContentData */ #include "Group.h" #include "SpellScript.h" #include "Player.h" +#include "WorldSession.h" /*##### # mob_mature_netherwing_drake diff --git a/src/server/scripts/Outland/shattrath_city.cpp b/src/server/scripts/Outland/shattrath_city.cpp index e9264233621..76cffa9e1fe 100644 --- a/src/server/scripts/Outland/shattrath_city.cpp +++ b/src/server/scripts/Outland/shattrath_city.cpp @@ -39,6 +39,7 @@ EndContentData */ #include "ScriptedGossip.h" #include "ScriptedEscortAI.h" #include "Player.h" +#include "WorldSession.h" /*###### ## npc_raliq_the_drunk diff --git a/src/server/scripts/Outland/terokkar_forest.cpp b/src/server/scripts/Outland/terokkar_forest.cpp index 0963ac63556..2298f676692 100644 --- a/src/server/scripts/Outland/terokkar_forest.cpp +++ b/src/server/scripts/Outland/terokkar_forest.cpp @@ -39,6 +39,7 @@ EndContentData */ #include "ScriptedEscortAI.h" #include "Group.h" #include "Player.h" +#include "WorldSession.h" /*###### ## mob_unkor_the_ruthless diff --git a/src/server/scripts/Outland/zangarmarsh.cpp b/src/server/scripts/Outland/zangarmarsh.cpp index 0d38a49e11d..03e40b8d7dc 100644 --- a/src/server/scripts/Outland/zangarmarsh.cpp +++ b/src/server/scripts/Outland/zangarmarsh.cpp @@ -37,6 +37,7 @@ EndContentData */ #include "ScriptedGossip.h" #include "ScriptedEscortAI.h" #include "Player.h" +#include "WorldSession.h" /*###### ## npcs_ashyen_and_keleth diff --git a/src/server/scripts/World/achievement_scripts.cpp b/src/server/scripts/World/achievement_scripts.cpp index 665acbe86c8..178df2078f8 100755 --- a/src/server/scripts/World/achievement_scripts.cpp +++ b/src/server/scripts/World/achievement_scripts.cpp @@ -24,6 +24,7 @@ #include "BattlegroundAV.h" #include "Vehicle.h" #include "Player.h" +#include "Creature.h" class achievement_resilient_victory : public AchievementCriteriaScript { diff --git a/src/server/scripts/World/go_scripts.cpp b/src/server/scripts/World/go_scripts.cpp index 4abb06198ba..dac67b566e3 100644 --- a/src/server/scripts/World/go_scripts.cpp +++ b/src/server/scripts/World/go_scripts.cpp @@ -56,6 +56,7 @@ EndContentData */ #include "GameObjectAI.h" #include "Spell.h" #include "Player.h" +#include "WorldSession.h" /*###### ## go_cat_figurine diff --git a/src/server/scripts/World/guards.cpp b/src/server/scripts/World/guards.cpp index 5ca3984f92a..951c0ed9688 100644 --- a/src/server/scripts/World/guards.cpp +++ b/src/server/scripts/World/guards.cpp @@ -33,6 +33,7 @@ EndContentData */ #include "ScriptedCreature.h" #include "GuardAI.h" #include "Player.h" +#include "SpellInfo.h" enum GuardGeneric { diff --git a/src/server/scripts/World/npc_innkeeper.cpp b/src/server/scripts/World/npc_innkeeper.cpp index e02e67e97f6..502ecb1acb2 100644 --- a/src/server/scripts/World/npc_innkeeper.cpp +++ b/src/server/scripts/World/npc_innkeeper.cpp @@ -28,6 +28,7 @@ EndScriptData */ #include "ScriptedGossip.h" #include "GameEventMgr.h" #include "Player.h" +#include "WorldSession.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 69111b3b058..4e0818c7c82 100644 --- a/src/server/scripts/World/npc_professions.cpp +++ b/src/server/scripts/World/npc_professions.cpp @@ -27,6 +27,8 @@ EndScriptData */ #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "Player.h" +#include "SpellInfo.h" +#include "WorldSession.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 5414d896dd0..4ed5b0d9276 100644 --- a/src/server/scripts/World/npc_taxi.cpp +++ b/src/server/scripts/World/npc_taxi.cpp @@ -28,6 +28,7 @@ EndScriptData #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "Player.h" +#include "WorldSession.h" #define GOSSIP_SUSURRUS "I am ready." #define GOSSIP_NETHER_DRAKE "I'm ready to fly! Take me up, dragon!" diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp index 1d7154376a7..b38530b2a4a 100644 --- a/src/server/scripts/World/npcs_special.cpp +++ b/src/server/scripts/World/npcs_special.cpp @@ -58,6 +58,7 @@ EndContentData */ #include "Cell.h" #include "CellImpl.h" #include "SpellAuras.h" +#include "Pet.h" /*######## # npc_air_force_bots -- cgit v1.2.3