eluna fixes

This commit is contained in:
Deckard
2025-10-04 22:35:48 -04:00
parent 8b2eeff3fd
commit 13fc1b7e66
3 changed files with 148 additions and 21 deletions

View File

@@ -274,7 +274,14 @@ services:
image: ${AC_ELUNA_IMAGE}
pull_policy: ${IMAGE_PULL_POLICY}
container_name: ${CONTAINER_ELUNA}
user: "0:0" # Run as root to handle NFS permissions
command: npm run dev
volumes:
# TypeScript source files (input)
- ${STORAGE_PATH}/typescript:/eluna-ts/src
# Compiled Lua scripts (output)
- ${STORAGE_PATH}/lua_scripts:/eluna-ts/dist
environment:
- ELUNATS_BUILD_FILE=${ELUNATS_BUILD_FILE:-index.ts}
restart: unless-stopped
networks:
- azerothcore
@@ -721,27 +728,39 @@ services:
fi
if [ "$MODULE_ASSISTANT" = "1" ] && [ ! -d "mod-assistant" ]; then
echo '🤖 Installing mod-assistant...'
echo ' 📖 Project: https://github.com/azerothcore/mod-assistant'
echo ' Provides AI-powered assistance and automation features'
echo ' 📖 Project: https://github.com/noisiver/mod-assistant'
echo ' NPC (ID: 9000000) providing heirlooms, glyphs, gems, profession services'
echo ' 🔧 REBUILD REQUIRED: Container must be rebuilt with source-based compilation'
echo ' 🔬 STATUS: IN TESTING - Currently under verification'
git clone https://github.com/azerothcore/mod-assistant.git mod-assistant
git clone https://github.com/noisiver/mod-assistant.git mod-assistant
fi
if [ "$MODULE_REAGENT_BANK" = "1" ] && [ ! -d "mod-reagent-bank" ]; then
echo '🏦 Installing mod-reagent-bank...'
echo ' 📖 Project: https://github.com/azerothcore/mod-reagent-bank'
echo ' Adds reagent bank functionality similar to retail WoW'
echo ' 📖 Project: https://github.com/ZhengPeiRu21/mod-reagent-bank'
echo ' Reagent banker NPC for storing crafting materials, frees bag space'
echo ' 🔧 REBUILD REQUIRED: Container must be rebuilt with source-based compilation'
echo ' 🔬 STATUS: IN TESTING - Currently under verification'
git clone https://github.com/azerothcore/mod-reagent-bank.git mod-reagent-bank
git clone https://github.com/ZhengPeiRu21/mod-reagent-bank.git mod-reagent-bank
fi
if [ "$MODULE_BLACK_MARKET_AUCTION_HOUSE" = "1" ] && [ ! -d "mod-black-market" ]; then
echo '🏴‍☠️ Installing mod-black-market...'
echo ' 📖 Project: https://github.com/azerothcore/mod-black-market'
echo ' Black Market Auction House for rare and unique items'
echo ' 🔧 REBUILD REQUIRED: Container must be rebuilt with source-based compilation'
echo ' 📖 Project: https://github.com/Youpeoples/Black-Market-Auction-House'
echo ' MoP Black Market Auction House backported using Eluna Lua engine'
echo ' ⚠️ SPECIAL MODULE: Uses Lua scripts, not C++ compilation'
echo ' 🔧 REQUIRES: mod-eluna must be enabled and functional'
echo ' 🔬 STATUS: IN TESTING - Currently under verification'
git clone https://github.com/azerothcore/mod-black-market.git mod-black-market
git clone https://github.com/Youpeoples/Black-Market-Auction-House.git mod-black-market
# Special handling: Copy Lua scripts to lua_scripts directory
if [ "$MODULE_ELUNA" = "1" ] && [ -d "mod-black-market/Server Files/lua_scripts" ]; then
echo ' 🔧 Integrating Black Market Lua scripts with mod-eluna...'
mkdir -p /azerothcore/lua_scripts
cp -r mod-black-market/Server\ Files/lua_scripts/* /azerothcore/lua_scripts/ 2>/dev/null || true
echo ' ✅ Black Market Lua scripts copied to /azerothcore/lua_scripts directory'
ls -la /azerothcore/lua_scripts/ | grep -E "\\.lua$" || echo " No .lua files found after copy"
else
echo ' ⚠️ WARNING: mod-eluna not enabled - Black Market will not function'
fi
fi
echo 'Managing configuration files...'
@@ -820,7 +839,7 @@ services:
fi
if [ "$MODULE_ELUNA" != "1" ]; then
rm -f /azerothcore/env/dist/etc/mod_LuaEngine.conf*
rm -f /azerothcore/env/dist/etc/mod_eluna.conf*
fi
if [ "$MODULE_ARAC" != "1" ]; then
rm -f /azerothcore/env/dist/etc/arac.conf*
@@ -899,7 +918,7 @@ services:
if [ -d "$$module_dir/data/sql/world" ]; then
find "$$module_dir/data/sql/world" -name "*.sql" -type f | while read sql_file; do
echo " Executing world SQL: $$(basename "$$sql_file")"
if mysql --skip-ssl-verify -h "${CONTAINER_MYSQL}" -P 3306 -u root -p"${MYSQL_ROOT_PASSWORD}" "${DB_WORLD_NAME}" < "$$sql_file" >/dev/null 2>&1; then
if mariadb --ssl=false -h "${CONTAINER_MYSQL}" -P 3306 -u root -p"${MYSQL_ROOT_PASSWORD}" "${DB_WORLD_NAME}" < "$$sql_file" >/dev/null 2>&1; then
echo " ✅ Successfully executed $$(basename "$$sql_file")"
else
echo " ❌ Failed to execute $$sql_file"
@@ -911,7 +930,7 @@ services:
if [ -d "$$module_dir/data/sql/auth" ]; then
find "$$module_dir/data/sql/auth" -name "*.sql" -type f | while read sql_file; do
echo " Executing auth SQL: $$(basename "$$sql_file")"
if mysql --skip-ssl-verify -h "${CONTAINER_MYSQL}" -P 3306 -u root -p"${MYSQL_ROOT_PASSWORD}" "${DB_AUTH_NAME}" < "$$sql_file" >/dev/null 2>&1; then
if mariadb --ssl=false -h "${CONTAINER_MYSQL}" -P 3306 -u root -p"${MYSQL_ROOT_PASSWORD}" "${DB_AUTH_NAME}" < "$$sql_file" >/dev/null 2>&1; then
echo " ✅ Successfully executed $$(basename "$$sql_file")"
else
echo " ❌ Failed to execute $$sql_file"
@@ -923,7 +942,7 @@ services:
if [ -d "$$module_dir/data/sql/characters" ]; then
find "$$module_dir/data/sql/characters" -name "*.sql" -type f | while read sql_file; do
echo " Executing characters SQL: $$(basename "$$sql_file")"
if mysql --skip-ssl-verify -h "${CONTAINER_MYSQL}" -P 3306 -u root -p"${MYSQL_ROOT_PASSWORD}" "${DB_CHARACTERS_NAME}" < "$$sql_file" >/dev/null 2>&1; then
if mariadb --ssl=false -h "${CONTAINER_MYSQL}" -P 3306 -u root -p"${MYSQL_ROOT_PASSWORD}" "${DB_CHARACTERS_NAME}" < "$$sql_file" >/dev/null 2>&1; then
echo " ✅ Successfully executed $$(basename "$$sql_file")"
else
echo " ❌ Failed to execute $$sql_file"
@@ -947,10 +966,10 @@ services:
fi
}
# Install MySQL client if not available
which mysql >/dev/null 2>&1 || {
echo "Installing MySQL client..."
apk add --no-cache mysql-client >/dev/null 2>&1 || echo "Warning: Could not install MySQL client"
# Install MariaDB client if not available
which mariadb >/dev/null 2>&1 || {
echo "Installing MariaDB client..."
apk add --no-cache mariadb-client >/dev/null 2>&1 || echo "Warning: Could not install MariaDB client"
}
# Execute SQL for enabled modules only
@@ -1143,7 +1162,7 @@ services:
[ "$MODULE_LEVEL_GRANT" = "1" ] && ENABLED_MODULES="$ENABLED_MODULES mod-quest-count-level"
[ "$MODULE_ASSISTANT" = "1" ] && ENABLED_MODULES="$ENABLED_MODULES mod-assistant"
[ "$MODULE_REAGENT_BANK" = "1" ] && ENABLED_MODULES="$ENABLED_MODULES mod-reagent-bank"
[ "$MODULE_BLACK_MARKET_AUCTION_HOUSE" = "1" ] && ENABLED_MODULES="$ENABLED_MODULES mod-black-market"
# Note: mod-black-market is Lua-based, doesn't need C++ compilation
if [ -n "$ENABLED_MODULES" ]; then
ENABLED_COUNT=$(echo $ENABLED_MODULES | wc -w)