diff --git a/README.md b/README.md index 5f748f2..7027dcf 100644 --- a/README.md +++ b/README.md @@ -1,115 +1,41 @@ -# WORLD OF WARCRAFT SERVER INSTALL (VERSION 1.12) +# wow private server -## PRE REQUIS +## Versions prises en charge -- debian 12 -- user wow -- ports: - - TCP: 3724, 8085 - - UDP: 3724, 8085 -- WOW 1.12 client: https://drive.usercontent.google.com/download?id=1TDoNNUXCtsgIUhLw96biPCqjv3AcLYkg&export=download +## Pre requis -## CONFIG +- Clients: +| Game name | Game version | Keyword | +|--------------------------------------------|--------------|-----------| +| World of Warcraft® | **v1.12.x** | `classic` | +| World of Warcraft: The Burning Crusade® | **v2.4.3** | `tbc` | +| World of Warcraft: Wrath of the Link King® | **v3.3.5a** | `wotlk` | -- Mettre en place les données du server: +- Docker + +## Configuration + +- .env path to wow client + +## Installation + +- Extraire les maps du client: ```bash -wget https://www.mediafire.com/file_premium/j6cyqjeif3dvrv2/data.7z -7z x data.7z -rm -r data.7z -mv data/ storage/mangosd/extracted-data/ +./builder/run.sh extract ``` -- Modifier l'IP du server: +> Choisir l'import en HD avec le plus de CPU possible car c'est long + +- Lançer la base de données: ```bash -nano compose.yml +docker compose up wow-db ``` -## LANCER LA STACK - +- Dans un autre terminal, lançer le script d'import des données du jeu: ```bash -docker compose up -d +./builder/run.sh init-db ``` -## CREER UN UTILISATEURS +> Patienter le temps de la mise en place de la base de données -Lancer le service mangosd: -```bash -docker attach vmangos-deploy-mangosd-1 -``` - -- Créer un utilisateur: -```bash -account create -``` - -[autres commandes](https://github.com/dkpminus/mangos-gm-commands) - -## PROTEGER LE SERVEUR VIA FAIL2BAN - -- Installer fail2ban: -```bash -sudo apt install fail2ban -y -``` - -- Créer `/etc/fail2ban/filter.d/realmd.conf`: -```conf -[Definition] -failregex = \[AuthChallenge\] Account '.*' using IP '' tried to login with wrong password! -ignoreregex = -``` - -- Créer `/etc/fail2ban/jail.local`: - -```conf -[realmd] -enabled = true -filter = realmd -port = 3724 -protocol = tcp -logpath = /home/wow/vmangos/logs/realmd/realmd.log -maxretry = 5 -findtime = 600 -bantime = 36000 -``` - -- Redémarrer fail2ban: -```bash -sudo systemctl restart fail2ban -sudo fail2ban-client reload -``` - -## SE CONNECTER AU SERVEUR - -- Télécharger le [client (v1.12)](https://drive.usercontent.google.com/download?id=1TDoNNUXCtsgIUhLw96biPCqjv3AcLYkg&export=download) - -- Editer le fichier `realmlist.wtf` pour y mettre l'IP du serveur: -```bash -set -``` - -## BACKUP DATABASE ET RESTORE - -- Exporter la base de données: -```bash -docker exec nom_du_conteneur_db mysqldump -u root -pMOTDEPASS --databases realmd mangos characters logs > wow-db-dump.sql -``` - -- Importer la base de données: -```bash -docker cp wow-db-dump.sql :/ -docker exec -it bash -apt update && apt install -y mysql-client -mysql -u root -ppassword < wow-db-dump.sql -``` - -## SOURCES - -- [vmangos](https://github.com/vmangos) -- [tuto](https://www.youtube.com/watch?v=ac1mVFz2u1o) -- [docker version](https://github.com/mserajnik/vmangos-deploy) - -## TO DO - -- [ ] jail for realmd port -- [ ] Server IP as env for confs et Dockerfiles \ No newline at end of file diff --git a/builder/InstallFullDB.config b/builder/InstallFullDB.config new file mode 100644 index 0000000..5bf9bb2 --- /dev/null +++ b/builder/InstallFullDB.config @@ -0,0 +1,67 @@ +#!/usr/bin/env bash +# + +#################################################################################################### +# This is the config file for the 'InstallFullDB.sh' script +# +# You need to customize +# MYSQL_HOST: Host on which the database resides +# MYSQL_PORT: Port on which the database is running +# MYSQL_USERNAME: Your a valid mysql username +# MYSQL_PASSWORD: Your corresponding mysql password +# MYSQL_PATH: Your mysql command (usually mysql) +# WORLD_DB_NAME: Your content database +# CORE_PATH: Your path to core's directory +# +#################################################################################################### + +## Define the host on which the mangos database resides (typically localhost) +MYSQL_HOST="${MANGOS_DBHOST}" + +## Define the port on which the mangos database is running (typically 3306) +MYSQL_PORT="${MANGOS_DBPORT}" + +## Define your username +MYSQL_USERNAME="${MANGOS_DBUSER}" + +## Define your password (It is suggested to restrict read access to this file!) +MYSQL_PASSWORD="${MANGOS_DBPASS}" + +## Define default mysql address binding(you can set "%" to be able to connect from any computer) +MYSQL_USERIP="%" + +## Define the databases names (let them empty for default name '') +WORLD_DB_NAME="${MANGOS_WORLD_DBNAME}" +REALM_DB_NAME="${MANGOS_REALMD_DBNAME}" +CHAR_DB_NAME="${MANGOS_CHARACTERS_DBNAME}" +LOGS_DB_NAME="${MANGOS_LOGS_DBNAME}" + +## Define your mysql programm if this differs +MYSQL_PATH="/usr/bin/mariadb" + +## Define the path to your mysql dump binary folder +MYSQL_DUMP_PATH="/usr/bin/mariadb-dump" + +## Define the path to your core's folder +CORE_PATH="${MANGOS_DIR}" + +## Define if the 'locales' directory for processing localization/multi-language SQL files needs to be used +## Set the variable to "YES" to use the locales directory +LOCALES="YES" + +## Define if you want to wait a bit before applying the full database +FORCE_WAIT="NO" + +## Define if the 'dev' directory for processing development SQL files needs to be used +## Set the variable to "YES" to use the dev directory +DEV_UPDATES="NO" + +## Define if AHBot SQL updates need to be applied (by default, assume the core is built without AHBot) +## Set the variable to "YES" to import AHBot sql. +AHBOT="NO" + +## Define if the 'src/modules/PlayerBots/sql' directory for processing development SQL files needs to be used +## Set the variable to "YES" to use the playerbots directory +PLAYERBOTS_DB="NO" + +# Enjoy using the tool diff --git a/builder/entrypoint.sh b/builder/entrypoint.sh new file mode 100755 index 0000000..7f08e5e --- /dev/null +++ b/builder/entrypoint.sh @@ -0,0 +1,430 @@ +#!/usr/bin/env bash +# + +readonly SCRIPT_VERSION="1.0.0" + +set -e + +# Utils: +# +function echoerr() +{ + echo ${@} >&2 +} + +function success() +{ + echo -e "\e[32m${1}\e[0m" +} +function info() +{ + echo -e "\e[36m${1}\e[0m" +} +function warning() +{ + if [[ "${2}" == "--underline" ]] + then + echo -e "\e[4;33m${1}\e[0m" + else + echo -e "\e[33m${1}\e[0m" + fi +} +function error() +{ + if [[ "${2}" == "--underline" ]] + then + echo -e "\e[4;31m${1}\e[0m" + else + echo -e "\e[31m${1}\e[0m" + fi +} + +function mysql_execute() +{ + mariadb "-h${MANGOS_DBHOST}" "-P${MANGOS_DBPORT}" "-u${MYSQL_SUPERUSER}" "-p${MYSQL_SUPERPASS}" ${@} +} +function mysql_dump() +{ + local DATABASE_NAME="${1}" + local OUTPUT_FILE="${2}" + + mariadb-dump "-h${MANGOS_DBHOST}" "-P${MANGOS_DBPORT}" "-u${MYSQL_SUPERUSER}" "-p${MYSQL_SUPERPASS}" \ + "${DATABASE_NAME}" --opt --result-file="${OUTPUT_FILE}" +} + +# Sub-functions: +# +function install_updates() +{ + cd "${DATABASE_DIR}" + + ./InstallFullDB.sh -UpdateCore + + if [[ "${1}" == "--world" ]] + then + ./InstallFullDB.sh -World + fi +} + +# Main functions: +# +function extract_resources_from_client() +{ + cd "${VOLUME_DIR}" + + if [[ -f ".resext" ]] || [[ $(ls | grep -c -E "Cameras|dbc|maps|mmaps|vmaps") -gt 0 ]] + then + echo "" + echo -e " $(warning "WARNING!" --underline)" + echo -e " $(warning "└") It seems that you've already extracted the resources from the client before." + echo -e " If you continue, existing resources will be overwritten by the new ones." + echo "" + read -p "Are you sure to continue? [Y/n]: " ANSWER + + if [[ "${ANSWER}" != "y" ]] && [[ "${ANSWER}" != "Y" ]] + then + echo -e " └ Ok, no problem! Resources have been left untouched." + + return + fi + + rm -rf Cameras/ \ + dbc/ \ + maps/ \ + mmaps/ \ + vmaps/ + fi + + cd "${HOME_DIR}/run/bin/tools" + + cp * "${HOME_DIR}/wow-client/" + cd "${HOME_DIR}/wow-client" + + ./ExtractResources.sh ${@} + + mv Cameras "${VOLUME_DIR}/Cameras" + mv dbc "${VOLUME_DIR}/dbc" + mv maps "${VOLUME_DIR}/maps" + mv mmaps "${VOLUME_DIR}/mmaps" + mv vmaps "${VOLUME_DIR}/vmaps" + + mkdir -p "${VOLUME_DIR}/logs" + mv *.log "${VOLUME_DIR}/logs/" + + rm -rf Buildings/ \ + \ + ExtractResources.sh \ + MoveMapGen \ + MoveMapGen.sh \ + ad \ + offmesh.txt \ + vmap_assembler \ + vmap_extractor + + echo "${SCRIPT_VERSION}" > "${VOLUME_DIR}/.resext" +} +function init_db() +{ + cd "${DATABASE_DIR}" + + echo "" + echo "This procedure will create all the databases required by the server" + echo " to run properly and will initialize them with the default data." + echo "" + echo -e " $(warning "WARNING!" --underline)" + echo -e " $(warning "└") Please note that, if you have already initialized the databases before," + echo -e " this procedure will prune $(info "ALL") of your data and" + echo -e " they will be lost $(info "FOREVER") (it's a very long time)!" + echo "" + read -p "Are you sure to continue? [Y/n]: " ANSWER + + if [[ "${ANSWER}" != "y" ]] && [[ "${ANSWER}" != "Y" ]] + then + echo -e " └ Ok, no problem! Databases have been left untouched." + + return + fi + + echo -e " └ Please, wait... Initializing databases..." + echo "" + echo -e " --------------------------------------" + + ./InstallFullDB.sh -InstallAll "${MYSQL_SUPERUSER}" "${MYSQL_SUPERPASS}" DeleteAll +} +function backup_db() +{ + readonly HELP_MSG=" +Backups the specified database(s) and then returns the + result as a single \"tar.gz\" file via standard output. + +Usage: + backup-db [OPTIONS...] + +Options: + -a | --all + Backups all databases. + + -w | --world + Backups the world database: \"$(info "${MANGOS_WORLD_DBNAME}")\". + + -c | --characters + Backups the characters database: \"$(info "${MANGOS_CHARACTERS_DBNAME}")\". + + -l | --logs + Backups the logs database: \"$(info "${MANGOS_LOGS_DBNAME}")\". + + -r | --realmd + Backups the realmd database: \"$(info "${MANGOS_REALMD_DBNAME}")\". + + -h | -? | --help + Displays this help message. +" + + declare -A DATABASES + + while [[ ${#} -gt 0 ]] + do + case "${1}" in + -a | --all) + readonly BACKUPS_ALL="true" + ;; + -w | --world) + DATABASES+=(["world"]="${MANGOS_WORLD_DBNAME}") + ;; + -c | --characters) + DATABASES+=(["characters"]="${MANGOS_CHARACTERS_DBNAME}") + ;; + -l | --logs) + DATABASES+=(["logs"]="${MANGOS_LOGS_DBNAME}") + ;; + -r | --realmd) + DATABASES+=(["realmd"]="${MANGOS_REALMD_DBNAME}") + ;; + -h | -? | --help) + echo -e "${HELP_MSG}" + + exit 0 + ;; + *) + echoerr "" + echoerr -e " $(error "ERROR!" --underline)" + echoerr -e " $(error "└") Unknown option: \"$(info "${1}")\"" + echoerr "" + echoerr " Run \"$(info "backup-db --help")\" for more information." + + exit 1 + ;; + esac + + shift + done + + if [[ "${BACKUPS_ALL}" == "true" ]] + then + if [[ -n ${DATABASES[@]} ]] + then + echoerr "" + echoerr -e " $(error "ERROR!" --underline)" + echoerr -e " $(error "└") You cannot specify both \"$(info "--all")\" and any other" + echoerr -e " specific database options at the same time." + echoerr "" + echoerr " Run \"$(info "backup-db --help")\" for more information." + + exit 2 + fi + + DATABASES=(["world"]="${MANGOS_WORLD_DBNAME}" \ + ["characters"]="${MANGOS_CHARACTERS_DBNAME}" \ + ["logs"]="${MANGOS_LOGS_DBNAME}" \ + ["realmd"]="${MANGOS_REALMD_DBNAME}") + fi + if [[ -z ${DATABASES[@]} ]] + then + echoerr "" + echoerr -e " $(error "ERROR!" --underline)" + echoerr -e " $(error "└") You must specify at least one database to backup." + echoerr "" + echoerr " Run \"$(info "backup-db --help")\" for more information." + + exit 3 + fi + + local TIMESTAMP="$(date +"%Y-%m-%d_%H-%M-%S")" + local BACKUP_DIR="/home/mangos/data/backups/${TIMESTAMP}" + local BACKUP_FILE="${BACKUP_DIR}/backup_${TIMESTAMP}.tar.gz" + + mkdir -p "${BACKUP_DIR}" + + for DATABASE in ${!DATABASES[@]} + do + local DATABASE_NAME="${DATABASES["${DATABASE}"]}" + local OUTPUT_FILENAME="${DATABASE}.sql" + + mysql_dump "${DATABASE_NAME}" "${BACKUP_DIR}/${OUTPUT_FILENAME}" + done + + cd "${BACKUP_DIR}" + + echo "${SCRIPT_VERSION}" > .version + tar -czvf "${BACKUP_FILE}" .version $(ls *.sql | xargs -n 1) > /dev/null + + cat "${BACKUP_FILE}" +} +function manage_db() +{ + cd "${DATABASE_DIR}" + + ./InstallFullDB.sh +} +function restore_db() +{ + local TIMESTAMP="$(date +"%Y-%m-%d_%H-%M-%S")" + local TEMP_DIR="${TMPDIR}/${TIMESTAMP}" + local BACKUP_FILE="${TEMP_DIR}/backup_${TIMESTAMP}.tar.gz" + + mkdir -p "${TEMP_DIR}" + cat - > "${BACKUP_FILE}" + + cd "${TEMP_DIR}" + + tar -xzvf "${BACKUP_FILE}" -C . > /dev/null + + local BACKUP_FILES=($(ls *.sql | xargs -n 1)) + + for BACKUP_FILE in ${BACKUP_FILES[@]} + do + local DATABASE="${BACKUP_FILE%.sql}" + + if [[ "${DATABASE}" == "world" ]] + then + local DATABASE_NAME="${MANGOS_WORLD_DBNAME}" + elif [[ "${DATABASE}" == "characters" ]] + then + local DATABASE_NAME="${MANGOS_CHARACTERS_DBNAME}" + elif [[ "${DATABASE}" == "logs" ]] + then + local DATABASE_NAME="${MANGOS_LOGS_DBNAME}" + elif [[ "${DATABASE}" == "realmd" ]] + then + local DATABASE_NAME="${MANGOS_REALMD_DBNAME}" + fi + + mysql_execute "${DATABASE_NAME}" < "${TEMP_DIR}/${BACKUP_FILE}" + done +} +function update_db() +{ + readonly HELP_MSG=" +Updates databases by applying the latest changes + to the database structure and default data. +Dy default, this is a non-destructive procedure, + so any custom data you may have loaded into + your \"$(info "${MANGOS_WORLD_DBNAME}")\" database will remain intact. + +Unfortunately, however, sometimes this plain update procedure + isn't enough to apply all the changes required by + the new version of the server to run properly. +In these cases, you can use the \"$(info "--world")\" option to + perform a \"deeper\" update procedure to solve the issue. + +Please note that this more \"aggressive\" update procedure + will prune any custom data from the \"$(info "${MANGOS_WORLD_DBNAME}")\" database + and will restore the default data shipped with the server. +If, however, you use an original version of the database + and have never customized any data, you can safely use + this option without any fear. No data will be lost. + +Usage: + update-db [OPTIONS...] + +Options: + -w | --world + Updates the world database: \"$(info "${MANGOS_WORLD_DBNAME}")\". + + -h | -? | --help + Displays this help message. +" + if [[ -n "${1}" ]] + then + case "${1}" in + -w | --world) + echo "" + echo -e " $(warning "WARNING!" --underline)" + echo -e " $(warning "└") This procedure will prune all custom data you" + echo -e " may have loaded into your \"$(info "${MANGOS_WORLD_DBNAME}")\" database." + echo "" + read -p "Are you sure to continue? [Y/n]: " ANSWER + + if [[ "${ANSWER}" != "y" ]] && [[ "${ANSWER}" != "Y" ]] + then + echo -e " └ Ok, no problem! Database have been left untouched." + + return + fi + + echo -e " └ Please, wait... Updating database..." + echo "" + echo -e " --------------------------------------" + + install_updates --world + + ;; + -h | -? | --help) + echo -e "${HELP_MSG}" + + exit 0 + ;; + *) + echoerr "" + echoerr -e " $(error "ERROR!" --underline)" + echoerr -e " $(error "└") Unknown option: \"$(info "${1}")\"" + echoerr "" + echoerr " Run \"$(info "update-db --help")\" for more information." + + exit 1 + ;; + esac + else + install_updates + fi +} + +# Execution: +# +case "${1}" in + extract) + shift + + extract_resources_from_client ${@} + ;; + init-db) + shift + + init_db + ;; + backup-db) + shift + + backup_db ${@} + ;; + restore-db) + shift + + restore_db ${@} + ;; + manage-db) + shift + + manage_db + ;; + update-db) + shift + + update_db ${@} + ;; + *) + cd "${HOME_DIR}" + + exec ${@} + ;; +esac diff --git a/builder/run.sh b/builder/run.sh new file mode 100755 index 0000000..1140f0b --- /dev/null +++ b/builder/run.sh @@ -0,0 +1,35 @@ +#!/usr/bin/env bash +# + +set -e + +readonly BASE_DIR="$(realpath "$(dirname "${0}")/..")" +source "${BASE_DIR}/.env" + +readonly NAME="cmangos-builder" +readonly IMAGE="ghcr.io/byloth/cmangos/${WOW_VERSION}/builder" +readonly VERSION="latest" + +readonly DATA_VOLUME="./mangosd_data" +readonly NETWORK="wow" + +if [[ -t 0 ]] && [[ -t 1 ]] +then + readonly TTY="-it" +else + readonly TTY="-i" +fi + +docker run ${TTY} \ + --name "${NAME}" \ + --network "${NETWORK}" \ + --rm \ + -e MYSQL_SUPERUSER="root" \ + -e MYSQL_SUPERPASS="${MYSQL_SUPERPASS}" \ + -e MANGOS_DBHOST="database" \ + -e MANGOS_DBUSER="${MANGOS_DBUSER}" \ + -e MANGOS_DBPASS="${MANGOS_DBPASS}" \ + -v "${DATA_VOLUME}":/home/mangos/data \ + -v "${WOW_CLIENT_DIR}":/home/mangos/wow-client \ + \ + "${IMAGE}:${VERSION}" ${@} diff --git a/cmangos-docker.wiki b/cmangos-docker.wiki new file mode 160000 index 0000000..30bb1fe --- /dev/null +++ b/cmangos-docker.wiki @@ -0,0 +1 @@ +Subproject commit 30bb1fe5e20b1fdb74892316f55ab2ad57d8d8fd diff --git a/compose.yml b/compose.yml index ee414d6..7f413c7 100644 --- a/compose.yml +++ b/compose.yml @@ -1,116 +1,71 @@ +name: cmangos services: database: - build: - context: . - dockerfile: ./docker/database/Dockerfile - restart: unless-stopped - healthcheck: - test: ['CMD', 'healthcheck.sh', '--connect', '--innodb_initialized'] - interval: 1m - timeout: 3s - retries: 5 - start_period: 5m - volumes: - - ./vmangos-database:/var/lib/mysql - - ./storage/database/custom-sql:/sql/custom:ro + image: mariadb:11.8 + container_name: wow-db environment: - - TZ=Europe/Paris - - MARIADB_PASSWORD=mangos - - MARIADB_ROOT_PASSWORD=password - - VMANGOS_REALMLIST_NAME=gregan-wow - - VMANGOS_REALMLIST_ADDRESS=127.0.0.1 - - VMANGOS_REALMLIST_PORT=8085 - - VMANGOS_REALMLIST_ICON=1 # Sets the icon of the realm; 0 = Normal, 1 = PvP, 6 = RP, 8 = RP PVP - - VMANGOS_REALMLIST_TIMEZONE=10 # Sets the timezone of the realm; some common values are: 2 = United States, 3 = Oceanic, 4 = Latin America, 8 = English, 9 = German, 10 = French, 11 = Spanish, 12 = Russian - - VMANGOS_REALMLIST_ALLOWED_SECURITY_LEVEL=0 # Sets the minimum account security level required to log in to the realm; 0 = regular players - - VMANGOS_ENABLE_AUTOMATIC_WORLD_DB_CORRECTIONS=1 - - VMANGOS_PROCESS_CUSTOM_SQL=1 - - realmd: - build: - context: . - dockerfile: ./docker/server/Dockerfile - user: 1000:1000 - command: realmd - ulimits: - nofile: 1024 - depends_on: - - database - restart: unless-stopped - healthcheck: - test: ['CMD', 'nc', '-z', 'localhost', '3724'] - interval: 1m - timeout: 3s - retries: 5 - start_period: 5m - ports: - - 3724:3724 + database_ROOT_PASSWORD: "${MYSQL_SUPERPASS}" volumes: - - ./config/realmd.conf:/opt/vmangos/config/realmd.conf:ro - - ./storage/realmd/logs:/opt/vmangos/storage/logs - environment: - - TZ=Europe/Paris - - WAIT_HOSTS=database:3306 - - WAIT_TIMEOUT=300 + - ./database_data:/var/lib/mysql + - ./config/database:/etc/mysql/conf.d:ro + networks: + - wow mangosd: - build: - context: . - dockerfile: ./docker/server/Dockerfile - user: 1000:1000 - command: mangosd - ulimits: - nofile: 1024 - tty: true - stdin_open: true + image: "ghcr.io/byloth/cmangos/${WOW_VERSION}:latest" + container_name: wow-mangosd depends_on: - database - restart: unless-stopped - stop_grace_period: 2m - healthcheck: - test: ['CMD', 'nc', '-z', 'localhost', '8085'] - interval: 1m - timeout: 3s - retries: 5 - start_period: 5m - ports: - - 8085:8085 - volumes: - - ./config/mangosd.conf:/opt/vmangos/config/mangosd.conf:ro - - ./storage/mangosd/extracted-data:/opt/vmangos/storage/data:ro - - ./storage/mangosd/logs:/opt/vmangos/storage/logs - - ./storage/mangosd/honor:/opt/vmangos/storage/honor environment: - - TZ=Europe/Paris - - WAIT_HOSTS=database:3306 - - WAIT_TIMEOUT=300 + MANGOS_DBHOST: database + MANGOS_DBUSER: "${MANGOS_DBUSER}" + MANGOS_DBPASS: "${MANGOS_DBPASS}" + TZ: "${WOW_TIMEZONE}" + command: mangosd + stdin_open: true + tty: true + ports: + - "${MANGOSD_PORT:-8085}:8085" + volumes: + - ./mangosd_data:/var/lib/mangos:ro + - ./config/mangosd:/opt/mangos/conf:ro + networks: + - wow - # # Optional: - # # See https://github.com/tiredofit/docker-db-backup#configuration for more - # # information. - # database-backup: - # image: tiredofit/db-backup + realmd: + image: "ghcr.io/byloth/cmangos/${WOW_VERSION}:latest" + container_name: wow-realmd + depends_on: + - database + environment: + MANGOS_DBHOST: database + MANGOS_DBUSER: "${MANGOS_DBUSER}" + MANGOS_DBPASS: "${MANGOS_DBPASS}" + TZ: "${WOW_TIMEZONE}" + command: realmd + ports: + - "${REALMD_PORT:-3724}:3724" + volumes: + - ./mangosd_data:/var/lib/mangos:ro + networks: + - wow + + # phpmyadmin: + # image: phpmyadmin:5.2 + # container_name: wow-db-admin # depends_on: # - database - # restart: unless-stopped - # volumes: - # - ./storage/database/backups:/backup + # profiles: + # - debug # environment: - # - TIMEZONE=Etc/UTC # Change this to your desired timezone (usually you want to match your host system's timezone) - # - CONTAINER_ENABLE_MONITORING=FALSE - # # If you are using a Linux host and your user's UID and GID are not 1000, - # # change these next two variables to reflect your user's UID and GID. - # # This will cause the user in the container to use the same UID and GID - # # and prevent permission issues on the bind mount. - # # If you are on Windows or macOS, you can ignore this. - # - USER_DBBACKUP=1000 - # - GROUP_DBBACKUP=1000 - # - DEFAULT_COMPRESSION=GZ - # - DEFAULT_BACKUP_INTERVAL=1440 # How often to run the backup in minutes; 1440 means once per day - # - DEFAULT_BACKUP_BEGIN=0400 # When to start the backup; 0400 means it starts at 04:00 - # - DEFAULT_CLEANUP_TIME=10080 # How old backups have to be to get deleted; 10080 means backups older than a week get deleted - # - DB01_TYPE=mariadb - # - DB01_HOST=database - # - DB01_NAME=characters,realmd # Which databases should be backed up - # - DB01_USER=root - # - DB01_PASS=password # Must match the `MARIADB_ROOT_PASSWORD` environment variable of the `database` service + # PMA_HOST: database + # PMA_USER: root + # PMA_PASSWORD: "${MYSQL_SUPERPASS}" + # networks: + # - wow + # ports: + # - "${PHPMYADMIN_PORT:-8080}:80" + +networks: + wow: + driver: bridge \ No newline at end of file diff --git a/config/database/my.cnf b/config/database/my.cnf new file mode 100644 index 0000000..0a04a43 --- /dev/null +++ b/config/database/my.cnf @@ -0,0 +1,2 @@ +[mysqld] +wait_timeout = 28800 diff --git a/config/mangosd.conf b/config/mangosd.conf deleted file mode 100644 index eda20f7..0000000 --- a/config/mangosd.conf +++ /dev/null @@ -1,3042 +0,0 @@ -##################################### -# MaNGOS Configuration file # -##################################### - -[MangosdConf] -ConfVersion=2010100901 - -################################################################################################################### -# CONNECTIONS AND DIRECTORIES -# -# RealmID -# RealmID must match the realmlist inside the realmd database -# -# DataDir -# Data directory setting. -# Important: DataDir needs to be quoted, as it is a string which may contain space characters. -# Example: "@CMAKE_INSTALL_PREFIX@/share/mangos" -# -# LogsDir -# Logs directory setting. -# Important: Logs dir must exist, or all logs need to be disabled -# Default: "" - no log directory prefix. if used log names aren't absolute paths -# then logs will be stored in the current directory of the running program. -# -# HonorDir -# Folder to store HCR files. These are logs of weekly honor calculation. -# By default logs are stored in the current directory of the running program. -# -# LoginDatabase.Info -# WorldDatabase.Info -# CharacterDatabase.Info -# LogsDatabase.Info -# Database connection settings for the world server. -# Default: -# ---MYSQL--- -# hostname;port;username;password;database -# .;somenumber;username;password;database - use named pipes at Windows -# Named pipes: mySQL required adding "enable-named-pipe" to [mysqld] section my.ini -# .;/path/to/unix_socket;username;password;database - use Unix sockets at Unix/Linux -# ---PGSQL--- -# hostname;port;username;password;database -# .;/path/to/unix_socket/DIRECTORY or . for default path;username;password;database - use Unix sockets at Unix/Linux -# -# LoginDatabase.Connections -# WorldDatabase.Connections -# CharacterDatabase.Connections -# LogsDatabase.Connections -# Amount of connections to database which will be used for SELECT queries. Maximum 16 connections per database. -# Default: 1 connection for SELECT statements -# -# LoginDatabase.WorkerThreads -# WorldDatabase.WorkerThreads -# CharacterDatabase.WorkerThreads -# LogsDatabase.WorkerThreads -# Amount of async threads (with dedicated connection) which will be used for async SELECT, executes, and transactions. -# Default: 1 async worker -# -# Database.AliveCheckInternal - in seconds -# The interval in seconds to check the reachability of the database -# Default: 600 (10 min) -# -# WorldServerPort -# Port on which the server will listen -# -# BindIP -# Bind World Server to IP/hostname -# This option is useful for running multiple mangosd/realmd instances -# on different IP addresses using default ports. -# DO NOT CHANGE THIS UNLESS YOU _REALLY_ KNOW WHAT YOU'RE DOING -# -################################################################################################################### - -RealmID = 1 -DataDir = "/opt/vmangos/storage/data" -LogsDir = "/opt/vmangos/storage/logs" -HonorDir = "/opt/vmangos/storage/honor" -# Username and password must match the `MARIADB_USER` and `MARIADB_PASSWORD` -# environment variables of the `database` service in your `compose.yaml` -# respectively. -LoginDatabase.Info = "database;3306;mangos;mangos;realmd" -LoginDatabase.Connections = 1 -LoginDatabase.WorkerThreads = 1 -# Username and password must match the `MARIADB_USER` and `MARIADB_PASSWORD` -# environment variables of the `database` service in your `compose.yaml` -# respectively. -WorldDatabase.Info = "database;3306;mangos;mangos;mangos" -WorldDatabase.Connections = 1 -WorldDatabase.WorkerThreads = 1 -# Username and password must match the `MARIADB_USER` and `MARIADB_PASSWORD` -# environment variables of the `database` service in your `compose.yaml` -# respectively. -CharacterDatabase.Info = "database;3306;mangos;mangos;characters" -CharacterDatabase.Connections = 1 -CharacterDatabase.WorkerThreads = 1 -# Username and password must match the `MARIADB_USER` and `MARIADB_PASSWORD` -# environment variables of the `database` service in your `compose.yaml` -# respectively. -LogsDatabase.Info = "database;3306;mangos;mangos;logs" -LogsDatabase.Connections = 1 -LogsDatabase.WorkerThreads = 1 -Database.AliveCheckInternal = 600 -WorldServerPort = 8085 -BindIP = "0.0.0.0" - -################################################################################################################### -# PERFORMANCE SETTINGS -# -# UseProcessors -# Used processors mask for multi-processors system (Used only on Windows) -# Default: 0 (selected by OS) -# number (bitmask value of selected processors) -# -# ProcessPriority -# Process priority setting (Used only on Windows) -# Default: 1 (HIGH) -# 0 (Normal) -# -# Compression.Level -# Compression level for update packets sent to client (1..9) -# Default: 1 (speed) -# 9 (best compression) -# -# Compression.Update.Size -# Maxmimum size of update object packets allowed to be sent uncompressed. -# Default: 128 -# -# Compression.Movement.Count -# Amount of movement packets that need to be sent to a session within 10 seconds before compression is enabled. -# Default: 300 -# -# PlayerLimit -# Initial realm capacity. Excluding Mods, GM's and Admins -# Default: 100 -# 0 (for infinite players) -# -1 (for Mods, GM's and Admins only) -# -2 (for GM's and Admins only) -# -3 (for Admins only) -# -# PlayerHardLimit -# Maximum number of players in the world, after increasing PlayerLimit with LoginPerTick. -# Default: 0 - Disabled. No population limit. -# -# LoginQueue.GracePeriodSecs -# How many seconds after last logout can we login and skip the queue -# Default: 0 - Disabled -# -# LoginPerTick -# Maximum number of players allowed to login from the queue during a world update tick (~every 100 ms) -# WARNING: Overwrites $PlayerLimit value. -# Default: 0 (disabled) -# -# CharacterScreenMaxIdleTime -# Number of seconds to allow for players to remain on the character screen before disconnecting -# Default: 0 - Disabled -# -# SaveRespawnTimeImmediately -# Save respawn time for creatures at death and for gameobjects at use/open -# Default: 1 (save creature/gameobject respawn time without waiting grid unload) -# 0 (save creature/gameobject respawn time at grid unload) -# -# MaxOverspeedPings -# Maximum overspeed ping count before player kick (minimum is 2, 0 used to disable check) -# Default: 2 -# -# GridUnload -# Unload grids (if you have lot memory you can disable it to speed up player move to new grids second time) -# Default: 1 (unload grids) -# 0 (do not unload grids) -# -# GridCleanUpDelay -# Grid clean up delay (in milliseconds) -# Default: 300000 (5 min) -# -# MapUpdateInterval -# Map update interval (in milliseconds) -# Default: 100 -# -# ChangeWeatherInterval -# Weather update interval (in milliseconds) -# Default: 600000 (10 min) -# -# PlayerSave.Interval -# Player save interval (in milliseconds) -# Default: 900000 (15 min) -# -# PlayerSave.Stats.MinLevel -# Minimum level for saving character stats for external usage in database -# Default: 0 (do not save character stats) -# 1+ (save stats for characters with level 1+) -# -# PlayerSave.Stats.SaveOnlyOnLogout -# Enable/Disable saving of character stats only on logout -# Default: 1 (only save on logout) -# 0 (save on every player save) -# -# Terrain.Preload.Continents -# Terrain.Preload.Instances -# Enable/Disable to load all terrain data on server startup -# Recommended value: 1. Else, can cause crashes if 'MapUpdate.Threads' > 1 (one map loads a tile, while the other uses pathfinding etc ...) -# Disable on dev realms to speedup startup by 90%. -# Default: 0 -# -# vmap.enableLOS -# vmap.enableHeight -# Enable/Disable VMaps support for line of sight and height calculation -# You need to extract the VMaps in order to enable those options -# Default: 1 (true) -# 0 (false) -# -# vmap.enableIndoorCheck -# Enable/Disable VMap based indoor check to remove outdoor-only auras (mounts etc.). -# Requires VMaps enabled to work. -# Default: 1 (Enabled) -# 0 (Disabled) -# -# mmap.enabled -# Enable/Disable pathfinding using mmaps -# Default: 1 (Enabled) -# 0 (Disabled) -# -# Collision.Models.Unload -# Free model when no one uses it anymore -# Default: 1 (Enabled) -# 0 (Disabled) -# -# DetectPosCollision -# Check final move position, summon position, etc for visible collision with other objects or -# wall (wall only if vmaps are enabled) -# Default: 1 (enable, requires more CPU power) -# 0 (disable, not so nice position selection but will require less CPU power) -# -# TargetPosRecalculateRange -# Max distance from movement target point (+moving unit size) and targeted object (+size) -# after that new target movement point calculated. Max: melee attack range (5), min: contact range (0.5) -# More distance let have better performence, less distance let have more sensitive reaction at target move. -# Default: 1.5 -# -# UpdateUptimeInterval -# Update realm uptime period in minutes (for saving data in 'uptime' table). Must be > 0 -# Default: 10 (minutes) -# -# MaxCoreStuckTime -# Periodically check if the process is frozen, if this is the case force crash after the specified -# amount of seconds. Must be > 0. Recommended > 10 secs if you use this. -# Default: 0 (Disabled) -# -# BanListReloadTimer -# Time between 'ip_banned' / 'account_banned' reload. Useful in multi realm cases. -# Default: 120 -# -# AddonChannel -# Permit/disable the use of the addon channel through the server -# (some client side addons can stop working correctly with disabled addon channel) -# Default: 1 (permit addon channel) -# 0 (do not permit addon channel) -# -# CleanCharacterDB -# Perform character db cleanups on start up -# Default: 1 (Enable) -# 0 (Disabled) -# -################################################################################################################### - -UseProcessors = 0 -ProcessPriority = 1 -Compression.Level = 1 -Compression.Update.Size = 128 -Compression.Movement.Count = 300 -PlayerLimit = 100 -PlayerHardLimit = 0 -LoginQueue.GracePeriodSecs = 0 -LoginPerTick = 0 -CharacterScreenMaxIdleTime = 900 -SaveRespawnTimeImmediately = 1 -MaxOverspeedPings = 2 -GridUnload = 0 -GridCleanUpDelay = 300000 -CleanupTerrain = 1 -MapUpdateInterval = 100 -ChangeWeatherInterval = 600000 -PlayerSave.Interval = 900000 -PlayerSave.Stats.MinLevel = 0 -PlayerSave.Stats.SaveOnlyOnLogout = 1 -Terrain.Preload.Continents = 0 -Terrain.Preload.Instances = 0 -vmap.enableLOS = 1 -vmap.enableHeight = 1 -vmap.enableIndoorCheck = 1 -mmap.enabled = 1 -Collision.Models.Unload = 1 -DetectPosCollision = 1 -TargetPosRecalculateRange = 1.5 -UpdateUptimeInterval = 10 -MaxCoreStuckTime = 0 -BanListReloadTimer = 120 -AddonChannel = 1 -CleanCharacterDB = 1 - -# Optimization / load mitigation settings -Continents.Instanciate = 0 -Continents.InactivePlayers.SkipUpdates = 0 -MapUpdate.ReduceGridActivationDist.Tick = 0 -MapUpdate.IncreaseGridActivationDist.Tick = 0 -MapUpdate.MinGridActivationDistance = 0 -MapUpdate.ReduceVisDist.Tick = 0 -MapUpdate.IncreaseVisDist.Tick = 0 -MapUpdate.MinVisibilityDistance = 0 - -# Maps with no player for more than $UpdateTime (ms) will no longer be updated (0 to disable) -MapUpdate.Empty.UpdateTime = 0 - -# Per-map threading -MapUpdate.Instanced.UpdateThreads = 2 - -# Per-map subthreads (not for instanced maps) -MapUpdate.ObjectsUpdate.MaxThreads = 4 -MapUpdate.ObjectsUpdate.Timeout = 100 -MapUpdate.VisibilityUpdate.MaxThreads = 4 -MapUpdate.VisibilityUpdate.Timeout = 100 - -# Hardcode multithreading options -MapUpdate.UpdatePacketsDiff = 100 -MapUpdate.UpdatePlayersDiff = 100 -MapUpdate.UpdateCellsDiff = 100 - -# Parallelized execution of cells from same map -# MTCells.Threads Number of different cells to update at the sametime -# MTCells.SafeDistance 2 cells wont be updated at the same time if they are at an inferior distance from each other (thread race issues) -MapUpdate.Continents.MTCells.Threads = 0 -MapUpdate.Continents.MTCells.SafeDistance = 1066 -Continents.MotionUpdate.Threads = 0 - -# Number of threads for async tasks (/who, list AH items ...) -AsyncTasks.Threads = 1 -AsyncQueriesTickTimeout = 0 - -# Movement extrapolation system - not stable now -Movement.ExtrapolateChargePosition = 1 -Movement.ExtrapolatePetPosition = 1 - -# Delayed repositionning checks (mounts inside / swimming ...). 0 to disable. -Movement.RelocationVmapsCheckDelay = 0 -Movement.MaxPointsPerPacket = 80 - -################################################################################################################### -# ANTICRASH CONFIGURATION -# -# Anticrash.Options -# Flag values: 1 announce, 2 save all, 4 crash instances, 8 crash continents, coredump 16 -# Default: 28 -# -# Anticrash.Rearm.Timer -# Timer between 2 crashes to be protected by anticrash -# Default: 60000 -# 0 - disable automatic rearm -# -################################################################################################################### - -Anticrash.Options = 28 -Anticrash.Rearm.Timer = 60000 - -################################################################################################################### -# -# PROGRESSION CONFIG -# NOTE: Generally not applicable to database-set progression fields, except for the WowPatch which -# defines which data is loaded from the database. -# -# -# WowPatch -# The current patch the server targets for quest, NPC, dungeon and raid availability. -# 1.2 = 0 -# 1.3 = 1 -# 1.4 = 2 -# 1.5 = 3 -# 1.6 = 4 -# 1.7 = 5 -# 1.8 = 6 -# 1.9 = 7 -# 1.10 = 8 -# 1.11 = 9 -# 1.12 = 10 -# -# PvP.AccurateEquipRequirements -# Whether to enforce Blizzlike PVP rank requirements to equip PVP gear before patch 1.6. -# Default: 1 -# -# PvP.AccuratePurchaseRequirements -# Whether to enforce Blizzlike PVP rank requirements to purchase PVP gear (i.e. lifetime or current rank). -# Default: 1 (require current rank) -# -# PvP.AccurateTimeline -# Whether to enforce accurate PVP timelines. eg. the honour system was not implemented before patch 1.4. -# If set, players will be unable to gain rank until the appropriate patch. -# Default: 1 -# -# PvP.AccurateRewards -# Whether to alter PVP reputation and honorable kill rewards based on patch (changed several times). -# Default: 1 -# -# PvP.DishonorableKills -# Whether to give dishonorable kills to players who kill civilians. -# Default: 1 -# -# PvP.CityProtector -# Whether to assign City Protector titles on honor update or not. -# Default: 0 -# -# Progression.AccuratePetStatistics -# Whether to allow Blizzlike pet statistic (damage, speed, resists) progression. -# Default: 1 -# -# Progression.AccurateLFGAvailability -# If set, disables the LFG system pre-1.3 -# Default: 1 -# -# Progression.AccuratePVEEvents -# Whether to apply progressional changes in PVE events (NOT boss scripts). These are events which -# affect quests and other scripted scenes. -# Default: 1 -# -# Progression.RestoreDeletedItems -# Whether to automatically restore items which were previously deleted because no item template with -# this entry existed on that content patch. Players will receive the item in the mail once it has been -# added to the game. -# Default: 1 -# -# Progression.NoRespecPriceDecay -# If set, the talent respec cost will not decay until patch 1.11 when the monthly reduction was added. -# Default: 1 -# -# Progression.NoQuestXpToGold -# If set, quest xp gained at max level will not be converted to gold until patch 1.10 when the feature was added. -# Default: 1 -# -# Progression.UnlinkedAuctionHouses -# If set, every auction house is separate until patch 1.9. Does not apply to goblin auction houses. -# Default: 1 -# -# DebuffLimit -# How many debuffs can be present on a target simultaneously -# Default: 0 - Decide automatically based on patch -# In patch 1.7 the limit was increased from 8 to 16 -# -################################################################################################################### - -WowPatch = 10 - -PvP.AccurateEquipRequirements = 1 -PvP.AccuratePurchaseRequirements = 1 -PvP.AccurateTimeline = 1 -PvP.AccurateRewards = 1 -PvP.DishonorableKills = 1 -PvP.CityProtector = 0 - -Progression.RestoreDeletedItems = 1 -Progression.AccuratePetStatistics = 1 -Progression.AccurateLFGAvailability = 1 -Progression.AccuratePVEEvents = 1 -Progression.NoRespecPriceDecay = 1 -Progression.NoQuestXpToGold = 1 -Progression.UnlinkedAuctionHouses = 1 -DebuffLimit = 0 - -################################################################################################################### -# SERVER LOGGING -# -# LogSQL -# Enable logging of GM commands - all SQL code will be written to a log file -# All commands are written to a file: YYYY-MM-DD_logSQL.sql -# If a new day starts (00:00:00), a new file is created - the old file will not be deleted. -# Default: 1 - Write SQL code to logfile -# 0 - Do not log -# -# PidFile -# World daemon PID file -# Default: "" - do not create PID file -# "./worldd.pid" - create PID file (recommended name) -# -# LogLevel.Console -# Server console level of logging -# 0 = Error; 1 = Minimum; 2 = Basic; 3 = Detail; 4 = Full/Debug -# Default: 2 -# -# LogLevel.File -# Server file level of logging -# 0 = Error; 1 = Minimum; 2 = Basic; 3 = Detail; 4 = Full/Debug -# Default: 2 -# -# LogLevel.DB -# Database level of logging -# 0 = Error; 1 = Minimum; 2 = Basic; 3 = Detail; 4 = Full/Debug -# Default: 2 -# -# LogTime -# Include time in server console output [hh:mm:ss] -# Default: 0 (no time) -# 1 (print time) -# -# LogFile.TimeStamp -# Include startup timestamp in log file names -# Default: 0 - no timestamp in name -# 1 - add timestamp in name in form Logname_YYYY-MM-DD_HH-MM-SS.Ext for Logname.Ext -# -# LogFilter_TransportMoves -# LogFilter_CreatureMoves -# LogFilter_VisibilityChanges -# LogFilter_Weather -# LogFilter_DbStrictedCheck -# LogFilter_Honor -# Log filters (active by default) -# Default: 1 - not include with any log level -# 0 - include in log if log level permit -# -# LogFilter_PeriodicAffects -# LogFilter_PlayerMoves -# LogFilter_SQLText -# LogFilter_AIAndMovegens -# LogFilter_PlayerStats -# LogFilter_Damage -# LogFilter_Combat -# LogFilter_SpellCast -# Log filters (disabled by default, mostly debug only output affected cases) -# Default: 0 - include in log if log level permit -# 1 - not include with any log level -# -# LogFile.Basic -# Basic log file name -# Default: "Server.log" -# "" - Empty name disable creating log file -# -# LogFile.Anticheat -# Log file for anticheat check results -# Default: "Anticheat.log" -# "" - Empty name disable creating log file -# -# LogFile.Scripts -# Log file for script errors and debug info -# Default: "Scripts.log" -# "" - Empty name disable creating log file -# -# LogFile.Movement -# Log file for movement errors and debug info -# Default: "Movement.log" -# "" - Empty name disable creating log file -# -# LogFile.Chat -# Log file for player chat. -# Default: "Chat.log" -# "" - Empty name disable creating log file -# -# LogFile.Bg -# Log file for battlegrounds system. -# Default: "Bg.log" -# "" - Empty name disable creating log file -# -# LogFile.Char -# Character operations logfile name -# Default: "Char.log" -# "" - Empty name disable creating log file -# -# LogFile.Honor -# Honor information logfile name -# Default: "" - Empty name disable creating log file -# -# LogFile.Ra -# Log file of RA commands -# Default: "Ra.log" -# "" - Empty name for disable -# -# Logfile.DBError -# Log file of DB errors detected at server run -# Default: "DBErrors.log" -# "" - Empty name for disable -# -# LogFile.DBErrorFix -# Log file of SQL requests to apply to fix detected database errors -# Default: "" -# -# LogFile.Loot -# Log file of loot related messages -# Default: "Loot.log" -# "" - Empty name for disable -# -# LogFile.LevelUp -# Log file of levelup related messages -# Default: "LevelUp.log" -# "" - Empty name for disable -# -# LogFile.Performance -# Log file of performance related messages -# Default: "Perf.log" -# "" - Empty name for disable -# -# LogFile.Gm -# GM Log file of gm commands -# Default: "" (Disable) -# -# LogFile.CriticalCommands -# Log file for commands marked as critical, when used on own character (same IP for example) -# Default: "gm_critical.log" -# "" - Empty name for disable -# -# LogFile.Trades -# Log file of trade related messages -# Default: "" (Disable) -# -# CharLogDump -# Write character dump before deleting in Char.log -# For restoration, cut character data from log starting from -# line == START DUMP == to line == END DUMP == (without its) in file and load it using loadpdump command -# Default: 0 - don't include dumping chars to log -# 1 - include dumping chars to log -# -# GmLogPerAccount -# GM Logfiles with GM account id (Note: logs not created if GmLogFile not set) -# Default: 0 - add gm log data to single log file -# 1 - add gm log data to account specific log files with name -# in form Logname_#ID_YYYY-MM-DD_HH-MM-SS.Ext -# or form Logname_#ID.Ext -# -# LogMoneyThreshold -# Log all trades where money exceeds the specified value in copper -# Default: 10000 -# -# LogsDB.GM -# Enable or disable database gm logs. -# Default: 0 -# -# LogsDB.Chat -# Enable or disable database chat logs. -# Default: 0 -# -# LogsDB.Characters -# Enable or disable database character logs. -# Default: 0 -# -# LogsDB.LevelUp -# Enable or disable database levelup logs. -# Default: 0 -# -# LogsDB.Loot -# Enable or disable database loot logs. -# Default: 0 -# -# LogsDB.Trades -# Enable or disable database trade logs. -# Default: 0 -# -# LogsDB.Transactions -# Enable or disable database transaction logs. -# Default: 0 -# -# LogsDB.Battlegrounds -# Enable or disable database battleground logs. -# Default: 0 -# -################################################################################################################### - -LogSQL = 1 -PidFile = "" -LogLevel.Console = 2 -LogLevel.File = 2 -LogLevel.DB = 2 -LogTime = 0 -LogFilter_TransportMoves = 1 -LogFilter_CreatureMoves = 1 -LogFilter_VisibilityChanges = 1 -LogFilter_Weather = 1 -LogFilter_PlayerStats = 0 -LogFilter_SQLText = 0 -LogFilter_PlayerMoves = 0 -LogFilter_PeriodicAffects = 0 -LogFilter_AIAndMovegens = 0 -LogFilter_Damage = 0 -LogFilter_Combat = 0 -LogFilter_SpellCast = 0 -LogFilter_DbStrictedCheck = 1 -LogFilter_Pathfinding = 0 -LogFilter_Honor = 1 - -LogFile.Timestamp = 0 -LogFile.Basic = "Server.log" -LogFile.Anticheat = "Anticheat.log" -LogFile.Scripts = "Scripts.log" -LogFile.Movement = "Movement.log" -LogFile.Chat = "Chat.log" -LogFile.Bg = "Bg.log" -LogFile.Char = "Char.log" -LogFile.Honor = "" -LogFile.Ra = "Ra.log" -LogFile.DBError = "DBErrors.log" -LogFile.DBErrorFix = "" -LogFile.Loot = "Loot.log" -LogFile.LevelUp = "LevelUp.log" -LogFile.Performance = "Perf.log" -LogFile.Gm = "" -LogFile.GmCriticalCommands = "gm_critical.log" -LogFile.Trades = "Trades.log" - -LogMoneyTreshold = 10000 -CharLogDump = 0 - -GmLogPerAccount = 0 - -LogsDB.GM = 0 -LogsDB.Chat = 0 -LogsDB.Characters = 0 -LogsDB.LevelUp = 0 -LogsDB.Loot = 0 -LogsDB.Trades = 0 -LogsDB.Transactions = 0 -LogsDB.Battlegrounds = 0 -Smartlog.Death = 0 -Smartlog.LongCombat = 0 -Smartlog.LongCombatDuration = 1800 - -PerformanceLog.SlowWorldUpdate = 100 -PerformanceLog.SlowMapSystemUpdate = 100 -PerformanceLog.SlowSessionsUpdate = 100 -PerformanceLog.SlowUniqueSessionUpdate = 20 -PerformanceLog.SlowMapUpdate = 100 -PerformanceLog.SlowAsynQueries = 100 -PerformanceLog.SlowPackets = 20 -PerformanceLog.SlowMapPackets = 60 -PerformanceLog.SlowPacketBroadcast = 0 - -################################################################################################################### -# SERVER SETTINGS -# -# GameType -# Server realm style -# 0 = NORMAL; 1 = PVP; 4 = NORMAL; 6 = RP; 8 = RPPVP -# also custom type: 16 FFA_PVP (free for all pvp mode like arena PvP in all zones except rest -# activated places and sanctuaries) -# -# RealmZone -# Server realm zone (sets allowed alphabet in character names/etc). See also Strict*Names options. -# Be careful when changing this as it can cause the realm to not be visible on certain clients. -# -# 1 Development - any language (Default) -# 2 United States - extended-Latin -# 3 Oceanic - extended-Latin -# 4 Latin America - extended-Latin -# 5 Tournament - basic-Latin at create, any at login -# 6 Korea - East-Asian -# 7 Tournament - basic-Latin at create, any at login -# 8 English - extended-Latin -# 9 German - extended-Latin -# 10 French - extended-Latin -# 11 Spanish - extended-Latin -# 12 Russian - Cyrillic -# 13 Tournament - basic-Latin at create, any at login -# 14 Taiwan - East-Asian -# 15 Tournament - basic-Latin at create, any at login -# 16 China - East-Asian -# 17 CN1 - basic-Latin at create, any at login -# 18 CN2 - basic-Latin at create, any at login -# 19 CN3 - basic-Latin at create, any at login -# 20 CN4 - basic-Latin at create, any at login -# 21 CN5 - basic-Latin at create, any at login -# 22 CN6 - basic-Latin at create, any at login -# 23 CN7 - basic-Latin at create, any at login -# 24 CN8 - basic-Latin at create, any at login -# 25 Tournament - basic-Latin at create, any at login -# 26 Test Server - any language -# 27 Tournament - basic-Latin at create, any at login -# 28 QA Server - any language -# 29 CN9 - basic-Latin at create, any at login -# -# TimeZoneOffset -# Time zone offset in hours -# 0 - UTC (default) -# -# DBC.Locale -# DBC Language Settings -# 0 = English; 1 = Korean; 2 = French; 3 = German; 4 = Chinese; 5 = Taiwanese; 6 = Spanish; -# 255 = Auto Detect (Default) -# -# StrictPlayerNames -# Limit player name to language specific symbols set, don't allow creating characters, and flag existing characters for rename and disconnect -# Default: 0 disable (but limited server timezone dependent client check) -# 1 basic latin characters (strict) -# 2 realm zone specific (strict). See RealmZone setting. -# Note: In any case if you want correctly see character name at client this client must have apporopriate fonts -# (included in client by default, with active official localization or custom localization fonts in clientdir/Fonts). -# 3 basic latin characters + server timezone specific -# -# StrictCharterNames -# Limit guild team charter names to language specific symbols set, don't allow creating charters with not allowed symbols in name -# Default: 0 disable -# 1 basic latin characters (strict) -# 2 realm zone specific (strict). See RealmZone setting. -# Note: In any case if you want correctly see character name at client this client must have apporopriate fonts -# (included in client by default, with active official localization or custom localization fonts in clientdir/Fonts). -# 3 basic latin characters + server timezone specific -# -# StrictPetNames -# Limit pet names to language specific symbols set -# Default: 0 disable -# 1 basic latin characters (strict) -# 2 realm zone specific (strict). See RealmZone setting. -# Note: In any case if you want correctly see character name at client this client must have apporopriate fonts -# (included in client by default, with active official localization or custom localization fonts in clientdir/Fonts). -# 3 basic latin characters + server timezone specific -# -# MinPlayerName -# Minimal name length (1..12) -# Default: 2 -# -# MinCharterName -# Minimal name length (1..24) -# Default: 2 -# -# MinPetName -# Minimal name length (1..12) -# Default: 2 -# -# WorldAvailable -# If players are allowed to enter the world. Character creation will still be possible if world is disabled. -# Default: 1 (Enabled) -# 0 (Disabled) -# -# CharactersCreatingDisabled -# Disable character creation for specific team or any (non-player accounts not affected) -# Default: 0 - enabled -# 1 - disabled only for Alliance -# 2 - disabled only for Horde -# 3 - disabled for both teams -# -# CharactersPerAccount -# Limit total number of characters per account (on all realms). -# Note: this setting prevents character creation if total character count among all realms exceeds the limit -# Default: 50 -# The number must be >= CharactersPerRealm -# -# CharactersPerRealm -# Limit number of characters per account on the same realm -# Default: 10 (client limitation) -# The number must be between 1 and 10 -# -# LimitPlayTime -# Keep track of how long player accounts have been online, and limit loot and experience after that. -# After 3 hours looted gold and experience gains are cut in half. After 5 hours they are prevented. -# This feature was only used on Chinese realms. -# Default: 0 (Disabled) -# 1 (Enabled) -# -# RestrictUnverifiedAccounts -# Treat accounts with an unverified email as trial accounts, which are not allowed to do the following: -# - Join a guild -# - Whisper someone who has not added you to their friends list -# - Trade -# - Talk in General, Trade or LocalDefense channels -# - Level above level 20 -# - Receive mail other than from Game Masters -# - Have more then 10 gold -# - May not level higher than 100 in your two main professions, or 150 in secondary professions -# Default: 0 (Disabled) -# 1 (Enabled) -# -# SkipCinematics -# Disable in-game intro cinematic on first login of character (allows to prevent buggy intro when using custom start location) -# Default: 0 - show intro for each new character -# 1 - intro cinematics are disabled -# -# ShowHealthValues -# Show real unit health values instead of percentages (client still requires an addon to display it on unit frame) -# Default: 0 (hide values) -# 1 (show values) -# -# MaxPlayerLevel -# Max level that can be reached by a player for experience (in range from 1 to 100). -# Change not recommended -# Default: 60 -# -# StartPlayerLevel -# Starting level for new characters (in range 1 to MaxPlayerLevel) -# Default: 1 -# -# StartPlayerMoney -# Amount of money in copper that new players will start with. -# If you want to start with one silver for example, use 100 (100 copper = 1 silver) -# Default: 0 -# -# MinHonorKills -# Min kills that players must obtain to enter in weekly honor calculation -# Default: 0 (auto select based on patch) -# -# RpDecay -# Determines the percentage of rank points (RP) decay per week -# If set to 0 there will be no decay -# Default: 0.2 (20%) -# -# MaintenanceDay -# The day of the week on which server maintenance is performed ( currently used for Honor distribution ) -# range (0..6): 0 is the first day of the week (normally sunday), 6 is the latest -# Default: 3 (Wednesday in EU) -# -# InstantLogout -# Enable or disable instant logout for security level (0..4) or high (NOT in combat/while dueling/while falling) -# Default: 1 (Mods/GMs/Admins) -# -# ForceLogoutDelay -# Keep player characters ingame for some time after a client disconnects unexpectedly. -# Default: 1 (true) -# 0 (false) -# -# AutoHonorRestart -# Server will schedule a restart on its own when it's time to perform PvP rank calculations. -# Default: 1 -# -# AllFlightPaths -# Players will start with all flight paths (Note: ALL flight paths, not only player's team) -# Default: 0 (true) -# 1 (false) -# -# AlwaysMaxSkillForLevel -# Players will automatically gain max level dependent (weapon/defense) skill when logging in, leveling up etc. -# Default: 0 (false) -# 1 (true) -# -# ActivateWeather -# Activate weather system -# Default: 1 (true) -# 0 (false) -# -# CastUnstuck -# Allow cast Unstuck spell at .start or client Help option use -# Default: 1 (true) -# 0 (false) -# -# MaxSpellCastsInChain -# Max amount triggered spell casts in chain by one caster, prevent stack overflow crash -# Too Low value will make some correct triggered casts fail -# 0 (no limit) -# Default: 10 -# -# Instance.IgnoreLevel -# Ignore level requirement to enter instance -# Default: 0 (false) -# 1 (true) -# -# Instance.IgnoreRaid -# Ignore raid requirement to enter instance -# Default: 0 (false) -# 1 (true) -# -# Instance.ResetTimeHour -# The hour of the day (0-23) when the global instance resets occur. -# Default: 4 -# -# Instance.UnloadDelay -# Unload the instance map from memory after some time if no players are inside. -# Default: 1800000 (miliseconds, i.e 30 minutes) -# 0 (instance maps are kept in memory until they are reset) -# -# Instance.PerHourLimit -# How many instances players can enter per hour per account. -# Default: 5 -# -# Item.InstantSaveQuality -# Save character inventory instantly on receiving item of this quality or higher. -# Default: 6 - Artifact -# -# Item.PreventDataMining -# Forbid querying information about items that have never been obtained. -# Default: 1 (true) -# 0 (false) -# -# Quests.LowLevelHideDiff -# Quest level difference to hide for player low level quests: -# if player_level > quest_level + LowLevelQuestsHideDiff then quest "!" mark not show for quest giver -# Default: 4 -# -1 (show all available quests marks) -# -# Quests.HighLevelHideDiff -# Quest level difference to hide for player high level quests: -# if player_level < quest_min_level - HighLevelQuestsHideDiff then quest "!" mark not show for quest giver -# Default: 7 -# -1 (show all available quests marks) -# -# Quests.IgnoreRaid -# Non-raid quests allowed in raids -# Default: 0 (not allowed) -# 1 (allowed) -# -# Group.OfflineLeaderDelay -# A grace period for an offline group leader to reconnect before tranfering leadership to the next suitable member of the group (in secs) -# Default: 300 (5 minutes) -# 0 (Do not transfer group leadership) -# -# Guild.EventLogRecordsCount -# Count of guild event log records stored in guild_eventlog table -# Increase to store more guild events in table, minimum is 100 -# You can set it to a very high value to prevent oldest guild events from being overwritten by latest guild events - but it can slow down performance -# Default: 100 -# -# MirrorTimer.Fatigue.Max -# Fatigue max timer value (in secs) -# Default: 60 (1 minute) -# 0 (instant exhaustion damage start) -# -# MirrorTimer.Breath.Max -# Waterbreathing max timer value (in secs) -# Default: 60 -# 0 (instant underwater breathing damage start) -# -# MirrorTimer.Environmental.Max -# Generic environmental (lava/slime/etc) damage delay max timer value (in secs) -# Default: 1 -# 0 (instant in liquid damage start) -# -# EnvironmentalDamage.Min -# EnvironmentalDamage.Max -# Generic environmental (lava/slime/etc) damage taken on tick -# Default: 605-610 -# -# MaxPrimaryTradeSkill -# Max number of primary professions players can have at the same time. -# Default: 2 -# Max : 10 -# -# MinPetitionSigns -# Min number of signatures required to create a guild (0..9). -# Default: 9 -# -# MaxGroupXPDistance -# Max distance to creature for group memeber to get XP at creature death. -# Default: 74 -# -# MailDeliveryDelay -# Mail delivery delay time for item sending -# Default: 3600 sec (1 hour) -# -# Mails.COD.ForceTag.MaxLevel -# Prevent COD scam attempts by adding "COD" prefix to the mail subject -# Only affects senders below given level -# Default: 0 -# -# MassMailer.SendPerTick -# Max amount of mail sent each tick from mails list scheduled for mass proccesing. -# More mails increase server load but speedup mass mail process. Normal tick length: 50 msecs, so 20 ticks in sec and 200 mails in sec by default. -# Default: 10 -# -# Mail.ReturnedMail.PerTick -# Max amount of mail deleted or returned each tick from mails that has expired. -# More mails increase server load but can prevent a bottleneck where expired mails aren't handled until server restart. Normal tick length: 30 minutes. -# Default: 5 -# -# PetUnsummonAtMount -# Permanent pet will be unsummoned at player mount -# Default: 0 - not unsummon -# 1 - unsummon for any mount -# -# PetDefaultLoyalty -# Initial loyalty level for newly tamed pets -# Default: 1 -# -# PlayerCommands -# Should player chat be parsed for GM commands -# Default: 1 (parse commands) -# 0 (ignore commands) -# -# Event.Announce -# Sends an announcement to players when a game event starts. -# Default: 0 (false) -# 1 (true) -# -# AutoBroadcast.Timer -# Server autobroadcast interval set in miliseconds. -# Default: 1800000 = 30 min -# -# Spell.EffectDelay -# Delay in milliseconds before most spell effects are processed. -# Default: 400 -# -# Spell.ProcDelay -# Delay in milliseconds before processing procs. Spells triggered by aura procs also seem -# to be subject to a batching delay, so we double the procs delay to recreate the effect. -# Default: 800 -# -# BeepAtStart -# Beep when mangosd finishes loading. -# Default: 1 (true) -# 0 (false) -# -# ShowProgressBars -# Controls whether progress bars are shown when loading things at server startup. -# Default: 1 (true) -# 0 (false) -# -# WaitAtStartupError -# After startup error report wait for or some time before continuing (and possibly close console window) -# -1 (wait until press) -# Default: 0 (not wait) -# N (>0, wait N secs) -# -# Motd -# Message of the Day. Displayed at world login for every user ('@' for a newline). -# -################################################################################################################### - -GameType = 1 -RealmZone = 1 -TimeZoneOffset = 0 -DBC.Locale = 255 -DeclinedNames = 0 -StrictPlayerNames = 0 -StrictCharterNames = 0 -StrictPetNames = 0 -MinPlayerName = 2 -MinCharterName = 2 -MinPetName = 2 -WorldAvailable = 1 -CharactersCreatingDisabled = 0 -CharactersPerAccount = 50 -CharactersPerRealm = 10 -LimitPlayTime = 0 -RestrictUnverifiedAccounts = 0 -SkipCinematics = 0 -ShowHealthValues = 0 -MaxPlayerLevel = 60 -StartPlayerLevel = 1 -StartPlayerMoney = 0 -MinHonorKills = 0 -RpDecay = 0.2 -MaintenanceDay = 3 -InstantLogout = 1 -ForceLogoutDelay = 0 -AutoHonorRestart = 1 -AllFlightPaths = 0 -AlwaysMaxSkillForLevel = 0 -ActivateWeather = 1 -CastUnstuck = 1 -MaxSpellCastsInChain = 10 -Instance.IgnoreLevel = 0 -Instance.IgnoreRaid = 0 -Instance.ResetTimeHour = 4 -Instance.UnloadDelay = 1800000 -Instance.PerHourLimit = 5 -Item.InstantSaveQuality = 6 -Item.PreventDataMining = 1 -Quests.LowLevelHideDiff = 4 -Quests.HighLevelHideDiff = 7 -Quests.IgnoreRaid = 0 -Group.OfflineLeaderDelay = 300 -Guild.EventLogRecordsCount = 100 -MirrorTimer.Fatigue.Max = 60 -MirrorTimer.Breath.Max = 60 -MirrorTimer.Environmental.Max = 1 -EnvironmentalDamage.Min = 605 -EnvironmentalDamage.Max = 610 -MaxPrimaryTradeSkill = 2 -MinPetitionSigns = 9 -MaxGroupXPDistance = 74 -MailDeliveryDelay = 3600 -Mails.COD.ForceTag.MaxLevel = 0 -MassMailer.SendPerTick = 10 -Mail.ReturnedMail.PerTick = 5 -PetUnsummonAtMount = 0 -PetDefaultLoyalty = 1 -PlayerCommands = 1 -Event.Announce = 0 -AutoBroadcast.Timer = 1800000 -Spell.EffectDelay = 400 -Spell.ProcDelay = 800 -BeepAtStart = 1 -ShowProgressBars = 0 -WaitAtStartupError = 0 -Motd = "Welcome to World of Warcraft!" - -################################################################################################################### -# PLAYER INTERACTION -# -# AllowTwoSide.Accounts -# Allow accounts to create characters on both teams for any realm type. -# Default: 0 (Not allowed) -# 1 (Allowed) -# -# AllowTwoSide.Interaction.Chat -# AllowTwoSide.Interaction.Channel -# AllowTwoSide.Interaction.Group -# AllowTwoSide.Interaction.Guild -# AllowTwoSide.Interaction.Trade -# AllowTwoSide.Interaction.Auction -# AllowTwoSide.Interaction.Mail -# Allow or not common :chat(say,yell);channel(chat)group(join)guild(join);trade with different team, -# merge all auction houses for players from different teams, send mail to different team. -# Default: 0 (Not allowed) -# 1 (Allowed) -# -# AllowTwoSide.WhoList -# Allow showing players from both teams in who list. -# Default: 0 (Not allowed) -# 1 (Allowed) -# -# AllowTwoSide.AddFriend -# Allow adding friends from other team in friend list. -# Default: 0 (Not allowed) -# 1 (Allowed) -# -################################################################################################################### - -AllowTwoSide.Accounts = 0 -AllowTwoSide.Interaction.Chat = 0 -AllowTwoSide.Interaction.Channel = 0 -GM.JoinOppositeFactionChannels = 0 -AllowTwoSide.Interaction.Group = 0 -AllowTwoSide.Interaction.Guild = 0 -AllowTwoSide.Interaction.Trade = 0 -AllowTwoSide.Interaction.Auction = 0 -AllowTwoSide.Interaction.Mail = 0 -AllowTwoSide.WhoList = 0 -AllowTwoSide.AddFriend = 0 - -################################################################################################################### -# CREATURE AND GAMEOBJECT SETTINGS -# -# ThreatRadius -# Radius beyond which creatures can evade after being pulled away from combat start point -# If ThreatRadius is less than creature aggro radius then aggro radius will be used -# Default: 50 yards -# -# MaxCreaturesAttackRadius -# Creatures won't search for target farther than this. -# Reduce for better performances. -# Default: 40 yards -# -# MaxPlayersStealthDetectRange -# Players won't search for stealthed units farther than this. -# Reduce for better performances. -# Default: 30 yards -# -# MaxCreaturesStealthDetectRange -# Creatures won't search for stealthed units farther than this. -# Reduce for better performances. -# Default: 30 yards -# -# MaxCreatureSummonLimit -# Game objects (and other creatures) won't be able to summon more creatures than this limit -# Default: 100 -# -# Rate.Creature.Aggro -# Aggro radius percent or off. -# Default: 1 - 100% -# 1.5 - 150% -# 0 - off (0%) -# -# CreatureFamilyFleeAssistanceRadius -# Radius which creatures will use to seek a near creature for assistance when fleeing. -# Default: 30 -# 0 - off -# -# CreatureFamilyAssistanceRadius -# Radius which creatures will use to call for assistance on aggro -# Default: 10 -# 0 - off -# -# CreatureFamilyAssistanceDelay -# Reaction time for creature assistance call -# Default: 1500 (1.5s) -# -# CreatureFamilyFleeDelay -# Time during which creature can flee when no assistant found -# Default: 7000 (7s) -# -# WorldBossLevelDiff -# Difference for boss dynamic level with target -# Default: 3 -# -# SendLootRollUponReconnect -# Send active loot roll windows when a player reconnects -# Default: 0 - not send -# 1 - send -# -# Corpse.Decay.NORMAL -# Corpse.Decay.RARE -# Corpse.Decay.ELITE -# Corpse.Decay.RAREELITE -# Corpse.Decay.WORLDBOSS -# Seconds until creature corpse will decay without being looted or skinned (not used when creature does not have loot initially) -# Default: 300, 900, 600, 1200, 3600 -# -# Rate.Corpse.Decay.Looted -# Controls how long the creature corpse stays after it has been looted, as a multiplier of its Corpse.Decay.* config. -# Default: 0.0 (will use modifier /3 of the creatures spawntimesecs when 0.0) -# -# Rate.Creature.Normal.Damage -# Rate.Creature.Elite.Elite.Damage -# Rate.Creature.Elite.RAREELITE.Damage -# Rate.Creature.Elite.WORLDBOSS.Damage -# Rate.Creature.Elite.RARE.Damage -# Creature Damage Rates. -# Examples: 2 - creatures will deal double damage with melee attacks -# -# Rate.Creature.Normal.SpellDamage -# Rate.Creature.Elite.Elite.SpellDamage -# Rate.Creature.Elite.RAREELITE.SpellDamage -# Rate.Creature.Elite.WORLDBOSS.SpellDamag -# Rate.Creature.Elite.RARE.SpellDamage -# Creature Spell Damage Rates. -# Examples: 2 - creatures will deal double damage with spells -# -# Rate.Creature.Normal.HP -# Rate.Creature.Elite.Elite.HP -# Rate.Creature.Elite.RAREELITE.HP -# Rate.Creature.Elite.WORLDBOSS.HP -# Rate.Creature.Elite.RARE.HP -# Creature Health Ammount Modifier. -# Examples: 2 - creatures will have double health -# -# ListenRange.Say -# Radius in which chat messages sent in /say can be heard -# Default: 25 -# -# ListenRange.TextEmote -# Radius in which chat messages sent in /emote can be heard -# Default: 25 -# -# ListenRange.Yell -# Radius in which chat messages sent in /yell can be heard -# Default: 300 -# -# GuidReserveSize.Creature -# GuidReserveSize.GameObject -# Amount guids reserved for .npc add/.gobject add directly after last used in DB static spawned creature/gameobject guid -# Commands .npc add/.gobject add can be used only for guids from this reserve and required server restart if all guids -# from reserve used before above commands can be used in like case. Less size increase amount guids for dynamic spawns -# in game from other side -# Default: 100 -# -################################################################################################################### - -ThreatRadius = 50 -Rate.Creature.Aggro = 1 -MaxCreaturesAttackRadius = 40 -MaxPlayersStealthDetectRange = 30 -MaxCreaturesStealthDetectRange = 30 -MaxCreatureSummonLimit = 100 -CreatureFamilyFleeAssistanceRadius = 30 -CreatureFamilyAssistanceRadius = 10 -CreatureFamilyAssistanceDelay = 1500 -CreatureFamilyFleeDelay = 7000 -WorldBossLevelDiff = 3 -Corpse.Decay.NORMAL = 300 -Corpse.Decay.RARE = 900 -Corpse.Decay.ELITE = 600 -Corpse.Decay.RAREELITE = 1200 -Corpse.Decay.WORLDBOSS = 3600 -Rate.Corpse.Decay.Looted = 0.0 -SendLootRollUponReconnect = 0 -Rate.Creature.Normal.Damage = 1 -Rate.Creature.Elite.Elite.Damage = 1 -Rate.Creature.Elite.RAREELITE.Damage = 1 -Rate.Creature.Elite.WORLDBOSS.Damage = 1 -Rate.Creature.Elite.RARE.Damage = 1 -Rate.Creature.Normal.SpellDamage = 1 -Rate.Creature.Elite.Elite.SpellDamage = 1 -Rate.Creature.Elite.RAREELITE.SpellDamage = 1 -Rate.Creature.Elite.WORLDBOSS.SpellDamage = 1 -Rate.Creature.Elite.RARE.SpellDamage = 1 -Rate.Creature.Normal.HP = 1 -Rate.Creature.Elite.Elite.HP = 1 -Rate.Creature.Elite.RAREELITE.HP = 1 -Rate.Creature.Elite.WORLDBOSS.HP = 1 -Rate.Creature.Elite.RARE.HP = 1 -ListenRange.Say = 40 -ListenRange.TextEmote = 40 -ListenRange.Yell = 300 -GuidReserveSize.Creature = 1000 -GuidReserveSize.GameObject = 1000 - - -################################################################################################################### -# CHAT SETTINGS -# -# ChatFakeMessagePreventing -# Chat protection from creating fake messages using a lot spaces (other invisible symbols), -# not applied to addon language messages, but can prevent old addons from working -# if they use normal languages for sending data to other clients. -# Default: 1 (enable fake messages preventing) -# 0 (disable fake messages preventing) -# -# ChatStrictLinkChecking.Severity -# Check chat messages for ingame links to spells, items, quests, achievements etc. -# Default: 2 -# 0 (disable link checking) -# 1 (check if only valid pipe commands are used. This prevents posting pictures for example) -# 2 (verifiy that pipe commands are used in a correct order) -# 3 (check if color, entry and name don't contradict each other. For correct work, please assure -# that you have extracted locale DBCs of every language specific client playing on this server.) -# -# ChatStrictLinkChecking.Kick -# Defines, what should be done if a message is considered to contain invalid pipe commands. -# Default: 0 (silently ignore message) -# 1 (kick players who sent invalid formed messages) -# -# ChatFlood.MessageCount -# Chat anti-flood protection, how many messages are players allowed to send in a given time period -# Default: 10 -# 0 (disable anti-flood protection) -# -# ChatFlood.MessageDelay -# Chat anti-flood protection, minimum message delay to count message -# Default: 1 (in secs) -# -# ChatFlood.MuteTime -# Chat anti-flood protection, for how long will players be muted -# Default: 10 (in secs) -# -# Channel.SilentlyGMJoin -# Silently join GM characters (security level > 1) to channels -# Default: 0 (join announcement in normal way) -# 1 (GM join without announcement) -# -# Channel.StrictLatinInGeneral -# Filter out messages using non-Latin characters in general channels. -# Default: 0 (disable) -# 1 (enable) -# -# WorldChan.MinLevel -# Minimum level to use world channels -# Default: 1 -# -# WorldChan.Cooldown -# WorldChan.CooldownMaxLevel -# WorldChan.CooldownScaling -# Cooldown between messages on world channels -# Default: 0 -# -# WhisperDiffZone.MinLevel -# Minimum level to whisper players in other zones -# Default: 1 -# -# YellMinLevel -# Minimum level to /yell in chat -# Default: 0 -# -# YellRange.LinearScale.MaxLevel -# YellRange.QuadraticScale.MaxLevel -# Limit yell range based on level -# Default: 0 -# -# ChannelInvite.MinLevel -# Minimum level to invite other players into a private channel -# Default: 10 -# -# PublicChansMute.BypassLevel -# Required character level on account to bypass all chat restrictions -# Default: 61 -# -# WhisperRestriction -# Allow players to disable whispers with .wr command -# Default: 0 -# -# SayMinLevel -# Minimum level to /say in chat -# Default: 0 -# -# SayEmoteMinLevel -# Minimum level to /me in chat -# Default: 0 -# -# Antiflood.Sanction -# Sanction applied to a player if sending too many packets -# See enum CheatAction for all flags -# Default: 8 - Kick -# -################################################################################################################### - -ChatFakeMessagePreventing = 1 -ChatStrictLinkChecking.Severity = 2 -ChatStrictLinkChecking.Kick = 0 -ChatFlood.MessageCount = 10 -ChatFlood.MessageDelay = 1 -ChatFlood.MuteTime = 10 -Channel.SilentlyGMJoin = 0 -Channel.StrictLatinInGeneral = 0 -WorldChan.MinLevel = 1 -WorldChan.Cooldown = 0 -WorldChan.CooldownMaxLevel = 0 -WorldChan.CooldownScaling = 0 -WhisperDiffZone.MinLevel = 1 -YellMinLevel = 0; -YellRange.LinearScale.MaxLevel = 0 -YellRange.QuadraticScale.MaxLevel = 0 -ChannelInvite.MinLevel = 10 -PublicChansMute.BypassLevel = 61 -WhisperRestriction = 0 -SayMinLevel = 0; -SayEmoteMinLevel = 0; -Antiflood.Sanction = 8 - -################################################################################################### -# WARDEN SETTINGS -# -# Warden.WinEnabled -# Description: Enables Warden checks for Windows clients. -# 1 - (Enabled) -# Default: 0 - (Disabled) -# -# Warden.OSXEnabled -# Description: Enables Warden checks for OSX clients. -# 1 - (Enabled) -# Default: 0 - (Disabled) -# -# Warden.PlayersOnly -# Description: Ignore game master accounts. -# Default: 0 - (Disabled) -# 1 - (Enabled) -# -# Warden.NumScans -# Description: Number of Warden memory checks that are sent to the client each cycle. -# Default: 10 -# -# Warden.ClientResponseDelay -# Description: Time (in seconds) before client gets disconnected for not responding. -# Default: 30 - (30 Seconds) -# 0 - (Disabled, client won't be kicked) -# -# Warden.ScanFrequency -# Description: Time (in seconds) to wait before sending the next scan request to the client. -# A low number increases traffic and load on client and server side. -# Default: 15 - (15 Seconds) -# -# Warden.DefaultPenalty -# Description: Default action being taken if a client check failed. Penalties can be -# customized per check id in the warden_checks table. -# Default: 0 - (Disabled, Logging only) -# 1 - (Kick) -# 2 - (Ban) -# -# Warden.BanDuration -# Description: Time (in seconds) an account will be banned for if Penalty is set to ban. -# Default: 86400 - (24 hours) -# 0 - (Permanent ban) -# -# Warden.DebugLog -# Description: Prints additional information about performed checks. -# Default: 0 - (Disabled) -# 1 - (Enabled) -# -# Warden.ModuleDir -# Description: Directory where warden modules are stored. -# Default: "warden_modules" -# -################################################################################################### - -Warden.WinEnabled = 0 -Warden.OSXEnabled = 0 -Warden.PlayersOnly = 0 -Warden.NumScans = 10 -Warden.ClientResponseDelay = 30 -Warden.ScanFrequency = 15 -Warden.DefaultPenalty = 0 -Warden.BanDuration = 86400 -Warden.DebugLog = 0 -Warden.ModuleDir = "/opt/vmangos/storage/warden-modules" - -################################################################################################### -# MOVEMENT ANTICHEAT SETTINGS -# -# Anticheat.Enable -# Description: Enables player movement checks. -# 1 - (Enabled) -# Default: 0 - (Disabled) -# -# Anticheat.PlayersOnly -# Description: Ignore game master accounts. -# Default: 1 - (Enabled) -# 0 - (Disabled) -# -# Anticheat.NotifyCheaters -# Description: Informs players if they fail a movement check. -# Default: 0 - (Disabled) -# 1 - (Enabled) -# -# Anticheat.BanDuration -# Description: Time (in seconds) an account will be banned if Penalty is set to ban. -# Default: 86400 - (24 hours) -# 0 - (Permanent ban) -# -# Anticheat.LogData -# Description: Save the result of every anticheat tick in the database. -# Default: 0 - (Disabled) -# 1 - (Enabled) -# -# Anticheat.PacketLogSize -# Description: How many previous movement packets to dump to file upon detection resulting in kick or ban. -# File is saved in pkt format that can be parsed with WowPacketParser. -# Default: 100 -# 0 - (Disabled) -# -# Anticheat.MaxAllowedDesync -# Description: Client time desynchronization allowed when doing movement extrapolation. -# Default: 0 -# -# Anticheat.ReverseTime.Enable -# Description: Check for players whose clock went back in time. -# Default: 1 - (Enabled) -# 0 - (Disabled) -# -# Anticheat.ReverseTime.Threshold -# Description: Detections needed to trigger a penalty. -# Default: 1 -# -# Anticheat.ReverseTime.Penalty -# Description: Action to take upon failing this check. -# Default: 11 - Log, Report to GM, Kick -# -# Anticheat.NullTime.Enable -# Description: Check for players sending a null timestamp. -# Default: 1 - (Enabled) -# 0 - (Disabled) -# -# Anticheat.NullTime.Threshold -# Description: Detections needed to trigger a penalty. -# Default: 2 -# -# Anticheat.NullTime.Penalty -# Description: Action to take upon failing this check. -# Default: 11 - Log, Report to GM, Kick -# -# Anticheat.SkippedHeartbeats.Enable -# Description: Check for players missing a heartbeat packet. -# Default: 1 - (Enabled) -# 0 - (Disabled) -# -# Anticheat.SkippedHeartbeats.Threshold.Tick -# Description: Detections needed to trigger a penalty in one tick. -# Default: 2 -# -# Anticheat.SkippedHeartbeats.Threshold.Total -# Description: Detections needed to trigger a penalty total. -# Default: 10 -# -# Anticheat.SkippedHeartbeats.Penalty -# Description: Action to take upon failing this check. -# Default: 11 - Log, Report to GM, Kick -# -# Anticheat.TimeDesync.Enable -# Description: Check for players that claim more time has passed for them than for the server since last time they moved. -# Default: 1 - (Enabled) -# 0 - (Disabled) -# -# Anticheat.TimeDesync.Threshold -# Description: Milliseconds of time difference tolerated. -# Default: 5000 -# -# Anticheat.TimeDesync.Penalty -# Description: Action to take upon failing this check. -# Default: 11 - Log, Report to GM, Kick -# -# Anticheat.NumDesyncs.Enable -# Description: Check how many times the above described time desync has occurred. -# Default: 1 - (Enabled) -# 0 - (Disabled) -# -# Anticheat.NumDesyncs.Threshold -# Description: Detections needed to trigger a penalty. -# Default: 5 -# -# Anticheat.NumDesyncs.Penalty -# Description: Action to take upon failing this check. -# Default: 11 - Log, Report to GM, Kick -# -# Anticheat.SpeedHack.Enable -# Description: Check for players moving too fast using extrapolation. -# Default: 1 - (Enabled) -# 0 - (Disabled) -# -# Anticheat.OverpspeedDistance.Enable -# Description: Check for players that claim to have traveled further than possible. -# Default: 1 - (Enabled) -# 0 - (Disabled) -# -# Anticheat.OverpspeedDistance.Threshold -# Description: Yards traveled beyond what we think is possible. -# Default: 30 -# -# Anticheat.OverpspeedDistance.Penalty -# Description: Action to take upon failing this check. -# Default: 11 - Log, Report to GM, Kick -# -# Anticheat.OverspeedJump.Enable -# Description: Check for players that are moving too fast while jumping. -# Default: 1 - (Enabled) -# 0 - (Disabled) -# -# Anticheat.OverspeedJump.Reject -# Description: Do not accept movement info and teleport to old position. -# Default: 1 - (Enabled) -# 0 - (Disabled) -# -# Anticheat.OverspeedJump.Threshold -# Description: Detections needed to trigger a penalty. -# Default: 3 -# -# Anticheat.OverspeedJump.Penalty -# Description: Action to take upon failing this check. -# Default: 11 - Log, Report to GM, Kick -# -# Anticheat.JumpSpeedChange.Enable -# Description: Check for players that change speed while in the middle of a jump. -# Default: 1 - (Enabled) -# 0 - (Disabled) -# -# Anticheat.JumpSpeedChange.Reject -# Description: Do not accept movement info and teleport to old position. -# Default: 1 - (Enabled) -# 0 - (Disabled) -# -# Anticheat.JumpSpeedChange.Threshold -# Description: Detections needed to trigger a penalty. -# Default: 3 -# -# Anticheat.JumpSpeedChange.Penalty -# Description: Action to take upon failing this check. -# Default: 11 - Log, Report to GM, Kick -# -# Anticheat.MultiJump.Enable -# Description: Check for players jumping while still in the air. -# Default: 1 - (Enabled) -# 0 - (Disabled) -# -# Anticheat.MultiJump.Reject -# Description: Do not accept movement info and teleport to old position. -# Default: 1 - (Enabled) -# 0 - (Disabled) -# -# Anticheat.MultiJump.Threshold.Tick -# Description: Detections needed to trigger a penalty in one tick. -# Default: 2 -# -# Anticheat.MultiJump.Threshold.Total -# Description: Detections needed to trigger a penalty total. -# Default: 10 -# -# Anticheat.MultiJump.Penalty -# Description: Action to take upon failing this check. -# Default: 11 - Log, Report to GM, Kick -# -# Anticheat.WallClimb.Enable -# Description: Check for players climbing a surface that is too steep. -# Default: 1 - (Enabled) -# 0 - (Disabled) -# -# Anticheat.WallClimb.Reject -# Description: Do not accept movement info and teleport to old position. -# Default: 1 - (Enabled) -# 0 - (Disabled) -# -# Anticheat.WallClimb.Angle -# Description: Vertical angle in radians between two points that players are able to climb. -# Default: 1.0 -# -# Anticheat.WallClimb.Threshold.Tick -# Description: Detections needed to trigger a penalty in one tick. -# Default: 3 -# -# Anticheat.WallClimb.Threshold.Total -# Description: Detections needed to trigger a penalty total. -# Default: 30 -# -# Anticheat.WallClimb.Penalty -# Description: Action to take upon failing this check. -# Default: 11 - Log, Report to GM, Kick -# -# Anticheat.Unreachable.Enable -# Description: Check for players that are in combat with a creature which can't reach them. -# Default: 1 - (Enabled) -# 0 - (Disabled) -# -# Anticheat.Unreachable.Threshold -# Description: Detections needed to trigger a penalty. -# Default: 40 -# -# Anticheat.Unreachable.Penalty -# Description: Action to take upon failing this check. -# Default: 3 - Log, Report to GM -# -# Anticheat.FlyHack.Enable -# Description: Check for players that are flying. -# Default: 1 - (Enabled) -# 0 - (Disabled) -# -# Anticheat.FlyHack.Reject -# Description: Do not accept movement info and teleport to old position. -# Default: 1 - (Enabled) -# 0 - (Disabled) -# -# Anticheat.FlyHack.Threshold -# Description: Detections needed to trigger a penalty. -# Default: 3 -# -# Anticheat.FlyHack.Penalty -# Description: Action to take upon failing this check. -# Default: 11 - Log, Report to GM, Kick -# -# Anticheat.NoFallTime.Enable -# Description: Check for consecutive movements with falling flag but no fall time. -# Default: 1 - (Enabled) -# 0 - (Disabled) -# -# Anticheat.NoFallTime.Threshold -# Description: Detections needed to trigger a penalty. -# Default: 1 -# -# Anticheat.NoFallTime.Penalty -# Description: Action to take upon failing this check. -# Default: 11 - Log, Report to GM, Kick -# -# Anticheat.BadFallReset.Enable -# Description: Check for wrong data in fall reset opcode. -# Default: 1 - (Enabled) -# 0 - (Disabled) -# -# Anticheat.BadFallReset.Threshold -# Description: Detections needed to trigger a penalty. -# Default: 1 -# -# Anticheat.BadFallReset.Penalty -# Description: Action to take upon failing this check. -# Default: 11 - Log, Report to GM, Kick -# -# Anticheat.BadFallStop.Enable -# Description: Check for falling flag being removed without sending land opcode. -# Default: 1 - (Enabled) -# 0 - (Disabled) -# -# Anticheat.BadFallStop.Threshold -# Description: Detections needed to trigger a penalty. -# Default: 1 -# -# Anticheat.BadFallStop.Penalty -# Description: Action to take upon failing this check. -# Default: 11 - Log, Report to GM, Kick -# -# Anticheat.BadMoveStart.Enable -# Description: Check for starting movement with wrong opcode. -# Default: 1 - (Enabled) -# 0 - (Disabled) -# -# Anticheat.BadMoveStart.Threshold -# Description: Detections needed to trigger a penalty. -# Default: 1 -# -# Anticheat.BadMoveStart.Penalty -# Description: Action to take upon failing this check. -# Default: 11 - Log, Report to GM, Kick -# -# Anticheat.Teleport.Enable -# Description: Check for players teleporting far away from their current position. -# Default: 1 - (Enabled) -# 0 - (Disabled) -# -# Anticheat.Teleport.Reject -# Description: Do not accept movement info and teleport to old position. -# Default: 1 - (Enabled) -# 0 - (Disabled) -# -# Anticheat.Teleport.Distance -# Description: Yards that we allow players to travel in one packet. -# Setting this too low can cause false positives at high speeds. -# Default: 40.0 -# -# Anticheat.Teleport.Threshold -# Description: Detections needed to trigger a penalty. -# Default: 3 -# -# Anticheat.Teleport.Penalty -# Description: Action to take upon failing this check. -# Default: 19 - Log, Report to GM, Ban -# -# Anticheat.TeleportToTransport.Enable -# Description: Check for players teleporting on a transport. -# Default: 1 - (Enabled) -# 0 - (Disabled) -# -# Anticheat.TeleportToTransport.Reject -# Description: Do not accept movement info and teleport to old position. -# Default: 1 - (Enabled) -# 0 - (Disabled) -# -# Anticheat.TeleportToTransport.Threshold -# Description: Detections needed to trigger a penalty. -# Default: 2 -# -# Anticheat.TeleportToTransport.Penalty -# Description: Action to take upon failing this check. -# Default: 11 - Log, Report to GM, Kick -# -# Anticheat.FakeTransport.Enable -# Description: Check for players claiming they have boarded a non-existent transport. -# Default: 1 - (Enabled) -# 0 - (Disabled) -# -# Anticheat.FakeTransport.Reject -# Description: Do not accept movement info and logout player to sync transports. -# Default: 1 - (Enabled) -# 0 - (Disabled) -# -# Anticheat.FakeTransport.Threshold -# Description: Detections needed to trigger a penalty. -# Default: 1 -# -# Anticheat.FakeTransport.Penalty -# Description: Action to take upon failing this check. -# Default: 3 - Log, Report to GM -# -# Anticheat.WaterWalk.Enable -# Description: Check for players walking on water without a water walking buff. -# Default: 1 - (Enabled) -# 0 - (Disabled) -# -# Anticheat.WaterWalk.Reject -# Description: Do not accept movement info and teleport to old position. -# Default: 1 - (Enabled) -# 0 - (Disabled) -# -# Anticheat.WaterWalk.Threshold -# Description: Detections needed to trigger a penalty. -# Default: 5 -# -# Anticheat.WaterWalk.Penalty -# Description: Action to take upon failing this check. -# Default: 11 - Log, Report to GM, Kick -# -# -# Anticheat.SlowFall.Enable -# Description: Check for players slow falling without a slow fall buff. -# Default: 1 - (Enabled) -# 0 - (Disabled) -# -# Anticheat.SlowFall.Reject -# Description: Do not accept movement info and teleport to old position. -# Default: 1 - (Enabled) -# 0 - (Disabled) -# -# Anticheat.SlowFall.Threshold -# Description: Detections needed to trigger a penalty. -# Default: 5 -# -# Anticheat.SlowFall.Penalty -# Description: Action to take upon failing this check. -# Default: 11 - Log, Report to GM, Kick -# -# Anticheat.Hover.Enable -# Description: Check for players hovering without a hover buff. -# Default: 1 - (Enabled) -# 0 - (Disabled) -# -# Anticheat.Hover.Reject -# Description: Do not accept movement info and teleport to old position. -# Default: 1 - (Enabled) -# 0 - (Disabled) -# -# Anticheat.Hover.Threshold -# Description: Detections needed to trigger a penalty. -# Default: 5 -# -# Anticheat.Hover.Penalty -# Description: Action to take upon failing this check. -# Default: 11 - Log, Report to GM, Kick -# -# Anticheat.FixedZ.Enable -# Description: Check for players that have a fixed Z axis. -# Default: 1 - (Enabled) -# 0 - (Disabled) -# -# Anticheat.FixedZ.Reject -# Description: Do not accept movement info and teleport to old position. -# Default: 1 - (Enabled) -# 0 - (Disabled) -# -# Anticheat.FixedZ.Threshold -# Description: Detections needed to trigger a penalty. -# Default: 5 -# -# Anticheat.FixedZ.Penalty -# Description: Action to take upon failing this check. -# Default: 11 - Log, Report to GM, Kick -# -# Anticheat.RootMove.Enable -# Description: Check for players that are moving while rooted. -# Default: 1 - (Enabled) -# 0 - (Disabled) -# -# Anticheat.RootMove.Reject -# Description: Do not accept movement info and teleport to old position. -# Default: 1 - (Enabled) -# 0 - (Disabled) -# -# Anticheat.RootMove.Threshold.Tick -# Description: Detections needed to trigger a penalty in one tick. -# Default: 5 -# -# Anticheat.RootMove.Threshold.Total -# Description: Detections needed to trigger a penalty in one tick. -# Default: 30 -# -# Anticheat.RootMove.Penalty -# Description: Action to take upon failing this check. -# Default: 11 - Log, Report to GM, Kick -# -# Anticheat.SelfRoot.Enable -# Description: Check for players that have root flag but should not. -# Default: 1 - (Enabled) -# 0 - (Disabled) -# -# Anticheat.SelfRoot.Reject -# Description: Do not accept movement info and teleport to old position. -# Default: 1 - (Enabled) -# 0 - (Disabled) -# -# Anticheat.SelfRoot.Threshold -# Description: Detections needed to trigger a penalty in one tick. -# Default: 1 -# -# Anticheat.SelfRoot.Penalty -# Description: Action to take upon failing this check. -# Default: 3 - Log, Report to GM -# -# Anticheat.WrongAckData.Enable -# Description: Check for players sending wrong data in an ACK packet. -# Default: 1 - (Enabled) -# 0 - (Disabled) -# -# Anticheat.WrongAckData.Threshold -# Description: Detections needed to trigger a penalty. -# Default: 3 -# -# Anticheat.WrongAckData.Penalty -# Description: Action to take upon failing this check. -# Default: 11 - Log, Report to GM, Kick -# -# Anticheat.PendingAckDelay.Enable -# Description: Check for players failing to acknowledge a forced movement change. -# Default: 1 - (Enabled) -# 0 - (Disabled) -# -# Anticheat.PendingAckDelay.Threshold -# Description: Detections needed to trigger a penalty. -# Default: 3 -# -# Anticheat.PendingAckDelay.Penalty -# Description: Action to take upon failing this check. -# Default: 11 - Log, Report to GM, Kick -# -# Anticheat.ExploreArea.Enable -# Description: Check for players that are exploring low level zones too quickly. -# Default: 1 - (Enabled) -# 0 - (Disabled) -# -# Anticheat.ExploreArea.Threshold -# Description: Count of areas explored this session. -# Default: 100 -# -# Anticheat.ExploreArea.Penalty -# Description: Action to take upon failing this check. -# Default: 11 - Log, Report to GM, Kick -# -# Anticheat.ExploreHighLevelArea.Enable -# Description: Check for players that are exploring high level zones too quickly. -# Default: 1 - (Enabled) -# 0 - (Disabled) -# -# Anticheat.ExploreHighLevelArea.Threshold -# Description: Count of areas explored this session. -# Default: 50 -# -# Anticheat.ExploreHighLevelArea.Penalty -# Description: Action to take upon failing this check. -# Default: 11 - Log, Report to GM, Kick -# -# Anticheat.ForbiddenArea.Enable -# Description: Check for players entering a forbidden area. -# Default: 1 - (Enabled) -# 0 - (Disabled) -# -# Anticheat.ForbiddenArea.Threshold -# Description: Detections needed to trigger a penalty. -# Default: 1 -# -# Anticheat.ForbiddenArea.Penalty -# Description: Action to take upon failing this check. -# Default: 3 - Log, Report to GM -# -# Anticheat.Botting.Enable -# Description: Check for bot-like movement. -# Default: 1 - (Enabled) -# 0 - (Disabled) -# -# Anticheat.Botting.MinPeriod -# Description: For how long client must exibit bot-like movement to trigger penalty. -# Default: 300000 (5 minutes) -# -# Anticheat.Botting.MinPackets -# Description: Minimum number of movement packets that need to have been sent. -# Default: 160 -# -# Anticheat.Botting.MinTurnsMouse -# Anticheat.Botting.MinTurnsKeyboard -# Anticheat.Botting.MinTurnsAbnormal -# Description: Minimum number of turns that need to happen in the given period. -# Default: 20, 80, 5 -# -# Anticheat.Botting.Penalty -# Description: Action to take upon failing this check. -# Default: 3 - Log, Report to GM -# -################################################################################################### - -Anticheat.Enable = 0 -Anticheat.PlayersOnly = 1 -Anticheat.NotifyCheaters = 0 -Anticheat.BanDuration = 86400 -Anticheat.LogData = 0 -Anticheat.PacketLogSize = 100 -Anticheat.MaxAllowedDesync = 0 -Anticheat.ReverseTime.Enable = 1 -Anticheat.ReverseTime.Threshold = 1 -Anticheat.ReverseTime.Penalty = 11 -Anticheat.NullTime.Enable = 1 -Anticheat.NullTime.Threshold = 2 -Anticheat.NullTime.Penalty = 11 -Anticheat.SkippedHeartbeats.Enable = 1 -Anticheat.SkippedHeartbeats.Threshold.Tick = 2 -Anticheat.SkippedHeartbeats.Threshold.Total = 10 -Anticheat.SkippedHeartbeats.Penalty = 11 -Anticheat.TimeDesync.Enable = 1 -Anticheat.TimeDesync.Threshold = 5000 -Anticheat.TimeDesync.Penalty = 11 -Anticheat.NumDesyncs.Enable = 1 -Anticheat.NumDesyncs.Threshold = 5 -Anticheat.NumDesyncs.Penalty = 11 -Anticheat.SpeedHack.Enable = 1 -Anticheat.OverpspeedDistance.Enable = 1 -Anticheat.OverpspeedDistance.Threshold = 30 -Anticheat.OverpspeedDistance.Penalty = 11 -Anticheat.OverspeedJump.Enable = 1 -Anticheat.OverspeedJump.Reject = 1 -Anticheat.OverspeedJump.Threshold = 3 -Anticheat.OverspeedJump.Penalty = 11 -Anticheat.JumpSpeedChange.Enable = 1 -Anticheat.JumpSpeedChange.Reject = 1 -Anticheat.JumpSpeedChange.Threshold = 3 -Anticheat.JumpSpeedChange.Penalty = 11 -Anticheat.MultiJump.Enable = 1 -Anticheat.MultiJump.Reject = 1 -Anticheat.MultiJump.Threshold.Tick = 2 -Anticheat.MultiJump.Threshold.Total = 10 -Anticheat.MultiJump.Penalty = 11 -Anticheat.WallClimb.Enable = 1 -Anticheat.WallClimb.Reject = 1 -Anticheat.WallClimb.Angle = 1.0 -Anticheat.WallClimb.Threshold.Tick = 3 -Anticheat.WallClimb.Threshold.Total = 30 -Anticheat.WallClimb.Penalty = 11 -Anticheat.Unreachable.Enable = 1 -Anticheat.Unreachable.Threshold = 40 -Anticheat.Unreachable.Penalty = 3 -Anticheat.FlyHack.Enable = 1 -Anticheat.FlyHack.Reject = 1 -Anticheat.FlyHack.Threshold = 3 -Anticheat.FlyHack.Penalty = 11 -Anticheat.NoFallTime.Enable = 1 -Anticheat.NoFallTime.Threshold = 1 -Anticheat.NoFallTime.Penalty = 11 -Anticheat.BadFallReset.Enable = 1 -Anticheat.BadFallReset.Threshold = 1 -Anticheat.BadFallReset.Penalty = 11 -Anticheat.BadFallStop.Enable = 1 -Anticheat.BadFallStop.Threshold = 1 -Anticheat.BadFallStop.Penalty = 11 -Anticheat.BadMoveStart.Enable = 1 -Anticheat.BadMoveStart.Threshold = 1 -Anticheat.BadMoveStart.Penalty = 11 -Anticheat.Teleport.Enable = 1 -Anticheat.Teleport.Reject = 1 -Anticheat.Teleport.Distance = 40.0 -Anticheat.Teleport.Threshold = 3 -Anticheat.Teleport.Penalty = 19 -Anticheat.TeleportToTransport.Enable = 1 -Anticheat.TeleportToTransport.Reject = 1 -Anticheat.TeleportToTransport.Threshold = 2 -Anticheat.TeleportToTransport.Penalty = 11 -Anticheat.FakeTransport.Enable = 1 -Anticheat.FakeTransport.Reject = 1 -Anticheat.FakeTransport.Threshold = 1 -Anticheat.FakeTransport.Penalty = 3 -Anticheat.WaterWalk.Enable = 1 -Anticheat.WaterWalk.Reject = 1 -Anticheat.WaterWalk.Threshold = 5 -Anticheat.WaterWalk.Penalty = 11 -Anticheat.SlowFall.Enable = 1 -Anticheat.SlowFall.Reject = 1 -Anticheat.SlowFall.Threshold = 5 -Anticheat.SlowFall.Penalty = 11 -Anticheat.Hover.Enable = 1 -Anticheat.Hover.Reject = 1 -Anticheat.Hover.Threshold = 5 -Anticheat.Hover.Penalty = 11 -Anticheat.FixedZ.Enable = 1 -Anticheat.FixedZ.Reject = 1 -Anticheat.FixedZ.Threshold = 5 -Anticheat.FixedZ.Penalty = 11 -Anticheat.RootMove.Enable = 1 -Anticheat.RootMove.Reject = 1 -Anticheat.RootMove.Threshold.Tick = 5 -Anticheat.RootMove.Threshold.Total = 30 -Anticheat.RootMove.Penalty = 11 -Anticheat.SelfRoot.Enable = 1 -Anticheat.SelfRoot.Reject = 1 -Anticheat.SelfRoot.Threshold = 1 -Anticheat.SelfRoot.Penalty = 3 -Anticheat.WrongAckData.Enable = 1 -Anticheat.WrongAckData.Threshold = 3 -Anticheat.WrongAckData.Penalty = 11 -Anticheat.PendingAckDelay.Enable = 1 -Anticheat.PendingAckDelay.Threshold = 3 -Anticheat.PendingAckDelay.Penalty = 11 -Anticheat.ExploreArea.Enable = 1 -Anticheat.ExploreArea.Threshold = 100 -Anticheat.ExploreArea.Penalty = 11 -Anticheat.ExploreHighLevelArea.Enable = 1 -Anticheat.ExploreHighLevelArea.Threshold = 50 -Anticheat.ExploreHighLevelArea.Penalty = 11 -Anticheat.ForbiddenArea.Enable = 1 -Anticheat.ForbiddenArea.Threshold = 1 -Anticheat.ForbiddenArea.Penalty = 3 -Anticheat.Botting.Enable = 1 -Anticheat.Botting.MinPeriod = 300000 -Anticheat.Botting.MinPackets = 160 -Anticheat.Botting.MinTurnsMouse = 20 -Anticheat.Botting.MinTurnsKeyboard = 80 -Anticheat.Botting.MinTurnsAbnormal = 5 -Anticheat.Botting.Penalty = 3 - -# Time to wait for movement change ack -Movement.PendingAckResponseTime = 4000 - -################################################################################################################### -# GAME MASTER SETTINGS -# -# GM.LoginState -# GM mode at login -# Default: 2 (last save state) -# 0 (disable) -# 1 (enable) -# -# GM.Visible -# GM visibility at login -# Default: 2 (last save state) -# 0 (invisible) -# 1 (visible) -# -# GM.AcceptTickets -# Is GM accepting tickets from player by default or not. -# Default: 2 (last save state) -# 0 (disable) -# 1 (enable) -# -# GM.Chat -# GM chat mode at login -# Default: 2 (last save state) -# 0 (disable) -# 1 (enable) -# -# GM.WhisperingTo -# Is GM accepting whispers from player by default or not. -# Default: 2 (last save state) -# 0 (disable) -# 1 (enable) -# -# GM.InGMList.Level -# Max GM level shown in GM list (if visible) in non-GM state (.gm off) -# 0 (none) -# 1 (only moderators) -# 2 (only gamemasters) -# Default: 3 (anyone) -# -# GM.InWhoList.Level -# Max GM level shown in who list (if visible). -# 0 (only players) -# 1 (only moderators) -# 2 (only gamemasters) -# Default: 3 (anyone) -# -# GM.LogTrade -# Include GM trade and trade slot enchanting operations in GM log if it enabled -# Default: 1 (include) -# 0 (not include) -# -# GM.StartLevel -# GM starting level (1-255) -# Default: 1 -# -# GM.LowerSecurity -# Disallow a lower security member to interact with a higher one using commands -# Default: 0 (disable) -# 1 (enable) -# -# GM.CreditOnDie -# Give loot / money / reputation at ".die" command -# Default: 1 (enable) -# -# GM.AllowTrades -# Allow trades / mails / AH / ... -# Default: 1 -# -# GM.AllowPublicChannels -# Allow to speak in general / world channels -# Default: 0 -# -# GMTickets.Enable -# Allow opening support tickets. -# Default: 1 -# -# GMTickets.MinLevel -# Minimum required character level to open a ticket. -# Default: 0 -# -# GMTickets.Admin.Security -# Required security rank to assign ticket in escalation queue. -# Default: 7 -# -# GM.CheatGod -# Character will not die from damage. -# 0 (disable) -# Default: 1 (enable) -# -################################################################################################################### - -GM.LoginState = 2 -GM.Visible = 2 -GM.AcceptTickets = 2 -GM.Chat = 2 -GM.WhisperingTo = 2 -GM.InGMList.Level = 3 -GM.InWhoList.Level = 3 -GM.LogTrade = 1 -GM.StartLevel = 1 -GM.LowerSecurity = 0 -GM.CreditOnDie = 1 -GM.AllowTrades = 1 -GM.AllowPublicChannels = 0 -GMTickets.Enable = 1 -GMTickets.MinLevel = 0 -GMTickets.Admin.Security = 7 -GM.CheatGod = 1 - -################################################################################################################### -# VISIBILITY AND RADIUSES -# -# Visibility.GroupMode -# Group visibility modes -# Default: 0 (standard setting: only members from same group can 100% auto detect invisible player) -# 1 (raid members 100% auto detect invisible player from same raid) -# 2 (players from same team can 100% auto detect invisible player) -# -# Visibility.Distance.Continents -# Visibility.Distance.Instances -# Visibility.Distance.BG -# Visibility distance for different ingame object in different maps. -# Visibility on continents on offy ~90 yards. In BG ~180. For instances default ~120. -# Max limited by active player zone: ~ 333 -# Min limit is max aggro radius (45) * Rate.Creature.Aggro -# Visibility.Distance.Continents.Min -# If bad performance, visibilityDistance may be reduced -# -# Visibility.Distance.InFlight -# Visible distance for player in flight -# Min limit is 0 (not show any objects) -# -# Visibility.Distance.Grey.Unit -# Visibility grey distance for creatures/players (fast changing objects) -# addition to appropriate object type Visibility.Distance.* use in case visibility removing to -# object (except corpse around distances) If D is distance and G is grey distance then object -# make visible if distance to it <= D but make non visible if distance > D+G -# Default: 1 (yard) -# -# Visibility.Distance.Grey.Object -# Visibility grey distance for dynobjects/gameobjects/corpses/creature bodies -# Default: 10 (yards) -# -# Visibility.RelocationLowerLimit -# Object's visibility update called, when distance between current object's position and position, -# where visiblity was updated last time, reaches RelocationLoverLimit value -# Default: 10 (yards) -# -# Visibility.AIRelocationNotifyDelay -# Delay time between creature AI reactions on nearby movements -# Default: 1000 (milliseconds) -# -# Visibility.ForceActiveObjects -# Force any creatures or gameobjects with increased visibility set in template to be active objects. -# The modifier will not work for creatures that don't have the active flag set in spawn table otherwise. -# Default: 1 (enabled) -# 0 (disabled) -# -################################################################################################################### - -Visibility.GroupMode = 0 -Visibility.Distance.Continents = 100 -Visibility.Distance.Continents.Min = 60 -Visibility.Distance.Instances = 170 -Visibility.Distance.BG = 180 -Visibility.Distance.InFlight = 100 -Visibility.Distance.Grey.Unit = 1 -Visibility.Distance.Grey.Object = 10 -Visibility.RelocationLowerLimit = 10 -Visibility.AIRelocationNotifyDelay = 1000 -Visibility.ForceActiveObjects = 1 - -################################################################################################################### -# SERVER RATES -# -# Rate.Health -# Rate.Mana -# Rate.Rage.Income -# Rate.Rage.Loss -# Rate.Focus -# Rate.Loyalty -# Rate.Energy (Rogue) -# Health and power regeneration and rage gain from damage. -# Default: 1 -# -# Rate.Drop.Item.Poor -# Rate.Drop.Item.Normal -# Rate.Drop.Item.Uncommon -# Rate.Drop.Item.Rare -# Rate.Drop.Item.Epic -# Rate.Drop.Item.Legendary -# Rate.Drop.Item.Artifact -# Rate.Drop.Item.Referenced -# Rate.Drop.Money -# Drop rates (items by quality and money) -# Default: 1 -# -# Rate.XP.Kill -# Rate.XP.Kill.Elite -# Rate.XP.Quest -# Rate.XP.Explore -# Rate.XP.Personal.Min -# Rate.XP.Personal.Max -# XP rates -# Default: 1 -# -# Rate.Rest.InGame -# Rate.Rest.Offline.InTavernOrCity -# Rate.Rest.Offline.InWilderness -# Resting points accumulation rates (1 - normal, 2 - double rate, 0.5 - half rate, etc) -# -# Rate.Damage.Fall -# Damage after fall rate (1 - standard, 2 - double damage, 0.5 - half damage, etc) -# -# Rate.Auction.Time -# Rate.Auction.Deposit -# Rate.Auction.Cut -# Auction rates (auction time, deposit fee at auction start, auction cut from price at auction end) -# -# Auction.Deposit.Min -# Minimum auction deposit size in copper -# Default: 0 -# -# Auction.AccountConcurrentLimit -# Maximum auctions (per auction house, including shared) an account can have posted at once. eg. limit of 100 -> 100 on Alliance auction house, 100 on Neutral auction house -# Default: 0 -# -# Rate.Mining.Amount -# Rate.Mining.Next -# Mining Rates (Mining.Amount changes minimum/maximum usetimes of a deposit, -# Mining.Next changes chance to have next use of a deposit) -# -# Rate.Talent -# Talent Point rates -# Default: 1 -# -# Rate.RespecBaseCost -# Minimum cost for unlearning talents, in gold -# Default: 1 -# -# Rate.RespecMultiplicativeCost -# Cost * multiplier = total cost of unlearning talents, in gold -# Default: 5 -# -# Rate.RespecMaxMultiplier -# RespecMultiplicativeCost * RespecMaxMultiplier = maximum cost of unlearning talents, in gold -# Default: 10 -# -# Rate.RespecMinMultiplier -# Once the player exceeds this multiplier value, they can never drop below it again -# Default: 2 -# -# Rate.Reputation.Gain -# Reputation Gain rate -# Default: 1 -# -# Rate.Reputation.LowLevel.Kill -# Reputation Gain form low level kill (grey creture) -# Default: 0.2 -# -# Rate.Reputation.LowLevel.Quest -# Reputation Gain rate -# Default: 1 -# -# Rate.InstanceResetTime -# Multiplier for the number of days in between global raid resets. -# Default: 1 -# -# SkillGain.Crafting -# SkillGain.Defense -# SkillGain.Gathering -# SkillGain.Weapon -# Crafting/defense/gathering/weapon skills gain at skill up (1,2,...) -# Default: 1 -# -# SkillChance.Orange -# SkillChance.Yellow -# SkillChance.Green -# SkillChance.Grey -# Skill chance values (0..100) -# Default: 100-75-25-0 -# -# SkillChance.MiningSteps -# SkillChance.SkinningSteps -# For skinning and Mining chance decrease with skill level. -# Default: 0 - no decrease -# 75 - in 2 times each 75 skill points -# -# SkillFail.Loot.Fishing -# For fishing instead fail provided junk loot -# Default: 0 (disabled) -# 1 (enabled) -# -# SkillFail.Gain.Fishing -# For fishing skill gain possible at fail also -# Default: 0 (disabled) -# 1 (enabled) -# -# SkillFail.Possible.FishingPool -# For fishing pool impossible fail from low skill by default -# Default: 1 (enabled) -# 0 (disabled) -# -# DurabilityLoss.Enable -# Description: Enable durability loss -# Default: 1 (enabled) -# 0 (disabled) -# -# DurabilityLossChance.Damage -# Chance to lose durability on an equipped item when taking or dealing damage -# Default: 0.5 -# -# Death.SicknessLevel -# Level at which characters can be afflicted with Resurrection Sickness (1 min). -# Duration increases by 1 minute for each level above this setting, up to 10 minutes. -# Default: 11 -# -10 - character will have full time (10 min) sickness at 1 level -# maxplayerlevel+1 - character will not have sickness at any level -# -# Death.CorpseReclaimDelay.PvP -# Death.CorpseReclaimDelay.PvE -# Enabled/disabled increase corpse reclaim delay at often PvP/PvE deaths -# Default: 1 (enabled) -# 0 (disabled) -# -# Death.Bones.World -# Death.Bones.Battleground -# Enabled/disabled creating bones instead corpse at resurrection (in normal zones/instacnes, or battleground) -# Default: 1 (enabled) -# 0 (disabled) -# -# Death.Ghost.RunSpeed.World -# Death.Ghost.RunSpeed.Battleground -# Modifies the speed of player ghosts, removed upon reviving, not permanent/saved, in non-BG and BG maps -# Default: 1.0 (normal speed) -# -# PvP.PoolSizePerFaction -# Defines the size of the active PvP pools of players per faction that's used to calculate standing on each -# honor maintenance restart. It's mathematically impossible to reach Rank 14 in low population servers, hence -# the need to "fake" the PvP pool. The minimum value is 167 for R14 to be achievable. -# Default: 0 (the real pool size will be used) -# X (the real pool size will be overriden with X) -# -################################################################################################################### - -Rate.Health = 1 -Rate.Mana = 1 -Rate.Rage.Income = 1 -Rate.Rage.Loss = 1 -Rate.Focus = 1 -Rate.Loyalty = 1 -Rate.Energy = 1 -Rate.Drop.Item.Poor = 1 -Rate.Drop.Item.Normal = 1 -Rate.Drop.Item.Uncommon = 1 -Rate.Drop.Item.Rare = 1 -Rate.Drop.Item.Epic = 1 -Rate.Drop.Item.Legendary = 1 -Rate.Drop.Item.Artifact = 1 -Rate.Drop.Item.Referenced = 1 -Rate.Drop.Money = 1 -Rate.XP.Kill = 1 -Rate.XP.Kill.Elite = 1 -Rate.XP.Quest = 1 -Rate.XP.Explore = 1 -Rate.XP.Personal.Min = 1 -Rate.XP.Personal.Max = 1 -Rate.Rest.InGame = 1 -Rate.Rest.Offline.InTavernOrCity = 1 -Rate.Rest.Offline.InWilderness = 1 -Rate.Damage.Fall = 1 -Rate.Auction.Time = 1 -Rate.Auction.Deposit = 1 -Rate.Auction.Cut = 1 -Auction.Deposit.Min = 0 -Auction.AccountConcurrentLimit = 0 -Rate.Mining.Amount = 1 -Rate.Mining.Next = 1 -Rate.Talent = 1 -Rate.RespecBaseCost = 1 -Rate.RespecMultiplicativeCost = 5 -Rate.RespecMaxMultiplier = 10 -Rate.RespecMinMultiplier = 2 -Rate.Reputation.Gain = 1 -Rate.Reputation.LowLevel.Kill = 0.2 -Rate.Reputation.LowLevel.Quest = 1 -Rate.InstanceResetTime = 1 -SkillGain.Crafting = 1 -SkillGain.Defense = 1 -SkillGain.Gathering = 1 -SkillGain.Weapon = 1 -SkillChance.Orange = 100 -SkillChance.Yellow = 75 -SkillChance.Green = 25 -SkillChance.Grey = 0 -SkillChance.MiningSteps = 0 -SkillChance.SkinningSteps = 0 -SkillFail.Loot.Fishing = 0 -SkillFail.Gain.Fishing = 0 -SkillFail.Possible.FishingPool = 1 -DurabilityLoss.Enable = 1 -DurabilityLossChance.Damage = 0.5 -Death.SicknessLevel = 11 -Death.CorpseReclaimDelay.PvP = 1 -Death.CorpseReclaimDelay.PvE = 1 -Death.Bones.World = 1 -Death.Bones.Battleground = 1 -Corpses.UpdateMinutes = 20 -Bones.ExpireMinutes = 60 -Death.Ghost.RunSpeed.World = 1.0 -Death.Ghost.RunSpeed.Battleground = 1.0 -Rate.WarEffortResourceComplete = 0.0 -WarEffortResourceCompletePeriod = 86400 -PvP.PoolSizePerFaction = 0 - -################################################################################################################### -# BATTLEGROUND CONFIG -# -# Battleground.CastDeserter -# Cast Deserter spell on players who leave a battleground in progress -# Default: 1 (enable) -# 0 (disable) -# -# Battleground.QueueAnnouncer.Join -# Send global notifications when any player joins a battleground queue -# Default: 0 (not send) -# 1 (send to joined player only) -# 2 (send to all players) -# -# Battleground.QueueAnnouncer.Start -# Enable queue announcer posting to chat at BG start -# Default: 0 (disable) -# 1 (enable) -# -# Battleground.QueuesCount -# Maximum battleground queues a player can join at the same time -# Default: 0 (decide based on current content patch) -# -# Battleground.InvitationType -# Set Battleground invitation type -# Default: 1 (Experimental - don't allow to invite much more players of one faction) -# 0 (normal - invite as much players to bg as possible, don't bother with balance) -# -# Battleground.PrematureFinishTimer -# The time to end the bg if there are less than MinPlayersPerTeam on one side in milliseconds -# Default: 300000 (5 minutes) -# 0 - disable (not recommended) -# -# BattleGround.PremadeGroupWaitForMatch -# The time in which premade group of 1 faction waits in BG Queue for premade group of other faction -# 1800000 (30 minutes) -# Default: 0 - disable premade group matches (group always added to bg team in normal way) -# -# BattleGround.RandomizeQueues -# Randomize the queue positions -# Default: 0 - first players to queue will be invited first -# -# BattleGround.GroupQueueLimit -# The maximum number of players that can be queued as a group -# If the group is bigger than this value, players are queued solo -# Default: 40 -# -# Alterac.MinPlayersInQueue -# Minimum players in queue per faction before starting a match -# Default: 0 - use database value -# -# Alterac.InitMaxPlayers -# Maximum number of players at AV creation -# To be efficient, you should have 'InitMaxPlayers * 2 > MinPlayersInQueue' -# Default: 0 - use database value -# -################################################################################################################### - -Battleground.CastDeserter = 1 -Battleground.QueueAnnouncer.Join = 0 -Battleground.QueueAnnouncer.Start = 0 -Battleground.InvitationType = 1 -BattleGround.PrematureFinishTimer = 300000 -BattleGround.PremadeGroupWaitForMatch = 0 -BattleGround.PremadeQueue.MinGroupSize = 6 -BattleGround.QueuesCount = 0 -BattleGround.TagInBattleGrounds = 1 -BattleGround.RandomizeQueues = 0 -BattleGround.GroupQueueLimit = 40 -Alterac.MinPlayersInQueue = 0 -Alterac.InitMaxPlayers = 0 - -################################################################################################################### -# OUTDOOR PVP CONFIG -# -# OutdoorPvP.SI.Enable -# Enable Silithus Outdoor PvP -# Default: 1 (enable) -# 0 (disable) -# -# OutdoorPvP.EP.Enable -# Enable Eastern Plaguelands Outdoor PvP -# Default: 1 (enable) -# 0 (disable) -# -################################################################################################################### - -OutdoorPvP.SI.Enable = 1 -OutdoorPvP.EP.Enable = 1 - -################################################################################################################### -# MEETING STONE LFG CONFIG -# -# LFG.Matchmaking -# Check talents of players in queue when making a group -# Default: 0 (disable - disregard talents, use class priorities, e.g. warrior - tank, paladin - healer) -# 1 (enable - set role based on talent tree that has more talent points) -# -# LFG.MatchmakingTimer -# The time (in seconds) before player in LFG queue stops using matchmaking to find group faster -# Only works if matchmaking is enabled -# Default: 600 (5 minutes) -# -################################################################################################################### - -LFG.Matchmaking = 0 -LFG.MatchmakingTimer = 600 - -################################################################################################################### -# -# NETWORK CONFIG -# -# Network.Threads -# Number of threads for network, recommend 1 thread per 1000 connections. -# Default: 1 -# -# Network.OutKBuff -# The size of the output kernel buffer used ( SO_SNDBUF socket option, tcp manual ). -# Default: -1 (Use system default setting) -# -# Network.OutUBuff -# Userspace buffer for output. This is amount of memory reserved per each connection. -# Default: 65536 -# -# Network.TcpNoDelay: -# TCP Nagle algorithm setting -# Default: 0 (enable Nagle algorithm, less traffic, more latency) -# 1 (TCP_NO_DELAY, disable Nagle algorithm, more traffic but less latency) -# -# Network.KickOnBadPacket -# Kick player on bad packet format. -# Default: 0 - do not kick -# 1 - kick -# -# Network.PacketBroadcast.Threads -# Number of threads for packets broadcasting. -# Default: 0 - disabled -# -# Network.PacketBroadcast.Frequency -# How often packet broadcasting threads run in milliseconds. -# Default: 50 -# -# Network.Interval -# How often ACE will transmit the client's outbound packet buffer in milliseconds. -# Default: 10 -# -################################################################################################################### - -Network.Threads = 1 -Network.OutKBuff = -1 -Network.OutUBuff = 65536 -Network.TcpNodelay = 1 -Network.KickOnBadPacket = 0 -Network.PacketBroadcast.Threads = 0 -Network.PacketBroadcast.Frequency = 50 -Network.PacketBroadcast.ReduceVisDistance.DiffAbove = 0 -Network.Interval = 10 - -################################################################################################################### -# CONSOLE, REMOTE ACCESS AND SOAP -# -# Console.Enable -# Enable console -# Default: 1 - on -# 0 - off -# -# Ra.Enable -# Enable remote console -# Default: 0 - off -# 1 - on -# -# Ra.IP -# Default remote console ip address, use 0.0.0.0 for every address -# -# Ra.Port -# Default remote console port -# Default: 3443 -# -# Ra.MinLevel -# Minimum level that's required to login,3 by default -# Default: 3 (Administrator) -# -# Ra.Secure -# Kick client on wrong pass -# 0 - off -# Default: 1 - on -# -# Ra.Stricted -# Not allow execute console level only commands remotly by RA -# 0 - off -# Default: 1 - on -# -# -# SOAP.Enable -# Enable soap service -# Default: 0 - off -# 1 - on -# -# SOAP.IP -# Bound SOAP service ip address, use 0.0.0.0 to access from everywhere -# Default: 127.0.0.1 -# -# SOAP.Port -# SOAP port -# Default: 7878 -# -################################################################################################################### - -Console.Enable = 1 -Ra.Enable = 0 -Ra.IP = 0.0.0.0 -Ra.Port = 3443 -Ra.MinLevel = 3 -Ra.Secure = 1 -Ra.Stricted = 1 - -SOAP.Enabled = 0 -SOAP.IP = 0.0.0.0 -SOAP.Port = 7878 - -################################################################################################################### -# CHARACTER DELETION -# -# CharDelete.Method -# Character deletion behavior -# Default: 0 - Completely remove the character from the database -# 1 - Unlinking, the character gets unlinked from the account, -# the name gets freed up and appears as deleted ingame -# -# CharDelete.MinLevel -# Character gets deleted by CharDelete.Method=0 when the character -# hasn't the specified level yet. -# Default: 0 - For all characters the specified mode will be used -# 1+ - Only for players which have reached the specified level -# will be deleted by the specified mode. -# the rest will be deleted by CharDelete.Method=0 -# -# CharDelete.KeepDays -# Define the amount of days for which the characters are kept in the database before -# they will be removed -# Default: 30 -# 0 - Don't delete any characters, they stay in the database forever. -# -################################################################################################################### - -CharDelete.Method = 0 -CharDelete.MinLevel = 0 -CharDelete.KeepDays = 30 - -################################################################################################################### -# AUCTION HOUSE BOT -# -# AHBot.Enable -# Enable AH bot. -# The AH bot will automatically create listings based on the data in the 'auctionhousebot' table. -# Default: 0 - off -# 1 - on -# -# AHBot.ah.fid -# The faction template ID used for the AH bot. -# This determines which auction house(s) listings are put into. -# Default: 120 - Neutral (Booty Bay, Gadgetzan and Everlook) -# 55 - Alliance (Ironforge, Stormwind and Teldrassil) -# 29 - Horde (Orgrimmar, Thunderbluff and Undercity) -# -# AHBot.itemcount -# How many listings to put into the auction house at most. -# The AH bot will add items until this number of listings is reached in the auction house (this includes potential player listings). -# Default: 50 -# -################################################################################################################### -AHBot.Enable = 0 -AHBot.ah.fid = 120 -AHBot.itemcount = 50 - -################################################################################################################### -# PLAYER BOTS -# -# RandomBot.Enable -# Enables automatic spawning of random bots. These bots have no AI. You have to code one and assign it. -# Default: 0 - off -# 1 - on -# -# RandomBot.MinBots -# Minimum amount of random bots the server will try to spawn. -# Default: 0 -# -# RandomBot.MaxBots -# Maximum amount of random bots the server will try to spawn. -# Default: 0 -# -# RandomBot.Refresh -# How often the the server will check if there are enough bots spawned. -# Default: 60000 (1 minute) -# -# PlayerBot.AllowSaving -# Enables saving of character progress when a real character is loaded. -# Default: 0 - off -# 1 - on -# -# PlayerBot.Debug -# Enables additional debugging information about bots that is printed in the console. -# Default: 0 - off -# 1 - on -# -# PlayerBot.UpdateMs -# How often the AI of bots will be updated. A bigger delay will make them less responsive. -# Default: 1000 (1 second) -# -# PlayerBot.ShowInWhoList -# Enables displaying characters controlled by bots in /who results. -# Default: 0 - off -# 1 - on -# -# PartyBot.MaxBots -# Maximum number of party bots that normal players are allowed to summon. -# Default: 0 (no limit) -# -# PartyBot.SkipChecks -# Disables the additional restrictions that apply when a normal player tries to summon a party bot. -# Default: 0 (restricted) -# 1 (no restrictions) -# -# PartyBot.AutoEquip -# What gear will new partybots spawn with. -# Default: 1 (random items) -# 0 (normal starting items) -# 2 (premade gear template) -# -# PartyBot.RandomGearLevelDifference -# Item level difference for random items that will bots equip. Has only effect if PartyBot.AutoEquip is set to 1. -# A lower number equals to gear being more close to the bot level. -# Default: 10 (bots will equip gear down to a minimum of 10 item level difference) -# -# BattleBot.AutoEquip -# What gear will new battlebots spawn with. -# Default: 1 (random items) -# 0 (normal starting items) -# 2 (premade gear template) -# -# BattleBot.AutoJoin -# Adds enough battlebots for battleground to start when a player queues. -# Default: 0 - off -# 1 - on -# -################################################################################################################### -RandomBot.Enable = 0 -RandomBot.MinBots = 0 -RandomBot.MaxBots = 0 -RandomBot.Refresh = 60000 - -PlayerBot.AllowSaving = 0 -PlayerBot.Debug = 0 -PlayerBot.UpdateMs = 1000 -PlayerBot.ShowInWhoList = 0 - -PartyBot.MaxBots = 0 -PartyBot.SkipChecks = 0 -PartyBot.AutoEquip = 1 -PartyBot.RandomGearLevelDifference = 10 - -BattleBot.AutoEquip = 1 -BattleBot.AutoJoin = 0 - -################################################################################################################### -# Mail flooding mitigation -################################################################################################################### -MailSpam.ExpireSecs = 0 -MailSpam.MaxMails = 2 -MailSpam.Level = 1 -MailSpam.Money = 0 -MailSpam.Item = 0 - -################################################################################################################### -# Dynamic respawn rates - Disabled by default -################################################################################################################### -DynamicRespawn.Range = -1 -DynamicRespawn.PercentPerPlayer = 0 -DynamicRespawn.MaxReductionRate = 0 -DynamicRespawn.MinRespawnTime = 0 -DynamicRespawn.AffectRespawnTimeBelow = 0 -DynamicRespawn.AffectLevelBelow = 0 -DynamicRespawn.PlayersThreshold = 0 -DynamicRespawn.PlayersMaxLevelDiff = 0 diff --git a/config/mangosd/mangosd.conf b/config/mangosd/mangosd.conf new file mode 100644 index 0000000..1f18db1 --- /dev/null +++ b/config/mangosd/mangosd.conf @@ -0,0 +1,56 @@ + +################################################################################################################### +# +# GameType +# Server realm style +# 0 = NORMAL; 1 = PVP; 4 = NORMAL; 6 = RP; 8 = RPPVP +# also custom type: 16 FFA_PVP (free for all pvp mode like arena PvP in all zones except rest +# activated places and sanctuaries) +# +# RealmZone +# Server realm zone (set allowed alphabet in character names/etc). See also Strict*Names options. +# +# 1 Development - any language (Default) +# 2 United States - extended-Latin +# 3 Oceanic - extended-Latin +# 4 Latin America - extended-Latin +# 5 Tournament - basic-Latin at create, any at login +# 6 Korea - East-Asian +# 7 Tournament - basic-Latin at create, any at login +# 8 English - extended-Latin +# 9 German - extended-Latin +# 10 French - extended-Latin +# 11 Spanish - extended-Latin +# 12 Russian - Cyrillic +# 13 Tournament - basic-Latin at create, any at login +# 14 Taiwan - East-Asian +# 15 Tournament - basic-Latin at create, any at login +# 16 China - East-Asian +# 17 CN1 - basic-Latin at create, any at login +# 18 CN2 - basic-Latin at create, any at login +# 19 CN3 - basic-Latin at create, any at login +# 20 CN4 - basic-Latin at create, any at login +# 21 CN5 - basic-Latin at create, any at login +# 22 CN6 - basic-Latin at create, any at login +# 23 CN7 - basic-Latin at create, any at login +# 24 CN8 - basic-Latin at create, any at login +# 25 Tournament - basic-Latin at create, any at login +# 26 Test Server - any language +# 27 Tournament - basic-Latin at create, any at login +# 28 QA Server - any language +# 29 CN9 - basic-Latin at create, any at login +# +# RabbitDay +# Set to Rabbit Day (date in unix time), only the day and month are considered, the year is not important +# Default: 0 (off) +# Suggested: 954547200 (April 1st, 2000) +# +# Motd +# Message of the Day. Displayed at worldlogin for every user ('@' for a newline). +# +#################################################################################################################### + +GameType = 0 +RealmZone = 8 +RabbitDay = 954547200 +Motd = "Bienvenue en Azeroth! (sur le serveur du garage)" diff --git a/config/realmd.conf b/config/realmd.conf deleted file mode 100644 index 1966c0b..0000000 --- a/config/realmd.conf +++ /dev/null @@ -1,189 +0,0 @@ -############################################ -# MaNGOS realmd configuration file # -############################################ - -[RealmdConf] -ConfVersion=2020010501 - -################################################################################################################### -# REALMD SETTINGS -# -# LoginDatabaseInfo -# Database connection settings for the realm server. -# Default: hostname;port;username;password;database -# .;somenumber;username;password;database - use named pipes at Windows -# Named pipes: mySQL required adding "enable-named-pipe" to [mysqld] section my.ini -# .;/path/to/unix_socket;username;password;database - use Unix sockets at Unix/Linux -# Unix sockets: experimental, not tested -# -# LogsDir -# Logs directory setting. -# Important: Logs dir must exists, or all logs be disable -# Default: "" - no log directory prefix. if used log names aren't absolute paths -# then logs will be stored in the current directory of the running program. -# -# PatchesDir -# Folder to serve client patches. -# Important: Patches dir must contain mpq files like this: .mpq e.g. 65535enGB.mpq -# Default: "./patches" -# -# MaxPingTime -# Settings for maximum database-ping interval (minutes between pings) -# -# RealmServerPort -# Port on which the server will listen -# -# BindIP -# Bind Realm Server to IP/hostname -# This option is useful for running multiple worldd/realmd instances -# on different IP addresses using default ports. -# DO NOT CHANGE THIS UNLESS YOU _REALLY_ KNOW WHAT YOU'RE DOING -# -# PidFile -# Realmd daemon PID file -# Default: "" - do not create PID file -# "./realmd.pid" - create PID file (recommended name) -# -# LogLevel -# Server console level of logging -# 0 = Minimum; 1 = Error; 2 = Detail; 3 = Full/Debug -# Default: 0 -# -# LogTime -# Include time in server console output [hh:mm:ss] -# Default: 0 (no time) -# 1 (print time) -# -# LogFile -# Logfile name -# Default: "Realmd.log" -# "" - empty name disable creating log file -# -# LogTimestamp -# Logfile with timestamp of server start in name -# Default: 0 - no timestamp in name -# 1 - add timestamp in name in form Logname_YYYY-MM-DD_HH-MM-SS.Ext for Logname.Ext -# -# LogFileLevel -# Server file level of logging -# 0 = Minimum; 1 = Error; 2 = Detail; 3 = Full/Debug -# Default: 0 -# -# UseProcessors -# Used processors mask for multi-processors system (Used only at Windows) -# Default: 0 (selected by OS) -# number (bitmask value of selected processors) -# -# ProcessPriority -# Process proirity setting (Used only at Windows) -# Default: 1 (HIGH) -# 0 (Normal) -# -# WaitAtStartupError -# After startup error report wait or some time before continue (and possible close console window) -# -1 (wait until press) -# Default: 0 (not wait) -# N (>0, wait N secs) -# -# MinRealmListDelay -# Minimum amount of time, in seconds, that must pass before a second realm list request is considered legitimate -# Default: 1 -# -# RealmsStateUpdateDelay -# Realm list Update up delay (updated at realm list request if delay expired). -# Default: 20 -# 0 (Disabled) -# -# WrongPass.MaxCount -# Number of login attemps with wrong password before the account or IP is banned -# Default: 0 (Never ban) -# -# WrongPass.BanTime -# Duration of the ban in seconds (0 means permanent ban) -# Default: 600 -# -# WrongPass.BanType -# Ban the IP or account on which login is attempted -# Default: 0 (Ban IP) -# 1 (Ban Account) -# -# ReqEmailVerification -# Required that the user has verified their email address before allowing logins -# Default: 0 (No verification required) -# 1 (Verification required) -# -# ReqEmailSince -# Require the Email Verification Since the Timestamp -# Default: 0 (Disabled) -# 1530302395 (Timestamp) -# -# GeoLocking -# Blocks account logins when a change in geographical location is detected -# Default: 0 -# -# StrictVersionCheck -# Description: Prevent modified clients from connnecting -# Default: 1 - (Enabled) -# 0 - (Disabled) -# -# SendMail -# Whether the server is allowed to send emails -# The server must have been compiled with ENABLE_MAILSENDER -# Default: 0 (Do not send mail) -# -# MailFrom -# Specify the email address to send mail from -# Default: "" -# -# MailCertChecks -# Whether to validate the certificates of the mail server -# Default: 1 (Recommended) -# -# SendGridKey -# If SendGrid is being used for emailing, specify your API key here -# This option must be set if SendGrid is enabled -# Default: "" -# -# GeolockGUID -# The SendGrid template GUID for geolocking emails -# Default: "" -# -# MaxSessionDuration -# Maximum time in seconds that sessions can stay open -# Default: 300 (5 minutes) -# -################################################################################################################### - -# Username and password must match the `MARIADB_USER` and `MARIADB_PASSWORD` -# environment variables of the `database` service in your `compose.yaml` -# respectively. -LoginDatabaseInfo = "database;3306;mangos;mangos;realmd" -LogsDir = "/opt/vmangos/storage/logs" -PatchesDir = "./patches" -MaxPingTime = 30 -RealmServerPort = 3724 -BindIP = "0.0.0.0" -PidFile = "" -LogLevel = 0 -LogTime = 0 -LogFile = "Realmd.log" -LogTimestamp = 0 -LogFileLevel = 0 -UseProcessors = 0 -ProcessPriority = 1 -WaitAtStartupError = 0 -MinRealmListDelay = 1 -RealmsStateUpdateDelay = 20 -WrongPass.MaxCount = 0 -WrongPass.BanTime = 600 -WrongPass.BanType = 0 -ReqEmailVerification = 0 -ReqEmailSince = 0 -GeoLocking = 0 -StrictVersionCheck = 1 -SendMail = 0 -MailFrom = "" -MailCertChecks = 1 -SendGridKey = "" -GeolockGUID = "" -MaxSessionDuration = 300 diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 0000000..2f7fd2d --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,223 @@ +FROM ubuntu:24.04 AS builder + +ENV DEBIAN_FRONTEND="noninteractive" + +ARG TIMEZONE="Etc/UTC" +ENV TZ="${TIMEZONE}" +RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ + --mount=type=cache,target=/var/lib/apt/lists,sharing=locked \ + \ + apt-get update \ + && apt-get install -y --no-install-recommends \ + tzdata \ + && ln -snf "/usr/share/zoneinfo/${TIMEZONE}" /etc/localtime \ + && echo "${TIMEZONE}" > /etc/timezone \ + && dpkg-reconfigure --frontend noninteractive tzdata \ + \ + && apt-get install -y --no-install-recommends \ + build-essential \ + ca-certificates \ + cmake \ + g++-14 \ + git-core \ + libboost-filesystem-dev \ + libboost-program-options-dev \ + libboost-regex-dev \ + libboost-serialization-dev \ + libboost-system-dev \ + libboost-thread-dev \ + libmariadb-dev-compat \ + libssl-dev \ + mariadb-client \ + \ + && update-alternatives --install /usr/bin/gcc gcc \ + /usr/bin/gcc-14 14 \ + --slave /usr/bin/g++ g++ \ + /usr/bin/g++-14 \ + \ + && rm -rf /tmp/* + +ARG EXPANSION +ARG MANGOS_SHA1="latest" +ARG DATABASE_SHA1="latest" +ENV HOME_DIR="/home/mangos" +ENV MANGOS_DIR="${HOME_DIR}/mangos" +ENV DATABASE_DIR="${HOME_DIR}/${EXPANSION}-db" + +RUN mkdir -p "${MANGOS_DIR}" \ + "${DATABASE_DIR}" \ + \ + && cd /tmp \ + && if [ "${MANGOS_SHA1}" = "latest" ]; \ + then \ + git clone "https://github.com/cmangos/mangos-${EXPANSION}.git" \ + --branch "master" \ + --single-branch \ + --depth 1 \ + "${MANGOS_DIR}"; \ + else \ + git clone "https://github.com/cmangos/mangos-${EXPANSION}.git" \ + --branch "master" \ + --single-branch \ + cmangos-mangos \ + && cd cmangos-mangos \ + && git archive "${MANGOS_SHA1}" | tar xC "${MANGOS_DIR}"; \ + fi \ + \ + && cd /tmp \ + && if [ "${DATABASE_SHA1}" = "latest" ]; \ + then \ + git clone "https://github.com/cmangos/${EXPANSION}-db.git" \ + --branch "master" \ + --single-branch \ + --depth 1 \ + "${DATABASE_DIR}"; \ + else \ + git clone "https://github.com/cmangos/${EXPANSION}-db.git" \ + --branch "master" \ + --single-branch \ + cmangos-db \ + && cd cmangos-db \ + && git archive "${DATABASE_SHA1}" | tar xC "${DATABASE_DIR}"; \ + fi \ + \ + && rm -rf /tmp/* + +# TODO: Add here as building arguments all `cmake` parameters. +# - CMAKE_INSTALL_PREFIX Path where the server should be installed to +# - PCH Use precompiled headers +# - DEBUG Include additional debug-code in core +# - WARNINGS Show all warnings during compile +# - POSTGRESQL Use PostgreSQL instead of mysql +# - BUILD_EXTRACTORS Build map/dbc/vmap/mmap extractor +# - BUILD_SCRIPTDEV Build scriptdev. (Disable it to speedup build in dev mode by not including scripts) +# - BUILD_PLAYERBOTS Build Playerbot mod +# - BUILD_AHBOT Build Auction House Bot mod +# - BUILD_METRICS Build Metrics, generate data for Grafana +# - BUILD_RECASTDEMOMOD Build map/vmap/mmap viewer +# - BUILD_GIT_ID Build git_id +# - BUILD_DOCS Build documentation with doxygen +# +ARG THREADS="1" +RUN mkdir -p "${HOME_DIR}/build" \ + "${HOME_DIR}/run" \ + \ + && cd "${HOME_DIR}/build" \ + && cmake ../mangos/ \ + -D CMAKE_INSTALL_PREFIX=../run \ + -D PCH=1 \ + -D DEBUG=0 \ + -D BUILD_EXTRACTORS=ON \ + && make -j "${THREADS}" \ + && make install \ + \ + && cd "${HOME_DIR}/run/bin/tools" \ + && chmod +x ExtractResources.sh \ + MoveMapGen.sh + +RUN useradd --comment "MaNGOS" \ + --home "${HOME_DIR}" \ + --user-group mangos + +WORKDIR "${HOME_DIR}" + +ENV MYSQL_SUPERUSER="root" +ENV MYSQL_SUPERPASS="" + +ENV MANGOS_DBHOST="host.docker.internal" +ENV MANGOS_DBPORT="3306" +ENV MANGOS_DBUSER="mangos" +ENV MANGOS_DBPASS="" + +ENV MANGOS_WORLD_DBNAME="${EXPANSION}mangos" +ENV MANGOS_CHARACTERS_DBNAME="${EXPANSION}characters" +ENV MANGOS_LOGS_DBNAME="${EXPANSION}logs" +ENV MANGOS_REALMD_DBNAME="${EXPANSION}realmd" + +COPY builder/entrypoint.sh / +COPY builder/InstallFullDB.config "${DATABASE_DIR}/" + +ENTRYPOINT ["/entrypoint.sh"] +CMD ["bash"] + +ENV VOLUME_DIR="/home/mangos/data" +ENV TMPDIR="${VOLUME_DIR}/tmp" +VOLUME ["${VOLUME_DIR}"] + + +FROM ubuntu:24.04 AS runner + +ENV DEBIAN_FRONTEND="noninteractive" + +ARG TIMEZONE="Etc/UTC" +ENV TZ="${TIMEZONE}" +RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ + --mount=type=cache,target=/var/lib/apt/lists,sharing=locked \ + \ + apt-get update \ + && apt-get install -y --no-install-recommends \ + tzdata \ + && ln -snf "/usr/share/zoneinfo/${TIMEZONE}" /etc/localtime \ + && echo "${TIMEZONE}" > /etc/timezone \ + && dpkg-reconfigure --frontend noninteractive tzdata \ + \ + && apt-get install -y --no-install-recommends \ + gosu \ + libmariadb-dev \ + libssl3 \ + wait-for-it \ + \ + && rm -rf /tmp/* + +ENV HOME_DIR="/home/mangos" +ENV MANGOS_DIR="/opt/mangos" +RUN useradd --home "${HOME_DIR}" --create-home \ + --comment "MaNGOS" \ + --user-group mangos + +WORKDIR "${MANGOS_DIR}" + +ARG EXPANSION +COPY --from=builder "${HOME_DIR}/run" "${MANGOS_DIR}" +COPY runner/entrypoint.sh / + +ENV VOLUME_DIR="/var/lib/mangos" +ENV TMPDIR="${VOLUME_DIR}/tmp" +RUN mkdir "${VOLUME_DIR}" \ + && sed -i '/^DataDir/c\DataDir = "'"${VOLUME_DIR}"'"' etc/mangosd.conf.dist + +ENV MANGOS_DBHOST="host.docker.internal" +ENV MANGOS_DBPORT="3306" +ENV MANGOS_DBUSER="mangos" +ENV MANGOS_DBPASS="" + +ENV MANGOS_WORLD_DBNAME="${EXPANSION}mangos" +ENV MANGOS_CHARACTERS_DBNAME="${EXPANSION}characters" +ENV MANGOS_LOGS_DBNAME="${EXPANSION}logs" +ENV MANGOS_REALMD_DBNAME="${EXPANSION}realmd" + +ENTRYPOINT ["/entrypoint.sh"] +CMD ["bash"] + +EXPOSE 3443 3724 7878 8085 8086 +VOLUME ["${VOLUME_DIR}"] + +ARG COMMIT_SHA +ARG CREATE_DATE +ARG VERSION +LABEL org.opencontainers.image.title="CMaNGOS Runner \"${EXPANSION}\" version" +LABEL org.opencontainers.image.description="A CMaNGOS \"${EXPANSION}\" version Docker image ready-to-use to host your emulated private server for WoW wherever you want." +LABEL org.opencontainers.image.licenses="GPL-2.0" +LABEL org.opencontainers.image.version="${VERSION}" +LABEL org.opencontainers.image.revision="${COMMIT_SHA}" +LABEL org.opencontainers.image.created="${CREATE_DATE}" + +ARG MANGOS_SHA1 +LABEL "net.cmangos.mangos-${EXPANSION}.revision"="${MANGOS_SHA1}" +LABEL "net.cmangos.mangos-${EXPANSION}.source"="https://github.com/cmangos/mangos-${EXPANSION}" +LABEL "net.cmangos.mangos-${EXPANSION}.url"="https://github.com/cmangos/mangos-${EXPANSION}" + +ARG DATABASE_SHA1 +LABEL "net.cmangos.${EXPANSION}-db.revision"="${DATABASE_SHA1}" +LABEL "net.cmangos.${EXPANSION}-db.source"="https://github.com/cmangos/${EXPANSION}-db" +LABEL "net.cmangos.${EXPANSION}-db.url"="https://github.com/cmangos/${EXPANSION}-db" diff --git a/docker/database/Dockerfile b/docker/database/Dockerfile deleted file mode 100644 index b2fa03f..0000000 --- a/docker/database/Dockerfile +++ /dev/null @@ -1,85 +0,0 @@ -ARG DEBIAN_FRONTEND=noninteractive -ARG VMANGOS_REPOSITORY_URL=https://github.com/vmangos/core.git -ARG VMANGOS_REVISION=development -ARG VMANGOS_WORLD_DB_REPOSITORY_URL=https://github.com/brotalnia/database.git -ARG VMANGOS_WORLD_DB_DUMP_NAME=world_full_14_june_2021 -ARG VMANGOS_WORLD_DB_DUMP_NEW_FILE=/sql/world-new.sql - -FROM mariadb:11.8 AS setup - -ARG DEBIAN_FRONTEND -ARG VMANGOS_REPOSITORY_URL -ARG VMANGOS_REVISION -ARG VMANGOS_WORLD_DB_REPOSITORY_URL -ARG VMANGOS_WORLD_DB_DUMP_NAME - -RUN \ - apt update -y && \ - apt install -y \ - git \ - p7zip-full && \ - git clone "${VMANGOS_REPOSITORY_URL}" /core && \ - cd /core && \ - git checkout "${VMANGOS_REVISION}" && \ - git clone "${VMANGOS_WORLD_DB_REPOSITORY_URL}" /database && \ - mkdir -p /sql/custom && \ - mkdir -p /sql/migrations && \ - cd /core/sql && \ - mv characters.sql /sql && \ - mv logon.sql /sql && \ - mv logs.sql /sql && \ - cd /core/sql/migrations && \ - chmod +x merge.sh && \ - ./merge.sh && \ - mv characters_db_updates.sql /sql/migrations && \ - mv logon_db_updates.sql /sql/migrations && \ - mv logs_db_updates.sql /sql/migrations && \ - mv world_db_updates.sql /sql/migrations && \ - cd /database && \ - 7z e ${VMANGOS_WORLD_DB_DUMP_NAME}.7z && \ - mv ${VMANGOS_WORLD_DB_DUMP_NAME}.sql /sql/world.sql && \ - rm -rf /core /database && \ - apt remove -y \ - git \ - p7zip-full && \ - apt autoremove -y && \ - apt clean -y && \ - rm -rf /var/lib/apt/lists/* - -FROM mariadb:11.8 - -ARG VMANGOS_WORLD_DB_DUMP_NEW_FILE - -ENV MARIADB_AUTO_UPGRADE=1 -ENV MARIADB_USER=mangos -ENV MARIADB_PASSWORD=mangos -ENV MARIADB_ROOT_PASSWORD=password -ENV VMANGOS_REALMLIST_NAME=VMaNGOS -ENV VMANGOS_REALMLIST_ADDRESS=127.0.0.1 -ENV VMANGOS_REALMLIST_PORT=8085 -ENV VMANGOS_REALMLIST_ICON=1 -ENV VMANGOS_REALMLIST_TIMEZONE=0 -ENV VMANGOS_REALMLIST_ALLOWED_SECURITY_LEVEL=0 -ENV VMANGOS_WORLD_DB_DUMP_NEW_FILE=${VMANGOS_WORLD_DB_DUMP_NEW_FILE} -ENV VMANGOS_ENABLE_AUTOMATIC_WORLD_DB_CORRECTIONS=1 -ENV VMANGOS_PROCESS_CUSTOM_SQL=1 - -COPY --from=setup /sql /sql - -RUN \ - mkdir -p /opt/scripts && \ - mkdir /always-initdb.d - -COPY ./docker/database/db-functions.sh /opt/scripts -COPY ./docker/database/create-db.sh /docker-entrypoint-initdb.d -COPY ./docker/database/update-db.sh /always-initdb.d - -COPY ./docker/database/docker-entrypoint.sh /entrypoint.sh - -RUN \ - chmod +x /docker-entrypoint-initdb.d/create-db.sh && \ - chmod +x /always-initdb.d/update-db.sh && \ - chmod +x /entrypoint.sh - -ENTRYPOINT ["/entrypoint.sh"] -CMD ["mariadbd"] diff --git a/docker/database/create-db.sh b/docker/database/create-db.sh deleted file mode 100644 index 6e5531a..0000000 --- a/docker/database/create-db.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env bash - -. "/opt/scripts/db-functions.sh" - -if [ "${VMANGOS_ENABLE_AUTOMATIC_WORLD_DB_CORRECTIONS:-0}" = "1" ]; then - echo "[vmangos-deploy]: [x] Automatic world database corrections are enabled" -else - echo "[vmangos-deploy]: [ ] Automatic world database corrections are disabled" -fi - -if [ "${VMANGOS_PROCESS_CUSTOM_SQL:-0}" = "1" ]; then - echo "[vmangos-deploy]: [x] Custom SQL processing is enabled" -else - echo "[vmangos-deploy]: [ ] Custom SQL processing is disabled" -fi - -create_database "mangos" -create_database "characters" -create_database "realmd" -create_database "logs" - -grant_permissions "mangos" -grant_permissions "characters" -grant_permissions "realmd" -grant_permissions "logs" - -import_dump "mangos" "/sql/world.sql" -import_dump "characters" "/sql/characters.sql" -import_dump "realmd" "/sql/logon.sql" -import_dump "logs" "/sql/logs.sql" - -import_updates "mangos" "/sql/migrations/world_db_updates.sql" -import_updates "characters" "/sql/migrations/characters_db_updates.sql" -import_updates "realmd" "/sql/migrations/logon_db_updates.sql" -import_updates "logs" "/sql/migrations/logs_db_updates.sql" - -configure_realm - -if [ "${VMANGOS_PROCESS_CUSTOM_SQL:-0}" = "1" ]; then - process_custom_sql "/sql/custom" -fi diff --git a/docker/database/db-functions.sh b/docker/database/db-functions.sh deleted file mode 100644 index 4d8ed08..0000000 --- a/docker/database/db-functions.sh +++ /dev/null @@ -1,172 +0,0 @@ -#!/usr/bin/env bash - -create_database() { - local db_name="$1" - local silent=${2:-false} - - if [ "$silent" = false ]; then - echo "[vmangos-deploy]: Creating database '$db_name'" - fi - - mariadb -u root -p"$MARIADB_ROOT_PASSWORD" -e \ - "CREATE DATABASE IF NOT EXISTS \`$db_name\` DEFAULT CHARSET utf8 COLLATE utf8_general_ci;" -} - -drop_database() { - local db_name="$1" - local silent=${2:-false} - - if [ "$silent" = false ]; then - echo "[vmangos-deploy]: Dropping database '$db_name'" - fi - - mariadb -u root -p"$MARIADB_ROOT_PASSWORD" -e \ - "DROP DATABASE IF EXISTS \`$db_name\`;" -} - -grant_permissions() { - local db_name="$1" - local silent=${2:-false} - - if [ "$silent" = false ]; then - echo "[vmangos-deploy]: Granting permissions to database user '$MARIADB_USER' for database '$db_name'" - fi - - mariadb -u root -p"$MARIADB_ROOT_PASSWORD" -e \ - "GRANT ALL ON \`$db_name\`.* TO '$MARIADB_USER'@'%'; \ - FLUSH PRIVILEGES;" -} - -import_data() { - local db_name="$1" - local file="$2" - - mariadb -u root -p"$MARIADB_ROOT_PASSWORD" "$db_name" < "$file" - return $? -} - -import_dump() { - local db_name="$1" - local dump_file="$2" - - echo "[vmangos-deploy]: Importing initial data for database '$db_name'" - - import_data "$db_name" "$dump_file" - return $? -} - -import_updates() { - local db_name="$1" - local update_file="$2" - - if [ ! -e "$update_file" ]; then - # The update file not existing is not an error, so we return 0 (success) - # here - return 0 - fi - - echo "[vmangos-deploy]: Importing potential updates for database '$db_name'" - - import_data "$db_name" "$update_file" - return $? -} - -configure_realm() { - echo "[vmangos-deploy]: Configuring realm '$VMANGOS_REALMLIST_NAME'" - - mariadb -u root -p"$MARIADB_ROOT_PASSWORD" "realmd" -e \ - "INSERT INTO \`realmlist\` (\`name\`, \`address\`, \`port\`, \`icon\`, \`timezone\`, \`allowedSecurityLevel\`) VALUES ('$VMANGOS_REALMLIST_NAME', '$VMANGOS_REALMLIST_ADDRESS', '$VMANGOS_REALMLIST_PORT', '$VMANGOS_REALMLIST_ICON', '$VMANGOS_REALMLIST_TIMEZONE', '$VMANGOS_REALMLIST_ALLOWED_SECURITY_LEVEL');" -} - -create_world_db_corrections_table() { - mariadb -u root -p"$MARIADB_ROOT_PASSWORD" "maintenance" -e \ - "CREATE TABLE IF NOT EXISTS \`world_db_corrections\` ( \ - \`id\` INT NOT NULL, \ - \`reason\` VARCHAR(255) NOT NULL, \ - \`date\` DATE NOT NULL, \ - \`is_applied\` BOOLEAN NOT NULL DEFAULT FALSE, \ - PRIMARY KEY (\`id\`) \ - );" -} - -populate_world_db_corrections_table() { - mariadb -u root -p"$MARIADB_ROOT_PASSWORD" "maintenance" -e \ - "INSERT INTO \`world_db_corrections\` (\`id\`, \`reason\`, \`date\`) \ - SELECT 1, 'migration edits in vmangos/core@fe6fcb4', '2025-02-22' \ - WHERE NOT EXISTS ( \ - SELECT 1 FROM \`world_db_corrections\` WHERE \`id\` = 1 \ - ); \ - INSERT INTO \`world_db_corrections\` (\`id\`, \`reason\`, \`date\`) \ - SELECT 2, 'migration edits in vmangos/core@9e6d4ac', '2025-02-23' \ - WHERE NOT EXISTS ( \ - SELECT 2 FROM \`world_db_corrections\` WHERE \`id\` = 2 \ - ); \ - INSERT INTO \`world_db_corrections\` (\`id\`, \`reason\`, \`date\`) \ - SELECT 3, 'migration edits in vmangos/core@07c7832', '2025-02-25' \ - WHERE NOT EXISTS ( \ - SELECT 3 FROM \`world_db_corrections\` WHERE \`id\` = 3 \ - ); \ - INSERT INTO \`world_db_corrections\` (\`id\`, \`reason\`, \`date\`) \ - SELECT 4, 'migration edits in vmangos/core@f485dfa', '2025-03-22' \ - WHERE NOT EXISTS ( \ - SELECT 4 FROM \`world_db_corrections\` WHERE \`id\` = 4 \ - ); \ - INSERT INTO \`world_db_corrections\` (\`id\`, \`reason\`, \`date\`) \ - SELECT 5, 'migration edits in vmangos/core@33fcf97', '2025-07-05' \ - WHERE NOT EXISTS ( \ - SELECT 5 FROM \`world_db_corrections\` WHERE \`id\` = 5 \ - );" -} - -check_if_world_db_correction_is_required() { - local result=$(mariadb -u root -p"$MARIADB_ROOT_PASSWORD" "maintenance" -N -s -e \ - "WITH - db_creation AS ( - SELECT DATE(CONVERT_TZ(MIN(\`CREATE_TIME\`), @@session.time_zone, '+00:00')) as world_db_created_at - FROM \`INFORMATION_SCHEMA\`.\`TABLES\` - WHERE \`TABLE_SCHEMA\` = 'mangos' - ), - latest_correction AS ( - SELECT DATE(\`date\`) as correction_date, \`reason\`, \`is_applied\` - FROM \`world_db_corrections\` - WHERE \`id\` = (SELECT MAX(\`id\`) FROM \`world_db_corrections\`) - ) - SELECT CONCAT_WS('|', - IF( - NOT \`is_applied\` AND correction_date >= world_db_created_at, - 'true', - 'false' - ), - \`reason\` - ) - FROM latest_correction, db_creation;") - echo "$result" -} - -mark_world_db_corrections_as_applied() { - mariadb -u root -p"$MARIADB_ROOT_PASSWORD" "maintenance" -e \ - "UPDATE \`world_db_corrections\` SET \`is_applied\` = true;" -} - -process_custom_sql() { - local file_directory="$1" - - if [ ! -d "$file_directory" ]; then - echo "[vmangos-deploy]: WARNING: Custom SQL file directory '$file_directory' does not exist" >&2 - return 0 - fi - - file_count=$(find "$file_directory" -name "*.sql" -type f | wc -l) - echo "[vmangos-deploy]: Found $file_count custom SQL file(s) to process" - - if [ "$file_count" -gt 0 ]; then - find "$file_directory" -name "*.sql" -type f | sort | while read -r sql_file; do - echo "[vmangos-deploy]: Processing custom SQL file '$(basename "$sql_file")'" - - import_data "mangos" "$sql_file" - if [ $? -ne 0 ]; then - echo "[vmangos-deploy]: ERROR: Failed to process custom SQL file '$(basename "$sql_file")'" >&2 - fi - done - fi -} diff --git a/docker/database/docker-entrypoint.sh b/docker/database/docker-entrypoint.sh deleted file mode 100644 index 22ab910..0000000 --- a/docker/database/docker-entrypoint.sh +++ /dev/null @@ -1,100 +0,0 @@ -#!/usr/bin/env bash - -set -eo pipefail - -source "$(which docker-entrypoint.sh)" - -docker_mariadb_upgrade_including_user_tables() { - if [ -z "$MARIADB_AUTO_UPGRADE" ] \ - || [ "$MARIADB_AUTO_UPGRADE" = 0 ]; then - mysql_note "MariaDB upgrade (mariadb-upgrade or creating healthcheck users) required, but skipped due to \$MARIADB_AUTO_UPGRADE setting" - return - fi - mysql_note "Starting temporary server" - docker_temp_server_start "$@" --skip-grant-tables \ - --loose-innodb_buffer_pool_dump_at_shutdown=0 - mysql_note "Temporary server started." - - docker_mariadb_backup_system - - if [ ! -f "$DATADIR"/.my-healthcheck.cnf ]; then - mysql_note "Creating healthcheck users" - local createHealthCheckUsers - createHealthCheckUsers=$(create_healthcheck_users) - docker_process_sql --dont-use-mysql-root-password --binary-mode <<-EOSQL - -- Healthcheck users shouldn't be replicated - SET @@SESSION.SQL_LOG_BIN=0; - -- we need the SQL_MODE NO_BACKSLASH_ESCAPES mode to be clear for the password to be set - SET @@SESSION.SQL_MODE=REPLACE(@@SESSION.SQL_MODE, 'NO_BACKSLASH_ESCAPES', ''); - FLUSH PRIVILEGES; - $createHealthCheckUsers -EOSQL - mysql_note "Stopping temporary server" - docker_temp_server_stop - mysql_note "Temporary server stopped" - - if _check_if_upgrade_is_needed; then - # need a restart as FLUSH PRIVILEGES isn't reversable - mysql_note "Restarting temporary server for upgrade" - docker_temp_server_start "$@" --skip-grant-tables \ - --loose-innodb_buffer_pool_dump_at_shutdown=0 - else - return 0 - fi - fi - - mysql_note "Starting mariadb-upgrade" - mariadb-upgrade - mysql_note "Finished mariadb-upgrade" - - mysql_note "Stopping temporary server" - docker_temp_server_stop - mysql_note "Temporary server stopped" -} - -mysql_note "Custom entrypoint script for MariaDB Server ${MARIADB_VERSION} started." - -mysql_check_config "$@" -# Load various environment variables -docker_setup_env "$@" -docker_create_db_directories - -# If container is started as root user, restart as dedicated mysql user -if [ "$(id -u)" = "0" ]; then - mysql_note "Switching to dedicated user 'mysql'" - exec gosu mysql "${BASH_SOURCE[0]}" "$@" -fi - -# there's no database, so it needs to be initialized -if [ -z "$DATABASE_ALREADY_EXISTS" ]; then - docker_verify_minimum_env - - docker_mariadb_init "$@" -# run always-run hooks if they exist -elif test -n "$(shopt -s nullglob; echo /always-initdb.d/*)"; then - # MDEV-27636 mariadb_upgrade --check-if-upgrade-is-needed cannot be run offline - #if mariadb-upgrade --check-if-upgrade-is-needed; then - if _check_if_upgrade_is_needed; then - docker_mariadb_upgrade_including_user_tables "$@" - fi - - mysql_note "Starting temporary server" - docker_temp_server_start "$@" - mysql_note "Temporary server started." - - docker_process_init_files /always-initdb.d/* - - mysql_note "Stopping temporary server" - docker_temp_server_stop - mysql_note "Temporary server stopped" - - echo - mysql_note "MariaDB init process done. Ready for start up." - echo -# MDEV-27636 mariadb_upgrade --check-if-upgrade-is-needed cannot be run offline -#elif mariadb-upgrade --check-if-upgrade-is-needed; then -elif _check_if_upgrade_is_needed; then - docker_mariadb_upgrade_including_user_tables "$@" -fi - -exec "$@" diff --git a/docker/database/update-db.sh b/docker/database/update-db.sh deleted file mode 100644 index 46df549..0000000 --- a/docker/database/update-db.sh +++ /dev/null @@ -1,74 +0,0 @@ -#!/usr/bin/env bash - -# vmangos-deploy -# Copyright (C) 2023-2025 Michael Serajnik https://github.com/mserajnik - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. - -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . - -. "/opt/scripts/db-functions.sh" - -if [ "${VMANGOS_ENABLE_AUTOMATIC_WORLD_DB_CORRECTIONS:-0}" = "1" ]; then - echo "[vmangos-deploy]: [x] Automatic world database corrections are enabled" -else - echo "[vmangos-deploy]: [ ] Automatic world database corrections are disabled" -fi - -if [ "${VMANGOS_PROCESS_CUSTOM_SQL:-0}" = "1" ]; then - echo "[vmangos-deploy]: [x] Custom SQL processing is enabled" -else - echo "[vmangos-deploy]: [ ] Custom SQL processing is disabled" -fi - -if [ "${VMANGOS_ENABLE_AUTOMATIC_WORLD_DB_CORRECTIONS:-0}" = "1" ]; then - create_database "maintenance" true - grant_permissions "maintenance" true - create_world_db_corrections_table - populate_world_db_corrections_table - - result=$(check_if_world_db_correction_is_required) - requires_correction=$(echo "$result" | cut -d'|' -f1) - reason=$(echo "$result" | cut -d'|' -f2) - - if [ "$requires_correction" = "true" ]; then - echo "[vmangos-deploy]: World database correction required because of $reason, re-creating world database" - - drop_database "mangos" - create_database "mangos" - grant_permissions "mangos" - import_dump "mangos" "/sql/world.sql" - mark_world_db_corrections_as_applied - fi -else - echo "[vmangos-deploy]: Automatic world database corrections are disabled" - - drop_database "maintenance" true -fi - -if [ -e "$VMANGOS_WORLD_DB_DUMP_NEW_FILE" ]; then - echo "[vmangos-deploy]: '$VMANGOS_WORLD_DB_DUMP_NEW_FILE' exists, re-creating world database" - - drop_database "mangos" - create_database "mangos" - grant_permissions "mangos" - import_dump "mangos" "$VMANGOS_WORLD_DB_DUMP_NEW_FILE" -fi - -import_updates "mangos" "/sql/migrations/world_db_updates.sql" -import_updates "characters" "/sql/migrations/characters_db_updates.sql" -import_updates "realmd" "/sql/migrations/logon_db_updates.sql" -import_updates "logs" "/sql/migrations/logs_db_updates.sql" - -if [ "${VMANGOS_PROCESS_CUSTOM_SQL:-0}" = "1" ]; then - process_custom_sql "/sql/custom" -fi diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh new file mode 100755 index 0000000..3e05115 --- /dev/null +++ b/docker/entrypoint.sh @@ -0,0 +1,130 @@ +#!/usr/bin/env bash +# + +set -e + +# Utils: +# +function _replace_conf() +{ + local SEARCH_FOR="${1}" + local REPLACE_WITH="${2}" + local FILENAME="${3}" + + sed -i "/^${SEARCH_FOR}/c\\${SEARCH_FOR} = ${REPLACE_WITH}" "${FILENAME}" +} +function _merge_confs() +{ + local FILENAME="${1}" + local CONFIG_FILE="${2}" + + while IFS='' read -r LINE || [[ -n "${LINE}" ]] + do + PROPERTY="$(echo "${LINE}" | cut -d '#' -f 1 | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')" + + if [[ -n "${PROPERTY}" ]] + then + local SEARCH_FOR="$(echo "${PROPERTY}" | cut -d '=' -f 1 | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')" + local REPLACE_WITH="$(echo "${PROPERTY}" | cut -d '=' -f 2- | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')" + + _replace_conf "${SEARCH_FOR}" "${REPLACE_WITH}" "${FILENAME}" + fi + + done < "${CONFIG_FILE}" +} + +# Sub-functions: +# +function compose_mangosd_conf() +{ + local MANGOS_DBCONN="${MANGOS_DBHOST};${MANGOS_DBPORT};${MANGOS_DBUSER};${MANGOS_DBPASS}" + + cd "${MANGOS_DIR}/etc" + cp mangosd.conf.dist mangosd.conf + + _replace_conf "LoginDatabaseInfo" "\"${MANGOS_DBCONN};${MANGOS_REALMD_DBNAME}\"" mangosd.conf + _replace_conf "WorldDatabaseInfo" "\"${MANGOS_DBCONN};${MANGOS_WORLD_DBNAME}\"" mangosd.conf + _replace_conf "CharacterDatabaseInfo" "\"${MANGOS_DBCONN};${MANGOS_CHARACTERS_DBNAME}\"" mangosd.conf + _replace_conf "LogsDatabaseInfo" "\"${MANGOS_DBCONN};${MANGOS_LOGS_DBNAME}\"" mangosd.conf + + if [[ -f "/opt/mangos/conf/mangosd.conf" ]] + then + _merge_confs mangosd.conf "/opt/mangos/conf/mangosd.conf" + fi +} +function compose_realmd_conf() +{ + local MANGOS_DBCONN="${MANGOS_DBHOST};${MANGOS_DBPORT};${MANGOS_DBUSER};${MANGOS_DBPASS}" + + cd "${MANGOS_DIR}/etc" + cp realmd.conf.dist realmd.conf + + _replace_conf "LoginDatabaseInfo" "\"${MANGOS_DBCONN};${MANGOS_REALMD_DBNAME}\"" realmd.conf + + if [[ -f "/opt/mangos/conf/realmd.conf" ]] + then + _merge_confs realmd.conf "/opt/mangos/conf/realmd.conf" + fi +} + +function set_timezone() +{ + ln -snf "/usr/share/zoneinfo/${TZ}" /etc/localtime + echo "${TZ}" > /etc/timezone + + dpkg-reconfigure --frontend noninteractive tzdata &> /dev/null +} + +function wait_for_database() +{ + wait-for-it -h "${MANGOS_DBHOST}" -p "${MANGOS_DBPORT}" +} + +# Main functions: +# +function init_runner() +{ + set_timezone + + compose_mangosd_conf + compose_realmd_conf +} + +function run_mangosd() +{ + cd "${MANGOS_DIR}/bin" + + gosu mangos ./mangosd +} +function run_realmd() +{ + cd "${MANGOS_DIR}/bin" + + gosu mangos ./realmd +} + +# Execution: +# +init_runner + +case "${1}" in + mangosd) + shift + + wait_for_database + run_mangosd ${@} + ;; + realmd) + shift + + wait_for_database + run_realmd ${@} + ;; + *) + cd "${HOME_DIR}" + + exec ${@} + ;; +esac + +exit 1 diff --git a/docker/run.sh b/docker/run.sh new file mode 100755 index 0000000..7976b65 --- /dev/null +++ b/docker/run.sh @@ -0,0 +1,38 @@ +#!/usr/bin/env bash +# + +set -e + +readonly BASE_DIR="$(realpath "$(dirname "${0}")/..")" +source "${BASE_DIR}/.env" + +readonly NAME="cmangos-runner" +readonly IMAGE="ghcr.io/byloth/cmangos/${WOW_VERSION}" +readonly VERSION="latest" + +readonly DATA_VOLUME="cmangos_mangosd_data" +readonly NETWORK="cmangos_default" + +if [[ -t 0 ]] && [[ -t 1 ]] +then + readonly TTY="-it" +else + readonly TTY="-i" +fi + +docker run ${TTY} \ + --name "${NAME}" \ + --network "${NETWORK}" \ + --rm \ + -e MANGOS_DBHOST="mariadb" \ + -e MANGOS_DBUSER="${MANGOS_DBUSER}" \ + -e MANGOS_DBPASS="${MANGOS_DBPASS}" \ + -p 3443:3443 \ + -p 3724:3724 \ + -p 7878:7878 \ + -p 8085:8085 \ + -p 8086:8086 \ + -v "${PWD}/config":/opt/mangos/conf:ro \ + -v "${DATA_VOLUME}":/var/lib/mangos:ro \ + \ + "${IMAGE}:${VERSION}" ${@} diff --git a/docker/server/Dockerfile b/docker/server/Dockerfile deleted file mode 100644 index b162001..0000000 --- a/docker/server/Dockerfile +++ /dev/null @@ -1,142 +0,0 @@ -ARG DEBIAN_FRONTEND=noninteractive -ARG VMANGOS_CLIENT_VERSION=5875 -ARG VMANGOS_REPOSITORY_URL=https://github.com/vmangos/core.git -ARG VMANGOS_REVISION=development -ARG VMANGOS_PATCHES_REPOSITORY_URL -ARG VMANGOS_USER_ID=1000 -ARG VMANGOS_GROUP_ID=1000 -ARG VMANGOS_USER_NAME=vmangos -ARG VMANGOS_GROUP_NAME=vmangos - -FROM ubuntu:24.04 AS build - -ARG DEBIAN_FRONTEND -ARG VMANGOS_CLIENT_VERSION -ARG VMANGOS_REPOSITORY_URL -ARG VMANGOS_REVISION -ARG VMANGOS_PATCHES_REPOSITORY_URL - -RUN \ - apt update -y && \ - apt install -y \ - build-essential \ - cmake \ - git \ - libace-dev \ - libcurl4-openssl-dev \ - libmysqlclient-dev \ - libssl-dev \ - libtbb-dev \ - zlib1g-dev && \ - git clone "${VMANGOS_REPOSITORY_URL}" /core && \ - cd /core && \ - git checkout "${VMANGOS_REVISION}" && \ - if [ -n "${VMANGOS_PATCHES_REPOSITORY_URL}" ]; then \ - echo "Cloning and applying patches from ${VMANGOS_PATCHES_REPOSITORY_URL}"; \ - git clone "${VMANGOS_PATCHES_REPOSITORY_URL}" /tmp/patches && \ - for patch in /tmp/patches/*.patch; do \ - if [ -f "${patch}" ]; then \ - echo "Applying patch ${patch}"; \ - git apply "${patch}"; \ - fi; \ - done; \ - rm -rf /tmp/patches; \ - else \ - echo "No repository to apply patches from provided."; \ - fi && \ - mkdir -p \ - /opt/vmangos/config \ - /opt/vmangos/storage/data \ - /opt/vmangos/storage/honor \ - /opt/vmangos/storage/logs && \ - mkdir /core/build && \ - cd /core/build && \ - cmake \ - -DCMAKE_INSTALL_PREFIX=/opt/vmangos ../ \ - -DUSE_PCH=1 \ - -DUSE_STD_MALLOC=0 \ - -DBUILD_FOR_HOST_CPU=0 \ - -DTBB_DEBUG=0 \ - -DUSE_SCRIPTS=1 \ - -DUSE_EXTRACTORS=1 \ - -DUSE_REALMMERGE=0 \ - -DENABLE_MAILSENDER=1 \ - -DSUPPORTED_CLIENT_BUILD=${VMANGOS_CLIENT_VERSION} \ - -DDEBUG_SYMBOLS=0 && \ - make -j$(nproc) && \ - make install && \ - rm -rf /core && \ - apt clean -y && \ - rm -rf /var/lib/apt/lists/* - -FROM ubuntu:24.04 - -ARG DEBIAN_FRONTEND -ARG TARGETARCH -ARG VMANGOS_CLIENT_VERSION -ARG VMANGOS_USER_ID -ARG VMANGOS_GROUP_ID -ARG VMANGOS_USER_NAME -ARG VMANGOS_GROUP_NAME - -ENV PYTHONUNBUFFERED=1 -ENV VMANGOS_CLIENT_VERSION=${VMANGOS_CLIENT_VERSION} - -RUN \ - apt update -y && \ - apt install -y \ - curl \ - libace-7.1.2 \ - libcurl4 \ - libmysqlclient21 \ - libssl3 \ - libtbb12 \ - netcat-openbsd \ - python3 \ - python-is-python3 \ - zlib1g && \ - existing_group=$(getent group "${VMANGOS_GROUP_ID}") || true && \ - existing_user=$(getent passwd "${VMANGOS_USER_ID}") || true && \ - if [ -n "${existing_group}" ]; then \ - old_groupname=$(echo "${existing_group}" | cut -d: -f1) && \ - groupmod -n "${VMANGOS_GROUP_NAME}" "${old_groupname}"; \ - else \ - groupadd -g "${VMANGOS_GROUP_ID}" "${VMANGOS_GROUP_NAME}"; \ - fi && \ - if [ -n "${existing_user}" ]; then \ - old_username=$(echo "${existing_user}" | cut -d: -f1) && \ - usermod -l "${VMANGOS_USER_NAME}" -d "/home/${VMANGOS_USER_NAME}" "${old_username}" && \ - mv "/home/${old_username}" "/home/${VMANGOS_USER_NAME}"; \ - else \ - useradd -u "${VMANGOS_USER_ID}" -g "${VMANGOS_GROUP_NAME}" -d "/home/${VMANGOS_USER_NAME}" -s /bin/sh -m "${VMANGOS_USER_NAME}"; \ - fi && \ - # See https://github.com/boxboat/fixuid - curl -SsL https://github.com/boxboat/fixuid/releases/download/v0.6.0/fixuid-0.6.0-linux-${TARGETARCH}.tar.gz | tar -C /usr/local/bin -xzf - && \ - chown root:root /usr/local/bin/fixuid && \ - chmod 4755 /usr/local/bin/fixuid && \ - mkdir -p /etc/fixuid && \ - printf "user: ${VMANGOS_USER_NAME}\ngroup: ${VMANGOS_GROUP_NAME}\n" > /etc/fixuid/config.yml && \ - apt remove -y curl && \ - apt autoremove -y && \ - apt clean -y && \ - rm -rf /var/lib/apt/lists/* - -COPY --from=build --chown=${VMANGOS_USER_NAME}:${VMANGOS_GROUP_NAME} /opt /opt - -# See https://github.com/ufoscout/docker-compose-wait -COPY --from=ghcr.io/ufoscout/docker-compose-wait:latest /wait /usr/local/bin/wait-for-db - -COPY ./docker/server/docker-cmd-mangosd.sh /usr/local/bin/mangosd -COPY ./docker/server/docker-cmd-realmd.sh /usr/local/bin/realmd -COPY ./docker/server/docker-cmd-extract-client-data.sh /usr/local/bin/extract-client-data - -RUN \ - chmod +x /opt/vmangos/bin/* && \ - find /opt/vmangos/bin/Extractors/ -type f ! -regex ".*\.\(json\|txt\)$" -exec chmod +x {} + && \ - chmod +x /usr/local/bin/mangosd && \ - chmod +x /usr/local/bin/realmd && \ - chmod +x /usr/local/bin/extract-client-data - -USER ${VMANGOS_USER_NAME}:${VMANGOS_GROUP_NAME} - -CMD ["mangosd"] diff --git a/docker/server/docker-cmd-extract-client-data.sh b/docker/server/docker-cmd-extract-client-data.sh deleted file mode 100644 index f2a5844..0000000 --- a/docker/server/docker-cmd-extract-client-data.sh +++ /dev/null @@ -1,73 +0,0 @@ -#!/bin/sh - -eval $(fixuid -q) - -client_data_dir="/opt/vmangos/storage/client-data" -extracted_data_dir="/opt/vmangos/storage/extracted-data" -extractors_dir="/opt/vmangos/bin/Extractors" -client_version_dir="$extracted_data_dir/$VMANGOS_CLIENT_VERSION" - -# The `--force` flag can be used to skip the confirmation prompt when -# previously extracted data is found. This is particularly useful for -# automation where the user is not able to interact with the prompt. -force=false - -while [ "$#" -gt 0 ]; do - case "$1" in - -f|--force) - # If user passes `-f` or `--force`, set 'force' to true - force=true - shift - ;; - *) - shift - ;; - esac -done - -if [ ! -d "$client_data_dir" ] || [ ! -d "$client_data_dir/Data" ]; then - echo "[vmangos-deploy]: ERROR: Client data not found in '$client_data_dir', aborting extraction" >&2 - exit 1 -fi - -if [ ! -d "$extracted_data_dir" ]; then - echo "[vmangos-deploy]: ERROR: Extracted data target directory '$extracted_data_dir' doesn't exist, aborting extraction" >&2 - exit 1 -fi - -cd "$client_data_dir" - -if [ "$force" = false ]; then - if [ -d "$extracted_data_dir/maps" ] || [ -d "$extracted_data_dir/mmaps" ] || [ -d "$extracted_data_dir/vmaps" ] || [ -d "$client_version_dir" ]; then - echo "[vmangos-deploy]: Previously extracted data has been found in '$extracted_data_dir'; continue with the extraction (which will overwrite the old data)? [Y/n]" - - read -r choice - choice=$(echo "${choice:-y}" | tr -d '[:space:]') - if [ "$choice" = "n" ] || [ "$choice" = "N" ]; then - echo "[vmangos-deploy]: Aborting extraction" - exit 1 - fi - fi -fi - -# Remove any potentially previously extracted data from the client directory -rm -rf ./Buildings ./Cameras ./dbc ./maps ./mmaps ./vmaps - -"$extractors_dir/MapExtractor" -"$extractors_dir/VMapExtractor" -"$extractors_dir/VMapAssembler" -"$extractors_dir/mmap_extract.py" \ - --configInputPath "$extractors_dir/config.json" \ - --offMeshInput "$extractors_dir/offmesh.txt" - -# Delete extracted data that is no longer needed after processing it to avoid -# confusion -rm -rf ./Buildings ./Cameras - -# Remove any potentially already existing data from the extracted data -# directory before moving the new data there -rm -rf "$extracted_data_dir"/* - -mkdir -p "$client_version_dir" -mv ./dbc "$client_version_dir/" -mv ./maps ./mmaps ./vmaps "$extracted_data_dir/" diff --git a/docker/server/docker-cmd-mangosd.sh b/docker/server/docker-cmd-mangosd.sh deleted file mode 100644 index 78fa96b..0000000 --- a/docker/server/docker-cmd-mangosd.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -eval $(fixuid -q) - -config_file="/opt/vmangos/config/mangosd.conf" - -if [ ! -f "$config_file" ]; then - echo "[vmangos-deploy]: ERROR: Configuration file '$config_file' is missing, exiting" >&2 - exit 1 -fi - -WAIT_LOGGER_LEVEL=error wait-for-db && exec /opt/vmangos/bin/mangosd -c $config_file diff --git a/docker/server/docker-cmd-realmd.sh b/docker/server/docker-cmd-realmd.sh deleted file mode 100644 index 819d982..0000000 --- a/docker/server/docker-cmd-realmd.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -eval $(fixuid -q) - -config_file="/opt/vmangos/config/realmd.conf" - -if [ ! -f "$config_file" ]; then - echo "[vmangos-deploy]: ERROR: Configuration file '$config_file' is missing, exiting" >&2 - exit 1 -fi - -WAIT_LOGGER_LEVEL=error wait-for-db && exec /opt/vmangos/bin/realmd -c $config_file diff --git a/storage/database/backups/.gitkeep b/mangosd_data/.gitkeep similarity index 100% rename from storage/database/backups/.gitkeep rename to mangosd_data/.gitkeep diff --git a/storage/database/custom-sql/auctionhousebot.sql.example b/storage/database/custom-sql/auctionhousebot.sql.example deleted file mode 100644 index 825135f..0000000 --- a/storage/database/custom-sql/auctionhousebot.sql.example +++ /dev/null @@ -1,91 +0,0 @@ --- Start a transaction to ensure that all changes are applied atomically -START TRANSACTION; - --- Truncate the table to make these changes idempotent -TRUNCATE `auctionhousebot`; - --- Insert all the default rows for the `auctionhousebot` table (to not cause --- issues if this example is accidentally enabled by removing the `.example` --- suffix from the file name) -INSERT INTO `auctionhousebot` (`item`, `stack`, `bid`, `buyout`) VALUES -(4687, 1, 1500, 5000), -- https://www.wowhead.com/classic/item=4687/barbaric-cloth-belt -(2770, 20, 25000, 75000), -- https://www.wowhead.com/classic/item=2770/copper-ore -(2881, 1, 5000, 150000), -- https://www.wowhead.com/classic/item=2881/plans-runed-copper-breastplate -(2589, 20, 37500, 50000), -- https://www.wowhead.com/classic/item=2589/linen-cloth -(2592, 20, 100000, 150000), -- https://www.wowhead.com/classic/item=2592/wool-cloth -(4306, 20, 37500, 50000), -- https://www.wowhead.com/classic/item=4306/silk-cloth -(4338, 20, 200000, 300000), -- https://www.wowhead.com/classic/item=4338/mageweave-cloth -(14047, 20, 100000, 150000), -- https://www.wowhead.com/classic/item=14047/runecloth -(2318, 20, 30000, 200000), -- https://www.wowhead.com/classic/item=2318/light-leather -(2319, 20, 30000, 200000), -- https://www.wowhead.com/classic/item=2319/medium-leather -(4234, 20, 100000, 150000), -- https://www.wowhead.com/classic/item=4234/heavy-leather -(4304, 20, 50000, 75000), -- https://www.wowhead.com/classic/item=4304/thick-leather -(8170, 20, 200000, 300000), -- https://www.wowhead.com/classic/item=8170/rugged-leather -(2835, 20, 3750, 5000), -- https://www.wowhead.com/classic/item=2835/rough-stone -(2836, 20, 5000, 15000), -- https://www.wowhead.com/classic/item=2836/coarse-stone -(2838, 20, 50000, 75000), -- https://www.wowhead.com/classic/item=2838/heavy-stone -(7912, 20, 10000, 15000), -- https://www.wowhead.com/classic/item=7912/solid-stone -(12365, 20, 10000, 15000), -- https://www.wowhead.com/classic/item=12365/dense-stone -(2770, 20, 50000, 75000), -- https://www.wowhead.com/classic/item=2770/copper-ore (this is a duplicate in the default data) -(2775, 1, 50000, 75000), -- https://www.wowhead.com/classic/item=2775/silver-ore -(2771, 20, 100000, 150000), -- https://www.wowhead.com/classic/item=2771/tin-ore -(2776, 1, 37500, 50000), -- https://www.wowhead.com/classic/item=2776/gold-ore -(2772, 20, 200000, 300000), -- https://www.wowhead.com/classic/item=2772/iron-ore -(7911, 1, 50000, 75000), -- https://www.wowhead.com/classic/item=7911/truesilver-ore -(3858, 20, 400000, 600000), -- https://www.wowhead.com/classic/item=3858/mithril-ore -(10620, 20, 400000, 600000), -- https://www.wowhead.com/classic/item=10620/thorium-ore -(765, 20, 10000, 15000), -- https://www.wowhead.com/classic/item=765/silverleaf -(2447, 20, 20000, 30000), -- https://www.wowhead.com/classic/item=2447/peacebloom -(785, 20, 100000, 150000), -- https://www.wowhead.com/classic/item=785/mageroyal -(2449, 20, 20000, 30000), -- https://www.wowhead.com/classic/item=2449/earthroot -(2452, 20, 100000, 150000), -- https://www.wowhead.com/classic/item=2452/swiftthistle -(2450, 20, 100000, 150000), -- https://www.wowhead.com/classic/item=2450/briarthorn -(2453, 20, 100000, 150000), -- https://www.wowhead.com/classic/item=2453/bruiseweed -(3820, 20, 200000, 300000), -- https://www.wowhead.com/classic/item=3820/stranglekelp -(3355, 20, 200000, 300000), -- https://www.wowhead.com/classic/item=3355/wild-steelbloom -(3369, 20, 200000, 300000), -- https://www.wowhead.com/classic/item=3369/grave-moss -(3356, 20, 100000, 150000), -- https://www.wowhead.com/classic/item=3356/kingsblood -(3357, 20, 100000, 150000), -- https://www.wowhead.com/classic/item=3357/liferoot -(3818, 20, 200000, 300000), -- https://www.wowhead.com/classic/item=3818/fadeleaf -(3821, 20, 200000, 300000), -- https://www.wowhead.com/classic/item=3821/goldthorn -(3358, 20, 200000, 300000), -- https://www.wowhead.com/classic/item=3358/khadgars-whisker -(3819, 20, 200000, 300000), -- https://www.wowhead.com/classic/item=3819/wintersbite -(8153, 20, 200000, 300000), -- https://www.wowhead.com/classic/item=8153/wildvine -(4625, 20, 200000, 300000), -- https://www.wowhead.com/classic/item=4625/firebloom -(8831, 20, 200000, 300000), -- https://www.wowhead.com/classic/item=8831/purple-lotus -(8836, 20, 200000, 300000), -- https://www.wowhead.com/classic/item=8836/arthas-tears -(8838, 20, 200000, 300000), -- https://www.wowhead.com/classic/item=8838/sungrass -(8839, 20, 200000, 300000), -- https://www.wowhead.com/classic/item=8839/blindweed -(8845, 20, 200000, 300000), -- https://www.wowhead.com/classic/item=8845/ghost-mushroom -(8846, 20, 200000, 300000), -- https://www.wowhead.com/classic/item=8846/gromsblood -(13463, 20, 200000, 300000), -- https://www.wowhead.com/classic/item=13463/dreamfoil -(13464, 20, 200000, 300000), -- https://www.wowhead.com/classic/item=13464/golden-sansam -(13465, 20, 200000, 300000), -- https://www.wowhead.com/classic/item=13465/mountain-silversage -(13466, 20, 200000, 300000), -- https://www.wowhead.com/classic/item=13466/plaguebloom -(13467, 20, 200000, 300000), -- https://www.wowhead.com/classic/item=13467/icecap -(13468, 1, 100000, 150000), -- https://www.wowhead.com/classic/item=13468/black-lotus -(6338, 1, 10000, 15000), -- https://www.wowhead.com/classic/item=6338/silver-rod -(11128, 1, 20000, 30000), -- https://www.wowhead.com/classic/item=11128/golden-rod -(11144, 1, 100000, 150000), -- https://www.wowhead.com/classic/item=11144/truesilver-rod -(16206, 1, 500000, 750000), -- https://www.wowhead.com/classic/item=16206/arcanite-rod -(10978, 1, 3750, 5000), -- https://www.wowhead.com/classic/item=10978/small-glimmering-shard -(11084, 1, 3750, 5000), -- https://www.wowhead.com/classic/item=11084/large-glimmering-shard -(11138, 1, 3750, 5000), -- https://www.wowhead.com/classic/item=11138/small-glowing-shard -(11139, 1, 3750, 5000), -- https://www.wowhead.com/classic/item=11139/large-glowing-shard -(11177, 1, 50000, 75000), -- https://www.wowhead.com/classic/item=11177/small-radiant-shard -(11178, 1, 100000, 150000), -- https://www.wowhead.com/classic/item=11178/large-radiant-shard -(14343, 1, 10000, 15000), -- https://www.wowhead.com/classic/item=14343/small-brilliant-shard -(14344, 1, 50000, 75000), -- https://www.wowhead.com/classic/item=14344/large-brilliant-shard -(20725, 1, 10000, 15000), -- https://www.wowhead.com/classic/item=20725/nexus-crystal -(10938, 10, 15000, 25000), -- https://www.wowhead.com/classic/item=10938/lesser-magic-essence -(10998, 10, 20000, 30000), -- https://www.wowhead.com/classic/item=10998/lesser-astral-essence -(11134, 10, 22500, 35000), -- https://www.wowhead.com/classic/item=11134/lesser-mystic-essence -(11174, 10, 300000, 450000), -- https://www.wowhead.com/classic/item=11174/lesser-nether-essence -(16202, 10, 400000, 600000), -- https://www.wowhead.com/classic/item=16202/lesser-eternal-essence -(10940, 20, 50000, 75000), -- https://www.wowhead.com/classic/item=10940/strange-dust -(11083, 20, 50000, 75000), -- https://www.wowhead.com/classic/item=11083/soul-dust -(11137, 20, 200000, 300000), -- https://www.wowhead.com/classic/item=11137/vision-dust -(11176, 20, 40000, 60000); -- https://www.wowhead.com/classic/item=11176/dream-dust - --- End the transaction -COMMIT; diff --git a/storage/mangosd/client-data/.gitkeep b/storage/mangosd/client-data/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/storage/mangosd/honor/.gitkeep b/storage/mangosd/honor/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/storage/mangosd/warden-modules/.gitkeep b/storage/mangosd/warden-modules/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/storage/realmd/logs/.gitkeep b/storage/realmd/logs/.gitkeep deleted file mode 100644 index e69de29..0000000