diff --git a/README.md b/README.md index 77b88ac..357347f 100644 --- a/README.md +++ b/README.md @@ -72,3 +72,9 @@ INSERT INTO realmlist (id, name, address, port, icon, realmflags, timezone, allo ``` > Modifier le `NOM`, l'adresse `IP` du serveur (sauf si sur la même machine que le client) et la timezone si différent de Paris + +### TO DO + +- admin create account OK, change password KO (old password decryption) +- make registration get vars from .env +- script install ask version and client path and do all \ No newline at end of file diff --git a/build_docker_images.sh b/build_docker_images.sh index d6f4281..64dd561 100755 --- a/build_docker_images.sh +++ b/build_docker_images.sh @@ -1,36 +1,25 @@ #!/usr/bin/env bash set -euo pipefail - -# Choix expension -# echo "Entre ton choix (classic / tbc / wotlk) :" -# read reponse - -# case "$reponse" in -# classic) EXPANSION="classic" ;; -# tbc) EXPANSION="tbc" ;; -# wotlk) EXPANSION="wotlk" ;; -# *) EXPANSION="Inconnu" ;; -# esac +source ".env" # Arguments -EXPANSION="${1:-wotlk}" # exemple : wotlk / tbc / classic -THREADS="${2:-2}" +THREADS="${1:-2}" # Infos git -MANGOS_SHA1=$(curl -sSL "https://api.github.com/repos/cmangos/mangos-${EXPANSION}/commits/master" | jq -r .sha) -DATABASE_SHA1=$(curl -sSL "https://api.github.com/repos/cmangos/${EXPANSION}-db/commits/master" | jq -r .sha) +MANGOS_SHA1=$(curl -sSL "https://api.github.com/repos/cmangos/mangos-${WOW_VERSION}/commits/master" | jq -r .sha) +DATABASE_SHA1=$(curl -sSL "https://api.github.com/repos/cmangos/${WOW_VERSION}-db/commits/master" | jq -r .sha) VERSION="1.0.0-$(date -u +"%Y%m%d")" DOCKER_IMAGE="wow-server" # Tags pour builder -BUILDER_IMAGE_TAG="${DOCKER_IMAGE}-${EXPANSION}:builder" +BUILDER_IMAGE_TAG="${DOCKER_IMAGE}-${WOW_VERSION}:builder" # Tags pour runner -RUNNER_IMAGE_TAG="${DOCKER_IMAGE}-${EXPANSION}:runner" +RUNNER_IMAGE_TAG="${DOCKER_IMAGE}-${WOW_VERSION}:runner" echo "==== Build de l’image BUILDER ====" docker buildx build \ - --build-arg EXPANSION="${EXPANSION}" \ + --build-arg EXPANSION="${WOW_VERSION}" \ --build-arg MANGOS_SHA1="${MANGOS_SHA1}" \ --build-arg DATABASE_SHA1="${DATABASE_SHA1}" \ --build-arg THREADS="${THREADS}" \ @@ -42,7 +31,7 @@ docker buildx build \ echo "==== Build de l’image RUNNER ====" docker buildx build \ - --build-arg EXPANSION="${EXPANSION}" \ + --build-arg EXPANSION="${WOW_VERSION}" \ --build-arg MANGOS_SHA1="${MANGOS_SHA1}" \ --build-arg DATABASE_SHA1="${DATABASE_SHA1}" \ --build-arg THREADS="${THREADS}" \ diff --git a/compose.yml b/compose.yml index c781fd5..865c736 100644 --- a/compose.yml +++ b/compose.yml @@ -25,6 +25,7 @@ services: tty: true ports: - "${MANGOSD_PORT:-8085}:8085" + - "7878:7878" volumes: - ./mangosd_data:/var/lib/mangos:ro - ./config/mangosd:/opt/mangos/conf:ro @@ -46,24 +47,50 @@ services: - "${REALMD_PORT:-3724}:3724" volumes: - ./mangosd_data:/var/lib/mangos:ro + - ./config/realmd:/opt/mangos/conf:ro networks: - wow - # phpmyadmin: - # image: phpmyadmin:5.2 - # container_name: wow-db-admin + phpmyadmin: + image: phpmyadmin:5.2 + container_name: wow-db-admin + depends_on: + - database + profiles: + - debug + environment: + PMA_HOST: database + PMA_USER: root + PMA_PASSWORD: "${MYSQL_SUPERPASS}" + networks: + - wow + ports: + - "${PHPMYADMIN_PORT:-8080}:80" + + # admin: + # build: ./php + # ports: + # - "8089:80" + # env_file: + # - .env # depends_on: # - database - # profiles: - # - debug - # environment: - # PMA_HOST: database - # PMA_USER: root - # PMA_PASSWORD: "${MYSQL_SUPERPASS}" # networks: # - wow - # ports: - # - "${PHPMYADMIN_PORT:-8080}:80" + + php-panel: + image: wow-registration +# build: ./registration + container_name: wow-registration + ports: + - "8090:80" + environment: + - SOAP_HOST=mangosd + - SOAP_PORT=7878 + depends_on: + - mangosd + networks: + - wow networks: wow: diff --git a/config/mangosd/mangosd.conf b/config/mangosd/mangosd.conf index 1f18db1..c34b03e 100644 --- a/config/mangosd/mangosd.conf +++ b/config/mangosd/mangosd.conf @@ -1,5 +1,466 @@ +# BASIC +GameType = 0 +RealmZone = 8 +RabbitDay = 954547200 +Motd = "Bienvenue en Azeroth!" + +##################################### +# MaNGOS Configuration file +# +# To overwrite configuration fields with environment variables +# use the following pattern to generate environment variable names: +# +# For Rate.Health: +# export Mangosd_Rate_Health=1.2 +# +# For DataDir: +# export Mangosd_DataDir=/tmp +# +##################################### + +# [MangosdConf] +# ConfVersion=2024020101 + ################################################################################################################### +# 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 exists, 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. +# +# +# LoginDatabaseInfo +# WorldDatabaseInfo +# CharacterDatabaseInfo +# LogsDatabaseInfo +# 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 +# +# LoginDatabaseConnections +# WorldDatabaseConnections +# CharacterDatabaseConnections +# LogsDatabaseConnections +# Amount of connections to database which will be used for SELECT queries. Maximum 16 connections per database. +# Please, note, for data consistency only one connection for each database is used for transactions and async SELECTs. +# So formula to find out how many connections will be established: X = #_connections + 1 +# Default: 1 connection for SELECT statements +# +# MaxPingTime +# Settings for maximum database-ping interval (minutes between pings) +# +# WorldServerPort +# Port on which the server will listen +# +# BindIP +# Bind World Server to specific IP address +# 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 +# +# SD2ErrorLogFile +# Log File for SD2-Errors +# +# Spawns.ZoneArea +# Regenerates table creature_zone and gameobject_zone +# Default: 0 - turned off +# +################################################################################################################### + +# RealmID = 1 +# DataDir = "." +# LogsDir = "" +LoginDatabaseInfo = "database;3306;mangos;mangos00;wotlkrealmd" +WorldDatabaseInfo = "database;3306;mangos;mangos00;wotlkmangos" +CharacterDatabaseInfo = "database;3306;mangos;mangos00;wotlkcharacters" +LogsDatabaseInfo = "database;3306;mangos;mangos00;wotlklogs" +# LoginDatabaseConnections = 1 +# WorldDatabaseConnections = 1 +# CharacterDatabaseConnections = 1 +# LogsDatabaseConnections = 1 +# MaxPingTime = 30 +# WorldServerPort = 8085 +# BindIP = "0.0.0.0" +# SD2ErrorLogFile = "SD2Errors.log" +# Spawns.ZoneArea = 0 + +################################################################################################################### +# PERFORMANCE SETTINGS +# +# 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 priority setting (Used only at Windows) +# Default: 1 (HIGH) +# 0 (Normal) +# +# Compression +# Compression level for update packages sent to client (1..9) +# Default: 1 (speed) +# 9 (best compression) +# +# PlayerLimit +# Maximum number of players in the world. 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) +# +# 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) +# +# LoadAllGridsOnMaps +# Load grids of maps at server startup (if you have lot memory you can try it to have a living world always loaded) +# This also allow ALL creatures on the given maps to update their grid without any player around. +# Default: "" (don't load all grids at startup) +# "mapId1[,mapId2[..]]" (DO load all grids on the given maps- Experimental and very resource consumming) +# +# Autoload.Active +# Load active creatures that have ExtraFlags CREATURE_EXTRA_FLAG_ACTIVE or movementType WAYPOINT_MOTION_TYPE +# This will allow creatures having these conditions to update their grid without any player around. Useful for running in debug mode. +# Default: True +# +# 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) +# +# 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 (enable) +# 0 (disable) +# +# 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) +# +# 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) +# +# mmap.enabled +# Enable/Disable pathfinding using mmaps +# Default: 1 (enable) +# 0 (disable) +# +# mmap.ignoreMapIds +# Disable mmap pathfinding on the listed maps. +# List of map ids with delimiter ',' +# +# mmap.preload +# Enable/Disable preloading on first mapId load - expensive but thread safe - use only for big servers +# 1 (enable) +# Default: 0 (disable) +# +# PathFinder.OptimizePath +# Use or not path finder path optimization (cut calculated points). +# 0 (disable) +# Default: 1 (enable) +# +# PathFinder.NormalizeZ +# Correct calculated path points Z (height). Increase CPU usage, but fix Z accuracy. +# Default: 0 (disable) +# 1 (enable) +# +# UpdateUptimeInterval +# Update realm uptime period in minutes (for save data in 'uptime' table). Must be > 0 +# Default: 10 (minutes) +# +# MapUpdate.Threads +# Number of threads to use for maps update. +# Default: 3 +# Don't put more thread then your number of CPU threads -1 for this to work stable. +# +# MaxCoreStuckTime +# Periodically check if the process got freezed, 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) +# +# AddonChannel +# Permit/disable the use of the addon channel through the server +# (some client side addons can stop work 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) +# +# +# MaxWhoListReturns +# Set the max number of players returned in the /who list and interface (0 means unlimited) +# Default: 49 - (stable) +# +################################################################################################################### + +# UseProcessors = 0 +# ProcessPriority = 1 +# Compression = 1 +# PlayerLimit = 100 +# SaveRespawnTimeImmediately = 1 +# MaxOverspeedPings = 2 +# GridUnload = 1 +# LoadAllGridsOnMaps = "" +# Autoload.Active = 1 +# GridCleanUpDelay = 300000 +# MapUpdateInterval = 100 +# ChangeWeatherInterval = 600000 +# PlayerSave.Interval = 900000 +# PlayerSave.Stats.MinLevel = 0 +# PlayerSave.Stats.SaveOnlyOnLogout = 1 +# vmap.enableLOS = 1 +# vmap.enableHeight = 1 +# vmap.enableIndoorCheck = 1 +# DetectPosCollision = 1 +# mmap.enabled = 1 +# mmap.ignoreMapIds = "" +# mmap.preload = 0 +# PathFinder.OptimizePath = 1 +# PathFinder.NormalizeZ = 0 +# UpdateUptimeInterval = 10 +# MapUpdate.Threads = 3 +# MaxCoreStuckTime = 0 +# AddonChannel = 1 +# CleanCharacterDB = 1 +# MaxWhoListReturns = 49 + +################################################################################################################### +# 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 +# Server console level of logging +# 0 = Minimum; 1 = Basic&Error; 2 = Detail; 3 = Full/Debug +# Default: 3 +# +# LogTime +# Include time in server console output [hh:mm:ss] +# Default: 0 (no time) +# 1 (print time) +# +# LogFile +# Logfile name +# Default: "Server.log" +# "" - Empty name disable creating log file +# +# PacketLogFile +# Description: Binary packet logging file for the world server. +# Filename extension must be .pkt to be parsable with WPP. +# Example: "World.pkt" - (Enabled) +# Default: "" - (Disabled) +# +# 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 +# +# LogFilter_CreatureMoves +# LogFilter_TransportMoves +# LogFilter_PlayerMoves +# LogFilter_VisibilityChanges +# LogFilter_Weather +# LogFilter_DbStrictedCheck +# LogFilter_SQLText +# LogFilter_Pathfinding +# LogFilter_MapsLoading +# LogFilter_EventAiDev +# LogFilter_DbScriptDev +# Log filters (active by default - meaning: the filter is active, hence the log is not displayed) +# Default: 1 - not include with any log level +# 0 - include in log if log level permit +# +# LogFilter_PeriodicAffects +# 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 +# +# WorldLogFile +# Packet logging file for the worldserver +# Default: "" - no log file created +# "world.log" - recommended name to create a log file +# +# WorldLogTimestamp +# 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 +# +# DBErrorLogFile +# Log file of DB errors detected at server run +# Default: "DBErrors.log" +# +# EventAIErrorLogFile +# Log file of EventAI errors detected at server run +# Default: "EventAIErrors.log" +# +# CharLogFile +# Character operations logfile name +# Default: "Char.log" +# "" - Empty name disable creating log file +# +# CharLogTimestamp +# 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 +# +# 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 +# +# GmLogFile +# GM Log file of gm commands +# Default: "" (Disable) +# +# GmLogTimestamp +# GM 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 +# +# 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 +# +# RaLogFile +# Log file of RA commands +# Default: "Ra.log" +# "" - Empty name for disable +# +# LogColors +# Color for messages (format "normal_color details_color debug_color error_color") +# Colors: 0 - BLACK, 1 - RED, 2 - GREEN, 3 - BROWN, 4 - BLUE, 5 - MAGENTA, 6 - CYAN, 7 - GREY, +# 8 - YELLOW, 9 - LRED, 10 - LGREEN, 11 - LBLUE, 12 - LMAGENTA, 13 - LCYAN, 14 - WHITE +# Default: "" - none colors +# Example: "13 7 11 9" +# +################################################################################################################### + +# LogSQL = 1 +# PidFile = "" +# LogLevel = 1 +# LogTime = 0 +# LogFile = "Server.log" +# PacketLogFile = "" +# LogTimestamp = 0 +# LogFileLevel = 0 +# LogFilter_TransportMoves = 1 +# LogFilter_CreatureMoves = 1 +# LogFilter_VisibilityChanges = 1 +# LogFilter_Weather = 1 +# LogFilter_DbStrictedCheck = 1 +# LogFilter_Pathfinding = 1 +# LogFilter_MapsLoading = 1 +# LogFilter_EventAiDev = 1 +# LogFilter_DbScriptDev = 1 +# LogFilter_PeriodicAffects = 0 +# LogFilter_PlayerMoves = 1 +# LogFilter_SQLText = 1 +# LogFilter_AIAndMovegens = 0 +# LogFilter_PlayerStats = 0 +# LogFilter_Damage = 0 +# LogFilter_Combat = 0 +# LogFilter_SpellCast = 0 +# WorldLogFile = "" +# WorldLogTimestamp = 0 +# DBErrorLogFile = "DBErrors.log" +# EventAIErrorLogFile = "EventAIErrors.log" +# CharLogFile = "Char.log" +# CharLogTimestamp = 0 +# CharLogDump = 0 +# GmLogFile = "" +# GmLogTimestamp = 0 +# GmLogPerAccount = 0 +# RaLogFile = "" +# LogColors = "" + +################################################################################################################### +# SERVER SETTINGS # # GameType # Server realm style @@ -40,17 +501,1302 @@ # 28 QA Server - any language # 29 CN9 - basic-Latin at create, any at login # +# 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, not allow create characters, and set rename request and disconnect at not allowed symbols name +# 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, not allow create 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 +# +# CharactersCreatingDisabled +# Disable characters creating 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 numbers of characters per account (at all realms). +# Note: this setting limits the character creating at the _current_ realm base at characters amount at all realms +# Default: 50 +# The number must be >= CharactersPerRealm +# +# CharactersPerRealm +# Limit numbers of characters for account at realm +# Default: 10 (client limitation) +# The number must be between 1 and 10 +# +# SkipCinematics +# Disable in-game script movie at first character's login(allows to prevent buggy intro in case of custom start location coordinates) +# Default: 0 - show intro for each new character +# 1 - show intro only for first character of selected race +# 2 - disable intro in all cases +# +# MaxPlayerLevel +# Max level that can be reached by a player for experience (in range from 1 to 100). +# Change not recommended +# Default: 60 +# +# StartPlayerLevel +# Staring level that have character at creating (in range 1 to MaxPlayerLevel) +# Default: 1 +# +# StartPlayerMoney +# Amount of money that new players will start with. +# If you want to start with one silver, use for example 100 (100 copper = 1 silver) +# Default: 0 +# +# MaxHonorPoints +# Max honor points that player can have. +# Default: 75000 +# +# StartHonorPoints +# Amount of honor that new players will start with +# Default: 0 +# +# MinHonorKills +# Min kills that players must obtain to enter in weekly honor calculation +# Default: 15 +# +# MaintenanceDay +# The day of the week is performed server maintenance ( 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) +# +# DisableWaterBreath +# Enable or disable Waterbreathing +# Default: 4 (Console as noneone) +# +# AlwaysShowQuestGreeting +# Controls whether quest greetings (used when NPC is a quest giver but does not have UNIT_NPC_FLAG_GOSSIP) is always +# shown, or is shown only if there are more than one menu items available to the player. +# Default: 0 (disabled, original behavior) +# 1 (enabled) +# +# TaxiFlightChatFix +# Workaround for client bug: resuming taxi flight on login causes missing chat channels until the flight ends. +# When enabled allows clients to join local channels of the zone they are flying over on login and all custom channels. +# Default: 0 (disabled, original client behavior) +# 1 (enabled) +# +# LongFlightPathsPersistence +# Controls whether logging out in multi-destination taxi flight will resume entire flight or the nearest destination only. +# Default: 0 (false) +# 1 (true) +# +# 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: 20 +# # 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) # +# 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.StrictCombatLockdown +# This setting determines whether its possible to leave combat mode through additional means (such as Feign Death) when zone is set in combat. +# Default: 0 (false, drop combat, default pre-2.3.0) +# 1 (true, combat persists, default post-2.3.0) +# +# 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.DisableRelocate +# Disables relocation of player upon entering instance after 15 minutes or instance reset +# Default: 0 - false - relocates player after being logged out in instance for more than 15 minutes or instance reset +# 1 - true - location is kept +# +# 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: 5 +# -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 a 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 very high value to prevent oldest guild events to be rewritten 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 +# +# InteractionPauseTimer +# Creatures will pause waypoint movement for the specified time (in milliseconds) when a player interacts with them +# Default: 180000 (3 minutes) +# +# MaxPrimaryTradeSkill +# Max count that player can learn the primary trade skill. +# Default: 2 +# Max : 10 +# +# TradeSkill.GMIgnore.MaxPrimarySkillsCount +# GM level starting from max primary skill count requirement ignored. +# Default: 4 (Console as noneone) +# +# TradeSkill.GMIgnore.Level +# GM level starting from trade skill level requirement ignored. +# Default: 4 (Console as noneone) +# +# TradeSkill.GMIgnore.Skill +# GM level starting from trade skill skill requirement ignored. +# Default: 4 (Console as noneone) +# +# MinPetitionSigns +# Min signatures count to creating 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) +# +# MassMailer.SendPerTick +# Max amount mail send each tick from mails list scheduled for mass mailer proccesing. +# More mails increase server load but speedup mass mail proccess. Normal tick length: 50 msecs, so 20 ticks in sec and 200 mails in sec by default. +# Default: 10 +# +# PetUnsummonAtMount +# Permanent pet will unsummoned at player mount +# Default: 0 - not unsummon +# 1 - unsummon for any mount +# +# PetAttackFromBehind +# Player controlled pet will attack from behind +# Default: 0 - Engage from any angle +# 1 - Engage from behind +# +# AutoDownrank +# Automatically select correct rank when buffing/healing lower level players +# Default: 0 (false) +# 1 (true) +# +# Event.Announce +# Default: 0 (false) +# 1 (true) +# +# BeepAtStart +# Beep at mangosd start finished (mostly work only at Unix/Linux systems) +# Default: 1 (true) +# 0 (false) +# +# ShowProgressBars +# Control show progress bars for load steps at server startup +# Default: 0 (false) +# 1 (true) +# +# 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) +# # Motd # Message of the Day. Displayed at worldlogin for every user ('@' for a newline). # -#################################################################################################################### +# PlayerCommands +# Should player chat be parsed for GM commands. +# Default: 1 (parse commands) +# 0 (ignore commands) +# +################################################################################################################### -GameType = 0 -RealmZone = 8 -RabbitDay = 954547200 -Motd = "Bienvenue en Azeroth! (sur le serveur du garage)" +# GameType = 1 +# RealmZone = 8 +# DBC.Locale = 255 +# DeclinedNames = 0 +# StrictPlayerNames = 0 +# StrictCharterNames = 0 +# StrictPetNames = 0 +# MinPlayerName = 2 +# MinCharterName = 2 +# MinPetName = 2 +# CharactersCreatingDisabled = 0 +# CharactersPerAccount = 50 +# CharactersPerRealm = 10 +# SkipCinematics = 0 +# MaxPlayerLevel = 60 +# StartPlayerLevel = 1 +# StartPlayerMoney = 0 +# MaxHonorPoints = 75000 +# StartHonorPoints = 0 +# MinHonorKills = 15 +# MaintenanceDay = 3 +# InstantLogout = 1 +# DisableWaterBreath = 4 +# AlwaysShowQuestGreeting = 0 +# TaxiFlightChatFix = 0 +# LongFlightPathsPersistence = 0 +# AllFlightPaths = 0 +# AlwaysMaxSkillForLevel = 0 +# ActivateWeather = 1 +# CastUnstuck = 1 +# MaxSpellCastsInChain = 20 +# RabbitDay = 1 +# Instance.IgnoreLevel = 0 +# Instance.IgnoreRaid = 0 +# Instance.StrictCombatLockdown = 0 +# Instance.ResetTimeHour = 4 +# Instance.UnloadDelay = 1800000 +# Instance.DisableRelocate = 0 +# Quests.LowLevelHideDiff = 5 +# 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 +# InteractionPauseTimer = 180000 +# MaxPrimaryTradeSkill = 2 +# TradeSkill.GMIgnore.MaxPrimarySkillsCount = 4 +# TradeSkill.GMIgnore.Level = 4 +# TradeSkill.GMIgnore.Skill = 4 +# MinPetitionSigns = 9 +# MaxGroupXPDistance = 74 +# MailDeliveryDelay = 3600 +# MassMailer.SendPerTick = 10 +# PetUnsummonAtMount = 0 +# PetAttackFromBehind = 0 +# AutoDownrank = 0 +# Event.Announce = 0 +# BeepAtStart = 1 +# ShowProgressBars = 0 +# WaitAtStartupError = 0 +# Motd = "Bienvenu en Azeroth !" +# PlayerCommands = 1 + +################################################################################################################### +# PLAYER INTERACTION +# +# AllowTwoSide.Accounts +# Allow accounts to create characters in both teams in any game 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 disallow players from different teams to: +# - chat with each other (say, yell); +# - have merged chat channels; +# - join each other's groups; +# - join each other's guilds; +# - trade with each other when not in group; +# - have merged auction house listings; +# - send in-game mail; +# Default: 0 (Not allowed) +# 1 (Allowed) +# +# AllowTwoSide.WhoList +# Allow show player from both team 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) +# +# TalentsInspecting +# Allow other players see character talents in inspect dialog (Characters in Gamemaster mode can +# inspect talents always) +# Default: 1 (allow) +# 0 (not allow) +# +################################################################################################################### + +# AllowTwoSide.Accounts = 1 +# AllowTwoSide.Interaction.Chat = 0 +# AllowTwoSide.Interaction.Channel = 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 +# TalentsInspecting = 1 + +################################################################################################################### +# CREATURE AND GAMEOBJECT SETTINGS +# +# Rate.Creature.Aggro +# Aggro radius percent or off. +# Default: 1 - 100% +# 1.5 - 150% +# 0 - off (0%) +# +# CreatureRespawnAggroDelay +# The delay between when a creature spawns and when it can be aggroed by nearby movement. +# Default: 5000 (5s) +# +# LeashRadius +# Radius for default leash due to being too far from refresh position +# Default: 30 (yards) +# +# CreatureFamilyFleeAssistanceRadius +# Radius which creature will use to seek for a near creature for assistance. Creature will flee to this creature. +# Default: 30 +# 0 - off +# +# CreatureFamilyAssistanceRadius +# Radius which creature will use to call assistance without moving +# Default: 5 +# 0 - off +# +# CreatureFamilyAssistanceDelay +# Reaction time for creature assistance call +# Default: 1500 (1.5s) +# +# CreatureCheckForHelpRadius +# Range at which a close moving npc can be assisted +# Default: 5 yards +# +# CreatureCheckForHelpAggroDelay +# Time during which at combat start check for help is disabled +# Default: 2000 (2 seconds) +# +# CreatureLinkingAggroDelay +# Time after which spawn_group and linking aggro is triggered +# Default: 2000 (2 seconds) +# +# CreatureFamilyFleeDelay +# Time during which creature can flee when no assistant found +# Default: 10000 (10s) +# +# WorldBossLevelDiff +# Difference for boss dynamic level with target +# Default: 3 +# +# Corpse.EmptyLootShow +# If target can have loot (or can be skining after loot) but no loot generated still show loot window +# Default: 1 (show) +# 0 (not show) +# +# Corpse.AllowAllItemsShowInMasterLoot +# In master loot mode every one can see the loot content under or over treshold +# Only the master loot can still distrube it +# 1 (show) +# Default: 0 (not show) +# +# 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 had 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 damage 2x, 1.7 - 1.7x. +# +# Rate.Creature.Normal.SpellDamage +# Rate.Creature.Elite.Elite.SpellDamage +# Rate.Creature.Elite.RAREELITE.SpellDamage +# Rate.Creature.Elite.WORLDBOSS.SpellDamage +# Rate.Creature.Elite.RARE.SpellDamage +# Creature Spell Damage Rates. +# Examples: 2 - creatures will damage with spells 2x, 1.7 - 1.7x. +# +# 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 have 2x health, 1.7 - 1.7x. +# +# ListenRange.Say +# Distance from player to listen text that creature (or other world object) say +# Default: 25 +# +# ListenRange.TextEmote +# Distance from player to listen textemote that creature (or other world object) say +# Default: 25 +# +# ListenRange.Yell +# Distance from player to listen text that creature (or other world object) yell +# 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 +# CreaturePickpocketRestockDelay +# Time for pickpocket restock in seconds +# Default: 600 (10 minutes) +# +################################################################################################################### + +# Rate.Creature.Aggro = 1 +# CreatureRespawnAggroDelay = 5000 +# LeashRadius = 30 +# CreatureFamilyFleeAssistanceRadius = 30 +# CreatureFamilyAssistanceRadius = 5 +# CreatureFamilyAssistanceDelay = 1500 +# CreatureCheckForHelpRadius = 5 +# CreatureCheckForHelpAggroDelay = 2000 +# CreatureFamilyFleeDelay = 10000 +# WorldBossLevelDiff = 3 +# Corpse.EmptyLootShow = 1 +# Corpse.AllowAllItemsShowInMasterLoot = 1 +# 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 +# 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 = 25 +# ListenRange.TextEmote = 25 +# ListenRange.Yell = 300 +# GuidReserveSize.Creature = 10000 +# GuidReserveSize.GameObject = 10000 +# CreaturePickpocketRestockDelay = 600 + + +################################################################################################################### +# 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 working old addons +# that use normal languages for sending data to another clients. +# Default: 0 (disable fake messages preventing) +# 1 (enable fake messages preventing) +# +# ChatStrictLinkChecking.Severity +# Check chat messages for ingame links to spells, items, quests, achievements etc. +# Default: 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, haste message count to activate protection +# 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, mute time at activation flood protection (not saved) +# Default: 10 (in secs) +# +# Chat.RestrictedRaidWarnings +# Chat anti-flood protection, mute time at activation flood protection (not saved) +# 0 (unrestricted: allow use in parties by all members of the group) (2.0.0 - 3.3.0 behavior) +# Default: 1 (restricted: only allow use in raids by leader and assitants) +# +# Channel.RestrictedLanguageMode +# Restrict usage of non-latin characters according to RealmZone +# Default: 0 (no restrictions, any characters in all channels) +# 1 (characters limited by RealmZone language in global channels only) +# 2 (characters limited by RealmZone language in global and custom static channels) +# 3 (characters limited by RealmZone language in global and all custom channels) +# +# Channel.StaticAutoTreshold +# Static custom channels are custom channels pre-configured with global-like properties in a "world chat" manner. +# By default they have no owner, no moderators, no password and no premoderation (unless overriden by a GM). +# This setting is responsible for automatic conversion to static upon eligible channel reaching number of members. +# Default: 0 (disabled) +# +################################################################################################################### + +# ChatFakeMessagePreventing = 0 +# ChatStrictLinkChecking.Severity = 0 +# ChatStrictLinkChecking.Kick = 0 +# ChatFlood.MessageCount = 10 +# ChatFlood.MessageDelay = 1 +# ChatFlood.MuteTime = 10 +# Chat.RestrictedRaidWarnings = 1 +# Channel.RestrictedLanguageMode = 0 +# Channel.StaticAutoTreshold = 0 + +################################################################################################################### +# 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.AcceptTicketsLevel +# Min GM account security level required for accepting ticket notifications, alerts and using some commands. +# 0 (disabled for everyone) +# 1 (only moderators and above) +# Default: 2 (only gamemasters and above) +# 3 (only administrators) +# +# GM.Chat +# GM chat mode at login +# Default: 2 (last save state) +# 0 (disable) +# 1 (enable) +# +# GM.ChatLevel +# Min GM account security level required to be eligible for using GM chat tag. +# 0 (disabled for everyone) +# Default: 1 (only moderators and above) +# 2 (only gamemasters and above) +# 3 (only administrators) +# +# GM.ChannelModerationLevel +# Min GM account security level required for executing moderator in-game commands in the channels +# This also bypasses password prompts on joining channels which require password +# 0 (in-game channel moderator privileges only) +# Default: 1 (enabled for moderators and above) +# 2 (enabled for gamemasters and above) +# 3 (enabled only for administrators) +# +# GM.ChannelSilentJoinLevel +# Min GM account security level required for silently joining and leaving channels +# Default: 0 (join and leave announcements enabled for everyone) +# 1 (disabled for moderators and above) +# 2 (disabled for gamemasters and above) +# 3 (disabled only for administrators) +# +# +# 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 account security level showed 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 account security level showed 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 enable +# 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.InvisibleAura +# A spell that will be cast when a gm uses ".gm visible off" (Must be aura spell) +# Default: 31748 (Spirit Particles, big) +# 0 (Disabled) +# +# GM.TicketsQueueStatus +# GM tickets queue status on startup, when disabled server will not accept any GM tickets from players +# Default: 1 (Enabled) +# 0 (Disabled) +# +################################################################################################################### + +# GM.LoginState = 2 +# GM.Visible = 2 +# GM.AcceptTickets = 2 +# GM.AcceptTicketsLevel = 2 +# GM.Chat = 2 +# GM.ChatLevel = 1 +# GM.ChannelModerationLevel= 1 +# GM.ChannelSilentJoinLevel= 0 +# GM.WhisperingTo = 2 +# GM.InGMList.Level = 3 +# GM.InWhoList.Level = 3 +# GM.LogTrade = 1 +# GM.StartLevel = 1 +# GM.LowerSecurity = 0 +# GM.InvisibleAura = 31748 +# GM.TicketsQueueStatus = 1 + +################################################################################################################### +# VISIBILITY AND RADIUSES +# +# Visibility.FogOfWar.Stealth +# Sets visibility mode for invisible units. Fog Of War settings are not applied to GMs. +# Default: 0 (standard setting: players can see invisibile units in their own group) +# 1 (players can see same faction invisibile units) +# +# Visibility.FogOfWar.Health +# Sets visibility mode for absolute health values. Fog Of War settings are not applied to GMs. +# Default: 0 (Pre-3.0 standard setting: players can see health values of units in their own group) +# 1 (players can see health values of same faction units) +# 2 (Post-3.0 standard setting: players can see health values of all units) +# +# Visibility.FogOfWar.Stats +# Sets visibility mode for values of character attributes and attack stats. Fog Of War settings are not applied to GMs. +# Default: 0 (standard setting: players can see own values and values of their pets) +# 1 (players can see values of same faction units) +# 2 (players can see values of all units) +# +# Visibility.Distance.Continents +# Visibility.Distance.Instances +# Visibility.Distance.BG +# Visibility distance for different ingame object in different maps. +# Visibility on continents on offy 100 yards. In BG/Arenas 533. For instances default 170. +# Max limited by active player zone: 533 +# Min limit is max aggro radius (45) * Rate.Creature.Aggro +# +# 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.FogOfWar.Stealth = 0 +# Visibility.FogOfWar.Health = 0 +# Visibility.FogOfWar.Stats = 0 +# Visibility.Distance.Continents = 100 +# Visibility.Distance.Instances = 170 +# Visibility.Distance.BGArenas = 533 +# Visibility.RelocationLowerLimit = 10 +# Visibility.AIRelocationNotifyDelay = 1000 + +################################################################################################################### +# 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 income from damage. +# Default: 1 +# +# Rate.Skill.Discovery +# Skill Discovery Rates +# 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.Item.Quest +# Rate.Drop.Money +# Drop rates (items by quality and money) +# Default: 1 +# +# Rate.Pet.XP.Kill +# Rate.XP.Kill +# Rate.XP.Quest +# Rate.XP.Explore +# XP rates +# Default: 1 +# +# Rate.Rest.InGame +# Rate.Rest.Offline.InTavernOrCity +# Rate.Rest.Offline.InWilderness +# Resting points grow rates (1 - normal, 2 - double rate, 0.5 - half rate, etc) from standard values +# +# 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 get at auction start, auction cut from price at auction end) +# +# Auction.Deposit.Min +# Minimum auction deposit size in copper +# Default: 0 +# +# Rate.Honor +# Honor gain rate +# +# 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.Reputation.Gain +# Reputation Gain rate +# Default: 1 +# +# Rate.Reputation.LowLevel.Kill +# Lowest Reputation Gain rate from low level kill +# Default: 0.2 +# +# Rate.Reputation.LowLevel.Quest +# Lowest Reputation Gain rate from low level quest +# Default: 0.2 +# +# Rate.InstanceResetTime +# Multiplier for the number of days in between global raid/heroic instance resets. +# Default: 1 +# +# SkillGain.Crafting +# SkillGain.Defense +# SkillGain.Gathering +# SkillGain.Weapon +# crafting/defense/gathering/weapon skills gain at skill grow (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) +# +# DurabilityLossChance.Damage +# Chance lost one from equiped items durability point at damage apply or receive. +# Default: 0.5 (100/0.5 = 200) Each 200 damage apply one from 19 possible equipped items +# +# DurabilityLossChance.Absorb +# Chance lost one from armor items durability point at damage absorb. +# Default: 0.5 (100/0.5 = 200) Each 200 absorbs apply one from 15 possible armor equipped items +# +# DurabilityLossChance.Parry +# Chance lost weapon durability point at parry. +# Default: 0.05 (100/0.05 = 2000) Each 2000 parry attacks main weapon lost point +# +# DurabilityLossChance.Block +# Chance lost sheild durability point at damage block. +# Default: 0.05 (100/0.05 = 2000) Each 2000 partly or full blocked attacks shield lost point +# +# Death.SicknessLevel +# Starting Character start gain sickness at spirit resurrection (1 min) +# Default: 11 +# -10 - character will have full time (10min) 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's ghosts, removed upon reviving, not permanent/saved, in non-BG and BG maps +# Default: 1.0 (normal speed) +# +################################################################################################################### + +# Rate.Health = 1 +# Rate.Mana = 1 +# Rate.Rage.Income = 1 +# Rate.Rage.Loss = 1 +# Rate.Focus = 1 +# Rate.Loyalty = 1 +# Rate.Energy = 1 +# Rate.Skill.Discovery = 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.Item.Quest = 1 +# Rate.Drop.Money = 1 +# Rate.Pet.XP.Kill = 1 +# Rate.XP.Kill = 1 +# Rate.XP.Quest = 1 +# Rate.XP.Explore = 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 +# Rate.Honor = 1 +# Rate.Mining.Amount = 1 +# Rate.Mining.Next = 1 +# Rate.Talent = 1 +# Rate.Reputation.Gain = 1 +# Rate.Reputation.LowLevel.Kill = 0.2 +# Rate.Reputation.LowLevel.Quest = 0.2 +# 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 +# DurabilityLossChance.Damage = 0.5 +# DurabilityLossChance.Absorb = 0.5 +# DurabilityLossChance.Parry = 0.05 +# DurabilityLossChance.Block = 0.05 +# Death.SicknessLevel = 11 +# Death.CorpseReclaimDelay.PvP = 1 +# Death.CorpseReclaimDelay.PvE = 1 +# Death.Bones.World = 1 +# Death.Bones.Battleground = 1 +# Death.Ghost.RunSpeed.World = 1.0 +# Death.Ghost.RunSpeed.Battleground = 1.0 + +################################################################################################################### +# BATTLEGROUND CONFIG +# +# Battleground.CastDeserter +# Cast Deserter spell at player who leave battleground in progress +# Default: 1 (enable) +# 0 (disable) +# +# Battleground.QueueAnnouncer.Join +# Enable queue announcer posting to chat at join +# 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.ScoreStatistics +# Enable Battleground scores storage in database. +# Default: 0 - (Disabled) +# 1 - (Enabled) +# +# Battleground.InvitationType +# Set Battleground invitation type +# Default: 0 (normal - invite as much players to bg as possible, don't bother with ballance) +# 1 (Experimental - don't allow to invite much more players of one faction) +# +# 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.CastDeserter = 1 +# Battleground.QueueAnnouncer.Join = 0 +# Battleground.QueueAnnouncer.Start = 0 +# Battleground.ScoreStatistics = 0 +# Battleground.InvitationType = 0 +# BattleGround.PrematureFinishTimer = 300000 +# BattleGround.PremadeGroupWaitForMatch = 0 + +################################################################################################################### +# OUTDOOR PVP CONFIG +# +# OutdoorPvp.SIEnabled #Enable Silithus Outdoor pvp +# OutdoorPvp.EPEnabled #Enable Eastern Plaguelands Outdoor pvp +# Default: 1 (enable) +# 0 (disable) +# +################################################################################################################### + +# OutdoorPvp.SIEnabled = 1 +# OutdoorPvp.EPEnabled = 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.Threads = 1 +# Network.OutKBuff = -1 +# Network.OutUBuff = 65536 +# Network.TcpNodelay = 1 +# Network.KickOnBadPacket = 0 + +################################################################################################################### +# 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.Restricted +# Not allow execute console level only commands remotly by RA +# 0 - off +# Default: 1 - on +# +# SOAP.Enabled +# 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.Restricted = 1 + +SOAP.Enabled = 1 +SOAP.IP = 0.0.0.0 +SOAP.Port = 7878 +SOAP.User = soapuser +SOAP.Pass = soappass + +################################################################################################################### +# 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 + +################################################################################################################### +# METRICS CONFIGURATION -> Require core builded with BUILD_METRICS option +# +# Metric.Enable +# Enable or disable metric logging +# Default: 0 - Disabled(default) +# 1 - Enable +# +# Metric.Address +# IP / Hostname for the InfluxDB where measurements are stored. +# Default: "127.0.0.1" +# +# Metric.Port +# Port for the InfluxDB where measurements are stored. +# Default: 8086 +# +# Metric.Database +# Database name for the InfluxDB where measurements are stored. +# Default: "perfd" +# +# Metric.Username +# Username of the InfluxDB where measurements are stored. +# Default: "" +# +# Metric.Password +# Password of the InfluxDB where measurements are stored. +# Default: "" +# +################################################################################################################### + +# Metric.Enable = 0 +# Metric.Address = "127.0.0.1" +# Metric.Port = 8086 +# Metric.Database = "perfd" +# Metric.Username = "" +# Metric.Password = "" + +# Dummy.Debug1 = 0 +# Dummy.Debug2 = 0 diff --git a/config/realmd/realmd.conf b/config/realmd/realmd.conf new file mode 100644 index 0000000..1673020 --- /dev/null +++ b/config/realmd/realmd.conf @@ -0,0 +1,149 @@ +############################################ +# MaNGOS realmd configuration file +# +# To overwrite configuration fields with environment variables +# use the following pattern to generate environment variable names: +# +# For WrongPass.MaxCount: +# export Realmd_WrongPass_MaxCount=10 +# +# For RealmServerPort: +# export Realmd_RealmServerPort=3333 +# +############################################ + +[RealmdConf] +ConfVersion=2021031501 + +################################################################################################################### +# 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. +# +# MaxPingTime +# Settings for maximum database-ping interval (minutes between pings) +# +# RealmServerPort +# Port on which the server will listen +# +# BindIP +# Bind Realm Server to specific IP address +# 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 +# +# ListenerThreads +# Number of listener threads realmd should use. +# Default: 1 +# +# 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 +# +# LogColors +# Color for messages (format "normal_color details_color debug_color error_color) +# Colors: 0 - BLACK, 1 - RED, 2 - GREEN, 3 - BROWN, 4 - BLUE, 5 - MAGENTA, 6 - CYAN, 7 - GREY, +# 8 - YELLOW, 9 - LRED, 10 - LGREEN, 11 - LBLUE, 12 - LMAGENTA, 13 - LCYAN, 14 - WHITE +# Default: "" - none colors +# "13 7 11 9" - for example :) +# +# 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) +# +# RealmsStateUpdateDelay +# Realm list Update up delay (updated at realm list request if delay expired). +# Default: 20 +# 0 (Disabled) +# +# StrictVersionCheck +# Description: Prevent modified clients from connnecting +# Default: 0 - (Disabled) +# 1 - (Enabled) +# +# 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) +# +################################################################################################################### + +# LoginDatabaseInfo = "127.0.0.1;3306;mangos;mangos;classicrealmd" +# LogsDir = "" +MaxPingTime = 30 +RealmServerPort = 3724 +BindIP = "0.0.0.0" +ListenerThreads = 1 +PidFile = "" +LogLevel = 0 +LogTime = 0 +LogFile = "Realmd.log" +LogTimestamp = 0 +LogFileLevel = 0 +LogColors = "" +UseProcessors = 0 +ProcessPriority = 1 +WaitAtStartupError = 0 +RealmsStateUpdateDelay = 20 +StrictVersionCheck = 0 +WrongPass.MaxCount = 0 +WrongPass.BanTime = 600 +WrongPass.BanType = 0 \ No newline at end of file diff --git a/create_user.sh b/create_user.sh new file mode 100755 index 0000000..0ba70dc --- /dev/null +++ b/create_user.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +curl -s -u "soapuser:soappass" \ + -H "Content-Type: text/xml" \ + -d ' + + + account create test2 testpass + + ' \ + http://localhost:7878/ diff --git a/docker/Dockerfile b/docker/Dockerfile index 6a55add..5c72e07 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -166,6 +166,7 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ libmariadb-dev \ libssl3 \ wait-for-it \ + screen \ \ && rm -rf /tmp/* diff --git a/mangosd.conf b/mangosd.conf new file mode 100644 index 0000000..9b4647e --- /dev/null +++ b/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!" diff --git a/php/Dockerfile b/php/Dockerfile new file mode 100644 index 0000000..3bd9db1 --- /dev/null +++ b/php/Dockerfile @@ -0,0 +1,22 @@ +FROM php:8.2-apache + +# Installer les dépendances nécessaires pour compiler les extensions PHP +RUN apt-get update && apt-get install -y \ + unzip \ + git \ + libgmp-dev \ + libzip-dev \ + libxml2-dev \ + default-mysql-client \ + && docker-php-ext-install mysqli gmp soap \ + && rm -rf /var/lib/apt/lists/* + +# Installer composer +COPY --from=composer:2 /usr/bin/composer /usr/bin/composer + +# Copier l'application +WORKDIR /var/www/html +COPY ./index.php ./srp6.php ./composer.json ./ + +# Installer les dépendances PHP +RUN composer install --no-dev --optimize-autoloader diff --git a/php/composer.json b/php/composer.json new file mode 100644 index 0000000..50d1e0d --- /dev/null +++ b/php/composer.json @@ -0,0 +1,15 @@ +{ + "name": "wow/account-web", + "description": "Web panel to create WoW accounts with SRP6 and OIDC authentication", + "require": { + "php": ">=8.0", + "jumbojett/openid-connect-php": "^0.9.6", + "ext-gmp": "*", + "ext-mysqli": "*" + }, + "autoload": { + "files": [ + "srp6.php" + ] + } +} \ No newline at end of file diff --git a/php/index.php b/php/index.php new file mode 100644 index 0000000..a9767e4 --- /dev/null +++ b/php/index.php @@ -0,0 +1,58 @@ +authenticate(); +// $_SESSION['user'] = $oidc->getVerifiedClaims(); +// } + +// --- Formulaire pour créer un compte --- +if ($_SERVER['REQUEST_METHOD'] === 'POST') { + $user = $_POST['username']; + $pass = $_POST['password']; + + $soapUser = 'SOAPUSER'; + $soapPass = 'SOAPPASS'; + $host = getenv('SOAP_HOST'); + $port = getenv('SOAP_PORT'); + + $command = "account create $user $pass"; + $command = "account list"; + + $client = new SoapClient(NULL, [ + "location" => "http://mangosd:7878/", + "uri" => "urn:MaNGOS", + "style" => SOAP_RPC, + 'login' => $soapUser, + 'password' => $soapPass + ]); + + try { + // NOTE : ne pas mettre de préfixe ns1: + $result = $client->__soapCall('executeCommand', [new SoapParam($command, 'command')]); + echo "✅ Command executed:\n"; + echo $result; + var_dump($result); + } catch (Exception $e) { + echo "❌ Command failed:\n"; + echo $e->getMessage(); + } +} +?> + +
+ + + +
diff --git a/php/srp6.php b/php/srp6.php new file mode 100644 index 0000000..0bcdc18 --- /dev/null +++ b/php/srp6.php @@ -0,0 +1,50 @@ + 64 hex) + $saltBin = random_bytes(32); + + // h1 = SHA1(U:P) + $h1 = sha1($U . ':' . $P, true); + + // h2 = SHA1(salt || h1) + $h2 = sha1($saltBin . $h1, true); + + // x = int( h2 ) (interprété comme un entier non signé big-endian) + // -> on passe par l'hex pour éviter les soucis d'endianness + $x = gmp_init(bin2hex($h2), 16); + + $N = gmp_init(self::N_HEX, 16); + $g = gmp_init(self::G_HEX, 16); + + // v = g^x mod N + $v = gmp_powm($g, $x, $N); + + // Longueur hex attendue = longueur de N en hex (ici 64 chars) + $nLen = strlen(self::N_HEX); + + // Hex MAJUSCULE + padding + $vHex = strtoupper(str_pad(gmp_strval($v, 16), $nLen, '0', STR_PAD_LEFT)); + $sHex = strtoupper(str_pad(bin2hex($saltBin), 64, '0', STR_PAD_LEFT)); // 32 bytes => 64 hex + + return ['v' => $vHex, 's' => $sHex]; + } +} diff --git a/registration b/registration new file mode 160000 index 0000000..72f3ab1 --- /dev/null +++ b/registration @@ -0,0 +1 @@ +Subproject commit 72f3ab1c37e25a9cf3a8149d05c8bfbd7b169279 diff --git a/scripts/create_realm.sh b/scripts/create_realm.sh new file mode 100755 index 0000000..1655b31 --- /dev/null +++ b/scripts/create_realm.sh @@ -0,0 +1,67 @@ +#!/usr/bin/env bash +# + +set -e + +readonly BASE_DIR="$(realpath "$(dirname "${0}")/..")" +source "${BASE_DIR}/.env" + +# Nom du conteneur Docker +CONTAINER="wow-mangosd" + +function create_realm() { + local REALM_NAME="${1}" + local REALM_ADDRESS="${2}" + + # Variables fixes + REALM_ID=1 + REALM_PORT=8085 + + echo "⚙️ Configuration du realm '$REALM_NAME' ($REALM_ADDRESS:$REALM_PORT)..." + + # Exécution des requêtes SQL via un client mysql externe + docker run --rm -i \ + --network container:$CONTAINER \ + mysql:5.7 \ + mysql -hdatabase -u$MANGOS_DBUSER -p$MANGOS_DBPASS ${WOW_VERSION}realmd < "http://$host:$soapport/", + "uri" => "urn:MaNGOS", + "style" => SOAP_RPC, + 'login' => $username, + 'password' => $password +)); + +try { + $result = $client->executeCommand(new SoapParam($command, "command")); + + echo "Command succeeded! Output:
\n"; + echo $result; +} +catch (Exception $e) +{ + echo "Command failed! Reason:
\n"; + echo $e->getMessage(); +} \ No newline at end of file