From feceaab6260289e9d138c8cf087ffbee1c7b8387 Mon Sep 17 00:00:00 2001 From: sindoring Date: Mon, 9 Mar 2026 21:50:11 +0400 Subject: [PATCH] fix --- .env.example | 5 ++--- docker-compose.override.yml | 2 +- import-custom-sql.sh | 21 +++++++++++++++++++- setup-modules.sh | 38 +++++++++++++++++++++++++++++++------ 4 files changed, 55 insertions(+), 11 deletions(-) diff --git a/.env.example b/.env.example index 525dc75..6ab449b 100644 --- a/.env.example +++ b/.env.example @@ -62,9 +62,8 @@ DOCKER_GROUP_ID=1000 # Рейт опыта за убийство. AC_RATE_XP_KILL=1 -# Автологин random bots для playerbots через env override. -# Сейчас модуль отключен в core, но переменная оставлена как часть текущего профиля. -AC_AI_PLAYERBOT_RANDOM_BOT_AUTOLOGIN=1 +# Legacy alias для docker override. Держим синхронно с ACORE_PLAYERBOTS_RANDOM_BOT_AUTOLOGIN. +AC_AI_PLAYERBOT_RANDOM_BOT_AUTOLOGIN=0 # ------------------------------------------------------------------------------ # Значения по умолчанию для ./create-account.sh diff --git a/docker-compose.override.yml b/docker-compose.override.yml index 6e54e2e..ba2037c 100644 --- a/docker-compose.override.yml +++ b/docker-compose.override.yml @@ -4,7 +4,7 @@ services: tty: true environment: AC_RATE_XP_KILL: "${AC_RATE_XP_KILL:-1}" - AC_AI_PLAYERBOT_RANDOM_BOT_AUTOLOGIN: "${AC_AI_PLAYERBOT_RANDOM_BOT_AUTOLOGIN:-1}" + AC_AI_PLAYERBOT_RANDOM_BOT_AUTOLOGIN: "${ACORE_PLAYERBOTS_RANDOM_BOT_AUTOLOGIN:-0}" volumes: - ./modules:/azerothcore/modules:ro - ./lua_scripts:/azerothcore/lua_scripts diff --git a/import-custom-sql.sh b/import-custom-sql.sh index 0efc158..ed58559 100644 --- a/import-custom-sql.sh +++ b/import-custom-sql.sh @@ -20,7 +20,8 @@ usage() { Usage: $(basename "$0") Imports required custom SQL that lives outside the normal AzerothCore module paths. -Currently this bootstraps the MythicPlus and Store Lua packages. +Currently this bootstraps the MythicPlus and Store Lua packages, plus module strings +that are not covered by the normal module SQL import path in this deployment. EOF } @@ -216,6 +217,23 @@ import_store_sql() { rm -f "$temp_sql" } +import_aoe_loot_sql() { + local aoe_loot_sql_file="$ROOT_DIR/modules/mod-aoe-loot/data/sql/db-world/base/aoe_loot_module_string.sql" + + if [[ ! -f "$aoe_loot_sql_file" ]]; then + log "mod-aoe-loot module string SQL not found, skipped" + return 0 + fi + + if [[ "$(mysql_query "acore_world" "SELECT COUNT(*) FROM module_string WHERE module = 'mod-aoe-loot';")" != "0" ]] && \ + [[ "$(mysql_query "acore_world" "SELECT COUNT(*) FROM module_string_locale WHERE module = 'mod-aoe-loot';")" != "0" ]]; then + log "mod-aoe-loot module strings already exist, skipping" + return 0 + fi + + import_sql_file "acore_world" "$aoe_loot_sql_file" +} + if (($# > 0)); then case "$1" in -h|--help) @@ -241,6 +259,7 @@ if ! docker compose ps --status running --services | grep -qx 'ac-database'; the fi import_mythicplus_sql +import_aoe_loot_sql import_store_sql log "custom SQL bootstrap completed" diff --git a/setup-modules.sh b/setup-modules.sh index 10ff5b9..9916646 100644 --- a/setup-modules.sh +++ b/setup-modules.sh @@ -272,7 +272,7 @@ sync_module_dists() { } write_autobalance_conf() { - write_file "$MODULES_ETC_DIR/AutoBalance.conf" <