This commit is contained in:
2026-03-09 21:50:11 +04:00
parent ab723de95f
commit feceaab626
4 changed files with 55 additions and 11 deletions
+2 -3
View File
@@ -62,9 +62,8 @@ DOCKER_GROUP_ID=1000
# Рейт опыта за убийство. # Рейт опыта за убийство.
AC_RATE_XP_KILL=1 AC_RATE_XP_KILL=1
# Автологин random bots для playerbots через env override. # Legacy alias для docker override. Держим синхронно с ACORE_PLAYERBOTS_RANDOM_BOT_AUTOLOGIN.
# Сейчас модуль отключен в core, но переменная оставлена как часть текущего профиля. AC_AI_PLAYERBOT_RANDOM_BOT_AUTOLOGIN=0
AC_AI_PLAYERBOT_RANDOM_BOT_AUTOLOGIN=1
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Значения по умолчанию для ./create-account.sh # Значения по умолчанию для ./create-account.sh
+1 -1
View File
@@ -4,7 +4,7 @@ services:
tty: true tty: true
environment: environment:
AC_RATE_XP_KILL: "${AC_RATE_XP_KILL:-1}" 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: volumes:
- ./modules:/azerothcore/modules:ro - ./modules:/azerothcore/modules:ro
- ./lua_scripts:/azerothcore/lua_scripts - ./lua_scripts:/azerothcore/lua_scripts
+20 -1
View File
@@ -20,7 +20,8 @@ usage() {
Usage: $(basename "$0") Usage: $(basename "$0")
Imports required custom SQL that lives outside the normal AzerothCore module paths. 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 EOF
} }
@@ -216,6 +217,23 @@ import_store_sql() {
rm -f "$temp_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 if (($# > 0)); then
case "$1" in case "$1" in
-h|--help) -h|--help)
@@ -241,6 +259,7 @@ if ! docker compose ps --status running --services | grep -qx 'ac-database'; the
fi fi
import_mythicplus_sql import_mythicplus_sql
import_aoe_loot_sql
import_store_sql import_store_sql
log "custom SQL bootstrap completed" log "custom SQL bootstrap completed"
+32 -6
View File
@@ -272,7 +272,7 @@ sync_module_dists() {
} }
write_autobalance_conf() { write_autobalance_conf() {
write_file "$MODULES_ETC_DIR/AutoBalance.conf" <<EOF write_file "$MODULES_ETC_DIR/AutoBalance.conf.dist" <<EOF
[worldserver] [worldserver]
# Managed by ./setup-modules.sh # Managed by ./setup-modules.sh
@@ -306,7 +306,7 @@ EOF
} }
write_individual_progression_conf() { write_individual_progression_conf() {
write_file "$MODULES_ETC_DIR/individualProgression.conf" <<EOF write_file "$MODULES_ETC_DIR/individualProgression.conf.dist" <<EOF
[worldserver] [worldserver]
# Managed by ./setup-modules.sh # Managed by ./setup-modules.sh
@@ -333,7 +333,7 @@ EOF
} }
write_aoe_loot_conf() { write_aoe_loot_conf() {
write_file "$MODULES_ETC_DIR/mod_aoe_loot.conf" <<EOF write_file "$MODULES_ETC_DIR/mod_aoe_loot.conf.dist" <<EOF
# Managed by ./setup-modules.sh # Managed by ./setup-modules.sh
AOELoot.Enable = ${ACORE_AOE_LOOT_ENABLE} AOELoot.Enable = ${ACORE_AOE_LOOT_ENABLE}
AOELoot.Message = ${ACORE_AOE_LOOT_MESSAGE} AOELoot.Message = ${ACORE_AOE_LOOT_MESSAGE}
@@ -343,7 +343,7 @@ EOF
} }
write_eluna_conf() { write_eluna_conf() {
write_file "$MODULES_ETC_DIR/mod_eluna.conf" <<EOF write_file "$MODULES_ETC_DIR/mod_eluna.conf.dist" <<EOF
[worldserver] [worldserver]
# Managed by ./setup-modules.sh # Managed by ./setup-modules.sh
@@ -357,7 +357,7 @@ EOF
} }
write_learnspells_conf() { write_learnspells_conf() {
write_file "$MODULES_ETC_DIR/mod_learnspells.conf" <<EOF write_file "$MODULES_ETC_DIR/mod_learnspells.conf.dist" <<EOF
[worldserver] [worldserver]
# Managed by ./setup-modules.sh # Managed by ./setup-modules.sh
@@ -397,7 +397,7 @@ write_playerbots_conf() {
return return
fi fi
write_file "$MODULES_ETC_DIR/playerbots.conf" <<EOF write_file "$MODULES_ETC_DIR/playerbots.conf.dist" <<EOF
# Managed by ./setup-modules.sh # Managed by ./setup-modules.sh
AiPlayerbot.Enabled = ${ACORE_PLAYERBOTS_ENABLED} AiPlayerbot.Enabled = ${ACORE_PLAYERBOTS_ENABLED}
AiPlayerbot.RandomBotAutologin = ${ACORE_PLAYERBOTS_RANDOM_BOT_AUTOLOGIN} AiPlayerbot.RandomBotAutologin = ${ACORE_PLAYERBOTS_RANDOM_BOT_AUTOLOGIN}
@@ -465,6 +465,31 @@ ensure_runtime_dirs() {
mkdir -p "$ROOT_DIR/lua_scripts" mkdir -p "$ROOT_DIR/lua_scripts"
} }
cleanup_legacy_module_overrides() {
local legacy_files=(
"$MODULES_ETC_DIR/AutoBalance.conf"
"$MODULES_ETC_DIR/individualProgression.conf"
"$MODULES_ETC_DIR/mod_aoe_loot.conf"
"$MODULES_ETC_DIR/mod_eluna.conf"
"$MODULES_ETC_DIR/mod_learnspells.conf"
"$MODULES_ETC_DIR/playerbots.conf"
)
local path
for path in "${legacy_files[@]}"; do
if [[ ! -e "$path" ]]; then
continue
fi
if (( DRY_RUN )); then
log "would remove legacy override ${path#$ROOT_DIR/}"
continue
fi
rm -f "$path"
done
}
main() { main() {
while (($#)); do while (($#)); do
case "$1" in case "$1" in
@@ -492,6 +517,7 @@ main() {
ensure_runtime_dirs ensure_runtime_dirs
sync_module_dists sync_module_dists
cleanup_legacy_module_overrides
configure_worldserver configure_worldserver
write_autobalance_conf write_autobalance_conf
write_individual_progression_conf write_individual_progression_conf