Merge branch 'liyunfan1223:master' into shaman_fix

This commit is contained in:
Atidote
2024-07-27 10:34:33 +02:00
committed by GitHub
3 changed files with 30 additions and 17 deletions

View File

@@ -50,18 +50,35 @@ jobs:
path: 'modules/mod-playerbots'
- name: Cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
/var/cache/apt
/var/lib/apt
key: ccache:${{ matrix.os }}:${{ github.ref }}:${{ github.sha }}
path: ${{ github.workspace }}/var/ccache
key: ccache:${{ matrix.os }}:${{ matrix.c_compiler }}:${{ github.ref }}:${{ github.sha }}
restore-keys: |
ccache:${{ matrix.os }}:${{ github.ref }}
ccache:${{ matrix.os }}:${{ matrix.c_compiler }}:${{ github.ref }}
ccache:${{ matrix.os }}:${{ matrix.c_compiler }}
ccache:${{ matrix.os }}
- name: Install Requirements
run: sudo apt-get update && sudo apt-get install git cmake make gcc g++ clang libmysqlclient-dev libssl-dev libbz2-dev libreadline-dev libncurses-dev mysql-server libboost-all-dev
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 <<EOF >> $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: >
@@ -69,6 +86,8 @@ jobs:
-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

View File

@@ -26,14 +26,8 @@ jobs:
with:
repository: 'liyunfan1223/mod-playerbots'
path: 'modules/mod-playerbots'
- name: Cache
uses: actions/cache@v3
with:
path: C:\ProgramData\chocolatey\cache
key: ccache:${{ matrix.os }}:${{ github.ref }}:${{ github.sha }}
restore-keys: |
ccache:${{ matrix.os }}:${{ github.ref }}
ccache:${{ matrix.os }}
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2.13
- name: Configure OS
shell: bash
env:

View File

@@ -336,11 +336,11 @@ std::string const ChatHelper::FormatItem(ItemTemplate const* proto, uint32 count
char color[32];
sprintf(color, "%x", ItemQualityColors[proto->Quality]);
const std::string &name = sObjectMgr->GetItemLocale(proto->ItemId)->Name[sWorld->GetDefaultDbcLocale()];
// const std::string &name = sObjectMgr->GetItemLocale(proto->ItemId)->Name[sWorld->GetDefaultDbcLocale()];
std::ostringstream out;
out << "|c" << color << "|Hitem:" << proto->ItemId
<< ":0:0:0:0:0:0:0" << "|h[" << name
<< ":0:0:0:0:0:0:0" << "|h[" << proto->Name1
<< "]|h|r";
if (count > 1)