Merge branch 'master' into gridmap-height

This commit is contained in:
VG-prog 2025-10-14 19:49:27 +02:00 committed by GitHub
commit 4e6ccb828b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
415 changed files with 6412 additions and 4331 deletions

2
.github/CODEOWNERS vendored Normal file
View File

@ -0,0 +1,2 @@
# Protect dashboard workflow require explicit review
.github/workflows/dashboard-ci.yml @Yehonal

View File

@ -54,8 +54,7 @@ jobs:
env:
TERM: xterm-256color
run: |
cd apps/test-framework
./run-tests.sh --tap --all
./acore.sh test bash --tap --all
build-and-test:
name: Build and Integration Test
@ -79,6 +78,7 @@ jobs:
cp conf/dist/config.sh conf/config.sh
# Configure dashboard
sed -i 's/MTHREADS=.*/MTHREADS="4"/' conf/config.sh
sed -i 's/CBUILD_TESTING=.*/CBUILD_TESTING="ON"/' conf/config.sh
- name: Test module commands
run: |
@ -105,6 +105,10 @@ jobs:
./acore.sh module remove mod-duel-reset
./acore.sh module list
- name: Run core tests
run: |
./acore.sh test core
- name: Test authserver dry-run
run: |
cd env/dist/bin

View File

@ -122,5 +122,7 @@
"C_Cpp.default.compileCommands": "${workspaceFolder}/build/compile_commands.json",
"C_Cpp.default.cppStandard": "c++17",
"C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools",
"C_Cpp.default.compilerPath": "/usr/bin/clang"
"C_Cpp.default.compilerPath": "/usr/bin/clang",
"cmake.sourceDirectory": ["${workspaceFolder}"],
"cmake.buildDirectory": "${workspaceFolder}/var/build",
}

View File

@ -1,6 +1,7 @@
function registerHooks() { acore_event_registerHooks "$@"; }
function runHooks() { acore_event_runHooks "$@"; }
#shellcheck source=../../conf/dist/config.sh
source "$AC_PATH_CONF/dist/config.sh" # include dist to avoid missing conf variables
# first check if it's defined in env, otherwise use the default

View File

@ -19,10 +19,10 @@ case $AC_PATH_ROOT in
*) AC_PATH_ROOT=$PWD/$AC_PATH_ROOT;;
esac
AC_PATH_CONF="$AC_PATH_ROOT/conf"
export AC_PATH_CONF="$AC_PATH_ROOT/conf"
AC_PATH_MODULES="$AC_PATH_ROOT/modules"
export AC_PATH_MODULES="$AC_PATH_ROOT/modules"
AC_PATH_DEPS="$AC_PATH_ROOT/deps"
export AC_PATH_DEPS="$AC_PATH_ROOT/deps"
AC_PATH_VAR="$AC_PATH_ROOT/var"
export AC_PATH_VAR="$AC_PATH_ROOT/var"

View File

@ -7,10 +7,17 @@ AC_PATH_APPS="$( cd "$( dirname "${BASH_SOURCE[0]}" )/../" && pwd )"
AC_PATH_SHARED="$AC_PATH_APPS/bash_shared"
# shellcheck source=./defines.sh
source "$AC_PATH_SHARED/defines.sh"
# shellcheck source=../../deps/acore/bash-lib/src/event/hooks.sh
source "$AC_PATH_DEPS/acore/bash-lib/src/event/hooks.sh"
# shellcheck source=./common.sh
source "$AC_PATH_SHARED/common.sh"
[[ "$OSTYPE" = "msys" ]] && AC_BINPATH_FULL="$BINPATH" || AC_BINPATH_FULL="$BINPATH/bin"
if [[ "$OSTYPE" = "msys" ]]; then
AC_BINPATH_FULL="$BINPATH"
else
export AC_BINPATH_FULL="$BINPATH/bin"
fi

View File

@ -1,7 +1,14 @@
#!/usr/bin/env bash
# Set SUDO variable - one liner
SUDO=$([ "$EUID" -ne 0 ] && echo "sudo" || echo "")
SUDO=""
IS_SUDO_ENABLED=${AC_ENABLE_ROOT_CMAKE_INSTALL:-0}
# Allow callers to opt-out from privilege escalation during install/perms adjustments
if [[ $IS_SUDO_ENABLED == 1 ]]; then
SUDO=$([ "$EUID" -ne 0 ] && echo "sudo" || echo "")
fi
function comp_clean() {
DIRTOCLEAN=${BUILDPATH:-var/build/obj}
@ -143,9 +150,13 @@ function comp_compile() {
popd >> /dev/null || exit 1
# set all aplications SUID bit
echo "Setting permissions on binary files"
find "$AC_BINPATH_FULL" -mindepth 1 -maxdepth 1 -type f -exec $SUDO chown root:root -- {} +
find "$AC_BINPATH_FULL" -mindepth 1 -maxdepth 1 -type f -exec $SUDO chmod u+s -- {} +
if [[ $IS_SUDO_ENABLED == 0 ]]; then
echo "Skipping root ownership and SUID changes (IS_SUDO_ENABLED=0)"
else
echo "Setting permissions on binary files"
find "$AC_BINPATH_FULL" -mindepth 1 -maxdepth 1 -type f -exec $SUDO chown root:root -- {} +
find "$AC_BINPATH_FULL" -mindepth 1 -maxdepth 1 -type f -exec $SUDO chmod u+s -- {} +
fi
[[ -f "$confDir/worldserver.conf.dist" ]] && \
cp -v --no-clobber "$confDir/worldserver.conf.dist" "$confDir/worldserver.conf"

View File

@ -24,7 +24,6 @@ fi
choco install -y --skip-checksums "${INSTALL_ARGS[@]}" cmake.install -y --installargs 'ADD_CMAKE_TO_PATH=System'
choco install -y --skip-checksums "${INSTALL_ARGS[@]}" visualstudio2022-workload-nativedesktop
choco install -y --skip-checksums "${INSTALL_ARGS[@]}" openssl --force --version=3.5.3
choco install -y --skip-checksums "${INSTALL_ARGS[@]}" openssl --force --version=3.5.4
choco install -y --skip-checksums "${INSTALL_ARGS[@]}" boost-msvc-14.3 --force --version=1.87.0
choco install -y --skip-checksums "${INSTALL_ARGS[@]}" mysql --force --version=8.4.4

View File

@ -41,6 +41,7 @@ menu_items=(
"client-data|gd|download client data from github repository (beta)"
"run-worldserver|rw|execute a simple restarter for worldserver"
"run-authserver|ra|execute a simple restarter for authserver"
"test|t|Run test framework"
"docker|dr|Run docker tools"
"version|v|Show AzerothCore version"
"service-manager|sm|Run service manager to run authserver and worldserver in background"
@ -84,6 +85,9 @@ function handle_menu_command() {
"run-authserver")
inst_simple_restarter authserver
;;
"test")
bash "$AC_PATH_APPS/test-framework/test-main.sh" "$@"
;;
"docker")
DOCKER=1 bash "$AC_PATH_ROOT/apps/docker/docker-cmd.sh" "$@"
exit

View File

@ -453,6 +453,40 @@ This is particularly useful for:
- **Multiple Projects**: Separate service configurations per project
- **Team Collaboration**: Share service setups across development teams
#### Service Configuration Portability
The service manager automatically stores binary and configuration paths as relative paths when they are located under the `AC_SERVICE_CONFIG_DIR`, making service configurations portable across environments:
```bash
# Set up a portable project structure
export AC_SERVICE_CONFIG_DIR="/opt/myproject/services"
mkdir -p "$AC_SERVICE_CONFIG_DIR"/{bin,etc}
# Copy your binaries and configs
cp /path/to/compiled/authserver "$AC_SERVICE_CONFIG_DIR/bin/"
cp /path/to/authserver.conf "$AC_SERVICE_CONFIG_DIR/etc/"
# Create service - paths under AC_SERVICE_CONFIG_DIR will be stored as relative
./service-manager.sh create auth authserver \
--bin-path "$AC_SERVICE_CONFIG_DIR/bin" \
--server-config "$AC_SERVICE_CONFIG_DIR/etc/authserver.conf"
# Registry will contain relative paths like "bin/authserver" and "etc/authserver.conf"
# instead of absolute paths, making the entire directory portable
```
**Benefits:**
- **Environment Independence**: Move the entire services directory between machines
- **Container Friendly**: Perfect for Docker volumes and bind mounts
- **Backup/Restore**: Archive and restore complete service configurations
- **Development/Production Parity**: Same relative structure across environments
**How it works:**
- Paths under `AC_SERVICE_CONFIG_DIR` are automatically stored as relative paths
- Paths outside `AC_SERVICE_CONFIG_DIR` are stored as absolute paths for safety
- When services are restored or started, relative paths are resolved from `AC_SERVICE_CONFIG_DIR`
- If `AC_SERVICE_CONFIG_DIR` is not set, all paths are stored as absolute paths (traditional behavior)
#### Migration from Legacy Format
If you have existing services in the old format, use the migration script:

View File

@ -219,6 +219,13 @@ function parse_arguments() {
export PARSED_CONFIG_FILE="$config_file"
export PARSED_SERVERCONFIG="$serverconfig"
export PARSED_SESSION_MANAGER="$session_manager"
echo "Parsed arguments:"
echo " Mode: $PARSED_MODE"
echo " Server Binary: $PARSED_SERVERBIN"
echo " Config File: $PARSED_CONFIG_FILE"
echo " Server Config: $PARSED_SERVERCONFIG"
echo " Session Manager: $PARSED_SESSION_MANAGER"
}
# Start service (single run or with simple-restarter)

File diff suppressed because it is too large Load Diff

183
apps/startup-scripts/test/test_startup_scripts.bats Normal file → Executable file
View File

@ -160,7 +160,19 @@ teardown() {
# Create registry with pm2 provider service
cat > "$AC_SERVICE_CONFIG_DIR/service_registry.json" << 'EOF'
[
{"name":"test-world","provider":"pm2","type":"service","bin_path":"/bin/worldserver","args":"","systemd_type":"--user","restart_policy":"always"}
{
"name":"test-world",
"provider":"pm2",
"type":"service",
"bin_path":"/bin/worldserver",
"args":"",
"systemd_type":"--user",
"restart_policy":"always",
"exec":{
"command":"/bin/true",
"args":[]
}
}
]
EOF
# Create minimal service config and run-engine config files required by 'send'
@ -215,7 +227,19 @@ EOF
# Create registry and config as in previous test
cat > "$AC_SERVICE_CONFIG_DIR/service_registry.json" << 'EOF'
[
{"name":"test-world","provider":"pm2","type":"service","bin_path":"/bin/worldserver","args":"","systemd_type":"--user","restart_policy":"always"}
{
"name":"test-world",
"provider":"pm2",
"type":"service",
"bin_path":"/bin/worldserver",
"args":"",
"systemd_type":"--user",
"restart_policy":"always",
"exec":{
"command":"/bin/true",
"args":[]
}
}
]
EOF
echo "RUN_ENGINE_CONFIG_FILE=\"$AC_SERVICE_CONFIG_DIR/test-world-run-engine.conf\"" > "$AC_SERVICE_CONFIG_DIR/test-world.conf"
@ -258,6 +282,31 @@ EOF
[ "$status" -eq 0 ]
}
@test "service-manager: restore helper recreates missing configs" {
command -v jq >/dev/null 2>&1 || skip "jq not installed"
export AC_SERVICE_CONFIG_DIR="$TEST_DIR/services"
mkdir -p "$AC_SERVICE_CONFIG_DIR"
source "$SCRIPT_DIR/service-manager.sh"
local service_name="restore-test"
local run_engine_config="$AC_SERVICE_CONFIG_DIR/$service_name-run-engine.conf"
local service_conf="$AC_SERVICE_CONFIG_DIR/$service_name.conf"
rm -f "$run_engine_config" "$service_conf"
mkdir -p "$TEST_DIR/bin" "$TEST_DIR/etc"
touch "$TEST_DIR/bin/worldserver"
touch "$TEST_DIR/etc/worldserver.conf"
ensure_service_configs_restored "$service_name" "world" "systemd" "$TEST_DIR/bin/worldserver" "$TEST_DIR/etc/worldserver.conf" "always" "none" "0" "--user" "" "$run_engine_config"
[ -f "$run_engine_config" ]
[ -f "$service_conf" ]
grep -Fq 'export SESSION_MANAGER="none"' "$run_engine_config"
grep -Fq 'export BINPATH="'$TEST_DIR'/bin"' "$run_engine_config"
grep -Fq "RUN_ENGINE_CONFIG_FILE=\"$run_engine_config\"" "$service_conf"
grep -Fq 'RESTART_POLICY="always"' "$service_conf"
}
@test "service-manager: wait-uptime times out for unknown service" {
command -v jq >/dev/null 2>&1 || skip "jq not installed"
export AC_SERVICE_CONFIG_DIR="$TEST_DIR/services"
@ -279,6 +328,136 @@ EOF
[[ "$output" =~ "Configuration file not found" ]]
}
# ===== PATH PORTABILITY TESTS =====
@test "service-manager: path conversion functions work correctly" {
# Source the service-manager script to access helper functions
source "$SCRIPT_DIR/service-manager.sh"
# Test make_path_relative without AC_SERVICE_CONFIG_DIR
unset AC_SERVICE_CONFIG_DIR
result=$(make_path_relative "/absolute/path/test")
[[ "$result" == "/absolute/path/test" ]]
# Test make_path_relative with AC_SERVICE_CONFIG_DIR
export AC_SERVICE_CONFIG_DIR="/tmp/test-config"
mkdir -p "$AC_SERVICE_CONFIG_DIR/subdir"
result=$(make_path_relative "$AC_SERVICE_CONFIG_DIR/subdir/binary")
[[ "$result" == "subdir/binary" ]]
result=$(make_path_relative "/opt/bin/authserver")
[[ "$result" == "../../opt/bin/authserver" ]]
# Test make_path_absolute
result=$(make_path_absolute "subdir/binary")
[[ "$result" == "$AC_SERVICE_CONFIG_DIR/subdir/binary" ]]
result=$(make_path_absolute "../../opt/bin/authserver")
[[ "$result" == "/opt/bin/authserver" ]]
# Test absolute path stays absolute
result=$(make_path_absolute "/absolute/path")
[[ "$result" == "/absolute/path" ]]
# Cleanup
rm -rf "$AC_SERVICE_CONFIG_DIR"
unset AC_SERVICE_CONFIG_DIR
}
@test "service-manager: registry stores relative paths when possible" {
# Set up test environment
export AC_SERVICE_CONFIG_DIR="$TEST_DIR/service-config"
mkdir -p "$AC_SERVICE_CONFIG_DIR"
# Create a temporary service registry in our test directory
local test_registry="$AC_SERVICE_CONFIG_DIR/test_registry.json"
echo "[]" > "$test_registry"
# Source the service-manager and override REGISTRY_FILE
source "$SCRIPT_DIR/service-manager.sh"
REGISTRY_FILE="$test_registry"
# Create test binary directory under config dir
mkdir -p "$AC_SERVICE_CONFIG_DIR/bin"
# Test that paths under AC_SERVICE_CONFIG_DIR are stored as relative
add_service_to_registry "test-service" "pm2" "auth" "$AC_SERVICE_CONFIG_DIR/bin/authserver" "--config test.conf" "" "always" "none" "0" "" "$AC_SERVICE_CONFIG_DIR/etc/test.conf"
# Check that paths were stored as relative
local stored_bin_path=$(jq -r '.[0].bin_path' "$test_registry")
local stored_config_path=$(jq -r '.[0].server_config' "$test_registry")
[[ "$stored_bin_path" == "bin/authserver" ]]
[[ "$stored_config_path" == "etc/test.conf" ]]
# Test that absolute paths outside config dir are stored as absolute
add_service_to_registry "test-service2" "pm2" "auth" "/opt/azerothcore/bin/authserver" "--config test.conf" "" "always" "none" "0" "" "/opt/azerothcore/etc/test.conf"
local stored_bin_path2=$(jq -r '.[1].bin_path' "$test_registry")
local stored_config_path2=$(jq -r '.[1].server_config' "$test_registry")
local expected_bin_rel=$(make_path_relative "/opt/azerothcore/bin/authserver")
local expected_cfg_rel=$(make_path_relative "/opt/azerothcore/etc/test.conf")
[[ "$stored_bin_path2" == "$expected_bin_rel" ]]
[[ "$stored_config_path2" == "$expected_cfg_rel" ]]
# Cleanup
rm -rf "$AC_SERVICE_CONFIG_DIR"
unset AC_SERVICE_CONFIG_DIR
}
@test "service-manager: restore --sync-only recreates config files" {
command -v jq >/dev/null 2>&1 || skip "jq not installed"
export AC_SERVICE_CONFIG_DIR="$TEST_DIR/services"
mkdir -p "$AC_SERVICE_CONFIG_DIR"
cat > "$AC_SERVICE_CONFIG_DIR/service_registry.json" <<'EOF'
[
{
"name": "sync-test",
"provider": "pm2",
"type": "auth",
"bin_path": "bin/authserver",
"exec": {
"command": "../src/run-engine",
"args": [
"start",
"bin/authserver",
"--config",
"sync-test-run-engine.conf"
]
},
"args": "",
"created": "2025-10-12T20:00:54+02:00",
"status": "active",
"systemd_type": "--user",
"restart_policy": "always",
"session_manager": "none",
"gdb_enabled": "0",
"pm2_opts": " ",
"server_config": "etc/authserver.conf"
}
]
EOF
rm -f "$AC_SERVICE_CONFIG_DIR/sync-test.conf" "$AC_SERVICE_CONFIG_DIR/sync-test-run-engine.conf"
mkdir -p "$AC_SERVICE_CONFIG_DIR/bin" "$AC_SERVICE_CONFIG_DIR/etc"
touch "$AC_SERVICE_CONFIG_DIR/bin/authserver"
touch "$AC_SERVICE_CONFIG_DIR/etc/authserver.conf"
run "$SCRIPT_DIR/service-manager.sh" restore --sync-only
debug_on_failure
[ "$status" -eq 0 ]
[ -f "$AC_SERVICE_CONFIG_DIR/sync-test.conf" ]
[ -f "$AC_SERVICE_CONFIG_DIR/sync-test-run-engine.conf" ]
grep -Fq "RUN_ENGINE_CONFIG_FILE=\"$AC_SERVICE_CONFIG_DIR/sync-test-run-engine.conf\"" "$AC_SERVICE_CONFIG_DIR/sync-test.conf"
grep -Fq "export BINPATH=\"$AC_SERVICE_CONFIG_DIR/bin\"" "$AC_SERVICE_CONFIG_DIR/sync-test-run-engine.conf"
}
@test "examples: restarter-auth should show configuration error" {
run "$SCRIPT_DIR/examples/restarter-auth.sh"
[[ "$output" =~ "Configuration file not found" ]]

View File

@ -6,7 +6,9 @@ This is the centralized test framework for all AzerothCore bash scripts. It prov
```
apps/test-framework/
├── run-tests.sh # Universal test runner (single entry point)
├── test-main.sh # Unified test framework entry point
├── run-bash-tests.sh # Bash test runner for BATS tests
├── run-core-tests.sh # AzerothCore unit test runner
├── README.md # This documentation
├── bats_libs/ # Custom BATS libraries
│ ├── acore-support.bash # Test setup and helpers
@ -17,38 +19,74 @@ apps/test-framework/
## Quick Start
### Using acore.sh (Recommended):
```bash
# Run the unified test framework (interactive menu)
./acore.sh test
# Run bash tests directly
./acore.sh test bash --all
# Run AzerothCore unit tests
./acore.sh test core
```
### From any module directory:
```bash
# Run tests for current module
../test-framework/run-tests.sh --dir .
../test-framework/run-bash-tests.sh --dir .
```
### From test-framework directory:
```bash
# Run all tests in all modules
./run-tests.sh --all
./run-bash-tests.sh --all
# Run tests for specific module
./run-tests.sh startup-scripts
./run-bash-tests.sh startup-scripts
# List available modules
./run-tests.sh --list
./run-bash-tests.sh --list
# Run tests with debug info
./run-tests.sh --all --debug
./run-bash-tests.sh --all --debug
```
### From project root:
```bash
# Run all tests
apps/test-framework/run-tests.sh --all
apps/test-framework/run-bash-tests.sh --all
# Run specific module
apps/test-framework/run-tests.sh startup-scripts
apps/test-framework/run-bash-tests.sh startup-scripts
# Run with verbose output
apps/test-framework/run-tests.sh startup-scripts --verbose
apps/test-framework/run-bash-tests.sh startup-scripts --verbose
```
## Test Types
The framework now supports two types of tests:
1. **Bash Tests** - BATS-based tests for bash scripts and functionality
2. **Core Tests** - AzerothCore C++ unit tests
### Unified Test Framework
The test framework provides a unified entry point through `test-main.sh` which presents an interactive menu:
- **bash**: Run BATS-based bash script tests
- **core**: Run AzerothCore C++ unit tests
- **quit**: Exit the test framework
```bash
# Interactive test menu
./acore.sh test
# Direct test execution
./acore.sh test bash --all # Run all bash tests
./acore.sh test core # Run core unit tests
```
## Usage
@ -57,35 +95,35 @@ apps/test-framework/run-tests.sh startup-scripts --verbose
```bash
# Run all tests
./run-tests.sh --all
./run-bash-tests.sh --all
# Run tests for specific module
./run-tests.sh startup-scripts
./run-bash-tests.sh startup-scripts
# Run tests matching pattern
./run-tests.sh --filter starter
./run-bash-tests.sh --filter starter
# Run tests in specific directory
./run-tests.sh --dir apps/docker
./run-bash-tests.sh --dir apps/docker
# Show available modules
./run-tests.sh --list
./run-bash-tests.sh --list
# Show test count
./run-tests.sh --count
./run-bash-tests.sh --count
```
### Output Formats
```bash
# Pretty output (default)
./run-tests.sh --pretty
./run-bash-tests.sh --pretty
# TAP output for CI/CD
./run-tests.sh --tap
./run-bash-tests.sh --tap
# Verbose output with debug info
./run-tests.sh --verbose --debug
./run-bash-tests.sh --verbose --debug
```
## Writing Tests
@ -205,17 +243,17 @@ debug_on_failure
From your module directory:
```bash
../test-framework/run-tests.sh --dir .
../test-framework/run-bash-tests.sh --dir .
```
From the test framework:
```bash
./run-tests.sh my-module
./run-bash-tests.sh my-module
```
From project root:
```bash
apps/test-framework/run-tests.sh my-module
apps/test-framework/run-bash-tests.sh my-module
```
## CI/CD Integration
@ -223,37 +261,73 @@ apps/test-framework/run-tests.sh my-module
For continuous integration, use TAP output:
```bash
# In your CI script
# Recommended: Use acore.sh integration
./acore.sh test bash --tap --all > test-results.tap
# Direct script usage
cd apps/test-framework
./run-tests.sh --all --tap > test-results.tap
./run-bash-tests.sh --all --tap > test-results.tap
# Or from project root
apps/test-framework/run-tests.sh --all --tap > test-results.tap
apps/test-framework/run-bash-tests.sh --all --tap > test-results.tap
# Run core unit tests in CI
./acore.sh test core
```
## Core Tests
The framework now includes support for AzerothCore's C++ unit tests through `run-core-tests.sh`:
```bash
# Run core unit tests
./acore.sh test core
# Direct script usage
apps/test-framework/run-core-tests.sh
```
**Prerequisites for Core Tests:**
- Project must be built with unit tests enabled (`CBUILD_TESTING="ON"` inside `conf/config.sh` that works with the acore.sh compiler)
- Unit test binary should be available at `$BUILDPATH/src/test/unit_tests`
The core test runner will:
1. Check if the unit test binary exists
2. Execute the AzerothCore unit tests
3. Return appropriate exit codes for CI/CD integration
## Available Commands
All functionality is available through the single `run-tests.sh` script:
### Unified Test Framework Commands
Recommended usage through `acore.sh`:
- `./acore.sh test` - Interactive test framework menu
- `./acore.sh test bash [options]` - Run bash tests with options
- `./acore.sh test core` - Run AzerothCore unit tests
### Bash Test Commands
All bash test functionality is available through the `run-bash-tests.sh` script:
### Basic Test Execution
- `./run-tests.sh --all` - Run all tests in all modules
- `./run-tests.sh <module>` - Run tests for specific module
- `./run-tests.sh --dir <path>` - Run tests in specific directory
- `./run-tests.sh --list` - List available modules
- `./run-tests.sh --count` - Show test count
- `./run-bash-tests.sh --all` - Run all tests in all modules
- `./run-bash-tests.sh <module>` - Run tests for specific module
- `./run-bash-tests.sh --dir <path>` - Run tests in specific directory
- `./run-bash-tests.sh --list` - List available modules
- `./run-bash-tests.sh --count` - Show test count
### Output Control
- `./run-tests.sh --verbose` - Verbose output with debug info
- `./run-tests.sh --tap` - TAP output for CI/CD
- `./run-tests.sh --debug` - Debug mode with failure details
- `./run-tests.sh --pretty` - Pretty output (default)
- `./run-bash-tests.sh --verbose` - Verbose output with debug info
- `./run-bash-tests.sh --tap` - TAP output for CI/CD
- `./run-bash-tests.sh --debug` - Debug mode with failure details
- `./run-bash-tests.sh --pretty` - Pretty output (default)
### Test Filtering
- `./run-tests.sh --filter <pattern>` - Run tests matching pattern
- `./run-tests.sh <module> --filter <pattern>` - Filter within module
- `./run-bash-tests.sh --filter <pattern>` - Run tests matching pattern
- `./run-bash-tests.sh <module> --filter <pattern>` - Filter within module
### Utility Functions
- `./run-tests.sh --help` - Show help message
- `./run-bash-tests.sh --help` - Show help message
- Install BATS: Use your system package manager (`apt install bats`, `brew install bats-core`, etc.)
@ -264,35 +338,42 @@ All functionality is available through the single `run-tests.sh` script:
### Running Specific Tests
```bash
# Run only starter-related tests
./run-tests.sh --filter starter
./run-bash-tests.sh --filter starter
# Run only tests in startup-scripts module
./run-tests.sh startup-scripts
./run-bash-tests.sh startup-scripts
# Run all tests with verbose output
./run-tests.sh --all --verbose
./run-bash-tests.sh --all --verbose
# Run tests in specific directory with debug
./run-tests.sh --dir apps/docker --debug
./run-bash-tests.sh --dir apps/docker --debug
```
### Development Workflow
```bash
# Recommended: Use acore.sh for unified testing
./acore.sh test # Interactive menu
./acore.sh test bash --all # All bash tests
./acore.sh test core # Core unit tests
# While developing, run tests frequently from module directory
cd apps/my-module
../test-framework/run-tests.sh --dir .
../test-framework/run-bash-tests.sh --dir .
# Debug failing tests
../test-framework/run-tests.sh --dir . --debug --verbose
../test-framework/run-bash-tests.sh --dir . --debug --verbose
# Run specific test pattern
../test-framework/run-tests.sh --dir . --filter my-feature
../test-framework/run-bash-tests.sh --dir . --filter my-feature
# From project root - run all tests
apps/test-framework/run-tests.sh --all
./acore.sh test bash --all # Recommended
apps/test-framework/run-bash-tests.sh --all # Direct
# Quick test count check
apps/test-framework/run-tests.sh --count
./acore.sh test bash --count # Recommended
apps/test-framework/run-bash-tests.sh --count # Direct
```
## Benefits

View File

@ -0,0 +1,20 @@
#!/usr/bin/env bash
# shellcheck source-path=SCRIPTDIR
CURRENT_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# Clean up gcda files to avoid false positives in coverage reports
find var/build/obj -name '*.gcda' -delete
# shellcheck source=../bash_shared/includes.sh
source "$CURRENT_PATH/../bash_shared/includes.sh"
TEST_PATH="$BUILDPATH/src/test/unit_tests"
if [[ ! -f "$TEST_PATH" ]]; then
echo "Unit test binary not found at $TEST_PATH"
echo "Please ensure the project is built with unit tests enabled."
exit 1
fi
exec "$TEST_PATH" "$@"

View File

@ -0,0 +1,45 @@
#!/usr/bin/env bash
# shellcheck source-path=SCRIPTDIR
CURRENT_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# shellcheck source=../bash_shared/includes.sh
source "$CURRENT_PATH/../bash_shared/includes.sh"
# shellcheck source=../bash_shared/menu_system.sh
source "$AC_PATH_APPS/bash_shared/menu_system.sh"
# Menu: single ordered source of truth (no functions in strings)
# Format: "key|short|description"
menu_items=(
"bash|b|Run Bash tests"
"core|c|Run AzerothCore tests"
"quit|q|Exit from this menu"
)
# Menu command handler - called by menu system for each command
function handle_menu_command() {
local key="$1"
shift
case "$key" in
"bash")
bash "$CURRENT_PATH/run-bash-tests.sh" "${@:-"--all"}"
;;
"core")
# shellcheck source=./run-core-tests.sh
bash "$CURRENT_PATH/run-core-tests.sh" "$@"
;;
"quit")
echo "Goodbye!"
exit
;;
*)
echo "Invalid option. Use --help to see available commands."
return 1
;;
esac
}
# Run the menu system
menu_run_with_items "TEST FRAMEWORK" handle_menu_command -- "${menu_items[@]}" -- "$@"

9
conf/dist/config.sh vendored
View File

@ -108,6 +108,15 @@ CCUSTOMOPTIONS=${CCUSTOMOPTIONS:-''}
AC_CCACHE=${AC_CCACHE:-false}
export CCACHE_DIR=${CCACHE_DIR:-"$AC_PATH_VAR/ccache"}
#
# Enable running the cmake install as root
# Installing as root allows to set the SUID bit on
# the worldserver binary. This is required if you want
# to bind the worldserver to reserved ports
# Default: 0 (false)
#
export AC_ENABLE_ROOT_CMAKE_INSTALL=${AC_ENABLE_ROOT_CMAKE_INSTALL:-0}
##############################################
#
# GOOGLE PERF TOOLS

View File

@ -0,0 +1,4 @@
-- DB update 2025_09_26_00 -> 2025_09_26_01
-- Remove Phase Mask 1 and add Phasemask 2.
UPDATE `creature` SET `phaseMask` = `phaseMask` &~1 | 2 WHERE `id1` = 28529 AND `guid` IN (128641,128697);

View File

@ -0,0 +1,3 @@
-- DB update 2025_09_26_01 -> 2025_09_27_00
--
UPDATE `quest_template_addon` SET `PrevQuestID` = 12863 WHERE (`ID` = 12865);

View File

@ -0,0 +1,3 @@
-- DB update 2025_09_27_00 -> 2025_09_27_01
--
UPDATE `quest_template_addon` SET `PrevQuestID` = 12917 WHERE (`ID` = 12920);

View File

@ -0,0 +1,3 @@
-- DB update 2025_09_27_01 -> 2025_09_27_02
--
UPDATE `quest_template_addon` SET `PrevQuestID` = 12854 WHERE (`ID` = 12855);

View File

@ -0,0 +1,60 @@
-- DB update 2025_09_27_02 -> 2025_09_27_03
--
-- Fjorlin Frostbrow SAI
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 29732);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(29732, 0, 0, 1, 62, 0, 100, 0, 9891, 0, 0, 0, 0, 0, 11, 56411, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Fjorlin Frostbrow - On Gossip Option 0 Selected - Cast \'Forcecast Summon Scripted Eagle\''),
(29732, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Fjorlin Frostbrow - On Gossip Option 0 Selected - Close Gossip'),
(29732, 0, 2, 3, 62, 0, 100, 0, 9891, 1, 0, 0, 0, 0, 11, 57049, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Fjorlin Frostbrow - On Gossip Option 1 Selected - Self Cast \'Forcecast Summon Battle Eagle\''),
(29732, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Fjorlin Frostbrow - On Gossip Option 1 Selected - Close Gossip');
DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 15) AND (`SourceGroup` = 9891) AND (`SourceEntry` = 0) AND (`SourceId` = 0) AND (`ElseGroup` = 0) AND (`ConditionTypeOrReference` IN (8, 9)) AND (`ConditionTarget` = 0) AND (`ConditionValue2` = 0) AND (`ConditionValue3` = 0);
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
(15, 9891, 0, 0, 0, 9, 0, 12874, 0, 0, 0, 0, 0, '', 'Show Frostborn gossip only when on quest \'Fervor of the Frostborn\' 12874');
-- 29736 Stormcrest Eagle (Scripted)
UPDATE `creature_template` SET `vehicleId`=196 WHERE `entry`=29736;
DELETE FROM `vehicle_template_accessory` WHERE `entry`=29736 AND `accessory_entry` IN (30401);
INSERT INTO `vehicle_template_accessory` (`entry`,`accessory_entry`,`seat_id`,`minion`,`description`,`summontype`,`summontimer`) VALUES
(29736, 30401, 0, 1, 'Stormcrest Eagle (Scripted)', 8, 0);
DELETE FROM `creature_template_spell` WHERE (`CreatureID` = 29736);
DELETE FROM `npc_spellclick_spells` WHERE `npc_entry`=29736;
INSERT INTO `npc_spellclick_spells` (`npc_entry`, `spell_id`, `cast_flags`, `user_type`) VALUES
(29736, 46598, 1, 0);
DELETE FROM `creature_template_addon` WHERE `entry`=29736;
INSERT INTO `creature_template_addon` (`entry`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `auras`) VALUES
(29736, 0, 0, 0, 1, 0, '52211');
DELETE FROM `spell_target_position` WHERE `id`=55942;
INSERT INTO `spell_target_position` (`ID`, `EffectIndex`, `MapID`, `PositionX`, `PositionY`, `PositionZ`, `Orientation`, `VerifiedBuild`) VALUES
(55942, 0, 571, 6610.838379, -280.558685, 984.428772, 3.598404, 0);
DELETE FROM `waypoints` WHERE `entry`=29736 AND `pointid`=37;
INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES
(29736, 37, 8405.069, -2071.5032, 1498.8086, 'Stormcrest eagle, Fervor of the Frostborn');
-- Updated comments with Keira. Added eject and despawn
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 29736);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(29736, 0, 0, 0, 60, 0, 100, 513, 1000, 1000, 0, 0, 0, 0, 53, 1, 29736, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Stormcrest Eagle - On Update - Start Waypoint Path 29736 (No Repeat)'),
(29736, 0, 1, 0, 27, 0, 100, 512, 0, 0, 0, 0, 0, 0, 81, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Stormcrest Eagle - On Passenger Boarded - Set Npc Flag '),
(29736, 0, 2, 0, 40, 0, 100, 512, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 19, 30401, 20, 0, 0, 0, 0, 0, 0, 'Stormcrest Eagle - On Point 3 of Path Any Reached - Say Line 0'),
(29736, 0, 3, 0, 40, 0, 100, 512, 7, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 19, 30401, 20, 0, 0, 0, 0, 0, 0, 'Stormcrest Eagle - On Point 7 of Path Any Reached - Say Line 1'),
(29736, 0, 4, 0, 40, 0, 100, 512, 10, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 19, 30401, 20, 0, 0, 0, 0, 0, 0, 'Stormcrest Eagle - On Point 10 of Path Any Reached - Say Line 2'),
(29736, 0, 5, 0, 40, 0, 100, 512, 13, 0, 0, 0, 0, 0, 1, 3, 0, 0, 0, 0, 0, 19, 30401, 20, 0, 0, 0, 0, 0, 0, 'Stormcrest Eagle - On Point 13 of Path Any Reached - Say Line 3'),
(29736, 0, 6, 0, 40, 0, 100, 512, 15, 0, 0, 0, 0, 0, 1, 4, 0, 0, 0, 0, 0, 19, 30401, 20, 0, 0, 0, 0, 0, 0, 'Stormcrest Eagle - On Point 15 of Path Any Reached - Say Line 4'),
(29736, 0, 7, 0, 40, 0, 100, 512, 17, 0, 0, 0, 0, 0, 1, 5, 0, 0, 0, 0, 0, 19, 30401, 20, 0, 0, 0, 0, 0, 0, 'Stormcrest Eagle - On Point 17 of Path Any Reached - Say Line 5'),
(29736, 0, 8, 0, 40, 0, 100, 512, 19, 0, 0, 0, 0, 0, 1, 6, 0, 0, 0, 0, 0, 19, 30401, 20, 0, 0, 0, 0, 0, 0, 'Stormcrest Eagle - On Point 19 of Path Any Reached - Say Line 6'),
(29736, 0, 9, 0, 40, 0, 100, 512, 22, 0, 0, 0, 0, 0, 1, 7, 0, 0, 0, 0, 0, 19, 30401, 20, 0, 0, 0, 0, 0, 0, 'Stormcrest Eagle - On Point 22 of Path Any Reached - Say Line 7'),
(29736, 0, 10, 0, 40, 0, 100, 512, 24, 0, 0, 0, 0, 0, 1, 8, 0, 0, 0, 0, 0, 19, 30401, 20, 0, 0, 0, 0, 0, 0, 'Stormcrest Eagle - On Point 24 of Path Any Reached - Say Line 8'),
(29736, 0, 11, 0, 40, 0, 100, 512, 28, 0, 0, 0, 0, 0, 1, 9, 0, 0, 0, 0, 0, 19, 30401, 20, 0, 0, 0, 0, 0, 0, 'Stormcrest Eagle - On Point 28 of Path Any Reached - Say Line 9'),
(29736, 0, 12, 0, 40, 0, 100, 512, 30, 0, 0, 0, 0, 0, 1, 10, 0, 0, 0, 0, 0, 19, 30401, 20, 0, 0, 0, 0, 0, 0, 'Stormcrest Eagle - On Point 30 of Path Any Reached - Say Line 10'),
(29736, 0, 13, 0, 40, 0, 100, 512, 32, 0, 0, 0, 0, 0, 1, 11, 0, 0, 0, 0, 0, 19, 30401, 20, 0, 0, 0, 0, 0, 0, 'Stormcrest Eagle - On Point 32 of Path Any Reached - Say Line 11'),
(29736, 0, 14, 0, 40, 0, 100, 512, 34, 0, 0, 0, 0, 0, 1, 12, 0, 0, 0, 0, 0, 19, 30401, 20, 0, 0, 0, 0, 0, 0, 'Stormcrest Eagle - On Point 34 of Path Any Reached - Say Line 12'),
(29736, 0, 15, 16, 40, 0, 100, 512, 36, 0, 0, 0, 0, 0, 1, 13, 0, 0, 0, 0, 0, 19, 30401, 20, 0, 0, 0, 0, 0, 0, 'Stormcrest Eagle - On Point 36 of Path Any Reached - Say Line 13'),
(29736, 0, 16, 0, 61, 0, 100, 512, 0, 0, 0, 0, 0, 0, 11, 62539, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Stormcrest Eagle - On Point 36 of Path Any Reached - Cast \'Eject Passenger 2\''),
(29736, 0, 17, 0, 40, 0, 100, 512, 37, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Stormcrest Eagle - On Point 37 of Path Any Reached - Despawn Instant');

View File

@ -0,0 +1,10 @@
-- DB update 2025_09_27_03 -> 2025_09_28_00
--
DELETE FROM `areatrigger_scripts` WHERE `entry` = 4991;
INSERT INTO `areatrigger_scripts` (`entry`, `ScriptName`) VALUES (4991, 'SmartTrigger');
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 4991) AND (`source_type` = 2) AND (`id` IN (0));
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(4991, 2, 0, 0, 46, 0, 100, 0, 4991, 0, 0, 0, 0, 0, 223, 1, 0, 0, 0, 0, 0, 205, 2, 1, 0, 0, 0, 0, 0, 0, 'Areatrigger - On Trigger - Do Action ID 1');
UPDATE `creature_template` SET `unit_flags` = `unit_flags`|64|256, `flags_extra` = `flags_extra`|2147483648 WHERE `entry` IN (26693, 30807);

View File

@ -0,0 +1,6 @@
-- DB update 2025_09_28_00 -> 2025_09_28_01
--
DELETE FROM `spell_cooldown_overrides` WHERE `Id` IN (56570, 56585);
INSERT INTO `spell_cooldown_overrides` (`Id`, `RecoveryTime`, `CategoryRecoveryTime`, `StartRecoveryTime`, `StartRecoveryCategory`, `Comment`) VALUES
(56570, 200, 200, 0, 0, 'Jotunheim Rapid-Fire Harpoon: Rapid-Fire Harpoon'),
(56585, 30000, 30000, 0, 0, 'Jotunheim Rapid-Fire Harpoon: Energy Reserve');

View File

@ -0,0 +1,19 @@
-- DB update 2025_09_28_01 -> 2025_09_29_00
-- Update SmartAI (Bleeding Hollow Necrolyte and Tunneler)
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE (`entry` IN (16968, 19422));
DELETE FROM `smart_scripts` WHERE (`source_type` = 0) AND (`entryorguid` IN (16968, 19422));
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(19422, 0, 0, 0, 0, 0, 100, 0, 0, 0, 2400, 3800, 0, 0, 11, 9053, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Bleeding Hollow Necrolyte - In Combat - Cast \'Fireball\''),
(19422, 0, 1, 0, 0, 0, 100, 0, 8000, 12000, 30000, 45000, 0, 0, 11, 34073, 33, 0, 0, 0, 0, 5, 0, 0, 0, 34073, 0, 0, 0, 0, 'Bleeding Hollow Necrolyte - In Combat - Cast \'Curse of the Bleeding Hollow\''),
(19422, 0, 2, 0, 2, 0, 100, 512, 0, 15, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Bleeding Hollow Necrolyte - Between 0-15% Health - Flee For Assist'),
(19422, 0, 3, 0, 5, 0, 100, 1, 0, 0, 0, 0, 0, 0, 11, 34019, 1, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Bleeding Hollow Necrolyte - On Killed Unit - Cast \'Raise Dead\' (No Repeat)'),
(16968, 0, 0, 1, 25, 0, 100, 512, 0, 0, 0, 0, 0, 0, 18, 33554432, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Tunneler - On Reset - Set Flags Not Selectable'),
(16968, 0, 1, 2, 61, 0, 100, 512, 0, 0, 0, 0, 0, 0, 11, 29147, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Tunneler - On Reset - Cast \'Tunnel Bore Passive\''),
(16968, 0, 2, 0, 61, 0, 100, 512, 0, 0, 0, 0, 0, 0, 90, 9, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Tunneler - On Reset - Set Flag Standstate Submerged'),
(16968, 0, 3, 4, 4, 0, 100, 512, 0, 0, 0, 0, 0, 0, 19, 33554432, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Tunneler - On Aggro - Remove Flags Not Selectable'),
(16968, 0, 4, 5, 61, 0, 100, 512, 0, 0, 0, 0, 0, 0, 28, 29147, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Tunneler - On Aggro - Remove Aura \'Tunnel Bore Passive\''),
(16968, 0, 5, 0, 61, 0, 100, 513, 0, 0, 0, 0, 0, 0, 91, 9, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Tunneler - On Aggro - Remove FlagStandstate Submerged'),
(16968, 0, 6, 0, 0, 0, 100, 0, 1000, 6000, 8000, 11000, 0, 0, 11, 32738, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Tunneler - In Combat - Cast \'Bore\''),
(16968, 0, 7, 0, 9, 0, 100, 0, 0, 0, 2000, 3500, 4, 50, 11, 31747, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Tunneler - Within 4-50 Range - Cast \'Poison\'');

View File

@ -0,0 +1,6 @@
-- DB update 2025_09_29_00 -> 2025_09_30_00
DELETE FROM `creature_formations` WHERE (`leaderGUID` = 127046);
INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`, `point_1`, `point_2`) VALUES
(127046, 127046, 0, 0, 1, 0, 0),
(127046, 127080, 0, 0, 1, 0, 0),
(127046, 127081, 0, 0, 1, 0, 0);

View File

@ -0,0 +1,4 @@
-- DB update 2025_09_30_00 -> 2025_09_30_01
-- Drakkari Colossus - Mortal Strike spell difficulty
DELETE FROM `spelldifficulty_dbc` WHERE `ID` = 54715;
INSERT INTO `spelldifficulty_dbc` (`ID`, `DifficultySpellID_1`, `DifficultySpellID_2`, `DifficultySpellID_3`, `DifficultySpellID_4`) VALUES (54715, 54715, 59454, 0, 0);

View File

@ -0,0 +1,3 @@
-- DB update 2025_09_30_01 -> 2025_09_30_02
--
UPDATE `creature_template` SET `type` = 8 WHERE `entry` = 8881;

View File

@ -0,0 +1,6 @@
-- DB update 2025_09_30_02 -> 2025_10_01_00
-- Update gameobject '186957' with sniffed values
-- updated spawns
DELETE FROM `gameobject` WHERE (`id` IN (186957)) AND (`guid` IN (65654));
INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `ScriptName`, `VerifiedBuild`, `Comment`) VALUES
(65654, 186957, 571, 0, 0, 1, 1, 514.50347900390625, -5936.9287109375, 313.857574462890625, 3.141527414321899414, -0.02631568908691406, 0.036975860595703125, 0.998969078063964843, 0.001006617560051381, 120, 255, 0, "", 48632, NULL);

View File

@ -0,0 +1,2 @@
-- DB update 2025_10_01_00 -> 2025_10_01_01
UPDATE `gameobject` SET `position_x` = 5716.26, `position_y` = -4369.34, `position_z` = 385.885 WHERE `guid` = 99747 AND `id` = 190739;

View File

@ -0,0 +1,3 @@
-- DB update 2025_10_01_01 -> 2025_10_01_02
UPDATE `creature_template_model` SET `VerifiedBuild` = 51831 WHERE `CreatureID` IN (33666, 33669);
UPDATE `creature_template_model` SET `Probability` = 0 WHERE `CreatureID` = 33669 AND `CreatureDisplayID` = 27343;

View File

@ -0,0 +1,6 @@
-- DB update 2025_10_01_02 -> 2025_10_02_00
--
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 31157);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(31157, 0, 0, 0, 27, 0, 100, 512, 0, 0, 0, 0, 0, 0, 53, 0, 31157, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Skeletal Assault Gryphon - On Passenger Boarded - Start Waypoint Path 31157'),
(31157, 0, 1, 0, 40, 0, 100, 512, 35, 31157, 0, 0, 0, 0, 11, 50630, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Skeletal Assault Gryphon - On Point 35 of Path 31157 Reached - Cast \'Eject All Passengers\'');

View File

@ -0,0 +1,11 @@
-- DB update 2025_10_02_00 -> 2025_10_02_01
--
DELETE FROM `creature_template_spell` WHERE (`CreatureID` = 30108);
INSERT INTO `creature_template_spell` (`CreatureID`, `Index`, `Spell`, `VerifiedBuild`) VALUES
(30108, 0, 55936, 0),
(30108, 1, 55951, 0),
(30108, 2, 55958, 0);
DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 17) AND (`SourceGroup` = 0) AND (`SourceEntry` = 55951) AND (`SourceId` = 0) AND (`ElseGroup` = 0) AND (`ConditionTypeOrReference` = 31) AND (`ConditionTarget` = 1) AND (`ConditionValue1` = 3) AND (`ConditionValue2` = 29753) AND (`ConditionValue3` = 0);
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
(17, 0, 55951, 0, 0, 31, 1, 3, 29753, 0, 0, 0, 0, '', '');

View File

@ -0,0 +1,13 @@
-- DB update 2025_10_02_01 -> 2025_10_04_00
-- Update gameobject 'Big Rancid Meat' with sniffed values
-- updated spawns
DELETE FROM `gameobject` WHERE (`id` IN (177665)) AND (`guid` IN (45717));
INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `ScriptName`, `VerifiedBuild`, `Comment`) VALUES
(45717, 177665, 0, 0, 0, 1, 1, 1598.3446044921875, -3246.51708984375, 66.82944488525390625, 5.480334281921386718, 0, 0, -0.39073085784912109, 0.920504987239837646, 120, 255, 1, "", 46248, NULL);
-- new spawns
DELETE FROM `gameobject` WHERE (`id` IN (191789)) AND (`guid` IN (178, 179, 180));
INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `ScriptName`, `VerifiedBuild`, `Comment`) VALUES
(178, 191789, 571, 0, 0, 1, 1, 8322.1416015625, 2812.73779296875, 655.9156494140625, 2.042035102844238281, 0, 0, 0.852640151977539062, 0.522498607635498046, 120, 255, 1, "", 46368, NULL),
(179, 191789, 571, 0, 0, 1, 1, 8340.8603515625, 2739.64208984375, 655.246337890625, 4.97418975830078125, 0, 0, -0.60876083374023437, 0.793353796005249023, 120, 255, 1, "", 46368, NULL),
(180, 191789, 571, 0, 0, 1, 1, 8347.0751953125, 2816.0400390625, 655.16448974609375, 6.248279094696044921, 0, 0, -0.01745223999023437, 0.999847710132598876, 120, 255, 1, "", 46368, NULL);

View File

@ -0,0 +1,6 @@
-- DB update 2025_10_04_00 -> 2025_10_04_01
-- Update gameobject 'Stolen Pack' with sniffed values
-- new spawns
DELETE FROM `gameobject` WHERE (`id` IN (191726)) AND (`guid` IN (42));
INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `ScriptName`, `VerifiedBuild`, `Comment`) VALUES
(42, 191726, 571, 0, 0, 1, 1, 7312.4150390625, -1610.486572265625, 944.2940673828125, 4.991643905639648437, 0, 0, -0.60181427001953125, 0.798636078834533691, 120, 255, 1, "", 47720, NULL);

View File

@ -0,0 +1,45 @@
-- DB update 2025_10_04_01 -> 2025_10_04_02
--
SET @PATH := 29677;
DELETE FROM `script_waypoint` WHERE `entry`=@PATH;
INSERT INTO `script_waypoint` (`entry`, `pointid`, `location_x`, `location_y`, `location_z`, `waittime`) VALUES
(@PATH, 0, 7157.85, -749.79016, 891.31964, 0),
(@PATH, 1, 7164.398, -764.5809, 892.379, 0),
(@PATH, 2, 7173.0713, -777.02747, 899.1467, 0),
(@PATH, 3, 7182.944, -781.4821, 904.5898, 0),
(@PATH, 4, 7193.046, -787.17285, 910.80505, 0),
(@PATH, 5, 7205.2866, -793.2994, 917.2018, 0),
(@PATH, 6, 7218.268, -802.1098, 921.5436, 0),
(@PATH, 7, 7230.444, -816.3606, 924.7782, 0),
(@PATH, 8, 7232.167, -834.23175, 926.6067, 0),
(@PATH, 9, 7247.4736, -848.1854, 925.8038, 0),
(@PATH, 10, 7263.3325, -875.33746, 925.0643, 0),
(@PATH, 11, 7275.5557, -895.33954, 926.41693, 0),
(@PATH, 12, 7283.677, -922.1367, 922.6736, 0),
(@PATH, 13, 7284.9517, -947.7603, 918.92914, 0),
(@PATH, 14, 7294.8335, -985.7026, 915.495, 0),
(@PATH, 15, 7310.106, -1018.042, 913.71466, 0),
(@PATH, 16, 7321.158, -1040.3647, 912.26416, 0),
(@PATH, 17, 7341.2275, -1082.5309, 905.9852, 0),
(@PATH, 18, 7355.9634, -1127.9506, 907.5246, 0),
(@PATH, 19, 7359.7407, -1156.9366, 910.2179, 0),
(@PATH, 20, 7352.724, -1172.65, 912.25995, 0),
(@PATH, 21, 7340.049, -1188.0729, 914.70184, 0),
(@PATH, 22, 7330.8037, -1201.4724, 915.6217, 0),
(@PATH, 23, 7323.1274, -1228.3346, 909.4873, 0),
(@PATH, 24, 7316.8394, -1268.2141, 902.8047, 0),
(@PATH, 25, 7316.317, -1300.7645, 904.0472, 0),
(@PATH, 26, 7315.278, -1332.3418, 904.6077, 0),
(@PATH, 27, 7313.0195, -1366.2754, 907.04065, 0),
(@PATH, 28, 7312.0806, -1399.7428, 910.6963, 0),
(@PATH, 29, 7312.83, -1434.0999, 912.7638, 0),
(@PATH, 30, 7311.606, -1466.3434, 916.6626, 0),
(@PATH, 31, 7309.7144, -1498.7023, 921.09863, 0),
(@PATH, 32, 7306.8794, -1531.1903, 928.2958, 0),
(@PATH, 33, 7305.797, -1558.9252, 939.31244, 0),
(@PATH, 34, 7305.19, -1566.0189, 940.9037, 0);
-- set StandState to sitting
DELETE FROM `creature_template_addon` WHERE (`entry` = 29695);
INSERT INTO `creature_template_addon` (`entry`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `visibilityDistanceType`, `auras`) VALUES
(29695, 0, 0, 1, 0, 0, 0, '');

View File

@ -0,0 +1,28 @@
-- DB update 2025_10_04_02 -> 2025_10_04_03
-- Set MT and WD
UPDATE `creature` SET `wander_distance` = 0, `MovementType` = 0 WHERE (`id1` = 27482) AND (`guid` IN (104181));
-- Set byte1 (Kneel)
UPDATE `creature_addon` SET `bytes1` = 8 WHERE (`guid` IN (104181, 104184));
-- Update SmartAI
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 27482;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 27482);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(27482, 0, 0, 0, 25, 0, 100, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Wounded Westfall Infantry - On Reset - Set Reactstate Passive'),
(27482, 0, 1, 0, 4, 0, 100, 0, 0, 0, 0, 0, 0, 0, 8, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Wounded Westfall Infantry - On Aggro - Set Reactstate Aggressive'),
(27482, 0, 2, 0, 0, 0, 100, 0, 2000, 4000, 8000, 12000, 0, 0, 11, 32771, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Wounded Westfall Infantry - In Combat - Cast \'Holy Shock\''),
(27482, 0, 3, 0, 0, 0, 100, 0, 3000, 6000, 32000, 36000, 0, 0, 11, 29385, 32, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Wounded Westfall Infantry - In Combat - Cast \'Seal of Command\''),
(27482, 0, 4, 0, 8, 0, 100, 512, 48845, 0, 0, 0, 0, 0, 80, 2748200, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Wounded Westfall Infantry - On Spellhit \'Renew Infantry\' - Run Script');
-- Set Action List
DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 2748200);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(2748200, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 48813, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Wounded Westfall Infantry - Actionlist - Cast \'Kill Credit\''),
(2748200, 9, 1, 0, 0, 0, 100, 0, 500, 500, 0, 0, 0, 0, 91, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Wounded Westfall Infantry - Actionlist - Remove FlagStandstate Kneel'),
(2748200, 9, 2, 0, 0, 0, 100, 0, 2500, 2500, 0, 0, 0, 0, 66, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Wounded Westfall Infantry - Actionlist - Set Orientation Invoker'),
(2748200, 9, 3, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 0, 0, 5, 113, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Wounded Westfall Infantry - Actionlist - Play Emote 113'),
(2748200, 9, 4, 0, 0, 0, 100, 0, 100, 100, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Wounded Westfall Infantry - Actionlist - Say Line 0'),
(2748200, 9, 5, 0, 0, 0, 100, 0, 4000, 4000, 0, 0, 0, 0, 53, 1, 27482, 0, 0, 2000, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Wounded Westfall Infantry - Actionlist - Start Waypoint Path 27482');

View File

@ -0,0 +1,7 @@
-- DB update 2025_10_04_03 -> 2025_10_04_04
--
DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 13) AND (`SourceGroup` = 1) AND (`SourceEntry` = 50674);
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
(13, 1, 50674, 0, 0, 31, 0, 3, 25469, 0, 0, 0, 0, '', 'The Demoralizer only hits Mindless Aberration'),
(13, 1, 50674, 0, 1, 31, 0, 3, 25332, 0, 0, 0, 0, '', 'The Demoralizer only hits Stitched Warsong Horror'),
(13, 1, 50674, 0, 2, 31, 0, 3, 25333, 0, 0, 0, 0, '', 'The Demoralizer only hits Undying Aggressor');

View File

@ -0,0 +1,12 @@
-- DB update 2025_10_04_04 -> 2025_10_04_05
-- Update SmartAI (Horde Siege Tank and Barrels).
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE (`entry` IN (25334, 27064));
DELETE FROM `smart_scripts` WHERE (`source_type` = 0) AND (`entryorguid` IN (25334, 27064));
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(27064, 0, 0, 1, 103, 0, 100, 512, 0, 25334, 1, 2, 0, 0, 11, 47916, 2, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Abandoned Fuel Tank - On 1 or More Units in Range - Cast \'Fuel\''),
(27064, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 4000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Abandoned Fuel Tank - On 1 or More Units in Range - Despawn In 4000 ms'),
(27064, 0, 2, 0, 11, 0, 100, 512, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Abandoned Fuel Tank - On Respawn - Stop Attacking'),
(25334, 0, 0, 0, 8, 0, 100, 512, 47916, 0, 2000, 2000, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Horde Siege Tank - On Spellhit \'Fuel\' - Say Line 0'),
(25334, 0, 1, 0, 28, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 1000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Horde Siege Tank - On Passenger Removed - Despawn In 1000 ms');

View File

@ -0,0 +1,13 @@
-- DB update 2025_10_04_05 -> 2025_10_04_06
-- Update gameobject 'Doodad_Nox_portal_top01' with sniffed values
-- updated spawns
DELETE FROM `gameobject` WHERE (`id` IN (191542)) AND (`guid` IN (57145, 57146));
INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `ScriptName`, `VerifiedBuild`, `Comment`) VALUES
(57145, 191542, 571, 0, 0, 1, 1, 6175.19140625, -2017.2734375, 241.0088348388671875, 2.312558174133300781, 0, 0, 0.915310859680175781, 0.402748137712478637, 120, 255, 1, "", 48019, NULL),
(57146, 191542, 571, 0, 0, 1, 1, 5171.69140625, -1666.64453125, 242.7811279296875, 2.888511419296264648, 0, 0, 0.99200439453125, 0.126203224062919616, 120, 255, 1, "", 46368, NULL);
-- new spawns
DELETE FROM `gameobject` WHERE (`id` IN (191542, 192613)) AND (`guid` IN (149, 150));
INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `ScriptName`, `VerifiedBuild`, `Comment`) VALUES
(149, 191542, 571, 0, 0, 1, 1, 2418.4443359375, 6456.0224609375, 50.21396255493164062, 1.608663797378540039, 0, 0, 0.720367431640625, 0.693592667579650878, 120, 255, 1, "", 45772, NULL),
(150, 192613, 571, 0, 0, 1, 1, 3669.799072265625, -1269.822021484375, 251.2554931640625, 2.404482841491699218, 0, 0, 0.932848930358886718, 0.360267788171768188, 120, 255, 1, "", 45854, NULL);

View File

@ -0,0 +1,9 @@
-- DB update 2025_10_04_06 -> 2025_10_06_00
--
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = -127203);
DELETE FROM `creature_formations` WHERE `leaderGUID` = 127203;
INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`, `point_1`, `point_2`) VALUES
(127203, 127203, 0, 0, 3, 0, 0),
(127203, 127201, 0, 0, 3, 0, 0),
(127203, 127202, 0, 0, 3, 0, 0);

View File

@ -0,0 +1,4 @@
-- DB update 2025_10_06_00 -> 2025_10_07_00
-- Remove Disarm Immunity
UPDATE `creature_template` SET `mechanic_immune_mask` = `mechanic_immune_mask` &~ 4 WHERE (`entry` IN (31368, 29306));

View File

@ -0,0 +1,17 @@
-- DB update 2025_10_07_00 -> 2025_10_07_01
--
UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = 25084;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 25084);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(25084, 0, 0, 1, 8, 0, 100, 1, 45109, 0, 0, 0, 0, 0, 11, 45110, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Greengill Slave - On Spellhit \'Orb of Murloc Control\' - Cast \'Greengill Slave Freed\' (No Repeat)'),
(25084, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 45111, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Greengill Slave - On Spellhit \'Orb of Murloc Control\' - Cast \'Enrage\' (No Repeat)'),
(25084, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 36, 25085, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Greengill Slave - On Spellhit \'Orb of Murloc Control\' - Update Template To \'Freed Greengill Slave\' (No Repeat)'),
(25084, 0, 3, 4, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 9, 25073, 0, 100, 0, 0, 0, 0, 0, 'Greengill Slave - On Spellhit \'Orb of Murloc Control\' - Start Attacking (No Repeat)'),
(25084, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 19, 25060, 100, 0, 0, 0, 0, 0, 0, 'Greengill Slave - On Spellhit \'Orb of Murloc Control\' - Start Attacking (No Repeat)'),
(25084, 0, 5, 6, 7, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 5000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Greengill Slave - On Evade - Despawn In 5000 ms'),
(25084, 0, 6, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 89, 5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Greengill Slave - On Evade - Start Random Movement');
DELETE FROM `spell_custom_attr` WHERE `spell_id` = 45111;
INSERT INTO `spell_custom_attr` (`spell_id`, `attributes`) VALUES
(45111, 0x00000800);

View File

@ -0,0 +1,39 @@
-- DB update 2025_10_07_01 -> 2025_10_09_00
-- Add Npcs to Rhino.
DELETE FROM `vehicle_template_accessory` WHERE `entry` = 29931;
INSERT INTO `vehicle_template_accessory` (`entry`, `accessory_entry`, `seat_id`, `minion`, `description`, `summontype`, `summontimer`) VALUES
(29931, 29982, 0, 0, 'Drakkari Raider', 7, 0),
(29931, 29982, 1, 0, 'Drakkari Raider', 7, 0),
(29931, 29982, 2, 0, 'Drakkari Raider', 7, 0);
-- Remove Spawns (Drakkari Raider)
DELETE FROM `creature` WHERE `id1` = 29982;
-- Remove Guid SmartAI (Drakkari Raider)
DELETE FROM `smart_scripts` WHERE (`entryorguid` IN (-127226, -127225, -127217)) AND (`source_type` = 0);
-- Remove Extra Flag Dont_override (Drakkari Raider)
UPDATE `creature_template` SET `flags_extra` = `flags_extra` &~ 134217728 WHERE (`entry` = 29982);
-- Edit SmartAI (Drakkari Rhino and Drakkari Raider)
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE (`entry` IN (29931, 29982));
DELETE FROM `smart_scripts` WHERE (`source_type` = 0) AND (`entryorguid` IN (29931, 29982));
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(29931, 0, 0, 0, 9, 0, 100, 514, 0, 0, 8000, 8000, 5, 40, 11, 55530, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Drakkari Rhino - Within 5-40 Range - Cast \'Charge\' (Normal Dungeon)'),
(29931, 0, 1, 0, 9, 0, 100, 516, 0, 0, 8000, 8000, 5, 40, 11, 58991, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Drakkari Rhino - Within 5-40 Range - Cast \'Charge\' (Heroic Dungeon)'),
(29931, 0, 2, 0, 0, 0, 100, 514, 0, 10000, 8000, 22000, 0, 0, 11, 55663, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Drakkari Rhino - In Combat - Cast \'Deafening Roar\' (Normal Dungeon)'),
(29931, 0, 3, 0, 0, 0, 100, 516, 0, 10000, 8000, 22000, 0, 0, 11, 58992, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Drakkari Rhino - In Combat - Cast \'Deafening Roar\' (Heroic Dungeon)'),
(29931, 0, 4, 0, 38, 0, 100, 0, 0, 2, 0, 0, 0, 0, 232, 1272070, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Drakkari Rhino - On Data Set 0 2 - Start Path 1272070'),
(29931, 0, 5, 6, 108, 0, 100, 0, 3, 1272070, 0, 0, 0, 0, 101, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Drakkari Rhino - On Point 3 of Path 1272070 Reached - Set Home Position'),
(29931, 0, 6, 7, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 223, 150, 0, 0, 0, 0, 0, 29, 0, 0, 0, 0, 0, 0, 0, 0, 'Drakkari Rhino - On Point 3 of Path 1272070 Reached - Do Action ID 150'),
(29931, 0, 7, 8, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 223, 151, 0, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 0, 0, 0, 'Drakkari Rhino - On Point 3 of Path 1272070 Reached - Do Action ID 151'),
(29931, 0, 8, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 223, 152, 0, 0, 0, 0, 0, 29, 2, 0, 0, 0, 0, 0, 0, 0, 'Drakkari Rhino - On Point 3 of Path 1272070 Reached - Do Action ID 152'),
(29982, 0, 0, 0, 0, 0, 100, 0, 2000, 6000, 5000, 11000, 0, 0, 11, 15496, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Drakkari Raider - In Combat - Cast \'Cleave\''),
(29982, 0, 1, 2, 72, 0, 100, 0, 150, 0, 0, 0, 0, 0, 203, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Drakkari Raider - On Action 150 Done - Exit vehicle'),
(29982, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 101, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 1773.92, 748.702, 119.4, 3.1151, 'Drakkari Raider - On Action 150 Done - Set Home Position'),
(29982, 0, 3, 4, 72, 0, 100, 0, 151, 0, 0, 0, 0, 0, 203, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Drakkari Raider - On Action 151 Done - Exit vehicle'),
(29982, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 101, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 1769.33, 743.685, 119.4, 3.1151, 'Drakkari Raider - On Action 151 Done - Set Home Position'),
(29982, 0, 5, 6, 72, 0, 100, 0, 152, 0, 0, 0, 0, 0, 203, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Drakkari Raider - On Action 152 Done - Exit vehicle'),
(29982, 0, 6, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 101, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 1771.29, 738.667, 119.4, 3.1151, 'Drakkari Raider - On Action 152 Done - Set Home Position');

View File

@ -0,0 +1,16 @@
-- DB update 2025_10_09_00 -> 2025_10_09_01
-- Update gameobject 'Lava' with sniffed values
-- updated spawns
DELETE FROM `gameobject` WHERE (`id` IN (191854, 191858, 191859, 191855, 191856, 191857)) AND (`guid` IN (58982, 59037, 59050, 67174, 67176, 67178));
INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `ScriptName`, `VerifiedBuild`, `Comment`) VALUES
(58982, 191854, 571, 0, 0, 1, 1, 4397.71826171875, 1617.9945068359375, 129.1055908203125, 4.520402908325195312, 0, 0, -0.77162456512451171, 0.636078238487243652, 120, 255, 1, "", 46158, NULL),
(59037, 191858, 571, 0, 0, 1, 1, 4435.0810546875, 1672.25341796875, 131.871307373046875, 3.90954136848449707, 0, 0, -0.92718315124511718, 0.37460830807685852, 120, 255, 1, "", 46158, NULL),
(59050, 191859, 571, 0, 0, 1, 1, 4537.86279296875, 1702.455078125, 158.952392578125, 3.063024282455444335, 0, 0, 0.999228477478027343, 0.039274025708436965, 120, 255, 1, "", 46158, NULL),
(67174, 191855, 571, 0, 0, 1, 1, 4423.2138671875, 1815.5992431640625, 160.35821533203125, 4.982916831970214843, 0, 0, -0.60529327392578125, 0.796002507209777832, 120, 255, 1, "", 46158, NULL),
(67176, 191856, 571, 0, 0, 1, 1, 4511.74365234375, 1860.2879638671875, 161.1739959716796875, 4.982916831970214843, 0, 0, -0.60529327392578125, 0.796002507209777832, 120, 255, 1, "", 46158, NULL),
(67178, 191857, 571, 0, 0, 1, 1, 4299.21142578125, 1867.4713134765625, 160.4115753173828125, 0.026179106906056404, 0, 0, 0.013089179992675781, 0.999914348125457763, 120, 255, 1, "", 47720, NULL);
-- new spawns
DELETE FROM `gameobject` WHERE (`id` IN (191861)) AND (`guid` IN (44));
INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `ScriptName`, `VerifiedBuild`, `Comment`) VALUES
(44, 191861, 571, 0, 0, 1, 1, 4567.751953125, 1630.7730712890625, 164.80889892578125, 2.975770950317382812, 0, 0, 0.996564865112304687, 0.082815870642662048, 120, 255, 1, "", 46158, NULL);

View File

@ -0,0 +1,6 @@
-- DB update 2025_10_09_01 -> 2025_10_09_02
-- Update gameobject 'Frostglow' with sniffed values
-- new spawns
DELETE FROM `gameobject` WHERE (`id` IN (192077)) AND (`guid` IN (46));
INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `ScriptName`, `VerifiedBuild`, `Comment`) VALUES
(46, 192077, 571, 0, 0, 1, 8, 7214.13720703125, -2652.241455078125, 820.3399658203125, 0.24434557557106018, 0, 0, 0.121869087219238281, 0.9925462007522583, 120, 255, 1, "", 46248, NULL);

View File

@ -0,0 +1,34 @@
-- DB update 2025_10_09_02 -> 2025_10_09_03
-- Update gameobject 'Torch' with sniffed values
-- updated spawns
DELETE FROM `gameobject` WHERE (`id` IN (192618, 97701, 177385, 176767, 179507, 179508, 179513, 192562, 192563, 191836, 191837, 191838, 191839, 192620, 192621, 192614, 192615)) AND (`guid` IN (100103, 11894, 43177, 45428, 49958, 49960, 49967, 57030, 57079, 58173, 58174, 58190, 58206, 58207, 58218, 58219, 58968, 58975, 7094, 7095));
INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `ScriptName`, `VerifiedBuild`, `Comment`) VALUES
(100103, 192618, 571, 0, 0, 1, 1, 5931.291015625, -3036.54443359375, 393.401611328125, 2.015851974487304687, 0, 0, 0.845726966857910156, 0.533615827560424804, 120, 255, 1, "", 46368, NULL),
(11894, 97701, 189, 0, 0, 1, 1, 1169.0335693359375, 1345.62841796875, 33.04557037353515625, 3.141592741012573242, 0, 0, -1, 0, 7200, 255, 1, "", 48632, NULL),
(43177, 177385, 289, 0, 0, 1, 1, 227.2589263916015625, 88.310302734375, 99.19482421875, 0.017452461645007133, 0, 0, 0.008726119995117187, 0.999961912631988525, 7200, 255, 1, "", 50664, NULL),
(45428, 176767, 0, 0, 0, 1, 1, 1262.9735107421875, -2563.075927734375, 96.84517669677734375, 0.479964137077331542, 0, 0, 0.237685203552246093, 0.971342265605926513, 120, 255, 1, "", 46248, NULL),
(49958, 179507, 1, 0, 0, 1, 1, -3821.48828125, 1253.965087890625, 162.3778533935546875, 4.703663349151611328, 0, 0, -0.71018505096435546, 0.704015016555786132, 120, 255, 1, "", 46248, NULL),
(49960, 179508, 1, 0, 0, 1, 1, -3757.915283203125, 1252.9454345703125, 162.3778533935546875, 4.703663349151611328, 0, 0, -0.71018505096435546, 0.704015016555786132, 120, 255, 1, "", 46248, NULL),
(49967, 179513, 1, 0, 0, 1, 1, -4070.459716796875, 84.60311126708984375, 60.002593994140625, 4.223697185516357421, 0, 0, -0.85716724395751953, 0.515038192272186279, 120, 255, 1, "", 47720, NULL),
(57030, 192562, 571, 0, 0, 1, 1, 6954.73388671875, -4626.74072265625, 468.348052978515625, 2.364918231964111328, 0, 0, 0.925539970397949218, 0.378649920225143432, 120, 255, 1, "", 46368, NULL),
(57079, 192563, 571, 0, 0, 1, 1, 6933.04248046875, -4648.81396484375, 468.348052978515625, 2.364918231964111328, 0, 0, 0.925539970397949218, 0.378649920225143432, 120, 255, 1, "", 46368, NULL),
(58173, 191836, 571, 0, 0, 1, 1, 6945.23974609375, -4371.509765625, 478.80419921875, 3.926995515823364257, 0, 0, -0.92387866973876953, 0.38268551230430603, 120, 255, 1, "", 46368, NULL),
(58174, 191836, 571, 0, 0, 1, 1, 6726.8125, -4691.68017578125, 478.794921875, 0.767943859100341796, 0, 0, 0.374606132507324218, 0.927184045314788818, 120, 255, 1, "", 50172, NULL),
(58190, 191837, 571, 0, 0, 1, 1, 7001.833984375, -4428.10400390625, 478.80419921875, 3.926995515823364257, 0, 0, -0.92387866973876953, 0.38268551230430603, 120, 255, 1, "", 46368, NULL),
(58206, 191838, 571, 0, 0, 1, 1, 7036.54541015625, -4393.39306640625, 478.80419921875, 3.926995515823364257, 0, 0, -0.92387866973876953, 0.38268551230430603, 120, 255, 1, "", 46368, NULL),
(58207, 191838, 571, 0, 0, 1, 1, 6635.90234375, -4668.20703125, 478.794921875, 0.767943859100341796, 0, 0, 0.374606132507324218, 0.927184045314788818, 120, 255, 1, "", 50172, NULL),
(58218, 191839, 571, 0, 0, 1, 1, 6979.951171875, -4336.798828125, 478.80419921875, 3.926995515823364257, 0, 0, -0.92387866973876953, 0.38268551230430603, 120, 255, 1, "", 46368, NULL),
(58219, 191839, 571, 0, 0, 1, 1, 6691.50048828125, -4725.7802734375, 478.794921875, 0.767943859100341796, 0, 0, 0.374606132507324218, 0.927184045314788818, 120, 255, 1, "", 50172, NULL),
(58968, 192620, 571, 0, 0, 1, 1, 5855.06787109375, -2905.767333984375, 362.3609619140625, 2.015851974487304687, 0, 0, 0.845726966857910156, 0.533615827560424804, 120, 255, 1, "", 46158, NULL),
(58975, 192621, 571, 0, 0, 1, 1, 5666.6611328125, -2995.633056640625, 362.3609619140625, 2.015851974487304687, 0, 0, 0.845726966857910156, 0.533615827560424804, 120, 255, 1, "", 46158, NULL),
(7094, 192614, 571, 0, 0, 1, 1, 5850.66455078125, -3038.080322265625, 307.921875, 2.015851974487304687, 0, 0, 0.845726966857910156, 0.533615827560424804, 120, 255, 1, "", 45942, NULL),
(7095, 192615, 571, 0, 0, 1, 1, 5770.06396484375, -3076.52490234375, 307.921875, 2.015851974487304687, 0, 0, 0.845726966857910156, 0.533615827560424804, 120, 255, 1, "", 45942, NULL);
-- remaining spawns (no sniffed values available)
-- (`guid` IN (49961, 49962))
-- new spawns
DELETE FROM `gameobject` WHERE (`id` IN (191837, 192619)) AND (`guid` IN (162, 163));
INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `ScriptName`, `VerifiedBuild`, `Comment`) VALUES
(162, 191837, 571, 0, 0, 1, 1, 6671.21435546875, -4634.1064453125, 478.794921875, 0.767943859100341796, 0, 0, 0.374606132507324218, 0.927184045314788818, 120, 255, 1, "", 50172, NULL),
(163, 192619, 571, 0, 0, 1, 1, 5718.88671875, -3137.856201171875, 393.134735107421875, 2.015851974487304687, 0, 0, 0.845726966857910156, 0.533615827560424804, 120, 255, 1, "", 46158, NULL);

View File

@ -0,0 +1,5 @@
-- DB update 2025_10_09_03 -> 2025_10_09_04
DELETE FROM `spell_script_names` WHERE `spell_id` IN (37705, 60510);
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(37705, 'spell_item_healing_trance'),
(60510, 'spell_item_healing_trance');

View File

@ -0,0 +1,4 @@
-- DB update 2025_10_09_04 -> 2025_10_10_00
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 13082) AND (`source_type` = 0) AND (`id` = 2);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(13082, 0, 2, 0, 11, 0, 100, 0, 0, 0, 0, 0, 0, 0, 3, 0, 4016, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Milton Beats - On Respawn - Morph To Model 4016');

View File

@ -0,0 +1,5 @@
-- DB update 2025_10_10_00 -> 2025_10_10_01
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 23723;
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 23723) AND (`source_type` = 0) AND (`id` = 0);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(23723, 0, 0, 0, 11, 0, 100, 0, 0, 0, 0, 0, 0, 0, 3, 0, 2981, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Sergeant Lukas - On Respawn - Morph To Model 2981');

View File

@ -0,0 +1,3 @@
-- DB update 2025_10_10_01 -> 2025_10_11_00
-- Removes skinloot ID from the kodo appration
UPDATE `creature_template` SET `skinloot` = 0 WHERE `entry` = 11521;

View File

@ -0,0 +1,113 @@
-- DB update 2025_10_11_00 -> 2025_10_11_01
-- Add Waypoint
DELETE FROM `waypoints` WHERE (`entry` IN (2300200));
INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `orientation`, `point_comment`) VALUES
(2300200, 1, 3691.97, -3962.41, 35.9118, NULL, 'Rizzle Sprysprocket escape'),
(2300200, 2, 3675.02, -3960.49, 35.9118, NULL, 'Rizzle Sprysprocket escape'),
(2300200, 3, 3653.19, -3958.33, 33.9118, NULL, 'Rizzle Sprysprocket escape'),
(2300200, 4, 3621.12, -3958.51, 29.9118, NULL, 'Rizzle Sprysprocket escape'),
(2300200, 5, 3604.86, -3963, 29.9118, NULL, 'Rizzle Sprysprocket escape'),
(2300200, 6, 3569.94, -3970.25, 29.9118, NULL, 'Rizzle Sprysprocket escape'),
(2300200, 7, 3541.03, -3975.64, 29.9118, NULL, 'Rizzle Sprysprocket escape'),
(2300200, 8, 3510.84, -3978.71, 29.9118, NULL, 'Rizzle Sprysprocket escape'),
(2300200, 9, 3472.7, -3997.07, 29.9118, NULL, 'Rizzle Sprysprocket escape'),
(2300200, 10, 3439.15, -4014.55, 29.9118, NULL, 'Rizzle Sprysprocket escape'),
(2300200, 11, 3412.8, -4025.87, 29.9118, NULL, 'Rizzle Sprysprocket escape'),
(2300200, 12, 3384.95, -4038.04, 29.9118, NULL, 'Rizzle Sprysprocket escape'),
(2300200, 13, 3346.77, -4052.93, 29.9118, NULL, 'Rizzle Sprysprocket escape'),
(2300200, 14, 3299.56, -4071.59, 29.9118, NULL, 'Rizzle Sprysprocket escape'),
(2300200, 15, 3261.22, -4080.38, 30.9118, NULL, 'Rizzle Sprysprocket escape'),
(2300200, 16, 3220.68, -4083.09, 31.9118, NULL, 'Rizzle Sprysprocket escape'),
(2300200, 17, 3187.11, -4070.45, 33.9118, NULL, 'Rizzle Sprysprocket escape'),
(2300200, 18, 3162.78, -4062.75, 33.9118, NULL, 'Rizzle Sprysprocket escape'),
(2300200, 19, 3136.09, -4050.32, 33.9118, NULL, 'Rizzle Sprysprocket escape'),
(2300200, 20, 3119.47, -4044.51, 36.0363, NULL, 'Rizzle Sprysprocket escape'),
(2300200, 21, 3098.95, -4019.8, 33.9118, NULL, 'Rizzle Sprysprocket escape'),
(2300200, 22, 3073.07, -4011.42, 33.9118, NULL, 'Rizzle Sprysprocket escape'),
(2300200, 23, 3051.71, -3993.37, 33.9118, NULL, 'Rizzle Sprysprocket escape'),
(2300200, 24, 3027.52, -3978.6, 33.9118, NULL, 'Rizzle Sprysprocket escape'),
(2300200, 25, 3003.78, -3960.14, 33.9118, NULL, 'Rizzle Sprysprocket escape'),
(2300200, 26, 2977.99, -3941.98, 31.9118, NULL, 'Rizzle Sprysprocket escape'),
(2300200, 27, 2964.57, -3932.07, 30.9118, NULL, 'Rizzle Sprysprocket escape'),
(2300200, 28, 2947.9, -3921.31, 29.9118, NULL, 'Rizzle Sprysprocket escape'),
(2300200, 29, 2924.91, -3910.8, 29.9118, NULL, 'Rizzle Sprysprocket escape'),
(2300200, 30, 2903.04, -3896.42, 29.9118, NULL, 'Rizzle Sprysprocket escape'),
(2300200, 31, 2884.75, -3874.03, 29.9118, NULL, 'Rizzle Sprysprocket escape'),
(2300200, 32, 2868.19, -3851.48, 29.9118, NULL, 'Rizzle Sprysprocket escape'),
(2300200, 33, 2854.62, -3819.72, 29.9118, NULL, 'Rizzle Sprysprocket escape'),
(2300200, 34, 2825.53, -3790.4, 29.9118, NULL, 'Rizzle Sprysprocket escape'),
(2300200, 35, 2804.31, -3773.05, 29.9118, NULL, 'Rizzle Sprysprocket escape'),
(2300200, 36, 2769.78, -3763.57, 29.9118, NULL, 'Rizzle Sprysprocket escape'),
(2300200, 37, 2727.23, -3745.92, 30.9118, NULL, 'Rizzle Sprysprocket escape'),
(2300200, 38, 2680.12, -3737.49, 30.9118, NULL, 'Rizzle Sprysprocket escape'),
(2300200, 39, 2647.62, -3739.94, 30.9118, NULL, 'Rizzle Sprysprocket escape'),
(2300200, 40, 2616.6, -3745.75, 30.9118, NULL, 'Rizzle Sprysprocket escape'),
(2300200, 41, 2589.38, -3731.97, 30.9118, NULL, 'Rizzle Sprysprocket escape'),
(2300200, 42, 2562.94, -3722.35, 31.9118, NULL, 'Rizzle Sprysprocket escape'),
(2300200, 43, 2521.05, -3716.6, 31.9118, NULL, 'Rizzle Sprysprocket escape'),
(2300200, 44, 2485.26, -3706.67, 31.9118, NULL, 'Rizzle Sprysprocket escape'),
(2300200, 45, 2458.93, -3696.67, 31.9118, NULL, 'Rizzle Sprysprocket escape'),
(2300200, 46, 2432, -3692.03, 31.9118, NULL, 'Rizzle Sprysprocket escape'),
(2300200, 47, 2399.59, -3681.97, 31.9118, NULL, 'Rizzle Sprysprocket escape'),
(2300200, 48, 2357.75, -3666.6, 31.9118, NULL, 'Rizzle Sprysprocket escape'),
(2300200, 49, 2311.99, -3656.88, 31.9118, NULL, 'Rizzle Sprysprocket escape'),
(2300200, 50, 2263.41, -3649.55, 31.9118, NULL, 'Rizzle Sprysprocket escape'),
(2300200, 51, 2209.05, -3641.76, 31.9118, NULL, 'Rizzle Sprysprocket escape'),
(2300200, 52, 2164.83, -3637.64, 31.9118, NULL, 'Rizzle Sprysprocket escape'),
(2300200, 53, 2122.42, -3639, 31.9118, NULL, 'Rizzle Sprysprocket escape'),
(2300200, 54, 2075.73, -3643.59, 31.9118, NULL, 'Rizzle Sprysprocket escape'),
(2300200, 55, 2033.59, -3649.52, 31.9118, NULL, 'Rizzle Sprysprocket escape'),
(2300200, 56, 1985.22, -3662.99, 31.9118, NULL, 'Rizzle Sprysprocket escape'),
(2300200, 57, 1927.09, -3679.56, 33.9118, NULL, 'Rizzle Sprysprocket escape'),
(2300200, 58, 1873.57, -3695.32, 33.9118, NULL, 'Rizzle Sprysprocket escape');
-- Set General SmartAI, Add Gossip ID, ScriptName, NpcFlag.
UPDATE `creature_template` SET `npcflag` = `npcflag` |1, `gossip_menu_id` = 21893, `ScriptName` = '', `AIName` = 'SmartAI' WHERE `entry` = 23002;
-- Add SmartAI
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 23002);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(23002, 0, 0, 1, 54, 0, 100, 0, 0, 0, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle Sprysprocket - On Just Summoned - Remove Npc Flags Gossip'),
(23002, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 64, 12, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle Sprysprocket - On Just Summoned - Store Targetlist'),
(23002, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 39865, 2, 0, 1, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle Sprysprocket - On Just Summoned - Cast \'Rizzle`s Blackjack\''),
(23002, 0, 3, 4, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle Sprysprocket - On Just Summoned - Say Line 0'),
(23002, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 80, 2300200, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle Sprysprocket - On Just Summoned - Run Script'),
(23002, 0, 5, 6, 60, 1, 100, 0, 15000, 20000, 25000, 30000, 0, 0, 11, 40525, 2, 0, 0, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 'Rizzle Sprysprocket - On Update - Cast \'Rizzle`s Frost Grenade\' (Phase 1)'),
(23002, 0, 6, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 'Rizzle Sprysprocket - On Update - Say Line 1 (Phase 1)'),
(23002, 0, 7, 8, 101, 1, 100, 0, 1, 10, 1000, 1000, 1000, 0, 55, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle Sprysprocket - On 1 or More Players in Range - Stop Waypoint (Phase 1)'),
(23002, 0, 8, 9, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 28, 39912, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle Sprysprocket - On 1 or More Players in Range - Remove Aura \'Periodic Depth Charge Release\' (Phase 1)'),
(23002, 0, 9, 10, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle Sprysprocket - On 1 or More Players in Range - Say Line 2 (Phase 1)'),
(23002, 0, 10, 11, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 82, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle Sprysprocket - On 1 or More Players in Range - Add Npc Flags Gossip (Phase 1)'),
(23002, 0, 11, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle Sprysprocket - On 1 or More Players in Range - Set Event Phase 0 (Phase 1)'),
(23002, 0, 12, 13, 62, 0, 100, 0, 21893, 0, 0, 0, 0, 0, 11, 39886, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle Sprysprocket - On Gossip Option 0 Selected - Cast \'Give Southfury Moonstone\''),
(23002, 0, 13, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 3000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle Sprysprocket - On Gossip Option 0 Selected - Despawn In 3000 ms'),
(23002, 0, 14, 0, 58, 0, 100, 0, 58, 2300200, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle Sprysprocket - On Path 2300200 Finished - Despawn Instant');
-- Set Action List
DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 2300200);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(2300200, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 23025, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle Sprysprocket - Actionlist - Cast \'Blink Cooldown Reduction\''),
(2300200, 9, 1, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 0, 0, 1, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle Sprysprocket - Actionlist - Say Line 3'),
(2300200, 9, 2, 0, 0, 0, 100, 0, 500, 500, 0, 0, 0, 0, 11, 39871, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle Sprysprocket - Actionlist - Cast \'Rizzle`s Escape\''),
(2300200, 9, 3, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 0, 0, 11, 39912, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle Sprysprocket - Actionlist - Cast \'Periodic Depth Charge Release\''),
(2300200, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle Sprysprocket - Actionlist - Set Event Phase 1'),
(2300200, 9, 5, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 53, 1, 2300200, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle Sprysprocket - Actionlist - Start Waypoint Path 2300200');
-- Set Conditions
DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` IN (15, 22)) AND (`SourceGroup` IN (8, 21893)) AND (`SourceEntry` IN (0, 23002)) AND (`SourceId` = 0) AND (`ElseGroup` = 0) AND (`ConditionTypeOrReference` = 47) AND (`ConditionTarget` = 0) AND (`ConditionValue1` = 10994) AND (`ConditionValue2` = 8) AND (`ConditionValue3` = 0);
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
(15, 21893, 0, 0, 0, 47, 0, 10994, 8, 0, 0, 0, 0, '', 'Gossip displayed only if player has Chasing the Moonstone incomplete'),
(22, 8, 23002, 0, 0, 47, 0, 10994, 8, 0, 0, 0, 0, '', 'Event occurs only if player has Chasing the Moonstone incomplete.');
-- Set SmartAI (Rizzle's Depth Charge)
UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = 23025;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 23025);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(23025, 0, 0, 1, 54, 0, 100, 0, 0, 0, 0, 0, 0, 0, 207, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle\'s Depth Charge - On Just Summoned - Set hover 1'),
(23025, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 61, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle\'s Depth Charge - On Just Summoned - Set Swim On'),
(23025, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 18, 33554432, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle\'s Depth Charge - On Just Summoned - Set Flags Not Selectable'),
(23025, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle\'s Depth Charge - On Just Summoned - Set Reactstate Passive'),
(23025, 0, 4, 5, 101, 0, 100, 0, 1, 5, 1000, 1000, 1000, 0, 11, 38576, 2, 0, 0, 0, 0, 21, 5, 0, 0, 0, 0, 0, 0, 0, 'Rizzle\'s Depth Charge - On 1 or More Players in Range - Cast \'Knockback\''),
(23025, 0, 5, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 1000, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rizzle\'s Depth Charge - On 1 or More Players in Range - Despawn In 1000 ms');

View File

@ -0,0 +1,7 @@
-- DB update 2025_10_11_01 -> 2025_10_11_02
--
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 29920);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(29920, 0, 0, 0, 0, 0, 100, 0, 10000, 15000, 10000, 15000, 0, 0, 11, 55652, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 'Ruins Dweller - In Combat - Cast \'Spring\''),
(29920, 0, 1, 0, 0, 0, 100, 0, 2000, 7000, 8000, 14000, 0, 0, 11, 55643, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Ruins Dweller - In Combat - Cast \'Regurgitate\''),
(29920, 0, 2, 0, 31, 0, 100, 0, 55652, 0, 0, 0, 0, 0, 14, 0, 100, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Ruins Dweller - On Target Spellhit \'Spring\' - Set All Threat 0-100');

View File

@ -0,0 +1,13 @@
-- DB update 2025_10_11_02 -> 2025_10_11_03
--
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 780602) AND (`source_type` = 9) AND (`id` IN (5));
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(780602, 9, 5, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 26, 836, 0, 0, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 0, 'Homing Robot OOX-09/HL - Actionlist - Quest Credit \'Rescue OOX-09/HL!\'');
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 780702) AND (`source_type` = 9) AND (`id` IN (6));
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(780702, 9, 6, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 26, 2767, 0, 0, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 0, 'Homing Robot OOX-22/FE - Actionlist - Quest Credit \'Rescue OOX-22/FE!\'');
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 778402) AND (`source_type` = 9) AND (`id` IN (5));
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(778402, 9, 5, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 26, 648, 0, 0, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 0, 'Homing Robot OOX-17/TN - Actionlist - Quest Credit \'Rescue OOX-17/TN!\'');

View File

@ -0,0 +1,27 @@
-- DB update 2025_10_11_03 -> 2025_10_11_04
--
DELETE FROM `creature` WHERE (`guid` = 248652) AND (`id1` = 14693);
DELETE FROM `game_event_creature` WHERE (`guid` = 248652) AND (`eventEntry` = 120);
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 4543) AND (`source_type` = 0) AND (`id` IN (7));
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(4543, 0, 7, 0, 6, 0, 100, 0, 0, 0, 0, 0, 0, 0, 12, 14693, 8, 0, 0, 0, 0, 8, 0, 0, 0, 0, 1797.84, 1233.68, 18.3153, 1.58286, 'Bloodmage Thalnos - On Just Died - Summon Creature \'Scorn\'');
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 14693;
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 14693) AND (`source_type` = 0) AND (`id` IN (4));
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(14693, 0, 4, 0, 54, 0, 100, 0, 0, 0, 0, 0, 0, 0, 53, 0, 1469300, 1, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scorn - On Just Summoned - Start Patrol Path 1469300');
DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 22) AND (`SourceGroup` = 8) AND (`SourceEntry` = 4543) AND (`SourceId` = 0) AND (`ElseGroup` = 0);
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
(22, 8, 4543, 0, 0, 12, 0, 120, 0, 0, 0, 0, 0, '', 'Scourge Invasion - Boss in instance activation event must be active');
SET @ENTRY := 14693;
DELETE FROM `waypoints` WHERE `entry` = @ENTRY * 100;
INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `point_comment`) VALUES
(@ENTRY*100, 1, 1798.01, 1312.39, 18.69, NULL, 0, 'Scorn'),
(@ENTRY*100, 2, 1805.39, 1323.66, 18.91, NULL, 0, 'Scorn'),
(@ENTRY*100, 3, 1797.70, 1383.27, 18.76, NULL, 0, 'Scorn'),
(@ENTRY*100, 4, 1805.39, 1323.66, 18.91, NULL, 0, 'Scorn'),
(@ENTRY*100, 5, 1798.01, 1312.39, 18.69, NULL, 0, 'Scorn'),
(@ENTRY*100, 6, 1798.01, 1223.17, 18.274, NULL, 0, 'Scorn - spawn point');

View File

@ -0,0 +1,3 @@
-- DB update 2025_10_11_04 -> 2025_10_11_05
-- Moorabi hard reset
UPDATE `creature_template` SET `flags_extra` = `flags_extra` | 2147483648 WHERE `entry` IN (29305, 30530);

View File

@ -0,0 +1,6 @@
-- DB update 2025_10_11_05 -> 2025_10_11_06
-- Correctly uses Option0 instead of Option1 to summon the Terokk
UPDATE `smart_scripts` SET `event_param2` = 0 WHERE `entryorguid` = 185928 AND `source_type` = 1 AND `id` = 0;
-- Removes the duplicated option.
DELETE FROM `gossip_menu_option` WHERE `MenuID` = 8687 AND `OptionID` = 1;

View File

@ -0,0 +1,11 @@
-- DB update 2025_10_11_06 -> 2025_10_12_00
--
UPDATE `creature_template` SET `maxlevel` = 33 WHERE `entry` = 940;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 940);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(940, 0, 0, 0, 74, 0, 100, 0, 0, 0, 19900, 28900, 30, 0, 11, 6077, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 'Kurzen Medicine Man - On Friendly Between 0-30% Health - Cast \'Renew\''),
(940, 0, 1, 0, 74, 0, 100, 0, 0, 0, 34300, 39100, 30, 0, 11, 6064, 1, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 'Kurzen Medicine Man - On Friendly Between 0-30% Health - Cast \'Heal\''),
(940, 0, 2, 0, 60, 0, 100, 0, 1000, 1000, 70000, 90000, 0, 0, 11, 602, 32, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Kurzen Medicine Man - On Update - Cast \'Inner Fire\''),
(940, 0, 3, 0, 2, 0, 100, 1, 0, 15, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Kurzen Medicine Man - Between 0-15% Health - Flee For Assist'),
(940, 0, 4, 0, 2, 0, 100, 0, 0, 50, 3000, 16000, 0, 0, 11, 6064, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Kurzen Medicine Man - Between 0-50% Health - Cast \'Heal\''),
(940, 0, 5, 0, 2, 0, 100, 0, 0, 90, 16000, 24000, 30, 0, 11, 6077, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Kurzen Medicine Man - Between 0-90% Health - Cast \'Renew\'');

View File

@ -0,0 +1,10 @@
-- DB update 2025_10_12_00 -> 2025_10_12_01
--
-- With this smart script set, the worm will seek the first player within 18 yards to attack, with no regard to the player's level. Being outside of 18 yards when killing a Rotted One will avoid this behavior.
-- Smart Script #2 will ensure the mob dies after 30 seconds, which is how long they are supposed to live.
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 2462;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 2462);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(2462, 0, 0, 0, 101, 0, 100, 0, 0, 18, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 18, 18, 0, 0, 0, 0, 0, 0, 0, 'Flesh Eating Worm - On 0 or More Players in Range - Start Attacking'),
(2462, 0, 1, 0, 0, 0, 100, 0, 30000, 30000, 0, 0, 0, 0, 37, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Flesh Eating Worm - In Combat - Kill Self');

View File

@ -0,0 +1,23 @@
-- DB update 2025_10_12_01 -> 2025_10_12_02
--
-- GM Utility Spell Scripts
DELETE FROM `spell_script_names` WHERE `spell_id` IN (456, 2765, 1509, 18139, 6147, 2763, 20115, 20114, 24676, 24675);
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(456, 'spell_gen_showlabel_off'),
(2765, 'spell_gen_showlabel_on'),
(1509, 'spell_gen_gm_off'),
(18139, 'spell_gen_gm_on'),
(6147, 'spell_gen_invis_off'),
(2763, 'spell_gen_invis_on'),
(20115, 'spell_gen_bm_on'),
(20114, 'spell_gen_bm_off'),
(24676, 'spell_gen_bm_on'),
(24675, 'spell_gen_bm_off');
DELETE FROM `acore_string` WHERE `entry` = 1186;
INSERT INTO `acore_string` (`entry`, `content_default`, `locale_koKR`, `locale_frFR`, `locale_deDE`, `locale_zhCN`, `locale_zhTW`, `locale_esES`, `locale_esMX`, `locale_ruRU`) VALUES
(1186, 'Beastmaster mode is {}', NULL, NULL, 'Der Beastmaster mode ist an ({})!', '兽王模式:{}', NULL, NULL, NULL, NULL);
DELETE FROM `command` WHERE `name`='bm';
INSERT INTO `command` (`name`, `security`, `help`) VALUES
('bm', 3, 'Syntax: .bm [on/off]\nEnable or Disable in game Beastmaster mode or show current state if on/off not provided.');

View File

@ -0,0 +1,128 @@
-- DB update 2025_10_12_02 -> 2025_10_12_03
DELETE FROM `creature_template_model` WHERE `CreatureID` IN (15928, 19325, 20794, 26620, 26627, 26628, 26630, 26631, 26632, 26637, 26638, 26641, 26712, 26824, 27483, 27490, 27597, 27598, 27600, 27709, 27753, 27909, 27975, 27977, 27978, 27981, 27982, 27983, 27984, 27985, 28070, 28165, 28546, 28547, 28578, 28579, 28580, 28581, 28582, 28583, 28584, 28585, 28586, 28587, 28684, 28695, 28729, 28730, 28731, 28732, 28733, 28734, 28823, 28826, 28835, 28836, 28837, 28838, 28859, 28860, 28920, 28921, 28922, 28923, 28947, 28961, 28965, 29048, 29062, 29063, 29064, 29240, 29335, 30090, 30118, 30449, 30451, 30452, 30616, 30641, 30643, 30882, 30890, 30897, 30898, 30899, 31218, 31219, 31311, 31317, 31520, 31521, 31534, 31535, 31539, 31540, 31541, 31543, 31734, 31749, 31750, 31751, 31752, 32187);
INSERT INTO `creature_template_model` (`CreatureID`, `Idx`, `CreatureDisplayID`, `DisplayScale`, `Probability`, `VerifiedBuild`) VALUES
(15928, 0, 16137, 1, 0, 51831),
(19325, 0, 18737, 1, 1, 51831),
(20794, 0, 20182, 1, 0, 51831), -- 19978
(26620, 0, 27077, 1, 1, 51831),
(26620, 1, 27078, 1, 1, 51831),
(26627, 0, 24500, 1, 1, 51831),
(26628, 0, 19732, 1, 1, 51831),
(26630, 0, 26352, 1, 0, 51831),
(26631, 0, 26292, 1, 1, 51831),
(26632, 0, 27072, 1, 0, 51831),
(26637, 0, 26860, 1, 100, 51831),
(26638, 0, 27056, 1, 100, 51831),
(26641, 0, 19734, 1, 1, 51831),
(26712, 0, 169, 1, 0, 51831), -- 17188!
(26712, 1, 17188, 1, 1, 51831),
(26824, 0, 6469, 1, 1, 51831),
(27483, 0, 5240, 1, 1, 51831),
(27490, 0, 7897, 1, 0, 51831),
(27597, 0, 22337, 1, 0, 51831),
(27598, 0, 10978, 1, 1, 51831),
(27598, 1, 10972, 1, 1, 51831),
(27600, 0, 2606, 1, 0, 51831),
(27709, 0, 27079, 1, 1, 51831),
(27709, 1, 27080, 1, 1, 51831),
(27709, 2, 27081, 1, 1, 51831),
(27753, 0, 27079, 1, 1, 51831),
(27753, 1, 27080, 1, 1, 51831),
(27753, 2, 27081, 1, 1, 51831),
(27909, 0, 24925, 1, 0, 51831),
(27975, 0, 26657, 1, 0, 51831),
(27977, 0, 20909, 1, 100, 51831),
(27978, 0, 27483, 1, 100, 51831),
(27981, 0, 25177, 1, 100, 51831),
(27982, 0, 25754, 1, 0, 51831),
(27983, 0, 25991, 1, 1, 51831),
(27984, 0, 25987, 1, 1, 51831),
(27985, 0, 26148, 1, 0, 51831),
(28070, 0, 26353, 1, 100, 51831),
(28165, 0, 25176, 1, 100, 51831),
(28546, 0, 27484, 1, 0, 51831),
(28547, 0, 8715, 1, 0, 51831),
(28578, 0, 25984, 1, 0, 51831),
(28579, 0, 25982, 1, 0, 51831),
(28580, 0, 25985, 1, 0, 51831),
(28581, 0, 25759, 1, 0, 51831),
(28582, 0, 25754, 1, 0, 51831),
(28583, 0, 25654, 1, 0, 51831),
(28584, 0, 24905, 1, 0, 51831),
(28585, 0, 2170, 1, 0, 51831),
(28586, 0, 27301, 1, 1, 51831), -- scale 1.3!
(28587, 0, 27071, 1, 1, 51831),
(28684, 0, 27394, 1, 0, 51831),
(28695, 0, 25629, 1, 0, 51831),
(28729, 0, 23984, 1, 0, 51831),
(28730, 0, 23568, 1, 0, 51831),
(28731, 0, 25729, 1, 0, 51831),
(28732, 0, 23567, 1, 0, 51831),
(28733, 0, 25258, 1, 0, 51831),
(28734, 0, 25237, 1, 0, 51831),
(28823, 0, 1126, 1, 0, 51831),
(28823, 1, 11686, 1, 1, 51831),
(28826, 0, 26381, 1, 0, 51831),
(28835, 0, 26143, 1, 1, 51831),
(28836, 0, 25756, 1, 1, 51831),
(28837, 0, 25757, 1, 1, 51831),
(28838, 0, 26053, 1, 0, 51831),
(28859, 0, 26752, 1, 0, 51831),
(28860, 0, 27035, 1, 0, 51831),
(28920, 0, 27092, 1, 0, 51831),
(28921, 0, 26776, 1, 0, 51831),
(28922, 0, 27395, 1, 0, 51831), -- scale 1.15!
(28923, 0, 27485, 1, 1, 51831),
(28947, 0, 169, 1, 0, 51831),
(28947, 1, 11686, 1, 1, 51831),
(28961, 0, 25984, 1, 0, 51831),
(28965, 0, 25985, 1, 0, 51831),
(29048, 0, 26937, 1, 0, 51831),
(29062, 0, 25768, 1, 0, 51831),
(29063, 0, 3004, 1, 0, 51831),
(29064, 0, 23564, 1, 0, 51831),
(29240, 0, 26065, 1, 0, 51831), -- scale 1.3!
(29335, 0, 23565, 1, 0, 51831),
(30090, 0, 169, 1, 0, 51831),
(30090, 1, 11686, 1, 1, 51831),
(30118, 0, 169, 1, 0, 51831),
(30118, 1, 14501, 1, 1, 51831), -- 11686, scale 2!
(30449, 0, 27039, 1, 0, 51831),
(30451, 0, 27421, 1, 0, 51831),
(30452, 0, 27082, 1, 0, 51831),
(30616, 0, 1126, 1, 0, 51831),
(30616, 1, 11686, 1, 1, 51831), -- 16925
(30641, 0, 15294, 1, 0, 51831),
(30643, 0, 2172, 1, 0, 51831),
(30882, 0, 28014, 1, 1, 51831),
(30890, 0, 19295, 1, 0, 51831),
(30897, 0, 18783, 1, 0, 51831),
(30897, 1, 27401, 1, 1, 51831), -- 11686
(30898, 0, 18783, 1, 0, 51831),
(30898, 1, 27401, 1, 1, 51831), -- 11686
(30899, 0, 18783, 1, 0, 51831),
(30899, 1, 16925, 1, 1, 51831), -- 11686
(31218, 0, 8311, 1, 0, 51831),
(31219, 0, 12894, 1, 0, 51831),
(31311, 0, 27035, 1, 0, 51831),
(31317, 0, 2172, 1, 0, 51831),
(31520, 0, 27421, 1, 0, 51831),
(31521, 0, 15294, 1, 0, 51831),
(31534, 0, 27082, 1, 0, 51831),
(31535, 0, 27039, 1, 0, 51831),
(31539, 0, 28014, 1, 1, 51831),
(31540, 0, 19295, 1, 0, 51831),
(31541, 0, 8311, 1, 0, 51831),
(31543, 0, 12894, 1, 0, 51831),
(31734, 0, 26752, 1, 0, 51831),
(31749, 0, 26876, 1, 0, 51831),
(31750, 0, 24316, 1, 1, 51831),
(31750, 1, 24317, 1, 1, 51831),
(31750, 2, 24318, 1, 1, 51831),
(31750, 3, 24319, 1, 1, 51831),
(31751, 0, 24316, 1, 1, 51831),
(31751, 1, 24317, 1, 1, 51831),
(31751, 2, 24318, 1, 1, 51831),
(31751, 3, 24319, 1, 1, 51831),
(31752, 0, 25835, 1, 1, 51831),
(32187, 0, 26753, 1, 0, 51831);

View File

@ -0,0 +1,40 @@
-- DB update 2025_10_12_03 -> 2025_10_12_04
DELETE FROM `creature_template_model` WHERE `CreatureID` IN (34382, 34383, 34435, 34476, 34477, 34478, 34479, 34480, 34481, 34482, 34483, 34484, 34644, 34653, 34654, 34675, 34676, 34677, 34678, 34679, 34708, 34710, 34711, 34712, 34713, 34714, 34744, 34768, 35254, 35256, 35260, 35261, 36479, 36506);
INSERT INTO `creature_template_model` (`CreatureID`, `Idx`, `CreatureDisplayID`, `DisplayScale`, `Probability`, `VerifiedBuild`) VALUES
(34382, 0, 29203, 1, 1, 51831),
(34383, 0, 29204, 1, 1, 51831),
(34435, 0, 29226, 1, 1, 51831),
(34476, 0, 29228, 1, 1, 51831),
(34477, 0, 29229, 1, 1, 51831),
(34478, 0, 29230, 1, 1, 51831),
(34479, 0, 29231, 1, 1, 51831),
(34480, 0, 29232, 1, 1, 51831),
(34481, 0, 29233, 1, 1, 51831),
(34482, 0, 29234, 1, 1, 51831),
(34483, 0, 29235, 1, 1, 51831),
(34484, 0, 29236, 1, 1, 51831),
(34644, 0, 29392, 1, 0, 51831),
(34653, 0, 29341, 1, 0, 51831),
(34654, 0, 29330, 1, 0, 51831),
(34675, 0, 29337, 1, 0, 51831),
(34676, 0, 29391, 1, 0, 51831),
(34677, 0, 29338, 1, 0, 51831),
(34678, 0, 29339, 1, 0, 51831),
(34679, 0, 29395, 1, 0, 51831),
(34708, 0, 29324, 1, 0, 51831),
(34710, 0, 29400, 1, 0, 51831),
(34711, 0, 29388, 1, 0, 51831),
(34712, 0, 29365, 1, 0, 51831),
(34713, 0, 29401, 1, 0, 51831),
(34714, 0, 29399, 1, 0, 51831),
(34744, 0, 29444, 1, 0, 51831),
(34768, 0, 29403, 1, 0, 51831),
(35254, 0, 29717, 1, 3, 51831),
(35254, 1, 29718, 1, 3, 51831),
(35254, 2, 29720, 1, 1, 51831),
(35254, 3, 29721, 1, 1, 51831),
(35256, 0, 29719, 1, 1, 51831),
(35260, 0, 29732, 1, 1, 51831),
(35261, 0, 29733, 1, 1, 51831),
(36479, 0, 30120, 1, 1, 51831),
(36506, 0, 30156, 1, 1, 51831);

View File

@ -0,0 +1,23 @@
-- DB update 2025_10_12_04 -> 2025_10_12_05
DELETE FROM `creature_template_model` WHERE `CreatureID` IN (10184, 11262, 12758, 28681, 30084, 30161, 30245, 30248, 30249, 30282, 30592, 32295, 36561);
INSERT INTO `creature_template_model` (`CreatureID`, `Idx`, `CreatureDisplayID`, `DisplayScale`, `Probability`, `VerifiedBuild`) VALUES
(10184, 0, 8570, 1, 0, 51831),
(11262, 0, 397, 1, 0, 51831),
(12758, 0, 11686, 1, 0, 51831),
(28681, 0, 26131, 1, 0, 51831),
(30084, 0, 26753, 1, 0, 51831),
(30161, 0, 25835, 1, 1, 51831),
(30245, 0, 24316, 1, 1, 51831),
(30245, 1, 24317, 1, 1, 51831),
(30245, 2, 24318, 1, 1, 51831),
(30245, 3, 24319, 1, 1, 51831),
(30248, 0, 26876, 1, 0, 51831),
(30249, 0, 24316, 1, 1, 51831),
(30249, 1, 24317, 1, 1, 51831),
(30249, 2, 24318, 1, 1, 51831),
(30249, 3, 24319, 1, 1, 51831),
(30282, 0, 14501, 1, 0, 51831),
(30592, 0, 169, 1, 0, 51831),
(30592, 1, 11686, 1, 1, 51831),
(32295, 0, 27569, 1, 1, 51831),
(36561, 0, 12891, 1, 0, 51831);

View File

@ -0,0 +1,7 @@
-- DB update 2025_10_12_05 -> 2025_10_12_06
--
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=23 AND `SourceEntry`=0 AND `SourceId`=0 AND `SourceGroup` IN (3443, 12919, 15471);
DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 15) AND (`SourceGroup` = 9087) AND (`SourceEntry` = 0) AND (`SourceId` = 0) AND (`ElseGroup` = 0) AND (`ConditionTypeOrReference` = 12) AND (`ConditionTarget` = 0) AND (`ConditionValue1` = 109) AND (`ConditionValue2` = 0) AND (`ConditionValue3` = 0);
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
(15, 9087, 0, 0, 0, 12, 0, 109, 0, 0, 0, 0, 0, '', 'event \'Sun\'s Reach Reclamation Phase Anvil\' must be active');

View File

@ -342,6 +342,7 @@ foreach(ModuleName ${MODULE_LIST__})
foreach(configFileName ${MODULE_CONFIG_LIST})
CopyModuleConfig("${MODULE_CONFIG_PATH}/${configFileName}")
string(REGEX REPLACE "\.dist$" "" configFileName ${configFileName})
set(CONFIG_LIST ${CONFIG_LIST}${configFileName},)
message(STATUS " | * ${configFileName}")
endforeach()

View File

@ -5,7 +5,7 @@
##------------------------------- VARIABLES ---------------------------------##
MODULE_TEMPLATE_URL="https://github.com/azerothcore/skeleton-module/"
GIT_COMMIT_MSG_SETUP="setup_git_commit_template.sh"
GIT_COMMIT_MSG_SETUP="../../apps/git_tools/setup_git_commit_template.sh"
##------------------------------- CODE ---------------------------------##

View File

@ -1,5 +1,8 @@
<!-- First of all, THANK YOU for your contribution. -->
<!-- How to title your Pull Request, Description, Co-Authors (Cherry Pick) and others, please see the link below -->
<!-- https://www.azerothcore.org/wiki/commit-message-guidelines -->
## Changes Proposed:
<!-- If your pull request promotes complex changes that require a detailed explanation, please describe them in detail specifying what your solution is and what is it meant to address. -->
This PR proposes changes to:

View File

@ -412,8 +412,14 @@ T ConfigMgr::GetValueDefault(std::string const& name, T const& def, bool showLog
LOG_FATAL("server.loading", "> Config:\n\nFATAL ERROR: Missing property {} in config file {}, add \"{} = {}\" to this file or define '{}' as an environment variable\n\nYour server cannot start without this option!",
name, _filename, name, Acore::ToString(def), envVarName);
else
{
std::string configs = _filename;
if (!_moduleConfigFiles.empty())
configs += " or module config";
LOG_WARN("server.loading", "> Config: Missing property {} in config file {}, add \"{} = {}\" to this file or define '{}' as an environment variable.",
name, _filename, name, Acore::ToString(def), envVarName);
name, configs, name, def, envVarName);
}
}
return def;
}
@ -471,8 +477,14 @@ std::string ConfigMgr::GetValueDefault<std::string>(std::string const& name, std
LOG_FATAL("server.loading", "> Config:\n\nFATAL ERROR: Missing property {} in config file {}, add \"{} = {}\" to this file or define '{}' as an environment variable.\n\nYour server cannot start without this option!",
name, _filename, name, def, envVarName);
else
{
std::string configs = _filename;
if (!_moduleConfigFiles.empty())
configs += " or module config";
LOG_WARN("server.loading", "> Config: Missing property {} in config file {}, add \"{} = {}\" to this file or define '{}' as an environment variable.",
name, _filename, name, def, envVarName);
name, configs, name, def, envVarName);
}
}
return def;
@ -588,38 +600,13 @@ bool ConfigMgr::LoadModulesConfigs(bool isReload /*= false*/, bool isNeedPrintIn
// Start loading module configs
std::string const& moduleConfigPath = GetConfigPath() + "modules/";
bool isExistDefaultConfig = true;
bool isExistDistConfig = true;
for (auto const& distFileName : _additonalFiles)
for (auto const& fileName : _additonalFiles)
{
std::string defaultFileName = distFileName;
bool isExistConfig = LoadAdditionalFile(moduleConfigPath + fileName, false, isReload);
if (!defaultFileName.empty())
{
defaultFileName.erase(defaultFileName.end() - 5, defaultFileName.end());
}
// Load .conf.dist config
isExistDistConfig = LoadAdditionalFile(moduleConfigPath + distFileName, false, isReload);
if (!isReload && !isExistDistConfig)
{
LOG_FATAL("server.loading", "> ConfigMgr::LoadModulesConfigs: Not found original config '{}'. Stop loading", distFileName);
ABORT();
}
// Load .conf config
isExistDefaultConfig = LoadAdditionalFile(moduleConfigPath + defaultFileName, true, isReload);
if (isExistDefaultConfig && isExistDistConfig)
{
_moduleConfigFiles.emplace_back(defaultFileName);
}
else if (!isExistDefaultConfig && isExistDistConfig)
{
_moduleConfigFiles.emplace_back(distFileName);
}
if (isExistConfig)
_moduleConfigFiles.emplace_back(fileName);
}
if (isNeedPrintInfo)

View File

@ -21,113 +21,81 @@
void EventMap::Reset()
{
_eventMap.clear();
_time = 0;
_phase = 0;
_time = TimePoint::min();
_phaseMask = 0;
}
void EventMap::SetPhase(uint8 phase)
void EventMap::SetPhase(PhaseIndex phase)
{
if (!phase)
{
_phase = 0;
}
else if (phase <= 8)
{
_phase = (1 << (phase - 1));
}
_phaseMask = 0;
else if (phase <= sizeof(PhaseMask) * 8)
_phaseMask = PhaseMask(1u << (phase - 1u));
}
void EventMap::AddPhase(uint8 phase)
void EventMap::AddPhase(PhaseIndex phase)
{
if (phase && phase <= 8)
{
_phase |= (1 << (phase - 1));
}
if (phase && phase <= sizeof(PhaseMask) * 8)
_phaseMask |= PhaseMask(1u << (phase - 1u));
}
void EventMap::RemovePhase(uint8 phase)
void EventMap::RemovePhase(PhaseIndex phase)
{
if (phase && phase <= 8)
{
_phase &= ~(1 << (phase - 1));
}
if (phase && phase <= sizeof(PhaseMask) * 8)
_phaseMask &= PhaseMask(~(1u << (phase - 1u)));
}
void EventMap::ScheduleEvent(uint32 eventId, uint32 time, uint32 group /*= 0*/, uint32 phase /*= 0*/)
void EventMap::ScheduleEvent(EventId eventId, Milliseconds time, GroupIndex group /*= 0u*/, PhaseIndex phase /*= 0u*/)
{
if (group && group <= 8)
{
eventId |= (1 << (group + 15));
}
if (group > sizeof(GroupMask) * 8)
return;
if (phase && phase <= 8)
{
eventId |= (1 << (phase + 23));
}
if (phase > sizeof(PhaseMask) * 8)
return;
_eventMap.emplace(_time + time, eventId);
_eventMap.emplace(_time + time, Event(eventId, group, phase));
}
void EventMap::ScheduleEvent(uint32 eventId, Milliseconds time, uint32 group /*= 0*/, uint8 phase /* = 0*/)
void EventMap::ScheduleEvent(EventId eventId, Milliseconds minTime, Milliseconds maxTime, GroupIndex group /*= 0u*/, PhaseIndex phase /*= 0u*/)
{
ScheduleEvent(eventId, time.count(), group, phase);
ScheduleEvent(eventId, randtime(minTime, maxTime), group, phase);
}
void EventMap::ScheduleEvent(uint32 eventId, Milliseconds minTime, Milliseconds maxTime, uint32 group /*= 0*/, uint32 phase /*= 0*/)
{
ScheduleEvent(eventId, randtime(minTime, maxTime).count(), group, phase);
}
void EventMap::RescheduleEvent(uint32 eventId, uint32 time, uint32 groupId /*= 0*/, uint32 phase/* = 0*/)
void EventMap::RescheduleEvent(EventId eventId, Milliseconds minTime, Milliseconds maxTime, GroupIndex group /*= 0u*/, PhaseIndex phase /*= 0u*/)
{
CancelEvent(eventId);
ScheduleEvent(eventId, time, groupId, phase);
ScheduleEvent(eventId, randtime(minTime, maxTime), group, phase);
}
void EventMap::RescheduleEvent(uint32 eventId, Milliseconds time, uint32 group /*= 0*/, uint8 phase /* = 0*/)
void EventMap::RescheduleEvent(EventId eventId, Milliseconds time, GroupIndex group /*= 0u*/, PhaseIndex phase /*= 0u*/)
{
CancelEvent(eventId);
ScheduleEvent(eventId, time.count(), group, phase);
}
void EventMap::RescheduleEvent(uint32 eventId, Milliseconds minTime, Milliseconds maxTime, uint32 group /*= 0*/, uint32 phase /*= 0*/)
{
CancelEvent(eventId);
ScheduleEvent(eventId, randtime(minTime, maxTime).count(), group, phase);
}
void EventMap::RepeatEvent(uint32 time)
{
_eventMap.emplace(_time + time, _lastEvent);
ScheduleEvent(eventId, time, group, phase);
}
void EventMap::Repeat(Milliseconds time)
{
RepeatEvent(time.count());
_eventMap.emplace(_time + time, _lastEvent);
}
void EventMap::Repeat(Milliseconds minTime, Milliseconds maxTime)
{
RepeatEvent(randtime(minTime, maxTime).count());
Repeat(randtime(minTime, maxTime));
}
uint32 EventMap::ExecuteEvent()
EventMap::EventId EventMap::ExecuteEvent()
{
while (!Empty())
{
auto const& itr = _eventMap.begin();
if (itr->first > _time)
{
return 0;
}
else if (_phase && (itr->second & 0xFF000000) && !((itr->second >> 24) & _phase))
{
else if (_phaseMask && itr->second._phaseMask && !(itr->second._phaseMask & _phaseMask))
_eventMap.erase(itr);
}
else
{
uint32 eventId = (itr->second & 0x0000FFFF);
auto eventId = itr->second._id;
_lastEvent = itr->second;
_eventMap.erase(itr);
return eventId;
@ -137,30 +105,32 @@ uint32 EventMap::ExecuteEvent()
return 0;
}
void EventMap::DelayEvents(uint32 delay)
{
_time = delay < _time ? _time - delay : 0;
}
void EventMap::DelayEvents(Milliseconds delay)
{
DelayEvents(delay.count());
if (Empty())
return;
EventStore delayed = std::move(_eventMap);
for (auto itr = delayed.begin(); itr != delayed.end();)
{
auto node = delayed.extract(itr++);
node.key() = node.key() + delay;
_eventMap.insert(_eventMap.end(), std::move(node));
}
}
void EventMap::DelayEvents(uint32 delay, uint32 group)
void EventMap::DelayEvents(Milliseconds delay, GroupIndex group)
{
if (group > 8 || Empty())
{
if (group > sizeof(GroupMask) * 8 || Empty())
return;
}
EventStore delayed;
for (EventStore::iterator itr = _eventMap.begin(); itr != _eventMap.end();)
for (auto itr = _eventMap.begin(); itr != _eventMap.end();)
{
if (!group || (itr->second & (1 << (group + 15))))
if (!group || (itr->second._groupMask & GroupMask(1u << (group - 1u))))
{
delayed.insert(EventStore::value_type(itr->first + delay, itr->second));
delayed.emplace(itr->first + delay, itr->second);
itr = _eventMap.erase(itr);
continue;
}
@ -171,13 +141,13 @@ void EventMap::DelayEvents(uint32 delay, uint32 group)
_eventMap.insert(delayed.begin(), delayed.end());
}
void EventMap::DelayEventsToMax(uint32 delay, uint32 group)
void EventMap::DelayEventsToMax(Milliseconds delay, GroupIndex group)
{
for (auto itr = _eventMap.begin(); itr != _eventMap.end();)
{
if (itr->first < _time + delay && (group == 0 || ((1 << (group + 15)) & itr->second)))
if (itr->first < _time + delay && (!group || (itr->second._groupMask & GroupMask(1u << (group - 1u)))))
{
ScheduleEvent(itr->second, delay);
ScheduleEvent(itr->second._id, delay, group);
_eventMap.erase(itr);
itr = _eventMap.begin();
continue;
@ -187,16 +157,14 @@ void EventMap::DelayEventsToMax(uint32 delay, uint32 group)
}
}
void EventMap::CancelEvent(uint32 eventId)
void EventMap::CancelEvent(EventId eventId)
{
if (Empty())
{
return;
}
for (auto itr = _eventMap.begin(); itr != _eventMap.end();)
{
if (eventId == (itr->second & 0x0000FFFF))
if (eventId == itr->second._id)
{
itr = _eventMap.erase(itr);
continue;
@ -206,17 +174,14 @@ void EventMap::CancelEvent(uint32 eventId)
}
}
void EventMap::CancelEventGroup(uint32 group)
void EventMap::CancelEventGroup(GroupIndex group)
{
if (!group || group > 8 || Empty())
{
if (!group || group > sizeof(GroupMask) * 8 || Empty())
return;
}
uint32 groupMask = (1 << (group + 15));
for (EventStore::iterator itr = _eventMap.begin(); itr != _eventMap.end();)
for (auto itr = _eventMap.begin(); itr != _eventMap.end();)
{
if (itr->second & groupMask)
if (itr->second._groupMask & GroupMask(1u << (group - 1u)))
{
_eventMap.erase(itr);
itr = _eventMap.begin();
@ -227,39 +192,21 @@ void EventMap::CancelEventGroup(uint32 group)
}
}
uint32 EventMap::GetNextEventTime(uint32 eventId) const
bool EventMap::IsInPhase(PhaseIndex phase) const
{
if (Empty())
{
return 0;
}
for (auto const& itr : _eventMap)
{
if (eventId == (itr.second & 0x0000FFFF))
{
return itr.first;
}
}
return 0;
return phase <= sizeof(PhaseIndex) * 8 && (!phase || _phaseMask & PhaseMask(1u << (phase - 1u)));
}
uint32 EventMap::GetNextEventTime() const
Milliseconds EventMap::GetTimeUntilEvent(EventId eventId) const
{
return Empty() ? 0 : _eventMap.begin()->first;
}
bool EventMap::IsInPhase(uint8 phase)
{
return phase <= 8 && (!phase || _phase & (1 << (phase - 1)));
}
Milliseconds EventMap::GetTimeUntilEvent(uint32 eventId) const
{
for (std::pair<uint32 const, uint32> const& itr : _eventMap)
if (eventId == (itr.second & 0x0000FFFF))
return std::chrono::duration_cast<Milliseconds>(Milliseconds(itr.first) - Milliseconds(_time));
for (auto const& [time, event] : _eventMap)
if (eventId == event._id)
return std::chrono::duration_cast<Milliseconds>(time - _time);
return Milliseconds::max();
}
bool EventMap::HasTimeUntilEvent(EventId eventId) const
{
return GetTimeUntilEvent(eventId) != Milliseconds::max();
}

View File

@ -24,18 +24,31 @@
class EventMap
{
using EventId = uint16;
using GroupIndex = uint8;
using GroupMask = uint8;
using PhaseIndex = uint8;
using PhaseMask = uint8;
struct Event
{
Event() = default;
Event(EventId id, GroupIndex groupIndex, PhaseIndex phaseIndex) :
_id(id),
_groupMask(groupIndex ? GroupMask(1u << (groupIndex - 1u)) : 0u),
_phaseMask(phaseIndex ? PhaseMask(1u << (phaseIndex - 1u)) : 0u)
{
}
EventId _id = 0u;
GroupMask _groupMask = 0u;
PhaseMask _phaseMask = 0u;
};
/**
* Internal storage type.
* Key: Time as TimePoint when the event should occur.
* Value: The event data as uint32.
*
* Structure of event data:
* - Bit 0 - 15: Event Id.
* - Bit 16 - 23: Group
* - Bit 24 - 31: Phase
* - Pattern: 0xPPGGEEEE
*/
typedef std::multimap<uint32, uint32> EventStore;
* Internal storage type.
* Key: Time as TimePoint when the event should occur.
*/
using EventStore = std::multimap<TimePoint, Event>;
public:
EventMap() { }
@ -47,13 +60,13 @@ public:
void Reset();
/**
* @name Update
* @brief Updates the timer of the event map.
* @param time Value to be added to time.
*/
* @name Update
* @brief Updates the timer of the event map.
* @param time Value to be added to time.
*/
void Update(uint32 time)
{
_time += time;
Update(Milliseconds(time));
}
/**
@ -63,37 +76,23 @@ public:
*/
void Update(Milliseconds time)
{
_time += static_cast<uint32>(time.count());
}
/**
* @name GetTimer
* @return Current timer value.
*/
[[nodiscard]] uint32 GetTimer() const
{
return _time;
}
void SetTimer(uint32 time)
{
_time = time;
_time += time;
}
/**
* @name GetPhaseMask
* @return Active phases as mask.
*/
[[nodiscard]] uint8 GetPhaseMask() const
PhaseMask GetPhaseMask() const
{
return _phase;
return _phaseMask;
}
/**
* @name Empty
* @return True, if there are no events scheduled.
*/
[[nodiscard]] bool Empty() const
bool Empty() const
{
return _eventMap.empty();
}
@ -103,31 +102,21 @@ public:
* @brief Sets the phase of the map (absolute).
* @param phase Phase which should be set. Values: 1 - 8. 0 resets phase.
*/
void SetPhase(uint8 phase);
void SetPhase(PhaseIndex phase);
/**
* @name AddPhase
* @brief Activates the given phase (bitwise).
* @brief Activates the given phase (absolute).
* @param phase Phase which should be activated. Values: 1 - 8
*/
void AddPhase(uint8 phase);
void AddPhase(PhaseIndex phase);
/**
* @name RemovePhase
* @brief Deactivates the given phase (bitwise).
* @brief Deactivates the given phase (absolute).
* @param phase Phase which should be deactivated. Values: 1 - 8.
*/
void RemovePhase(uint8 phase);
/**
* @name ScheduleEvent
* @brief Creates new event entry in map.
* @param eventId The id of the new event.
* @param time The time in milliseconds until the event occurs.
* @param group The group which the event is associated to. Has to be between 1 and 8. 0 means it has no group.
* @param phase The phase in which the event can occur. Has to be between 1 and 8. 0 means it can occur in all phases.
*/
void ScheduleEvent(uint32 eventId, uint32 time, uint32 group = 0, uint32 phase = 0);
void RemovePhase(PhaseIndex phase);
/**
* @name ScheduleEvent
@ -137,7 +126,7 @@ public:
* @param group The group which the event is associated to. Has to be between 1 and 8. 0 means it has no group.
* @param phase The phase in which the event can occur. Has to be between 1 and 8. 0 means it can occur in all phases.
*/
void ScheduleEvent(uint32 eventId, Milliseconds time, uint32 group = 0, uint8 phase = 0);
void ScheduleEvent(EventId eventId, Milliseconds time, GroupIndex group = 0u, PhaseIndex phase = 0u);
/**
* @name ScheduleEvent
@ -148,17 +137,7 @@ public:
* @param group The group which the event is associated to. Has to be between 1 and 8. 0 means it has no group.
* @param phase The phase in which the event can occur. Has to be between 1 and 8. 0 means it can occur in all phases.
*/
void ScheduleEvent(uint32 eventId, Milliseconds minTime, Milliseconds maxTime, uint32 group = 0, uint32 phase = 0);
/**
* @name RescheduleEvent
* @brief Cancels the given event and reschedules it.
* @param eventId The id of the event.
* @param time The time in milliseconds until the event occurs.
* @param group The group which the event is associated to. Has to be between 1 and 8. 0 means it has no group.
* @param phase The phase in which the event can occur. Has to be between 1 and 8. 0 means it can occur in all phases.
*/
void RescheduleEvent(uint32 eventId, uint32 time, uint32 groupId = 0, uint32 phase = 0);
void ScheduleEvent(EventId eventId, Milliseconds minTime, Milliseconds maxTime, GroupIndex group = 0u, PhaseIndex phase = 0u);
/**
* @name RescheduleEvent
@ -168,7 +147,7 @@ public:
* @param group The group which the event is associated to. Has to be between 1 and 8. 0 means it has no group.
* @param phase The phase in which the event can occur. Has to be between 1 and 8. 0 means it can occur in all phases.
*/
void RescheduleEvent(uint32 eventId, Milliseconds time, uint32 group = 0, uint8 phase = 0);
void RescheduleEvent(EventId eventId, Milliseconds time, GroupIndex group = 0u, PhaseIndex phase = 0u);
/**
* @name RescheduleEvent
@ -179,25 +158,17 @@ public:
* @param group The group which the event is associated to. Has to be between 1 and 8. 0 means it has no group.
* @param phase The phase in which the event can occur. Has to be between 1 and 8. 0 means it can occur in all phases.
*/
void RescheduleEvent(uint32 eventId, Milliseconds minTime, Milliseconds maxTime, uint32 group = 0, uint32 phase = 0);
void RescheduleEvent(EventId eventId, Milliseconds minTime, Milliseconds maxTime, GroupIndex group = 0u, PhaseIndex phase = 0u);
/**
* @name RepeatEvent
* @brief Repeats the most recently executed event.
* @param time Time until the event occurs as std::chrono type.
*/
void RepeatEvent(uint32 time);
/**
* @name RepeatEvent
* @name Repeat
* @brief Repeats the most recently executed event.
* @param time Time until the event occurs as std::chrono type.
*/
void Repeat(Milliseconds time);
/**
* @name RepeatEvent
* @name Repeat
* @brief Repeats the most recently executed event.
* @param minTime The minimum time until the event occurs as std::chrono type.
* @param maxTime The maximum time until the event occurs as std::chrono type.
@ -209,14 +180,7 @@ public:
* @brief Returns the next event to execute and removes it from map.
* @return Id of the event to execute.
*/
uint32 ExecuteEvent();
/**
* @name DelayEvents
* @brief Delays all events in the map. If delay is greater than or equal internal timer, delay will be 0.
* @param delay Amount of delay.
*/
void DelayEvents(uint32 delay);
EventId ExecuteEvent();
/**
* @name DelayEvents
@ -228,62 +192,57 @@ public:
/**
* @name DelayEvents
* @brief Delay all events of the same group.
* @param delay Amount of delay.
* @param delay Amount of delay as std::chrono type.
* @param group Group of the events.
*/
void DelayEvents(uint32 delay, uint32 group);
void DelayEvents(Milliseconds delay, GroupIndex group);
/**
* @name EventsEvents
* @brief Delay all events of the same group.
* @param delay Amount of delay.
* @param delay Amount of delay as std::chrono type.
* @param group Group of the events.
*/
void DelayEventsToMax(uint32 delay, uint32 group);
void DelayEventsToMax(Milliseconds delay, GroupIndex group);
/**
* @name CancelEvent
* @brief Cancels all events of the specified id.
* @param eventId Event id to cancel.
*/
void CancelEvent(uint32 eventId);
void CancelEvent(EventId eventId);
/**
* @name CancelEventGroup
* @brief Cancel events belonging to specified group.
* @param group Group to cancel.
*/
void CancelEventGroup(uint32 group);
/**
* @name GetNextEventTime
* @brief Returns closest occurence of specified event.
* @param eventId Wanted event id.
* @return Time of found event.
*/
[[nodiscard]] uint32 GetNextEventTime(uint32 eventId) const;
/**
* @name GetNextEventTime
* @return Time of next event.
*/
[[nodiscard]] uint32 GetNextEventTime() const;
void CancelEventGroup(GroupIndex group);
/**
* @name IsInPhase
* @brief Returns wether event map is in specified phase or not.
* @brief Returns whether event map is in specified phase or not.
* @param phase Wanted phase.
* @return True, if phase of event map contains specified phase.
*/
bool IsInPhase(uint8 phase);
bool IsInPhase(PhaseIndex phase) const;
/**
* @name GetTimeUntilEvent
* @brief Returns time as std::chrono type until next event.
* @param eventId of the event.
* @param eventId The id of the event.
* @return Time of next event. If event is not scheduled returns Milliseconds::max()
* @return Time of next event.
*/
Milliseconds GetTimeUntilEvent(uint32 eventId) const;
Milliseconds GetTimeUntilEvent(EventId eventId) const;
/**
* @name HasTimeUntilEvent
* @brief Returns whether an event is scheduled
* @param eventId The id of the event.
* @return True if event is scheduled
*/
bool HasTimeUntilEvent(EventId eventId) const;
private:
/**
@ -296,23 +255,23 @@ private:
* has reached their time value. Its value is changed in the
* Update method.
*/
uint32 _time{ 0 };
TimePoint _time{ TimePoint::min() };
/**
* @name _phase
* @name _phaseMask
* @brief Phase mask of the event map.
*
* Contains the phases the event map is in. Multiple
* phases from 1 to 8 can be set with SetPhase or
* AddPhase. RemovePhase deactives a phase.
*/
uint32 _phase{0};
PhaseMask _phaseMask{ 0 };
/**
* @name _lastEvent
* @brief Stores information on the most recently executed event
*/
uint32 _lastEvent{0};
Event _lastEvent;
/**
* @name _eventMap

View File

@ -343,6 +343,14 @@ Updates.AllowRehash = 1
Updates.CleanDeadRefMaxCount = 3
#
# Updates.ExceptionShutdownDelay
# Description: Time (in milliseconds) to wait before shutting down after a fatal exception (e.g. failed SQL update).
# Default: 10000 - 10 seconds
# 0 - Disabled (immediate shutdown)
Updates.ExceptionShutdownDelay = 10000
#
###################################################################################################
@ -2415,6 +2423,18 @@ Rate.Reputation.LowLevel.Quest = 1
Rate.Reputation.RecruitAFriendBonus = 0.1
#
# Rate.Reputation.Gain.WSG
# Rate.Reputation.Gain.AB
# Rate.Reputation.Gain.AV
# Description: Reputation bonus rate for WSG, AB and AV battlegrounds.
# This is applied IN ADDITION to the global Rate.Reputation.Gain.
# Default: 1
Rate.Reputation.Gain.WSG = 1
Rate.Reputation.Gain.AB = 1
Rate.Reputation.Gain.AV = 1
#
###################################################################################################

View File

@ -496,17 +496,13 @@ void DBUpdater<T>::ApplyFile(DatabaseWorkerPool<T>& pool, std::string const& hos
if (ssl == "ssl")
args.emplace_back("--ssl-mode=REQUIRED");
// Execute sql file
args.emplace_back("-e");
args.emplace_back(Acore::StringFormat("BEGIN; SOURCE {}; COMMIT;", path.generic_string()));
// Database
if (!database.empty())
args.emplace_back(database);
// Invokes a mysql process which doesn't leak credentials to logs
int const ret = Acore::StartProcess(DBUpdaterUtil::GetCorrectedMySQLExecutable(), args,
"sql.updates", "", true);
"sql.updates", path.generic_string(), true);
if (ret != EXIT_SUCCESS)
{
@ -518,7 +514,12 @@ void DBUpdater<T>::ApplyFile(DatabaseWorkerPool<T>& pool, std::string const& hos
path.generic_string(), pool.GetConnectionInfo()->database);
if (!sConfigMgr->isDryRun())
{
if (uint32 delay = sConfigMgr->GetOption<uint32>("Updates.ExceptionShutdownDelay", 10000))
std::this_thread::sleep_for(Milliseconds(delay));
throw UpdateException("update failed");
}
}
}

View File

@ -80,7 +80,7 @@ void CombatAI::JustEngagedWith(Unit* who)
if (AISpellInfo[*i].condition == AICOND_AGGRO)
me->CastSpell(who, *i, false);
else if (AISpellInfo[*i].condition == AICOND_COMBAT)
events.ScheduleEvent(*i, AISpellInfo[*i].cooldown + rand() % AISpellInfo[*i].cooldown);
events.ScheduleEvent(*i, Milliseconds(AISpellInfo[*i].cooldown + rand() % AISpellInfo[*i].cooldown));
}
}
@ -97,7 +97,7 @@ void CombatAI::UpdateAI(uint32 diff)
if (uint32 spellId = events.ExecuteEvent())
{
DoCast(spellId);
events.ScheduleEvent(spellId, AISpellInfo[spellId].cooldown + rand() % AISpellInfo[spellId].cooldown);
events.ScheduleEvent(spellId, Milliseconds(AISpellInfo[spellId].cooldown + rand() % AISpellInfo[spellId].cooldown));
}
else
DoMeleeAttackIfReady();
@ -143,7 +143,7 @@ void CasterAI::JustEngagedWith(Unit* who)
DoCast(spells[spell]);
cooldown += me->GetCurrentSpellCastTime(*itr);
}
events.ScheduleEvent(*itr, cooldown);
events.ScheduleEvent(*itr, Milliseconds(cooldown));
}
}
}
@ -168,7 +168,7 @@ void CasterAI::UpdateAI(uint32 diff)
{
DoCast(spellId);
uint32 casttime = me->GetCurrentSpellCastTime(spellId);
events.ScheduleEvent(spellId, (casttime ? casttime : 500) + GetAISpellInfo(spellId)->realCooldown);
events.ScheduleEvent(spellId, Milliseconds((casttime ? casttime : 500) + GetAISpellInfo(spellId)->realCooldown));
}
}

View File

@ -46,7 +46,7 @@ public:
// Pass parameters between AI
virtual void DoAction(int32 /*param = 0 */) {}
virtual void SetGUID(ObjectGuid /*guid*/, int32 /*id = 0 */) {}
virtual void SetGUID(ObjectGuid const& /*guid*/, int32 /*id = 0 */) {}
virtual ObjectGuid GetGUID(int32 /*id = 0 */) const { return ObjectGuid::Empty; }
static int32 Permissible(GameObject const* go);

View File

@ -217,7 +217,7 @@ public:
virtual void DoAction(int32 /*param*/) {}
virtual uint32 GetData(uint32 /*id = 0*/) const { return 0; }
virtual void SetData(uint32 /*id*/, uint32 /*value*/) {}
virtual void SetGUID(ObjectGuid /*guid*/, int32 /*id*/ = 0) {}
virtual void SetGUID(ObjectGuid const& /*guid*/, int32 /*id*/ = 0) {}
virtual ObjectGuid GetGUID(int32 /*id*/ = 0) const { return ObjectGuid::Empty; }
// Select the best target (in <targetType> order) from the threat list that fulfill the following:

View File

@ -50,9 +50,9 @@ AISpellInfoType* GetAISpellInfo(uint32 i) { return &CreatureAI::AISpellInfo[i];
* @param WorldObject target The target of the speech, in case it has elements such as $n, where the target's name will be referrenced.
* @param Milliseconds delay Delay until the creature says the text line. Creatures will talk immediately by default.
*/
void CreatureAI::Talk(uint8 id, WorldObject const* target /*= nullptr*/, Milliseconds delay /*= 0s*/)
void CreatureAI::Talk(uint8 id, WorldObject const* target /*= nullptr*/, Milliseconds delay /*= 0ms*/)
{
if (delay > Seconds::zero())
if (delay > 0ms)
{
ObjectGuid targetGuid;

View File

@ -94,7 +94,7 @@ public:
EVADE_REASON_OTHER
};
void Talk(uint8 id, WorldObject const* whisperTarget = nullptr, Milliseconds delay = 0s);
void Talk(uint8 id, WorldObject const* whisperTarget = nullptr, Milliseconds delay = 0ms);
void Talk(uint8 id, Milliseconds delay) { Talk(id, nullptr, delay); }
WorldObject* GetSummoner() const;

View File

@ -68,7 +68,7 @@ void SummonList::DespawnEntry(uint32 entry)
}
}
void SummonList::DespawnAll(uint32 delay /*= 0*/)
void SummonList::DespawnAll(Milliseconds delay /*= 0ms*/)
{
while (!storage_.empty())
{
@ -325,13 +325,13 @@ void ScriptedAI::ScheduleTimedEvent(Milliseconds timerMin, Milliseconds timerMax
return;
}
scheduler.Schedule(timerMin == 0s ? timerMax : timerMin, timerMax, [exec, repeatMin, repeatMax, uniqueId](TaskContext context)
scheduler.Schedule(timerMin == 0ms ? timerMax : timerMin, timerMax, [exec, repeatMin, repeatMax, uniqueId](TaskContext context)
{
exec();
if (!uniqueId)
{
repeatMax > 0s ? context.Repeat(repeatMin, repeatMax) : context.Repeat(repeatMin);
repeatMax > 0ms ? context.Repeat(repeatMin, repeatMax) : context.Repeat(repeatMin);
}
});
@ -531,10 +531,6 @@ void ScriptedAI::SetEquipmentSlots(bool loadDefault, int32 mainHand /*= EQUIP_NO
if (loadDefault)
{
me->LoadEquipment(me->GetOriginalEquipmentId(), true);
if (me->HasWeapon(OFF_ATTACK))
me->SetCanDualWield(true);
else
me->SetCanDualWield(false);
return;
}
@ -547,10 +543,6 @@ void ScriptedAI::SetEquipmentSlots(bool loadDefault, int32 mainHand /*= EQUIP_NO
if (offHand >= 0)
{
me->SetVirtualItem(1, uint32(offHand));
if (offHand >= 1)
me->SetCanDualWield(true);
else
me->SetCanDualWield(false);
}
if (ranged >= 0)
@ -662,7 +654,7 @@ void BossAI::_JustEngagedWith()
ScheduleTasks();
if (callForHelpRange)
{
ScheduleTimedEvent(0s, [&]
ScheduleTimedEvent(0ms, [&]
{
me->CallForHelp(callForHelpRange);
}, 2s);

View File

@ -88,7 +88,7 @@ public:
void Summon(Creature const* summon) { storage_.push_back(summon->GetGUID()); }
void Despawn(Creature const* summon) { storage_.remove(summon->GetGUID()); }
void DespawnEntry(uint32 entry);
void DespawnAll(uint32 delay = 0);
void DespawnAll(Milliseconds delay = 0ms);
bool IsAnyCreatureAlive() const;
bool IsAnyCreatureWithEntryAlive(uint32 entry) const;
bool IsAnyCreatureInCombat() const;
@ -355,11 +355,11 @@ struct ScriptedAI : public CreatureAI
void ClearUniqueTimedEventsDone() { _uniqueTimedEvents.clear(); }
// Schedules a timed event using task scheduler.
void ScheduleTimedEvent(Milliseconds timerMin, Milliseconds timerMax, std::function<void()> exec, Milliseconds repeatMin, Milliseconds repeatMax = 0s, uint32 uniqueId = 0);
void ScheduleTimedEvent(Milliseconds timerMax, std::function<void()> exec, Milliseconds repeatMin, Milliseconds repeatMax = 0s, uint32 uniqueId = 0) { ScheduleTimedEvent(0s, timerMax, exec, repeatMin, repeatMax, uniqueId); };
void ScheduleTimedEvent(Milliseconds timerMin, Milliseconds timerMax, std::function<void()> exec, Milliseconds repeatMin, Milliseconds repeatMax = 0ms, uint32 uniqueId = 0);
void ScheduleTimedEvent(Milliseconds timerMax, std::function<void()> exec, Milliseconds repeatMin, Milliseconds repeatMax = 0ms, uint32 uniqueId = 0) { ScheduleTimedEvent(0ms, timerMax, exec, repeatMin, repeatMax, uniqueId); };
// Schedules a timed event using task scheduler that never repeats. Requires an unique non-zero ID.
void ScheduleUniqueTimedEvent(Milliseconds timer, std::function<void()> exec, uint32 uniqueId) { ScheduleTimedEvent(0s, timer, exec, 0s, 0s, uniqueId); };
void ScheduleUniqueTimedEvent(Milliseconds timer, std::function<void()> exec, uint32 uniqueId) { ScheduleTimedEvent(0ms, timer, exec, 0ms, 0ms, uniqueId); };
bool HealthBelowPct(uint32 pct) const { return me->HealthBelowPct(pct); }
bool HealthAbovePct(uint32 pct) const { return me->HealthAbovePct(pct); }
@ -463,7 +463,7 @@ enum HealthCheckStatus
struct HealthCheckEventData
{
HealthCheckEventData(uint8 healthPct, std::function<void()> exec, uint8 status = HEALTH_CHECK_SCHEDULED, bool allowedWhileCasting = true, Milliseconds Delay = 0s) : _healthPct(healthPct), _exec(exec), _status(status), _allowedWhileCasting(allowedWhileCasting), _delay(Delay) { };
HealthCheckEventData(uint8 healthPct, std::function<void()> exec, uint8 status = HEALTH_CHECK_SCHEDULED, bool allowedWhileCasting = true, Milliseconds Delay = 0ms) : _healthPct(healthPct), _exec(exec), _status(status), _allowedWhileCasting(allowedWhileCasting), _delay(Delay) { };
uint8 _healthPct;
std::function<void()> _exec;

View File

@ -42,7 +42,7 @@ void AddGossipItemFor(Player* player, uint32 gossipMenuID, uint32 gossipMenuItem
player->PlayerTalkClass->GetGossipMenu().AddMenuItem(gossipMenuID, gossipMenuItemID, sender, action, boxMoney);
}
void SendGossipMenuFor(Player* player, uint32 npcTextID, ObjectGuid const guid)
void SendGossipMenuFor(Player* player, uint32 npcTextID, ObjectGuid const& guid)
{
player->PlayerTalkClass->SendGossipMenu(npcTextID, guid);
}

View File

@ -94,7 +94,7 @@ void AddGossipItemFor(Player* player, uint32 icon, std::string const& text, uint
void AddGossipItemFor(Player* player, uint32 gossipMenuID, uint32 gossipMenuItemID, uint32 sender, uint32 action, uint32 boxMoney = 0);
// Send menu text
void SendGossipMenuFor(Player* player, uint32 npcTextID, ObjectGuid const guid);
void SendGossipMenuFor(Player* player, uint32 npcTextID, ObjectGuid const& guid);
void SendGossipMenuFor(Player* player, uint32 npcTextID, Creature const* creature);
// Close menu

View File

@ -410,7 +410,7 @@ void SmartAI::UpdatePath(const uint32 diff)
// Xinef: allow to properly hook out of range despawn action, which in most cases should perform the same operation as dying
GetScript()->ProcessEventsFor(SMART_EVENT_DEATH, me);
me->DespawnOrUnsummon(1);
me->DespawnOrUnsummon(1ms);
return;
}
mEscortInvokerCheckTimer = 1000;
@ -993,7 +993,7 @@ void SmartAI::SetData(uint32 id, uint32 value, WorldObject* invoker)
GetScript()->ProcessEventsFor(SMART_EVENT_DATA_SET, unit, id, value, false, nullptr, gob);
}
void SmartAI::SetGUID(ObjectGuid /*guid*/, int32 /*id*/)
void SmartAI::SetGUID(ObjectGuid const& /*guid*/, int32 /*id*/)
{
}

View File

@ -164,7 +164,7 @@ public:
void SetData(uint32 id, uint32 value, WorldObject* invoker);
// Used in scripts to share variables
void SetGUID(ObjectGuid guid, int32 id = 0) override;
void SetGUID(ObjectGuid const& guid, int32 id = 0) override;
// Used in scripts to share variables
ObjectGuid GetGUID(int32 id = 0) const override;

View File

@ -640,7 +640,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
Unit* caster = me;
// Areatrigger Cast!
if (e.GetScriptType() == SMART_SCRIPT_TYPE_AREATRIGGER)
if (e.IsAreatriggerScript())
caster = unit->SummonTrigger(unit->GetPositionX(), unit->GetPositionY(), unit->GetPositionZ(), unit->GetOrientation(), 5000);
if (e.action.cast.targetsLimit)
@ -3990,27 +3990,29 @@ void SmartScript::GetTargets(ObjectVector& targets, SmartScriptHolder const& e,
}
case SMART_TARGET_INSTANCE_STORAGE:
{
if (InstanceScript* instance = GetBaseObject()->GetInstanceScript())
{
if (e.target.instanceStorage.type == 1)
{
if (Creature* creature = instance->GetCreature(e.target.instanceStorage.index))
{
targets.push_back(creature);
}
}
else if (e.target.instanceStorage.type == 2)
{
if (GameObject* go = instance->GetGameObject(e.target.instanceStorage.index))
{
targets.push_back(go);
}
}
}
InstanceScript* instance = nullptr;
if (e.IsAreatriggerScript() && scriptTrigger)
instance = scriptTrigger->GetInstanceScript();
else
instance = GetBaseObject()->GetInstanceScript();
if (!instance)
{
LOG_ERROR("scripts.ai.sai", "SMART_TARGET_INSTANCE_STORAGE: Entry {} SourceType {} Event {} Action {} Target {} called outside an instance map.",
e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.GetTargetType());
return;
}
if (e.target.instanceStorage.type == 1)
{
if (Creature* creature = instance->GetCreature(e.target.instanceStorage.index))
targets.push_back(creature);
}
else if (e.target.instanceStorage.type == 2)
{
if (GameObject* go = instance->GetGameObject(e.target.instanceStorage.index))
targets.push_back(go);
}
break;

View File

@ -555,6 +555,7 @@ bool SmartAIMgr::IsTargetValid(SmartScriptHolder const& e)
case SMART_TARGET_RANDOM_POINT:
case SMART_TARGET_ROLE_SELECTION:
case SMART_TARGET_LOOT_RECIPIENTS:
case SMART_TARGET_VEHICLE_PASSENGER:
case SMART_EVENT_SUMMONED_UNIT_DIES:
case SMART_EVENT_SUMMONED_UNIT_EVADE:
case SMART_TARGET_PLAYER_RANGE:
@ -866,6 +867,7 @@ bool SmartAIMgr::CheckUnusedActionParams(SmartScriptHolder const& e)
case SMART_ACTION_ZONE_UNDER_ATTACK: return NO_PARAMS;
case SMART_ACTION_LOAD_GRID: return NO_PARAMS;
case SMART_ACTION_MUSIC: return sizeof(SmartAction::music);
case SMART_ACTION_DO_ACTION: return sizeof(SmartAction::doAction);
case SMART_ACTION_SET_GUID: return sizeof(SmartAction::setGuid);
case SMART_ACTION_SCRIPTED_SPAWN: return sizeof(SmartAction::scriptSpawn);
case SMART_ACTION_SET_SCALE: return sizeof(SmartAction::setScale);

View File

@ -1993,6 +1993,8 @@ public:
uint32 GetActionType() const { return (uint32)action.type; }
uint32 GetTargetType() const { return (uint32)target.type; }
[[nodiscard]] bool IsAreatriggerScript() const { return source_type == SMART_SCRIPT_TYPE_AREATRIGGER; }
uint32 timer;
uint32 priority;
bool active;

View File

@ -855,7 +855,7 @@ GameObject* Battlefield::SpawnGameObject(uint32 entry, float x, float y, float z
return go;
}
Creature* Battlefield::GetCreature(ObjectGuid const guid)
Creature* Battlefield::GetCreature(ObjectGuid const& guid)
{
if (!m_Map)
return nullptr;
@ -863,7 +863,7 @@ Creature* Battlefield::GetCreature(ObjectGuid const guid)
return m_Map->GetCreature(guid);
}
GameObject* Battlefield::GetGameObject(ObjectGuid const guid)
GameObject* Battlefield::GetGameObject(ObjectGuid const& guid)
{
if (!m_Map)
return nullptr;

View File

@ -146,6 +146,7 @@ class BfGraveyard
{
public:
BfGraveyard(Battlefield* Bf);
virtual ~BfGraveyard() = default;
// Method to changing who controls the graveyard
void GiveControlTo(TeamId team);
@ -302,8 +303,8 @@ public:
Creature* SpawnCreature(uint32 entry, Position pos, TeamId teamId);
GameObject* SpawnGameObject(uint32 entry, float x, float y, float z, float o);
Creature* GetCreature(ObjectGuid const guid);
GameObject* GetGameObject(ObjectGuid const guid);
Creature* GetCreature(ObjectGuid const& guid);
GameObject* GetGameObject(ObjectGuid const& guid);
// Script-methods

View File

@ -415,7 +415,7 @@ void BattlefieldWG::OnBattleEnd(bool endByTimer)
{
for (GuidUnorderedSet::const_iterator itr = m_vehicles[team].begin(); itr != m_vehicles[team].end(); ++itr)
if (Creature* creature = GetCreature(*itr))
creature->DespawnOrUnsummon(1);
creature->DespawnOrUnsummon(1ms);
m_vehicles[team].clear();
}

View File

@ -101,7 +101,7 @@ void BattlegroundAB::PostUpdateImpl(uint32 diff)
uint8 controlledPoints = _controlledPoints[teamId];
if (controlledPoints == 0)
{
_bgEvents.ScheduleEvent(eventId, 3000);
_bgEvents.ScheduleEvent(eventId, 3s);
break;
}
@ -115,7 +115,7 @@ void BattlegroundAB::PostUpdateImpl(uint32 diff)
if (honorRewards < uint8(m_TeamScores[teamId] / _honorTics))
RewardHonorToTeam(GetBonusHonorFromKill(1), teamId);
if (reputationRewards < uint8(m_TeamScores[teamId] / _reputationTics))
RewardReputationToTeam(teamId == TEAM_ALLIANCE ? 509 : 510, 10, teamId);
RewardReputationToTeam(teamId == TEAM_ALLIANCE ? 509 : 510, uint32(10 * _abReputationRate), teamId);
if (information < uint8(m_TeamScores[teamId] / BG_AB_WARNING_NEAR_VICTORY_SCORE))
{
if (teamId == TEAM_ALLIANCE)
@ -170,8 +170,8 @@ void BattlegroundAB::StartingEventOpenDoors()
DoorOpen(BG_AB_OBJECT_GATE_A);
DoorOpen(BG_AB_OBJECT_GATE_H);
StartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, BG_AB_EVENT_START_BATTLE);
_bgEvents.ScheduleEvent(BG_AB_EVENT_ALLIANCE_TICK, 3000);
_bgEvents.ScheduleEvent(BG_AB_EVENT_HORDE_TICK, 3000);
_bgEvents.ScheduleEvent(BG_AB_EVENT_ALLIANCE_TICK, 3s);
_bgEvents.ScheduleEvent(BG_AB_EVENT_HORDE_TICK, 3s);
}
void BattlegroundAB::AddPlayer(Player* player)
@ -421,6 +421,7 @@ bool BattlegroundAB::SetupBattleground()
{
_honorTics = BattlegroundMgr::IsBGWeekend(GetBgTypeID(true)) ? BG_AB_HONOR_TICK_WEEKEND : BG_AB_HONOR_TICK_NORMAL;
_reputationTics = BattlegroundMgr::IsBGWeekend(GetBgTypeID(true)) ? BG_AB_REP_TICK_WEEKEND : BG_AB_REP_TICK_NORMAL;
_abReputationRate = sWorld->getRate(RATE_REPUTATION_GAIN_AB);
for (uint32 i = 0; i < BG_AB_DYNAMIC_NODES_COUNT; ++i)
{

View File

@ -170,12 +170,11 @@ enum BG_AB_Misc
BG_AB_WARNING_NEAR_VICTORY_SCORE = 1400,
BG_AB_MAX_TEAM_SCORE = 1600,
BG_AB_FLAG_CAPTURING_TIME = 60000,
BG_AB_BANNER_UPDATE_TIME = 2000
};
constexpr Milliseconds BG_AB_FLAG_CAPTURING_TIME = 60s;
constexpr Milliseconds BG_AB_BANNER_UPDATE_TIME = 2s;
const uint32 BG_AB_TickIntervals[BG_AB_DYNAMIC_NODES_COUNT + 1] = {0, 12000, 9000, 6000, 3000, 1000};
const Milliseconds BG_AB_TickIntervals[BG_AB_DYNAMIC_NODES_COUNT + 1] = {0ms, 12s, 9s, 6s, 3s, 1s};
const uint32 BG_AB_TickPoints[BG_AB_DYNAMIC_NODES_COUNT + 1] = {0, 10, 10, 10, 10, 30};
const uint32 BG_AB_GraveyardIds[BG_AB_ALL_NODES_COUNT] = {895, 894, 893, 897, 896, 898, 899};
@ -299,6 +298,7 @@ private:
EventMap _bgEvents;
uint32 _honorTics;
uint32 _reputationTics;
float _abReputationRate;
uint8 _controlledPoints[PVP_TEAMS_COUNT] {};
bool _teamScores500Disadvantage[PVP_TEAMS_COUNT] {};
uint32 _configurableMaxTeamScore;

View File

@ -194,21 +194,21 @@ void BattlegroundAV::HandleQuestComplete(uint32 questid, Player* player)
case AV_QUEST_A_COMMANDER1:
case AV_QUEST_H_COMMANDER1:
m_Team_QuestStatus[teamId][1]++;
RewardReputationToTeam(teamId, 1, teamId);
RewardReputationToTeam(teamId, uint32(1 * _avReputationRate), teamId);
if (m_Team_QuestStatus[teamId][1] == 30)
LOG_DEBUG("bg.battleground", "BG_AV Quest {} completed (need to implement some events here", questid);
break;
case AV_QUEST_A_COMMANDER2:
case AV_QUEST_H_COMMANDER2:
m_Team_QuestStatus[teamId][2]++;
RewardReputationToTeam(teamId, 1, teamId);
RewardReputationToTeam(teamId, uint32(1 * _avReputationRate), teamId);
if (m_Team_QuestStatus[teamId][2] == 60)
LOG_DEBUG("bg.battleground", "BG_AV Quest {} completed (need to implement some events here", questid);
break;
case AV_QUEST_A_COMMANDER3:
case AV_QUEST_H_COMMANDER3:
m_Team_QuestStatus[teamId][3]++;
RewardReputationToTeam(teamId, 1, teamId);
RewardReputationToTeam(teamId, uint32(1 * _avReputationRate), teamId);
if (m_Team_QuestStatus[teamId][3] == 120)
LOG_DEBUG("bg.battleground", "BG_AV Quest {} completed (need to implement some events here", questid);
break;
@ -316,21 +316,21 @@ Creature* BattlegroundAV::AddAVCreature(uint16 cinfoid, uint16 type)
type -= AV_CPLACE_MAX;
cinfoid = uint16(BG_AV_StaticCreaturePos[type][4]);
creature = AddCreature(BG_AV_StaticCreatureInfo[cinfoid],
type + AV_CPLACE_MAX,
BG_AV_StaticCreaturePos[type][0],
BG_AV_StaticCreaturePos[type][1],
BG_AV_StaticCreaturePos[type][2],
BG_AV_StaticCreaturePos[type][3]);
type + AV_CPLACE_MAX,
BG_AV_StaticCreaturePos[type][0],
BG_AV_StaticCreaturePos[type][1],
BG_AV_StaticCreaturePos[type][2],
BG_AV_StaticCreaturePos[type][3]);
isStatic = true;
}
else
{
creature = AddCreature(BG_AV_CreatureInfo[cinfoid],
type,
BG_AV_CreaturePos[type][0],
BG_AV_CreaturePos[type][1],
BG_AV_CreaturePos[type][2],
BG_AV_CreaturePos[type][3]);
type,
BG_AV_CreaturePos[type][0],
BG_AV_CreaturePos[type][1],
BG_AV_CreaturePos[type][2],
BG_AV_CreaturePos[type][3]);
}
if (!creature)
return nullptr;
@ -344,7 +344,7 @@ Creature* BattlegroundAV::AddAVCreature(uint16 cinfoid, uint16 type)
(cinfoid >= AV_NPC_H_GRAVEDEFENSE0 && cinfoid <= AV_NPC_H_GRAVEDEFENSE3))))
{
if (!isStatic && ((cinfoid >= AV_NPC_A_GRAVEDEFENSE0 && cinfoid <= AV_NPC_A_GRAVEDEFENSE3)
|| (cinfoid >= AV_NPC_H_GRAVEDEFENSE0 && cinfoid <= AV_NPC_H_GRAVEDEFENSE3)))
|| (cinfoid >= AV_NPC_H_GRAVEDEFENSE0 && cinfoid <= AV_NPC_H_GRAVEDEFENSE3)))
{
CreatureData& data = sObjectMgr->NewOrExistCreatureData(creature->GetSpawnId());
data.wander_distance = 5;
@ -814,11 +814,11 @@ void BattlegroundAV::PopulateNode(BG_AV_Nodes node)
if (!trigger)
{
trigger = AddCreature(WORLD_TRIGGER,
node + 302,
BG_AV_CreaturePos[node + 302][0],
BG_AV_CreaturePos[node + 302][1],
BG_AV_CreaturePos[node + 302][2],
BG_AV_CreaturePos[node + 302][3]);
node + 302,
BG_AV_CreaturePos[node + 302][0],
BG_AV_CreaturePos[node + 302][1],
BG_AV_CreaturePos[node + 302][2],
BG_AV_CreaturePos[node + 302][3]);
}
//add bonus honor aura trigger creature when node is accupied
@ -1240,25 +1240,28 @@ GraveyardStruct const* BattlegroundAV::GetClosestGraveyard(Player* player)
bool BattlegroundAV::SetupBattleground()
{
_avReputationRate = sWorld->getRate(RATE_REPUTATION_GAIN_AV);
if (sBattlegroundMgr->IsBGWeekend(GetBgTypeID(true)))
{
_reputationTower = 18;
_reputationCaptain = 185;
_reputationBoss = 525;
_reputationPerOwnedGraveyard = 18;
_reputationSurvivingCaptain = 175;
_reputationSurvivingTower = 18;
_reputationPerOwnedMine = 36;
_reputationTower = uint32(18 * _avReputationRate);
_reputationCaptain = uint32(185 * _avReputationRate);
_reputationBoss = uint32(525 * _avReputationRate);
_reputationPerOwnedGraveyard = uint32(18 * _avReputationRate);
_reputationSurvivingCaptain = uint32(175 * _avReputationRate);
_reputationSurvivingTower = uint32(18 * _avReputationRate);
_reputationPerOwnedMine = uint32(36 * _avReputationRate);
}
else
{
_reputationTower = 12;
_reputationCaptain = 125;
_reputationBoss = sWorld->getIntConfig(CONFIG_BATTLEGROUND_ALTERAC_REP_ONBOSSDEATH);
_reputationPerOwnedGraveyard = 12;
_reputationSurvivingCaptain = 125;
_reputationSurvivingTower = 12;
_reputationPerOwnedMine = 24;
_reputationTower = uint32(12 * _avReputationRate);
_reputationCaptain = uint32(125 * _avReputationRate);
// Special case: This value comes from another config setting, but we still apply our multiplier
_reputationBoss = uint32(sWorld->getIntConfig(CONFIG_BATTLEGROUND_ALTERAC_REP_ONBOSSDEATH) * _avReputationRate);
_reputationPerOwnedGraveyard = uint32(12 * _avReputationRate);
_reputationSurvivingCaptain = uint32(125 * _avReputationRate);
_reputationSurvivingTower = uint32(12 * _avReputationRate);
_reputationPerOwnedMine = uint32(24 * _avReputationRate);
}
// Create starting objects

View File

@ -1846,6 +1846,7 @@ private:
uint32 _reputationSurvivingCaptain = 0; // 125, 175
uint32 _reputationSurvivingTower = 0; // 12, 18
uint32 _reputationPerOwnedMine = 0; // 24, 36
float _avReputationRate;
bool m_IsInformedNearVictory[2] {};
};

View File

@ -68,7 +68,7 @@ void BattlegroundEY::PostUpdateImpl(uint32 diff)
AddPoints(TEAM_ALLIANCE, BG_EY_TickPoints[_ownedPointsCount[TEAM_ALLIANCE] - 1]);
if (_ownedPointsCount[TEAM_HORDE] > 0)
AddPoints(TEAM_HORDE, BG_EY_TickPoints[_ownedPointsCount[TEAM_HORDE] - 1]);
_bgEvents.ScheduleEvent(BG_EY_EVENT_ADD_POINTS, BG_EY_FPOINTS_TICK_TIME - (GameTime::GetGameTimeMS().count() % BG_EY_FPOINTS_TICK_TIME));
_bgEvents.ScheduleEvent(BG_EY_EVENT_ADD_POINTS, BG_EY_FPOINTS_TICK_TIME - (GameTime::GetGameTimeMS() % BG_EY_FPOINTS_TICK_TIME));
break;
case BG_EY_EVENT_FLAG_ON_GROUND:
RespawnFlagAfterDrop();
@ -78,7 +78,7 @@ void BattlegroundEY::PostUpdateImpl(uint32 diff)
break;
case BG_EY_EVENT_CHECK_CPOINTS:
UpdatePointsState();
_bgEvents.ScheduleEvent(BG_EY_EVENT_CHECK_CPOINTS, BG_EY_FPOINTS_CHECK_TIME - (GameTime::GetGameTimeMS().count() % BG_EY_FPOINTS_CHECK_TIME));
_bgEvents.ScheduleEvent(BG_EY_EVENT_CHECK_CPOINTS, BG_EY_FPOINTS_CHECK_TIME - (GameTime::GetGameTimeMS() % BG_EY_FPOINTS_CHECK_TIME));
break;
}
}
@ -106,8 +106,8 @@ void BattlegroundEY::StartingEventOpenDoors()
// Achievement: Flurry
StartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, BG_EY_EVENT_START_BATTLE);
_bgEvents.ScheduleEvent(BG_EY_EVENT_ADD_POINTS, 0);
_bgEvents.ScheduleEvent(BG_EY_EVENT_CHECK_CPOINTS, 0);
_bgEvents.ScheduleEvent(BG_EY_EVENT_ADD_POINTS, 0ms);
_bgEvents.ScheduleEvent(BG_EY_EVENT_CHECK_CPOINTS, 0ms);
}
void BattlegroundEY::AddPoints(TeamId teamId, uint32 points)

View File

@ -31,13 +31,10 @@ enum BG_EY_Events
BG_EY_EVENT_CHECK_CPOINTS = 4
};
enum BG_EY_Timers
{
BG_EY_FLAG_RESPAWN_TIME = 10 * IN_MILLISECONDS,
BG_EY_FLAG_ON_GROUND_TIME = 10 * IN_MILLISECONDS,
BG_EY_FPOINTS_CHECK_TIME = 2 * IN_MILLISECONDS,
BG_EY_FPOINTS_TICK_TIME = 2 * IN_MILLISECONDS
};
constexpr Milliseconds BG_EY_FLAG_RESPAWN_TIME = 10s;
constexpr Milliseconds BG_EY_FLAG_ON_GROUND_TIME = 10s;
constexpr Milliseconds BG_EY_FPOINTS_CHECK_TIME = 2s;
constexpr Milliseconds BG_EY_FPOINTS_TICK_TIME = 2s;
enum BG_EY_ProgressBarConsts
{

View File

@ -63,7 +63,7 @@ void BattlegroundWS::PostUpdateImpl(uint32 diff)
{
case BG_WS_EVENT_UPDATE_GAME_TIME:
UpdateWorldState(WORLD_STATE_BATTLEGROUND_WS_STATE_TIMER, GetMatchTime());
_bgEvents.ScheduleEvent(BG_WS_EVENT_UPDATE_GAME_TIME, ((BG_WS_TOTAL_GAME_TIME - GetStartTime()) % (MINUTE * IN_MILLISECONDS)) + 1);
_bgEvents.ScheduleEvent(BG_WS_EVENT_UPDATE_GAME_TIME, Milliseconds(((BG_WS_TOTAL_GAME_TIME - GetStartTime()) % (MINUTE * IN_MILLISECONDS)) + 1));
break;
case BG_WS_EVENT_NO_TIME_LEFT:
if (GetTeamScore(TEAM_ALLIANCE) == GetTeamScore(TEAM_HORDE))
@ -137,8 +137,8 @@ void BattlegroundWS::StartingEventOpenDoors()
StartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, WS_EVENT_START_BATTLE);
UpdateWorldState(WORLD_STATE_BATTLEGROUND_WS_STATE_TIMER_ACTIVE, 1);
_bgEvents.ScheduleEvent(BG_WS_EVENT_UPDATE_GAME_TIME, 0);
_bgEvents.ScheduleEvent(BG_WS_EVENT_NO_TIME_LEFT, BG_WS_TOTAL_GAME_TIME - 2 * MINUTE * IN_MILLISECONDS); // 27 - 2 = 25 minutes
_bgEvents.ScheduleEvent(BG_WS_EVENT_UPDATE_GAME_TIME, 0ms);
_bgEvents.ScheduleEvent(BG_WS_EVENT_NO_TIME_LEFT, Milliseconds(BG_WS_TOTAL_GAME_TIME - 2 * MINUTE * IN_MILLISECONDS)); // 27 - 2 = 25 minutes
_bgEvents.ScheduleEvent(BG_WS_EVENT_DESPAWN_DOORS, BG_WS_DOOR_DESPAWN_TIME);
}
@ -229,7 +229,7 @@ void BattlegroundWS::EventPlayerCapturedFlag(Player* player)
EndBattleground(GetTeamScore(TEAM_HORDE) == _configurableMaxTeamScore ? TEAM_HORDE : TEAM_ALLIANCE);
}
else
_bgEvents.ScheduleEvent(BG_WS_EVENT_RESPAWN_BOTH_FLAGS, BG_WS_FLAG_RESPAWN_TIME);
_bgEvents.ScheduleEvent(BG_WS_EVENT_RESPAWN_BOTH_FLAGS, Milliseconds(BG_WS_FLAG_RESPAWN_TIME));
_bgEvents.CancelEvent(BG_WS_EVENT_BOTH_FLAGS_KEPT10);
_bgEvents.CancelEvent(BG_WS_EVENT_BOTH_FLAGS_KEPT15);
@ -426,15 +426,17 @@ void BattlegroundWS::HandleAreaTrigger(Player* player, uint32 trigger)
bool BattlegroundWS::SetupBattleground()
{
_wsReputationRate = sWorld->getRate(RATE_REPUTATION_GAIN_WSG);
if (sBattlegroundMgr->IsBGWeekend(GetBgTypeID(true)))
{
_reputationCapture = 45;
_reputationCapture = uint32(45 * _wsReputationRate);
_honorWinKills = 3;
_honorEndKills = 4;
}
else
{
_reputationCapture = 35;
_reputationCapture = uint32(35 * _wsReputationRate);
_honorWinKills = 1;
_honorEndKills = 2;
}
@ -578,10 +580,10 @@ uint32 BattlegroundWS::GetAssaultSpellId() const
{
if ((!GetFlagPickerGUID(TEAM_ALLIANCE) && GetFlagState(TEAM_ALLIANCE) != BG_WS_FLAG_STATE_ON_GROUND) ||
(!GetFlagPickerGUID(TEAM_HORDE) && GetFlagState(TEAM_HORDE) != BG_WS_FLAG_STATE_ON_GROUND) ||
_bgEvents.GetNextEventTime(BG_WS_EVENT_BOTH_FLAGS_KEPT10) > 0)
_bgEvents.HasTimeUntilEvent(BG_WS_EVENT_BOTH_FLAGS_KEPT10))
return 0;
return _bgEvents.GetNextEventTime(BG_WS_EVENT_BOTH_FLAGS_KEPT15) > 0 ? BG_WS_SPELL_FOCUSED_ASSAULT : BG_WS_SPELL_BRUTAL_ASSAULT;
return _bgEvents.HasTimeUntilEvent(BG_WS_EVENT_BOTH_FLAGS_KEPT15) ? BG_WS_SPELL_FOCUSED_ASSAULT : BG_WS_SPELL_BRUTAL_ASSAULT;
}
void BattlegroundWS::RemoveAssaultAuras()

View File

@ -39,12 +39,12 @@ enum BG_WS_TimerOrScore
BG_WS_MAX_TEAM_SCORE = 3,
BG_WS_TOTAL_GAME_TIME = 27 * MINUTE * IN_MILLISECONDS,
BG_WS_FLAG_RESPAWN_TIME = 23 * IN_MILLISECONDS,
BG_WS_FLAG_DROP_TIME = 10 * IN_MILLISECONDS,
BG_WS_SPELL_FORCE_TIME = 10 * MINUTE * IN_MILLISECONDS,
BG_WS_SPELL_BRUTAL_TIME = 15 * MINUTE * IN_MILLISECONDS,
BG_WS_DOOR_DESPAWN_TIME = 5 * IN_MILLISECONDS
BG_WS_FLAG_RESPAWN_TIME = 23 * IN_MILLISECONDS
};
constexpr Milliseconds BG_WS_FLAG_DROP_TIME = 10s;
constexpr Milliseconds BG_WS_SPELL_FORCE_TIME = 600s;
constexpr Milliseconds BG_WS_SPELL_BRUTAL_TIME = 900s;
constexpr Milliseconds BG_WS_DOOR_DESPAWN_TIME = 5s;
enum BG_WS_BroadcastTexts
{
@ -258,6 +258,7 @@ private:
ObjectGuid _droppedFlagGUID[2];
uint8 _flagState[2];
TeamId _lastFlagCaptureTeam;
float _wsReputationRate;
uint32 _reputationCapture;
uint32 _honorWinKills;
uint32 _honorEndKills;

View File

@ -121,7 +121,7 @@ void Corpse::DeleteFromDB(CharacterDatabaseTransaction trans)
DeleteFromDB(GetOwnerGUID(), trans);
}
void Corpse::DeleteFromDB(ObjectGuid const ownerGuid, CharacterDatabaseTransaction trans)
void Corpse::DeleteFromDB(ObjectGuid const& ownerGuid, CharacterDatabaseTransaction trans)
{
CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CORPSE);
stmt->SetData(0, ownerGuid.GetCounter());

View File

@ -63,7 +63,7 @@ public:
bool LoadCorpseFromDB(ObjectGuid::LowType guid, Field* fields);
void DeleteFromDB(CharacterDatabaseTransaction trans);
static void DeleteFromDB(ObjectGuid const ownerGuid, CharacterDatabaseTransaction trans);
static void DeleteFromDB(ObjectGuid const& ownerGuid, CharacterDatabaseTransaction trans);
[[nodiscard]] ObjectGuid GetOwnerGUID() const { return GetGuidValue(CORPSE_FIELD_OWNER); }

Some files were not shown because too many files have changed in this diff Show More