mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 01:08:35 +00:00
Merge remote-tracking branch 'upstream/master' into feature/core_merge_10_2025
# Conflicts: # src/server/game/Entities/Unit/Unit.cpp # src/server/game/Movement/MovementGenerators/PointMovementGenerator.h # src/server/game/Server/WorldSession.cpp # src/server/game/Server/WorldSession.h # src/server/scripts/Northrend/Naxxramas/boss_gluth.cpp # src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp # src/server/scripts/Northrend/Naxxramas/boss_grobbulus.cpp # src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp # src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp
This commit is contained in:
2
.github/workflows/dashboard-ci.yml
vendored
2
.github/workflows/dashboard-ci.yml
vendored
@@ -92,6 +92,8 @@ jobs:
|
|||||||
./acore.sh module update --all
|
./acore.sh module update --all
|
||||||
|
|
||||||
- name: Run complete installation (deps, compile, database, client-data)
|
- name: Run complete installation (deps, compile, database, client-data)
|
||||||
|
env:
|
||||||
|
AC_ENABLE_ROOT_CMAKE_INSTALL: 1
|
||||||
run: |
|
run: |
|
||||||
# This runs: install-deps, compile, database setup, client-data download
|
# This runs: install-deps, compile, database setup, client-data download
|
||||||
./acore.sh init
|
./acore.sh init
|
||||||
|
|||||||
4
.vscode/settings.json
vendored
4
.vscode/settings.json
vendored
@@ -122,5 +122,7 @@
|
|||||||
"C_Cpp.default.compileCommands": "${workspaceFolder}/build/compile_commands.json",
|
"C_Cpp.default.compileCommands": "${workspaceFolder}/build/compile_commands.json",
|
||||||
"C_Cpp.default.cppStandard": "c++17",
|
"C_Cpp.default.cppStandard": "c++17",
|
||||||
"C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools",
|
"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",
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -143,6 +143,7 @@ function comp_compile() {
|
|||||||
mkdir -p "$AC_BINPATH_FULL"
|
mkdir -p "$AC_BINPATH_FULL"
|
||||||
echo "Creating $confDir..."
|
echo "Creating $confDir..."
|
||||||
mkdir -p "$confDir"
|
mkdir -p "$confDir"
|
||||||
|
mkdir -p "$confDir/modules"
|
||||||
|
|
||||||
echo "Cmake install..."
|
echo "Cmake install..."
|
||||||
$SUDO cmake --install . --config $CTYPE
|
$SUDO cmake --install . --config $CTYPE
|
||||||
@@ -156,6 +157,8 @@ function comp_compile() {
|
|||||||
echo "Setting permissions on binary files"
|
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 chown root:root -- {} +
|
||||||
find "$AC_BINPATH_FULL" -mindepth 1 -maxdepth 1 -type f -exec $SUDO chmod u+s -- {} +
|
find "$AC_BINPATH_FULL" -mindepth 1 -maxdepth 1 -type f -exec $SUDO chmod u+s -- {} +
|
||||||
|
$SUDO setcap cap_sys_nice=eip "$AC_BINPATH_FULL/worldserver"
|
||||||
|
$SUDO setcap cap_sys_nice=eip "$AC_BINPATH_FULL/authserver"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[[ -f "$confDir/worldserver.conf.dist" ]] && \
|
[[ -f "$confDir/worldserver.conf.dist" ]] && \
|
||||||
@@ -165,6 +168,12 @@ function comp_compile() {
|
|||||||
[[ -f "$confDir/dbimport.conf.dist" ]] && \
|
[[ -f "$confDir/dbimport.conf.dist" ]] && \
|
||||||
cp -v --no-clobber "$confDir/dbimport.conf.dist" "$confDir/dbimport.conf"
|
cp -v --no-clobber "$confDir/dbimport.conf.dist" "$confDir/dbimport.conf"
|
||||||
|
|
||||||
|
for f in "$confDir/modules/"*.dist
|
||||||
|
do
|
||||||
|
[[ -e $f ]] || break # handle the case of no *.dist files
|
||||||
|
cp -v --no-clobber "$f" "${f%.dist}";
|
||||||
|
done
|
||||||
|
|
||||||
echo "Done"
|
echo "Done"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ function inst_simple_restarter {
|
|||||||
|
|
||||||
function inst_download_client_data {
|
function inst_download_client_data {
|
||||||
# change the following version when needed
|
# change the following version when needed
|
||||||
local VERSION=v16
|
local VERSION=v17
|
||||||
|
|
||||||
echo "#######################"
|
echo "#######################"
|
||||||
echo "Client data downloader"
|
echo "Client data downloader"
|
||||||
|
|||||||
@@ -127,10 +127,13 @@ function inst_module_help() {
|
|||||||
echo " ./acore.sh module # Interactive menu"
|
echo " ./acore.sh module # Interactive menu"
|
||||||
echo " ./acore.sh module search [terms...]"
|
echo " ./acore.sh module search [terms...]"
|
||||||
echo " ./acore.sh module install [--all | modules...]"
|
echo " ./acore.sh module install [--all | modules...]"
|
||||||
echo " ./acore.sh module update [--all | modules...]"
|
echo " ./acore.sh module update [--discard-changes] [--all | modules...]"
|
||||||
echo " ./acore.sh module remove [modules...]"
|
echo " ./acore.sh module remove [modules...]"
|
||||||
echo " ./acore.sh module list # List installed modules"
|
echo " ./acore.sh module list # List installed modules"
|
||||||
echo ""
|
echo ""
|
||||||
|
echo "Options:"
|
||||||
|
echo " --discard-changes Reset module repositories to a clean state before updating"
|
||||||
|
echo ""
|
||||||
echo "Module Specification Syntax:"
|
echo "Module Specification Syntax:"
|
||||||
echo " name # Simple name (e.g., mod-transmog)"
|
echo " name # Simple name (e.g., mod-transmog)"
|
||||||
echo " owner/name # GitHub repository"
|
echo " owner/name # GitHub repository"
|
||||||
@@ -602,6 +605,37 @@ function inst_mod_is_installed() {
|
|||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Discard local changes from a module repository to guarantee a clean update.
|
||||||
|
function inst_module_reset_repo() {
|
||||||
|
local repo_ref="$1"
|
||||||
|
local dirname="$2"
|
||||||
|
local repo_path="$J_PATH_MODULES/$dirname"
|
||||||
|
|
||||||
|
if [ ! -d "$repo_path" ]; then
|
||||||
|
print_error "[$repo_ref] Cannot discard changes; path not found ($repo_path)."
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -d "$repo_path/.git" ]; then
|
||||||
|
print_error "[$repo_ref] Cannot discard changes; $repo_path is not a git repository."
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
print_warn "[$repo_ref] Discarding local changes (--discard-changes)."
|
||||||
|
|
||||||
|
if ! git -C "$repo_path" reset --hard >/dev/null 2>&1; then
|
||||||
|
print_error "[$repo_ref] Failed to reset repository at $repo_path."
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! git -C "$repo_path" clean -fd >/dev/null 2>&1; then
|
||||||
|
print_error "[$repo_ref] Failed to remove untracked files from $repo_path."
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
# Conflict Detection and Validation
|
# Conflict Detection and Validation
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
@@ -901,31 +935,48 @@ function inst_module_install {
|
|||||||
|
|
||||||
# Update one or more modules
|
# Update one or more modules
|
||||||
function inst_module_update {
|
function inst_module_update {
|
||||||
# Handle help request
|
local modules=()
|
||||||
if [[ "$1" == "--help" || "$1" == "-h" ]]; then
|
|
||||||
inst_module_help
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Support multiple modules and the --all flag; prompt if none specified.
|
|
||||||
local args=("$@")
|
|
||||||
local use_all=false
|
local use_all=false
|
||||||
if [ ${#args[@]} -gt 0 ] && { [ "${args[0]}" = "--all" ] || [ "${args[0]}" = "-a" ]; }; then
|
local discard_changes=false
|
||||||
use_all=true
|
local had_errors=0
|
||||||
shift || true
|
|
||||||
fi
|
|
||||||
|
|
||||||
local _tmp=$PWD
|
while [[ $# -gt 0 ]]; do
|
||||||
|
case "$1" in
|
||||||
|
--help|-h)
|
||||||
|
inst_module_help
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
--all|-a)
|
||||||
|
use_all=true
|
||||||
|
;;
|
||||||
|
--discard-changes|--reset|-r)
|
||||||
|
discard_changes=true
|
||||||
|
;;
|
||||||
|
--)
|
||||||
|
shift || true
|
||||||
|
while [[ $# -gt 0 ]]; do
|
||||||
|
modules+=("$1")
|
||||||
|
shift || true
|
||||||
|
done
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
modules+=("$1")
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
shift || true
|
||||||
|
done
|
||||||
|
|
||||||
if $use_all; then
|
if $use_all; then
|
||||||
local line repo_ref branch commit newCommit owner modname url dirname
|
local repo_ref branch commit owner modname url dirname newCommit
|
||||||
|
local parsed_output
|
||||||
while read -r repo_ref branch commit; do
|
while read -r repo_ref branch commit; do
|
||||||
[ -z "$repo_ref" ] && continue
|
[ -z "$repo_ref" ] && continue
|
||||||
# Skip excluded modules during update --all
|
|
||||||
if inst_mod_is_excluded "$repo_ref"; then
|
if inst_mod_is_excluded "$repo_ref"; then
|
||||||
print_warn "[$repo_ref] Excluded by MODULES_EXCLUDE_LIST (skipping)."
|
print_warn "[$repo_ref] Excluded by MODULES_EXCLUDE_LIST (skipping)."
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
parsed_output=$(inst_parse_module_spec "$repo_ref")
|
parsed_output=$(inst_parse_module_spec "$repo_ref")
|
||||||
IFS=' ' read -r _ owner modname _ _ url dirname <<< "$parsed_output"
|
IFS=' ' read -r _ owner modname _ _ url dirname <<< "$parsed_output"
|
||||||
|
|
||||||
@@ -935,16 +986,23 @@ function inst_module_update {
|
|||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if $discard_changes; then
|
||||||
|
if ! inst_module_reset_repo "$repo_ref" "$dirname"; then
|
||||||
|
had_errors=1
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
if Joiner:upd_repo "$url" "$dirname" "$branch" ""; then
|
if Joiner:upd_repo "$url" "$dirname" "$branch" ""; then
|
||||||
newCommit=$(git -C "$J_PATH_MODULES/$dirname" rev-parse HEAD 2>/dev/null || echo "")
|
newCommit=$(git -C "$J_PATH_MODULES/$dirname" rev-parse HEAD 2>/dev/null || echo "")
|
||||||
inst_mod_list_upsert "$repo_ref" "$branch" "$newCommit"
|
inst_mod_list_upsert "$repo_ref" "$branch" "$newCommit"
|
||||||
print_success "[$repo_ref] Updated to latest commit on '$branch'."
|
print_success "[$repo_ref] Updated to latest commit on '$branch'."
|
||||||
else
|
else
|
||||||
print_error "[$repo_ref] Cannot update"
|
print_error "[$repo_ref] Cannot update"
|
||||||
|
had_errors=1
|
||||||
fi
|
fi
|
||||||
done < <(inst_mod_list_read)
|
done < <(inst_mod_list_read)
|
||||||
else
|
else
|
||||||
local modules=("$@")
|
|
||||||
if [ ${#modules[@]} -eq 0 ]; then
|
if [ ${#modules[@]} -eq 0 ]; then
|
||||||
echo "Type the name(s) of the module(s) to update"
|
echo "Type the name(s) of the module(s) to update"
|
||||||
read -p "Insert name(s): " _line
|
read -p "Insert name(s): " _line
|
||||||
@@ -952,6 +1010,7 @@ function inst_module_update {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
local spec repo_ref override_branch override_commit owner modname url dirname v b branch def newCommit
|
local spec repo_ref override_branch override_commit owner modname url dirname v b branch def newCommit
|
||||||
|
local parsed_output
|
||||||
for spec in "${modules[@]}"; do
|
for spec in "${modules[@]}"; do
|
||||||
[ -z "$spec" ] && continue
|
[ -z "$spec" ] && continue
|
||||||
parsed_output=$(inst_parse_module_spec "$spec")
|
parsed_output=$(inst_parse_module_spec "$spec")
|
||||||
@@ -959,11 +1018,10 @@ function inst_module_update {
|
|||||||
|
|
||||||
dirname="${dirname:-$modname}"
|
dirname="${dirname:-$modname}"
|
||||||
if [ -d "$J_PATH_MODULES/$dirname/" ]; then
|
if [ -d "$J_PATH_MODULES/$dirname/" ]; then
|
||||||
# determine preferred branch if not provided
|
b=""
|
||||||
if [ -n "$override_branch" ] && [ "$override_branch" != "-" ]; then
|
if [ -n "$override_branch" ] && [ "$override_branch" != "-" ]; then
|
||||||
b="$override_branch"
|
b="$override_branch"
|
||||||
else
|
else
|
||||||
# try reading acore-module.json for this repo
|
|
||||||
if [[ "$url" =~ github.com ]]; then
|
if [[ "$url" =~ github.com ]]; then
|
||||||
read v b < <(inst_getVersionBranch "https://raw.githubusercontent.com/${owner}/${modname}/master/acore-module.json")
|
read v b < <(inst_getVersionBranch "https://raw.githubusercontent.com/${owner}/${modname}/master/acore-module.json")
|
||||||
else
|
else
|
||||||
@@ -981,21 +1039,35 @@ function inst_module_update {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if $discard_changes; then
|
||||||
|
if ! inst_module_reset_repo "$repo_ref" "$dirname"; then
|
||||||
|
had_errors=1
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
if Joiner:upd_repo "$url" "$dirname" "$b" ""; then
|
if Joiner:upd_repo "$url" "$dirname" "$b" ""; then
|
||||||
newCommit=$(git -C "$J_PATH_MODULES/$dirname" rev-parse HEAD 2>/dev/null || echo "")
|
newCommit=$(git -C "$J_PATH_MODULES/$dirname" rev-parse HEAD 2>/dev/null || echo "")
|
||||||
inst_mod_list_upsert "$repo_ref" "$b" "$newCommit"
|
inst_mod_list_upsert "$repo_ref" "$b" "$newCommit"
|
||||||
print_success "[$repo_ref] Done, please re-run compiling and db assembly"
|
print_success "[$repo_ref] Done, please re-run compiling and db assembly"
|
||||||
else
|
else
|
||||||
print_error "[$repo_ref] Cannot update"
|
print_error "[$repo_ref] Cannot update"
|
||||||
|
had_errors=1
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
print_error "[$repo_ref] Cannot update! Path doesn't exist ($J_PATH_MODULES/$dirname/)"
|
print_error "[$repo_ref] Cannot update! Path doesn't exist ($J_PATH_MODULES/$dirname/)"
|
||||||
|
had_errors=1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
|
if [ "$had_errors" -ne 0 ]; then
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
# Remove one or more modules
|
# Remove one or more modules
|
||||||
|
|||||||
@@ -453,6 +453,40 @@ This is particularly useful for:
|
|||||||
- **Multiple Projects**: Separate service configurations per project
|
- **Multiple Projects**: Separate service configurations per project
|
||||||
- **Team Collaboration**: Share service setups across development teams
|
- **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
|
#### Migration from Legacy Format
|
||||||
|
|
||||||
If you have existing services in the old format, use the migration script:
|
If you have existing services in the old format, use the migration script:
|
||||||
|
|||||||
@@ -219,6 +219,13 @@ function parse_arguments() {
|
|||||||
export PARSED_CONFIG_FILE="$config_file"
|
export PARSED_CONFIG_FILE="$config_file"
|
||||||
export PARSED_SERVERCONFIG="$serverconfig"
|
export PARSED_SERVERCONFIG="$serverconfig"
|
||||||
export PARSED_SESSION_MANAGER="$session_manager"
|
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)
|
# 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
183
apps/startup-scripts/test/test_startup_scripts.bats
Normal file → Executable file
@@ -160,7 +160,19 @@ teardown() {
|
|||||||
# Create registry with pm2 provider service
|
# Create registry with pm2 provider service
|
||||||
cat > "$AC_SERVICE_CONFIG_DIR/service_registry.json" << 'EOF'
|
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
|
EOF
|
||||||
# Create minimal service config and run-engine config files required by 'send'
|
# 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
|
# Create registry and config as in previous test
|
||||||
cat > "$AC_SERVICE_CONFIG_DIR/service_registry.json" << 'EOF'
|
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
|
EOF
|
||||||
echo "RUN_ENGINE_CONFIG_FILE=\"$AC_SERVICE_CONFIG_DIR/test-world-run-engine.conf\"" > "$AC_SERVICE_CONFIG_DIR/test-world.conf"
|
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 ]
|
[ "$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" {
|
@test "service-manager: wait-uptime times out for unknown service" {
|
||||||
command -v jq >/dev/null 2>&1 || skip "jq not installed"
|
command -v jq >/dev/null 2>&1 || skip "jq not installed"
|
||||||
export AC_SERVICE_CONFIG_DIR="$TEST_DIR/services"
|
export AC_SERVICE_CONFIG_DIR="$TEST_DIR/services"
|
||||||
@@ -279,6 +328,136 @@ EOF
|
|||||||
[[ "$output" =~ "Configuration file not found" ]]
|
[[ "$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" {
|
@test "examples: restarter-auth should show configuration error" {
|
||||||
run "$SCRIPT_DIR/examples/restarter-auth.sh"
|
run "$SCRIPT_DIR/examples/restarter-auth.sh"
|
||||||
[[ "$output" =~ "Configuration file not found" ]]
|
[[ "$output" =~ "Configuration file not found" ]]
|
||||||
|
|||||||
3
conf/dist/config.sh
vendored
3
conf/dist/config.sh
vendored
@@ -112,7 +112,8 @@ export CCACHE_DIR=${CCACHE_DIR:-"$AC_PATH_VAR/ccache"}
|
|||||||
# Enable running the cmake install as root
|
# Enable running the cmake install as root
|
||||||
# Installing as root allows to set the SUID bit on
|
# Installing as root allows to set the SUID bit on
|
||||||
# the worldserver binary. This is required if you want
|
# the worldserver binary. This is required if you want
|
||||||
# to bind the worldserver to reserved ports
|
# to bind the worldserver to reserved ports and allow
|
||||||
|
# it to set higher process priority.
|
||||||
# Default: 0 (false)
|
# Default: 0 (false)
|
||||||
#
|
#
|
||||||
export AC_ENABLE_ROOT_CMAKE_INSTALL=${AC_ENABLE_ROOT_CMAKE_INSTALL:-0}
|
export AC_ENABLE_ROOT_CMAKE_INSTALL=${AC_ENABLE_ROOT_CMAKE_INSTALL:-0}
|
||||||
|
|||||||
13
data/sql/updates/db_world/2025_10_04_00.sql
Normal file
13
data/sql/updates/db_world/2025_10_04_00.sql
Normal 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);
|
||||||
6
data/sql/updates/db_world/2025_10_04_01.sql
Normal file
6
data/sql/updates/db_world/2025_10_04_01.sql
Normal 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);
|
||||||
45
data/sql/updates/db_world/2025_10_04_02.sql
Normal file
45
data/sql/updates/db_world/2025_10_04_02.sql
Normal 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, '');
|
||||||
28
data/sql/updates/db_world/2025_10_04_03.sql
Normal file
28
data/sql/updates/db_world/2025_10_04_03.sql
Normal 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');
|
||||||
7
data/sql/updates/db_world/2025_10_04_04.sql
Normal file
7
data/sql/updates/db_world/2025_10_04_04.sql
Normal 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');
|
||||||
12
data/sql/updates/db_world/2025_10_04_05.sql
Normal file
12
data/sql/updates/db_world/2025_10_04_05.sql
Normal 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');
|
||||||
13
data/sql/updates/db_world/2025_10_04_06.sql
Normal file
13
data/sql/updates/db_world/2025_10_04_06.sql
Normal 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);
|
||||||
9
data/sql/updates/db_world/2025_10_06_00.sql
Normal file
9
data/sql/updates/db_world/2025_10_06_00.sql
Normal 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);
|
||||||
4
data/sql/updates/db_world/2025_10_07_00.sql
Normal file
4
data/sql/updates/db_world/2025_10_07_00.sql
Normal 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));
|
||||||
17
data/sql/updates/db_world/2025_10_07_01.sql
Normal file
17
data/sql/updates/db_world/2025_10_07_01.sql
Normal 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);
|
||||||
39
data/sql/updates/db_world/2025_10_09_00.sql
Normal file
39
data/sql/updates/db_world/2025_10_09_00.sql
Normal 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');
|
||||||
16
data/sql/updates/db_world/2025_10_09_01.sql
Normal file
16
data/sql/updates/db_world/2025_10_09_01.sql
Normal 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);
|
||||||
6
data/sql/updates/db_world/2025_10_09_02.sql
Normal file
6
data/sql/updates/db_world/2025_10_09_02.sql
Normal 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);
|
||||||
34
data/sql/updates/db_world/2025_10_09_03.sql
Normal file
34
data/sql/updates/db_world/2025_10_09_03.sql
Normal 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);
|
||||||
5
data/sql/updates/db_world/2025_10_09_04.sql
Normal file
5
data/sql/updates/db_world/2025_10_09_04.sql
Normal 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');
|
||||||
4
data/sql/updates/db_world/2025_10_10_00.sql
Normal file
4
data/sql/updates/db_world/2025_10_10_00.sql
Normal 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');
|
||||||
5
data/sql/updates/db_world/2025_10_10_01.sql
Normal file
5
data/sql/updates/db_world/2025_10_10_01.sql
Normal 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');
|
||||||
3
data/sql/updates/db_world/2025_10_11_00.sql
Normal file
3
data/sql/updates/db_world/2025_10_11_00.sql
Normal 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;
|
||||||
113
data/sql/updates/db_world/2025_10_11_01.sql
Normal file
113
data/sql/updates/db_world/2025_10_11_01.sql
Normal 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');
|
||||||
7
data/sql/updates/db_world/2025_10_11_02.sql
Normal file
7
data/sql/updates/db_world/2025_10_11_02.sql
Normal 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');
|
||||||
13
data/sql/updates/db_world/2025_10_11_03.sql
Normal file
13
data/sql/updates/db_world/2025_10_11_03.sql
Normal 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!\'');
|
||||||
27
data/sql/updates/db_world/2025_10_11_04.sql
Normal file
27
data/sql/updates/db_world/2025_10_11_04.sql
Normal 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');
|
||||||
3
data/sql/updates/db_world/2025_10_11_05.sql
Normal file
3
data/sql/updates/db_world/2025_10_11_05.sql
Normal 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);
|
||||||
6
data/sql/updates/db_world/2025_10_11_06.sql
Normal file
6
data/sql/updates/db_world/2025_10_11_06.sql
Normal 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;
|
||||||
11
data/sql/updates/db_world/2025_10_12_00.sql
Normal file
11
data/sql/updates/db_world/2025_10_12_00.sql
Normal 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\'');
|
||||||
10
data/sql/updates/db_world/2025_10_12_01.sql
Normal file
10
data/sql/updates/db_world/2025_10_12_01.sql
Normal 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');
|
||||||
23
data/sql/updates/db_world/2025_10_12_02.sql
Normal file
23
data/sql/updates/db_world/2025_10_12_02.sql
Normal 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.');
|
||||||
128
data/sql/updates/db_world/2025_10_12_03.sql
Normal file
128
data/sql/updates/db_world/2025_10_12_03.sql
Normal 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);
|
||||||
40
data/sql/updates/db_world/2025_10_12_04.sql
Normal file
40
data/sql/updates/db_world/2025_10_12_04.sql
Normal 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);
|
||||||
23
data/sql/updates/db_world/2025_10_12_05.sql
Normal file
23
data/sql/updates/db_world/2025_10_12_05.sql
Normal 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);
|
||||||
7
data/sql/updates/db_world/2025_10_12_06.sql
Normal file
7
data/sql/updates/db_world/2025_10_12_06.sql
Normal 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');
|
||||||
20
data/sql/updates/db_world/2025_10_14_00.sql
Normal file
20
data/sql/updates/db_world/2025_10_14_00.sql
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
-- DB update 2025_10_12_06 -> 2025_10_14_00
|
||||||
|
|
||||||
|
-- Move Waypoint from 'waypoints' to 'waypoint_data'
|
||||||
|
DELETE FROM `waypoints` WHERE `entry` = 27482;
|
||||||
|
DELETE FROM `waypoint_data` WHERE `id` = 2748200;
|
||||||
|
INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_type`, `action`, `action_chance`, `wpguid`) VALUES
|
||||||
|
(2748200, 1, 4105.28, -2917.96, 280.32, NULL, 0, 1, 0, 100, 0),
|
||||||
|
(2748200, 2, 4048.68, -2936.74, 275.192, NULL, 0, 1, 0, 100, 0);
|
||||||
|
|
||||||
|
-- Edit SmartAI
|
||||||
|
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 27482;
|
||||||
|
|
||||||
|
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 27482) AND (`source_type` = 0) 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
|
||||||
|
(27482, 0, 5, 0, 109, 0, 100, 0, 0, 2748200, 0, 0, 0, 0, 41, 2000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Wounded Westfall Infantry - On Path 2748200 Finished - Despawn In 2000 ms');
|
||||||
|
|
||||||
|
-- Edit Action List
|
||||||
|
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 2748200) 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
|
||||||
|
(2748200, 9, 5, 0, 0, 0, 100, 0, 4000, 4000, 0, 0, 0, 0, 232, 2748200, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Wounded Westfall Infantry - Actionlist - Start Path 2748200');
|
||||||
12
data/sql/updates/db_world/2025_10_16_00.sql
Normal file
12
data/sql/updates/db_world/2025_10_16_00.sql
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
-- DB update 2025_10_14_00 -> 2025_10_16_00
|
||||||
|
-- 53 WP_START
|
||||||
|
-- update previous parameter run = 1 to forcedMovement = 2 (run)
|
||||||
|
update `smart_scripts` set `action_param1` = 2 where `action_type` = 53 and `action_param1` = 1;
|
||||||
|
-- update previous parameter run = 0 to forcedMovement = 1 (walk)
|
||||||
|
update `smart_scripts` set `action_param1` = 1 where `action_type` = 53 and `action_param1` = 0;
|
||||||
|
|
||||||
|
-- 113 START_CLOSEST_WAYPOINT
|
||||||
|
-- update previous parameter run = 1 to forcedMovement = 2 (run)
|
||||||
|
update `smart_scripts` set `action_param4` = 2 where `action_type` = 113 and `action_param4` = 1;
|
||||||
|
-- update previous parameter run = 0 to forcedMovement = 1 (walk)
|
||||||
|
update `smart_scripts` set `action_param4` = 1 where `action_type` = 113 and `action_param4` = 0;
|
||||||
6
data/sql/updates/db_world/2025_10_16_01.sql
Normal file
6
data/sql/updates/db_world/2025_10_16_01.sql
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
-- DB update 2025_10_16_00 -> 2025_10_16_01
|
||||||
|
|
||||||
|
-- Set param 3 and 4 to 0.
|
||||||
|
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 2889700) AND (`source_type` = 9) AND (`id` IN (1));
|
||||||
|
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
|
||||||
|
(2889700, 9, 1, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 0, 0, 113, 2889700, 2889706, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Ghoul - Actionlist - Start closest Waypoint 2889700 - 2889706');
|
||||||
5
data/sql/updates/db_world/2025_10_16_02.sql
Normal file
5
data/sql/updates/db_world/2025_10_16_02.sql
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
-- DB update 2025_10_16_01 -> 2025_10_16_02
|
||||||
|
--
|
||||||
|
DELETE FROM `command` WHERE `name` = "packetlog";
|
||||||
|
INSERT INTO `command` (`name`, `security`, `help`) VALUES
|
||||||
|
("packetlog", 2, "Syntax: .packetlog [on/off]\n Toggles to allow the character using the command to start to log their packets into the server, PacketLogFile needs to be set with a valid filename");
|
||||||
5
data/sql/updates/db_world/2025_10_16_03.sql
Normal file
5
data/sql/updates/db_world/2025_10_16_03.sql
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
-- DB update 2025_10_16_02 -> 2025_10_16_03
|
||||||
|
--
|
||||||
|
DELETE FROM `command` WHERE `name` = 'debug zonestats';
|
||||||
|
INSERT INTO `command` (`name`, `security`, `help`) VALUES
|
||||||
|
('debug zonestats', 1, '.debug zonestats [$playerName]\nDisplays the amount of players in the player\'s current zone.');
|
||||||
33
data/sql/updates/db_world/2025_10_16_04.sql
Normal file
33
data/sql/updates/db_world/2025_10_16_04.sql
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
-- DB update 2025_10_16_03 -> 2025_10_16_04
|
||||||
|
--
|
||||||
|
-- Argent Dawn Initiate
|
||||||
|
UPDATE `creature_template` SET `gossip_menu_id` = 7230, `npcflag` = `npcflag` | 1 WHERE (`entry` = 16384);
|
||||||
|
-- Argent Dawn Cleric
|
||||||
|
UPDATE `creature_template` SET `gossip_menu_id` = 7231, `npcflag` = `npcflag` | 1 WHERE (`entry` = 16435);
|
||||||
|
-- Argent Dawn Priest
|
||||||
|
UPDATE `creature_template` SET `gossip_menu_id` = 7232, `npcflag` = `npcflag` | 1 WHERE (`entry` = 16436);
|
||||||
|
|
||||||
|
DELETE FROM `gossip_menu` WHERE `MenuID` IN (7230, 7231, 7232);
|
||||||
|
INSERT INTO `gossip_menu` (`MenuID`, `TextID`) VALUES
|
||||||
|
(7230, 8543),
|
||||||
|
(7231, 8544),
|
||||||
|
(7232, 8545);
|
||||||
|
|
||||||
|
DELETE FROM `npc_text` WHERE (`ID` IN (8543, 8544, 8545));
|
||||||
|
INSERT INTO `npc_text` (`ID`, `text0_0`, `text0_1`, `BroadcastTextID0`, `lang0`, `Probability0`, `em0_0`, `em0_1`, `em0_2`, `em0_3`, `em0_4`, `em0_5`, `text1_0`, `text1_1`, `BroadcastTextID1`, `lang1`, `Probability1`, `em1_0`, `em1_1`, `em1_2`, `em1_3`, `em1_4`, `em1_5`, `text2_0`, `text2_1`, `BroadcastTextID2`, `lang2`, `Probability2`, `em2_0`, `em2_1`, `em2_2`, `em2_3`, `em2_4`, `em2_5`, `text3_0`, `text3_1`, `BroadcastTextID3`, `lang3`, `Probability3`, `em3_0`, `em3_1`, `em3_2`, `em3_3`, `em3_4`, `em3_5`, `text4_0`, `text4_1`, `BroadcastTextID4`, `lang4`, `Probability4`, `em4_0`, `em4_1`, `em4_2`, `em4_3`, `em4_4`, `em4_5`, `text5_0`, `text5_1`, `BroadcastTextID5`, `lang5`, `Probability5`, `em5_0`, `em5_1`, `em5_2`, `em5_3`, `em5_4`, `em5_5`, `text6_0`, `text6_1`, `BroadcastTextID6`, `lang6`, `Probability6`, `em6_0`, `em6_1`, `em6_2`, `em6_3`, `em6_4`, `em6_5`, `text7_0`, `text7_1`, `BroadcastTextID7`, `lang7`, `Probability7`, `em7_0`, `em7_1`, `em7_2`, `em7_3`, `em7_4`, `em7_5`, `VerifiedBuild`) VALUES
|
||||||
|
(8543, '', '', 12301, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
(8544, '', '', 12300, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
(8545, '', '', 12299, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||||
|
|
||||||
|
DELETE FROM `gossip_menu_option` WHERE (`MenuID` IN (7230, 7231, 7232));
|
||||||
|
INSERT INTO `gossip_menu_option` (`MenuID`, `OptionID`, `OptionIcon`, `OptionText`, `OptionBroadcastTextID`, `OptionType`, `OptionNpcFlag`, `ActionMenuID`, `ActionPoiID`, `BoxCoded`, `BoxMoney`, `BoxText`, `BoxBroadcastTextID`, `VerifiedBuild`) VALUES
|
||||||
|
(7230, 0, 0, 'Give me one of your magic items.', 12302, 1, 1, 0, 0, 0, 0, '', 0, 0),
|
||||||
|
(7231, 0, 0, 'Give me one of your magic items.', 12302, 1, 1, 0, 0, 0, 0, '', 0, 0),
|
||||||
|
(7232, 0, 0, 'Give me one of your magic items.', 12302, 1, 1, 0, 0, 0, 0, '', 0, 0);
|
||||||
|
|
||||||
|
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` IN (16384, 16435, 16436);
|
||||||
|
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (16384, 16435, 16436) AND (`source_type` = 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
|
||||||
|
(16384, 0, 0, 0, 62, 0, 100, 0, 7230, 0, 0, 0, 0, 0, 11, 28319, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Argent Dawn Initiate - On Gossip Option 0 Selected - Cast \'Create Lesser Mark of the Dawn\''),
|
||||||
|
(16435, 0, 0, 0, 62, 0, 100, 0, 7231, 0, 0, 0, 0, 0, 11, 28320, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Argent Dawn Cleric - On Gossip Option 0 Selected - Cast \'Create Mark of the Dawn\''),
|
||||||
|
(16436, 0, 0, 0, 62, 0, 100, 0, 7232, 0, 0, 0, 0, 0, 11, 28321, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Argent Dawn Priest - On Gossip Option 0 Selected - Cast \'Create Greater Mark of the Dawn\'');
|
||||||
7
data/sql/updates/db_world/2025_10_16_05.sql
Normal file
7
data/sql/updates/db_world/2025_10_16_05.sql
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
-- DB update 2025_10_16_04 -> 2025_10_16_05
|
||||||
|
|
||||||
|
-- Fire Immunity (Unbound Firestorm N/H)
|
||||||
|
UPDATE `creature_template` SET `spell_school_immune_mask` = `spell_school_immune_mask` |4 WHERE (`entry` IN (28584, 30983));
|
||||||
|
|
||||||
|
-- Nature Immunity (Slag H, Storming Vortex N/H, Cyclone H)
|
||||||
|
UPDATE `creature_template` SET `spell_school_immune_mask` = `spell_school_immune_mask` |8 WHERE (`entry` IN (28547, 30970, 30979, 30965));
|
||||||
3
data/sql/updates/db_world/2025_10_17_00.sql
Normal file
3
data/sql/updates/db_world/2025_10_17_00.sql
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
-- DB update 2025_10_16_05 -> 2025_10_17_00
|
||||||
|
--
|
||||||
|
UPDATE `gameobject` SET `state` = 0 WHERE `guid` IN (65573, 65585) AND `id` IN (191324, 191416);
|
||||||
7
data/sql/updates/db_world/2025_10_18_00.sql
Normal file
7
data/sql/updates/db_world/2025_10_18_00.sql
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
-- DB update 2025_10_17_00 -> 2025_10_18_00
|
||||||
|
--
|
||||||
|
UPDATE `spell_proc_event` SET `SpellFamilyMask2` = 0x00000040 WHERE `entry` = -33191;
|
||||||
|
|
||||||
|
DELETE FROM `spell_script_names` WHERE `spell_id` = -33191;
|
||||||
|
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
|
||||||
|
(-33191, 'spell_gen_proc_on_victim');
|
||||||
6
data/sql/updates/db_world/2025_10_18_01.sql
Normal file
6
data/sql/updates/db_world/2025_10_18_01.sql
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
-- DB update 2025_10_18_00 -> 2025_10_18_01
|
||||||
|
DELETE FROM `spelldifficulty_dbc` WHERE `ID` IN (52780, 52658, 52667);
|
||||||
|
INSERT INTO `spelldifficulty_dbc` (`ID`, `DifficultySpellID_1`, `DifficultySpellID_2`, `DifficultySpellID_3`, `DifficultySpellID_4`) VALUES
|
||||||
|
(52780, 52780, 59800, 0, 0), -- Ball Lightning
|
||||||
|
(52658, 52658, 59795, 0, 0), -- Static Overload
|
||||||
|
(52667, 52667, 59833, 0, 0); -- Spark Visual Trigger
|
||||||
1
deps/CMakeLists.txt
vendored
1
deps/CMakeLists.txt
vendored
@@ -45,4 +45,5 @@ endif()
|
|||||||
if (BUILD_TOOLS_MAPS)
|
if (BUILD_TOOLS_MAPS)
|
||||||
add_subdirectory(bzip2)
|
add_subdirectory(bzip2)
|
||||||
add_subdirectory(libmpq)
|
add_subdirectory(libmpq)
|
||||||
|
add_subdirectory(fkYAML)
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
4
deps/PackageList.txt
vendored
4
deps/PackageList.txt
vendored
@@ -81,3 +81,7 @@ recastnavigation (Recast is state of the art navigation mesh construction toolse
|
|||||||
{fmt} is an open-source formatting library providing a fast and safe alternative to C stdio and C++ iostreams.
|
{fmt} is an open-source formatting library providing a fast and safe alternative to C stdio and C++ iostreams.
|
||||||
https://github.com/fmtlib/fmt
|
https://github.com/fmtlib/fmt
|
||||||
Version: 7.1.3
|
Version: 7.1.3
|
||||||
|
|
||||||
|
fkYAML (A C++ header-only YAML library)
|
||||||
|
https://github.com/fktn-k/fkYAML
|
||||||
|
Version: 721edb3e1a817e527fd9e1e18a3bea300822522e
|
||||||
|
|||||||
17
deps/acore/joiner/joiner.sh
vendored
17
deps/acore/joiner/joiner.sh
vendored
@@ -116,7 +116,21 @@ function Joiner:add_repo() (
|
|||||||
if [ -e "$path/.git/" ]; then
|
if [ -e "$path/.git/" ]; then
|
||||||
# if exists , update
|
# if exists , update
|
||||||
echo "Updating $name on branch $branch..."
|
echo "Updating $name on branch $branch..."
|
||||||
git --git-dir="$path/.git/" --work-tree="$path" rev-parse && git --git-dir="$path/.git/" --work-tree="$path" pull origin "$branch" | grep 'Already up-to-date.' && changed="no" || true
|
if ! git --git-dir="$path/.git/" --work-tree="$path" rev-parse >/dev/null 2>&1; then
|
||||||
|
echo "Unable to read repository at $path/.git/"
|
||||||
|
return $FALSE
|
||||||
|
fi
|
||||||
|
|
||||||
|
local pull_output
|
||||||
|
if ! pull_output=$(git --git-dir="$path/.git/" --work-tree="$path" pull origin "$branch" 2>&1); then
|
||||||
|
printf "%s\n" "$pull_output"
|
||||||
|
return $FALSE
|
||||||
|
fi
|
||||||
|
|
||||||
|
printf "%s\n" "$pull_output"
|
||||||
|
if echo "$pull_output" | grep -qE 'Already up[- ]to-date.'; then
|
||||||
|
changed="no"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
# otherwise clone
|
# otherwise clone
|
||||||
echo "Cloning $name on branch $branch..."
|
echo "Cloning $name on branch $branch..."
|
||||||
@@ -440,4 +454,3 @@ if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
|
|||||||
else
|
else
|
||||||
Joiner:_checkOptions $@
|
Joiner:_checkOptions $@
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
17
deps/fkYAML/CMakeLists.txt
vendored
Normal file
17
deps/fkYAML/CMakeLists.txt
vendored
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
#
|
||||||
|
# This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
|
||||||
|
#
|
||||||
|
# This file is free software; as a special exception the author gives
|
||||||
|
# unlimited permission to copy and/or distribute it, with or without
|
||||||
|
# modifications, as long as this notice is preserved.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
|
||||||
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
#
|
||||||
|
|
||||||
|
add_library(fkYAML INTERFACE)
|
||||||
|
|
||||||
|
target_include_directories(fkYAML INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
|
||||||
|
set_target_properties(fkYAML PROPERTIES FOLDER "deps")
|
||||||
14730
deps/fkYAML/fkYAML/node.hpp
vendored
Normal file
14730
deps/fkYAML/fkYAML/node.hpp
vendored
Normal file
File diff suppressed because it is too large
Load Diff
@@ -354,6 +354,7 @@ foreach(ModuleName ${MODULE_LIST__})
|
|||||||
|
|
||||||
foreach(configFileName ${MODULE_CONFIG_LIST})
|
foreach(configFileName ${MODULE_CONFIG_LIST})
|
||||||
CopyModuleConfig("${MODULE_CONFIG_PATH}/${configFileName}")
|
CopyModuleConfig("${MODULE_CONFIG_PATH}/${configFileName}")
|
||||||
|
string(REGEX REPLACE "\.dist$" "" configFileName ${configFileName})
|
||||||
set(CONFIG_LIST ${CONFIG_LIST}${configFileName},)
|
set(CONFIG_LIST ${CONFIG_LIST}${configFileName},)
|
||||||
message(STATUS " | * ${configFileName}")
|
message(STATUS " | * ${configFileName}")
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
##------------------------------- VARIABLES ---------------------------------##
|
##------------------------------- VARIABLES ---------------------------------##
|
||||||
|
|
||||||
MODULE_TEMPLATE_URL="https://github.com/azerothcore/skeleton-module/"
|
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 ---------------------------------##
|
##------------------------------- CODE ---------------------------------##
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
<!-- First of all, THANK YOU for your contribution. -->
|
<!-- 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:
|
## 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. -->
|
<!-- 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:
|
This PR proposes changes to:
|
||||||
|
|||||||
@@ -23,9 +23,6 @@
|
|||||||
|
|
||||||
namespace MMAP
|
namespace MMAP
|
||||||
{
|
{
|
||||||
static char const* const MAP_FILE_NAME_FORMAT = "{}/mmaps/{:03}.mmap";
|
|
||||||
static char const* const TILE_FILE_NAME_FORMAT = "{}/mmaps/{:03}{:02}{:02}.mmtile";
|
|
||||||
|
|
||||||
// ######################## MMapMgr ########################
|
// ######################## MMapMgr ########################
|
||||||
MMapMgr::~MMapMgr()
|
MMapMgr::~MMapMgr()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -39,6 +39,9 @@ inline void dtCustomFree(void* ptr)
|
|||||||
// move map related classes
|
// move map related classes
|
||||||
namespace MMAP
|
namespace MMAP
|
||||||
{
|
{
|
||||||
|
static char const* const MAP_FILE_NAME_FORMAT = "{}/mmaps/{:03}.mmap";
|
||||||
|
static char const* const TILE_FILE_NAME_FORMAT = "{}/mmaps/{:03}{:02}{:02}.mmtile";
|
||||||
|
|
||||||
typedef std::unordered_map<uint32, dtTileRef> MMapTileSet;
|
typedef std::unordered_map<uint32, dtTileRef> MMapTileSet;
|
||||||
typedef std::unordered_map<uint32, dtNavMeshQuery*> NavMeshQuerySet;
|
typedef std::unordered_map<uint32, dtNavMeshQuery*> NavMeshQuerySet;
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,40 @@
|
|||||||
#define SIZE_OF_GRIDS 533.3333f
|
#define SIZE_OF_GRIDS 533.3333f
|
||||||
|
|
||||||
#define MMAP_MAGIC 0x4d4d4150 // 'MMAP'
|
#define MMAP_MAGIC 0x4d4d4150 // 'MMAP'
|
||||||
#define MMAP_VERSION 16
|
#define MMAP_VERSION 17
|
||||||
|
|
||||||
|
struct MmapTileRecastConfig
|
||||||
|
{
|
||||||
|
float walkableSlopeAngle;
|
||||||
|
|
||||||
|
uint8 walkableRadius; // 1
|
||||||
|
uint8 walkableHeight; // 1
|
||||||
|
uint8 walkableClimb; // 1
|
||||||
|
uint8 padding0{0}; // 1 → align next to 4
|
||||||
|
|
||||||
|
uint32 vertexPerMapEdge;
|
||||||
|
uint32 vertexPerTileEdge;
|
||||||
|
uint32 tilesPerMapEdge;
|
||||||
|
float baseUnitDim;
|
||||||
|
float cellSizeHorizontal;
|
||||||
|
float cellSizeVertical;
|
||||||
|
float maxSimplificationError;
|
||||||
|
|
||||||
|
bool operator==(const MmapTileRecastConfig& b) const {
|
||||||
|
return walkableSlopeAngle == b.walkableSlopeAngle &&
|
||||||
|
walkableRadius == b.walkableRadius &&
|
||||||
|
walkableHeight == b.walkableHeight &&
|
||||||
|
walkableClimb == b.walkableClimb &&
|
||||||
|
vertexPerMapEdge == b.vertexPerMapEdge &&
|
||||||
|
vertexPerTileEdge == b.vertexPerTileEdge &&
|
||||||
|
tilesPerMapEdge == b.tilesPerMapEdge &&
|
||||||
|
baseUnitDim == b.baseUnitDim &&
|
||||||
|
cellSizeHorizontal == b.cellSizeHorizontal &&
|
||||||
|
cellSizeVertical == b.cellSizeVertical &&
|
||||||
|
maxSimplificationError == b.maxSimplificationError;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
static_assert(sizeof(MmapTileRecastConfig) == 36, "Unexpected size of MmapTileRecastConfig");
|
||||||
|
|
||||||
struct MmapTileHeader
|
struct MmapTileHeader
|
||||||
{
|
{
|
||||||
@@ -37,17 +70,20 @@ struct MmapTileHeader
|
|||||||
char usesLiquids{true};
|
char usesLiquids{true};
|
||||||
char padding[3] {};
|
char padding[3] {};
|
||||||
|
|
||||||
|
MmapTileRecastConfig recastConfig;
|
||||||
|
|
||||||
MmapTileHeader() : dtVersion(DT_NAVMESH_VERSION) { }
|
MmapTileHeader() : dtVersion(DT_NAVMESH_VERSION) { }
|
||||||
};
|
};
|
||||||
|
|
||||||
// All padding fields must be handled and initialized to ensure mmaps_generator will produce binary-identical *.mmtile files
|
// All padding fields must be handled and initialized to ensure mmaps_generator will produce binary-identical *.mmtile files
|
||||||
static_assert(sizeof(MmapTileHeader) == 20, "MmapTileHeader size is not correct, adjust the padding field size");
|
static_assert(sizeof(MmapTileHeader) == 56, "MmapTileHeader size is not correct, adjust the padding field size");
|
||||||
static_assert(sizeof(MmapTileHeader) == (sizeof(MmapTileHeader::mmapMagic) +
|
static_assert(sizeof(MmapTileHeader) == (sizeof(MmapTileHeader::mmapMagic) +
|
||||||
sizeof(MmapTileHeader::dtVersion) +
|
sizeof(MmapTileHeader::dtVersion) +
|
||||||
sizeof(MmapTileHeader::mmapVersion) +
|
sizeof(MmapTileHeader::mmapVersion) +
|
||||||
sizeof(MmapTileHeader::size) +
|
sizeof(MmapTileHeader::size) +
|
||||||
sizeof(MmapTileHeader::usesLiquids) +
|
sizeof(MmapTileHeader::usesLiquids) +
|
||||||
sizeof(MmapTileHeader::padding)), "MmapTileHeader has uninitialized padding fields");
|
sizeof(MmapTileHeader::padding)+
|
||||||
|
sizeof(MmapTileRecastConfig)), "MmapTileHeader has uninitialized padding fields");
|
||||||
|
|
||||||
enum NavTerrain
|
enum NavTerrain
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -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!",
|
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);
|
name, _filename, name, Acore::ToString(def), envVarName);
|
||||||
else
|
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.",
|
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;
|
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!",
|
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);
|
name, _filename, name, def, envVarName);
|
||||||
else
|
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.",
|
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;
|
return def;
|
||||||
@@ -588,38 +600,13 @@ bool ConfigMgr::LoadModulesConfigs(bool isReload /*= false*/, bool isNeedPrintIn
|
|||||||
|
|
||||||
// Start loading module configs
|
// Start loading module configs
|
||||||
std::string const& moduleConfigPath = GetConfigPath() + "modules/";
|
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())
|
if (isExistConfig)
|
||||||
{
|
_moduleConfigFiles.emplace_back(fileName);
|
||||||
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 (isNeedPrintInfo)
|
if (isNeedPrintInfo)
|
||||||
|
|||||||
@@ -21,113 +21,81 @@
|
|||||||
void EventMap::Reset()
|
void EventMap::Reset()
|
||||||
{
|
{
|
||||||
_eventMap.clear();
|
_eventMap.clear();
|
||||||
_time = 0;
|
_time = TimePoint::min();
|
||||||
_phase = 0;
|
_phaseMask = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void EventMap::SetPhase(uint8 phase)
|
void EventMap::SetPhase(PhaseIndex phase)
|
||||||
{
|
{
|
||||||
if (!phase)
|
if (!phase)
|
||||||
{
|
_phaseMask = 0;
|
||||||
_phase = 0;
|
else if (phase <= sizeof(PhaseMask) * 8)
|
||||||
}
|
_phaseMask = PhaseMask(1u << (phase - 1u));
|
||||||
else if (phase <= 8)
|
|
||||||
{
|
|
||||||
_phase = (1 << (phase - 1));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void EventMap::AddPhase(uint8 phase)
|
void EventMap::AddPhase(PhaseIndex phase)
|
||||||
{
|
{
|
||||||
if (phase && phase <= 8)
|
if (phase && phase <= sizeof(PhaseMask) * 8)
|
||||||
{
|
_phaseMask |= PhaseMask(1u << (phase - 1u));
|
||||||
_phase |= (1 << (phase - 1));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void EventMap::RemovePhase(uint8 phase)
|
void EventMap::RemovePhase(PhaseIndex phase)
|
||||||
{
|
{
|
||||||
if (phase && phase <= 8)
|
if (phase && phase <= sizeof(PhaseMask) * 8)
|
||||||
{
|
_phaseMask &= PhaseMask(~(1u << (phase - 1u)));
|
||||||
_phase &= ~(1 << (phase - 1));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
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)
|
if (group > sizeof(GroupMask) * 8)
|
||||||
{
|
return;
|
||||||
eventId |= (1 << (group + 15));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (phase && phase <= 8)
|
if (phase > sizeof(PhaseMask) * 8)
|
||||||
{
|
return;
|
||||||
eventId |= (1 << (phase + 23));
|
|
||||||
}
|
|
||||||
|
|
||||||
_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*/)
|
void EventMap::RescheduleEvent(EventId eventId, Milliseconds minTime, Milliseconds maxTime, GroupIndex group /*= 0u*/, PhaseIndex phase /*= 0u*/)
|
||||||
{
|
|
||||||
ScheduleEvent(eventId, randtime(minTime, maxTime).count(), group, phase);
|
|
||||||
}
|
|
||||||
|
|
||||||
void EventMap::RescheduleEvent(uint32 eventId, uint32 time, uint32 groupId /*= 0*/, uint32 phase/* = 0*/)
|
|
||||||
{
|
{
|
||||||
CancelEvent(eventId);
|
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);
|
CancelEvent(eventId);
|
||||||
ScheduleEvent(eventId, time.count(), group, phase);
|
ScheduleEvent(eventId, time, 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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void EventMap::Repeat(Milliseconds time)
|
void EventMap::Repeat(Milliseconds time)
|
||||||
{
|
{
|
||||||
RepeatEvent(time.count());
|
_eventMap.emplace(_time + time, _lastEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EventMap::Repeat(Milliseconds minTime, Milliseconds maxTime)
|
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())
|
while (!Empty())
|
||||||
{
|
{
|
||||||
auto const& itr = _eventMap.begin();
|
auto const& itr = _eventMap.begin();
|
||||||
|
|
||||||
if (itr->first > _time)
|
if (itr->first > _time)
|
||||||
{
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
else if (_phaseMask && itr->second._phaseMask && !(itr->second._phaseMask & _phaseMask))
|
||||||
else if (_phase && (itr->second & 0xFF000000) && !((itr->second >> 24) & _phase))
|
|
||||||
{
|
|
||||||
_eventMap.erase(itr);
|
_eventMap.erase(itr);
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
uint32 eventId = (itr->second & 0x0000FFFF);
|
auto eventId = itr->second._id;
|
||||||
_lastEvent = itr->second;
|
_lastEvent = itr->second;
|
||||||
_eventMap.erase(itr);
|
_eventMap.erase(itr);
|
||||||
return eventId;
|
return eventId;
|
||||||
@@ -137,30 +105,32 @@ uint32 EventMap::ExecuteEvent()
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void EventMap::DelayEvents(uint32 delay)
|
|
||||||
{
|
|
||||||
_time = delay < _time ? _time - delay : 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void EventMap::DelayEvents(Milliseconds delay)
|
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;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
EventStore delayed;
|
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);
|
itr = _eventMap.erase(itr);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -171,13 +141,13 @@ void EventMap::DelayEvents(uint32 delay, uint32 group)
|
|||||||
_eventMap.insert(delayed.begin(), delayed.end());
|
_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();)
|
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);
|
_eventMap.erase(itr);
|
||||||
itr = _eventMap.begin();
|
itr = _eventMap.begin();
|
||||||
continue;
|
continue;
|
||||||
@@ -187,16 +157,14 @@ void EventMap::DelayEventsToMax(uint32 delay, uint32 group)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void EventMap::CancelEvent(uint32 eventId)
|
void EventMap::CancelEvent(EventId eventId)
|
||||||
{
|
{
|
||||||
if (Empty())
|
if (Empty())
|
||||||
{
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
for (auto itr = _eventMap.begin(); itr != _eventMap.end();)
|
for (auto itr = _eventMap.begin(); itr != _eventMap.end();)
|
||||||
{
|
{
|
||||||
if (eventId == (itr->second & 0x0000FFFF))
|
if (eventId == itr->second._id)
|
||||||
{
|
{
|
||||||
itr = _eventMap.erase(itr);
|
itr = _eventMap.erase(itr);
|
||||||
continue;
|
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;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
uint32 groupMask = (1 << (group + 15));
|
for (auto itr = _eventMap.begin(); itr != _eventMap.end();)
|
||||||
for (EventStore::iterator itr = _eventMap.begin(); itr != _eventMap.end();)
|
|
||||||
{
|
{
|
||||||
if (itr->second & groupMask)
|
if (itr->second._groupMask & GroupMask(1u << (group - 1u)))
|
||||||
{
|
{
|
||||||
_eventMap.erase(itr);
|
_eventMap.erase(itr);
|
||||||
itr = _eventMap.begin();
|
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 phase <= sizeof(PhaseIndex) * 8 && (!phase || _phaseMask & PhaseMask(1u << (phase - 1u)));
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (auto const& itr : _eventMap)
|
|
||||||
{
|
|
||||||
if (eventId == (itr.second & 0x0000FFFF))
|
|
||||||
{
|
|
||||||
return itr.first;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 EventMap::GetNextEventTime() const
|
Milliseconds EventMap::GetTimeUntilEvent(EventId eventId) const
|
||||||
{
|
{
|
||||||
return Empty() ? 0 : _eventMap.begin()->first;
|
for (auto const& [time, event] : _eventMap)
|
||||||
}
|
if (eventId == event._id)
|
||||||
|
return std::chrono::duration_cast<Milliseconds>(time - _time);
|
||||||
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));
|
|
||||||
|
|
||||||
return Milliseconds::max();
|
return Milliseconds::max();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool EventMap::HasTimeUntilEvent(EventId eventId) const
|
||||||
|
{
|
||||||
|
return GetTimeUntilEvent(eventId) != Milliseconds::max();
|
||||||
|
}
|
||||||
|
|||||||
@@ -24,18 +24,31 @@
|
|||||||
|
|
||||||
class EventMap
|
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.
|
* Internal storage type.
|
||||||
* Key: Time as TimePoint when the event should occur.
|
* Key: Time as TimePoint when the event should occur.
|
||||||
* Value: The event data as uint32.
|
*/
|
||||||
*
|
using EventStore = std::multimap<TimePoint, Event>;
|
||||||
* 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;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
EventMap() { }
|
EventMap() { }
|
||||||
@@ -47,13 +60,13 @@ public:
|
|||||||
void Reset();
|
void Reset();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Update
|
* @name Update
|
||||||
* @brief Updates the timer of the event map.
|
* @brief Updates the timer of the event map.
|
||||||
* @param time Value to be added to time.
|
* @param time Value to be added to time.
|
||||||
*/
|
*/
|
||||||
void Update(uint32 time)
|
void Update(uint32 time)
|
||||||
{
|
{
|
||||||
_time += time;
|
Update(Milliseconds(time));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -63,37 +76,23 @@ public:
|
|||||||
*/
|
*/
|
||||||
void Update(Milliseconds time)
|
void Update(Milliseconds time)
|
||||||
{
|
{
|
||||||
_time += static_cast<uint32>(time.count());
|
_time += time;
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @name GetTimer
|
|
||||||
* @return Current timer value.
|
|
||||||
*/
|
|
||||||
[[nodiscard]] uint32 GetTimer() const
|
|
||||||
{
|
|
||||||
return _time;
|
|
||||||
}
|
|
||||||
|
|
||||||
void SetTimer(uint32 time)
|
|
||||||
{
|
|
||||||
_time = time;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name GetPhaseMask
|
* @name GetPhaseMask
|
||||||
* @return Active phases as mask.
|
* @return Active phases as mask.
|
||||||
*/
|
*/
|
||||||
[[nodiscard]] uint8 GetPhaseMask() const
|
PhaseMask GetPhaseMask() const
|
||||||
{
|
{
|
||||||
return _phase;
|
return _phaseMask;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Empty
|
* @name Empty
|
||||||
* @return True, if there are no events scheduled.
|
* @return True, if there are no events scheduled.
|
||||||
*/
|
*/
|
||||||
[[nodiscard]] bool Empty() const
|
bool Empty() const
|
||||||
{
|
{
|
||||||
return _eventMap.empty();
|
return _eventMap.empty();
|
||||||
}
|
}
|
||||||
@@ -103,31 +102,21 @@ public:
|
|||||||
* @brief Sets the phase of the map (absolute).
|
* @brief Sets the phase of the map (absolute).
|
||||||
* @param phase Phase which should be set. Values: 1 - 8. 0 resets phase.
|
* @param phase Phase which should be set. Values: 1 - 8. 0 resets phase.
|
||||||
*/
|
*/
|
||||||
void SetPhase(uint8 phase);
|
void SetPhase(PhaseIndex phase);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name AddPhase
|
* @name AddPhase
|
||||||
* @brief Activates the given phase (bitwise).
|
* @brief Activates the given phase (absolute).
|
||||||
* @param phase Phase which should be activated. Values: 1 - 8
|
* @param phase Phase which should be activated. Values: 1 - 8
|
||||||
*/
|
*/
|
||||||
void AddPhase(uint8 phase);
|
void AddPhase(PhaseIndex phase);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name RemovePhase
|
* @name RemovePhase
|
||||||
* @brief Deactivates the given phase (bitwise).
|
* @brief Deactivates the given phase (absolute).
|
||||||
* @param phase Phase which should be deactivated. Values: 1 - 8.
|
* @param phase Phase which should be deactivated. Values: 1 - 8.
|
||||||
*/
|
*/
|
||||||
void RemovePhase(uint8 phase);
|
void RemovePhase(PhaseIndex 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);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name ScheduleEvent
|
* @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 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.
|
* @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
|
* @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 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.
|
* @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);
|
void ScheduleEvent(EventId eventId, Milliseconds minTime, Milliseconds maxTime, GroupIndex group = 0u, PhaseIndex phase = 0u);
|
||||||
|
|
||||||
/**
|
|
||||||
* @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);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name RescheduleEvent
|
* @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 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.
|
* @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
|
* @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 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.
|
* @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
|
* @name Repeat
|
||||||
* @brief Repeats the most recently executed event.
|
|
||||||
* @param time Time until the event occurs as std::chrono type.
|
|
||||||
*/
|
|
||||||
void RepeatEvent(uint32 time);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @name RepeatEvent
|
|
||||||
* @brief Repeats the most recently executed event.
|
* @brief Repeats the most recently executed event.
|
||||||
* @param time Time until the event occurs as std::chrono type.
|
* @param time Time until the event occurs as std::chrono type.
|
||||||
*/
|
*/
|
||||||
void Repeat(Milliseconds time);
|
void Repeat(Milliseconds time);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @name Repeat
|
||||||
* @name RepeatEvent
|
|
||||||
* @brief Repeats the most recently executed event.
|
* @brief Repeats the most recently executed event.
|
||||||
* @param minTime The minimum time until the event occurs as std::chrono type.
|
* @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.
|
* @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.
|
* @brief Returns the next event to execute and removes it from map.
|
||||||
* @return Id of the event to execute.
|
* @return Id of the event to execute.
|
||||||
*/
|
*/
|
||||||
uint32 ExecuteEvent();
|
EventId 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);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name DelayEvents
|
* @name DelayEvents
|
||||||
@@ -228,62 +192,57 @@ public:
|
|||||||
/**
|
/**
|
||||||
* @name DelayEvents
|
* @name DelayEvents
|
||||||
* @brief Delay all events of the same group.
|
* @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.
|
* @param group Group of the events.
|
||||||
*/
|
*/
|
||||||
void DelayEvents(uint32 delay, uint32 group);
|
void DelayEvents(Milliseconds delay, GroupIndex group);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name EventsEvents
|
* @name EventsEvents
|
||||||
* @brief Delay all events of the same group.
|
* @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.
|
* @param group Group of the events.
|
||||||
*/
|
*/
|
||||||
void DelayEventsToMax(uint32 delay, uint32 group);
|
void DelayEventsToMax(Milliseconds delay, GroupIndex group);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name CancelEvent
|
* @name CancelEvent
|
||||||
* @brief Cancels all events of the specified id.
|
* @brief Cancels all events of the specified id.
|
||||||
* @param eventId Event id to cancel.
|
* @param eventId Event id to cancel.
|
||||||
*/
|
*/
|
||||||
void CancelEvent(uint32 eventId);
|
void CancelEvent(EventId eventId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name CancelEventGroup
|
* @name CancelEventGroup
|
||||||
* @brief Cancel events belonging to specified group.
|
* @brief Cancel events belonging to specified group.
|
||||||
* @param group Group to cancel.
|
* @param group Group to cancel.
|
||||||
*/
|
*/
|
||||||
void CancelEventGroup(uint32 group);
|
void CancelEventGroup(GroupIndex 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;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name IsInPhase
|
* @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.
|
* @param phase Wanted phase.
|
||||||
* @return True, if phase of event map contains specified phase.
|
* @return True, if phase of event map contains specified phase.
|
||||||
*/
|
*/
|
||||||
bool IsInPhase(uint8 phase);
|
bool IsInPhase(PhaseIndex phase) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name GetTimeUntilEvent
|
* @name GetTimeUntilEvent
|
||||||
* @brief Returns time as std::chrono type until next event.
|
* @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. 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:
|
private:
|
||||||
/**
|
/**
|
||||||
@@ -296,23 +255,23 @@ private:
|
|||||||
* has reached their time value. Its value is changed in the
|
* has reached their time value. Its value is changed in the
|
||||||
* Update method.
|
* Update method.
|
||||||
*/
|
*/
|
||||||
uint32 _time{ 0 };
|
TimePoint _time{ TimePoint::min() };
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name _phase
|
* @name _phaseMask
|
||||||
* @brief Phase mask of the event map.
|
* @brief Phase mask of the event map.
|
||||||
*
|
*
|
||||||
* Contains the phases the event map is in. Multiple
|
* Contains the phases the event map is in. Multiple
|
||||||
* phases from 1 to 8 can be set with SetPhase or
|
* phases from 1 to 8 can be set with SetPhase or
|
||||||
* AddPhase. RemovePhase deactives a phase.
|
* AddPhase. RemovePhase deactives a phase.
|
||||||
*/
|
*/
|
||||||
uint32 _phase{0};
|
PhaseMask _phaseMask{ 0 };
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name _lastEvent
|
* @name _lastEvent
|
||||||
* @brief Stores information on the most recently executed event
|
* @brief Stores information on the most recently executed event
|
||||||
*/
|
*/
|
||||||
uint32 _lastEvent{0};
|
Event _lastEvent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name _eventMap
|
* @name _eventMap
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ void EventProcessor::Update(uint32 p_time)
|
|||||||
|
|
||||||
// Reschedule non deletable events to be checked at
|
// Reschedule non deletable events to be checked at
|
||||||
// the next update tick
|
// the next update tick
|
||||||
AddEvent(event, CalculateTime(1), false, 0);
|
AddEvent(event, CalculateTime(1), false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -133,13 +133,13 @@ void EventProcessor::CancelEventGroup(uint8 group)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void EventProcessor::AddEvent(BasicEvent* Event, uint64 e_time, bool set_addtime, uint8 eventGroup)
|
void EventProcessor::AddEvent(BasicEvent* Event, uint64 e_time, bool set_addtime /*= true*/, uint8 eventGroup /*= 0*/)
|
||||||
{
|
{
|
||||||
if (set_addtime)
|
if (set_addtime)
|
||||||
Event->m_addTime = m_time;
|
Event->m_addTime = m_time;
|
||||||
Event->m_execTime = e_time;
|
Event->m_execTime = e_time;
|
||||||
Event->m_eventGroup = eventGroup;
|
Event->m_eventGroup = eventGroup;
|
||||||
m_events.insert(std::pair<uint64, BasicEvent*>(e_time, Event));
|
m_events.emplace(e_time, Event);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EventProcessor::ModifyEventTime(BasicEvent* event, Milliseconds newTime)
|
void EventProcessor::ModifyEventTime(BasicEvent* event, Milliseconds newTime)
|
||||||
@@ -151,7 +151,7 @@ void EventProcessor::ModifyEventTime(BasicEvent* event, Milliseconds newTime)
|
|||||||
|
|
||||||
event->m_execTime = newTime.count();
|
event->m_execTime = newTime.count();
|
||||||
m_events.erase(itr);
|
m_events.erase(itr);
|
||||||
m_events.insert(std::pair<uint64, BasicEvent*>(newTime.count(), event));
|
m_events.emplace(newTime.count(), event);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -100,20 +100,19 @@ class EventProcessor
|
|||||||
|
|
||||||
void Update(uint32 p_time);
|
void Update(uint32 p_time);
|
||||||
void KillAllEvents(bool force);
|
void KillAllEvents(bool force);
|
||||||
void AddEvent(BasicEvent* Event, uint64 e_time, bool set_addtime = true) { AddEvent(Event, e_time, set_addtime, 0); };
|
|
||||||
void AddEvent(BasicEvent* Event, uint64 e_time, bool set_addtime, uint8 eventGroup);
|
void AddEvent(BasicEvent* Event, uint64 e_time, bool set_addtime = true, uint8 eventGroup = 0);
|
||||||
template<typename T>
|
template<typename T>
|
||||||
is_lambda_event<T> AddEvent(T&& event, Milliseconds e_time, bool set_addtime = true) { AddEvent(new LambdaBasicEvent<T>(std::move(event)), e_time, set_addtime); }
|
is_lambda_event<T> AddEvent(T&& event, Milliseconds e_time, bool set_addtime = true, uint8 eventGroup = 0) { AddEvent(new LambdaBasicEvent<T>(std::move(event)), e_time.count(), set_addtime, eventGroup); }
|
||||||
void AddEventAtOffset(BasicEvent* event, Milliseconds offset) { AddEvent(event, CalculateTime(offset.count()), true, 0); }
|
|
||||||
void AddEventAtOffset(BasicEvent* event, Milliseconds offset, Milliseconds offset2) { AddEvent(event, CalculateTime(randtime(offset, offset2).count()), true, false); }
|
void AddEventAtOffset(BasicEvent* event, Milliseconds offset, uint8 eventGroup = 0) { AddEvent(event, CalculateTime(offset.count()), true, eventGroup); }
|
||||||
template<typename T>
|
template<typename T>
|
||||||
is_lambda_event<T> AddEventAtOffset(T&& event, Milliseconds offset, uint8 eventGroup) { AddEvent(new LambdaBasicEvent<T>(std::move(event)), CalculateTime(offset.count()), true, eventGroup); };
|
is_lambda_event<T> AddEventAtOffset(T&& event, Milliseconds offset, uint8 eventGroup = 0) { AddEventAtOffset(new LambdaBasicEvent<T>(std::move(event)), offset, eventGroup); };
|
||||||
|
|
||||||
|
void AddEventAtOffset(BasicEvent* event, Milliseconds offset, Milliseconds offset2, uint8 eventGroup = 0) { AddEvent(event, CalculateTime(randtime(offset, offset2).count()), true, eventGroup); }
|
||||||
template<typename T>
|
template<typename T>
|
||||||
is_lambda_event<T> AddEventAtOffset(T&& event, Milliseconds offset, Milliseconds offset2, uint8 eventGroup) { AddEvent(new LambdaBasicEvent<T>(std::move(event)), CalculateTime(randtime(offset, offset2).count()), true, eventGroup); };
|
is_lambda_event<T> AddEventAtOffset(T&& event, Milliseconds offset, Milliseconds offset2, uint8 eventGroup = 0) { AddEventAtOffset(new LambdaBasicEvent<T>(std::move(event)), offset, offset2, eventGroup); };
|
||||||
template<typename T>
|
|
||||||
is_lambda_event<T> AddEventAtOffset(T&& event, Milliseconds offset) { AddEventAtOffset(new LambdaBasicEvent<T>(std::move(event)), offset); }
|
|
||||||
template<typename T>
|
|
||||||
is_lambda_event<T> AddEventAtOffset(T&& event, Milliseconds offset, Milliseconds offset2) { AddEventAtOffset(new LambdaBasicEvent<T>(std::move(event)), offset, offset2); }
|
|
||||||
void ModifyEventTime(BasicEvent* event, Milliseconds newTime);
|
void ModifyEventTime(BasicEvent* event, Milliseconds newTime);
|
||||||
[[nodiscard]] uint64 CalculateTime(uint64 t_offset) const;
|
[[nodiscard]] uint64 CalculateTime(uint64 t_offset) const;
|
||||||
|
|
||||||
@@ -121,6 +120,7 @@ class EventProcessor
|
|||||||
[[nodiscard]] uint64 CalculateQueueTime(uint64 delay) const;
|
[[nodiscard]] uint64 CalculateQueueTime(uint64 delay) const;
|
||||||
|
|
||||||
void CancelEventGroup(uint8 group);
|
void CancelEventGroup(uint8 group);
|
||||||
|
bool HaveEventList() const { return !m_events.empty(); }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
uint64 m_time{0};
|
uint64 m_time{0};
|
||||||
|
|||||||
@@ -2352,6 +2352,18 @@ Rate.Reputation.LowLevel.Quest = 1
|
|||||||
|
|
||||||
Rate.Reputation.RecruitAFriendBonus = 0.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
|
||||||
|
|
||||||
#
|
#
|
||||||
###################################################################################################
|
###################################################################################################
|
||||||
|
|
||||||
|
|||||||
@@ -554,17 +554,13 @@ void DBUpdater<T>::ApplyFile(DatabaseWorkerPool<T>& pool, std::string const& hos
|
|||||||
if (ssl == "ssl")
|
if (ssl == "ssl")
|
||||||
args.emplace_back("--ssl-mode=REQUIRED");
|
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
|
// Database
|
||||||
if (!database.empty())
|
if (!database.empty())
|
||||||
args.emplace_back(database);
|
args.emplace_back(database);
|
||||||
|
|
||||||
// Invokes a mysql process which doesn't leak credentials to logs
|
// Invokes a mysql process which doesn't leak credentials to logs
|
||||||
int const ret = Acore::StartProcess(DBUpdaterUtil::GetCorrectedMySQLExecutable(), args,
|
int const ret = Acore::StartProcess(DBUpdaterUtil::GetCorrectedMySQLExecutable(), args,
|
||||||
"sql.updates", "", true);
|
"sql.updates", path.generic_string(), true);
|
||||||
|
|
||||||
if (ret != EXIT_SUCCESS)
|
if (ret != EXIT_SUCCESS)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ void CombatAI::JustEngagedWith(Unit* who)
|
|||||||
if (AISpellInfo[*i].condition == AICOND_AGGRO)
|
if (AISpellInfo[*i].condition == AICOND_AGGRO)
|
||||||
me->CastSpell(who, *i, false);
|
me->CastSpell(who, *i, false);
|
||||||
else if (AISpellInfo[*i].condition == AICOND_COMBAT)
|
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())
|
if (uint32 spellId = events.ExecuteEvent())
|
||||||
{
|
{
|
||||||
DoCast(spellId);
|
DoCast(spellId);
|
||||||
events.ScheduleEvent(spellId, AISpellInfo[spellId].cooldown + rand() % AISpellInfo[spellId].cooldown);
|
events.ScheduleEvent(spellId, Milliseconds(AISpellInfo[spellId].cooldown + rand() % AISpellInfo[spellId].cooldown));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
@@ -143,7 +143,7 @@ void CasterAI::JustEngagedWith(Unit* who)
|
|||||||
DoCast(spells[spell]);
|
DoCast(spells[spell]);
|
||||||
cooldown += me->GetCurrentSpellCastTime(*itr);
|
cooldown += me->GetCurrentSpellCastTime(*itr);
|
||||||
}
|
}
|
||||||
events.ScheduleEvent(*itr, cooldown);
|
events.ScheduleEvent(*itr, Milliseconds(cooldown));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -168,7 +168,7 @@ void CasterAI::UpdateAI(uint32 diff)
|
|||||||
{
|
{
|
||||||
DoCast(spellId);
|
DoCast(spellId);
|
||||||
uint32 casttime = me->GetCurrentSpellCastTime(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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ public:
|
|||||||
|
|
||||||
// Pass parameters between AI
|
// Pass parameters between AI
|
||||||
virtual void DoAction(int32 /*param = 0 */) {}
|
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; }
|
virtual ObjectGuid GetGUID(int32 /*id = 0 */) const { return ObjectGuid::Empty; }
|
||||||
|
|
||||||
static int32 Permissible(GameObject const* go);
|
static int32 Permissible(GameObject const* go);
|
||||||
|
|||||||
@@ -217,7 +217,7 @@ public:
|
|||||||
virtual void DoAction(int32 /*param*/) {}
|
virtual void DoAction(int32 /*param*/) {}
|
||||||
virtual uint32 GetData(uint32 /*id = 0*/) const { return 0; }
|
virtual uint32 GetData(uint32 /*id = 0*/) const { return 0; }
|
||||||
virtual void SetData(uint32 /*id*/, uint32 /*value*/) {}
|
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; }
|
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:
|
// Select the best target (in <targetType> order) from the threat list that fulfill the following:
|
||||||
|
|||||||
@@ -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 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.
|
* @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;
|
ObjectGuid targetGuid;
|
||||||
|
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ public:
|
|||||||
EVADE_REASON_OTHER
|
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); }
|
void Talk(uint8 id, Milliseconds delay) { Talk(id, nullptr, delay); }
|
||||||
|
|
||||||
WorldObject* GetSummoner() const;
|
WorldObject* GetSummoner() const;
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ void SummonList::DespawnEntry(uint32 entry)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SummonList::DespawnAll(uint32 delay /*= 0*/)
|
void SummonList::DespawnAll(Milliseconds delay /*= 0ms*/)
|
||||||
{
|
{
|
||||||
while (!storage_.empty())
|
while (!storage_.empty())
|
||||||
{
|
{
|
||||||
@@ -325,13 +325,13 @@ void ScriptedAI::ScheduleTimedEvent(Milliseconds timerMin, Milliseconds timerMax
|
|||||||
return;
|
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();
|
exec();
|
||||||
|
|
||||||
if (!uniqueId)
|
if (!uniqueId)
|
||||||
{
|
{
|
||||||
repeatMax > 0s ? context.Repeat(repeatMin, repeatMax) : context.Repeat(repeatMin);
|
repeatMax > 0ms ? context.Repeat(repeatMin, repeatMax) : context.Repeat(repeatMin);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -552,6 +552,11 @@ void ScriptedAI::SetEquipmentSlots(bool loadDefault, int32 mainHand /*= EQUIP_NO
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ScriptedAI::SetRun(bool run)
|
||||||
|
{
|
||||||
|
me->SetWalk(!run);
|
||||||
|
}
|
||||||
|
|
||||||
enum eNPCs
|
enum eNPCs
|
||||||
{
|
{
|
||||||
NPC_BROODLORD = 12017,
|
NPC_BROODLORD = 12017,
|
||||||
@@ -654,7 +659,7 @@ void BossAI::_JustEngagedWith()
|
|||||||
ScheduleTasks();
|
ScheduleTasks();
|
||||||
if (callForHelpRange)
|
if (callForHelpRange)
|
||||||
{
|
{
|
||||||
ScheduleTimedEvent(0s, [&]
|
ScheduleTimedEvent(0ms, [&]
|
||||||
{
|
{
|
||||||
me->CallForHelp(callForHelpRange);
|
me->CallForHelp(callForHelpRange);
|
||||||
}, 2s);
|
}, 2s);
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ public:
|
|||||||
void Summon(Creature const* summon) { storage_.push_back(summon->GetGUID()); }
|
void Summon(Creature const* summon) { storage_.push_back(summon->GetGUID()); }
|
||||||
void Despawn(Creature const* summon) { storage_.remove(summon->GetGUID()); }
|
void Despawn(Creature const* summon) { storage_.remove(summon->GetGUID()); }
|
||||||
void DespawnEntry(uint32 entry);
|
void DespawnEntry(uint32 entry);
|
||||||
void DespawnAll(uint32 delay = 0);
|
void DespawnAll(Milliseconds delay = 0ms);
|
||||||
bool IsAnyCreatureAlive() const;
|
bool IsAnyCreatureAlive() const;
|
||||||
bool IsAnyCreatureWithEntryAlive(uint32 entry) const;
|
bool IsAnyCreatureWithEntryAlive(uint32 entry) const;
|
||||||
bool IsAnyCreatureInCombat() const;
|
bool IsAnyCreatureInCombat() const;
|
||||||
@@ -227,6 +227,8 @@ struct ScriptedAI : public CreatureAI
|
|||||||
// Called when AI is temporarily replaced or put back when possess is applied or removed
|
// Called when AI is temporarily replaced or put back when possess is applied or removed
|
||||||
void OnPossess(bool /*apply*/) {}
|
void OnPossess(bool /*apply*/) {}
|
||||||
|
|
||||||
|
void SetRun(bool run);
|
||||||
|
|
||||||
enum class Axis
|
enum class Axis
|
||||||
{
|
{
|
||||||
AXIS_X,
|
AXIS_X,
|
||||||
@@ -355,11 +357,11 @@ struct ScriptedAI : public CreatureAI
|
|||||||
void ClearUniqueTimedEventsDone() { _uniqueTimedEvents.clear(); }
|
void ClearUniqueTimedEventsDone() { _uniqueTimedEvents.clear(); }
|
||||||
|
|
||||||
// Schedules a timed event using task scheduler.
|
// 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 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 = 0s, uint32 uniqueId = 0) { ScheduleTimedEvent(0s, timerMax, exec, repeatMin, repeatMax, uniqueId); };
|
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.
|
// 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 HealthBelowPct(uint32 pct) const { return me->HealthBelowPct(pct); }
|
||||||
bool HealthAbovePct(uint32 pct) const { return me->HealthAbovePct(pct); }
|
bool HealthAbovePct(uint32 pct) const { return me->HealthAbovePct(pct); }
|
||||||
@@ -463,7 +465,7 @@ enum HealthCheckStatus
|
|||||||
|
|
||||||
struct HealthCheckEventData
|
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;
|
uint8 _healthPct;
|
||||||
std::function<void()> _exec;
|
std::function<void()> _exec;
|
||||||
|
|||||||
@@ -33,7 +33,6 @@ npc_escortAI::npc_escortAI(Creature* creature) : ScriptedAI(creature),
|
|||||||
MaxPlayerDistance(DEFAULT_MAX_PLAYER_DISTANCE),
|
MaxPlayerDistance(DEFAULT_MAX_PLAYER_DISTANCE),
|
||||||
m_pQuestForEscort(nullptr),
|
m_pQuestForEscort(nullptr),
|
||||||
m_bIsActiveAttacker(true),
|
m_bIsActiveAttacker(true),
|
||||||
m_bIsRunning(false),
|
|
||||||
m_bCanInstantRespawn(false),
|
m_bCanInstantRespawn(false),
|
||||||
m_bCanReturnToStart(false),
|
m_bCanReturnToStart(false),
|
||||||
DespawnAtEnd(true),
|
DespawnAtEnd(true),
|
||||||
@@ -186,9 +185,8 @@ void npc_escortAI::JustRespawned()
|
|||||||
void npc_escortAI::ReturnToLastPoint()
|
void npc_escortAI::ReturnToLastPoint()
|
||||||
{
|
{
|
||||||
float x, y, z, o;
|
float x, y, z, o;
|
||||||
me->SetWalk(false);
|
|
||||||
me->GetHomePosition(x, y, z, o);
|
me->GetHomePosition(x, y, z, o);
|
||||||
me->GetMotionMaster()->MovePoint(POINT_LAST_POINT, x, y, z);
|
me->GetMotionMaster()->MovePoint(POINT_LAST_POINT, x, y, z, FORCED_MOVEMENT_RUN);
|
||||||
}
|
}
|
||||||
|
|
||||||
void npc_escortAI::EnterEvadeMode(EvadeReason /*why*/)
|
void npc_escortAI::EnterEvadeMode(EvadeReason /*why*/)
|
||||||
@@ -329,7 +327,6 @@ void npc_escortAI::MovementInform(uint32 moveType, uint32 pointId)
|
|||||||
{
|
{
|
||||||
LOG_DEBUG("scripts.ai", "EscortAI has returned to original position before combat");
|
LOG_DEBUG("scripts.ai", "EscortAI has returned to original position before combat");
|
||||||
|
|
||||||
me->SetWalk(!m_bIsRunning);
|
|
||||||
RemoveEscortState(STATE_ESCORT_RETURNING);
|
RemoveEscortState(STATE_ESCORT_RETURNING);
|
||||||
|
|
||||||
if (!m_uiWPWaitTimer)
|
if (!m_uiWPWaitTimer)
|
||||||
@@ -418,28 +415,8 @@ void npc_escortAI::FillPointMovementListForCreature()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void npc_escortAI::SetRun(bool on)
|
|
||||||
{
|
|
||||||
if (on)
|
|
||||||
{
|
|
||||||
if (!m_bIsRunning)
|
|
||||||
me->SetWalk(false);
|
|
||||||
else
|
|
||||||
LOG_DEBUG("scripts.ai", "EscortAI attempt to set run mode, but is already running.");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (m_bIsRunning)
|
|
||||||
me->SetWalk(true);
|
|
||||||
else
|
|
||||||
LOG_DEBUG("scripts.ai", "EscortAI attempt to set walk mode, but is already walking.");
|
|
||||||
}
|
|
||||||
|
|
||||||
m_bIsRunning = on;
|
|
||||||
}
|
|
||||||
|
|
||||||
//TODO: get rid of this many variables passed in function.
|
//TODO: get rid of this many variables passed in function.
|
||||||
void npc_escortAI::Start(bool isActiveAttacker /* = true*/, bool run /* = false */, ObjectGuid playerGUID /* = ObjectGuid::Empty */, Quest const* quest /* = nullptr */, bool instantRespawn /* = false */, bool canLoopPath /* = false */, bool resetWaypoints /* = true */)
|
void npc_escortAI::Start(bool isActiveAttacker /* = true*/, ObjectGuid playerGUID /* = ObjectGuid::Empty */, Quest const* quest /* = nullptr */, bool instantRespawn /* = false */, bool canLoopPath /* = false */, bool resetWaypoints /* = true */)
|
||||||
{
|
{
|
||||||
if (me->GetVictim())
|
if (me->GetVictim())
|
||||||
{
|
{
|
||||||
@@ -469,7 +446,6 @@ void npc_escortAI::Start(bool isActiveAttacker /* = true*/, bool run /* = false
|
|||||||
|
|
||||||
//set variables
|
//set variables
|
||||||
m_bIsActiveAttacker = isActiveAttacker;
|
m_bIsActiveAttacker = isActiveAttacker;
|
||||||
m_bIsRunning = run;
|
|
||||||
|
|
||||||
m_uiPlayerGUID = playerGUID;
|
m_uiPlayerGUID = playerGUID;
|
||||||
m_pQuestForEscort = quest;
|
m_pQuestForEscort = quest;
|
||||||
@@ -495,17 +471,11 @@ void npc_escortAI::Start(bool isActiveAttacker /* = true*/, bool run /* = false
|
|||||||
me->SetImmuneToNPC(false);
|
me->SetImmuneToNPC(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_DEBUG("scripts.ai", "EscortAI started with {} waypoints. ActiveAttacker = {}, Run = {}, PlayerGUID = {}",
|
LOG_DEBUG("scripts.ai", "EscortAI started with {} waypoints. ActiveAttacker = {}, PlayerGUID = {}",
|
||||||
uint64(WaypointList.size()), m_bIsActiveAttacker, m_bIsRunning, m_uiPlayerGUID.ToString());
|
uint64(WaypointList.size()), m_bIsActiveAttacker, m_uiPlayerGUID.ToString());
|
||||||
|
|
||||||
CurrentWP = WaypointList.begin();
|
CurrentWP = WaypointList.begin();
|
||||||
|
|
||||||
//Set initial speed
|
|
||||||
if (m_bIsRunning)
|
|
||||||
me->SetWalk(false);
|
|
||||||
else
|
|
||||||
me->SetWalk(true);
|
|
||||||
|
|
||||||
AddEscortState(STATE_ESCORT_ESCORTING);
|
AddEscortState(STATE_ESCORT_ESCORTING);
|
||||||
if (me->GetMotionMaster()->GetMotionSlotType(MOTION_SLOT_ACTIVE) == ESCORT_MOTION_TYPE)
|
if (me->GetMotionMaster()->GetMotionSlotType(MOTION_SLOT_ACTIVE) == ESCORT_MOTION_TYPE)
|
||||||
me->GetMotionMaster()->MovementExpired();
|
me->GetMotionMaster()->MovementExpired();
|
||||||
|
|||||||
@@ -90,9 +90,8 @@ public:
|
|||||||
virtual void WaypointReached(uint32 pointId) = 0;
|
virtual void WaypointReached(uint32 pointId) = 0;
|
||||||
virtual void WaypointStart(uint32 /*pointId*/) {}
|
virtual void WaypointStart(uint32 /*pointId*/) {}
|
||||||
|
|
||||||
void Start(bool isActiveAttacker = true, bool run = false, ObjectGuid playerGUID = ObjectGuid::Empty, Quest const* quest = nullptr, bool instantRespawn = false, bool canLoopPath = false, bool resetWaypoints = true);
|
void Start(bool isActiveAttacker = true, ObjectGuid playerGUID = ObjectGuid::Empty, Quest const* quest = nullptr, bool instantRespawn = false, bool canLoopPath = false, bool resetWaypoints = true);
|
||||||
|
|
||||||
void SetRun(bool on = true);
|
|
||||||
void SetEscortPaused(bool on);
|
void SetEscortPaused(bool on);
|
||||||
|
|
||||||
bool HasEscortState(uint32 escortState) { return (m_uiEscortState & escortState); }
|
bool HasEscortState(uint32 escortState) { return (m_uiEscortState & escortState); }
|
||||||
@@ -130,7 +129,6 @@ private:
|
|||||||
std::list<Escort_Waypoint>::iterator CurrentWP;
|
std::list<Escort_Waypoint>::iterator CurrentWP;
|
||||||
|
|
||||||
bool m_bIsActiveAttacker; //obsolete, determined by faction.
|
bool m_bIsActiveAttacker; //obsolete, determined by faction.
|
||||||
bool m_bIsRunning; //all creatures are walking by default (has flag MOVEMENTFLAG_WALK)
|
|
||||||
bool m_bCanInstantRespawn; //if creature should respawn instantly after escort over (if not, database respawntime are used)
|
bool m_bCanInstantRespawn; //if creature should respawn instantly after escort over (if not, database respawntime are used)
|
||||||
bool m_bCanReturnToStart; //if creature can walk same path (loop) without despawn. Not for regular escort quests.
|
bool m_bCanReturnToStart; //if creature can walk same path (loop) without despawn. Not for regular escort quests.
|
||||||
bool DespawnAtEnd;
|
bool DespawnAtEnd;
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ void AddGossipItemFor(Player* player, uint32 gossipMenuID, uint32 gossipMenuItem
|
|||||||
player->PlayerTalkClass->GetGossipMenu().AddMenuItem(gossipMenuID, gossipMenuItemID, sender, action, boxMoney);
|
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);
|
player->PlayerTalkClass->SendGossipMenu(npcTextID, guid);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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);
|
void AddGossipItemFor(Player* player, uint32 gossipMenuID, uint32 gossipMenuItemID, uint32 sender, uint32 action, uint32 boxMoney = 0);
|
||||||
|
|
||||||
// Send menu text
|
// 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);
|
void SendGossipMenuFor(Player* player, uint32 npcTextID, Creature const* creature);
|
||||||
|
|
||||||
// Close menu
|
// Close menu
|
||||||
|
|||||||
@@ -43,9 +43,6 @@ SmartAI::SmartAI(Creature* c) : CreatureAI(c)
|
|||||||
|
|
||||||
mCanRepeatPath = false;
|
mCanRepeatPath = false;
|
||||||
|
|
||||||
// spawn in run mode
|
|
||||||
// Xinef: spawn in run mode and set mRun to run... this overrides SetWalk EVERYWHERE
|
|
||||||
mRun = true;
|
|
||||||
mEvadeDisabled = false;
|
mEvadeDisabled = false;
|
||||||
|
|
||||||
mCanAutoAttack = true;
|
mCanAutoAttack = true;
|
||||||
@@ -190,7 +187,7 @@ void SmartAI::GenerateWayPointArray(Movement::PointsArray* points)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SmartAI::StartPath(bool run, uint32 path, bool repeat, Unit* invoker)
|
void SmartAI::StartPath(ForcedMovement forcedMovement, uint32 path, bool repeat, Unit* invoker)
|
||||||
{
|
{
|
||||||
if (HasEscortState(SMART_ESCORT_ESCORTING))
|
if (HasEscortState(SMART_ESCORT_ESCORTING))
|
||||||
StopPath();
|
StopPath();
|
||||||
@@ -208,7 +205,6 @@ void SmartAI::StartPath(bool run, uint32 path, bool repeat, Unit* invoker)
|
|||||||
{
|
{
|
||||||
AddEscortState(SMART_ESCORT_ESCORTING);
|
AddEscortState(SMART_ESCORT_ESCORTING);
|
||||||
mCanRepeatPath = repeat;
|
mCanRepeatPath = repeat;
|
||||||
SetRun(run);
|
|
||||||
|
|
||||||
if (invoker && invoker->IsPlayer())
|
if (invoker && invoker->IsPlayer())
|
||||||
{
|
{
|
||||||
@@ -219,7 +215,7 @@ void SmartAI::StartPath(bool run, uint32 path, bool repeat, Unit* invoker)
|
|||||||
Movement::PointsArray pathPoints;
|
Movement::PointsArray pathPoints;
|
||||||
GenerateWayPointArray(&pathPoints);
|
GenerateWayPointArray(&pathPoints);
|
||||||
|
|
||||||
me->GetMotionMaster()->MoveSplinePath(&pathPoints);
|
me->GetMotionMaster()->MoveSplinePath(&pathPoints, forcedMovement);
|
||||||
GetScript()->ProcessEventsFor(SMART_EVENT_WAYPOINT_START, nullptr, wp->id, GetScript()->GetPathId());
|
GetScript()->ProcessEventsFor(SMART_EVENT_WAYPOINT_START, nullptr, wp->id, GetScript()->GetPathId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -256,7 +252,6 @@ void SmartAI::PausePath(uint32 delay, bool forced)
|
|||||||
if (forced && !mWPReached)
|
if (forced && !mWPReached)
|
||||||
{
|
{
|
||||||
mForcedPaused = forced;
|
mForcedPaused = forced;
|
||||||
SetRun(mRun);
|
|
||||||
if (me->GetMotionMaster()->GetMotionSlotType(MOTION_SLOT_ACTIVE) == ESCORT_MOTION_TYPE)
|
if (me->GetMotionMaster()->GetMotionSlotType(MOTION_SLOT_ACTIVE) == ESCORT_MOTION_TYPE)
|
||||||
me->GetMotionMaster()->MovementExpired();
|
me->GetMotionMaster()->MovementExpired();
|
||||||
|
|
||||||
@@ -362,7 +357,7 @@ void SmartAI::EndPath(bool fail)
|
|||||||
if (mCanRepeatPath)
|
if (mCanRepeatPath)
|
||||||
{
|
{
|
||||||
if (IsAIControlled())
|
if (IsAIControlled())
|
||||||
StartPath(mRun, GetScript()->GetPathId(), true);
|
StartPath(FORCED_MOVEMENT_NONE, GetScript()->GetPathId(), true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
GetScript()->SetPathId(0);
|
GetScript()->SetPathId(0);
|
||||||
@@ -373,8 +368,6 @@ void SmartAI::EndPath(bool fail)
|
|||||||
|
|
||||||
void SmartAI::ResumePath()
|
void SmartAI::ResumePath()
|
||||||
{
|
{
|
||||||
SetRun(mRun);
|
|
||||||
|
|
||||||
if (mLastWP)
|
if (mLastWP)
|
||||||
{
|
{
|
||||||
Movement::PointsArray pathPoints;
|
Movement::PointsArray pathPoints;
|
||||||
@@ -389,10 +382,9 @@ void SmartAI::ReturnToLastOOCPos()
|
|||||||
if (!IsAIControlled())
|
if (!IsAIControlled())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
me->SetWalk(false);
|
|
||||||
float x, y, z, o;
|
float x, y, z, o;
|
||||||
me->GetHomePosition(x, y, z, o);
|
me->GetHomePosition(x, y, z, o);
|
||||||
me->GetMotionMaster()->MovePoint(SMART_ESCORT_LAST_OOC_POINT, x, y, z);
|
me->GetMotionMaster()->MovePoint(SMART_ESCORT_LAST_OOC_POINT, x, y, z, FORCED_MOVEMENT_RUN);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SmartAI::UpdatePath(const uint32 diff)
|
void SmartAI::UpdatePath(const uint32 diff)
|
||||||
@@ -410,7 +402,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
|
// 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);
|
GetScript()->ProcessEventsFor(SMART_EVENT_DEATH, me);
|
||||||
me->DespawnOrUnsummon(1);
|
me->DespawnOrUnsummon(1ms);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
mEscortInvokerCheckTimer = 1000;
|
mEscortInvokerCheckTimer = 1000;
|
||||||
@@ -469,7 +461,6 @@ void SmartAI::UpdatePath(const uint32 diff)
|
|||||||
EndPath();
|
EndPath();
|
||||||
else if (GetNextWayPoint())
|
else if (GetNextWayPoint())
|
||||||
{
|
{
|
||||||
SetRun(mRun);
|
|
||||||
// xinef: if we have reached waypoint, and there is no working spline movement it means our splitted array has ended, make new one
|
// xinef: if we have reached waypoint, and there is no working spline movement it means our splitted array has ended, make new one
|
||||||
if (me->movespline->Finalized())
|
if (me->movespline->Finalized())
|
||||||
ResumePath();
|
ResumePath();
|
||||||
@@ -629,7 +620,6 @@ void SmartAI::MovepointReached(uint32 id)
|
|||||||
EndPath();
|
EndPath();
|
||||||
else if (GetNextWayPoint())
|
else if (GetNextWayPoint())
|
||||||
{
|
{
|
||||||
SetRun(mRun);
|
|
||||||
// xinef: if we have reached waypoint, and there is no working spline movement it means our splitted array has ended, make new one
|
// xinef: if we have reached waypoint, and there is no working spline movement it means our splitted array has ended, make new one
|
||||||
if (me->movespline->Finalized())
|
if (me->movespline->Finalized())
|
||||||
ResumePath();
|
ResumePath();
|
||||||
@@ -675,7 +665,6 @@ void SmartAI::EnterEvadeMode(EvadeReason /*why*/)
|
|||||||
|
|
||||||
GetScript()->ProcessEventsFor(SMART_EVENT_EVADE); //must be after aura clear so we can cast spells from db
|
GetScript()->ProcessEventsFor(SMART_EVENT_EVADE); //must be after aura clear so we can cast spells from db
|
||||||
|
|
||||||
SetRun(mRun);
|
|
||||||
if (HasEscortState(SMART_ESCORT_ESCORTING))
|
if (HasEscortState(SMART_ESCORT_ESCORTING))
|
||||||
{
|
{
|
||||||
AddEscortState(SMART_ESCORT_RETURNING);
|
AddEscortState(SMART_ESCORT_RETURNING);
|
||||||
@@ -850,7 +839,6 @@ void SmartAI::AttackStart(Unit* who)
|
|||||||
{
|
{
|
||||||
if (!me->HasUnitState(UNIT_STATE_NO_COMBAT_MOVEMENT))
|
if (!me->HasUnitState(UNIT_STATE_NO_COMBAT_MOVEMENT))
|
||||||
{
|
{
|
||||||
SetRun(mRun);
|
|
||||||
MovementGeneratorType type = me->GetMotionMaster()->GetMotionSlotType(MOTION_SLOT_ACTIVE);
|
MovementGeneratorType type = me->GetMotionMaster()->GetMotionSlotType(MOTION_SLOT_ACTIVE);
|
||||||
if (type == ESCORT_MOTION_TYPE || type == POINT_MOTION_TYPE)
|
if (type == ESCORT_MOTION_TYPE || type == POINT_MOTION_TYPE)
|
||||||
{
|
{
|
||||||
@@ -952,9 +940,7 @@ void SmartAI::OnCharmed(bool /* apply */)
|
|||||||
if (!charmed && !me->IsInEvadeMode())
|
if (!charmed && !me->IsInEvadeMode())
|
||||||
{
|
{
|
||||||
if (mCanRepeatPath)
|
if (mCanRepeatPath)
|
||||||
StartPath(mRun, GetScript()->GetPathId(), true);
|
StartPath(FORCED_MOVEMENT_NONE, GetScript()->GetPathId(), true);
|
||||||
else
|
|
||||||
me->SetWalk(!mRun);
|
|
||||||
|
|
||||||
if (Unit* charmer = me->GetCharmer())
|
if (Unit* charmer = me->GetCharmer())
|
||||||
AttackStart(charmer);
|
AttackStart(charmer);
|
||||||
@@ -993,7 +979,7 @@ void SmartAI::SetData(uint32 id, uint32 value, WorldObject* invoker)
|
|||||||
GetScript()->ProcessEventsFor(SMART_EVENT_DATA_SET, unit, id, value, false, nullptr, gob);
|
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*/)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1002,12 +988,6 @@ ObjectGuid SmartAI::GetGUID(int32 /*id*/) const
|
|||||||
return ObjectGuid::Empty;
|
return ObjectGuid::Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SmartAI::SetRun(bool run)
|
|
||||||
{
|
|
||||||
me->SetWalk(!run);
|
|
||||||
mRun = run;
|
|
||||||
}
|
|
||||||
|
|
||||||
void SmartAI::SetFly(bool fly)
|
void SmartAI::SetFly(bool fly)
|
||||||
{
|
{
|
||||||
// xinef: set proper flag!
|
// xinef: set proper flag!
|
||||||
@@ -1108,7 +1088,6 @@ void SmartAI::SetFollow(Unit* target, float dist, float angle, uint32 credit, ui
|
|||||||
mFollowArrivedEntry = end;
|
mFollowArrivedEntry = end;
|
||||||
mFollowArrivedAlive = !aliveState; // negate - 0 is alive
|
mFollowArrivedAlive = !aliveState; // negate - 0 is alive
|
||||||
mFollowCreditType = creditType;
|
mFollowCreditType = creditType;
|
||||||
SetRun(mRun);
|
|
||||||
me->GetMotionMaster()->MoveFollow(target, mFollowDist, mFollowAngle);
|
me->GetMotionMaster()->MoveFollow(target, mFollowDist, mFollowAngle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ public:
|
|||||||
bool IsAIControlled() const;
|
bool IsAIControlled() const;
|
||||||
|
|
||||||
// Start moving to the desired MovePoint
|
// Start moving to the desired MovePoint
|
||||||
void StartPath(bool run = false, uint32 path = 0, bool repeat = false, Unit* invoker = nullptr);
|
void StartPath(ForcedMovement forcedMovement = FORCED_MOVEMENT_NONE, uint32 path = 0, bool repeat = false, Unit* invoker = nullptr);
|
||||||
bool LoadPath(uint32 entry);
|
bool LoadPath(uint32 entry);
|
||||||
void PausePath(uint32 delay, bool forced = false);
|
void PausePath(uint32 delay, bool forced = false);
|
||||||
void StopPath(uint32 DespawnTime = 0, uint32 quest = 0, bool fail = false);
|
void StopPath(uint32 DespawnTime = 0, uint32 quest = 0, bool fail = false);
|
||||||
@@ -164,7 +164,7 @@ public:
|
|||||||
void SetData(uint32 id, uint32 value, WorldObject* invoker);
|
void SetData(uint32 id, uint32 value, WorldObject* invoker);
|
||||||
|
|
||||||
// Used in scripts to share variables
|
// 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
|
// Used in scripts to share variables
|
||||||
ObjectGuid GetGUID(int32 id = 0) const override;
|
ObjectGuid GetGUID(int32 id = 0) const override;
|
||||||
@@ -175,9 +175,6 @@ public:
|
|||||||
// Called at movepoint reached
|
// Called at movepoint reached
|
||||||
void MovepointReached(uint32 id);
|
void MovepointReached(uint32 id);
|
||||||
|
|
||||||
// Makes the creature run/walk
|
|
||||||
void SetRun(bool run = true);
|
|
||||||
|
|
||||||
void SetFly(bool fly = true);
|
void SetFly(bool fly = true);
|
||||||
|
|
||||||
void SetSwim(bool swim = true);
|
void SetSwim(bool swim = true);
|
||||||
@@ -240,7 +237,6 @@ private:
|
|||||||
uint32 mEscortNPCFlags;
|
uint32 mEscortNPCFlags;
|
||||||
uint32 GetWPCount() { return mWayPoints ? mWayPoints->size() : 0; }
|
uint32 GetWPCount() { return mWayPoints ? mWayPoints->size() : 0; }
|
||||||
bool mCanRepeatPath;
|
bool mCanRepeatPath;
|
||||||
bool mRun;
|
|
||||||
bool mEvadeDisabled;
|
bool mEvadeDisabled;
|
||||||
bool mCanAutoAttack;
|
bool mCanAutoAttack;
|
||||||
bool mForcedPaused;
|
bool mForcedPaused;
|
||||||
|
|||||||
@@ -1683,10 +1683,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
|||||||
{
|
{
|
||||||
if (IsCreature(target))
|
if (IsCreature(target))
|
||||||
{
|
{
|
||||||
if (IsSmart(target->ToCreature()))
|
target->ToCreature()->SetWalk(e.action.setRun.run ? false : true);
|
||||||
CAST_AI(SmartAI, target->ToCreature()->AI())->SetRun(e.action.setRun.run);
|
|
||||||
else
|
|
||||||
target->ToCreature()->SetWalk(e.action.setRun.run ? false : true); // Xinef: reversed
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1731,7 +1728,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
|||||||
if (!IsSmart())
|
if (!IsSmart())
|
||||||
break;
|
break;
|
||||||
|
|
||||||
bool run = e.action.wpStart.run != 0;
|
ForcedMovement forcedMovement = static_cast<ForcedMovement>(e.action.wpStart.forcedMovement);
|
||||||
uint32 entry = e.action.wpStart.pathID;
|
uint32 entry = e.action.wpStart.pathID;
|
||||||
bool repeat = e.action.wpStart.repeat != 0;
|
bool repeat = e.action.wpStart.repeat != 0;
|
||||||
|
|
||||||
@@ -1745,7 +1742,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
|||||||
}
|
}
|
||||||
|
|
||||||
me->SetReactState((ReactStates)e.action.wpStart.reactState);
|
me->SetReactState((ReactStates)e.action.wpStart.reactState);
|
||||||
CAST_AI(SmartAI, me->AI())->StartPath(run, entry, repeat, unit);
|
CAST_AI(SmartAI, me->AI())->StartPath(forcedMovement, entry, repeat, unit);
|
||||||
|
|
||||||
uint32 quest = e.action.wpStart.quest;
|
uint32 quest = e.action.wpStart.quest;
|
||||||
uint32 DespawnTime = e.action.wpStart.despawnTime;
|
uint32 DespawnTime = e.action.wpStart.despawnTime;
|
||||||
@@ -1854,8 +1851,8 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
|||||||
if (TransportBase* trans = me->GetDirectTransport())
|
if (TransportBase* trans = me->GetDirectTransport())
|
||||||
trans->CalculatePassengerPosition(dest.x, dest.y, dest.z);
|
trans->CalculatePassengerPosition(dest.x, dest.y, dest.z);
|
||||||
|
|
||||||
me->GetMotionMaster()->MovePoint(e.action.moveToPos.pointId, dest.x, dest.y, dest.z, true, isForced,
|
me->GetMotionMaster()->MovePoint(e.action.moveToPos.pointId, dest.x, dest.y, dest.z, FORCED_MOVEMENT_NONE,
|
||||||
isControlled ? MOTION_SLOT_CONTROLLED : MOTION_SLOT_ACTIVE, e.target.o);
|
0.f, e.target.o, true, isForced, isControlled ? MOTION_SLOT_CONTROLLED : MOTION_SLOT_ACTIVE);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -1871,9 +1868,8 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
|||||||
randomPoint.m_positionX,
|
randomPoint.m_positionX,
|
||||||
randomPoint.m_positionY,
|
randomPoint.m_positionY,
|
||||||
randomPoint.m_positionZ,
|
randomPoint.m_positionZ,
|
||||||
true,
|
FORCED_MOVEMENT_NONE,
|
||||||
isForced,
|
0.f, 0.f, true, isForced, isControlled ? MOTION_SLOT_CONTROLLED : MOTION_SLOT_ACTIVE
|
||||||
isControlled ? MOTION_SLOT_CONTROLLED : MOTION_SLOT_ACTIVE
|
|
||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1897,7 +1893,8 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
|||||||
else if (e.action.moveToPos.ContactDistance)
|
else if (e.action.moveToPos.ContactDistance)
|
||||||
target->GetNearPoint(me, x, y, z, e.action.moveToPos.ContactDistance, 0, target->GetAngle(me));
|
target->GetNearPoint(me, x, y, z, e.action.moveToPos.ContactDistance, 0, target->GetAngle(me));
|
||||||
|
|
||||||
me->GetMotionMaster()->MovePoint(e.action.moveToPos.pointId, x + e.target.x, y + e.target.y, z + e.target.z, true, isForced, isControlled ? MOTION_SLOT_CONTROLLED : MOTION_SLOT_ACTIVE);
|
me->GetMotionMaster()->MovePoint(e.action.moveToPos.pointId, x + e.target.x, y + e.target.y, z + e.target.z, FORCED_MOVEMENT_NONE,
|
||||||
|
0.f, 0.f, true, isForced, isControlled ? MOTION_SLOT_CONTROLLED : MOTION_SLOT_ACTIVE);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -1914,7 +1911,8 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
|||||||
SAIBool isForced = !e.action.moveToPosTarget.disableForceDestination;
|
SAIBool isForced = !e.action.moveToPosTarget.disableForceDestination;
|
||||||
|
|
||||||
Creature* ctarget = target->ToCreature();
|
Creature* ctarget = target->ToCreature();
|
||||||
ctarget->GetMotionMaster()->MovePoint(e.action.moveToPosTarget.pointId, e.target.x, e.target.y, e.target.z, true, isForced, isControlled ? MOTION_SLOT_CONTROLLED : MOTION_SLOT_ACTIVE);
|
ctarget->GetMotionMaster()->MovePoint(e.action.moveToPosTarget.pointId, e.target.x, e.target.y, e.target.z, FORCED_MOVEMENT_NONE,
|
||||||
|
0.f, 0.f, true, isForced, isControlled ? MOTION_SLOT_CONTROLLED : MOTION_SLOT_ACTIVE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2543,9 +2541,9 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
|||||||
if (closestWpId)
|
if (closestWpId)
|
||||||
{
|
{
|
||||||
bool repeat = e.action.startClosestWaypoint.repeat;
|
bool repeat = e.action.startClosestWaypoint.repeat;
|
||||||
bool run = e.action.startClosestWaypoint.run;
|
ForcedMovement forcedMovement = static_cast<ForcedMovement>(e.action.startClosestWaypoint.forcedMovement);
|
||||||
|
|
||||||
CAST_AI(SmartAI, creature->AI())->StartPath(repeat, closestWpId, run);
|
CAST_AI(SmartAI, creature->AI())->StartPath(forcedMovement, closestWpId, repeat);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -555,6 +555,7 @@ bool SmartAIMgr::IsTargetValid(SmartScriptHolder const& e)
|
|||||||
case SMART_TARGET_RANDOM_POINT:
|
case SMART_TARGET_RANDOM_POINT:
|
||||||
case SMART_TARGET_ROLE_SELECTION:
|
case SMART_TARGET_ROLE_SELECTION:
|
||||||
case SMART_TARGET_LOOT_RECIPIENTS:
|
case SMART_TARGET_LOOT_RECIPIENTS:
|
||||||
|
case SMART_TARGET_VEHICLE_PASSENGER:
|
||||||
case SMART_EVENT_SUMMONED_UNIT_DIES:
|
case SMART_EVENT_SUMMONED_UNIT_DIES:
|
||||||
case SMART_EVENT_SUMMONED_UNIT_EVADE:
|
case SMART_EVENT_SUMMONED_UNIT_EVADE:
|
||||||
case SMART_TARGET_PLAYER_RANGE:
|
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_ZONE_UNDER_ATTACK: return NO_PARAMS;
|
||||||
case SMART_ACTION_LOAD_GRID: return NO_PARAMS;
|
case SMART_ACTION_LOAD_GRID: return NO_PARAMS;
|
||||||
case SMART_ACTION_MUSIC: return sizeof(SmartAction::music);
|
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_SET_GUID: return sizeof(SmartAction::setGuid);
|
||||||
case SMART_ACTION_SCRIPTED_SPAWN: return sizeof(SmartAction::scriptSpawn);
|
case SMART_ACTION_SCRIPTED_SPAWN: return sizeof(SmartAction::scriptSpawn);
|
||||||
case SMART_ACTION_SET_SCALE: return sizeof(SmartAction::setScale);
|
case SMART_ACTION_SET_SCALE: return sizeof(SmartAction::setScale);
|
||||||
@@ -1562,11 +1564,11 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
|
|||||||
e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
|
e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (e.action.startClosestWaypoint.repeat > 1 || e.action.startClosestWaypoint.run > 1)
|
if (e.action.startClosestWaypoint.repeat > 1 || e.action.startClosestWaypoint.forcedMovement >= FORCED_MOVEMENT_MAX)
|
||||||
{
|
{
|
||||||
LOG_ERROR("sql.sql", "SmartAIMgr: Entry {} SourceType {} Event {} Action {} has invalid run ({}) or repeat ({}) parameter, must be 0 or 1.",
|
LOG_ERROR("sql.sql", "SmartAIMgr: Entry {} SourceType {} Event {} Action {} has invalid forcedMovement ({}) or repeat ({}) parameter, must be 0 or 1.",
|
||||||
e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(),
|
e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(),
|
||||||
e.action.startClosestWaypoint.repeat, e.action.startClosestWaypoint.run);
|
e.action.startClosestWaypoint.repeat, e.action.startClosestWaypoint.forcedMovement);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -1743,8 +1745,13 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return IsSAIBoolValid(e, e.action.wpStart.run) &&
|
if (e.action.wpStart.forcedMovement >= FORCED_MOVEMENT_MAX)
|
||||||
IsSAIBoolValid(e, e.action.wpStart.repeat);
|
{
|
||||||
|
LOG_ERROR("sql.sql", "SmartAIMgr: Creature {} Event {} Action {} uses invalid forcedMovement {}, skipped.", e.entryOrGuid, e.event_id, e.GetActionType(), e.action.wpStart.forcedMovement);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return IsSAIBoolValid(e, e.action.wpStart.repeat);
|
||||||
}
|
}
|
||||||
case SMART_ACTION_CREATE_TIMED_EVENT:
|
case SMART_ACTION_CREATE_TIMED_EVENT:
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1041,7 +1041,7 @@ struct SmartAction
|
|||||||
|
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
SAIBool run;
|
uint32 forcedMovement;
|
||||||
uint32 pathID;
|
uint32 pathID;
|
||||||
SAIBool repeat;
|
SAIBool repeat;
|
||||||
uint32 quest;
|
uint32 quest;
|
||||||
@@ -1295,7 +1295,7 @@ struct SmartAction
|
|||||||
uint32 pathId1;
|
uint32 pathId1;
|
||||||
uint32 pathId2;
|
uint32 pathId2;
|
||||||
uint32 repeat;
|
uint32 repeat;
|
||||||
uint32 run;
|
uint32 forcedMovement;
|
||||||
} startClosestWaypoint;
|
} startClosestWaypoint;
|
||||||
|
|
||||||
struct
|
struct
|
||||||
|
|||||||
@@ -855,7 +855,7 @@ GameObject* Battlefield::SpawnGameObject(uint32 entry, float x, float y, float z
|
|||||||
return go;
|
return go;
|
||||||
}
|
}
|
||||||
|
|
||||||
Creature* Battlefield::GetCreature(ObjectGuid const guid)
|
Creature* Battlefield::GetCreature(ObjectGuid const& guid)
|
||||||
{
|
{
|
||||||
if (!m_Map)
|
if (!m_Map)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
@@ -863,7 +863,7 @@ Creature* Battlefield::GetCreature(ObjectGuid const guid)
|
|||||||
return m_Map->GetCreature(guid);
|
return m_Map->GetCreature(guid);
|
||||||
}
|
}
|
||||||
|
|
||||||
GameObject* Battlefield::GetGameObject(ObjectGuid const guid)
|
GameObject* Battlefield::GetGameObject(ObjectGuid const& guid)
|
||||||
{
|
{
|
||||||
if (!m_Map)
|
if (!m_Map)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|||||||
@@ -146,6 +146,7 @@ class BfGraveyard
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
BfGraveyard(Battlefield* Bf);
|
BfGraveyard(Battlefield* Bf);
|
||||||
|
virtual ~BfGraveyard() = default;
|
||||||
|
|
||||||
// Method to changing who controls the graveyard
|
// Method to changing who controls the graveyard
|
||||||
void GiveControlTo(TeamId team);
|
void GiveControlTo(TeamId team);
|
||||||
@@ -302,8 +303,8 @@ public:
|
|||||||
Creature* SpawnCreature(uint32 entry, Position pos, TeamId teamId);
|
Creature* SpawnCreature(uint32 entry, Position pos, TeamId teamId);
|
||||||
GameObject* SpawnGameObject(uint32 entry, float x, float y, float z, float o);
|
GameObject* SpawnGameObject(uint32 entry, float x, float y, float z, float o);
|
||||||
|
|
||||||
Creature* GetCreature(ObjectGuid const guid);
|
Creature* GetCreature(ObjectGuid const& guid);
|
||||||
GameObject* GetGameObject(ObjectGuid const guid);
|
GameObject* GetGameObject(ObjectGuid const& guid);
|
||||||
|
|
||||||
// Script-methods
|
// Script-methods
|
||||||
|
|
||||||
|
|||||||
@@ -415,7 +415,7 @@ void BattlefieldWG::OnBattleEnd(bool endByTimer)
|
|||||||
{
|
{
|
||||||
for (GuidUnorderedSet::const_iterator itr = m_vehicles[team].begin(); itr != m_vehicles[team].end(); ++itr)
|
for (GuidUnorderedSet::const_iterator itr = m_vehicles[team].begin(); itr != m_vehicles[team].end(); ++itr)
|
||||||
if (Creature* creature = GetCreature(*itr))
|
if (Creature* creature = GetCreature(*itr))
|
||||||
creature->DespawnOrUnsummon(1);
|
creature->DespawnOrUnsummon(1ms);
|
||||||
|
|
||||||
m_vehicles[team].clear();
|
m_vehicles[team].clear();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -366,7 +366,7 @@ void BattlegroundQueue::RemovePlayer(ObjectGuid guid, bool decreaseInvitedCount)
|
|||||||
|
|
||||||
void BattlegroundQueue::AddEvent(BasicEvent* Event, uint64 e_time)
|
void BattlegroundQueue::AddEvent(BasicEvent* Event, uint64 e_time)
|
||||||
{
|
{
|
||||||
m_events.AddEvent(Event, m_events.CalculateTime(e_time));
|
m_events.AddEventAtOffset(Event, Milliseconds(e_time));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BattlegroundQueue::IsPlayerInvitedToRatedArena(ObjectGuid pl_guid)
|
bool BattlegroundQueue::IsPlayerInvitedToRatedArena(ObjectGuid pl_guid)
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ void BattlegroundAB::PostUpdateImpl(uint32 diff)
|
|||||||
uint8 controlledPoints = _controlledPoints[teamId];
|
uint8 controlledPoints = _controlledPoints[teamId];
|
||||||
if (controlledPoints == 0)
|
if (controlledPoints == 0)
|
||||||
{
|
{
|
||||||
_bgEvents.ScheduleEvent(eventId, 3000);
|
_bgEvents.ScheduleEvent(eventId, 3s);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -115,7 +115,7 @@ void BattlegroundAB::PostUpdateImpl(uint32 diff)
|
|||||||
if (honorRewards < uint8(m_TeamScores[teamId] / _honorTics))
|
if (honorRewards < uint8(m_TeamScores[teamId] / _honorTics))
|
||||||
RewardHonorToTeam(GetBonusHonorFromKill(1), teamId);
|
RewardHonorToTeam(GetBonusHonorFromKill(1), teamId);
|
||||||
if (reputationRewards < uint8(m_TeamScores[teamId] / _reputationTics))
|
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 (information < uint8(m_TeamScores[teamId] / BG_AB_WARNING_NEAR_VICTORY_SCORE))
|
||||||
{
|
{
|
||||||
if (teamId == TEAM_ALLIANCE)
|
if (teamId == TEAM_ALLIANCE)
|
||||||
@@ -170,8 +170,8 @@ void BattlegroundAB::StartingEventOpenDoors()
|
|||||||
DoorOpen(BG_AB_OBJECT_GATE_A);
|
DoorOpen(BG_AB_OBJECT_GATE_A);
|
||||||
DoorOpen(BG_AB_OBJECT_GATE_H);
|
DoorOpen(BG_AB_OBJECT_GATE_H);
|
||||||
StartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, BG_AB_EVENT_START_BATTLE);
|
StartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, BG_AB_EVENT_START_BATTLE);
|
||||||
_bgEvents.ScheduleEvent(BG_AB_EVENT_ALLIANCE_TICK, 3000);
|
_bgEvents.ScheduleEvent(BG_AB_EVENT_ALLIANCE_TICK, 3s);
|
||||||
_bgEvents.ScheduleEvent(BG_AB_EVENT_HORDE_TICK, 3000);
|
_bgEvents.ScheduleEvent(BG_AB_EVENT_HORDE_TICK, 3s);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BattlegroundAB::AddPlayer(Player* player)
|
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;
|
_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;
|
_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)
|
for (uint32 i = 0; i < BG_AB_DYNAMIC_NODES_COUNT; ++i)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -170,12 +170,11 @@ enum BG_AB_Misc
|
|||||||
|
|
||||||
BG_AB_WARNING_NEAR_VICTORY_SCORE = 1400,
|
BG_AB_WARNING_NEAR_VICTORY_SCORE = 1400,
|
||||||
BG_AB_MAX_TEAM_SCORE = 1600,
|
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_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};
|
const uint32 BG_AB_GraveyardIds[BG_AB_ALL_NODES_COUNT] = {895, 894, 893, 897, 896, 898, 899};
|
||||||
|
|
||||||
@@ -300,6 +299,7 @@ private:
|
|||||||
EventMap _bgEvents;
|
EventMap _bgEvents;
|
||||||
uint32 _honorTics;
|
uint32 _honorTics;
|
||||||
uint32 _reputationTics;
|
uint32 _reputationTics;
|
||||||
|
float _abReputationRate;
|
||||||
uint8 _controlledPoints[PVP_TEAMS_COUNT] {};
|
uint8 _controlledPoints[PVP_TEAMS_COUNT] {};
|
||||||
bool _teamScores500Disadvantage[PVP_TEAMS_COUNT] {};
|
bool _teamScores500Disadvantage[PVP_TEAMS_COUNT] {};
|
||||||
uint32 _configurableMaxTeamScore;
|
uint32 _configurableMaxTeamScore;
|
||||||
|
|||||||
@@ -194,21 +194,21 @@ void BattlegroundAV::HandleQuestComplete(uint32 questid, Player* player)
|
|||||||
case AV_QUEST_A_COMMANDER1:
|
case AV_QUEST_A_COMMANDER1:
|
||||||
case AV_QUEST_H_COMMANDER1:
|
case AV_QUEST_H_COMMANDER1:
|
||||||
m_Team_QuestStatus[teamId][1]++;
|
m_Team_QuestStatus[teamId][1]++;
|
||||||
RewardReputationToTeam(teamId, 1, teamId);
|
RewardReputationToTeam(teamId, uint32(1 * _avReputationRate), teamId);
|
||||||
if (m_Team_QuestStatus[teamId][1] == 30)
|
if (m_Team_QuestStatus[teamId][1] == 30)
|
||||||
LOG_DEBUG("bg.battleground", "BG_AV Quest {} completed (need to implement some events here", questid);
|
LOG_DEBUG("bg.battleground", "BG_AV Quest {} completed (need to implement some events here", questid);
|
||||||
break;
|
break;
|
||||||
case AV_QUEST_A_COMMANDER2:
|
case AV_QUEST_A_COMMANDER2:
|
||||||
case AV_QUEST_H_COMMANDER2:
|
case AV_QUEST_H_COMMANDER2:
|
||||||
m_Team_QuestStatus[teamId][2]++;
|
m_Team_QuestStatus[teamId][2]++;
|
||||||
RewardReputationToTeam(teamId, 1, teamId);
|
RewardReputationToTeam(teamId, uint32(1 * _avReputationRate), teamId);
|
||||||
if (m_Team_QuestStatus[teamId][2] == 60)
|
if (m_Team_QuestStatus[teamId][2] == 60)
|
||||||
LOG_DEBUG("bg.battleground", "BG_AV Quest {} completed (need to implement some events here", questid);
|
LOG_DEBUG("bg.battleground", "BG_AV Quest {} completed (need to implement some events here", questid);
|
||||||
break;
|
break;
|
||||||
case AV_QUEST_A_COMMANDER3:
|
case AV_QUEST_A_COMMANDER3:
|
||||||
case AV_QUEST_H_COMMANDER3:
|
case AV_QUEST_H_COMMANDER3:
|
||||||
m_Team_QuestStatus[teamId][3]++;
|
m_Team_QuestStatus[teamId][3]++;
|
||||||
RewardReputationToTeam(teamId, 1, teamId);
|
RewardReputationToTeam(teamId, uint32(1 * _avReputationRate), teamId);
|
||||||
if (m_Team_QuestStatus[teamId][3] == 120)
|
if (m_Team_QuestStatus[teamId][3] == 120)
|
||||||
LOG_DEBUG("bg.battleground", "BG_AV Quest {} completed (need to implement some events here", questid);
|
LOG_DEBUG("bg.battleground", "BG_AV Quest {} completed (need to implement some events here", questid);
|
||||||
break;
|
break;
|
||||||
@@ -316,21 +316,21 @@ Creature* BattlegroundAV::AddAVCreature(uint16 cinfoid, uint16 type)
|
|||||||
type -= AV_CPLACE_MAX;
|
type -= AV_CPLACE_MAX;
|
||||||
cinfoid = uint16(BG_AV_StaticCreaturePos[type][4]);
|
cinfoid = uint16(BG_AV_StaticCreaturePos[type][4]);
|
||||||
creature = AddCreature(BG_AV_StaticCreatureInfo[cinfoid],
|
creature = AddCreature(BG_AV_StaticCreatureInfo[cinfoid],
|
||||||
type + AV_CPLACE_MAX,
|
type + AV_CPLACE_MAX,
|
||||||
BG_AV_StaticCreaturePos[type][0],
|
BG_AV_StaticCreaturePos[type][0],
|
||||||
BG_AV_StaticCreaturePos[type][1],
|
BG_AV_StaticCreaturePos[type][1],
|
||||||
BG_AV_StaticCreaturePos[type][2],
|
BG_AV_StaticCreaturePos[type][2],
|
||||||
BG_AV_StaticCreaturePos[type][3]);
|
BG_AV_StaticCreaturePos[type][3]);
|
||||||
isStatic = true;
|
isStatic = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
creature = AddCreature(BG_AV_CreatureInfo[cinfoid],
|
creature = AddCreature(BG_AV_CreatureInfo[cinfoid],
|
||||||
type,
|
type,
|
||||||
BG_AV_CreaturePos[type][0],
|
BG_AV_CreaturePos[type][0],
|
||||||
BG_AV_CreaturePos[type][1],
|
BG_AV_CreaturePos[type][1],
|
||||||
BG_AV_CreaturePos[type][2],
|
BG_AV_CreaturePos[type][2],
|
||||||
BG_AV_CreaturePos[type][3]);
|
BG_AV_CreaturePos[type][3]);
|
||||||
}
|
}
|
||||||
if (!creature)
|
if (!creature)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
@@ -344,7 +344,7 @@ Creature* BattlegroundAV::AddAVCreature(uint16 cinfoid, uint16 type)
|
|||||||
(cinfoid >= AV_NPC_H_GRAVEDEFENSE0 && cinfoid <= AV_NPC_H_GRAVEDEFENSE3))))
|
(cinfoid >= AV_NPC_H_GRAVEDEFENSE0 && cinfoid <= AV_NPC_H_GRAVEDEFENSE3))))
|
||||||
{
|
{
|
||||||
if (!isStatic && ((cinfoid >= AV_NPC_A_GRAVEDEFENSE0 && cinfoid <= AV_NPC_A_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());
|
CreatureData& data = sObjectMgr->NewOrExistCreatureData(creature->GetSpawnId());
|
||||||
data.wander_distance = 5;
|
data.wander_distance = 5;
|
||||||
@@ -814,11 +814,11 @@ void BattlegroundAV::PopulateNode(BG_AV_Nodes node)
|
|||||||
if (!trigger)
|
if (!trigger)
|
||||||
{
|
{
|
||||||
trigger = AddCreature(WORLD_TRIGGER,
|
trigger = AddCreature(WORLD_TRIGGER,
|
||||||
node + 302,
|
node + 302,
|
||||||
BG_AV_CreaturePos[node + 302][0],
|
BG_AV_CreaturePos[node + 302][0],
|
||||||
BG_AV_CreaturePos[node + 302][1],
|
BG_AV_CreaturePos[node + 302][1],
|
||||||
BG_AV_CreaturePos[node + 302][2],
|
BG_AV_CreaturePos[node + 302][2],
|
||||||
BG_AV_CreaturePos[node + 302][3]);
|
BG_AV_CreaturePos[node + 302][3]);
|
||||||
}
|
}
|
||||||
|
|
||||||
//add bonus honor aura trigger creature when node is accupied
|
//add bonus honor aura trigger creature when node is accupied
|
||||||
@@ -1240,25 +1240,28 @@ GraveyardStruct const* BattlegroundAV::GetClosestGraveyard(Player* player)
|
|||||||
|
|
||||||
bool BattlegroundAV::SetupBattleground()
|
bool BattlegroundAV::SetupBattleground()
|
||||||
{
|
{
|
||||||
|
_avReputationRate = sWorld->getRate(RATE_REPUTATION_GAIN_AV);
|
||||||
|
|
||||||
if (sBattlegroundMgr->IsBGWeekend(GetBgTypeID(true)))
|
if (sBattlegroundMgr->IsBGWeekend(GetBgTypeID(true)))
|
||||||
{
|
{
|
||||||
_reputationTower = 18;
|
_reputationTower = uint32(18 * _avReputationRate);
|
||||||
_reputationCaptain = 185;
|
_reputationCaptain = uint32(185 * _avReputationRate);
|
||||||
_reputationBoss = 525;
|
_reputationBoss = uint32(525 * _avReputationRate);
|
||||||
_reputationPerOwnedGraveyard = 18;
|
_reputationPerOwnedGraveyard = uint32(18 * _avReputationRate);
|
||||||
_reputationSurvivingCaptain = 175;
|
_reputationSurvivingCaptain = uint32(175 * _avReputationRate);
|
||||||
_reputationSurvivingTower = 18;
|
_reputationSurvivingTower = uint32(18 * _avReputationRate);
|
||||||
_reputationPerOwnedMine = 36;
|
_reputationPerOwnedMine = uint32(36 * _avReputationRate);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_reputationTower = 12;
|
_reputationTower = uint32(12 * _avReputationRate);
|
||||||
_reputationCaptain = 125;
|
_reputationCaptain = uint32(125 * _avReputationRate);
|
||||||
_reputationBoss = sWorld->getIntConfig(CONFIG_BATTLEGROUND_ALTERAC_REP_ONBOSSDEATH);
|
// Special case: This value comes from another config setting, but we still apply our multiplier
|
||||||
_reputationPerOwnedGraveyard = 12;
|
_reputationBoss = uint32(sWorld->getIntConfig(CONFIG_BATTLEGROUND_ALTERAC_REP_ONBOSSDEATH) * _avReputationRate);
|
||||||
_reputationSurvivingCaptain = 125;
|
_reputationPerOwnedGraveyard = uint32(12 * _avReputationRate);
|
||||||
_reputationSurvivingTower = 12;
|
_reputationSurvivingCaptain = uint32(125 * _avReputationRate);
|
||||||
_reputationPerOwnedMine = 24;
|
_reputationSurvivingTower = uint32(12 * _avReputationRate);
|
||||||
|
_reputationPerOwnedMine = uint32(24 * _avReputationRate);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create starting objects
|
// Create starting objects
|
||||||
|
|||||||
@@ -1850,6 +1850,7 @@ private:
|
|||||||
uint32 _reputationSurvivingCaptain = 0; // 125, 175
|
uint32 _reputationSurvivingCaptain = 0; // 125, 175
|
||||||
uint32 _reputationSurvivingTower = 0; // 12, 18
|
uint32 _reputationSurvivingTower = 0; // 12, 18
|
||||||
uint32 _reputationPerOwnedMine = 0; // 24, 36
|
uint32 _reputationPerOwnedMine = 0; // 24, 36
|
||||||
|
float _avReputationRate;
|
||||||
|
|
||||||
bool m_IsInformedNearVictory[2] {};
|
bool m_IsInformedNearVictory[2] {};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ void BattlegroundEY::PostUpdateImpl(uint32 diff)
|
|||||||
AddPoints(TEAM_ALLIANCE, BG_EY_TickPoints[_ownedPointsCount[TEAM_ALLIANCE] - 1]);
|
AddPoints(TEAM_ALLIANCE, BG_EY_TickPoints[_ownedPointsCount[TEAM_ALLIANCE] - 1]);
|
||||||
if (_ownedPointsCount[TEAM_HORDE] > 0)
|
if (_ownedPointsCount[TEAM_HORDE] > 0)
|
||||||
AddPoints(TEAM_HORDE, BG_EY_TickPoints[_ownedPointsCount[TEAM_HORDE] - 1]);
|
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;
|
break;
|
||||||
case BG_EY_EVENT_FLAG_ON_GROUND:
|
case BG_EY_EVENT_FLAG_ON_GROUND:
|
||||||
RespawnFlagAfterDrop();
|
RespawnFlagAfterDrop();
|
||||||
@@ -78,7 +78,7 @@ void BattlegroundEY::PostUpdateImpl(uint32 diff)
|
|||||||
break;
|
break;
|
||||||
case BG_EY_EVENT_CHECK_CPOINTS:
|
case BG_EY_EVENT_CHECK_CPOINTS:
|
||||||
UpdatePointsState();
|
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;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -106,8 +106,8 @@ void BattlegroundEY::StartingEventOpenDoors()
|
|||||||
|
|
||||||
// Achievement: Flurry
|
// Achievement: Flurry
|
||||||
StartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, BG_EY_EVENT_START_BATTLE);
|
StartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, BG_EY_EVENT_START_BATTLE);
|
||||||
_bgEvents.ScheduleEvent(BG_EY_EVENT_ADD_POINTS, 0);
|
_bgEvents.ScheduleEvent(BG_EY_EVENT_ADD_POINTS, 0ms);
|
||||||
_bgEvents.ScheduleEvent(BG_EY_EVENT_CHECK_CPOINTS, 0);
|
_bgEvents.ScheduleEvent(BG_EY_EVENT_CHECK_CPOINTS, 0ms);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BattlegroundEY::AddPoints(TeamId teamId, uint32 points)
|
void BattlegroundEY::AddPoints(TeamId teamId, uint32 points)
|
||||||
|
|||||||
@@ -31,13 +31,10 @@ enum BG_EY_Events
|
|||||||
BG_EY_EVENT_CHECK_CPOINTS = 4
|
BG_EY_EVENT_CHECK_CPOINTS = 4
|
||||||
};
|
};
|
||||||
|
|
||||||
enum BG_EY_Timers
|
constexpr Milliseconds BG_EY_FLAG_RESPAWN_TIME = 10s;
|
||||||
{
|
constexpr Milliseconds BG_EY_FLAG_ON_GROUND_TIME = 10s;
|
||||||
BG_EY_FLAG_RESPAWN_TIME = 10 * IN_MILLISECONDS,
|
constexpr Milliseconds BG_EY_FPOINTS_CHECK_TIME = 2s;
|
||||||
BG_EY_FLAG_ON_GROUND_TIME = 10 * IN_MILLISECONDS,
|
constexpr Milliseconds BG_EY_FPOINTS_TICK_TIME = 2s;
|
||||||
BG_EY_FPOINTS_CHECK_TIME = 2 * IN_MILLISECONDS,
|
|
||||||
BG_EY_FPOINTS_TICK_TIME = 2 * IN_MILLISECONDS
|
|
||||||
};
|
|
||||||
|
|
||||||
enum BG_EY_ProgressBarConsts
|
enum BG_EY_ProgressBarConsts
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ void BattlegroundWS::PostUpdateImpl(uint32 diff)
|
|||||||
{
|
{
|
||||||
case BG_WS_EVENT_UPDATE_GAME_TIME:
|
case BG_WS_EVENT_UPDATE_GAME_TIME:
|
||||||
UpdateWorldState(WORLD_STATE_BATTLEGROUND_WS_STATE_TIMER, GetMatchTime());
|
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;
|
break;
|
||||||
case BG_WS_EVENT_NO_TIME_LEFT:
|
case BG_WS_EVENT_NO_TIME_LEFT:
|
||||||
if (GetTeamScore(TEAM_ALLIANCE) == GetTeamScore(TEAM_HORDE))
|
if (GetTeamScore(TEAM_ALLIANCE) == GetTeamScore(TEAM_HORDE))
|
||||||
@@ -137,8 +137,8 @@ void BattlegroundWS::StartingEventOpenDoors()
|
|||||||
|
|
||||||
StartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, WS_EVENT_START_BATTLE);
|
StartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, WS_EVENT_START_BATTLE);
|
||||||
UpdateWorldState(WORLD_STATE_BATTLEGROUND_WS_STATE_TIMER_ACTIVE, 1);
|
UpdateWorldState(WORLD_STATE_BATTLEGROUND_WS_STATE_TIMER_ACTIVE, 1);
|
||||||
_bgEvents.ScheduleEvent(BG_WS_EVENT_UPDATE_GAME_TIME, 0);
|
_bgEvents.ScheduleEvent(BG_WS_EVENT_UPDATE_GAME_TIME, 0ms);
|
||||||
_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_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);
|
_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);
|
EndBattleground(GetTeamScore(TEAM_HORDE) == _configurableMaxTeamScore ? TEAM_HORDE : TEAM_ALLIANCE);
|
||||||
}
|
}
|
||||||
else
|
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_KEPT10);
|
||||||
_bgEvents.CancelEvent(BG_WS_EVENT_BOTH_FLAGS_KEPT15);
|
_bgEvents.CancelEvent(BG_WS_EVENT_BOTH_FLAGS_KEPT15);
|
||||||
@@ -426,15 +426,17 @@ void BattlegroundWS::HandleAreaTrigger(Player* player, uint32 trigger)
|
|||||||
|
|
||||||
bool BattlegroundWS::SetupBattleground()
|
bool BattlegroundWS::SetupBattleground()
|
||||||
{
|
{
|
||||||
|
_wsReputationRate = sWorld->getRate(RATE_REPUTATION_GAIN_WSG);
|
||||||
|
|
||||||
if (sBattlegroundMgr->IsBGWeekend(GetBgTypeID(true)))
|
if (sBattlegroundMgr->IsBGWeekend(GetBgTypeID(true)))
|
||||||
{
|
{
|
||||||
_reputationCapture = 45;
|
_reputationCapture = uint32(45 * _wsReputationRate);
|
||||||
_honorWinKills = 3;
|
_honorWinKills = 3;
|
||||||
_honorEndKills = 4;
|
_honorEndKills = 4;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_reputationCapture = 35;
|
_reputationCapture = uint32(35 * _wsReputationRate);
|
||||||
_honorWinKills = 1;
|
_honorWinKills = 1;
|
||||||
_honorEndKills = 2;
|
_honorEndKills = 2;
|
||||||
}
|
}
|
||||||
@@ -578,10 +580,10 @@ uint32 BattlegroundWS::GetAssaultSpellId() const
|
|||||||
{
|
{
|
||||||
if ((!GetFlagPickerGUID(TEAM_ALLIANCE) && GetFlagState(TEAM_ALLIANCE) != BG_WS_FLAG_STATE_ON_GROUND) ||
|
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) ||
|
(!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 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()
|
void BattlegroundWS::RemoveAssaultAuras()
|
||||||
|
|||||||
@@ -39,12 +39,12 @@ enum BG_WS_TimerOrScore
|
|||||||
BG_WS_MAX_TEAM_SCORE = 3,
|
BG_WS_MAX_TEAM_SCORE = 3,
|
||||||
|
|
||||||
BG_WS_TOTAL_GAME_TIME = 27 * MINUTE * IN_MILLISECONDS,
|
BG_WS_TOTAL_GAME_TIME = 27 * MINUTE * IN_MILLISECONDS,
|
||||||
BG_WS_FLAG_RESPAWN_TIME = 23 * 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
|
|
||||||
};
|
};
|
||||||
|
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
|
enum BG_WS_BroadcastTexts
|
||||||
{
|
{
|
||||||
@@ -258,6 +258,7 @@ private:
|
|||||||
ObjectGuid _droppedFlagGUID[2];
|
ObjectGuid _droppedFlagGUID[2];
|
||||||
uint8 _flagState[2];
|
uint8 _flagState[2];
|
||||||
TeamId _lastFlagCaptureTeam;
|
TeamId _lastFlagCaptureTeam;
|
||||||
|
float _wsReputationRate;
|
||||||
uint32 _reputationCapture;
|
uint32 _reputationCapture;
|
||||||
uint32 _honorWinKills;
|
uint32 _honorWinKills;
|
||||||
uint32 _honorEndKills;
|
uint32 _honorEndKills;
|
||||||
|
|||||||
@@ -1508,7 +1508,7 @@ namespace lfg
|
|||||||
lockMap.clear();
|
lockMap.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8 LFGMgr::CheckGroupRoles(LfgRolesMap& groles, bool removeLeaderFlag /*= true*/)
|
uint8 LFGMgr::CheckGroupRoles(LfgRolesMap& groles)
|
||||||
{
|
{
|
||||||
if (groles.empty())
|
if (groles.empty())
|
||||||
return 0;
|
return 0;
|
||||||
@@ -1517,21 +1517,18 @@ namespace lfg
|
|||||||
uint8 tank = 0;
|
uint8 tank = 0;
|
||||||
uint8 healer = 0;
|
uint8 healer = 0;
|
||||||
|
|
||||||
if (removeLeaderFlag)
|
|
||||||
for (LfgRolesMap::iterator it = groles.begin(); it != groles.end(); ++it)
|
|
||||||
it->second &= ~PLAYER_ROLE_LEADER;
|
|
||||||
|
|
||||||
for (LfgRolesMap::iterator it = groles.begin(); it != groles.end(); ++it)
|
for (LfgRolesMap::iterator it = groles.begin(); it != groles.end(); ++it)
|
||||||
{
|
{
|
||||||
if (it->second == PLAYER_ROLE_NONE)
|
uint8 const role = it->second & ~PLAYER_ROLE_LEADER;
|
||||||
|
if (role == PLAYER_ROLE_NONE)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (it->second & PLAYER_ROLE_DAMAGE)
|
if (role & PLAYER_ROLE_DAMAGE)
|
||||||
{
|
{
|
||||||
if (it->second != PLAYER_ROLE_DAMAGE)
|
if (role != PLAYER_ROLE_DAMAGE)
|
||||||
{
|
{
|
||||||
it->second -= PLAYER_ROLE_DAMAGE;
|
it->second -= PLAYER_ROLE_DAMAGE;
|
||||||
if (uint8 x = CheckGroupRoles(groles, false))
|
if (uint8 x = CheckGroupRoles(groles))
|
||||||
return x;
|
return x;
|
||||||
it->second += PLAYER_ROLE_DAMAGE;
|
it->second += PLAYER_ROLE_DAMAGE;
|
||||||
}
|
}
|
||||||
@@ -1541,12 +1538,12 @@ namespace lfg
|
|||||||
damage++;
|
damage++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (it->second & PLAYER_ROLE_HEALER)
|
if (role & PLAYER_ROLE_HEALER)
|
||||||
{
|
{
|
||||||
if (it->second != PLAYER_ROLE_HEALER)
|
if (role != PLAYER_ROLE_HEALER)
|
||||||
{
|
{
|
||||||
it->second -= PLAYER_ROLE_HEALER;
|
it->second -= PLAYER_ROLE_HEALER;
|
||||||
if (uint8 x = CheckGroupRoles(groles, false))
|
if (uint8 x = CheckGroupRoles(groles))
|
||||||
return x;
|
return x;
|
||||||
it->second += PLAYER_ROLE_HEALER;
|
it->second += PLAYER_ROLE_HEALER;
|
||||||
}
|
}
|
||||||
@@ -1556,12 +1553,12 @@ namespace lfg
|
|||||||
healer++;
|
healer++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (it->second & PLAYER_ROLE_TANK)
|
if (role & PLAYER_ROLE_TANK)
|
||||||
{
|
{
|
||||||
if (it->second != PLAYER_ROLE_TANK)
|
if (role != PLAYER_ROLE_TANK)
|
||||||
{
|
{
|
||||||
it->second -= PLAYER_ROLE_TANK;
|
it->second -= PLAYER_ROLE_TANK;
|
||||||
if (uint8 x = CheckGroupRoles(groles, false))
|
if (uint8 x = CheckGroupRoles(groles))
|
||||||
return x;
|
return x;
|
||||||
it->second += PLAYER_ROLE_TANK;
|
it->second += PLAYER_ROLE_TANK;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -568,7 +568,7 @@ namespace lfg
|
|||||||
/// Checks if all players are queued
|
/// Checks if all players are queued
|
||||||
bool AllQueued(Lfg5Guids const& check);
|
bool AllQueued(Lfg5Guids const& check);
|
||||||
/// Checks if given roles match, modifies given roles map with new roles
|
/// Checks if given roles match, modifies given roles map with new roles
|
||||||
static uint8 CheckGroupRoles(LfgRolesMap& groles, bool removeLeaderFlag = true);
|
static uint8 CheckGroupRoles(LfgRolesMap& groles);
|
||||||
/// Checks if given players are ignoring each other
|
/// Checks if given players are ignoring each other
|
||||||
static bool HasIgnore(ObjectGuid guid1, ObjectGuid guid2);
|
static bool HasIgnore(ObjectGuid guid1, ObjectGuid guid2);
|
||||||
/// Sends queue status to player
|
/// Sends queue status to player
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ void Corpse::DeleteFromDB(CharacterDatabaseTransaction trans)
|
|||||||
DeleteFromDB(GetOwnerGUID(), 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);
|
CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CORPSE);
|
||||||
stmt->SetData(0, ownerGuid.GetCounter());
|
stmt->SetData(0, ownerGuid.GetCounter());
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user