diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 34bcd6336..40185aa1b 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -61,7 +61,9 @@ body: attributes: label: AC rev. hash/commit description: | - Copy the result of the `.server debug` command (if you need to run it from the client get a prat addon) + Paste the entire output result of the `.server debug` command. (If you need to run it from the client get a prat addon) + placeholder: | + Paste the entire output result of the `.server debug` command. (If you need to run it from the client get a prat addon) validations: required: true - type: input diff --git a/.github/actions/linux-build/action.yml b/.github/actions/linux-build/action.yml index 7218239cc..132cfc9fa 100644 --- a/.github/actions/linux-build/action.yml +++ b/.github/actions/linux-build/action.yml @@ -16,6 +16,11 @@ inputs: description: Flag to install modules or not required: true type: boolean + tools: + default: none + description: Flag to enable tools build + required: false + type: string pch: default: false description: Flag to enable or disable PCH @@ -94,7 +99,7 @@ runs: cmake "$GITHUB_WORKSPACE" \ -DCMAKE_INSTALL_PREFIX="$GITHUB_WORKSPACE/env/dist" \ -DAPPS_BUILD="all" \ - -DTOOLS_BUILD="all" \ + -DTOOLS_BUILD=${{ inputs.tools }} \ -DSCRIPTS="static" \ -DMODULES="static" \ -DWITH_WARNINGS="ON" \ @@ -144,10 +149,6 @@ runs: shell: bash run: sudo systemctl start mysql.service - - name: run dbimport - shell: bash - run: env/dist/bin/dbimport - - name: Dry run authserver shell: bash run: timeout 5m env/dist/bin/authserver --dry-run diff --git a/.github/workflows/tools_build.yml b/.github/workflows/tools_build.yml index a400563c8..347269335 100644 --- a/.github/workflows/tools_build.yml +++ b/.github/workflows/tools_build.yml @@ -12,15 +12,15 @@ concurrency: jobs: build: strategy: - fail-fast: false + fail-fast: true matrix: - # the result of the matrix will be the combination of all attributes, so we get os*compiler builds - os: [ubuntu-24.04] - compiler: [clang] + include: + - os: ubuntu-24.04 + compiler: + CC: clang-18 + CXX: clang++-18 runs-on: ${{ matrix.os }} - name: ${{ matrix.os }}-${{ matrix.compiler }} - env: - COMPILER: ${{ matrix.compiler }} + name: ${{ matrix.os }}-${{ matrix.compiler.CC }} if: | github.repository == 'liyunfan1223/azerothcore-wotlk' && !github.event.pull_request.draft && ( @@ -29,23 +29,9 @@ jobs: ) steps: - uses: actions/checkout@v4 - - name: Cache - uses: actions/cache@v4 - env: - cache-name: cache-tools + - uses: ./.github/actions/linux-build with: - path: var/ccache - key: ${{ env.cache-name }}-${{ matrix.os }}-${{ matrix.compiler }}-${{ github.ref }}-${{ github.sha }} - restore-keys: | - ${{ env.cache-name }}-${{ matrix.os }}-${{ matrix.compiler }}-${{ github.ref }}- - ${{ env.cache-name }}-${{ matrix.os }}-${{ matrix.compiler }}- - ${{ env.cache-name }}-${{ matrix.os }}- - - name: Configure OS - run: source ./acore.sh install-deps - env: - CONTINUOUS_INTEGRATION: true - - name: Create conf/config.sh - run: source ./apps/ci/ci-conf-tools.sh - - name: Build - run: source ./apps/ci/ci-compile.sh - + CC: ${{ matrix.compiler.CC }} + CXX: ${{ matrix.compiler.CXX }} + tools: all + pch: false diff --git a/data/sql/updates/db_world/2024_07_19_00.sql b/data/sql/updates/db_world/2024_07_19_00.sql new file mode 100644 index 000000000..7f66b5502 --- /dev/null +++ b/data/sql/updates/db_world/2024_07_19_00.sql @@ -0,0 +1,36 @@ +-- DB update 2024_07_18_00 -> 2024_07_19_00 +-- +UPDATE `creature_template_addon` SET `bytes2` = 1, `auras` = '18950' WHERE (`entry` = 22878); + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 22878); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(22878, 0, 0, 0, 0, 0, 100, 0, 7000, 11000, 9000, 13000, 0, 0, 11, 40100, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Aqueous Lord - In Combat - Cast \'Crashing Wave\''), +(22878, 0, 1, 0, 0, 0, 100, 0, 9000, 15000, 6000, 12000, 0, 0, 11, 40099, 0, 0, 0, 0, 0, 5, 100, 1, 0, 0, 0, 0, 0, 0, 'Aqueous Lord - In Combat - Cast \'Vile Slime\''), +(22878, 0, 2, 3, 0, 0, 100, 0, 14000, 18000, 30000, 40000, 0, 0, 11, 40101, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Aqueous Lord - In Combat - Cast \'Serverside - Summon Aqueous Spawn\''), +(22878, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 12, 22883, 4, 30000, 0, 0, 0, 202, 10, 1, 1, 0, 0, 0, 0, 0, 'Aqueous Lord - In Combat - Summon Creature \'Aqueous Spawn\''); + +UPDATE `creature_template` SET `mechanic_immune_mask` = `mechanic_immune_mask`|2048, `mechanic_immune_mask` = `mechanic_immune_mask`&~8, `flags_extra` = `flags_extra`|256 WHERE (`entry` = 22960); + +DELETE FROM `creature_text` WHERE (`CreatureID` = 23028); +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(23028, 0, 0, 'I\'ve seen female Gnomes hit harder than you!', 14, 0, 100, 0, 0, 0, 21354, 0, 'Bonechewer Taskmaster'), +(23028, 0, 1, 'If you don\'t start throwing some real punches, you\'ll be cleaning the drake stalls for a year!', 14, 0, 100, 0, 0, 0, 21356, 0, 'Bonechewer Taskmaster'), +(23028, 0, 2, 'Stop your slacking and fight like a true fel orc!', 14, 0, 100, 0, 0, 0, 21353, 0, 'Bonechewer Taskmaster'), +(23028, 0, 3, 'You call that an offense? I\'ve seen more offensive tallstriders!', 14, 0, 100, 0, 0, 0, 21355, 0, 'Bonechewer Taskmaster'), +(23028, 1, 0, '%s becomes increasingly enraged as he sees his allies fall in battle!', 16, 0, 100, 0, 0, 0, 21352, 0, 'Bonechewer Taskmaster'); + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 23028); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(23028, 0, 0, 1, 0, 0, 100, 0, 5000, 15000, 14000, 14000, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Bonechewer Taskmaster - In Combat - Talk'), +(23028, 0, 1, 0, 61, 0, 100, 512, 0, 0, 0, 0, 0, 0, 67, 1, 3000, 3000, 0, 0, 100, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Bonechewer Taskmaster - In Combat - Create Timed Event'), +(23028, 0, 2, 0, 59, 0, 100, 0, 1, 0, 0, 0, 0, 0, 11, 40851, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Bonechewer Taskmaster - On Timed Event - Cast Disgruntled'), +(23028, 0, 3, 0, 38, 0, 100, 0, 1, 1, 0, 0, 0, 0, 11, 40845, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Bonechewer Taskmaster - On Data Set 1 1 - Cast \'Fury\''), +(23028, 0, 4, 0, 38, 0, 100, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Bonechewer Taskmaster - On Data Set 1 1 - Say Line 1 (No Repeat)'); + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 22963); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(22963, 0, 0, 0, 0, 0, 100, 1, 5000, 15000, 0, 0, 0, 0, 11, 40844, 0, 0, 0, 0, 0, 5, 30, 0, 0, 0, 0, 0, 0, 0, 'Bonechewer Worker - In Combat - Cast \'Throw Pick\' (No Repeat)'), +(22963, 0, 1, 0, 8, 0, 100, 0, 40851, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Bonechewer Worker - On Spellhit \'Disgruntled\' - Say Line 0'), +(22963, 0, 2, 0, 6, 0, 100, 0, 0, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, 23028, 40, 0, 0, 0, 0, 0, 0, 'Bonechewer Worker - On Just Died - Set Data 1 1'); + +UPDATE `creature_template` SET `mechanic_immune_mask` = `mechanic_immune_mask`|1|2|4|16|64|256|512|1024|2048|4096|8192|131072|4194304|8388608|33554432 WHERE (`entry` = 22954); diff --git a/data/sql/updates/db_world/2024_07_19_01.sql b/data/sql/updates/db_world/2024_07_19_01.sql new file mode 100644 index 000000000..9e01772b9 --- /dev/null +++ b/data/sql/updates/db_world/2024_07_19_01.sql @@ -0,0 +1,15 @@ +-- DB update 2024_07_19_00 -> 2024_07_19_01 +-- +DELETE FROM `creature_template_spell` WHERE (`CreatureID` = 23109); +INSERT INTO `creature_template_spell` (`CreatureID`, `Index`, `Spell`, `VerifiedBuild`) VALUES +(23109, 0, 40325, 0), +(23109, 2, 40157, 0), +(23109, 3, 40175, 0), +(23109, 4, 40314, 0), +(23109, 6, 40322, 0); + +UPDATE `creature_template` SET `AIName` = '', `ScriptName` = 'npc_vengeful_spirit' WHERE (`entry` = 23109); + +DELETE FROM `spell_script_names` WHERE `spell_id` = 41999 AND `ScriptName` = 'spell_teron_gorefiend_shadow_of_death_remove'; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(41999, 'spell_teron_gorefiend_shadow_of_death_remove'); diff --git a/data/sql/updates/db_world/2024_07_19_02.sql b/data/sql/updates/db_world/2024_07_19_02.sql new file mode 100644 index 000000000..132ba23a1 --- /dev/null +++ b/data/sql/updates/db_world/2024_07_19_02.sql @@ -0,0 +1,3 @@ +-- DB update 2024_07_19_01 -> 2024_07_19_02 +-- +UPDATE `item_template` SET `HolidayId` = 409 WHERE `entry` = 46861; diff --git a/data/sql/updates/db_world/2024_07_19_03.sql b/data/sql/updates/db_world/2024_07_19_03.sql new file mode 100644 index 000000000..5b28322bd --- /dev/null +++ b/data/sql/updates/db_world/2024_07_19_03.sql @@ -0,0 +1,25 @@ +-- DB update 2024_07_19_02 -> 2024_07_19_03 +-- +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 15 AND `SourceGroup` = 10996 AND `SourceEntry` = 6 AND `ConditionTypeOrReference` IN (2,8); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(15, 10996, 6, 0, 1, 2, 0, 50375, 1, 1, 1, 0, 0, '', 'Show Gossip Option 6 if player does not have item \'Ashen Band of Courage\' AND'), +(15, 10996, 6, 0, 1, 2, 0, 50376, 1, 1, 1, 0, 0, '', 'Show Gossip Option 6 if player does not have item \'Ashen Band of Vengeance\' AND'), +(15, 10996, 6, 0, 1, 2, 0, 50377, 1, 1, 1, 0, 0, '', 'Show Gossip Option 6 if player does not have item \'Ashen Band of Destruction\' AND'), +(15, 10996, 6, 0, 1, 2, 0, 50378, 1, 1, 1, 0, 0, '', 'Show Gossip Option 6 if player does not have item \'Ashen Band of Wisdom\' AND'), +(15, 10996, 6, 0, 1, 2, 0, 50384, 1, 1, 1, 0, 0, '', 'Show Gossip Option 6 if player does not have item \'Ashen Band of Greater Destruction\' AND'), +(15, 10996, 6, 0, 1, 2, 0, 50386, 1, 1, 1, 0, 0, '', 'Show Gossip Option 6 if player does not have item \'Ashen Band of Greater Wisdom\' AND'), +(15, 10996, 6, 0, 1, 2, 0, 50387, 1, 1, 1, 0, 0, '', 'Show Gossip Option 6 if player does not have item \'Ashen Band of Greater Vengeance\' AND'), +(15, 10996, 6, 0, 1, 2, 0, 50388, 1, 1, 1, 0, 0, '', 'Show Gossip Option 6 if player does not have item \'Ashen Band of Greater Courage\' AND'), +(15, 10996, 6, 0, 1, 2, 0, 50397, 1, 1, 1, 0, 0, '', 'Show Gossip Option 6 if player does not have item \'Ashen Band of Unmatched Destruction\' AND'), +(15, 10996, 6, 0, 1, 2, 0, 50398, 1, 1, 1, 0, 0, '', 'Show Gossip Option 6 if player does not have item \'Ashen Band of Endless Destruction\' AND'), +(15, 10996, 6, 0, 1, 2, 0, 50399, 1, 1, 1, 0, 0, '', 'Show Gossip Option 6 if player does not have item \'Ashen Band of Unmatched Wisdom\' AND'), +(15, 10996, 6, 0, 1, 2, 0, 50400, 1, 1, 1, 0, 0, '', 'Show Gossip Option 6 if player does not have item \'Ashen Band of Endless Wisdom\' AND'), +(15, 10996, 6, 0, 1, 2, 0, 50401, 1, 1, 1, 0, 0, '', 'Show Gossip Option 6 if player does not have item \'Ashen Band of Unmatched Vengeance\' AND'), +(15, 10996, 6, 0, 1, 2, 0, 50402, 1, 1, 1, 0, 0, '', 'Show Gossip Option 6 if player does not have item \'Ashen Band of Endless Vengeance\' AND'), +(15, 10996, 6, 0, 1, 2, 0, 50403, 1, 1, 1, 0, 0, '', 'Show Gossip Option 6 if player does not have item \'Ashen Band of Unmatched Courage\' AND'), +(15, 10996, 6, 0, 1, 2, 0, 50404, 1, 1, 1, 0, 0, '', 'Show Gossip Option 6 if player does not have item \'Ashen Band of Endless Courage\' AND'), +(15, 10996, 6, 0, 1, 2, 0, 52569, 1, 1, 1, 0, 0, '', 'Show Gossip Option 6 if player does not have item \'Ashen Band of Might\' AND'), +(15, 10996, 6, 0, 1, 2, 0, 52570, 1, 1, 1, 0, 0, '', 'Show Gossip Option 6 if player does not have item \'Ashen Band of Greater Might\' AND'), +(15, 10996, 6, 0, 1, 2, 0, 52571, 1, 1, 1, 0, 0, '', 'Show Gossip Option 6 if player does not have item \'Ashen Band of Unmatched Might\' AND'), +(15, 10996, 6, 0, 1, 2, 0, 52572, 1, 1, 1, 0, 0, '', 'Show Gossip Option 6 if player does not have item \'Ashen Band of Endless Might\' AND'), +(15, 10996, 6, 0, 1, 8, 0, 24815, 0, 0, 0, 0, 0, '', 'Show Gossip Option 6 if Quest \'Choose your path\' is rewarded'); diff --git a/data/sql/updates/db_world/2024_07_21_00.sql b/data/sql/updates/db_world/2024_07_21_00.sql new file mode 100644 index 000000000..d62f77632 --- /dev/null +++ b/data/sql/updates/db_world/2024_07_21_00.sql @@ -0,0 +1,6 @@ +-- DB update 2024_07_19_03 -> 2024_07_21_00 +-- +DELETE FROM `spell_custom_attr` WHERE `spell_id` IN (25646, 13444); +INSERT INTO `spell_custom_attr` (`spell_id`, `attributes`) VALUES +(25646, 4194304), +(13444, 4194304); diff --git a/src/common/Configuration/Config.cpp b/src/common/Configuration/Config.cpp index d8665593c..0cd69584d 100644 --- a/src/common/Configuration/Config.cpp +++ b/src/common/Configuration/Config.cpp @@ -144,29 +144,17 @@ namespace // read line error if (!in.good() && !in.eof()) - { throw ConfigException(Acore::StringFormatFmt("> Config::LoadFile: Failure to read line number {} in file '{}'", lineNumber, file)); - } // remove whitespace in line line = Acore::String::Trim(line, in.getloc()); if (line.empty()) - { continue; - } - // comments + // comments and headers if (line[0] == '#' || line[0] == '[') - { continue; - } - - size_t found = line.find_first_of('#'); - if (found != std::string::npos) - { - line = line.substr(0, found); - } auto const equal_pos = line.find('='); @@ -183,9 +171,7 @@ namespace // Skip if 2+ same options in one config file if (IsDuplicateOption(entry)) - { continue; - } // Add to temp container fileConfigs.emplace(entry, value); @@ -663,30 +649,6 @@ bool ConfigMgr::LoadModulesConfigs(bool isReload /*= false*/, bool isNeedPrintIn return true; } -/// @deprecated DO NOT USE - use GetOption instead. -std::string ConfigMgr::GetStringDefault(std::string const& name, const std::string& def, bool showLogs /*= true*/) -{ - return GetOption(name, def, showLogs); -} - -/// @deprecated DO NOT USE - use GetOption instead. -bool ConfigMgr::GetBoolDefault(std::string const& name, bool def, bool showLogs /*= true*/) -{ - return GetOption(name, def, showLogs); -} - -/// @deprecated DO NOT USE - use GetOption instead. -int ConfigMgr::GetIntDefault(std::string const& name, int def, bool showLogs /*= true*/) -{ - return GetOption(name, def, showLogs); -} - -/// @deprecated DO NOT USE - use GetOption instead. -float ConfigMgr::GetFloatDefault(std::string const& name, float def, bool showLogs /*= true*/) -{ - return GetOption(name, def, showLogs); -} - #define TEMPLATE_CONFIG_OPTION(__typename) \ template __typename ConfigMgr::GetOption<__typename>(std::string const& name, __typename const& def, bool showLogs /*= true*/) const; diff --git a/src/common/Configuration/Config.h b/src/common/Configuration/Config.h index db7410e05..c7708290e 100644 --- a/src/common/Configuration/Config.h +++ b/src/common/Configuration/Config.h @@ -50,26 +50,6 @@ public: template T GetOption(std::string const& name, T const& def, bool showLogs = true) const; - /* - * Deprecated geters. This geters will be deleted - */ - - [[deprecated("Use GetOption instead")]] - std::string GetStringDefault(std::string const& name, const std::string& def, bool showLogs = true); - - [[deprecated("Use GetOption instead")]] - bool GetBoolDefault(std::string const& name, bool def, bool showLogs = true); - - [[deprecated("Use GetOption instead")]] - int GetIntDefault(std::string const& name, int def, bool showLogs = true); - - [[deprecated("Use GetOption instead")]] - float GetFloatDefault(std::string const& name, float def, bool showLogs = true); - - /* - * End deprecated geters - */ - bool isDryRun() { return dryRun; } void setDryRun(bool mode) { dryRun = mode; } diff --git a/src/server/apps/worldserver/worldserver.conf.dist b/src/server/apps/worldserver/worldserver.conf.dist index e7cb0dec9..a5a2f6792 100644 --- a/src/server/apps/worldserver/worldserver.conf.dist +++ b/src/server/apps/worldserver/worldserver.conf.dist @@ -697,6 +697,26 @@ Logger.spells.scripts=2,Console Errors #Logger.bg.battleground=4,Console Server #Logger.bg.reportpvpafk=4,Console Server #Logger.calendar=4,Console Server +#Logger.chat.say=4,Console Chat +#Logger.chat.emote=4,Console Chat +#Logger.chat.yell=4,Console Chat +#Logger.chat.whisper=4,Console Chat +#Logger.chat.party=4,Console Chat +#Logger.chat.raid=4,Console Chat +#Logger.chat.bg=4,Console Chat +#Logger.chat.guild=4,Console Chat +#Logger.chat.guild.officer=4,Console Chat +#Logger.chat.channel=4,Console Chat +#Logger.chat.addon.msg=4,Console Chat +#Logger.chat.addon.emote=4,Console Chat +#Logger.chat.addon.yell=4,Console Chat +#Logger.chat.addon.whisper=4,Console Chat +#Logger.chat.addon.party=4,Console Chat +#Logger.chat.addon.raid=4,Console Chat +#Logger.chat.addon.bg=4,Console Chat +#Logger.chat.addon.guild=4,Console Chat +#Logger.chat.addon.guild.officer=4,Console Chat +#Logger.chat.addon.channel=4,Console Chat #Logger.chat.log=4,Console Server #Logger.chat.log.addon=4,Console Server #Logger.chat.system=4,Console Server @@ -4393,6 +4413,13 @@ DailyRBGArenaPoints.MinLevel = 71 MunchingBlizzlike.Enabled = 1 +# +# Daze.Enabled +# Description: Enable or disable the chance for mob melee attacks to daze the victim. +# Default: 1 - (Blizzlike) + +Daze.Enabled = 1 + # ################################################################################################### diff --git a/src/server/game/Chat/ChatCommands/ChatCommand.h b/src/server/game/Chat/ChatCommands/ChatCommand.h index 2351b1b03..4f51206be 100644 --- a/src/server/game/Chat/ChatCommands/ChatCommand.h +++ b/src/server/game/Chat/ChatCommands/ChatCommand.h @@ -248,19 +248,6 @@ namespace Acore::ChatCommands ChatCommandBuilder(char const* name, std::vector const& subCommands) : _name{ ASSERT_NOTNULL(name) }, _data{ std::in_place_type, subCommands } { } - [[deprecated("char const* parameters to command handlers are deprecated; convert this to a typed argument handler instead")]] - ChatCommandBuilder(char const* name, bool(&handler)(ChatHandler*, char const*), uint32 securityLevel, Acore::ChatCommands::Console allowConsole) - : ChatCommandBuilder(name, handler, AcoreStrings(), securityLevel, allowConsole) { } - - template - [[deprecated("you are using the old-style command format; convert this to the new format ({ name, handler (not a pointer!), permission, Console::(Yes/No) })")]] - ChatCommandBuilder(char const* name, uint32 securityLevel, bool console, TypedHandler* handler, char const*) - : ChatCommandBuilder(name, *handler, AcoreStrings(), securityLevel, static_cast(console)) { } - - [[deprecated("you are using the old-style command format; convert this to the new format ({ name, subCommands })")]] - ChatCommandBuilder(char const* name, uint32, bool, std::nullptr_t, char const*, std::vector const& sub) - : ChatCommandBuilder(name, sub) { } - private: std::string_view _name; std::variant _data; diff --git a/src/server/game/Entities/Creature/GossipDef.cpp b/src/server/game/Entities/Creature/GossipDef.cpp index 012e5599d..077ef5d5e 100644 --- a/src/server/game/Entities/Creature/GossipDef.cpp +++ b/src/server/game/Entities/Creature/GossipDef.cpp @@ -451,7 +451,7 @@ void PlayerMenu::SendQuestGiverQuestDetails(Quest const* quest, ObjectGuid npcGU uint32 moneyRew = 0; Player* player = _session->GetPlayer(); - if (player && (player->getLevel() >= sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL) || sScriptMgr->ShouldBeRewardedWithMoneyInsteadOfExp(player))) + if (player && (player->GetLevel() >= sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL) || sScriptMgr->ShouldBeRewardedWithMoneyInsteadOfExp(player))) { moneyRew = quest->GetRewMoneyMaxLevel(); } diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 5390938e3..a3628fdcf 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -1915,8 +1915,10 @@ void Unit::DealMeleeDamage(CalcDamageInfo* damageInfo, bool durabilityLoss) if (Probability > 40.0f) Probability = 40.0f; - if (roll_chance_f(std::max(0.0f, Probability))) - CastSpell(victim, 1604, true); + // Daze application + if (sWorld->getBoolConfig(CONFIG_ENABLE_DAZE)) + if (roll_chance_f(std::max(0.0f, Probability))) + CastSpell(victim, 1604, true); } if (GetTypeId() == TYPEID_PLAYER) @@ -3054,9 +3056,8 @@ void Unit::SendMeleeAttackStop(Unit* victim) if (victim) { - uint8 nowDead = victim->isDead(); data << victim->GetPackGUID(); - data << nowDead; + data << (uint32)victim->isDead(); } SendMessageToSet(&data, true); LOG_DEBUG("entities.unit", "WORLD: Sent SMSG_ATTACKSTOP"); diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h index fb62a18d8..0f79ee7b2 100644 --- a/src/server/game/Entities/Unit/Unit.h +++ b/src/server/game/Entities/Unit/Unit.h @@ -1506,9 +1506,7 @@ public: [[nodiscard]] bool IsTotem() const { return m_unitTypeMask & UNIT_MASK_TOTEM; } [[nodiscard]] bool IsVehicle() const { return m_unitTypeMask & UNIT_MASK_VEHICLE; } - /// @deprecated Use GetLevel() instead! - [[nodiscard]] uint8 getLevel() const { return uint8(GetUInt32Value(UNIT_FIELD_LEVEL)); } - [[nodiscard]] uint8 GetLevel() const { return getLevel(); } + [[nodiscard]] uint8 GetLevel() const { return uint8(GetUInt32Value(UNIT_FIELD_LEVEL)); } uint8 getLevelForTarget(WorldObject const* /*target*/) const override { return GetLevel(); } void SetLevel(uint8 lvl, bool showLevelChange = true); [[nodiscard]] uint8 getRace(bool original = false) const; diff --git a/src/server/game/Handlers/CombatHandler.cpp b/src/server/game/Handlers/CombatHandler.cpp index c1fecb778..25399927d 100644 --- a/src/server/game/Handlers/CombatHandler.cpp +++ b/src/server/game/Handlers/CombatHandler.cpp @@ -89,9 +89,8 @@ void WorldSession::SendAttackStop(Unit const* enemy) if (enemy) { - uint8 nowDead = enemy->isDead(); data << enemy->GetPackGUID(); // must be packed guid - data << nowDead; + data << (uint32)enemy->isDead(); } SendPacket(&data); } diff --git a/src/server/game/World/IWorld.h b/src/server/game/World/IWorld.h index 638c132d6..ffeb0eebb 100644 --- a/src/server/game/World/IWorld.h +++ b/src/server/game/World/IWorld.h @@ -186,6 +186,7 @@ enum WorldBoolConfigs CONFIG_STRICT_NAMES_PROFANITY, CONFIG_ALLOWS_RANK_MOD_FOR_PET_HEALTH, CONFIG_MUNCHING_BLIZZLIKE, + CONFIG_ENABLE_DAZE, BOOL_CONFIG_VALUE_COUNT }; @@ -567,7 +568,6 @@ public: virtual void LoadConfigSettings(bool reload = false) = 0; virtual void SendWorldText(uint32 string_id, ...) = 0; virtual void SendWorldTextOptional(uint32 string_id, uint32 flag, ...) = 0; - virtual void SendGlobalText(const char* text, WorldSession* self) = 0; virtual void SendGMText(uint32 string_id, ...) = 0; virtual void SendGlobalMessage(WorldPacket const* packet, WorldSession* self = nullptr, TeamId teamId = TEAM_NEUTRAL) = 0; virtual void SendGlobalGMMessage(WorldPacket const* packet, WorldSession* self = nullptr, TeamId teamId = TEAM_NEUTRAL) = 0; diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp index d3ba8d66f..d666fa5eb 100644 --- a/src/server/game/World/World.cpp +++ b/src/server/game/World/World.cpp @@ -1285,6 +1285,8 @@ void World::LoadConfigSettings(bool reload) _bool_configs[CONFIG_MUNCHING_BLIZZLIKE] = sConfigMgr->GetOption("MunchingBlizzlike.Enabled", true); + _bool_configs[CONFIG_ENABLE_DAZE] = sConfigMgr->GetOption("Daze.Enabled", true); + _int_configs[CONFIG_DAILY_RBG_MIN_LEVEL_AP_REWARD] = sConfigMgr->GetOption("DailyRBGArenaPoints.MinLevel", 71); _int_configs[CONFIG_AUCTION_HOUSE_SEARCH_TIMEOUT] = sConfigMgr->GetOption("AuctionHouse.SearchTimeout", 1000); @@ -2653,24 +2655,6 @@ void World::SendGMText(uint32 string_id, ...) va_end(ap); } -/// @deprecated only for debug purpose. Send a System Message to all players (except self if mentioned) -void World::SendGlobalText(const char* text, WorldSession* self) -{ - WorldPacket data; - - // need copy to prevent corruption by strtok call in LineFromMessage original string - char* buf = strdup(text); - char* pos = buf; - - while (char* line = ChatHandler::LineFromMessage(pos)) - { - ChatHandler::BuildChatPacket(data, CHAT_MSG_SYSTEM, LANG_UNIVERSAL, nullptr, nullptr, line); - SendGlobalMessage(&data, self); - } - - free(buf); -} - /// Send a packet to all players (or players selected team) in the zone (except self if mentioned) bool World::SendZoneMessage(uint32 zone, WorldPacket const* packet, WorldSession* self, TeamId teamId) { diff --git a/src/server/game/World/World.h b/src/server/game/World/World.h index c13e58fa1..481217cbb 100644 --- a/src/server/game/World/World.h +++ b/src/server/game/World/World.h @@ -239,7 +239,6 @@ public: void LoadConfigSettings(bool reload = false) override; void SendWorldText(uint32 string_id, ...) override; - void SendGlobalText(const char* text, WorldSession* self) override; void SendGMText(uint32 string_id, ...) override; void SendGlobalMessage(WorldPacket const* packet, WorldSession* self = nullptr, TeamId teamId = TEAM_NEUTRAL) override; void SendGlobalGMMessage(WorldPacket const* packet, WorldSession* self = nullptr, TeamId teamId = TEAM_NEUTRAL) override; diff --git a/src/server/scripts/Commands/cs_account.cpp b/src/server/scripts/Commands/cs_account.cpp index 3187e6a74..922ea5cb1 100644 --- a/src/server/scripts/Commands/cs_account.cpp +++ b/src/server/scripts/Commands/cs_account.cpp @@ -52,46 +52,46 @@ public: { static ChatCommandTable accountSetCommandTable = { - { "addon", SEC_GAMEMASTER, true, &HandleAccountSetAddonCommand, "" }, - { "gmlevel", SEC_CONSOLE, true, &HandleAccountSetGmLevelCommand, "" }, - { "password", SEC_CONSOLE, true, &HandleAccountSetPasswordCommand, "" }, - { "2fa", SEC_PLAYER, true, &HandleAccountSet2FACommand, "" } + { "addon", HandleAccountSetAddonCommand, SEC_GAMEMASTER, Console::Yes }, + { "gmlevel", HandleAccountSetGmLevelCommand, SEC_ADMINISTRATOR, Console::Yes }, + { "password", HandleAccountSetPasswordCommand, SEC_ADMINISTRATOR, Console::Yes }, + { "2fa", HandleAccountSet2FACommand, SEC_PLAYER, Console::Yes } }; static ChatCommandTable accountLockCommandTable { - { "country", SEC_PLAYER, true, &HandleAccountLockCountryCommand, "" }, - { "ip", SEC_PLAYER, true, &HandleAccountLockIpCommand, "" } + { "country", HandleAccountLockCountryCommand, SEC_PLAYER, Console::Yes }, + { "ip", HandleAccountLockIpCommand, SEC_PLAYER, Console::Yes } }; static ChatCommandTable account2faCommandTable { - { "setup", SEC_PLAYER, false, &HandleAccount2FASetupCommand, "" }, - { "remove", SEC_PLAYER, false, &HandleAccount2FARemoveCommand, "" }, + { "setup", HandleAccount2FASetupCommand, SEC_PLAYER, Console::No }, + { "remove", HandleAccount2FARemoveCommand, SEC_PLAYER, Console::No } }; static ChatCommandTable accountRemoveCommandTable { - { "country", SEC_ADMINISTRATOR, true, &HandleAccountRemoveLockCountryCommand, "" } + { "country", HandleAccountRemoveLockCountryCommand, SEC_ADMINISTRATOR, Console::Yes }, }; static ChatCommandTable accountCommandTable = { - { "2fa", SEC_PLAYER, true, nullptr, "", account2faCommandTable }, - { "addon", SEC_MODERATOR, false, &HandleAccountAddonCommand, "" }, - { "create", SEC_CONSOLE, true, &HandleAccountCreateCommand, "" }, - { "delete", SEC_CONSOLE, true, &HandleAccountDeleteCommand, "" }, - { "onlinelist", SEC_CONSOLE, true, &HandleAccountOnlineListCommand, "" }, - { "lock", SEC_PLAYER, false, nullptr, "", accountLockCommandTable }, - { "set", SEC_ADMINISTRATOR, true, nullptr, "", accountSetCommandTable }, - { "password", SEC_PLAYER, false, &HandleAccountPasswordCommand, "" }, - { "remove", SEC_ADMINISTRATOR, true, nullptr, "", accountRemoveCommandTable }, - { "", SEC_PLAYER, false, &HandleAccountCommand, "" } + { "2fa", account2faCommandTable }, + { "addon", HandleAccountAddonCommand, SEC_MODERATOR, Console::No }, + { "create", HandleAccountCreateCommand, SEC_CONSOLE, Console::Yes }, + { "delete", HandleAccountDeleteCommand, SEC_CONSOLE, Console::Yes }, + { "onlinelist", HandleAccountOnlineListCommand, SEC_CONSOLE, Console::Yes }, + { "lock", accountLockCommandTable }, + { "set", accountSetCommandTable }, + { "password", HandleAccountPasswordCommand, SEC_PLAYER, Console::No }, + { "remove", accountRemoveCommandTable }, + { "", HandleAccountCommand, SEC_PLAYER, Console::No } }; static ChatCommandTable commandTable = { - { "account", SEC_PLAYER, true, nullptr, "", accountCommandTable } + { "account", accountCommandTable } }; return commandTable; diff --git a/src/server/scripts/Commands/cs_ban.cpp b/src/server/scripts/Commands/cs_ban.cpp index 4bdec3f6c..a17880f23 100644 --- a/src/server/scripts/Commands/cs_ban.cpp +++ b/src/server/scripts/Commands/cs_ban.cpp @@ -56,40 +56,40 @@ public: { static ChatCommandTable unbanCommandTable = { - { "account", SEC_ADMINISTRATOR, true, &HandleUnBanAccountCommand, "" }, - { "character", SEC_ADMINISTRATOR, true, &HandleUnBanCharacterCommand, "" }, - { "playeraccount", SEC_ADMINISTRATOR, true, &HandleUnBanAccountByCharCommand, "" }, - { "ip", SEC_ADMINISTRATOR, true, &HandleUnBanIPCommand, "" } + { "account", HandleUnBanAccountCommand, SEC_ADMINISTRATOR, Console::Yes }, + { "character", HandleUnBanCharacterCommand, SEC_ADMINISTRATOR, Console::Yes }, + { "playeraccount", HandleUnBanAccountByCharCommand, SEC_ADMINISTRATOR, Console::Yes }, + { "ip", HandleUnBanIPCommand, SEC_ADMINISTRATOR, Console::Yes } }; static ChatCommandTable banlistCommandTable = { - { "account", SEC_GAMEMASTER, true, &HandleBanListAccountCommand, "" }, - { "character", SEC_GAMEMASTER, true, &HandleBanListCharacterCommand, "" }, - { "ip", SEC_GAMEMASTER, true, &HandleBanListIPCommand, "" } + { "account", HandleBanListAccountCommand, SEC_GAMEMASTER, Console::Yes }, + { "character", HandleBanListCharacterCommand, SEC_GAMEMASTER, Console::Yes }, + { "ip", HandleBanListIPCommand, SEC_GAMEMASTER, Console::Yes } }; static ChatCommandTable baninfoCommandTable = { - { "account", SEC_GAMEMASTER, true, &HandleBanInfoAccountCommand, "" }, - { "character", SEC_GAMEMASTER, true, &HandleBanInfoCharacterCommand, "" }, - { "ip", SEC_GAMEMASTER, true, &HandleBanInfoIPCommand, "" } + { "account", HandleBanInfoAccountCommand, SEC_GAMEMASTER, Console::Yes }, + { "character", HandleBanInfoCharacterCommand, SEC_GAMEMASTER, Console::Yes }, + { "ip", HandleBanInfoIPCommand, SEC_GAMEMASTER, Console::Yes } }; static ChatCommandTable banCommandTable = { - { "account", SEC_GAMEMASTER, true, &HandleBanAccountCommand, "" }, - { "character", SEC_GAMEMASTER, true, &HandleBanCharacterCommand, "" }, - { "playeraccount", SEC_GAMEMASTER, true, &HandleBanAccountByCharCommand, "" }, - { "ip", SEC_GAMEMASTER, true, &HandleBanIPCommand, "" } + { "account", HandleBanAccountCommand, SEC_GAMEMASTER, Console::Yes }, + { "character", HandleBanCharacterCommand, SEC_GAMEMASTER, Console::Yes }, + { "playeraccount",HandleBanAccountByCharCommand, SEC_GAMEMASTER, Console::Yes }, + { "ip", HandleBanIPCommand, SEC_GAMEMASTER, Console::Yes } }; static ChatCommandTable commandTable = { - { "ban", SEC_GAMEMASTER, true, nullptr, "", banCommandTable }, - { "baninfo", SEC_GAMEMASTER, true, nullptr, "", baninfoCommandTable }, - { "banlist", SEC_GAMEMASTER, true, nullptr, "", banlistCommandTable }, - { "unban", SEC_ADMINISTRATOR, true, nullptr, "", unbanCommandTable } + { "ban", banCommandTable }, + { "baninfo", baninfoCommandTable }, + { "banlist", banlistCommandTable }, + { "unban", unbanCommandTable } }; return commandTable; diff --git a/src/server/scripts/Commands/cs_learn.cpp b/src/server/scripts/Commands/cs_learn.cpp index 6664a294d..08c29492d 100644 --- a/src/server/scripts/Commands/cs_learn.cpp +++ b/src/server/scripts/Commands/cs_learn.cpp @@ -50,7 +50,7 @@ public: static ChatCommandTable learnAllCommandTable = { - { "my", learnAllMyCommandTable }, + { "my", learnAllMyCommandTable }, { "gm", HandleLearnAllGMCommand, SEC_GAMEMASTER, Console::No }, { "crafts", HandleLearnAllCraftsCommand, SEC_GAMEMASTER, Console::No }, { "default", HandleLearnAllDefaultCommand, SEC_GAMEMASTER, Console::No }, @@ -60,14 +60,14 @@ public: static ChatCommandTable learnCommandTable = { - { "all", learnAllCommandTable }, + { "all", learnAllCommandTable }, { "", HandleLearnCommand, SEC_GAMEMASTER, Console::No } }; static ChatCommandTable commandTable = { - { "learn", learnCommandTable }, - { "unlearn", HandleUnLearnCommand, SEC_GAMEMASTER, Console::No } + { "learn", learnCommandTable }, + { "unlearn", HandleUnLearnCommand, SEC_GAMEMASTER, Console::No } }; return commandTable; } diff --git a/src/server/scripts/Commands/cs_reload.cpp b/src/server/scripts/Commands/cs_reload.cpp index 9ea10809b..81f3e2639 100644 --- a/src/server/scripts/Commands/cs_reload.cpp +++ b/src/server/scripts/Commands/cs_reload.cpp @@ -800,7 +800,7 @@ public: { LOG_INFO("server.loading", "Reloading `reputation_reward_rate` Table!" ); sObjectMgr->LoadReputationRewardRate(); - handler->SendGlobalSysMessage("DB table `reputation_reward_rate` reloaded."); + handler->SendGlobalGMSysMessage("DB table `reputation_reward_rate` reloaded."); return true; } @@ -808,7 +808,7 @@ public: { LOG_INFO("server.loading", "Reloading `reputation_spillover_template` Table!" ); sObjectMgr->LoadReputationSpilloverTemplate(); - handler->SendGlobalSysMessage("DB table `reputation_spillover_template` reloaded."); + handler->SendGlobalGMSysMessage("DB table `reputation_spillover_template` reloaded."); return true; } diff --git a/src/server/scripts/Commands/cs_wp.cpp b/src/server/scripts/Commands/cs_wp.cpp index fa77beb3a..2200d5683 100644 --- a/src/server/scripts/Commands/cs_wp.cpp +++ b/src/server/scripts/Commands/cs_wp.cpp @@ -42,17 +42,17 @@ public: { static ChatCommandTable wpCommandTable = { - { "add", SEC_ADMINISTRATOR, false, &HandleWpAddCommand, "" }, - { "event", SEC_ADMINISTRATOR, false, &HandleWpEventCommand, "" }, - { "load", SEC_ADMINISTRATOR, false, &HandleWpLoadCommand, "" }, - { "modify", SEC_ADMINISTRATOR, false, &HandleWpModifyCommand, "" }, - { "unload", SEC_ADMINISTRATOR, false, &HandleWpUnLoadCommand, "" }, - { "reload", SEC_ADMINISTRATOR, false, &HandleWpReloadCommand, "" }, - { "show", SEC_ADMINISTRATOR, false, &HandleWpShowCommand, "" } + { "add", HandleWpAddCommand, SEC_ADMINISTRATOR, Console::No }, + { "event", HandleWpEventCommand, SEC_ADMINISTRATOR, Console::No }, + { "load", HandleWpLoadCommand, SEC_ADMINISTRATOR, Console::No }, + { "modify", HandleWpModifyCommand, SEC_ADMINISTRATOR, Console::No }, + { "unload", HandleWpUnLoadCommand, SEC_ADMINISTRATOR, Console::No }, + { "reload", HandleWpReloadCommand, SEC_ADMINISTRATOR, Console::No }, + { "show", HandleWpShowCommand, SEC_ADMINISTRATOR, Console::No } }; static ChatCommandTable commandTable = { - { "wp", SEC_ADMINISTRATOR, false, nullptr, "", wpCommandTable } + { "wp", wpCommandTable } }; return commandTable; } diff --git a/src/server/scripts/Events/firework_show/firework_show.cpp b/src/server/scripts/Events/firework_show/firework_show.cpp index b3afb0a00..bbe92223a 100644 --- a/src/server/scripts/Events/firework_show/firework_show.cpp +++ b/src/server/scripts/Events/firework_show/firework_show.cpp @@ -178,6 +178,7 @@ struct go_firework_show : public GameObjectAI // trigger despawn animation for firework explosion if (go) { + go->setActive(true); go->DespawnOrUnsummon(); go->AddObjectToRemoveList(); } diff --git a/src/server/scripts/Events/midsummer.cpp b/src/server/scripts/Events/midsummer.cpp index 4873b3ce4..57e669047 100644 --- a/src/server/scripts/Events/midsummer.cpp +++ b/src/server/scripts/Events/midsummer.cpp @@ -22,7 +22,6 @@ #include "Player.h" #include "PlayerScript.h" #include "ScriptedCreature.h" -#include "ScriptedGossip.h" #include "Spell.h" #include "SpellAuras.h" #include "SpellScript.h" diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPEP.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPEP.cpp index 83eec57e2..34a66aa37 100644 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPEP.cpp +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPEP.cpp @@ -16,7 +16,6 @@ */ #include "OutdoorPvPEP.h" -#include "CreatureScript.h" #include "GameGraveyard.h" #include "GameObject.h" #include "Language.h" diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPGH.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPGH.cpp index 9906fa10c..fcd214106 100644 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPGH.cpp +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPGH.cpp @@ -16,7 +16,6 @@ */ #include "OutdoorPvPGH.h" -#include "CreatureScript.h" #include "GameEventMgr.h" #include "MapMgr.h" #include "OutdoorPvPMgr.h" diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp index 54888d53e..91efd32be 100644 --- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp +++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp @@ -20,6 +20,7 @@ #include "SpellInfo.h" #include "SpellScriptLoader.h" #include "shadow_labyrinth.h" +#include "SpellScript.h" enum Spells { 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 93c2be521..1f1a99d59 100644 --- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/instance_shadow_labyrinth.cpp +++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/instance_shadow_labyrinth.cpp @@ -19,6 +19,7 @@ #include "InstanceScript.h" #include "SpellScriptLoader.h" #include "shadow_labyrinth.h" +#include "SpellScript.h" DoorData const doorData[] = { diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/shadow_labyrinth.h b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/shadow_labyrinth.h index e6e77bdd8..4a6d94af5 100644 --- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/shadow_labyrinth.h +++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/shadow_labyrinth.h @@ -18,10 +18,8 @@ #ifndef DEF_SHADOW_LABYRINTH_H #define DEF_SHADOW_LABYRINTH_H -#include "CreatureAI.h" #include "CreatureAIImpl.h" #include "GridNotifiers.h" -#include "SpellScript.h" #define ShadowLabyrinthScriptName "instance_shadow_labyrinth" diff --git a/src/server/scripts/Outland/BlackTemple/black_temple.h b/src/server/scripts/Outland/BlackTemple/black_temple.h index e4febfe05..4b88eff27 100644 --- a/src/server/scripts/Outland/BlackTemple/black_temple.h +++ b/src/server/scripts/Outland/BlackTemple/black_temple.h @@ -19,12 +19,6 @@ #define BLACK_TEMPLE_H_ #include "CreatureAIImpl.h" -#include "GridNotifiers.h" -#include "PassiveAI.h" -#include "Player.h" -#include "ScriptedGossip.h" -#include "SpellAuraEffects.h" -#include "SpellScript.h" #define DataHeader "BT" diff --git a/src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp b/src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp index e5fecceb4..4fb630a65 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp @@ -19,6 +19,7 @@ #include "ScriptedCreature.h" #include "SpellScriptLoader.h" #include "black_temple.h" +#include "SpellScript.h" enum Says { diff --git a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp index 9d930d21a..4c26f09ab 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp @@ -20,6 +20,10 @@ #include "ScriptedEscortAI.h" #include "SpellScriptLoader.h" #include "black_temple.h" +#include "Player.h" +#include "ScriptedGossip.h" +#include "SpellAuraEffects.h" +#include "SpellScript.h" enum Says { diff --git a/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp b/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp index c0e99e6ad..3706fd211 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp @@ -19,6 +19,9 @@ #include "ScriptedCreature.h" #include "SpellScriptLoader.h" #include "black_temple.h" +#include "GridNotifiers.h" +#include "SpellAuraEffects.h" +#include "SpellScript.h" enum Says { diff --git a/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp b/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp index 8054df37c..741082b65 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp @@ -20,6 +20,9 @@ #include "Spell.h" #include "SpellScriptLoader.h" #include "black_temple.h" +#include "Player.h" +#include "SpellAuraEffects.h" +#include "SpellScript.h" enum Says { 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 a48e835c3..da4f9f9f0 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp @@ -19,6 +19,11 @@ #include "ScriptedCreature.h" #include "SpellScriptLoader.h" #include "black_temple.h" +#include "PassiveAI.h" +#include "ScriptedGossip.h" +#include "SpellAuras.h" +#include "SpellInfo.h" +#include "SpellScript.h" enum Says { @@ -81,7 +86,8 @@ enum Misc ACTION_AKAMA_START_OUTRO = 1, FACTION_DEFAULT = 1820, - FACTION_ENGAGE = 1868 + FACTION_ENGAGE = 1868, + FACTION_DEFENDER = 1847 }; Position AkamaEngage = { 517.4877f, 400.79926f, 112.77704f }; @@ -364,11 +370,14 @@ struct npc_creature_generator_akama : public ScriptedAI summon->GetMotionMaster()->MovePoint(POINT_ENGAGE, x, y, z); } break; - default: - summon->SetInCombatWithZone(); + case NPC_ASHTONGUE_DEFENDER: + summon->SetFaction(FACTION_DEFENDER); if (Creature* akama = instance->GetCreature(DATA_AKAMA_SHADE)) summon->AI()->AttackStart(akama); break; + default: + summon->SetInCombatWithZone(); + break; } } diff --git a/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp b/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp index 8c0e5d9cb..dca4b7e26 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp @@ -19,6 +19,11 @@ #include "ScriptedCreature.h" #include "SpellScriptLoader.h" #include "black_temple.h" +#include "PassiveAI.h" +#include "Player.h" +#include "SpellAuraEffects.h" +#include "SpellAuras.h" +#include "SpellScript.h" enum Says { @@ -77,7 +82,7 @@ struct boss_teron_gorefiend : public BossAI void Reset() override { BossAI::Reset(); - me->CastSpell(me, SPELL_SHADOW_OF_DEATH_REMOVE, true); + DoCastSelf(SPELL_SHADOW_OF_DEATH_REMOVE, true); } void JustEngagedWith(Unit* who) override @@ -155,7 +160,7 @@ struct boss_teron_gorefiend : public BossAI { BossAI::JustDied(killer); Talk(SAY_DEATH); - me->CastSpell(me, SPELL_SHADOW_OF_DEATH_REMOVE, true); + DoCastSelf(SPELL_SHADOW_OF_DEATH_REMOVE, true); } void UpdateAI(uint32 diff) override @@ -172,6 +177,17 @@ struct boss_teron_gorefiend : public BossAI bool _intro; }; +struct npc_vengeful_spirit : public NullCreatureAI +{ + npc_vengeful_spirit(Creature* creature) : NullCreatureAI(creature) { } + + void OnCharmed(bool apply) + { + if (!apply) + me->DespawnOnEvade(); + } +}; + class spell_teron_gorefiend_shadow_of_death : public AuraScript { PrepareAuraScript(spell_teron_gorefiend_shadow_of_death); @@ -231,7 +247,7 @@ class spell_teron_gorefiend_spiritual_vengeance : public AuraScript { PrepareAuraScript(spell_teron_gorefiend_spiritual_vengeance); - void HandleEffectRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) + void HandleEffectRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) { Unit::Kill(nullptr, GetTarget()); } @@ -276,12 +292,44 @@ class spell_teron_gorefiend_shadowy_construct : public AuraScript } }; +class spell_teron_gorefiend_shadow_of_death_remove : public SpellScript +{ + PrepareSpellScript(spell_teron_gorefiend_shadow_of_death_remove); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo( + { + SPELL_SHADOW_OF_DEATH, + SPELL_POSSESS_SPIRIT_IMMUNE, + SPELL_SPIRITUAL_VENGEANCE + }); + } + + void HandleOnHit() + { + if (Unit* target = GetHitUnit()) + { + target->RemoveAurasDueToSpell(SPELL_POSSESS_SPIRIT_IMMUNE); + target->RemoveAurasDueToSpell(SPELL_SPIRITUAL_VENGEANCE); + target->RemoveAurasDueToSpell(SPELL_SHADOW_OF_DEATH); + } + } + + void Register() override + { + OnHit += SpellHitFn(spell_teron_gorefiend_shadow_of_death_remove::HandleOnHit); + } +}; + void AddSC_boss_teron_gorefiend() { RegisterBlackTempleCreatureAI(boss_teron_gorefiend); + RegisterBlackTempleCreatureAI(npc_vengeful_spirit); RegisterSpellScript(spell_teron_gorefiend_shadow_of_death); RegisterSpellScript(spell_teron_gorefiend_spirit_lance); RegisterSpellScript(spell_teron_gorefiend_spiritual_vengeance); RegisterSpellScript(spell_teron_gorefiend_shadowy_construct); + RegisterSpellScript(spell_teron_gorefiend_shadow_of_death_remove); } diff --git a/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp b/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp index 101122b56..90c2538f5 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp @@ -19,6 +19,7 @@ #include "ScriptedCreature.h" #include "SpellScriptLoader.h" #include "black_temple.h" +#include "SpellScript.h" enum Yells { diff --git a/src/server/scripts/Outland/BlackTemple/illidari_council.cpp b/src/server/scripts/Outland/BlackTemple/illidari_council.cpp index c7be8416d..93e559147 100644 --- a/src/server/scripts/Outland/BlackTemple/illidari_council.cpp +++ b/src/server/scripts/Outland/BlackTemple/illidari_council.cpp @@ -19,6 +19,9 @@ #include "ScriptedCreature.h" #include "SpellScriptLoader.h" #include "black_temple.h" +#include "Player.h" +#include "SpellAuraEffects.h" +#include "SpellScript.h" enum Says { diff --git a/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp b/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp index a7c6d7011..2e0f7db89 100644 --- a/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp +++ b/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp @@ -20,6 +20,9 @@ #include "InstanceScript.h" #include "SpellScriptLoader.h" #include "black_temple.h" +#include "SpellAuraEffects.h" +#include "SpellAuras.h" +#include "SpellScript.h" DoorData const doorData[] = { @@ -104,7 +107,6 @@ public: { switch (creature->GetEntry()) { - case NPC_VENGEFUL_SPIRIT: case NPC_SHADOWY_CONSTRUCT: if (Creature* teron = GetCreature(DATA_TERON_GOREFIEND)) teron->AI()->JustSummoned(creature); diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp index 667b83773..f3c966b33 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp @@ -20,6 +20,8 @@ #include "SpellScriptLoader.h" #include "TaskScheduler.h" #include "serpent_shrine.h" +#include "SpellAuraEffects.h" +#include "SpellScript.h" enum Talk { diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_hydross_the_unstable.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_hydross_the_unstable.cpp index 1423cc949..ca70ae838 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_hydross_the_unstable.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_hydross_the_unstable.cpp @@ -19,6 +19,7 @@ #include "ScriptedCreature.h" #include "SpellScriptLoader.h" #include "serpent_shrine.h" +#include "SpellScript.h" enum Talk { 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 2f48c1338..9cc9fadaf 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp @@ -22,6 +22,7 @@ #include "SpellScriptLoader.h" #include "WorldSession.h" #include "serpent_shrine.h" +#include "SpellScript.h" enum Says { 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 92c75da7f..c632d961c 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 @@ -17,11 +17,14 @@ #include "CreatureGroups.h" #include "CreatureScript.h" +#include "GridNotifiers.h" #include "Player.h" #include "ScriptedCreature.h" #include "SpellScriptLoader.h" #include "TaskScheduler.h" #include "serpent_shrine.h" +#include "SpellAuraEffects.h" +#include "SpellScript.h" enum Talk { 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 ea7d032e4..08bdae70a 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp @@ -17,9 +17,12 @@ #include "CreatureScript.h" #include "GameObjectScript.h" +#include "Player.h" #include "ScriptedCreature.h" #include "SpellScriptLoader.h" #include "serpent_shrine.h" +#include "SpellAuraEffects.h" +#include "SpellScript.h" enum Spells { diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp index 54b5d154a..2494acf59 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp @@ -19,6 +19,7 @@ #include "ScriptedCreature.h" #include "SpellScriptLoader.h" #include "serpent_shrine.h" +#include "SpellScript.h" enum Yells { 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 54ee662b5..59ca24665 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp @@ -23,6 +23,8 @@ #include "SpellScriptLoader.h" #include "TemporarySummon.h" #include "serpent_shrine.h" +#include "SpellAuraEffects.h" +#include "SpellScript.h" DoorData const doorData[] = { diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/serpent_shrine.h b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/serpent_shrine.h index 8453d8e37..4a1d5e276 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/serpent_shrine.h +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/serpent_shrine.h @@ -18,12 +18,7 @@ #ifndef DEF_SERPENT_SHRINE_H #define DEF_SERPENT_SHRINE_H -#include "CreatureAI.h" #include "CreatureAIImpl.h" -#include "GridNotifiers.h" -#include "Player.h" -#include "SpellAuraEffects.h" -#include "SpellScript.h" #define DataHeader "SS" diff --git a/src/server/scripts/Outland/CoilfangReservoir/SlavePens/boss_ahune.cpp b/src/server/scripts/Outland/CoilfangReservoir/SlavePens/boss_ahune.cpp index 940f36955..265c3fef9 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SlavePens/boss_ahune.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SlavePens/boss_ahune.cpp @@ -27,7 +27,6 @@ #include "Map.h" #include "MotionMaster.h" #include "ObjectAccessor.h" -#include "PassiveAI.h" #include "Player.h" #include "ScriptMgr.h" #include "ScriptedCreature.h" diff --git a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/steam_vault.h b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/steam_vault.h index af2e2c427..3eeaf3266 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/steam_vault.h +++ b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/steam_vault.h @@ -19,7 +19,6 @@ #define DEF_STEAM_VAULT_H #include "CreatureAIImpl.h" -#include "PassiveAI.h" #define DataHeaders "SV" diff --git a/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp b/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp index 773ec71d3..8a0357ab0 100644 --- a/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp +++ b/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp @@ -21,6 +21,7 @@ #include "SpellScript.h" #include "SpellScriptLoader.h" #include "gruuls_lair.h" +#include "SpellAuraEffects.h" enum Yells { diff --git a/src/server/scripts/Outland/GruulsLair/gruuls_lair.h b/src/server/scripts/Outland/GruulsLair/gruuls_lair.h index 91244e4af..5aacb769f 100644 --- a/src/server/scripts/Outland/GruulsLair/gruuls_lair.h +++ b/src/server/scripts/Outland/GruulsLair/gruuls_lair.h @@ -18,9 +18,7 @@ #ifndef GRUULS_LAIR_H_ #define GRUULS_LAIR_H_ -#include "CreatureAI.h" #include "CreatureAIImpl.h" -#include "SpellAuraEffects.h" #define DataHeader "GL" 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 e47c11657..ec612ddfd 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 @@ -20,6 +20,7 @@ #include "SpellScriptLoader.h" #include "TaskScheduler.h" #include "hellfire_ramparts.h" +#include "SpellScript.h" enum Says { diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_watchkeeper_gargolmar.cpp b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_watchkeeper_gargolmar.cpp index ea4a66c1e..26728de35 100644 --- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_watchkeeper_gargolmar.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_watchkeeper_gargolmar.cpp @@ -19,6 +19,7 @@ #include "ScriptedCreature.h" #include "SpellScriptLoader.h" #include "hellfire_ramparts.h" +#include "SpellScript.h" enum Says { diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/hellfire_ramparts.h b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/hellfire_ramparts.h index 0f6109880..95a8512c3 100644 --- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/hellfire_ramparts.h +++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/hellfire_ramparts.h @@ -19,7 +19,6 @@ #define DEF_RAMPARTS_H #include "CreatureAIImpl.h" -#include "SpellScript.h" #define DataHeader "HR" #define HellfireRampartsScriptName "instance_hellfire_ramparts" diff --git a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp index 09183cc5d..37b3a95b1 100644 --- a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp @@ -23,6 +23,7 @@ #include "SpellScriptLoader.h" #include "TaskScheduler.h" #include "magtheridons_lair.h" +#include "SpellScript.h" enum Yells { diff --git a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/magtheridons_lair.h b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/magtheridons_lair.h index 4e2828016..b9a6341d7 100644 --- a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/magtheridons_lair.h +++ b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/magtheridons_lair.h @@ -19,8 +19,6 @@ #define DEF_MAGTHERIDONS_LAIR_H #include "CreatureAIImpl.h" -#include "SpellScript.h" - #define DataHeader "ML" #define MagtheridonsLairScriptName "instance_magtheridons_lair" diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp index bcdc68443..e5723aee5 100644 --- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp @@ -21,6 +21,7 @@ #include "ScriptedCreature.h" #include "SpellScriptLoader.h" #include "shattered_halls.h" +#include "SpellScript.h" enum Texts { diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/shattered_halls.h b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/shattered_halls.h index 07c31a3ba..9001522a8 100644 --- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/shattered_halls.h +++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/shattered_halls.h @@ -19,8 +19,6 @@ #define DEF_SHATTERED_H #include "CreatureAIImpl.h" -#include "PassiveAI.h" -#include "SpellScript.h" #define ShatteredHallsLairScriptName "instance_shattered_halls" diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp index 7e17bbf66..f028ac61f 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp @@ -23,6 +23,9 @@ #include "the_eye.h" #include +#include "Player.h" +#include "SpellScript.h" + enum Spells { SPELL_BERSERK = 45078, diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp index 3ca2ffeb8..dc1b9a02c 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp @@ -17,6 +17,8 @@ #include "CreatureScript.h" #include "ScriptedCreature.h" +#include "SpellAuras.h" +#include "SpellScript.h" #include "SpellScriptLoader.h" #include "the_eye.h" diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp index 0de1b41ea..303e091af 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp @@ -16,8 +16,9 @@ */ #include "CreatureScript.h" -#include "Opcodes.h" +#include "GridNotifiers.h" #include "ScriptedCreature.h" +#include "SpellScript.h" #include "SpellScriptLoader.h" #include "WorldPacket.h" #include "the_eye.h" 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 4da9dbc14..354e45c41 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/instance_the_eye.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/instance_the_eye.cpp @@ -17,6 +17,7 @@ #include "InstanceMapScript.h" #include "InstanceScript.h" +#include "SpellScript.h" #include "SpellScriptLoader.h" #include "the_eye.h" diff --git a/src/server/scripts/Outland/TempestKeep/Eye/the_eye.h b/src/server/scripts/Outland/TempestKeep/Eye/the_eye.h index ad911b563..d480f7f84 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/the_eye.h +++ b/src/server/scripts/Outland/TempestKeep/Eye/the_eye.h @@ -19,10 +19,6 @@ #define DEF_THE_EYE_H #include "CreatureAIImpl.h" -#include "GridNotifiers.h" -#include "Player.h" -#include "SpellAuraEffects.h" -#include "SpellScript.h" #define DataHeader "TE" diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp index c4adf4215..99a367c1c 100644 --- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp +++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp @@ -19,6 +19,8 @@ #include "ScriptedCreature.h" #include "SpellScriptLoader.h" #include "mechanar.h" +#include "SpellAuraEffects.h" +#include "SpellScript.h" enum Says { diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/mechanar.h b/src/server/scripts/Outland/TempestKeep/Mechanar/mechanar.h index 4f3f8567b..9d3e3074a 100644 --- a/src/server/scripts/Outland/TempestKeep/Mechanar/mechanar.h +++ b/src/server/scripts/Outland/TempestKeep/Mechanar/mechanar.h @@ -18,11 +18,7 @@ #ifndef DEF_MECHANAR_H #define DEF_MECHANAR_H -#include "CreatureAI.h" #include "CreatureAIImpl.h" -#include "Player.h" -#include "SpellAuraEffects.h" -#include "SpellScript.h" #define DataHeader "MR" diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp b/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp index 1fabae440..f9f5dad49 100644 --- a/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp +++ b/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp @@ -17,7 +17,9 @@ #include "arcatraz.h" #include "CreatureScript.h" +#include "Player.h" #include "ScriptedCreature.h" +#include "SpellScript.h" #include "SpellScriptLoader.h" enum MillhouseSays diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.h b/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.h index a95acaf31..9c0cb31ee 100644 --- a/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.h +++ b/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.h @@ -18,10 +18,7 @@ #ifndef ARCATRAZ_H #define ARCATRAZ_H -#include "CreatureAI.h" #include "CreatureAIImpl.h" -#include "Player.h" -#include "SpellScript.h" #define DataHeader "AZ" diff --git a/src/server/scripts/Outland/TempestKeep/botanica/instance_the_botanica.cpp b/src/server/scripts/Outland/TempestKeep/botanica/instance_the_botanica.cpp index 02c20d600..082a918e9 100644 --- a/src/server/scripts/Outland/TempestKeep/botanica/instance_the_botanica.cpp +++ b/src/server/scripts/Outland/TempestKeep/botanica/instance_the_botanica.cpp @@ -19,6 +19,7 @@ #include "GameTime.h" #include "InstanceMapScript.h" #include "InstanceScript.h" +#include "SpellScript.h" #include "SpellScriptLoader.h" #include "the_botanica.h" diff --git a/src/server/scripts/Outland/TempestKeep/botanica/the_botanica.h b/src/server/scripts/Outland/TempestKeep/botanica/the_botanica.h index 44d4e44a8..af44f970d 100644 --- a/src/server/scripts/Outland/TempestKeep/botanica/the_botanica.h +++ b/src/server/scripts/Outland/TempestKeep/botanica/the_botanica.h @@ -19,7 +19,6 @@ #define DEF_THE_BOTANICA_H #include "CreatureAIImpl.h" -#include "SpellScript.h" #define TheBotanicaScriptName "instance_the_botanica" diff --git a/src/server/scripts/Outland/zone_blades_edge_mountains.cpp b/src/server/scripts/Outland/zone_blades_edge_mountains.cpp index e3fa09e7e..9f549e2b7 100644 --- a/src/server/scripts/Outland/zone_blades_edge_mountains.cpp +++ b/src/server/scripts/Outland/zone_blades_edge_mountains.cpp @@ -23,7 +23,6 @@ #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "SpellAuraEffects.h" -#include "SpellAuras.h" #include "SpellInfo.h" #include "SpellScript.h" #include "SpellScriptLoader.h" diff --git a/src/server/scripts/Outland/zone_nagrand.cpp b/src/server/scripts/Outland/zone_nagrand.cpp index 1439b72f8..c7d83bc7a 100644 --- a/src/server/scripts/Outland/zone_nagrand.cpp +++ b/src/server/scripts/Outland/zone_nagrand.cpp @@ -20,7 +20,6 @@ #include "Player.h" #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" -#include "ScriptedGossip.h" #include "SpellInfo.h" /* ScriptData SDName: Nagrand diff --git a/src/server/scripts/Pet/pet_priest.cpp b/src/server/scripts/Pet/pet_priest.cpp index 41a77a49e..43ce08fbd 100644 --- a/src/server/scripts/Pet/pet_priest.cpp +++ b/src/server/scripts/Pet/pet_priest.cpp @@ -21,7 +21,6 @@ */ #include "CreatureScript.h" -#include "PassiveAI.h" #include "PetAI.h" #include "ScriptedCreature.h" #include "TotemAI.h" diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp index c2bfac4eb..7519981de 100644 --- a/src/server/scripts/Spells/spell_quest.cpp +++ b/src/server/scripts/Spells/spell_quest.cpp @@ -22,7 +22,6 @@ #include "MapMgr.h" #include "ScriptedCreature.h" #include "SpellAuraEffects.h" -#include "SpellAuras.h" #include "SpellScript.h" #include "SpellScriptLoader.h" #include "Vehicle.h" diff --git a/src/server/scripts/Spells/spell_shaman.cpp b/src/server/scripts/Spells/spell_shaman.cpp index 5ca5f32b2..415f609fe 100644 --- a/src/server/scripts/Spells/spell_shaman.cpp +++ b/src/server/scripts/Spells/spell_shaman.cpp @@ -21,7 +21,6 @@ #include "SpellMgr.h" #include "SpellScript.h" #include "SpellScriptLoader.h" -#include "TemporarySummon.h" #include "Unit.h" /* * Scripts for spells with SPELLFAMILY_SHAMAN and SPELLFAMILY_GENERIC spells used by shaman players. diff --git a/src/server/scripts/World/achievement_scripts.cpp b/src/server/scripts/World/achievement_scripts.cpp index 36be187d1..bdcba3df3 100644 --- a/src/server/scripts/World/achievement_scripts.cpp +++ b/src/server/scripts/World/achievement_scripts.cpp @@ -23,7 +23,6 @@ #include "BattlegroundWS.h" #include "Creature.h" #include "Player.h" -#include "Vehicle.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 d6c79ad49..541bebaa8 100644 --- a/src/server/scripts/World/areatrigger_scripts.cpp +++ b/src/server/scripts/World/areatrigger_scripts.cpp @@ -16,11 +16,9 @@ */ #include "AreaTriggerScript.h" -#include "CreatureScript.h" #include "GameTime.h" #include "Player.h" #include "ScriptedCreature.h" -#include "SpellMgr.h" /* ScriptData SDName: Areatrigger_Scripts SD%Complete: 100 diff --git a/src/server/scripts/World/chat_log.cpp b/src/server/scripts/World/chat_log.cpp index 8426fc65f..b58ee8117 100644 --- a/src/server/scripts/World/chat_log.cpp +++ b/src/server/scripts/World/chat_log.cpp @@ -16,7 +16,6 @@ */ #include "Channel.h" -#include "CreatureScript.h" #include "Group.h" #include "Guild.h" #include "Log.h" @@ -64,10 +63,15 @@ public: player->GetName(), chatType, lang, msg); } - void OnChat(Player* player, uint32 /*type*/, uint32 /*lang*/, std::string& msg, Player* receiver) override + void OnChat(Player* player, uint32 /*type*/, uint32 lang, std::string& msg, Player* receiver) override { - LOG_INFO("chat.whisper", "Player {} tells {}: {}", - player->GetName(), receiver ? receiver->GetName() : "", msg); + //! NOTE: + //! LANG_ADDON can only be sent by client in "PARTY", "RAID", "GUILD", "BATTLEGROUND", "WHISPER" + std::string logType = (lang != LANG_ADDON) ? "chat." : "chat.addon."; + std::string msgType = "whisper"; + + LOG_INFO(logType + msgType, "Player {} {} {}: {}", + player->GetName(), msgType, receiver ? receiver->GetName() : "", msg); } void OnChat(Player* player, uint32 type, uint32 lang, std::string& msg, Group* group) override diff --git a/src/server/scripts/World/guards.cpp b/src/server/scripts/World/guards.cpp index b9384dc63..6e483cba2 100644 --- a/src/server/scripts/World/guards.cpp +++ b/src/server/scripts/World/guards.cpp @@ -32,7 +32,6 @@ EndContentData */ #include "GuardAI.h" #include "Player.h" #include "ScriptedCreature.h" -#include "SpellInfo.h" enum GuardShattrath { diff --git a/src/server/scripts/World/npc_stave_of_ancients.h b/src/server/scripts/World/npc_stave_of_ancients.h index fcdc51ef7..f517218f6 100644 --- a/src/server/scripts/World/npc_stave_of_ancients.h +++ b/src/server/scripts/World/npc_stave_of_ancients.h @@ -18,7 +18,6 @@ #ifndef NPC_STAVE_OF_ANCIENTS_H #define NPC_STAVE_OF_ANCIENTS_H -#include "CreatureScript.h" #include "ScriptedCreature.h" enum Common diff --git a/src/server/scripts/World/player_scripts.cpp b/src/server/scripts/World/player_scripts.cpp index 89e62c023..845c96c2b 100644 --- a/src/server/scripts/World/player_scripts.cpp +++ b/src/server/scripts/World/player_scripts.cpp @@ -15,7 +15,6 @@ * with this program. If not, see . */ -#include "CreatureScript.h" #include "Player.h" #include "PlayerScript.h" diff --git a/src/test/mocks/WorldMock.h b/src/test/mocks/WorldMock.h index 26a29463b..3ac4d571d 100644 --- a/src/test/mocks/WorldMock.h +++ b/src/test/mocks/WorldMock.h @@ -74,7 +74,6 @@ public: MOCK_METHOD(void, LoadConfigSettings, (bool reload), ()); void SendWorldText(uint32 string_id, ...) override {} void SendWorldTextOptional(uint32 string_id, uint32 flag, ...) override {} - MOCK_METHOD(void, SendGlobalText, (const char* text, WorldSession* self), ()); void SendGMText(uint32 string_id, ...) override {} MOCK_METHOD(void, SendGlobalMessage, (WorldPacket const* packet, WorldSession* self, TeamId teamId), ()); MOCK_METHOD(void, SendGlobalGMMessage, (WorldPacket const* packet, WorldSession* self, TeamId teamId), ());