mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
Merge pull request #12 from azerothcore/revert
Revert "Merge branch 'ElunaLuaEngine:master' into master"
This commit is contained in:
110
.github/workflows/build.yml
vendored
110
.github/workflows/build.yml
vendored
@@ -44,61 +44,61 @@ jobs:
|
|||||||
./authserver --version
|
./authserver --version
|
||||||
./worldserver --version
|
./worldserver --version
|
||||||
|
|
||||||
# AC-Eluna:
|
AC-Eluna:
|
||||||
# strategy:
|
strategy:
|
||||||
# fail-fast: false
|
fail-fast: false
|
||||||
# runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
# steps:
|
steps:
|
||||||
# - uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
# with:
|
with:
|
||||||
# submodules: recursive
|
submodules: recursive
|
||||||
# repository: azerothcore/azerothcore-wotlk
|
repository: azerothcore/azerothcore-wotlk
|
||||||
# ref: 'master'
|
ref: 'master'
|
||||||
# - uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
# with:
|
with:
|
||||||
# submodules: false
|
submodules: false
|
||||||
# repository: azerothcore/mod-eluna-lua-engine
|
repository: azerothcore/mod-eluna-lua-engine
|
||||||
# path: modules/mod-eluna-lua-engine
|
path: modules/mod-eluna-lua-engine
|
||||||
# - uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
# with:
|
with:
|
||||||
# path: modules/mod-eluna-lua-engine/LuaEngine
|
path: modules/mod-eluna-lua-engine/LuaEngine
|
||||||
# - name: Configure OS
|
- name: Configure OS
|
||||||
# run: |
|
run: |
|
||||||
# # Copy paste of https://github.com/azerothcore/azerothcore-wotlk/blob/master/apps/ci/ci-install.sh
|
# Copy paste of https://github.com/azerothcore/azerothcore-wotlk/blob/master/apps/ci/ci-install.sh
|
||||||
#
|
|
||||||
# cat >>conf/config.sh <<CONFIG_SH
|
cat >>conf/config.sh <<CONFIG_SH
|
||||||
# MTHREADS=4
|
MTHREADS=4
|
||||||
# CWARNINGS=ON
|
CWARNINGS=ON
|
||||||
# CDEBUG=OFF
|
CDEBUG=OFF
|
||||||
# CTYPE=Release
|
CTYPE=Release
|
||||||
# CSCRIPTS=static
|
CSCRIPTS=static
|
||||||
# CUNIT_TESTS=ON
|
CUNIT_TESTS=ON
|
||||||
# CSERVERS=ON
|
CSERVERS=ON
|
||||||
# CTOOLS=ON
|
CTOOLS=ON
|
||||||
# CSCRIPTPCH=ON
|
CSCRIPTPCH=ON
|
||||||
# CCOREPCH=ON
|
CCOREPCH=ON
|
||||||
# CCUSTOMOPTIONS='-DCMAKE_C_FLAGS="-Werror" -DCMAKE_CXX_FLAGS="-Werror"'
|
CCUSTOMOPTIONS='-DCMAKE_C_FLAGS="-Werror" -DCMAKE_CXX_FLAGS="-Werror"'
|
||||||
# DB_CHARACTERS_CONF="MYSQL_USER='root'; MYSQL_PASS='root'; MYSQL_HOST='localhost';"
|
DB_CHARACTERS_CONF="MYSQL_USER='root'; MYSQL_PASS='root'; MYSQL_HOST='localhost';"
|
||||||
# DB_AUTH_CONF="MYSQL_USER='root'; MYSQL_PASS='root'; MYSQL_HOST='localhost';"
|
DB_AUTH_CONF="MYSQL_USER='root'; MYSQL_PASS='root'; MYSQL_HOST='localhost';"
|
||||||
# DB_WORLD_CONF="MYSQL_USER='root'; MYSQL_PASS='root'; MYSQL_HOST='localhost';"
|
DB_WORLD_CONF="MYSQL_USER='root'; MYSQL_PASS='root'; MYSQL_HOST='localhost';"
|
||||||
# CONFIG_SH
|
CONFIG_SH
|
||||||
#
|
|
||||||
# time sudo apt-get update -y
|
time sudo apt-get update -y
|
||||||
# # time sudo apt-get upgrade -y
|
# time sudo apt-get upgrade -y
|
||||||
# time sudo apt-get install -y git lsb-release sudo ccache
|
time sudo apt-get install -y git lsb-release sudo ccache
|
||||||
# time ./acore.sh install-deps
|
time ./acore.sh install-deps
|
||||||
#
|
|
||||||
# time sudo apt-get install -y clang-11
|
time sudo apt-get install -y clang-11
|
||||||
# echo "CCOMPILERC=\"clang-11\"" >> ./conf/config.sh
|
echo "CCOMPILERC=\"clang-11\"" >> ./conf/config.sh
|
||||||
# echo "CCOMPILERCXX=\"clang++-11\"" >> ./conf/config.sh
|
echo "CCOMPILERCXX=\"clang++-11\"" >> ./conf/config.sh
|
||||||
# - name: Import db
|
- name: Import db
|
||||||
# run: source ./apps/ci/ci-import-db.sh
|
run: source ./apps/ci/ci-import-db.sh
|
||||||
# - name: Build
|
- name: Build
|
||||||
# run: source ./apps/ci/ci-compile.sh
|
run: source ./apps/ci/ci-compile.sh
|
||||||
# - name: Dry run
|
- name: Dry run
|
||||||
# run: source ./apps/ci/ci-worldserver-dry-run.sh
|
run: source ./apps/ci/ci-worldserver-dry-run.sh
|
||||||
# - name: Check startup errors
|
- name: Check startup errors
|
||||||
# run: source ./apps/ci/ci-error-check.sh
|
run: source ./apps/ci/ci-error-check.sh
|
||||||
|
|
||||||
mangos-Eluna:
|
mangos-Eluna:
|
||||||
strategy:
|
strategy:
|
||||||
|
|||||||
@@ -858,28 +858,19 @@ namespace LuaCreature
|
|||||||
int GetAITargets(lua_State* L, Creature* creature)
|
int GetAITargets(lua_State* L, Creature* creature)
|
||||||
{
|
{
|
||||||
#if defined(TRINITY)
|
#if defined(TRINITY)
|
||||||
auto const& threatlist = creature->GetThreatManager().GetSortedThreatList();
|
auto const& threatlist = creature->GetThreatManager().GetThreatenedByMeList();
|
||||||
#elif defined(AZEROTHCORE)
|
#elif defined(AZEROTHCORE)
|
||||||
auto const& threatlist = creature->getThreatMgr().getThreatList();
|
auto const& threatlist = creature->getThreatMgr().getThreatList();
|
||||||
#else
|
#else
|
||||||
ThreatList const& threatlist = creature->GetThreatManager().getThreatList();
|
ThreatList const& threatlist = creature->GetThreatManager().getThreatList();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(TRINITY)
|
|
||||||
lua_createtable(L, creature->GetThreatManager().GetThreatListSize(), 0);
|
|
||||||
#else
|
|
||||||
lua_createtable(L, threatlist.size(), 0);
|
lua_createtable(L, threatlist.size(), 0);
|
||||||
#endif
|
|
||||||
int tbl = lua_gettop(L);
|
int tbl = lua_gettop(L);
|
||||||
uint32 i = 0;
|
uint32 i = 0;
|
||||||
#if defined(TRINITY)
|
|
||||||
for (ThreatReference const* itr : threatlist)
|
|
||||||
#else
|
|
||||||
for (auto itr = threatlist.begin(); itr != threatlist.end(); ++itr)
|
for (auto itr = threatlist.begin(); itr != threatlist.end(); ++itr)
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
#if defined(TRINITY)
|
#if defined(TRINITY)
|
||||||
Unit* target = itr->GetVictim();
|
Unit* target = itr->second->GetOwner();
|
||||||
#else
|
#else
|
||||||
Unit* target = (*itr)->getTarget();
|
Unit* target = (*itr)->getTarget();
|
||||||
#endif
|
#endif
|
||||||
@@ -901,7 +892,7 @@ namespace LuaCreature
|
|||||||
int GetAITargetsCount(lua_State* L, Creature* creature)
|
int GetAITargetsCount(lua_State* L, Creature* creature)
|
||||||
{
|
{
|
||||||
#if defined(TRINITY)
|
#if defined(TRINITY)
|
||||||
Eluna::Push(L, creature->GetThreatManager().GetThreatListSize());
|
Eluna::Push(L, creature->GetThreatManager().GetThreatenedByMeList().size());
|
||||||
#elif defined(AZEROTHCORE)
|
#elif defined(AZEROTHCORE)
|
||||||
Eluna::Push(L, creature->getThreatMgr().getThreatList().size());
|
Eluna::Push(L, creature->getThreatMgr().getThreatList().size());
|
||||||
#else
|
#else
|
||||||
|
|||||||
Reference in New Issue
Block a user