Merge branch 'azerothcore:master' into Playerbot
This commit is contained in:
@@ -9,8 +9,11 @@
|
|||||||
/env/docker/*
|
/env/docker/*
|
||||||
!/env/docker/bin/.gitkeep
|
!/env/docker/bin/.gitkeep
|
||||||
!/env/docker/data/.gitkeep
|
!/env/docker/data/.gitkeep
|
||||||
|
!/env/docker/etc/
|
||||||
|
/env/docker/etc/*
|
||||||
!/env/docker/etc/authserver.conf.dockerdist
|
!/env/docker/etc/authserver.conf.dockerdist
|
||||||
!/env/docker/etc/worldserver.conf.dockerdist
|
!/env/docker/etc/worldserver.conf.dockerdist
|
||||||
|
!/env/docker/etc/dbimport.conf.dockerdist
|
||||||
!/env/docker/logs/.gitkeep
|
!/env/docker/logs/.gitkeep
|
||||||
/.env*
|
/.env*
|
||||||
.idea
|
.idea
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
export DOCKER_USER_ID=$(id -u)
|
export DOCKER_USER_ID=$(id -u)
|
||||||
export DOCKER_GROUP_ID=$(id -u)
|
export DOCKER_GROUP_ID=$(id -u)
|
||||||
docker-compose --profile dev --profile local build --parallel
|
./acore.sh docker build
|
||||||
|
|
||||||
- name: Deploy Dev
|
- name: Deploy Dev
|
||||||
#env:
|
#env:
|
||||||
@@ -97,7 +97,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
export DOCKER_USER_ID=$(id -u)
|
export DOCKER_USER_ID=$(id -u)
|
||||||
export DOCKER_GROUP_ID=$(id -u)
|
export DOCKER_GROUP_ID=$(id -u)
|
||||||
docker-compose --profile build --profile prod build --parallel
|
./acore.sh docker prod:build
|
||||||
docker-compose run --no-deps --name build ac-build echo "image created"
|
docker-compose run --no-deps --name build ac-build echo "image created"
|
||||||
docker cp build:/azerothcore/var/ccache var/docker/
|
docker cp build:/azerothcore/var/ccache var/docker/
|
||||||
echo "ccache exported"
|
echo "ccache exported"
|
||||||
|
|||||||
@@ -20,8 +20,11 @@
|
|||||||
/env/docker/*
|
/env/docker/*
|
||||||
!/env/docker/bin/.gitkeep
|
!/env/docker/bin/.gitkeep
|
||||||
!/env/docker/data/.gitkeep
|
!/env/docker/data/.gitkeep
|
||||||
|
!/env/docker/etc/
|
||||||
|
/env/docker/etc/*
|
||||||
!/env/docker/etc/authserver.conf.dockerdist
|
!/env/docker/etc/authserver.conf.dockerdist
|
||||||
!/env/docker/etc/worldserver.conf.dockerdist
|
!/env/docker/etc/worldserver.conf.dockerdist
|
||||||
|
!/env/docker/etc/dbimport.conf.dockerdist
|
||||||
!/env/docker/logs/.gitkeep
|
!/env/docker/logs/.gitkeep
|
||||||
/.env*
|
/.env*
|
||||||
/apps/joiner
|
/apps/joiner
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
DENO_MIN_VERSION="1.9.1"
|
DENO_MIN_VERSION="1.26.0"
|
||||||
|
|
||||||
function denoInstall() {
|
function denoInstall() {
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
sudo systemctl start mysql
|
|
||||||
./acore.sh "db-assembler" "import-all"
|
|
||||||
|
|
||||||
if [ -s modules/mod-premium/sql/example_item_9017.sql ]
|
|
||||||
then
|
|
||||||
echo "Import custom module item..."
|
|
||||||
# if the premium module is available insert the example item or else the worldserver dry run will fail
|
|
||||||
mysql -uroot -proot acore_world < modules/mod-premium/sql/example_item_9017.sql
|
|
||||||
echo "Done!"
|
|
||||||
fi
|
|
||||||
@@ -111,6 +111,7 @@ function comp_compile() {
|
|||||||
echo "Generating confs..."
|
echo "Generating confs..."
|
||||||
cp -n "env/dist/etc/worldserver.conf.dockerdist" "env/dist/etc/worldserver.conf"
|
cp -n "env/dist/etc/worldserver.conf.dockerdist" "env/dist/etc/worldserver.conf"
|
||||||
cp -n "env/dist/etc/authserver.conf.dockerdist" "env/dist/etc/authserver.conf"
|
cp -n "env/dist/etc/authserver.conf.dockerdist" "env/dist/etc/authserver.conf"
|
||||||
|
cp -n "env/dist/etc/dbimport.conf.dockerdist" "env/dist/etc/dbimport.conf"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
runHooks "ON_AFTER_BUILD"
|
runHooks "ON_AFTER_BUILD"
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
## Description
|
## Description
|
||||||
|
|
||||||
|
**ATTENTION:** this tool is not supported anymore. It has been replaced by the **dbimport** tools integrated in AC server sources
|
||||||
|
|
||||||
This script allows you to assemble all sql files into one so you can easily import it to your databases (or use the main script to import directly). By default, it creates the merged files in `/env/dist`.
|
This script allows you to assemble all sql files into one so you can easily import it to your databases (or use the main script to import directly). By default, it creates the merged files in `/env/dist`.
|
||||||
|
|
||||||
## How to use:
|
## How to use:
|
||||||
@@ -15,7 +17,7 @@ Just run it to display the options.
|
|||||||
Note: You can even use actions directly by command lines specifying the option.
|
Note: You can even use actions directly by command lines specifying the option.
|
||||||
Ex:
|
Ex:
|
||||||
|
|
||||||
./db_assembler.sh 1
|
./db_assembler.sh 1
|
||||||
|
|
||||||
It will merge all sql files without an interactive menu.
|
It will merge all sql files without an interactive menu.
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,121 @@
|
|||||||
|
##############################################
|
||||||
|
#
|
||||||
|
# DB ASSEMBLER / EXPORTER CONFIGURATIONS
|
||||||
|
#
|
||||||
|
##############################################
|
||||||
|
|
||||||
|
#
|
||||||
|
# Comma separated list of databases
|
||||||
|
#
|
||||||
|
# You can add another element here if you need
|
||||||
|
# to support multiple databases
|
||||||
|
#
|
||||||
|
|
||||||
|
DBLIST=${DBLIST:-"AUTH,CHARACTERS,WORLD"}
|
||||||
|
# convert from comma separated list to an array.
|
||||||
|
# This is needed to support environment variables
|
||||||
|
readarray -td, DATABASES <<<"$DBLIST";
|
||||||
|
|
||||||
|
OUTPUT_FOLDER=${OUTPUT_FOLDER:-"$AC_PATH_ROOT/env/dist/sql/"}
|
||||||
|
|
||||||
|
DBASM_WAIT_TIMEOUT=${DBASM_WAIT_TIMEOUT:-5}
|
||||||
|
DBASM_WAIT_RETRIES=${DBASM_WAIT_RETRIES:-3}
|
||||||
|
|
||||||
|
####### BACKUP
|
||||||
|
# Set to true if you want to backup your azerothcore databases before importing the SQL with the db_assembler
|
||||||
|
# Do not forget to stop your database software (mysql) before doing so
|
||||||
|
|
||||||
|
BACKUP_ENABLE=false
|
||||||
|
|
||||||
|
BACKUP_FOLDER="$AC_PATH_ROOT/env/dist/sql/backup/"
|
||||||
|
|
||||||
|
#######
|
||||||
|
|
||||||
|
# FULL DB
|
||||||
|
DB_AUTH_PATHS=(
|
||||||
|
"$SRCPATH/data/sql/base/db_auth/"
|
||||||
|
)
|
||||||
|
|
||||||
|
DB_CHARACTERS_PATHS=(
|
||||||
|
"$SRCPATH/data/sql/base/db_characters"
|
||||||
|
)
|
||||||
|
|
||||||
|
DB_WORLD_PATHS=(
|
||||||
|
"$SRCPATH/data/sql/base/db_world/"
|
||||||
|
)
|
||||||
|
|
||||||
|
# UPDATES
|
||||||
|
DB_AUTH_UPDATES_PATHS=(
|
||||||
|
"$SRCPATH/data/sql/updates/db_auth/"
|
||||||
|
"$SRCPATH/data/sql/updates/pending_db_auth/"
|
||||||
|
)
|
||||||
|
|
||||||
|
DB_CHARACTERS_UPDATES_PATHS=(
|
||||||
|
"$SRCPATH/data/sql/updates/db_characters/"
|
||||||
|
"$SRCPATH/data/sql/updates/pending_db_characters/"
|
||||||
|
)
|
||||||
|
|
||||||
|
DB_WORLD_UPDATES_PATHS=(
|
||||||
|
"$SRCPATH/data/sql/updates/db_world/"
|
||||||
|
"$SRCPATH/data/sql/updates/pending_db_world/"
|
||||||
|
)
|
||||||
|
|
||||||
|
# CUSTOM
|
||||||
|
DB_AUTH_CUSTOM_PATHS=(
|
||||||
|
"$SRCPATH/data/sql/custom/db_auth/"
|
||||||
|
)
|
||||||
|
|
||||||
|
DB_CHARACTERS_CUSTOM_PATHS=(
|
||||||
|
"$SRCPATH/data/sql/custom/db_characters/"
|
||||||
|
)
|
||||||
|
|
||||||
|
DB_WORLD_CUSTOM_PATHS=(
|
||||||
|
"$SRCPATH/data/sql/custom/db_world/"
|
||||||
|
)
|
||||||
|
|
||||||
|
##############################################
|
||||||
|
#
|
||||||
|
# DB EXPORTER/IMPORTER CONFIGURATIONS
|
||||||
|
#
|
||||||
|
##############################################
|
||||||
|
|
||||||
|
#
|
||||||
|
# Skip import of base sql files to avoid
|
||||||
|
# table dropping
|
||||||
|
#
|
||||||
|
DB_SKIP_BASE_IMPORT_IF_EXISTS=true
|
||||||
|
|
||||||
|
#
|
||||||
|
# Example:
|
||||||
|
# "C:/Program Files/MySQL/MySQL Server 8.0/bin/mysql.exe"
|
||||||
|
# "/usr/bin/mysql"
|
||||||
|
# "mysql"
|
||||||
|
#
|
||||||
|
|
||||||
|
DB_MYSQL_EXEC="mysql"
|
||||||
|
DB_MYSQL_DUMP_EXEC="mysqldump"
|
||||||
|
|
||||||
|
|
||||||
|
DB_AUTH_CONF=${DB_AUTH_CONF:-"MYSQL_USER='acore'; \
|
||||||
|
MYSQL_PASS='acore'; \
|
||||||
|
MYSQL_HOST='localhost';\
|
||||||
|
MYSQL_PORT='3306';\
|
||||||
|
"}
|
||||||
|
|
||||||
|
DB_CHARACTERS_CONF=${DB_CHARACTERS_CONF:-"MYSQL_USER='acore'; \
|
||||||
|
MYSQL_PASS='acore'; \
|
||||||
|
MYSQL_HOST='localhost';\
|
||||||
|
MYSQL_PORT='3306';\
|
||||||
|
"}
|
||||||
|
|
||||||
|
DB_WORLD_CONF=${DB_WORLD_CONF:-"MYSQL_USER='acore'; \
|
||||||
|
MYSQL_PASS='acore'; \
|
||||||
|
MYSQL_HOST='localhost';\
|
||||||
|
MYSQL_PORT='3306';\
|
||||||
|
"}
|
||||||
|
|
||||||
|
DB_AUTH_NAME="acore_auth"
|
||||||
|
|
||||||
|
DB_CHARACTERS_NAME="acore_characters"
|
||||||
|
|
||||||
|
DB_WORLD_NAME="acore_world"
|
||||||
@@ -179,6 +179,7 @@ RUN mkdir -p /azerothcore/env/etc/
|
|||||||
COPY --chown=$DOCKER_USER:$DOCKER_USER var/docker/ccache /azerothcore/var/ccache
|
COPY --chown=$DOCKER_USER:$DOCKER_USER var/docker/ccache /azerothcore/var/ccache
|
||||||
COPY --chown=$DOCKER_USER:$DOCKER_USER env/docker/etc/authserver.conf.dockerdist /azerothcore/env/dist/etc/authserver.conf.dockerdist
|
COPY --chown=$DOCKER_USER:$DOCKER_USER env/docker/etc/authserver.conf.dockerdist /azerothcore/env/dist/etc/authserver.conf.dockerdist
|
||||||
COPY --chown=$DOCKER_USER:$DOCKER_USER env/docker/etc/worldserver.conf.dockerdist /azerothcore/env/dist/etc/worldserver.conf.dockerdist
|
COPY --chown=$DOCKER_USER:$DOCKER_USER env/docker/etc/worldserver.conf.dockerdist /azerothcore/env/dist/etc/worldserver.conf.dockerdist
|
||||||
|
COPY --chown=$DOCKER_USER:$DOCKER_USER env/docker/etc/dbimport.conf.dockerdist /azerothcore/env/dist/etc/dbimport.conf.dockerdist
|
||||||
|
|
||||||
# install eluna
|
# install eluna
|
||||||
RUN git clone --depth=1 --branch=master https://github.com/azerothcore/mod-eluna.git /azerothcore/modules/mod-eluna
|
RUN git clone --depth=1 --branch=master https://github.com/azerothcore/mod-eluna.git /azerothcore/modules/mod-eluna
|
||||||
@@ -189,8 +190,8 @@ ENV AC_CCACHE=true
|
|||||||
ENV CCACHE_CPP2=true
|
ENV CCACHE_CPP2=true
|
||||||
ENV CSCRIPTPCH=OFF
|
ENV CSCRIPTPCH=OFF
|
||||||
ENV CCOREPCH=OFF
|
ENV CCOREPCH=OFF
|
||||||
# ENV CTOOLS_BUILD=all
|
ENV CTOOLS_BUILD=all
|
||||||
ENV CTOOLS_BUILD=maps-only
|
# ENV CTOOLS_BUILD=maps-only
|
||||||
ENV CSCRIPTS=static
|
ENV CSCRIPTS=static
|
||||||
RUN bash apps/docker/docker-build-prod.sh
|
RUN bash apps/docker/docker-build-prod.sh
|
||||||
|
|
||||||
@@ -225,6 +226,7 @@ RUN mkdir -p /azerothcore/env/dist/bin/lua_scripts
|
|||||||
COPY --chown=$DOCKER_USER:$DOCKER_USER --from=build /azerothcore/env/dist/etc /azerothcore/env/dist/etc
|
COPY --chown=$DOCKER_USER:$DOCKER_USER --from=build /azerothcore/env/dist/etc /azerothcore/env/dist/etc
|
||||||
COPY --chown=$DOCKER_USER:$DOCKER_USER --from=build /azerothcore/env/dist/bin/worldserver /azerothcore/env/dist/bin/worldserver
|
COPY --chown=$DOCKER_USER:$DOCKER_USER --from=build /azerothcore/env/dist/bin/worldserver /azerothcore/env/dist/bin/worldserver
|
||||||
COPY --chown=$DOCKER_USER:$DOCKER_USER --from=build /azerothcore/env/dist/bin/lua_scripts /azerothcore/env/dist/bin/lua_scripts
|
COPY --chown=$DOCKER_USER:$DOCKER_USER --from=build /azerothcore/env/dist/bin/lua_scripts /azerothcore/env/dist/bin/lua_scripts
|
||||||
|
COPY --chown=$DOCKER_USER:$DOCKER_USER --from=build /azerothcore/env/dist/bin/dbimport /azerothcore/env/dist/bin/dbimport
|
||||||
|
|
||||||
#================================================================
|
#================================================================
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import * as ink from "https://deno.land/x/ink/mod.ts";
|
|||||||
import {
|
import {
|
||||||
Input,
|
Input,
|
||||||
Select,
|
Select,
|
||||||
} from "https://deno.land/x/cliffy@v0.18.2/prompt/mod.ts";
|
} from "https://deno.land/x/cliffy@v0.25.2/prompt/mod.ts";
|
||||||
|
|
||||||
const program = new Command();
|
const program = new Command();
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ if [ -f "$AC_PATH_INSTALLER/config.sh" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
source "$AC_PATH_APPS/compiler/includes/includes.sh"
|
source "$AC_PATH_APPS/compiler/includes/includes.sh"
|
||||||
source "$AC_PATH_APPS/db_assembler/includes/includes.sh"
|
|
||||||
|
|
||||||
source "$AC_PATH_DEPS/semver_bash/semver.sh"
|
source "$AC_PATH_DEPS/semver_bash/semver.sh"
|
||||||
|
|
||||||
|
|||||||
+18
-22
@@ -11,16 +11,15 @@ options=(
|
|||||||
"pull (u): Update Repository" # 3
|
"pull (u): Update Repository" # 3
|
||||||
"reset (r): Reset & Clean Repository" # 4
|
"reset (r): Reset & Clean Repository" # 4
|
||||||
"compiler (c): Run compiler tool" # 5
|
"compiler (c): Run compiler tool" # 5
|
||||||
"db-assembler (a): Run db assembler tool" # 6
|
"module-search (ms): Module Search by keyword" # 6
|
||||||
"module-search (ms): Module Search by keyword" # 7
|
"module-install (mi): Module Install by name" # 7
|
||||||
"module-install (mi): Module Install by name" # 8
|
"module-update (mu): Module Update by name" # 8
|
||||||
"module-update (mu): Module Update by name" # 9
|
"module-remove: (mr): Module Remove by name" # 9
|
||||||
"module-remove: (mr): Module Remove by name" # 10
|
"client-data: (gd): download client data from github repository (beta)" # 10
|
||||||
"client-data: (gd): download client data from github repository (beta)" # 11
|
"run-worldserver (rw): execute a simple restarter for worldserver" # 11
|
||||||
"run-worldserver (rw): execute a simple restarter for worldserver" # 12
|
"run-authserver (ra): execute a simple restarter for authserver" # 12
|
||||||
"run-authserver (ra): execute a simple restarter for authserver" # 13
|
"docker (dr): Run docker tools" # 13
|
||||||
"docker (dr): Run docker tools" # 14
|
"quit: Exit from this menu" # 14
|
||||||
"quit: Exit from this menu" # 15
|
|
||||||
)
|
)
|
||||||
|
|
||||||
function _switch() {
|
function _switch() {
|
||||||
@@ -43,35 +42,32 @@ function _switch() {
|
|||||||
""|"c"|"compiler"|"5")
|
""|"c"|"compiler"|"5")
|
||||||
bash "$AC_PATH_APPS/compiler/compiler.sh" $_opt
|
bash "$AC_PATH_APPS/compiler/compiler.sh" $_opt
|
||||||
;;
|
;;
|
||||||
""|"a"|"db-assembler"|"6")
|
""|"ms"|"module-search"|"6")
|
||||||
bash "$AC_PATH_APPS/db_assembler/db_assembler.sh" $_opt
|
|
||||||
;;
|
|
||||||
""|"ms"|"module-search"|"7")
|
|
||||||
inst_module_search "$_opt"
|
inst_module_search "$_opt"
|
||||||
;;
|
;;
|
||||||
""|"mi"|"module-install"|"8")
|
""|"mi"|"module-install"|"7")
|
||||||
inst_module_install "$_opt"
|
inst_module_install "$_opt"
|
||||||
;;
|
;;
|
||||||
""|"mu"|"module-update"|"9")
|
""|"mu"|"module-update"|"8")
|
||||||
inst_module_update "$_opt"
|
inst_module_update "$_opt"
|
||||||
;;
|
;;
|
||||||
""|"mr"|"module-remove"|"10")
|
""|"mr"|"module-remove"|"9")
|
||||||
inst_module_remove "$_opt"
|
inst_module_remove "$_opt"
|
||||||
;;
|
;;
|
||||||
""|"gd"|"client-data"|"11")
|
""|"gd"|"client-data"|"10")
|
||||||
inst_download_client_data
|
inst_download_client_data
|
||||||
;;
|
;;
|
||||||
""|"rw"|"run-worldserver"|"12")
|
""|"rw"|"run-worldserver"|"11")
|
||||||
inst_simple_restarter worldserver
|
inst_simple_restarter worldserver
|
||||||
;;
|
;;
|
||||||
""|"ra"|"run-authserver"|"13")
|
""|"ra"|"run-authserver"|"12")
|
||||||
inst_simple_restarter authserver
|
inst_simple_restarter authserver
|
||||||
;;
|
;;
|
||||||
""|"dr"|"docker"|"14")
|
""|"dr"|"docker"|"13")
|
||||||
DOCKER=1 denoRunFile "$AC_PATH_APPS/docker/docker-cmd.ts" "${@:2}"
|
DOCKER=1 denoRunFile "$AC_PATH_APPS/docker/docker-cmd.ts" "${@:2}"
|
||||||
exit
|
exit
|
||||||
;;
|
;;
|
||||||
""|"quit"|"15")
|
""|"quit"|"14")
|
||||||
echo "Goodbye!"
|
echo "Goodbye!"
|
||||||
exit
|
exit
|
||||||
;;
|
;;
|
||||||
|
|||||||
Vendored
-121
@@ -145,124 +145,3 @@ export CPUPROFILESIGNAL=${CPUPROFILESIGNAL:-12}
|
|||||||
#export HEAPCHECK=${HEAPCHECK:-normal}
|
#export HEAPCHECK=${HEAPCHECK:-normal}
|
||||||
|
|
||||||
|
|
||||||
##############################################
|
|
||||||
#
|
|
||||||
# DB ASSEMBLER / EXPORTER CONFIGURATIONS
|
|
||||||
#
|
|
||||||
##############################################
|
|
||||||
|
|
||||||
#
|
|
||||||
# Comma separated list of databases
|
|
||||||
#
|
|
||||||
# You can add another element here if you need
|
|
||||||
# to support multiple databases
|
|
||||||
#
|
|
||||||
|
|
||||||
DBLIST=${DBLIST:-"AUTH,CHARACTERS,WORLD"}
|
|
||||||
# convert from comma separated list to an array.
|
|
||||||
# This is needed to support environment variables
|
|
||||||
readarray -td, DATABASES <<<"$DBLIST";
|
|
||||||
|
|
||||||
OUTPUT_FOLDER=${OUTPUT_FOLDER:-"$AC_PATH_ROOT/env/dist/sql/"}
|
|
||||||
|
|
||||||
DBASM_WAIT_TIMEOUT=${DBASM_WAIT_TIMEOUT:-5}
|
|
||||||
DBASM_WAIT_RETRIES=${DBASM_WAIT_RETRIES:-3}
|
|
||||||
|
|
||||||
####### BACKUP
|
|
||||||
# Set to true if you want to backup your azerothcore databases before importing the SQL with the db_assembler
|
|
||||||
# Do not forget to stop your database software (mysql) before doing so
|
|
||||||
|
|
||||||
BACKUP_ENABLE=false
|
|
||||||
|
|
||||||
BACKUP_FOLDER="$AC_PATH_ROOT/env/dist/sql/backup/"
|
|
||||||
|
|
||||||
#######
|
|
||||||
|
|
||||||
# FULL DB
|
|
||||||
DB_AUTH_PATHS=(
|
|
||||||
"$SRCPATH/data/sql/base/db_auth/"
|
|
||||||
)
|
|
||||||
|
|
||||||
DB_CHARACTERS_PATHS=(
|
|
||||||
"$SRCPATH/data/sql/base/db_characters"
|
|
||||||
)
|
|
||||||
|
|
||||||
DB_WORLD_PATHS=(
|
|
||||||
"$SRCPATH/data/sql/base/db_world/"
|
|
||||||
)
|
|
||||||
|
|
||||||
# UPDATES
|
|
||||||
DB_AUTH_UPDATES_PATHS=(
|
|
||||||
"$SRCPATH/data/sql/updates/db_auth/"
|
|
||||||
"$SRCPATH/data/sql/updates/pending_db_auth/"
|
|
||||||
)
|
|
||||||
|
|
||||||
DB_CHARACTERS_UPDATES_PATHS=(
|
|
||||||
"$SRCPATH/data/sql/updates/db_characters/"
|
|
||||||
"$SRCPATH/data/sql/updates/pending_db_characters/"
|
|
||||||
)
|
|
||||||
|
|
||||||
DB_WORLD_UPDATES_PATHS=(
|
|
||||||
"$SRCPATH/data/sql/updates/db_world/"
|
|
||||||
"$SRCPATH/data/sql/updates/pending_db_world/"
|
|
||||||
)
|
|
||||||
|
|
||||||
# CUSTOM
|
|
||||||
DB_AUTH_CUSTOM_PATHS=(
|
|
||||||
"$SRCPATH/data/sql/custom/db_auth/"
|
|
||||||
)
|
|
||||||
|
|
||||||
DB_CHARACTERS_CUSTOM_PATHS=(
|
|
||||||
"$SRCPATH/data/sql/custom/db_characters/"
|
|
||||||
)
|
|
||||||
|
|
||||||
DB_WORLD_CUSTOM_PATHS=(
|
|
||||||
"$SRCPATH/data/sql/custom/db_world/"
|
|
||||||
)
|
|
||||||
|
|
||||||
##############################################
|
|
||||||
#
|
|
||||||
# DB EXPORTER/IMPORTER CONFIGURATIONS
|
|
||||||
#
|
|
||||||
##############################################
|
|
||||||
|
|
||||||
#
|
|
||||||
# Skip import of base sql files to avoid
|
|
||||||
# table dropping
|
|
||||||
#
|
|
||||||
DB_SKIP_BASE_IMPORT_IF_EXISTS=true
|
|
||||||
|
|
||||||
#
|
|
||||||
# Example:
|
|
||||||
# "C:/Program Files/MySQL/MySQL Server 8.0/bin/mysql.exe"
|
|
||||||
# "/usr/bin/mysql"
|
|
||||||
# "mysql"
|
|
||||||
#
|
|
||||||
|
|
||||||
DB_MYSQL_EXEC="mysql"
|
|
||||||
DB_MYSQL_DUMP_EXEC="mysqldump"
|
|
||||||
|
|
||||||
|
|
||||||
DB_AUTH_CONF=${DB_AUTH_CONF:-"MYSQL_USER='acore'; \
|
|
||||||
MYSQL_PASS='acore'; \
|
|
||||||
MYSQL_HOST='localhost';\
|
|
||||||
MYSQL_PORT='3306';\
|
|
||||||
"}
|
|
||||||
|
|
||||||
DB_CHARACTERS_CONF=${DB_CHARACTERS_CONF:-"MYSQL_USER='acore'; \
|
|
||||||
MYSQL_PASS='acore'; \
|
|
||||||
MYSQL_HOST='localhost';\
|
|
||||||
MYSQL_PORT='3306';\
|
|
||||||
"}
|
|
||||||
|
|
||||||
DB_WORLD_CONF=${DB_WORLD_CONF:-"MYSQL_USER='acore'; \
|
|
||||||
MYSQL_PASS='acore'; \
|
|
||||||
MYSQL_HOST='localhost';\
|
|
||||||
MYSQL_PORT='3306';\
|
|
||||||
"}
|
|
||||||
|
|
||||||
DB_AUTH_NAME="acore_auth"
|
|
||||||
|
|
||||||
DB_CHARACTERS_NAME="acore_characters"
|
|
||||||
|
|
||||||
DB_WORLD_NAME="acore_world"
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,3 @@
|
|||||||
|
-- DB update 2022_10_05_00 -> 2022_10_06_00
|
||||||
|
--
|
||||||
|
DELETE FROM `spell_linked_spell` WHERE `spell_trigger`=26084;
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
-- DB update 2022_10_06_00 -> 2022_10_06_01
|
||||||
|
--
|
||||||
|
DELETE FROM `disables` WHERE `sourceType`=7 AND `entry`=180619;
|
||||||
|
INSERT INTO `disables` VALUES
|
||||||
|
(7,180619,0,0,0,'Ignore LoS by Ossirian Crystal');
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
-- DB update 2022_10_06_01 -> 2022_10_06_02
|
||||||
|
--
|
||||||
|
UPDATE `spell_dbc` SET `CastingTimeIndex`=1 WHERE `id`=25186;
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
-- DB update 2022_10_06_02 -> 2022_10_06_03
|
||||||
|
--
|
||||||
|
DELETE FROM `creature_template_movement` WHERE `creatureId` IN (21221, 15728, 15334, 15802, 15725, 15726);
|
||||||
|
INSERT INTO `creature_template_movement` (`CreatureId`, `Ground`, `Swim`, `Flight`, `Rooted`, `Chase`, `Random`, `InteractionPauseTimer`) VALUES
|
||||||
|
(21221, 1, 0, 0, 1, 0, 0, 0),
|
||||||
|
(15728, 1, 0, 0, 1, 0, 0, 0),
|
||||||
|
(15334, 1, 0, 0, 1, 0, 0, 0),
|
||||||
|
(15802, 1, 0, 0, 1, 0, 0, 0),
|
||||||
|
(15725, 1, 0, 0, 1, 0, 0, 0),
|
||||||
|
(15726, 1, 0, 0, 1, 0, 0, 0);
|
||||||
|
|
||||||
|
UPDATE `creature_template` SET `unit_flags` = `unit_flags` |33554432 WHERE `entry` IN (15910, 15904, 15896);
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
-- DB update 2022_10_06_03 -> 2022_10_06_04
|
||||||
|
-- Horde "Trial of the Sea Lion" Quest ID 30 POI fix
|
||||||
|
UPDATE `quest_poi` SET `WorldMapAreaId`=17 WHERE `QuestID`=30 AND `MapID`=1;
|
||||||
|
UPDATE `quest_poi_points` SET `X`=1050, `Y`=-3119 WHERE `QuestID`=30 AND `Idx1`=2;
|
||||||
|
-- Alliance "Trial of the Sea Lion" Quest ID 272 POI fix
|
||||||
|
UPDATE `quest_poi` SET `WorldMapAreaId`=40 WHERE `QuestID`=272 AND `MapID`=0;
|
||||||
|
UPDATE `quest_poi_points` SET `X`=-10172, `Y`=2391 WHERE `QuestID`=272 AND `Idx1`=2;
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
-- DB update 2022_10_06_04 -> 2022_10_06_05
|
||||||
|
--
|
||||||
|
UPDATE `creature_template` SET `flags_extra`=`flags_extra`|0x02000000 WHERE `entry` IN (15341,14834,11380,12460);
|
||||||
@@ -291,6 +291,12 @@ services:
|
|||||||
- ${DOCKER_VOL_TOOLS_MMAPS:-./var/extractors/mmaps}:/azerothcore/env/client/mmaps
|
- ${DOCKER_VOL_TOOLS_MMAPS:-./var/extractors/mmaps}:/azerothcore/env/client/mmaps
|
||||||
profiles: [prod, tools]
|
profiles: [prod, tools]
|
||||||
|
|
||||||
|
ac-db-import:
|
||||||
|
<<: *ac-shared-conf
|
||||||
|
image: acore/ac-wotlk-worldserver:${DOCKER_IMAGE_TAG:-master} # name of the generated image after built locally
|
||||||
|
command: ./env/dist/bin/dbimport
|
||||||
|
profiles: [db-import]
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
ac-database:
|
ac-database:
|
||||||
ac-bin:
|
ac-bin:
|
||||||
|
|||||||
+18
@@ -0,0 +1,18 @@
|
|||||||
|
# Do NOT change those Dir configs
|
||||||
|
# Files in LogsDir will reflect on your host directory: docker/worldserver/logs
|
||||||
|
LogsDir = "/azerothcore/env/dist/logs"
|
||||||
|
DataDir = "/azerothcore/env/dist/data"
|
||||||
|
|
||||||
|
# Change this configuration accordingly with your docker setup
|
||||||
|
# The format is "hostname;port;username;password;database":
|
||||||
|
# - docker containers must be on the same docker network to be able to communicate
|
||||||
|
# - the DB hostname will be the name of the database docker container
|
||||||
|
LoginDatabaseInfo = "ac-database;3306;root;password;acore_auth"
|
||||||
|
WorldDatabaseInfo = "ac-database;3306;root;password;acore_world"
|
||||||
|
CharacterDatabaseInfo = "ac-database;3306;root;password;acore_characters"
|
||||||
|
|
||||||
|
# Add more configuration overwrites by copying settings from worldserver.conf.dist
|
||||||
|
LogLevel = 2
|
||||||
|
|
||||||
|
# Disable idle connections automatic kick since it doesn't work well on macOS + Docker
|
||||||
|
CloseIdleConnections = 0
|
||||||
@@ -106,6 +106,11 @@ void EventMap::Repeat(Milliseconds time)
|
|||||||
RepeatEvent(time.count());
|
RepeatEvent(time.count());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void EventMap::Repeat(Milliseconds minTime, Milliseconds maxTime)
|
||||||
|
{
|
||||||
|
RepeatEvent(randtime(minTime, maxTime).count());
|
||||||
|
}
|
||||||
|
|
||||||
uint32 EventMap::ExecuteEvent()
|
uint32 EventMap::ExecuteEvent()
|
||||||
{
|
{
|
||||||
while (!Empty())
|
while (!Empty())
|
||||||
|
|||||||
@@ -182,12 +182,9 @@ public:
|
|||||||
void RescheduleEvent(uint32 eventId, Milliseconds minTime, Milliseconds maxTime, uint32 group = 0, uint32 phase = 0);
|
void RescheduleEvent(uint32 eventId, Milliseconds minTime, Milliseconds maxTime, uint32 group = 0, uint32 phase = 0);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name RescheduleEvent
|
* @name RepeatEvent
|
||||||
* @brief Cancels the given event and reschedules it.
|
* @brief Repeats the most recently executed event.
|
||||||
* @param eventId The id of the event.
|
* @param time Time until the event occurs as std::chrono type.
|
||||||
* @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 RepeatEvent(uint32 time);
|
void RepeatEvent(uint32 time);
|
||||||
|
|
||||||
@@ -198,6 +195,15 @@ public:
|
|||||||
*/
|
*/
|
||||||
void Repeat(Milliseconds time);
|
void Repeat(Milliseconds time);
|
||||||
|
|
||||||
|
/**
|
||||||
|
|
||||||
|
* @name RepeatEvent
|
||||||
|
* @brief Repeats the most recently executed event.
|
||||||
|
* @param minTime The minimum time until the event occurs as std::chrono type.
|
||||||
|
* @param maxTime The maximum time until the event occurs as std::chrono type.
|
||||||
|
*/
|
||||||
|
void Repeat(Milliseconds minTime, Milliseconds maxTime);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name ExecuteEvent
|
* @name ExecuteEvent
|
||||||
* @brief Returns the next event to execute and removes it from map.
|
* @brief Returns the next event to execute and removes it from map.
|
||||||
|
|||||||
@@ -2424,6 +2424,12 @@ bool Creature::CanAssistTo(Unit const* u, Unit const* enemy, bool checkfaction /
|
|||||||
if (GetCharmerOrOwnerGUID())
|
if (GetCharmerOrOwnerGUID())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
// Check for ignore assistance extra flag
|
||||||
|
if (m_creatureInfo->HasFlagsExtra(CREATURE_FLAG_EXTRA_IGNORE_ASSISTANCE_CALL))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// only from same creature faction
|
// only from same creature faction
|
||||||
if (checkfaction)
|
if (checkfaction)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ enum CreatureFlagsExtra : uint32
|
|||||||
CREATURE_FLAG_EXTRA_AVOID_AOE = 0x00400000, // pussywizard: ignored by aoe attacks (for icc blood prince council npc - Dark Nucleus)
|
CREATURE_FLAG_EXTRA_AVOID_AOE = 0x00400000, // pussywizard: ignored by aoe attacks (for icc blood prince council npc - Dark Nucleus)
|
||||||
CREATURE_FLAG_EXTRA_NO_DODGE = 0x00800000, // xinef: target cannot dodge
|
CREATURE_FLAG_EXTRA_NO_DODGE = 0x00800000, // xinef: target cannot dodge
|
||||||
CREATURE_FLAG_EXTRA_MODULE = 0x01000000,
|
CREATURE_FLAG_EXTRA_MODULE = 0x01000000,
|
||||||
CREATURE_FLAG_EXTRA_DONT_CALL_ASSISTANCE = 0x02000000, // Creatures do not call periodically assistance in combat
|
CREATURE_FLAG_EXTRA_IGNORE_ASSISTANCE_CALL = 0x02000000, // Creatures are not aggroed by other mobs assistance functions
|
||||||
CREATURE_FLAG_EXTRA_UNUSED_27 = 0x04000000,
|
CREATURE_FLAG_EXTRA_UNUSED_27 = 0x04000000,
|
||||||
CREATURE_FLAG_EXTRA_UNUSED_28 = 0x08000000,
|
CREATURE_FLAG_EXTRA_UNUSED_28 = 0x08000000,
|
||||||
CREATURE_FLAG_EXTRA_DUNGEON_BOSS = 0x10000000, // creature is a dungeon boss (SET DYNAMICALLY, DO NOT ADD IN DB)
|
CREATURE_FLAG_EXTRA_DUNGEON_BOSS = 0x10000000, // creature is a dungeon boss (SET DYNAMICALLY, DO NOT ADD IN DB)
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ AC_API_EXPORT EnumText EnumUtils<CreatureFlagsExtra>::ToString(CreatureFlagsExtr
|
|||||||
case CREATURE_FLAG_EXTRA_AVOID_AOE: return { "CREATURE_FLAG_EXTRA_AVOID_AOE", "CREATURE_FLAG_EXTRA_AVOID_AOE", "pussywizard: ignored by aoe attacks (for icc blood prince council npc - Dark Nucleus)" };
|
case CREATURE_FLAG_EXTRA_AVOID_AOE: return { "CREATURE_FLAG_EXTRA_AVOID_AOE", "CREATURE_FLAG_EXTRA_AVOID_AOE", "pussywizard: ignored by aoe attacks (for icc blood prince council npc - Dark Nucleus)" };
|
||||||
case CREATURE_FLAG_EXTRA_NO_DODGE: return { "CREATURE_FLAG_EXTRA_NO_DODGE", "CREATURE_FLAG_EXTRA_NO_DODGE", "xinef: target cannot dodge" };
|
case CREATURE_FLAG_EXTRA_NO_DODGE: return { "CREATURE_FLAG_EXTRA_NO_DODGE", "CREATURE_FLAG_EXTRA_NO_DODGE", "xinef: target cannot dodge" };
|
||||||
case CREATURE_FLAG_EXTRA_MODULE: return { "CREATURE_FLAG_EXTRA_MODULE", "CREATURE_FLAG_EXTRA_MODULE", "Used by module creatures to avoid blizzlike checks." };
|
case CREATURE_FLAG_EXTRA_MODULE: return { "CREATURE_FLAG_EXTRA_MODULE", "CREATURE_FLAG_EXTRA_MODULE", "Used by module creatures to avoid blizzlike checks." };
|
||||||
case CREATURE_FLAG_EXTRA_DONT_CALL_ASSISTANCE: return { "CREATURE_FLAG_EXTRA_DONT_CALL_ASSISTANCE", "Creatures do not call periodically assistance in combat", "" };
|
case CREATURE_FLAG_EXTRA_IGNORE_ASSISTANCE_CALL: return { "CREATURE_FLAG_EXTRA_IGNORE_ASSISTANCE_CALL", "Creatures are not aggroed by other mobs assistance functions", "" };
|
||||||
case CREATURE_FLAG_EXTRA_UNUSED_27: return { "CREATURE_FLAG_EXTRA_UNUSED_27", "CREATURE_FLAG_EXTRA_UNUSED_27", "" };
|
case CREATURE_FLAG_EXTRA_UNUSED_27: return { "CREATURE_FLAG_EXTRA_UNUSED_27", "CREATURE_FLAG_EXTRA_UNUSED_27", "" };
|
||||||
case CREATURE_FLAG_EXTRA_UNUSED_28: return { "CREATURE_FLAG_EXTRA_UNUSED_28", "CREATURE_FLAG_EXTRA_UNUSED_28", "" };
|
case CREATURE_FLAG_EXTRA_UNUSED_28: return { "CREATURE_FLAG_EXTRA_UNUSED_28", "CREATURE_FLAG_EXTRA_UNUSED_28", "" };
|
||||||
case CREATURE_FLAG_EXTRA_DUNGEON_BOSS: return { "CREATURE_FLAG_EXTRA_DUNGEON_BOSS", "CREATURE_FLAG_EXTRA_DUNGEON_BOSS", "creature is a dungeon boss (SET DYNAMICALLY, DO NOT ADD IN DB)" };
|
case CREATURE_FLAG_EXTRA_DUNGEON_BOSS: return { "CREATURE_FLAG_EXTRA_DUNGEON_BOSS", "CREATURE_FLAG_EXTRA_DUNGEON_BOSS", "creature is a dungeon boss (SET DYNAMICALLY, DO NOT ADD IN DB)" };
|
||||||
@@ -100,7 +100,7 @@ AC_API_EXPORT CreatureFlagsExtra EnumUtils<CreatureFlagsExtra>::FromIndex(size_t
|
|||||||
case 22: return CREATURE_FLAG_EXTRA_AVOID_AOE;
|
case 22: return CREATURE_FLAG_EXTRA_AVOID_AOE;
|
||||||
case 23: return CREATURE_FLAG_EXTRA_NO_DODGE;
|
case 23: return CREATURE_FLAG_EXTRA_NO_DODGE;
|
||||||
case 24: return CREATURE_FLAG_EXTRA_MODULE;
|
case 24: return CREATURE_FLAG_EXTRA_MODULE;
|
||||||
case 25: return CREATURE_FLAG_EXTRA_DONT_CALL_ASSISTANCE;
|
case 25: return CREATURE_FLAG_EXTRA_IGNORE_ASSISTANCE_CALL;
|
||||||
case 26: return CREATURE_FLAG_EXTRA_UNUSED_27;
|
case 26: return CREATURE_FLAG_EXTRA_UNUSED_27;
|
||||||
case 27: return CREATURE_FLAG_EXTRA_UNUSED_28;
|
case 27: return CREATURE_FLAG_EXTRA_UNUSED_28;
|
||||||
case 28: return CREATURE_FLAG_EXTRA_DUNGEON_BOSS;
|
case 28: return CREATURE_FLAG_EXTRA_DUNGEON_BOSS;
|
||||||
@@ -141,7 +141,7 @@ AC_API_EXPORT size_t EnumUtils<CreatureFlagsExtra>::ToIndex(CreatureFlagsExtra v
|
|||||||
case CREATURE_FLAG_EXTRA_AVOID_AOE: return 22;
|
case CREATURE_FLAG_EXTRA_AVOID_AOE: return 22;
|
||||||
case CREATURE_FLAG_EXTRA_NO_DODGE: return 23;
|
case CREATURE_FLAG_EXTRA_NO_DODGE: return 23;
|
||||||
case CREATURE_FLAG_EXTRA_MODULE: return 24;
|
case CREATURE_FLAG_EXTRA_MODULE: return 24;
|
||||||
case CREATURE_FLAG_EXTRA_DONT_CALL_ASSISTANCE: return 25;
|
case CREATURE_FLAG_EXTRA_IGNORE_ASSISTANCE_CALL: return 25;
|
||||||
case CREATURE_FLAG_EXTRA_UNUSED_27: return 26;
|
case CREATURE_FLAG_EXTRA_UNUSED_27: return 26;
|
||||||
case CREATURE_FLAG_EXTRA_UNUSED_28: return 27;
|
case CREATURE_FLAG_EXTRA_UNUSED_28: return 27;
|
||||||
case CREATURE_FLAG_EXTRA_DUNGEON_BOSS: return 28;
|
case CREATURE_FLAG_EXTRA_DUNGEON_BOSS: return 28;
|
||||||
|
|||||||
@@ -10031,12 +10031,8 @@ bool Unit::Attack(Unit* victim, bool meleeAttack)
|
|||||||
|
|
||||||
creature->SendAIReaction(AI_REACTION_HOSTILE);
|
creature->SendAIReaction(AI_REACTION_HOSTILE);
|
||||||
|
|
||||||
CreatureTemplate const* cInfo = creature->GetCreatureTemplate();
|
creature->CallAssistance();
|
||||||
if (!cInfo || !cInfo->HasFlagsExtra(CREATURE_FLAG_EXTRA_DONT_CALL_ASSISTANCE))
|
creature->SetAssistanceTimer(sWorld->getIntConfig(CONFIG_CREATURE_FAMILY_ASSISTANCE_PERIOD));
|
||||||
{
|
|
||||||
creature->CallAssistance();
|
|
||||||
creature->SetAssistanceTimer(sWorld->getIntConfig(CONFIG_CREATURE_FAMILY_ASSISTANCE_PERIOD));
|
|
||||||
}
|
|
||||||
|
|
||||||
SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
|
SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -344,6 +344,9 @@ bool Vehicle::AddPassenger(Unit* unit, int8 seatId)
|
|||||||
ASSERT(seat->second.IsEmpty());
|
ASSERT(seat->second.IsEmpty());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!seat->second.SeatInfo)
|
||||||
|
return false;
|
||||||
|
|
||||||
LOG_DEBUG("vehicles", "Unit {} enter vehicle entry {} id {} ({}) seat {}",
|
LOG_DEBUG("vehicles", "Unit {} enter vehicle entry {} id {} ({}) seat {}",
|
||||||
unit->GetName(), _me->GetEntry(), _vehicleInfo->m_ID, _me->GetGUID().ToString(), (int32)seat->first);
|
unit->GetName(), _me->GetEntry(), _vehicleInfo->m_ID, _me->GetGUID().ToString(), (int32)seat->first);
|
||||||
|
|
||||||
|
|||||||
@@ -3258,33 +3258,23 @@ void Spell::DoTriggersOnSpellHit(Unit* unit, uint8 effMask)
|
|||||||
{
|
{
|
||||||
if (CanExecuteTriggersOnHit(effMask, i->triggeredByAura) && roll_chance_i(i->chance))
|
if (CanExecuteTriggersOnHit(effMask, i->triggeredByAura) && roll_chance_i(i->chance))
|
||||||
{
|
{
|
||||||
|
m_caster->CastSpell(unit, i->triggeredSpell->Id, true);
|
||||||
LOG_DEBUG("spells.aura", "Spell {} triggered spell {} by SPELL_AURA_ADD_TARGET_TRIGGER aura", m_spellInfo->Id, i->triggeredSpell->Id);
|
LOG_DEBUG("spells.aura", "Spell {} triggered spell {} by SPELL_AURA_ADD_TARGET_TRIGGER aura", m_spellInfo->Id, i->triggeredSpell->Id);
|
||||||
|
|
||||||
// SPELL_AURA_ADD_TARGET_TRIGGER auras shouldn't trigger auras without duration
|
// SPELL_AURA_ADD_TARGET_TRIGGER auras shouldn't trigger auras without duration
|
||||||
// set duration of current aura to the triggered spell
|
// set duration of current aura to the triggered spell
|
||||||
if (i->triggeredSpell->GetDuration() == -1)
|
if (i->triggeredSpell->GetDuration() == -1)
|
||||||
{
|
{
|
||||||
// get duration from aura-only once
|
|
||||||
if (!_duration)
|
|
||||||
{
|
|
||||||
Aura* aur = unit->GetAura(m_spellInfo->Id, m_caster->GetGUID());
|
|
||||||
_duration = aur ? aur->GetDuration() : -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Aura* triggeredAur = unit->GetAura(i->triggeredSpell->Id, m_caster->GetGUID()))
|
if (Aura* triggeredAur = unit->GetAura(i->triggeredSpell->Id, m_caster->GetGUID()))
|
||||||
{
|
{
|
||||||
triggeredAur->SetDuration(std::max(triggeredAur->GetDuration(), _duration));
|
// get duration from aura-only once
|
||||||
|
if (!_duration)
|
||||||
|
{
|
||||||
|
Aura* aur = unit->GetAura(m_spellInfo->Id, m_caster->GetGUID());
|
||||||
|
_duration = aur ? aur->GetDuration() : -1;
|
||||||
|
}
|
||||||
|
triggeredAur->SetDuration(_duration);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
AuraEffect const* triggeringAuraEffect = m_caster->GetAuraEffect(i->triggeredByAura->Id, i->triggeredByEffIdx);
|
|
||||||
m_caster->CastCustomSpell(i->triggeredSpell->Id, SPELLVALUE_AURA_DURATION, _duration, unit, true, nullptr, triggeringAuraEffect);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
AuraEffect const* triggeringAuraEffect = m_caster->GetAuraEffect(i->triggeredByAura->Id, i->triggeredByEffIdx);
|
|
||||||
m_caster->CastSpell(unit, i->triggeredSpell, true, nullptr, triggeringAuraEffect);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4409,6 +4409,12 @@ void SpellMgr::LoadSpellInfoCorrections()
|
|||||||
spellInfo->DurationEntry = sSpellDurationStore.LookupEntry(27);
|
spellInfo->DurationEntry = sSpellDurationStore.LookupEntry(27);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Rental Racing Ram
|
||||||
|
ApplySpellFix({ 43883 }, [](SpellInfo* spellInfo)
|
||||||
|
{
|
||||||
|
spellInfo->AuraInterruptFlags &= ~AURA_INTERRUPT_FLAG_NOT_ABOVEWATER;
|
||||||
|
});
|
||||||
|
|
||||||
for (uint32 i = 0; i < GetSpellInfoStoreSize(); ++i)
|
for (uint32 i = 0; i < GetSpellInfoStoreSize(); ++i)
|
||||||
{
|
{
|
||||||
SpellInfo* spellInfo = mSpellInfoMap[i];
|
SpellInfo* spellInfo = mSpellInfoMap[i];
|
||||||
|
|||||||
@@ -70,6 +70,7 @@ enum Spells
|
|||||||
// Tentacles
|
// Tentacles
|
||||||
SPELL_SUBMERGE_VISUAL = 26234,
|
SPELL_SUBMERGE_VISUAL = 26234,
|
||||||
SPELL_BIRTH = 26262,
|
SPELL_BIRTH = 26262,
|
||||||
|
SPELL_ROCKY_GROUND_IMPACT = 26271,
|
||||||
|
|
||||||
// Areatriggers
|
// Areatriggers
|
||||||
SPELL_SPIT_OUT = 25383,
|
SPELL_SPIT_OUT = 25383,
|
||||||
@@ -186,9 +187,9 @@ struct boss_eye_of_cthun : public BossAI
|
|||||||
|
|
||||||
void EnterCombat(Unit* who) override
|
void EnterCombat(Unit* who) override
|
||||||
{
|
{
|
||||||
DoZoneInCombat();
|
|
||||||
ScheduleTasks();
|
ScheduleTasks();
|
||||||
BossAI::EnterCombat(who);
|
BossAI::EnterCombat(who);
|
||||||
|
_beamTarget = who->GetGUID();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MoveInLineOfSight(Unit* who) override
|
void MoveInLineOfSight(Unit* who) override
|
||||||
@@ -222,11 +223,29 @@ struct boss_eye_of_cthun : public BossAI
|
|||||||
_scheduler.
|
_scheduler.
|
||||||
Schedule(3s, [this](TaskContext task)
|
Schedule(3s, [this](TaskContext task)
|
||||||
{
|
{
|
||||||
DoCastRandomTarget(SPELL_GREEN_BEAM);
|
if (task.GetRepeatCounter() < 3)
|
||||||
|
{
|
||||||
|
if (Unit* target = ObjectAccessor::GetUnit(*me, _beamTarget))
|
||||||
|
{
|
||||||
|
DoCast(target, SPELL_GREEN_BEAM);
|
||||||
|
}
|
||||||
|
|
||||||
|
task.Repeat();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_scheduler.Schedule(5s, [this](TaskContext task)
|
||||||
|
{
|
||||||
|
DoCastRandomTarget(SPELL_GREEN_BEAM);
|
||||||
|
|
||||||
|
task.SetGroup(GROUP_BEAM_PHASE);
|
||||||
|
task.Repeat(3s);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
task.SetGroup(GROUP_BEAM_PHASE);
|
task.SetGroup(GROUP_BEAM_PHASE);
|
||||||
task.Repeat();
|
|
||||||
})
|
})
|
||||||
.Schedule(12s, [this](TaskContext task)
|
.Schedule(8s, [this](TaskContext task)
|
||||||
{
|
{
|
||||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true))
|
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true))
|
||||||
{
|
{
|
||||||
@@ -324,48 +343,32 @@ struct boss_eye_of_cthun : public BossAI
|
|||||||
|
|
||||||
void DamageTaken(Unit*, uint32& damage, DamageEffectType, SpellSchoolMask) override
|
void DamageTaken(Unit*, uint32& damage, DamageEffectType, SpellSchoolMask) override
|
||||||
{
|
{
|
||||||
switch (instance->GetData(DATA_CTHUN_PHASE))
|
//Only if it will kill
|
||||||
|
if (damage < me->GetHealth())
|
||||||
|
return;
|
||||||
|
|
||||||
|
//Fake death in phase 0 or 1 (green beam or dark glare phase)
|
||||||
|
me->InterruptNonMeleeSpells(false);
|
||||||
|
|
||||||
|
//Remove Red coloration from c'thun
|
||||||
|
me->RemoveAurasDueToSpell(SPELL_RED_COLORATION);
|
||||||
|
|
||||||
|
//Reset to normal emote state and prevent select and attack
|
||||||
|
me->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE);
|
||||||
|
|
||||||
|
//Remove Target field
|
||||||
|
me->SetTarget();
|
||||||
|
|
||||||
|
me->SetHealth(0);
|
||||||
|
damage = 0;
|
||||||
|
|
||||||
|
me->InterruptNonMeleeSpells(true);
|
||||||
|
me->RemoveAllAuras();
|
||||||
|
_scheduler.CancelAll();
|
||||||
|
|
||||||
|
if (Creature* cthun = instance->GetCreature(DATA_CTHUN))
|
||||||
{
|
{
|
||||||
case PHASE_EYE_GREEN_BEAM:
|
cthun->AI()->DoAction(ACTION_START_PHASE_TWO);
|
||||||
case PHASE_EYE_RED_BEAM:
|
|
||||||
//Only if it will kill
|
|
||||||
if (damage < me->GetHealth())
|
|
||||||
return;
|
|
||||||
|
|
||||||
//Fake death in phase 0 or 1 (green beam or dark glare phase)
|
|
||||||
me->InterruptNonMeleeSpells(false);
|
|
||||||
|
|
||||||
//Remove Red coloration from c'thun
|
|
||||||
me->RemoveAurasDueToSpell(SPELL_RED_COLORATION);
|
|
||||||
|
|
||||||
//Reset to normal emote state and prevent select and attack
|
|
||||||
me->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE);
|
|
||||||
|
|
||||||
//Remove Target field
|
|
||||||
me->SetTarget();
|
|
||||||
|
|
||||||
me->SetHealth(0);
|
|
||||||
damage = 0;
|
|
||||||
|
|
||||||
me->InterruptNonMeleeSpells(true);
|
|
||||||
me->RemoveAllAuras();
|
|
||||||
_scheduler.CancelAll();
|
|
||||||
|
|
||||||
if (Creature* cthun = instance->GetCreature(DATA_CTHUN))
|
|
||||||
{
|
|
||||||
cthun->AI()->DoAction(ACTION_START_PHASE_TWO);
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
case PHASE_CTHUN_DONE:
|
|
||||||
//Allow death here
|
|
||||||
return;
|
|
||||||
|
|
||||||
default:
|
|
||||||
//Prevent death in these phases
|
|
||||||
damage = 0;
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -376,6 +379,7 @@ private:
|
|||||||
bool ClockWise;
|
bool ClockWise;
|
||||||
|
|
||||||
uint32 _eyeTentacleCounter;
|
uint32 _eyeTentacleCounter;
|
||||||
|
ObjectGuid _beamTarget;
|
||||||
TaskScheduler _scheduler;
|
TaskScheduler _scheduler;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -424,7 +428,7 @@ struct boss_cthun : public BossAI
|
|||||||
//Spawn flesh tentacle
|
//Spawn flesh tentacle
|
||||||
for (uint8 i = 0; i < 2; i++)
|
for (uint8 i = 0; i < 2; i++)
|
||||||
{
|
{
|
||||||
me->SummonCreature(NPC_FLESH_TENTACLE, FleshTentaclePos[i], TEMPSUMMON_CORPSE_DESPAWN);
|
me->SummonCreature(NPC_FLESH_TENTACLE, FleshTentaclePos[i], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 5000);
|
||||||
}
|
}
|
||||||
|
|
||||||
ScheduleTasks();
|
ScheduleTasks();
|
||||||
@@ -457,25 +461,27 @@ struct boss_cthun : public BossAI
|
|||||||
}
|
}
|
||||||
|
|
||||||
context.Repeat(30s);
|
context.Repeat(30s);
|
||||||
}).Schedule(15s, [this](TaskContext context)
|
}).Schedule(8s, [this](TaskContext context)
|
||||||
{
|
{
|
||||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true, -SPELL_DIGESTIVE_ACID))
|
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true, -SPELL_DIGESTIVE_ACID))
|
||||||
{
|
{
|
||||||
//Spawn claw tentacle on the random target
|
//Spawn claw tentacle on the random target
|
||||||
if (Creature* spawned = me->SummonCreature(NPC_GIANT_CLAW_TENTACLE, *target, TEMPSUMMON_CORPSE_DESPAWN, 500))
|
if (Creature* spawned = me->SummonCreature(NPC_GIANT_CLAW_TENTACLE, *target, TEMPSUMMON_CORPSE_DESPAWN, 500))
|
||||||
if (spawned->AI())
|
{
|
||||||
spawned->AI()->AttackStart(target);
|
spawned->AI()->AttackStart(target);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
context.Repeat(1min);
|
context.Repeat(1min);
|
||||||
}).Schedule(15s, [this](TaskContext context)
|
}).Schedule(38s, [this](TaskContext context)
|
||||||
{
|
{
|
||||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true, -SPELL_DIGESTIVE_ACID))
|
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true, -SPELL_DIGESTIVE_ACID))
|
||||||
{
|
{
|
||||||
//Spawn claw tentacle on the random target
|
//Spawn claw tentacle on the random target
|
||||||
if (Creature* spawned = me->SummonCreature(NPC_GIANT_EYE_TENTACLE, *target, TEMPSUMMON_CORPSE_DESPAWN, 500))
|
if (Creature* spawned = me->SummonCreature(NPC_GIANT_EYE_TENTACLE, *target, TEMPSUMMON_CORPSE_DESPAWN, 500))
|
||||||
if (spawned->AI())
|
{
|
||||||
spawned->AI()->AttackStart(target);
|
spawned->AI()->AttackStart(target);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
context.Repeat(1min);
|
context.Repeat(1min);
|
||||||
@@ -536,6 +542,8 @@ struct boss_cthun : public BossAI
|
|||||||
{
|
{
|
||||||
++_fleshTentaclesKilled;
|
++_fleshTentaclesKilled;
|
||||||
|
|
||||||
|
creature->CastSpell(creature, SPELL_ROCKY_GROUND_IMPACT, true);
|
||||||
|
|
||||||
if (_fleshTentaclesKilled > 1)
|
if (_fleshTentaclesKilled > 1)
|
||||||
{
|
{
|
||||||
_scheduler.CancelAll();
|
_scheduler.CancelAll();
|
||||||
@@ -580,6 +588,14 @@ struct npc_eye_tentacle : public ScriptedAI
|
|||||||
{
|
{
|
||||||
portal->SetReactState(REACT_PASSIVE);
|
portal->SetReactState(REACT_PASSIVE);
|
||||||
_portalGUID = portal->GetGUID();
|
_portalGUID = portal->GetGUID();
|
||||||
|
|
||||||
|
if (Unit* summoner = me->ToTempSummon()->GetSummonerUnit())
|
||||||
|
{
|
||||||
|
if (Creature* creature = summoner->ToCreature())
|
||||||
|
{
|
||||||
|
creature->AI()->JustSummoned(portal);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SetCombatMovement(false);
|
SetCombatMovement(false);
|
||||||
@@ -643,6 +659,14 @@ struct npc_claw_tentacle : public ScriptedAI
|
|||||||
{
|
{
|
||||||
portal->SetReactState(REACT_PASSIVE);
|
portal->SetReactState(REACT_PASSIVE);
|
||||||
_portalGUID = portal->GetGUID();
|
_portalGUID = portal->GetGUID();
|
||||||
|
|
||||||
|
if (Unit* summoner = me->ToTempSummon()->GetSummonerUnit())
|
||||||
|
{
|
||||||
|
if (Creature* creature = summoner->ToCreature())
|
||||||
|
{
|
||||||
|
creature->AI()->JustSummoned(portal);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -702,6 +726,14 @@ struct npc_giant_claw_tentacle : public ScriptedAI
|
|||||||
{
|
{
|
||||||
portal->SetReactState(REACT_PASSIVE);
|
portal->SetReactState(REACT_PASSIVE);
|
||||||
_portalGUID = portal->GetGUID();
|
_portalGUID = portal->GetGUID();
|
||||||
|
|
||||||
|
if (Unit* summoner = me->ToTempSummon()->GetSummonerUnit())
|
||||||
|
{
|
||||||
|
if (Creature* creature = summoner->ToCreature())
|
||||||
|
{
|
||||||
|
creature->AI()->JustSummoned(portal);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -835,6 +867,14 @@ struct npc_giant_eye_tentacle : public ScriptedAI
|
|||||||
{
|
{
|
||||||
portal->SetReactState(REACT_PASSIVE);
|
portal->SetReactState(REACT_PASSIVE);
|
||||||
_portalGUID = portal->GetGUID();
|
_portalGUID = portal->GetGUID();
|
||||||
|
|
||||||
|
if (Unit* summoner = me->ToTempSummon()->GetSummonerUnit())
|
||||||
|
{
|
||||||
|
if (Creature* creature = summoner->ToCreature())
|
||||||
|
{
|
||||||
|
creature->AI()->JustSummoned(portal);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -931,9 +971,12 @@ public:
|
|||||||
|
|
||||||
bool OnTrigger(Player* player, AreaTrigger const* /*at*/) override
|
bool OnTrigger(Player* player, AreaTrigger const* /*at*/) override
|
||||||
{
|
{
|
||||||
if (Creature* trigger = player->FindNearestCreature(NPC_TRIGGER, 15.0f))
|
if (InstanceScript* instance = player->GetInstanceScript())
|
||||||
{
|
{
|
||||||
trigger->CastSpell(player, SPELL_SPIT_OUT, true);
|
if (Creature* cthun = instance->GetCreature(DATA_CTHUN))
|
||||||
|
{
|
||||||
|
cthun->CastSpell(player, SPELL_SPIT_OUT, true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -35,8 +35,7 @@ enum Spells
|
|||||||
SPELL_WYVERN_STING = 26180,
|
SPELL_WYVERN_STING = 26180,
|
||||||
SPELL_ACID_SPIT = 26050,
|
SPELL_ACID_SPIT = 26050,
|
||||||
SPELL_WYVERN_STING_DAMAGE = 26233,
|
SPELL_WYVERN_STING_DAMAGE = 26233,
|
||||||
SPELL_POISON_BOLT = 26052,
|
SPELL_POISON_BOLT = 26052
|
||||||
SPELL_HARD_ENRAGE = 26662
|
|
||||||
};
|
};
|
||||||
|
|
||||||
enum Events
|
enum Events
|
||||||
@@ -54,18 +53,18 @@ struct boss_huhuran : public BossAI
|
|||||||
|
|
||||||
void Reset() override
|
void Reset() override
|
||||||
{
|
{
|
||||||
_Reset();
|
BossAI::Reset();
|
||||||
_berserk = false;
|
_berserk = false;
|
||||||
_hardEnrage = false;
|
_hardEnrage = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterCombat(Unit* /*who*/) override
|
void EnterCombat(Unit* /*who*/) override
|
||||||
{
|
{
|
||||||
events.ScheduleEvent(EVENT_FRENZY, urand(25000, 35000));
|
events.ScheduleEvent(EVENT_FRENZY, 12s, 21s);
|
||||||
events.ScheduleEvent(EVENT_WYVERN_STING, urand(18000, 28000));
|
events.ScheduleEvent(EVENT_WYVERN_STING, 25s, 43s);
|
||||||
events.ScheduleEvent(EVENT_ACID_SPIT, 8000);
|
events.ScheduleEvent(EVENT_ACID_SPIT, 1s, 20s);
|
||||||
events.ScheduleEvent(EVENT_NOXIOUS_POISON, urand(10000, 20000));
|
events.ScheduleEvent(EVENT_NOXIOUS_POISON, 10s, 22s);
|
||||||
events.ScheduleEvent(EVENT_HARD_ENRAGE, 300000);
|
events.ScheduleEvent(EVENT_HARD_ENRAGE, 5min);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DamageTaken(Unit*, uint32& /*damage*/, DamageEffectType, SpellSchoolMask) override
|
void DamageTaken(Unit*, uint32& /*damage*/, DamageEffectType, SpellSchoolMask) override
|
||||||
@@ -74,6 +73,7 @@ struct boss_huhuran : public BossAI
|
|||||||
{
|
{
|
||||||
DoCastSelf(SPELL_BERSERK, true);
|
DoCastSelf(SPELL_BERSERK, true);
|
||||||
me->TextEmote(EMOTE_BERSERK);
|
me->TextEmote(EMOTE_BERSERK);
|
||||||
|
events.CancelEvent(EVENT_FRENZY);
|
||||||
_berserk = true;
|
_berserk = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -91,39 +91,43 @@ struct boss_huhuran : public BossAI
|
|||||||
case EVENT_FRENZY:
|
case EVENT_FRENZY:
|
||||||
DoCastSelf(SPELL_FRENZY, true);
|
DoCastSelf(SPELL_FRENZY, true);
|
||||||
Talk(EMOTE_FRENZY_KILL);
|
Talk(EMOTE_FRENZY_KILL);
|
||||||
events.RepeatEvent(urand(25000, 35000));
|
events.Repeat(12s, 21s);
|
||||||
break;
|
break;
|
||||||
case EVENT_WYVERN_STING:
|
case EVENT_WYVERN_STING:
|
||||||
me->CastCustomSpell(SPELL_WYVERN_STING, SPELLVALUE_MAX_TARGETS, 10, me, true);
|
me->CastCustomSpell(SPELL_WYVERN_STING, SPELLVALUE_MAX_TARGETS, 10, me, true);
|
||||||
events.RepeatEvent(urand(15000, 32000));
|
events.Repeat(25s, 43s);
|
||||||
break;
|
break;
|
||||||
case EVENT_ACID_SPIT:
|
case EVENT_ACID_SPIT:
|
||||||
DoCastVictim(SPELL_ACID_SPIT);
|
DoCastVictim(SPELL_ACID_SPIT);
|
||||||
events.RepeatEvent(urand(5000, 10000));
|
events.Repeat(1s, 20s);
|
||||||
break;
|
break;
|
||||||
case EVENT_NOXIOUS_POISON:
|
case EVENT_NOXIOUS_POISON:
|
||||||
DoCastRandomTarget(SPELL_NOXIOUS_POISON, 0, 100, true);
|
DoCastRandomTarget(SPELL_NOXIOUS_POISON, 0, 100.f, true);
|
||||||
events.RepeatEvent(urand(12000, 24000));
|
events.Repeat(10s, 22s);
|
||||||
break;
|
break;
|
||||||
case EVENT_HARD_ENRAGE:
|
case EVENT_HARD_ENRAGE:
|
||||||
if (!_hardEnrage)
|
if (!_hardEnrage)
|
||||||
{
|
{
|
||||||
DoCastSelf(SPELL_HARD_ENRAGE, true);
|
DoCastSelf(SPELL_BERSERK, true);
|
||||||
|
events.CancelEvent(EVENT_FRENZY);
|
||||||
_hardEnrage = true;
|
_hardEnrage = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DoCastAOE(SPELL_POISON_BOLT);
|
DoCastAOE(SPELL_POISON_BOLT);
|
||||||
}
|
}
|
||||||
events.RepeatEvent(3000);
|
events.Repeat(2s);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
}
|
}
|
||||||
private:
|
|
||||||
bool _berserk;
|
private:
|
||||||
bool _hardEnrage;
|
bool _berserk;
|
||||||
|
bool _hardEnrage;
|
||||||
};
|
};
|
||||||
|
|
||||||
// 26180 - Wyvern Sting
|
// 26180 - Wyvern Sting
|
||||||
|
|||||||
@@ -49,14 +49,15 @@ enum events
|
|||||||
EVENT_SPELL_BERSERK = 4,
|
EVENT_SPELL_BERSERK = 4,
|
||||||
EVENT_SARTURA_AGGRO_RESET = 5,
|
EVENT_SARTURA_AGGRO_RESET = 5,
|
||||||
EVENT_SARTURA_AGGRO_RESET_END = 6,
|
EVENT_SARTURA_AGGRO_RESET_END = 6,
|
||||||
|
EVENT_SARTURA_SUNDERING_CLEAVE = 7,
|
||||||
|
|
||||||
// Sartura's Royal Guard
|
// Sartura's Royal Guard
|
||||||
EVENT_GUARD_WHIRLWIND = 7,
|
EVENT_GUARD_WHIRLWIND = 8,
|
||||||
EVENT_GUARD_WHIRLWIND_RANDOM = 8,
|
EVENT_GUARD_WHIRLWIND_RANDOM = 9,
|
||||||
EVENT_GUARD_WHIRLWIND_END = 9,
|
EVENT_GUARD_WHIRLWIND_END = 10,
|
||||||
EVENT_GUARD_KNOCKBACK = 10,
|
EVENT_GUARD_KNOCKBACK = 11,
|
||||||
EVENT_GUARD_AGGRO_RESET = 11,
|
EVENT_GUARD_AGGRO_RESET = 12,
|
||||||
EVENT_GUARD_AGGRO_RESET_END = 12
|
EVENT_GUARD_AGGRO_RESET_END = 13
|
||||||
};
|
};
|
||||||
|
|
||||||
struct boss_sartura : public BossAI
|
struct boss_sartura : public BossAI
|
||||||
@@ -96,9 +97,10 @@ struct boss_sartura : public BossAI
|
|||||||
{
|
{
|
||||||
BossAI::EnterCombat(who);
|
BossAI::EnterCombat(who);
|
||||||
Talk(SAY_AGGRO);
|
Talk(SAY_AGGRO);
|
||||||
events.ScheduleEvent(EVENT_SARTURA_WHIRLWIND, 30000);
|
events.ScheduleEvent(EVENT_SARTURA_WHIRLWIND, 12s, 22s);
|
||||||
events.ScheduleEvent(EVENT_SARTURA_AGGRO_RESET, urand(45000, 55000));
|
events.ScheduleEvent(EVENT_SARTURA_AGGRO_RESET, urand(45000, 55000));
|
||||||
events.ScheduleEvent(EVENT_SPELL_BERSERK, 10 * 60000);
|
events.ScheduleEvent(EVENT_SPELL_BERSERK, 10 * 60000);
|
||||||
|
events.ScheduleEvent(EVENT_SARTURA_SUNDERING_CLEAVE, 2400ms, 3s);
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustDied(Unit* /*killer*/) override
|
void JustDied(Unit* /*killer*/) override
|
||||||
@@ -121,14 +123,6 @@ struct boss_sartura : public BossAI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
|
|
||||||
{
|
|
||||||
if (spell->Id != SPELL_SUNDERING_CLEAVE)
|
|
||||||
return;
|
|
||||||
|
|
||||||
me->RemoveAura(SPELL_SUNDERING_CLEAVE);
|
|
||||||
}
|
|
||||||
|
|
||||||
void UpdateAI(uint32 diff) override
|
void UpdateAI(uint32 diff) override
|
||||||
{
|
{
|
||||||
if (!UpdateVictim())
|
if (!UpdateVictim())
|
||||||
@@ -161,7 +155,7 @@ struct boss_sartura : public BossAI
|
|||||||
case EVENT_SARTURA_WHIRLWIND_END:
|
case EVENT_SARTURA_WHIRLWIND_END:
|
||||||
events.CancelEvent(EVENT_SARTURA_WHIRLWIND_RANDOM);
|
events.CancelEvent(EVENT_SARTURA_WHIRLWIND_RANDOM);
|
||||||
whirlwind = false;
|
whirlwind = false;
|
||||||
events.ScheduleEvent(EVENT_SARTURA_WHIRLWIND, urand(25000, 40000));
|
events.ScheduleEvent(EVENT_SARTURA_WHIRLWIND, 5s, 11s);
|
||||||
break;
|
break;
|
||||||
case EVENT_SARTURA_AGGRO_RESET:
|
case EVENT_SARTURA_AGGRO_RESET:
|
||||||
if (aggroReset == false)
|
if (aggroReset == false)
|
||||||
@@ -203,6 +197,18 @@ struct boss_sartura : public BossAI
|
|||||||
berserked = true;
|
berserked = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case EVENT_SARTURA_SUNDERING_CLEAVE:
|
||||||
|
if (whirlwind)
|
||||||
|
{
|
||||||
|
Milliseconds whirlwindTimer = events.GetTimeUntilEvent(EVENT_SARTURA_WHIRLWIND_END);
|
||||||
|
events.RescheduleEvent(EVENT_SARTURA_SUNDERING_CLEAVE, whirlwindTimer + 500ms);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
DoCastVictim(SPELL_SUNDERING_CLEAVE, false);
|
||||||
|
events.RescheduleEvent(EVENT_SARTURA_SUNDERING_CLEAVE, 2400ms, 3s);
|
||||||
|
}
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -233,17 +239,9 @@ struct npc_sartura_royal_guard : public ScriptedAI
|
|||||||
|
|
||||||
void EnterCombat(Unit* /*who*/) override
|
void EnterCombat(Unit* /*who*/) override
|
||||||
{
|
{
|
||||||
events.ScheduleEvent(EVENT_GUARD_WHIRLWIND, 30000);
|
events.ScheduleEvent(EVENT_GUARD_WHIRLWIND, 6s, 10s);
|
||||||
events.ScheduleEvent(EVENT_GUARD_AGGRO_RESET, urand(45000, 55000));
|
events.ScheduleEvent(EVENT_GUARD_AGGRO_RESET, urand(45000, 55000));
|
||||||
events.ScheduleEvent(EVENT_GUARD_KNOCKBACK, 10000);
|
events.ScheduleEvent(EVENT_GUARD_KNOCKBACK, 12s, 16s);
|
||||||
}
|
|
||||||
|
|
||||||
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
|
|
||||||
{
|
|
||||||
if (spell->Id != SPELL_SUNDERING_CLEAVE)
|
|
||||||
return;
|
|
||||||
|
|
||||||
me->RemoveAura(SPELL_SUNDERING_CLEAVE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateAI(uint32 diff) override
|
void UpdateAI(uint32 diff) override
|
||||||
@@ -261,7 +259,7 @@ struct npc_sartura_royal_guard : public ScriptedAI
|
|||||||
DoCastSelf(SPELL_GUARD_WHIRLWIND);
|
DoCastSelf(SPELL_GUARD_WHIRLWIND);
|
||||||
whirlwind = true;
|
whirlwind = true;
|
||||||
events.ScheduleEvent(EVENT_GUARD_WHIRLWIND_RANDOM, urand(3000, 7000));
|
events.ScheduleEvent(EVENT_GUARD_WHIRLWIND_RANDOM, urand(3000, 7000));
|
||||||
events.ScheduleEvent(EVENT_GUARD_WHIRLWIND_END, 15000);
|
events.ScheduleEvent(EVENT_GUARD_WHIRLWIND_END, 8s);
|
||||||
break;
|
break;
|
||||||
case EVENT_GUARD_WHIRLWIND_RANDOM:
|
case EVENT_GUARD_WHIRLWIND_RANDOM:
|
||||||
if (whirlwind == true)
|
if (whirlwind == true)
|
||||||
@@ -278,7 +276,7 @@ struct npc_sartura_royal_guard : public ScriptedAI
|
|||||||
case EVENT_GUARD_WHIRLWIND_END:
|
case EVENT_GUARD_WHIRLWIND_END:
|
||||||
events.CancelEvent(EVENT_GUARD_WHIRLWIND_RANDOM);
|
events.CancelEvent(EVENT_GUARD_WHIRLWIND_RANDOM);
|
||||||
whirlwind = false;
|
whirlwind = false;
|
||||||
events.ScheduleEvent(EVENT_GUARD_WHIRLWIND, urand(25000, 40000));
|
events.ScheduleEvent(EVENT_GUARD_WHIRLWIND, 500ms, 9s);
|
||||||
break;
|
break;
|
||||||
case EVENT_GUARD_AGGRO_RESET:
|
case EVENT_GUARD_AGGRO_RESET:
|
||||||
if (aggroReset == true)
|
if (aggroReset == true)
|
||||||
@@ -315,7 +313,7 @@ struct npc_sartura_royal_guard : public ScriptedAI
|
|||||||
break;
|
break;
|
||||||
case EVENT_GUARD_KNOCKBACK:
|
case EVENT_GUARD_KNOCKBACK:
|
||||||
DoCastVictim(SPELL_GUARD_KNOCKBACK);
|
DoCastVictim(SPELL_GUARD_KNOCKBACK);
|
||||||
events.RepeatEvent(urand(10000, 20000));
|
events.Repeat(21s, 37s);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user