diff --git a/.github/workflows/core_build.yml b/.github/workflows/core_build.yml index 45de9b47..4711f923 100644 --- a/.github/workflows/core_build.yml +++ b/.github/workflows/core_build.yml @@ -62,32 +62,12 @@ jobs: - name: Install Requirements run: sudo apt-get update && sudo apt-get install ccache git cmake make gcc g++ clang libmysqlclient-dev libssl-dev libbz2-dev libreadline-dev libncurses-dev mysql-server libboost-all-dev - - name: setup ccache - shell: bash - env: - CCACHE_DIR: $GITHUB_WORKSPACE/var/ccache - run: | - cat <> $GITHUB_ENV - CCACHE_DIR=${{ env.CCACHE_DIR }} - CCACHE_MAXSIZE=1000MB - CCACHE_SLOPPINESS=pch_defines,time_macros,include_file_mtime - CCACHE_CPP2=true - CCACHE_COMPRESS=1 - CCACHE_COMPRESSLEVEL=9 - CCACHE_COMPILERCHECK=content - CCACHE_LOGFILE=$CCACHE_DIR/cache.debug - CC=${{ inputs.CC }} - CXX=${{ inputs.CXX }} - EOF - - name: Configure CMake run: > cmake -B ${{ steps.strings.outputs.build-output-dir }} -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} - -DCMAKE_CXX_COMPILER_LAUNCHER="ccache" - -DCMAKE_C_COMPILER_LAUNCHER="ccache" -S ${{ github.workspace }} - name: Build diff --git a/src/PlayerbotAI.cpp b/src/PlayerbotAI.cpp index 6a4c7b3f..fa59ff11 100644 --- a/src/PlayerbotAI.cpp +++ b/src/PlayerbotAI.cpp @@ -350,7 +350,7 @@ void PlayerbotAI::UpdateAIInternal([[maybe_unused]] uint32 elapsed, bool minimal std::string const command = holder.GetCommand(); Player* owner = holder.GetOwner(); - if (owner == master && !helper.ParseChatCommand(command, owner) && holder.GetType() == CHAT_MSG_WHISPER) + if (!helper.ParseChatCommand(command, owner) && holder.GetType() == CHAT_MSG_WHISPER) { // To prevent spam caused by WIM if (!(command.rfind("WIM", 0) == 0) && @@ -625,10 +625,15 @@ void PlayerbotAI::HandleCommand(uint32 type, std::string const text, Player* fro return; } - if (!IsAllowedCommand(filtered) && !GetSecurity()->CheckLevelFor(PLAYERBOT_SECURITY_ALLOW_ALL, type != CHAT_MSG_WHISPER, fromPlayer)) + if (!IsAllowedCommand(filtered) && + (master != fromPlayer || !GetSecurity()->CheckLevelFor(PLAYERBOT_SECURITY_ALLOW_ALL, type != CHAT_MSG_WHISPER, fromPlayer))) return; - if (type == CHAT_MSG_RAID_WARNING && filtered.find(bot->GetName()) != std::string::npos && filtered.find("award") == std::string::npos) + if (!IsAllowedCommand(filtered) && master != fromPlayer) + return; + + if (type == CHAT_MSG_RAID_WARNING && filtered.find(bot->GetName()) != std::string::npos && + filtered.find("award") == std::string::npos) { ChatCommandHolder cmd("warning", fromPlayer, type); chatCommands.push(cmd); diff --git a/src/strategy/actions/UseMeetingStoneAction.cpp b/src/strategy/actions/UseMeetingStoneAction.cpp index 2bc87266..5380d6f9 100644 --- a/src/strategy/actions/UseMeetingStoneAction.cpp +++ b/src/strategy/actions/UseMeetingStoneAction.cpp @@ -206,7 +206,7 @@ bool SummonAction::Teleport(Player* summoner, Player* player) return false; } - bool revive = sPlayerbotAIConfig->reviveBotWhenSummoned == 2 || (sPlayerbotAIConfig->reviveBotWhenSummoned == 1 && !master->IsInCombat()); + bool revive = sPlayerbotAIConfig->reviveBotWhenSummoned == 2 || (sPlayerbotAIConfig->reviveBotWhenSummoned == 1 && !master->IsInCombat() && master->IsAlive()); if (bot->isDead() && revive) { bot->ResurrectPlayer(1.0f, false);