Merge branch 'master' of github.com:azerothcore/azerothcore-wotlk into Playerbot

This commit is contained in:
Yunfan Li
2023-09-23 22:44:15 +08:00
154 changed files with 7913 additions and 4858 deletions

1
.github/README.md vendored
View File

@@ -1,7 +1,6 @@
# ![logo](https://raw.githubusercontent.com/azerothcore/azerothcore.github.io/master/images/logo-github.png) AzerothCore
[![CodeFactor](https://www.codefactor.io/repository/github/azerothcore/azerothcore-wotlk/badge)](https://www.codefactor.io/repository/github/azerothcore/azerothcore-wotlk)
[![Bountysource](https://www.bountysource.com/badge/tracker?tracker_id=40032087)](https://www.bountysource.com/teams/azerothcore/bounties "Put money on issues or get paid for fixing them")
[![StackOverflow](http://img.shields.io/badge/stackoverflow-azerothcore-blue.svg?logo=stackoverflow)](https://stackoverflow.com/questions/tagged/azerothcore?sort=newest "Ask / browse questions here")
[![Discord](https://img.shields.io/discord/217589275766685707?logo=discord&logoColor=white)](https://discord.gg/gkt4y2x "Our community hub on Discord")

View File

@@ -23,7 +23,7 @@ jobs:
COMPILER: ${{ matrix.compiler }}
if: github.repository == 'azerothcore/azerothcore-wotlk' && !github.event.pull_request.draft
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Cache
uses: actions/cache@v3
env:

View File

@@ -5,7 +5,8 @@ on:
jobs:
check-pending-sql:
runs-on: ubuntu-latest
if: github.repository == 'azerothcore/azerothcore-wotlk'
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Check pending SQL
run: source ./apps/ci/ci-pending.sh

View File

@@ -9,8 +9,9 @@ jobs:
matrix:
os: [ubuntu-20.04]
runs-on: ${{ matrix.os }}
if: github.repository == 'azerothcore/azerothcore-wotlk'
name: check codestyle
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Check core codestyle
run: source ./apps/ci/ci-codestyle.sh

View File

@@ -23,7 +23,7 @@ jobs:
COMPILER: ${{ matrix.compiler }}
if: github.repository == 'azerothcore/azerothcore-wotlk' && !github.event.pull_request.draft
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Cache
uses: actions/cache@v3
with:

View File

@@ -40,7 +40,7 @@ jobs:
|| github.event.label.name == 'run-build')
)
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Cache
uses: actions/cache@v3
with:

View File

@@ -34,7 +34,7 @@ jobs:
|| github.event.label.name == 'run-build')
)
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Checkout modules
run: ./apps/ci/ci-install-modules.sh
if: matrix.modules == 'with'

View File

@@ -18,19 +18,17 @@ jobs:
strategy:
fail-fast: false
runs-on: ubuntu-22.04
if: github.repository == 'azerothcore/azerothcore-wotlk'
name: cpp check
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: cpp check
run: |
sudo apt update -y
sudo apt install -y cppcheck
cppcheck --force --inline-suppr \
-i src/server/game/Achievements/AchievementMgr.cpp \
-i src/server/game/AuctionHouse/AuctionHouseMgr.cpp \
-i src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp \
-i src/server/game/DungeonFinding/LFGMgr.cpp \
-i src/server/game/Entities/GameObject/GameObject.cpp \
-i src/server/game/Entities/Pet/Pet.cpp \
-i src/server/game/Entities/Player/Player.cpp \
src/
cppcheck --force --inline-suppr --suppressions-list=./.suppress.cppcheck src/ --output-file=report.txt
if [ -s report.txt ]; then # if file is not empty
cat report.txt
exit 1 # let github action fails
fi

View File

@@ -40,7 +40,7 @@ jobs:
docker --version
docker compose version
- uses: actions/checkout@v3
- uses: actions/checkout@v4
# we need the entire history for the ac-dev-server
# with:
# fetch-depth: 2
@@ -108,7 +108,7 @@ jobs:
docker --version
docker compose version
- uses: actions/checkout@v3
- uses: actions/checkout@v4
# we need the entire history for the ac-dev-server
# with:
# fetch-depth: 2

View File

@@ -9,26 +9,41 @@ jobs:
strategy:
fail-fast: false
runs-on: ubuntu-20.04
permissions: write-all
if: github.repository == 'azerothcore/azerothcore-wotlk' && !github.event.pull_request.draft
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Extract branch name
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch
# If we're fetching all the history in a later step it makes sense to
# pre-load it now
fetch-depth: 0
ref: ${{ github.ref_name }}
- uses: denoland/setup-deno@v1
with:
# Specifies latest 1.x
deno-version: "~1.0"
- name: Import and commit pending sql
run: |
git config user.email "azerothcorebot@gmail.com" && git config user.name "AzerothCoreBot"
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
# Get the latest changes from git
git pull --rebase origin "${{ github.ref_name }}"
bash bin/acore-db-pendings
bash bin/acore-import-changelogs
git fetch --unshallow origin ${BRANCH}
deno run --allow-all --unstable apps/ci/ci-pending-changelogs.ts
git add -A .
git commit -am "chore(DB): import pending files" -m "Referenced commit(s): ${GITHUB_SHA}" || true
env:
BRANCH: ${{ steps.extract_branch.outputs.branch }}
# Noting that the branch name can only be master, as per the event
# triggering this action
BRANCH: ${{ github.ref_name }}
- name: Push changes
uses: ad-m/github-push-action@fe38f0a751bf9149f0270cc1fe20bf9156854365
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.AC_GITHUB_TOKEN }}
branch: ${{ steps.extract_branch.outputs.branch }}
# Noting that the branch name can only be master, as per the event
# triggering this action
branch: ${{ github.ref_name }}

View File

@@ -25,7 +25,7 @@ jobs:
&& !github.event.pull_request.draft
&& (github.ref == 'refs/heads/master' || contains(github.event.pull_request.labels.*.name, 'run-build') || github.event.label.name == 'run-build')
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Cache
uses: actions/cache@v3
with:

View File

@@ -5,9 +5,14 @@ on:
jobs:
triage:
runs-on: ubuntu-20.04
permissions: write-all
if: github.repository == 'azerothcore/azerothcore-wotlk'
steps:
- uses: actions/labeler@v3
- uses: actions/checkout@v4
with:
repo-token: ${{ secrets.AC_GITHUB_TOKEN }}
persist-credentials: true
- uses: actions/labeler@v4
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
configuration-path: .github/labeler.yml
sync-labels: true

View File

@@ -23,7 +23,7 @@ jobs:
COMPILER: ${{ matrix.compiler }}
if: github.repository == 'azerothcore/azerothcore-wotlk' && !github.event.pull_request.draft
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Cache
uses: actions/cache@v3
env:

View File

@@ -19,13 +19,13 @@ jobs:
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }}
env:
BOOST_ROOT: C:\local\boost_1_79_0
BOOST_ROOT: C:\local\boost_1_82_0
if: |
github.repository == 'azerothcore/azerothcore-wotlk'
&& !github.event.pull_request.draft
&& (github.ref == 'refs/heads/master' || contains(github.event.pull_request.labels.*.name, 'run-build') || github.event.label.name == 'run-build')
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2.9
- name: Configure OS

1
.suppress.cppcheck Normal file
View File

@@ -0,0 +1 @@
cppcheckError

View File

@@ -1,23 +0,0 @@
DENO_MIN_VERSION="1.26.0"
function denoInstall() {
{ # try
echo "Deno version check:" && denoCmd upgrade --version $DENO_MIN_VERSION
} ||
{ # catch
echo "Installing Deno..."
# just one line of command that works on all OSes
# (temporary cd into AC_PATH_DEPS)
curl -fsSL https://deno.land/x/install/install.sh | DENO_INSTALL="$AC_PATH_DEPS/deno" sh
}
}
function denoCmd() {
[[ "$OSTYPE" = "msys" ]] && DENOEXEC="./deps/deno/bin/deno.exe" || DENOEXEC="./deps/deno/bin/deno"
(cd "$AC_PATH_ROOT" ; $DENOEXEC "$@")
}
function denoRunFile() {
denoCmd run --allow-all --unstable "$@"
}

View File

@@ -13,9 +13,4 @@ source "$AC_PATH_DEPS/acore/bash-lib/src/event/hooks.sh"
source "$AC_PATH_SHARED/common.sh"
source "$AC_PATH_SHARED/deno.sh"
denoInstall
[[ "$OSTYPE" = "msys" ]] && AC_BINPATH_FULL="$BINPATH" || AC_BINPATH_FULL="$BINPATH/bin"

View File

@@ -73,7 +73,7 @@ function comp_configure() {
echo "Platform: $OSTYPE"
case "$OSTYPE" in
darwin*)
OSOPTIONS=" -DMYSQL_ADD_INCLUDE_PATH=/usr/local/include -DMYSQL_LIBRARY=/usr/local/lib/libmysqlclient.dylib -DREADLINE_INCLUDE_DIR=/usr/local/opt/readline/include -DREADLINE_LIBRARY=/usr/local/opt/readline/lib/libreadline.dylib -DOPENSSL_INCLUDE_DIR=/usr/local/opt/openssl@1.1/include -DOPENSSL_SSL_LIBRARIES=/usr/local/opt/openssl@1.1/lib/libssl.dylib -DOPENSSL_CRYPTO_LIBRARIES=/usr/local/opt/openssl@1.1/lib/libcrypto.dylib "
OSOPTIONS=" -DMYSQL_ADD_INCLUDE_PATH=/usr/local/include -DMYSQL_LIBRARY=/usr/local/lib/libmysqlclient.dylib -DREADLINE_INCLUDE_DIR=/usr/local/opt/readline/include -DREADLINE_LIBRARY=/usr/local/opt/readline/lib/libreadline.dylib -DOPENSSL_INCLUDE_DIR=/usr/local/opt/openssl@3/include -DOPENSSL_SSL_LIBRARIES=/usr/local/opt/openssl@3/lib/libssl.dylib -DOPENSSL_CRYPTO_LIBRARIES=/usr/local/opt/openssl@3/lib/libcrypto.dylib "
;;
msys*)
OSOPTIONS=" -DMYSQL_INCLUDE_DIR=C:\tools\mysql\current\include -DMYSQL_LIBRARY=C:\tools\mysql\current\lib\mysqlclient.lib "

184
apps/docker/docker-cmd.sh Normal file
View File

@@ -0,0 +1,184 @@
#!/bin/bash
# TODO(michaeldelago) decide if we need a wrapper like this around docker
# commands.
#
# Running the docker commands should be simple and familiar.
# Introducting extra steps through the dashboard can cause issues with people
# getting started, especially if they already know docker.
#
# If a new user knows docker, they will feel (pretty close) to right at home.
# If a new user doesn't know docker, it's easy to learn and the knowledge
# applies to much more than azerothcore
set -euo pipefail
COMPOSE_DOCKER_CLI_BUILD="1"
DOCKER_BUILDKIT="1"
# BUILDKIT_INLINE_CACHE="1"
function usage () {
cat <<EOF
Wrapper for shell scripts around docker
usage: $(basename $0) ACTION [ ACTION... ] [ ACTION_ARG... ]
actions:
EOF
# the `-s` will remove the "#" and properly space the action and description
cat <<EOF | column -t -l2 -s'#'
> start:app # Start the development worldserver and authserver
> start:app:d # Start the development worldserver and authserver in detached mode
> build # build the development worldserver and authserver
> pull # pull the development worldserver and authserver
> build:nocache # build the development worldserver and authserver without cache
> clean:build # clean build artifacts from the dev server
> client-data # download client data in the dev server
> dev:up start # the dev server
> dev:build # compile azerothcore using the dev server
> dev:dash # execute the dashboard in the dev server container
> dev:shell [ ARGS... ] # open a bash shell in the dev server
> prod:build # Build the service containers used by acore-docker
> prod:pull # Pull the containers used by acore-docker
> prod:up # Start the services used by acore-docker
> prod:up:d # start the services used by acore-docker in the background
> attach SERVICE # attach to a service currently running in docker compose
EOF
}
# If no args, just spit usage and exit
[[ $# -eq 0 ]] && usage && exit
# loop through commands passed
while [[ $# -gt 0 ]]; do
case "$1" in
start:app)
set -x
docker compose --profile app up
set +x
# pop the head off of the queue of args
# After this, the value of $1 is the value of $2
shift
;;
start:app:d)
set -x
docker compose --profile app up -d
set +x
shift
;;
build)
set -x
docker compose --profile local --profile dev --profile dev-build build
docker compose --profile dev-build run --rm --no-deps ac-dev-build /bin/bash /azerothcore/apps/docker/docker-build-dev.sh
set +x
shift
;;
pull)
set -x
docker compose --profile local --profile dev --profile dev-build pull
docker image prune -f
set +x
shift
;;
build:nocache)
set -x
docker compose --profile local --profile dev --profile dev-build build --no-cache
docker image prune -f
docker compose run --rm --no-deps ac-dev-build /bin/bash /azerothcore/apps/docker/docker-build-dev.sh
set +x
shift
;;
clean:build)
set -x
docker image prune -f
docker compose run --rm --no-deps ac-dev-server bash acore.sh compiler clean
docker compose run --rm --no-deps ac-dev-server bash acore.sh compiler ccacheClean
set +x
shift
;;
client-data)
set -x
docker compose run --rm --no-deps ac-dev-server bash acore.sh client-data
set +x
shift
;;
dev:up)
set -x
docker compose up -d ac-dev-server
set +x
shift
;;
dev:build)
set -x
docker compose run --rm ac-dev-server bash acore.sh compiler build
set +x
shift
;;
dev:dash)
set -x
docker compose run --rm ac-dev-server bash /azerothcore/acore.sh ${@:2}
set +x
shift
;;
dev:shell)
set -x
docker compose up -d ac-dev-server
docker compose exec ac-dev-server bash ${@:2}
set +x
shift
;;
build:prod|prod:build)
set -x
docker compose --profile prod build
docker image prune -f
set +x
shift
;;
pull:prod|prod:pull)
set -x
docker compose --profile prod pull
set +x
shift
;;
prod:up|start:prod)
set -x
docker compose --profile prod-app up
set +x
shift
;;
prod:up:d|start:prod:d)
set -x
docker compose --profile prod-app up -d
set +x
shift
;;
attach)
SERVICE="$2"
set -x
docker compose attach "$SERVICE"
set +x
shift
shift # Second to pass the argument
;;
*)
echo "Unknown or empty arg"
usage
exit 1
esac
done

View File

@@ -1,330 +0,0 @@
import { Command } from "https://cdn.deno.land/cmd/versions/v1.2.0/raw/mod.ts";
import * as ink from "https://deno.land/x/ink/mod.ts";
import {
Input,
Select,
} from "https://deno.land/x/cliffy@v0.25.2/prompt/mod.ts";
import * as semver from "https://deno.land/std@0.159.0/semver/mod.ts";
const program = new Command();
const env = {
COMPOSE_DOCKER_CLI_BUILD: "1",
DOCKER_BUILDKIT: "1",
// BUILDKIT_INLINE_CACHE: "1",
};
const MIN_COMPOSE_VERSION = "2.0.0";
program
.name("acore.sh docker")
.description("Shell scripts for docker")
.version("1.0.0");
shellCommandFactory(
"start:app",
"Startup the authserver and worldserver apps",
["docker compose --profile app up"],
env
);
shellCommandFactory(
"start:app:d",
"Startup the authserver and worldserver apps in detached mode",
["docker compose --profile app up -d"],
env
);
shellCommandFactory(
"build",
"Build the authserver and worldserver",
[
"docker compose --profile local --profile dev --profile dev-build build --parallel",
"docker image prune -f",
"docker compose run --rm --no-deps ac-dev-build bash apps/docker/docker-build-dev.sh",
],
env
);
shellCommandFactory(
"pull",
"Pull build and local images",
[
"docker compose --profile local --profile dev --profile dev-build pull --parallel",
"docker image prune -f",
],
env
);
shellCommandFactory(
"build:nocache",
"Build the authserver and worldserver without docker cache",
[
"docker compose --profile local --profile dev --profile dev-build build --no-cache --parallel",
"docker image prune -f",
"docker compose run --rm --no-deps ac-dev-build bash apps/docker/docker-build-dev.sh",
],
env
);
shellCommandFactory(
"clean:build",
"Clean build files",
[
"docker image prune -f",
`docker compose run --rm --no-deps ac-dev-server bash acore.sh compiler clean`,
`docker compose run --rm --no-deps ac-dev-server bash acore.sh compiler ccacheClean`,
],
env
);
shellCommandFactory(
"client-data",
"Download client data inside the ac-data volume",
["docker compose run --rm --no-deps ac-dev-server bash acore.sh client-data"],
env
);
shellCommandFactory(
"dev:up",
"Start the dev server container in background",
["docker compose up -d ac-dev-server"],
env
);
shellCommandFactory(
"dev:build",
"Build using the dev server",
["docker compose run --rm ac-dev-server bash acore.sh compiler build"],
env
);
shellCommandFactory(
"dev:dash [args...]",
"Execute acore dashboard within a running ac-dev-server",
["docker compose run --rm ac-dev-server bash acore.sh"],
env
);
shellCommandFactory(
"dev:shell [args...]",
"Open an interactive shell within the dev server",
[
"docker compose up -d ac-dev-server",
"docker compose exec ac-dev-server bash",
],
env
);
shellCommandFactory(
"prod:build",
"[TEST ONLY] Build producion services",
["docker compose --profile prod build --parallel", "docker image prune -f"],
env
);
shellCommandFactory(
"prod:pull",
"[TEST ONLY] Pull production services from the remote registry",
["docker compose --profile prod pull"],
env
);
shellCommandFactory(
"prod:up",
"[TEST ONLY] Start production services (foreground)",
["docker compose --profile prod-app up"],
env
);
shellCommandFactory(
"prod:up:d",
"[TEST ONLY] Start production services (background)",
["docker compose --profile prod-app up -d"],
env
);
program
.command("attach [service]")
.description("attach to a service")
.action(async (service: string | undefined) => {
const { run } = Deno;
let command = `docker compose ps`;
if (service) {
command = `${command} ${service}`;
}
console.log(ink.colorize(`<green>>>>>> Running: ${command}</green>`));
let cmd = command.split(" ");
const res = Deno.run({
cmd,
cwd: process.cwd(),
stdout: "piped",
stderr: "piped",
});
const output = await res.output(); // "piped" must be set
let services = new TextDecoder().decode(output).split("\n");
if (!services) {
console.error("No services available!");
return;
}
services.pop();
services = services.slice(1);
res.close(); // Don't forget to close it
let selService: string;
if (services.length > 1) {
selService = await Select.prompt({
message: `Select a service`,
options: services,
});
} else {
selService = services[0];
}
if (!selService) {
console.log(`Service ${service} is not available`);
return;
}
command = `docker attach ${selService.split(" ")[0]}`;
console.log(ink.colorize(`<green>>>>>> Running: ${command}</green>`));
console.log(
ink.colorize(
"<yellow>NOTE: you can detach from a container and leave it running using the CTRL-p CTRL-q key sequence.</yellow>"
)
);
cmd = command.split(" ");
const shellCmd = run({
cmd,
cwd: process.cwd(),
});
await shellCmd.status();
shellCmd.close();
});
program
.command("quit")
.description("Close docker command")
.action(() => {
process.exit(0);
});
/**
*
* @param name
* @param description
* @param commands you can pass one or more commands, they will be executed sequentially
* @returns
*/
function shellCommandFactory(
name: string,
description: string,
commands: string[],
env?: { [key: string]: string }
): Command {
return program
.command(name)
.description(
`${description}. Command: \n"${ink.colorize(
`<green>${commands.join(" && ")}</green>`
)}"\n`
)
.action(async (args: string[] | undefined) => {
const { run } = Deno;
for (const command of commands) {
console.log(ink.colorize(`<green>>>>>> Running: ${command}</green>`));
const cmd = command.split(" ");
if (Array.isArray(args)) {
cmd.push(...args);
}
const shellCmd = run({
cmd,
cwd: process.cwd(),
env: { ...process.env, ...env },
});
const status = await shellCmd.status();
if (!status.success) {
throw new Error(`Failed with error: ${status.code}, however,
it's not related to this Deno script directly. An error occurred within
the script called by the command itself`);
}
shellCmd.close();
}
});
}
async function checkDockerVersion() {
const { run } = Deno;
const dockerVerCmd = run({
cmd: ["docker", "compose", "version"],
cwd: process.cwd(),
env: { ...process.env, ...env },
stdout: "piped",
});
const output = await dockerVerCmd.output();
const status = await dockerVerCmd.status();
const outStr = new TextDecoder().decode(output);
if (!status.success) {
return 'not installed?'
}
const version = outStr.split(" ").pop()?.trim();
if (!version) return version;
if (!semver.gte(version, MIN_COMPOSE_VERSION)) {
return version;
}
return true;
}
async function main() {
while (true) {
const version = await checkDockerVersion();
if (version !== true) {
console.error(
ink.colorize(`<red>ERROR: Your docker compose version (${version}) must be higher or equal to ${MIN_COMPOSE_VERSION}. Please install the new version of docker compose and try again</red>`)
);
return false
}
if (Deno.args.length === 0) {
program.outputHelp();
const command = await Input.prompt({
message: "Enter the command:",
});
console.log(command);
await program.parseAsync(command.split(" "));
} else {
await program.parseAsync(Deno.args);
process.exit(0);
}
}
}
main();

View File

@@ -26,4 +26,4 @@ if ! command -v cmake &>/dev/null ; then
fi
##########################################
brew install openssl@3 readline boost bash-completion curl unzip mysql ccache
brew install openssl@3 readline boost@1.82 bash-completion curl unzip mysql@8.1 ccache

View File

@@ -23,7 +23,8 @@ else
fi
choco install -y --skip-checksums $INSTALL_ARGS cmake.install -y --installargs 'ADD_CMAKE_TO_PATH=System'
choco install -y --skip-checksums $INSTALL_ARGS visualstudio2022-workload-nativedesktop openssl
choco install -y --skip-checksums $INSTALL_ARGS boost-msvc-14.3 --version=1.79.0
choco install -y --skip-checksums $INSTALL_ARGS mysql --version 8.0.31
choco install -y --skip-checksums $INSTALL_ARGS visualstudio2022-workload-nativedesktop
choco install -y --skip-checksums $INSTALL_ARGS openssl --version=3.1.1
choco install -y --skip-checksums $INSTALL_ARGS boost-msvc-14.3 --version=1.82.0
choco install -y --skip-checksums $INSTALL_ARGS mysql --version=8.0.31

View File

@@ -64,11 +64,12 @@ function _switch() {
inst_simple_restarter authserver
;;
""|"dr"|"docker"|"13")
DOCKER=1 denoRunFile "$AC_PATH_APPS/docker/docker-cmd.ts" "${@:2}"
DOCKER=1 bash "$AC_PATH_ROOT/apps/docker/docker-cmd.sh" "${@:2}"
exit
;;
""|"v"|"version"|"14")
denoRunFile "$AC_PATH_APPS/installer/main.ts" "version"
# denoRunFile "$AC_PATH_APPS/installer/main.ts" "version"
printf "AzerothCore Rev. %s\n" "$ACORE_VERSION"
exit
;;
""|"quit"|"15")

View File

@@ -1,43 +0,0 @@
import { Command } from "https://cdn.deno.land/cmd/versions/v1.2.0/raw/mod.ts";
import { getAcoreReleaseVersion } from "./utils.ts";
import { Input } from "https://deno.land/x/cliffy@v0.25.2/prompt/mod.ts";
const program = new Command();
program
.name("acore.sh")
.description("Shell scripts for docker")
.version("1.0.0");
// program
// .command("quit")
// .description("Close docker command")
// .action(() => {
// process.exit(0);
// });
program
.command("version")
.description("Get the version of the current AzerothCore revision")
.action(async () => {
console.log(await getAcoreReleaseVersion());
});
async function main() {
let exit = false;
do {
if (Deno.args.length === 0) {
program.outputHelp();
const command = await Input.prompt({
message: "Enter the command:",
});
console.log(command);
await program.parseAsync(command.split(" "));
} else {
exit = true;
await program.parseAsync(Deno.args);
process.exit(0);
}
} while (!exit);
}
main();

View File

@@ -1,17 +0,0 @@
import * as path from "https://deno.land/std/path/mod.ts";
import makeloc from "https://deno.land/x/dirname@1.1.2/mod.ts";
const { __dirname } = makeloc(import.meta);
// specify the needed paths here
const ACORE_JSON = path.resolve(__dirname + "/../../acore.json");
export async function getAcoreReleaseVersion() {
// read the acore.json file to work with the versioning
const decoder = new TextDecoder("utf-8");
//console.debug(`Open ${ACORE_JSON}`)
const data = await Deno.readFile(ACORE_JSON);
const acoreInfo = JSON.parse(decoder.decode(data));
return `AzerothCore Rev. ${acoreInfo.version}`;
}

View File

@@ -0,0 +1,7 @@
-- DB update 2023_05_23_00 -> 2023_09_16_00
--
ALTER TABLE `profanity_name`
CHANGE COLUMN `name` `name` VARCHAR(12) NOT NULL COLLATE 'utf8mb4_bin' FIRST;
ALTER TABLE `reserved_name`
CHANGE COLUMN `name` `name` VARCHAR(12) NOT NULL COLLATE 'utf8mb4_bin' FIRST;

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,51 @@
-- DB update 2023_09_10_00 -> 2023_09_10_01
--
ALTER TABLE `creature`
ADD COLUMN `CreateObject` TINYINT UNSIGNED NOT NULL DEFAULT '0' AFTER `VerifiedBuild`;
-- Haggle
UPDATE `creature` SET `CreateObject` = 1 WHERE `guid` = 53788 AND `id1` = 14041;
-- The Underbog
SET @CGUID := 138300;
UPDATE `creature` SET `CreateObject` = 1 WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+218;
-- The Steamvault
SET @CGUID := 142000;
UPDATE `creature` SET `CreateObject` = 1 WHERE `guid` BETWEEN @CGUID AND @CGUID+174;
-- The Shattered Halls
SET @CGUID := 151000;
UPDATE `creature` SET `CreateObject` = 2 WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+4;
UPDATE `creature` SET `CreateObject` = 1 WHERE `guid` BETWEEN @CGUID+5 AND @CGUID+18;
UPDATE `creature` SET `CreateObject` = 3 WHERE `guid` BETWEEN @CGUID+19 AND @CGUID+34;
UPDATE `creature` SET `CreateObject` = 1 WHERE `guid` BETWEEN @CGUID+35 AND @CGUID+84;
UPDATE `creature` SET `CreateObject` = 2 WHERE `guid` BETWEEN @CGUID+85 AND @CGUID+88;
UPDATE `creature` SET `CreateObject` = 1 WHERE `guid` BETWEEN @CGUID+89 AND @CGUID+282;
-- Sethekk Halls
SET @CGUID := 138600;
UPDATE `creature` SET `CreateObject` = 1 WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+187;
-- The Shadow Labyrinth
SET @CGUID := 146000;
UPDATE `creature` SET `CreateObject` = 1 WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+224;
UPDATE `creature` SET `CreateObject` = 2 WHERE `guid` BETWEEN @CGUID+225 AND @CGUID+229;
UPDATE `creature` SET `CreateObject` = 1 WHERE `guid` BETWEEN @CGUID+230 AND @CGUID+235;
-- The Mechanar
SET @CGUID := 138800;
UPDATE `creature` SET `CreateObject` = 1 WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+93;
UPDATE `creature` SET `CreateObject` = 3 WHERE `guid` IN (138893, 138892, 138891, 138890, 138879, 138878, 138877, 138876, 138869, 138864, 138863, 138831, 138820, 138819, 138818, 138817);
-- The Botanica
SET @CGUID := 147000;
UPDATE `creature` SET `CreateObject` = 1 WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+187;
-- The Arcatraz
SET @CGUID := 138900;
UPDATE `creature` SET `CreateObject` = 1 WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+97;
-- The Deathforge
SET @CGUID := 83028;
UPDATE `creature` SET `CreateObject` = 1 WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+84;

View File

@@ -0,0 +1,2 @@
-- DB update 2023_09_10_01 -> 2023_09_11_00
UPDATE `creature_template_spell` SET `VerifiedBuild` = 0 WHERE `CreatureID` IN (17211, 17469, 21160, 21664, 21682, 21683, 21684, 21726, 21747, 21748, 21750, 21752);

View File

@@ -0,0 +1,18 @@
-- DB update 2023_09_11_00 -> 2023_09_13_00
--
DELETE FROM `creature` WHERE `guid` IN (135921, 135922, 135923, 135924, 135925, 135926, 135927, 135928, 135929, 135930, 135931, 135932, 135933, 135934);
INSERT INTO `creature` (`guid`, `id1`, `id2`, `id3`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `VerifiedBuild`) VALUES
(135923, 17644, 0, 0, 532, 3457, 3457, 1, 1, -11001.4, -1991.33, 275.119, 4.97419, 7200, 49890),
(135924, 17644, 0, 0, 532, 3457, 3457, 1, 1, -10984.4, -2016.32, 275.166, 3.1765, 7200, 49890),
(135925, 17644, 0, 0, 532, 3457, 3457, 1, 1, -10976.4, -1961.86, 275.128, 5.39307, 7200, 49890),
(135926, 17644, 0, 0, 532, 3457, 3457, 1, 1, -10975.6, -1984.06, 275.297, 2.9147, 7200, 49890),
(135927, 17644, 0, 0, 532, 3457, 3457, 1, 1, -10962.1, -2014.65, 275.512, 0.628319, 7200, 49890),
(135928, 17644, 0, 0, 532, 3457, 3457, 1, 1, -10953.4, -1983.33, 275.446, 5.00909, 7200, 49890),
(135929, 17644, 0, 0, 532, 3457, 3457, 1, 1, -10951.9, -1957.37, 275.31, 5.89921, 7200, 49890),
(135930, 17644, 0, 0, 532, 3457, 3457, 1, 1, -10931.5, -1983.72, 275.614, 3.22886, 7200, 49890),
(135931, 17644, 0, 0, 532, 3457, 3457, 1, 1, -10942.5, -2014.21, 275.737, 5.91667, 7200, 49890),
(135932, 17644, 0, 0, 532, 3457, 3457, 1, 1, -10929.6, -1958.1, 275.468, 4.71239, 7200, 49890),
(135933, 17644, 0, 0, 532, 3457, 3457, 1, 1, -10911, -1987.62, 275.881, 1.01229, 7200, 49890),
(135934, 17644, 0, 0, 532, 3457, 3457, 1, 1, -10924.4, -2005.02, 275.794, 6.05629, 7200, 49890),
(135921, 17645, 0, 0, 532, 3457, 3457, 1, 1, -10893.5107421875, -2081.342041015625, 342.29364013671875, 5.183627605438232421, 7200, 49890),
(135922, 17645, 0, 0, 532, 3457, 3457, 1, 1, -10833.099609375, -2151.580810546875, 380.8603515625, 4.625122547149658203, 7200, 49890);

View File

@@ -0,0 +1,3 @@
-- DB update 2023_09_13_00 -> 2023_09_14_00
--
UPDATE `creature_template` SET `npcflag` = `npcflag` |1 WHERE `entry` IN (17469,17211,21748,21664,21750,21683,21747,21682,21726,21160,21752,21684);

View File

@@ -0,0 +1,32 @@
-- DB update 2023_09_14_00 -> 2023_09_14_01
-- ACHIEVEMENT_CRITERIA_TYPE_OWN_RANK
DELETE FROM `achievement_criteria_data` WHERE `criteria_id` IN (707, 708, 709, 710, 711, 712, 713, 714, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740);
INSERT INTO `achievement_criteria_data` (`criteria_id`, `type`, `value1`, `value2`, `ScriptName`) VALUES
(707, 23, 14, 0, ''),
(708, 23, 13, 0, ''),
(709, 23, 12, 0, ''),
(710, 23, 11, 0, ''),
(711, 23, 10, 0, ''),
(712, 23, 9, 0, ''),
(713, 23, 8, 0, ''),
(714, 23, 7, 0, ''),
(721, 23, 6, 0, ''),
(722, 23, 5, 0, ''),
(723, 23, 4, 0, ''),
(724, 23, 3, 0, ''),
(725, 23, 2, 0, ''),
(726, 23, 1, 0, ''),
(727, 23, 28, 0, ''),
(728, 23, 27, 0, ''),
(729, 23, 26, 0, ''),
(730, 23, 25, 0, ''),
(731, 23, 24, 0, ''),
(732, 23, 23, 0, ''),
(733, 23, 22, 0, ''),
(734, 23, 21, 0, ''),
(735, 23, 20, 0, ''),
(736, 23, 19, 0, ''),
(737, 23, 18, 0, ''),
(738, 23, 17, 0, ''),
(739, 23, 16, 0, ''),
(740, 23, 15, 0, '');

View File

@@ -0,0 +1,22 @@
-- DB update 2023_09_14_01 -> 2023_09_15_00
--
ALTER TABLE `creature`
ADD COLUMN `Comment` TEXT NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `CreateObject`;
ALTER TABLE `gameobject`
ADD COLUMN `Comment` TEXT NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `VerifiedBuild`;
UPDATE `creature` SET `Comment` = 'Original Orientation: 3.141592741012573242' WHERE `id1` = 18634 AND `guid` = 146209;
UPDATE `creature` SET `Comment` = 'Mechanar Bridge Event Stage 1 Wave 1' WHERE `guid` IN (138817, 138818, 138890, 138831);
UPDATE `creature` SET `Comment` = 'Mechanar Bridge Event Stage 1 Wave 2' WHERE `guid` IN (138863);
UPDATE `creature` SET `Comment` = 'Mechanar Bridge Event Stage 1 Wave 3' WHERE `guid` IN (138891, 138876, 138877);
UPDATE `creature` SET `Comment` = 'Mechanar Bridge Event Stage 2 Wave 1' WHERE `guid` IN (138819, 138892, 138878);
UPDATE `creature` SET `Comment` = 'Mechanar Bridge Event Stage 2 Wave 2' WHERE `guid` IN (138864);
UPDATE `creature` SET `Comment` = 'Mechanar Bridge Event Stage 2 Wave 3' WHERE `guid` IN (138820, 138869, 138893, 138879);
SET @CGUID := 151000;
UPDATE `creature` SET `Comment` = 'Shattered Halls Legionnaire Gauntlet Group 1' WHERE `guid` BETWEEN @CGUID+19 AND @CGUID+23;
UPDATE `creature` SET `Comment` = 'Shattered Halls Legionnaire Gauntlet Group 2' WHERE `guid` BETWEEN @CGUID+24 AND @CGUID+28;
UPDATE `creature` SET `Comment` = 'Shattered Halls Legionnaire Gauntlet Group 3' WHERE `guid` BETWEEN @CGUID+29 AND @CGUID+34;

View File

@@ -0,0 +1,10 @@
-- DB update 2023_09_15_00 -> 2023_09_15_01
ALTER TABLE `player_class_stats`
ADD COLUMN `BaseHP` int unsigned NOT NULL DEFAULT '1' AFTER `Level`,
ADD COLUMN `BaseMana` int unsigned NOT NULL DEFAULT '1' AFTER `BaseHP`;
UPDATE player_class_stats AS noo
JOIN player_classlevelstats AS ole ON noo.Class = ole.class AND noo.Level = ole.level
SET noo.BaseHP = ole.basehp, noo.BaseMana = ole.basemana;
DROP TABLE IF EXISTS `player_classlevelstats`;

View File

@@ -0,0 +1,5 @@
-- DB update 2023_09_15_01 -> 2023_09_15_02
--
DELETE FROM `creature_template_spell` WHERE `CreatureID` = 21750 AND `Index` = 2;
INSERT INTO `creature_template_spell` (`CreatureID`, `Index`, `Spell`, `VerifiedBuild`) VALUES
(21750, 2, 37469, 0);

View File

@@ -0,0 +1,37 @@
-- DB update 2023_09_15_02 -> 2023_09_17_00
-- modernize https://github.com/azerothcore/azerothcore-wotlk/pull/9912
UPDATE `creature` SET `CreateObject` = 2 WHERE `guid` IN (46438, 46449, 46459, 46461, 46462, 46573, 46586, 46714, 46715, 46912, 46913, 46915, 46916, 46917, 46918, 46919, 46920, 46921, 46922, 46923, 46924, 46925, 46926, 46927, 46928, 46929, 46930, 46931, 46932, 46933, 46934, 46935, 46936, 46937, 46938, 46939, 46940, 46941, 46942, 46943, 46944, 46945, 46946, 46947, 46948, 46949, 46950, 46951, 46952, 46953, 46954, 46955, 46957, 46958, 46971, 46972, 46974, 46981, 46997, 46998, 46999, 47000, 47001, 47002, 47003, 47004, 47006, 47008, 47009, 47010, 47012, 47016, 47017, 47029, 47030, 47031, 47037, 47038, 47039, 47052, 47053, 47054, 47055, 47056, 47057, 47060, 47061, 47062, 47208, 47249, 47262, 47263, 47267, 47268, 47269, 47270, 47271, 47280, 47281, 47282, 47283, 47284, 47285, 47286, 47287, 47288, 47290, 47310, 47312, 47314, 47315, 47316, 47317, 47319, 47320, 47321, 47322, 47324, 47325, 47327, 47328, 47329, 47330, 47331, 47332, 47333, 47334, 47335, 47336, 47337, 47338, 47340, 47341, 47342, 47343, 47344, 47345, 47346, 47350, 47660, 47752, 47863, 47876, 47880, 47883, 47900, 47905, 47907, 47911, 47915, 47921, 47922, 47925, 47926, 47928, 49560, 49561, 49562, 49563, 49564, 49565, 49566, 49567, 49568, 49569, 49570, 49571, 49572, 49610, 49611, 49612, 49613, 49614, 49615, 49616, 49617, 49620, 49621, 49622, 49623, 49626, 49627, 49628, 49629, 49630, 49631, 49632, 49633, 49634, 49635, 49636, 49637, 49638, 49639, 49640, 49641, 49642, 49643, 49644, 49645, 49646, 49648);
UPDATE `creature` SET `CreateObject` = 1 WHERE `guid` IN (47326, 47339, 47289);
-- modernize https://github.com/azerothcore/azerothcore-wotlk/pull/9943
UPDATE `creature` SET `CreateObject` = 2 WHERE `guid` IN (46439, 47917, 47916, 47931, 47913);
UPDATE `creature` SET `CreateObject` = 1 WHERE `guid` IN (46394, 49845, 49855);
-- modernize https://github.com/azerothcore/azerothcore-wotlk/pull/10052
UPDATE `creature` SET `CreateObject` = 2 WHERE `guid` IN (49818, 49850, 49819);
-- modernize https://github.com/azerothcore/azerothcore-wotlk/pull/10282
UPDATE `creature` SET `CreateObject` = 2 WHERE `guid` IN (46446, 46452, 46463, 47372, 47373, 47374, 47375, 47376, 47378, 47519, 47520, 47521, 47522, 47523, 47524, 47525, 47531, 47936, 49882, 49883, 49884, 49889, 49897, 49898, 49899);
-- modernize https://github.com/azerothcore/azerothcore-wotlk/pull/10285
UPDATE `creature` SET `CreateObject` = 2 WHERE `guid` IN (47527, 46431, 46464, 47352, 47355, 47356, 47361, 47363, 47377, 47379, 47380, 47381, 47382, 47383, 47505, 47516, 47517, 47518, 47633, 47647, 47663, 47857, 47919, 47933, 47937, 49860, 49861, 49862, 49865, 49880, 49881, 49900);
-- modernize https://github.com/azerothcore/azerothcore-wotlk/pull/12702
SET @GUID :=88354;
UPDATE `creature` SET `CreateObject` = 2 WHERE `guid` BETWEEN @GUID+0 AND @GUID+96;
-- modernize https://github.com/azerothcore/azerothcore-wotlk/pull/12751
SET @GUID :=94862;
UPDATE `creature` SET `CreateObject` = 2 WHERE `guid` BETWEEN @GUID+0 AND @GUID+72;
-- modernize https://github.com/azerothcore/azerothcore-wotlk/pull/12765
SET @GUID :=72707;
UPDATE `creature` SET `CreateObject` = 2 WHERE `guid` BETWEEN @GUID+0 AND @GUID+45;
-- modernize https://github.com/azerothcore/azerothcore-wotlk/pull/12854
SET @GUID :=132314;
UPDATE `creature` SET `CreateObject` = 2 WHERE `guid` BETWEEN @GUID+0 AND @GUID+83;
UPDATE `creature` SET `CreateObject` = 1 WHERE `guid` IN (@GUID+25, @GUID+38, @GUID+83);

View File

@@ -0,0 +1,3 @@
-- DB update 2023_09_17_00 -> 2023_09_17_01
--
UPDATE `creature_template` SET `flags_extra` = `flags_extra`|256 WHERE (`entry` = 15689);

View File

@@ -0,0 +1,10 @@
-- DB update 2023_09_17_01 -> 2023_09_17_02
--
DELETE FROM `waypoint_data` WHERE `id` = 1354890;
INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_type`, `action`, `action_chance`, `wpguid`) VALUES
(1354890, 1, -11169.11, -1908.5563, 165.76112, NULL, 0, 0, 0, 100, 0),
(1354890, 2, -11184.444, -1887.7946, 158.35687, NULL, 0, 0, 0, 100, 0),
(1354890, 3, -11194.229, -1875.3362, 153.53537, NULL, 0, 0, 0, 100, 0),
(1354890, 4, -11184.444, -1887.7946, 158.35687, NULL, 0, 0, 0, 100, 0),
(1354890, 5, -11169.11, -1908.5563, 165.76112, NULL, 0, 0, 0, 100, 0),
(1354890, 6, -11104.563, -1856.9681, 165.76112, NULL, 0, 0, 0, 100, 0);

View File

@@ -0,0 +1,11 @@
-- DB update 2023_09_17_02 -> 2023_09_17_03
--
DELETE FROM `spell_script_names` WHERE `spell_id` = 30629 AND `ScriptName` = 'spell_magtheridon_debris_target_selector';
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(30629, 'spell_magtheridon_debris_target_selector');
UPDATE `creature_template` SET `unit_flags` = `unit_flags`|33554432, `AIName` = '', `ScriptName` = 'npc_target_trigger' WHERE `entry` = 17516;
DELETE FROM `creature_template_movement` WHERE (`CreatureId` = 17516);
INSERT INTO `creature_template_movement` (`CreatureId`, `Ground`, `Swim`, `Flight`, `Rooted`, `Chase`, `Random`, `InteractionPauseTimer`) VALUES
(17516, 0, 0, 0, 1, 0, 0, 0);

View File

@@ -0,0 +1,3 @@
-- DB update 2023_09_17_03 -> 2023_09_17_04
--
UPDATE `creature_template` SET `flags_extra` = `flags_extra`|256 WHERE (`entry` = 17521);

View File

@@ -0,0 +1,56 @@
-- DB update 2023_09_17_04 -> 2023_09_17_05
--
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 21205);
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
(21205, 0, 0, 0, 0, 0, 100, 0, 0, 5000, 20000, 35000, 0, 0, 11, 38363, 32, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Ravenous Flayer Matriarch - In Combat - Cast \'Gushing Wound\''),
(21205, 0, 1, 0, 0, 0, 100, 0, 0, 3000, 15000, 30000, 0, 0, 11, 36464, 32, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Ravenous Flayer Matriarch - In Combat - Cast \'The Den Mother`s Mark\''),
(21205, 0, 2, 0, 11, 0, 100, 0, 0, 0, 0, 0, 0, 0, 53, 0, 2120500, 1, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Ravenous Flayer Matriarch - On Respawn - Start Patrol Path 2120500'),
(21205, 0, 3, 0, 1, 0, 100, 0, 60000, 180000, 60000, 180000, 0, 0, 80, 2120500, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Ravenous Flayer Matriarch - Out of Combat - Run Script');
DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 2120500);
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
(2120500, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 54, 30000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Ravenous Flayer Matriarch - Actionlist - Pause Waypoint'),
(2120500, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 36691, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Ravenous Flayer Matriarch - Actionlist - Cast \'Serverside - Lay Ravenous Flayer Egg\''),
(2120500, 9, 2, 0, 0, 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, 'Ravenous Flayer Matriarch - Actionlist - Start Random Movement'),
(2120500, 9, 3, 0, 0, 0, 100, 0, 20000, 30000, 0, 0, 0, 0, 65, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Ravenous Flayer Matriarch - Actionlist - Resume Waypoint');
DELETE FROM `creature` WHERE `id1` = 21205 AND `guid` = 85392;
INSERT INTO `creature` (`guid`, `id1`, `map`, `zoneId`, `areaId`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `VerifiedBuild`, `CreateObject`, `Comment`) VALUES
(85392, 21205, 530, 3520, 3520, -2730.536376953125, 1150.532958984375, 63.02117919921875, 3.796946525573730468, 300, 48069, 2, 'Scripted Pathing');
DELETE FROM `creature_addon` WHERE `guid` = 85392;
DELETE FROM `waypoint_data` WHERE `id` = 853920;
DELETE FROM `waypoints` WHERE `entry` = 2120500;
INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES
(2120500, 1 , -2746.24, 1138.448, 54.15343, 'Ravenous Flayer Matriarch'),
(2120500, 2 , -2762.292, 1128.408, 46.53087, 'Ravenous Flayer Matriarch'),
(2120500, 3 , -2729.597, 1104.097, 49.9248, 'Ravenous Flayer Matriarch'),
(2120500, 4 , -2727.395, 1087.502, 48.17071, 'Ravenous Flayer Matriarch'),
(2120500, 5 , -2728.122, 1075.56, 45.84283, 'Ravenous Flayer Matriarch'),
(2120500, 6 , -2710.212, 1072.808, 47.86968, 'Ravenous Flayer Matriarch'),
(2120500, 7 , -2692.166, 1095.084, 51.25895, 'Ravenous Flayer Matriarch'),
(2120500, 8 , -2676.87, 1087.67, 48.08696, 'Ravenous Flayer Matriarch'),
(2120500, 9 , -2651.984, 1074.549, 49.94732, 'Ravenous Flayer Matriarch'),
(2120500, 10, -2634.343, 1060.091, 50.21058, 'Ravenous Flayer Matriarch'),
(2120500, 11, -2619.968, 1053.699, 37.64632, 'Ravenous Flayer Matriarch'),
(2120500, 12, -2598.035, 1047.925, 43.43085, 'Ravenous Flayer Matriarch'),
(2120500, 13, -2571.256, 1035.177, 43.26862, 'Ravenous Flayer Matriarch'),
(2120500, 14, -2563.9033, 1032.3075, 37.875877, 'Ravenous Flayer Matriarch - Decomposed'),
(2120500, 15, -2561.1533, 1031.0575, 33.125877, 'Ravenous Flayer Matriarch - Decomposed'),
(2120500, 16, -2552.076, 1026.859, 37.60755, 'Ravenous Flayer Matriarch'),
(2120500, 17, -2521.413, 1022.475, 42.70882, 'Ravenous Flayer Matriarch'),
(2120500, 18, -2516.2585, 1031.3173, 39.342514, 'Ravenous Flayer Matriarch - Decomposed'),
(2120500, 19, -2508.908, 1042.702, 49.50398, 'Ravenous Flayer Matriarch'),
(2120500, 20, -2502.511, 1057.798, 53.36262, 'Ravenous Flayer Matriarch'),
(2120500, 21, -2518.216, 1084.736, 63.13983, 'Ravenous Flayer Matriarch'),
(2120500, 22, -2519.813, 1103.396, 66.57159, 'Ravenous Flayer Matriarch'),
(2120500, 23, -2526.526, 1123.956, 72.65863, 'Ravenous Flayer Matriarch'),
(2120500, 24, -2555.379, 1145.952, 76.91769, 'Ravenous Flayer Matriarch'),
(2120500, 25, -2574.61, 1140.253, 74.28946, 'Ravenous Flayer Matriarch'),
(2120500, 26, -2581.985, 1117.115, 68.20245, 'Ravenous Flayer Matriarch'),
(2120500, 27, -2606.013, 1116.443, 66.19119, 'Ravenous Flayer Matriarch'),
(2120500, 28, -2631.04, 1119.793, 64.49197, 'Ravenous Flayer Matriarch'),
(2120500, 29, -2661.714, 1119.632, 64.44809, 'Ravenous Flayer Matriarch'),
(2120500, 30, -2698.282, 1122.563, 58.28287, 'Ravenous Flayer Matriarch'),
(2120500, 31, -2731.417, 1141.435, 59.53944, 'Ravenous Flayer Matriarch');

View File

@@ -0,0 +1,3 @@
-- DB update 2023_09_17_05 -> 2023_09_17_06
--
UPDATE `creature_addon` SET `auras` = '' WHERE `guid` = 39059;

View File

@@ -0,0 +1,166 @@
-- DB update 2023_09_17_06 -> 2023_09_17_07
-- https://github.com/TrinityCore/TrinityCore/commit/dbcbfaa6c7834507b0eba291b45b3927d73ac6d0
DELETE FROM `creature_text` WHERE `CreatureID` IN (18318,18319,18320,18321,18322,18323,18325,18326,18327,18328) AND `GroupID` = 0;
INSERT INTO `creature_text` (`CreatureID`,`GroupID`,`ID`,`Text`,`Type`,`Language`,`Probability`,`Emote`,`Duration`,`Sound`,`BroadcastTextId`,`TextRange`,`comment`) VALUES
(18318,0,0,'In Terokk\'s name!',12,0,100,0,0,0,16716,0,'Sethekk Halls Trash'),
(18318,0,1,'Protect the Veil!',12,0,100,0,0,0,16717,0,'Sethekk Halls Trash'),
(18318,0,2,'Darkfire -- avenge us!',12,0,100,0,0,0,16718,0,'Sethekk Halls Trash'),
(18318,0,3,'Ssssekk-sara Rith-nealaak!',12,0,100,0,0,0,16719,0,'Sethekk Halls Trash'),
(18318,0,4,'Arak-ha!',12,0,100,0,0,0,16720,0,'Sethekk Halls Trash'),
(18319,0,0,'In Terokk\'s name!',12,0,100,0,0,0,16716,0,'Sethekk Halls Trash'),
(18319,0,1,'Protect the Veil!',12,0,100,0,0,0,16717,0,'Sethekk Halls Trash'),
(18319,0,2,'Darkfire -- avenge us!',12,0,100,0,0,0,16718,0,'Sethekk Halls Trash'),
(18319,0,3,'Ssssekk-sara Rith-nealaak!',12,0,100,0,0,0,16719,0,'Sethekk Halls Trash'),
(18319,0,4,'Arak-ha!',12,0,100,0,0,0,16720,0,'Sethekk Halls Trash'),
(18320,0,0,'In Terokk\'s name!',12,0,100,0,0,0,16716,0,'Sethekk Halls Trash'),
(18320,0,1,'Protect the Veil!',12,0,100,0,0,0,16717,0,'Sethekk Halls Trash'),
(18320,0,2,'Darkfire -- avenge us!',12,0,100,0,0,0,16718,0,'Sethekk Halls Trash'),
(18320,0,3,'Ssssekk-sara Rith-nealaak!',12,0,100,0,0,0,16719,0,'Sethekk Halls Trash'),
(18320,0,4,'Arak-ha!',12,0,100,0,0,0,16720,0,'Sethekk Halls Trash'),
(18321,0,0,'In Terokk\'s name!',12,0,100,0,0,0,16716,0,'Sethekk Halls Trash'),
(18321,0,1,'Protect the Veil!',12,0,100,0,0,0,16717,0,'Sethekk Halls Trash'),
(18321,0,2,'Darkfire -- avenge us!',12,0,100,0,0,0,16718,0,'Sethekk Halls Trash'),
(18321,0,3,'Ssssekk-sara Rith-nealaak!',12,0,100,0,0,0,16719,0,'Sethekk Halls Trash'),
(18321,0,4,'Arak-ha!',12,0,100,0,0,0,16720,0,'Sethekk Halls Trash'),
(18322,0,0,'In Terokk\'s name!',12,0,100,0,0,0,16716,0,'Sethekk Halls Trash'),
(18322,0,1,'Protect the Veil!',12,0,100,0,0,0,16717,0,'Sethekk Halls Trash'),
(18322,0,2,'Darkfire -- avenge us!',12,0,100,0,0,0,16718,0,'Sethekk Halls Trash'),
(18322,0,3,'Ssssekk-sara Rith-nealaak!',12,0,100,0,0,0,16719,0,'Sethekk Halls Trash'),
(18322,0,4,'Arak-ha!',12,0,100,0,0,0,16720,0,'Sethekk Halls Trash'),
(18323,0,0,'In Terokk\'s name!',12,0,100,0,0,0,16716,0,'Sethekk Halls Trash'),
(18323,0,1,'Protect the Veil!',12,0,100,0,0,0,16717,0,'Sethekk Halls Trash'),
(18323,0,2,'Darkfire -- avenge us!',12,0,100,0,0,0,16718,0,'Sethekk Halls Trash'),
(18323,0,3,'Ssssekk-sara Rith-nealaak!',12,0,100,0,0,0,16719,0,'Sethekk Halls Trash'),
(18323,0,4,'Arak-ha!',12,0,100,0,0,0,16720,0,'Sethekk Halls Trash'),
(18325,0,0,'In Terokk\'s name!',12,0,100,0,0,0,16716,0,'Sethekk Halls Trash'),
(18325,0,1,'Protect the Veil!',12,0,100,0,0,0,16717,0,'Sethekk Halls Trash'),
(18325,0,2,'Darkfire -- avenge us!',12,0,100,0,0,0,16718,0,'Sethekk Halls Trash'),
(18325,0,3,'Ssssekk-sara Rith-nealaak!',12,0,100,0,0,0,16719,0,'Sethekk Halls Trash'),
(18325,0,4,'Arak-ha!',12,0,100,0,0,0,16720,0,'Sethekk Halls Trash'),
(18326,0,0,'In Terokk\'s name!',12,0,100,0,0,0,16716,0,'Sethekk Halls Trash'),
(18326,0,1,'Protect the Veil!',12,0,100,0,0,0,16717,0,'Sethekk Halls Trash'),
(18326,0,2,'Darkfire -- avenge us!',12,0,100,0,0,0,16718,0,'Sethekk Halls Trash'),
(18326,0,3,'Ssssekk-sara Rith-nealaak!',12,0,100,0,0,0,16719,0,'Sethekk Halls Trash'),
(18326,0,4,'Arak-ha!',12,0,100,0,0,0,16720,0,'Sethekk Halls Trash'),
(18327,0,0,'In Terokk\'s name!',12,0,100,0,0,0,16716,0,'Sethekk Halls Trash'),
(18327,0,1,'Protect the Veil!',12,0,100,0,0,0,16717,0,'Sethekk Halls Trash'),
(18327,0,2,'Darkfire -- avenge us!',12,0,100,0,0,0,16718,0,'Sethekk Halls Trash'),
(18327,0,3,'Ssssekk-sara Rith-nealaak!',12,0,100,0,0,0,16719,0,'Sethekk Halls Trash'),
(18327,0,4,'Arak-ha!',12,0,100,0,0,0,16720,0,'Sethekk Halls Trash'),
(18328,0,0,'In Terokk\'s name!',12,0,100,0,0,0,16716,0,'Sethekk Halls Trash'),
(18328,0,1,'Protect the Veil!',12,0,100,0,0,0,16717,0,'Sethekk Halls Trash'),
(18328,0,2,'Darkfire -- avenge us!',12,0,100,0,0,0,16718,0,'Sethekk Halls Trash'),
(18328,0,3,'Ssssekk-sara Rith-nealaak!',12,0,100,0,0,0,16719,0,'Sethekk Halls Trash'),
(18328,0,4,'Arak-ha!',12,0,100,0,0,0,16720,0,'Sethekk Halls Trash');
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (18318,18319,18320,18321,18322,18323,18325,18326,18327,18328,18701,18703,19203,19204,19205,19206,19428,19429,21891,21904) 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
(18318, 0, 0, 0, 4, 0, 15, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Sethekk Initiate - On Aggro - Say Line 0'),
(18318, 0, 1, 0, 0, 0, 100, 0, 5300, 7100, 10800, 18100, 0, 0, 11, 16145, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Sethekk Initiate - In Combat - Cast \'Sunder Armor\''),
(18318, 0, 2, 0, 0, 0, 100, 0, 7400, 15700, 27300, 47100, 0, 0, 11, 33961, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Sethekk Initiate - In Combat - Cast \'Spell Reflection\''),
(18319, 0, 0, 0, 1, 0, 100, 0, 1000, 1000, 30000, 30000, 0, 0, 11, 32689, 32, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Time-Lost Scryer - Out of Combat - Cast \'Arcane Destruction\''),
(18319, 0, 1, 0, 4, 0, 15, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Time-Lost Scryer - On Aggro - Say Line 0'),
(18319, 0, 2, 0, 0, 0, 100, 0, 3100, 5300, 3100, 5300, 0, 0, 11, 32689, 32, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Time-Lost Scryer - In Combat - Cast \'Arcane Destruction\''),
(18319, 0, 3, 0, 0, 0, 100, 2, 7800, 13300, 10400, 17700, 0, 0, 11, 22272, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Time-Lost Scryer - In Combat - Cast \'Arcane Missiles\' (Normal Dungeon)'),
(18319, 0, 4, 0, 0, 0, 100, 4, 7800, 13300, 10400, 17700, 0, 0, 11, 33988, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Time-Lost Scryer - In Combat - Cast \'Arcane Missiles\' (Heroic Dungeon)'),
(18319, 0, 5, 0, 74, 0, 100, 2, 9600, 15700, 9600, 15700, 75, 40, 11, 17843, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Time-Lost Scryer - On Friendly Between 0-75% Health - Cast \'Flash Heal\' (Normal Dungeon)'),
(18319, 0, 6, 0, 74, 0, 100, 4, 9600, 15700, 9600, 15700, 75, 40, 11, 17138, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Time-Lost Scryer - On Friendly Between 0-75% Health - Cast \'Flash Heal\' (Heroic Dungeon)'),
(18319, 0, 7, 0, 74, 0, 100, 2, 13200, 21700, 13200, 21700, 40, 40, 11, 12160, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Time-Lost Scryer - On Friendly Between 0-40% Health - Cast \'Rejuvenation\' (Normal Dungeon)'),
(18319, 0, 8, 0, 74, 0, 100, 4, 13200, 21700, 13200, 21700, 40, 40, 11, 15981, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Time-Lost Scryer - On Friendly Between 0-40% Health - Cast \'Rejuvenation\' (Heroic Dungeon)'),
(18320, 0, 0, 0, 4, 0, 15, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Time-Lost Shadowmage - On Aggro - Say Line 0'),
(18320, 0, 1, 0, 0, 0, 100, 2, 6600, 18600, 9300, 21800, 0, 0, 11, 32675, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Time-Lost Shadowmage - In Combat - Cast \'Shadow Missiles\' (Normal Dungeon)'),
(18320, 0, 2, 0, 0, 0, 100, 4, 6600, 18600, 9300, 21800, 0, 0, 11, 38148, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Time-Lost Shadowmage - In Combat - Cast \'Shadow Missiles\' (Heroic Dungeon)'),
(18320, 0, 3, 0, 0, 0, 100, 2, 4800, 9600, 21700, 33800, 0, 0, 11, 32682, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Time-Lost Shadowmage - In Combat - Cast \'Curse of the Dark Talon\' (Normal Dungeon)'),
(18320, 0, 4, 0, 0, 0, 100, 4, 4800, 9600, 21700, 33800, 0, 0, 11, 38149, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Time-Lost Shadowmage - In Combat - Cast \'Curse of the Dark Talon\' (Heroic Dungeon)'),
(18321, 0, 0, 0, 4, 0, 15, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Sethekk Talon Lord - On Aggro - Say Line 0'),
(18321, 0, 2, 0, 0, 0, 100, 0, 0, 0, 16300, 24300, 0, 0, 11, 32674, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 'Sethekk Talon Lord - In Combat - Cast \'Avenger\'s Shield\''),
(18321, 0, 3, 0, 0, 0, 100, 0, 9300, 16700, 14300, 25400, 0, 0, 11, 32654, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 'Sethekk Talon Lord - In Combat - Cast \'Talon of Justice\''),
(18322, 0, 0, 0, 4, 0, 15, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Sethekk Ravenguard - On Aggro - Say Line 0'),
(18322, 0, 1, 0, 0, 0, 100, 2, 7200, 20500, 10800, 21700, 0, 0, 11, 33964, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Sethekk Ravenguard - In Combat - Cast \'Bloodthirst\' (Normal Dungeon)'),
(18322, 0, 2, 0, 0, 0, 100, 4, 7200, 20500, 10800, 21700, 0, 0, 11, 40423, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Sethekk Ravenguard - In Combat - Cast \'Bloodthirst\' (Heroic Dungeon)'),
(18322, 0, 3, 0, 0, 0, 100, 0, 6100, 17400, 16800, 21700, 0, 0, 11, 32651, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Sethekk Ravenguard - In Combat - Cast \'Howling Screech\''),
(18322, 0, 4, 0, 38, 0, 100, 0, 0, 1, 0, 0, 0, 0, 11, 34970, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Sethekk Ravenguard - On Data Set 0 1 - Cast \'Frenzy\''),
(18322, 0, 5, 0, 6, 0, 100, 0, 0, 0, 0, 0, 0, 0, 45, 0, 1, 0, 0, 0, 0, 19, 18322, 30, 0, 0, 0, 0, 0, 0, 'Sethekk Ravenguard - On Death - Set Data 0 1'),
(18323, 0, 0, 0, 4, 0, 15, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Sethekk Guard - On Aggro - Say Line 0'),
(18323, 0, 1, 0, 0, 0, 100, 0, 3600, 15700, 10900, 22100, 0, 0, 11, 33967, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Sethekk Guard - In Combat - Cast \'Thunderclap\''),
(18325, 0, 0, 0, 4, 0, 15, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Sethekk Prophet - On Aggro - Say Line 0'),
(18325, 0, 1, 0, 0, 0, 100, 0, 8700, 17700, 13200, 24100, 0, 0, 11, 27641, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 'Sethekk Prophet - In Combat - Cast \'Fear\''),
(18325, 0, 2, 0, 6, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 32692, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Sethekk Prophet - On Death - Cast \'Summon Arakkoa Spirit\''),
(18326, 0, 0, 0, 4, 0, 15, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Sethekk Shaman - On Aggro - Say Line 0'),
(18326, 0, 1, 0, 0, 0, 100, 2, 4300, 9100, 7200, 14500, 0, 0, 11, 15501, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 'Sethekk Shaman - In Combat - Cast \'Earth Shock\' (Normal Dungeon)'),
(18326, 0, 2, 0, 0, 0, 100, 4, 4300, 9100, 7200, 14500, 0, 0, 11, 22885, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 'Sethekk Shaman - In Combat - Cast \'Earth Shock\' (Heroic Dungeon)'),
(18326, 0, 3, 0, 0, 0, 100, 0, 7900, 14500, 90000, 90000, 0, 0, 11, 32663, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Sethekk Shaman - In Combat - Cast \'Summon Dark Vortex\''),
(18327, 0, 0, 0, 4, 0, 15, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Time-Lost Controller - On Aggro - Say Line 0'),
(18327, 0, 1, 0, 0, 0, 100, 0, 9100, 24100, 27800, 48300, 0, 0, 11, 32764, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Time-Lost Controller - In Combat - Cast \'Summon Charming Totem\''),
(18327, 0, 2, 0, 0, 0, 100, 0, 8400, 23200, 9700, 32600, 0, 0, 11, 35013, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 'Time-Lost Controller - In Combat - Cast \'Shrink\''),
(18328, 0, 0, 0, 4, 0, 15, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Sethekk Oracle - On Aggro - Say Line 0'),
(18328, 0, 1, 0, 0, 0, 100, 2, 6100, 12100, 18500, 27700, 0, 0, 11, 32690, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Sethekk Oracle - In Combat - Cast \'Arcane Lightning\' (Normal Dungeon)'),
(18328, 0, 2, 0, 0, 0, 100, 4, 1200, 12100, 7200, 13300, 0, 0, 11, 38146, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Sethekk Oracle - In Combat - Cast \'Arcane Lightning\' (Heroic Dungeon)'),
(18328, 0, 3, 0, 0, 0, 100, 0, 2400, 8700, 8400, 19300, 0, 0, 11, 32129, 32, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Sethekk Oracle - In Combat - Cast \'Faerie Fire\''),
(18701, 0, 0, 0, 0, 0, 100, 0, 3600, 7200, 8400, 19300, 0, 0, 11, 12471, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Dark Vortex - In Combat - Cast \'Shadow Bolt\''),
(18703, 0, 0, 1, 54, 0, 100, 0, 0, 0, 0, 0, 0, 0, 38, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Sethekk Spirit - On Just Summoned - Set In Combat With Zone'),
(18703, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 17321, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Sethekk Spirit - On Link - Cast \'Spirit Spawn-in\''),
(18703, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 24051, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Sethekk Spirit - On Link - Cast \'Spirit Burst\''),
(18703, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 116, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Sethekk Spirit - On Link - Set Corpse Delay'),
(18703, 0, 4, 0, 60, 0, 100, 1, 10000, 10000, 0, 0, 0, 0, 37, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Sethekk Spirit - On Update - Kill Self (No Repeat)'),
(19203, 0, 0, 0, 54, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 33610, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Syth Fire Elemental - On Just Summoned - Cast \'Syth A Dummy\''),
(19203, 0, 1, 0, 0, 0, 100, 2, 1600, 7600, 8400, 18100, 0, 0, 11, 33526, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Syth Fire Elemental - In Combat - Cast \'Flame Buffet\' (Normal Dungeon)'),
(19203, 0, 2, 0, 0, 0, 100, 4, 1200, 3600, 6000, 7200, 0, 0, 11, 38141, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Syth Fire Elemental - In Combat - Cast \'Flame Buffet\' (Heroic Dungeon)'),
(19203, 0, 3, 0, 6, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 33621, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Syth Fire Elemental - On Death - Cast \'Syth Dummy\''),
(19204, 0, 0, 0, 54, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 33611, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Syth Frost Elemental - On Just Summoned - Cast \'Syth B Dummy\''),
(19204, 0, 1, 0, 0, 0, 100, 2, 1600, 7600, 8400, 18100, 0, 0, 11, 33528, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Syth Frost Elemental - In Combat - Cast \'Frost Buffet\' (Normal Dungeon)'),
(19204, 0, 2, 0, 0, 0, 100, 4, 1200, 3600, 6000, 7200, 0, 0, 11, 38142, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Syth Frost Elemental - In Combat - Cast \'Frost Buffet\' (Heroic Dungeon)'),
(19204, 0, 3, 0, 6, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 33621, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Syth Frost Elemental - On Death - Cast \'Syth Dummy\''),
(19205, 0, 0, 0, 0, 0, 100, 2, 1600, 7600, 8400, 18100, 0, 0, 11, 33527, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Syth Arcane Elemental - In Combat - Cast \'Arcane Buffet\' (Normal Dungeon)'),
(19205, 0, 1, 0, 0, 0, 100, 4, 1200, 3600, 6000, 7200, 0, 0, 11, 38138, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Syth Arcane Elemental - In Combat - Cast \'Arcane Buffet\' (Heroic Dungeon)'),
(19205, 0, 2, 0, 6, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 33621, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Syth Arcane Elemental - On Death - Cast \'Syth Dummy\''),
(19206, 0, 0, 0, 54, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 33612, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Syth Shadow Elemental - On Just Summoned - Cast \'Syth C Dummy\''),
(19206, 0, 1, 0, 0, 0, 100, 2, 1600, 7600, 8400, 18100, 0, 0, 11, 33529, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Syth Shadow Elemental - In Combat - Cast \'Shadow Buffet\' (Normal Dungeon)'),
(19206, 0, 2, 0, 0, 0, 100, 4, 1200, 3600, 6000, 7200, 0, 0, 11, 38143, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Syth Shadow Elemental - In Combat - Cast \'Shadow Buffet\' (Heroic Dungeon)'),
(19206, 0, 3, 0, 6, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 33621, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Syth Shadow Elemental - On Death - Cast \'Syth Dummy\''),
(19428, 0, 0, 0, 0, 0, 100, 2, 4800, 14500, 13300, 22900, 0, 0, 11, 17503, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Cobalt Serpent - In Combat - Cast \'Frostbolt\' (Normal Dungeon)'),
(19428, 0, 1, 0, 0, 0, 100, 4, 4800, 14500, 13300, 22900, 0, 0, 11, 38238, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Cobalt Serpent - In Combat - Cast \'Frostbolt\' (Heroic Dungeon)'),
(19428, 0, 2, 0, 0, 0, 100, 2, 5600, 22100, 8400, 25400, 0, 0, 11, 38193, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Cobalt Serpent - In Combat - Cast \'Lightning Breath\' (Normal Dungeon)'),
(19428, 0, 3, 0, 0, 0, 100, 4, 3600, 22100, 7200, 14400, 0, 0, 11, 38133, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Cobalt Serpent - In Combat - Cast \'Lightning Breath\' (Heroic Dungeon)'),
(19428, 0, 4, 0, 0, 0, 100, 0, 6200, 21700, 12100, 22800, 0, 0, 11, 38110, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Cobalt Serpent - In Combat - Cast \'Wing Buffet\''),
(19429, 0, 0, 0, 9, 0, 100, 3, 0, 0, 0, 0, 8, 25, 11, 38059, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Avian Darkhawk - Within 8-25 Range - Cast \'Sonic Charge\' (Normal Dungeon) (No Repeat)'),
(19429, 0, 1, 0, 9, 0, 100, 5, 0, 0, 0, 0, 8, 25, 11, 39197, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Avian Darkhawk - Within 8-25 Range - Cast \'Sonic Charge\' (Heroic Dungeon) (No Repeat)'),
(19429, 0, 2, 0, 0, 0, 100, 2, 4800, 13600, 10900, 24100, 0, 0, 11, 32901, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Avian Darkhawk - In Combat - Cast \'Carnivorous Bite\' (Normal Dungeon)'),
(19429, 0, 3, 0, 0, 0, 100, 4, 4800, 13600, 10900, 24100, 0, 0, 11, 39198, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Avian Darkhawk - In Combat - Cast \'Carnivorous Bite\' (Heroic Dungeon)'),
(21891, 0, 0, 0, 0, 0, 100, 0, 4300, 12100, 15600, 19300, 0, 0, 11, 38056, 32, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Avian Ripper - In Combat - Cast \'Flesh Rip\''),
(21904, 0, 0, 0, 9, 0, 100, 3, 0, 0, 0, 0, 8, 25, 11, 38059, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Avian Warhawk - Within 8-25 Range - Cast \'Sonic Charge\' (Normal Dungeon) (No Repeat)'),
(21904, 0, 1, 0, 9, 0, 100, 5, 0, 0, 0, 0, 8, 25, 11, 39197, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Avian Warhawk - Within 8-25 Range - Cast \'Sonic Charge\' (Heroic Dungeon) (No Repeat)'),
(21904, 0, 2, 0, 0, 0, 100, 2, 3800, 11100, 10900, 21700, 0, 0, 11, 32901, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Avian Warhawk - In Combat - Cast \'Carnivorous Bite\' (Normal Dungeon)'),
(21904, 0, 3, 0, 0, 0, 100, 4, 3800, 11100, 10900, 21700, 0, 0, 11, 39198, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Avian Warhawk - In Combat - Cast \'Carnivorous Bite\' (Heroic Dungeon)'),
(21904, 0, 4, 0, 0, 0, 100, 0, 6200, 25500, 12100, 24100, 0, 0, 11, 18144, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Avian Warhawk - In Combat - Cast \'Swoop\'');
-- Ravenguard ImmuneMask
UPDATE `creature_template` SET `mechanic_immune_mask` = 71698 WHERE (`entry` IN (18322, 20696));

View File

@@ -0,0 +1,3 @@
-- DB update 2023_09_17_07 -> 2023_09_17_08
--
UPDATE `creature_template` SET `unit_flags2` = 0 WHERE (`entry` = 15691);

View File

@@ -0,0 +1,5 @@
-- DB update 2023_09_17_08 -> 2023_09_17_09
--
DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_q10190_battery_recharging_blaster';
INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
(34219, 'spell_q10190_battery_recharging_blaster');

View File

@@ -0,0 +1,3 @@
-- DB update 2023_09_17_09 -> 2023_09_17_10
DELETE FROM `game_event_creature` WHERE `guid` IN (245648,245645,245649);
DELETE FROM `creature` WHERE `guid` IN (245648,245645,245649);

View File

@@ -0,0 +1,5 @@
-- DB update 2023_09_17_10 -> 2023_09_17_11
--
DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_malchezaar_enfeeble' AND `spell_id` = 30843;
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(30843, 'spell_malchezaar_enfeeble');

View File

@@ -0,0 +1,184 @@
-- DB update 2023_09_17_11 -> 2023_09_17_12
-- ---------------------creature_template -------------------
-- fairbanks Use gossip_menu_id 7283
-- add gossip menu flag Prevent red errors when the server starts
UPDATE `creature_template` SET `gossip_menu_id` = 7283, `npcflag` = 1
WHERE (`entry` = 4542);
-- ----gossip_menu-----
-- cmangos and vmangos gossip_menuID--
DELETE
FROM `gossip_menu`
WHERE `MenuID` BETWEEN 7268 AND 7284;
INSERT INTO `gossip_menu` (`MenuID`, `TextID`) VALUES
(7268, 8610),
(7269, 8609),
(7270, 8608),
(7271, 8607),
(7272, 8606),
(7273, 8605),
(7274, 8604),
(7275, 8603),
(7276, 8602),
(7277, 8601),
(7278, 8600),
(7279, 8599),
(7280, 8598),
(7281, 8597),
(7282, 8596),
(7283, 8595),
(7284, 8612);
-- -----gossip_menu_option-----
-- Using the MenuID in vmangos and cmangos
DELETE
FROM `gossip_menu_option`
WHERE `MenuID` BETWEEN 7268 AND 7283;
INSERT INTO `gossip_menu_option` (`MenuID`, `OptionID`, `OptionIcon`, `OptionText`, `OptionBroadcastTextID`, `OptionType`, `OptionNpcFlag`, `ActionMenuID`, `ActionPoiID`, `BoxCoded`, `BoxMoney`, `BoxText`, `BoxBroadcastTextID`, `VerifiedBuild`) VALUES
(7268, 0, 0, 'But his son is dead.', 12511, 1, 1, 7284, 0, 0, 0, '', 0, 0),
(7269, 0, 0, 'You tell an incredible tale, Fairbanks. What of the blade? Is it beyond redemption?', 12509, 1, 1, 7268, 0, 0, 0, '', 0, 0),
(7270, 0, 0, 'And you did...', 12507, 1, 1, 7269, 0, 0, 0, '', 0, 0),
(7271, 0, 0, 'You were right, Fairbanks. That is tragic.', 12505, 1, 1, 7270, 0, 0, 0, '', 0, 0),
(7272, 0, 0, 'You mean...', 12503, 1, 1, 7271, 0, 0, 0, '', 0, 0),
(7273, 0, 0, 'Continue please, Fairbanks.', 12501, 1, 1, 7272, 0, 0, 0, '', 0, 0),
(7274, 0, 0, 'And did he?', 12499, 1, 1, 7273, 0, 0, 0, '', 0, 0),
(7275, 0, 0, 'Yet? Yet what??', 12497, 1, 1, 7274, 0, 0, 0, '', 0, 0),
(7276, 0, 0, 'A thousand? For one man?', 12495, 1, 1, 7275, 0, 0, 0, '', 0, 0),
(7277, 0, 0, 'How do you know all of this?', 12493, 1, 1, 7276, 0, 0, 0, '', 0, 0),
(7278, 0, 0, 'You mean...', 12491, 1, 1, 7277, 0, 0, 0, '', 0, 0),
(7279, 0, 0, 'Incredible story. So how did he die?', 12489, 1, 1, 7278, 0, 0, 0, '', 0, 0),
(7280, 0, 0, 'I still do not fully understand.', 12487, 1, 1, 7279, 0, 0, 0, '', 0, 0),
(7281, 0, 0, 'What do you mean?', 12485, 1, 1, 7280, 0, 0, 0, '', 0, 0),
(7282, 0, 0, 'Mograine?', 12483, 1, 1, 7281, 0, 0, 0, '', 0, 0),
(7283, 0, 0, 'Curse? What\'s going ON here, Fairbanks?', 12481, 1, 1, 7282, 0, 0, 0, '', 0, 0);
-- ---------npc_text-----------
-- cmangos npc_text_broa*dcast_text
DELETE FROM `npc_text` WHERE `ID` BETWEEN 8595 AND 8610;
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
(8595, '\r\nAT LAST, the curse IS lifted. Thank you, hero.', NULL, 12480, 0, 1, 0, 1, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL),
(8596, 'You mean, you don\'t know? The sword that you carry on your back - it is known as Ashbringer; named after its original owner.', NULL, 12482, 0, 1, 0, 6, 0, 1, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL),
-- Emoji 273 Holding a weapon in your hand is different from the Blizzard plan
(8597, 'Aye, the Highlord Mograine: A founder of the original order of the Scarlet Crusade. A knight of unwavering faith and purity; Mograine would be betrayed by his own son and slain by Kel\'Thuzad\'s forces inside Stratholme. It is how I ended up here...', NULL, 12484, 0, 1, 0, 273, 0, 1, 0, 1, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL),
(8598, 'It was High General Abbendis, High Inquisitor Isillien, and Highlord Mograine that formed the Crusade. In its infancy, the Crusade was a noble order. The madness and insane zealotry that you see now did not exist. It was not until the one known as the Grand Crusader appeared that the wheels of corruption were set in motion.', NULL, 12486, 0, 1, 0, 1, 0, 1, 0, 1, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL),
-- Emoji 273 Holding a weapon in your hand is different from the Blizzard plan
(8599, 'The Highlord was the lynchpin of the Crusade. Aye, Mograine was called the Ashbringer because of his exploits versus the armies of the Lich King. With only blade and faith, Mograine would walk into whole battalions of undead and emerge unscathed - the ashes of his foes being the only indication that he had been there at all. Do you not understand? The very face of death feared him! It trembled in his presence!', NULL, 12488, 0, 1, 0, 1, 0, 273, 0, 5, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL),
(8600, 'The only way a hero can die, $r: Through tragedy. The Grand Crusader struck a deal with Kel\'Thuzad himself! An ambush would be staged that would result in the death of Mograine. The TYPE of betrayal that could only be a result of the actions of one\'s most trusted and loved companions.', NULL, 12490, 0, 1, 0, 1, 0, 1, 0, 1, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL),
-- Emoji 273 Holding a weapon in your hand is different from the Blizzard plan
(8601, '<High Inquisitor Fairbanks nods.>$B$BAye, the lesser Mograine, the one known as the Scarlet Commander, through - what I suspect - the dealings of the Grand Crusader. He led his father to the ambush like a lamb to the slaughter.', NULL, 12492, 0, 1, 0, 273, 0, 1, 0, 1, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL),
(8602, '<High Inquisitor Fairbanks lifts up his tabard revealing several gruesome scars.>$B$BBecause I was there... I was the Highlord\'s most trusted advisor. I should have known... I felt that something was amiss yet I allowed it TO happen. Would you believe that there were a thousand OR more Scourge?', NULL, 12494, 0, 1, 0, 1, 0, 1, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL),
(8603, 'This was the Ashbringer, fool! AS the Scourge began TO materialize around us, Mograine\'s blade began to glow... to hum... the younger Mograine would take that as a sign to make his escape. They descended upon us with a hunger the likes of which I had never seen. Yet...', NULL, 12496, 0, 1, 0, 5, 0, 1, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL),
(8604, 'It was not enough.$B$B<Fairbanks smirks briefly, lost in a memory.>$B$BA thousand came and a thousand died. By the Light! By the might of Mograine! He would smite them down as fast as they could come. Through the chaos, I noticed that the lesser Mograine was still there, off in the distance. I called to him, " HELP us, Renault! HELP your father, boy!"', NULL, 12498, 0, 1, 0, 1, 0, 22, 0, 22, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL),
-- Emoji 274 Holding a weapon in your hand is different from the Blizzard plan
(8605, '<High Inquisitor Fairbanks shakes his head.>$B$BNo... He stood in the background, watching as the legion of undead descended upon us. Soon after, my powers were exhausted. I was the first to fall... Surely they would tear me limb from limb as I lay there unconscious; but they ignored me completely, focusing all of their attention on the Highlord. ', NULL, 12500, 0, 1, 0, 274, 0, 1, 0, 1, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL),
(8606, 'It was all I could do to feign death as the corpses of the Scourge piled upon me. There was darkness and only the muffled sounds of the battle above me. The clashing of iron, the gnashing and grinding... gruesome, terrible sounds. And then there was silence. He called to me! "Fairbanks! Fairbanks\r\nWHERE are you? Talk TO me Fairbanks!" And then came the sound of incredulousness. The bite of betrayal, $r...', NULL, 12502, 0, 1, 0, 1, 0, 1, 0, 1, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL),
(8607, 'The boy had picked up the Ashbringer and driven it through his father\'s heart AS his back was turned. His LAST words will haunt me forever: "What have you done, Renault? Why would you do this?"', NULL, 12504, 0, 1, 0, 1, 0, 1, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL),
(8608, 'The blade AND Mograine were a singular entity. DO you understand? This act corrupted the blade AND LEAD TO Mograine\'s own corruption as a death knight of Kel\'Thuzad. I swore that if I lived, I would expose the perpetrators of this heinous crime. FOR two days I remained under the rot AND contagion of Scourge - gathering AS much strength AS possible TO ESCAPE the razed city.\n', NULL, 12506, 0, 1, 0, 1, 0, 1, 0, 1, NULL, NULL, 0, 0, 100, 1, 1, 1, 0, 0, 0, NULL, NULL, 0, 0, 100, 1, 1, 1, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL),
(8609, 'Aye, I did. Much TO the dismay of the lesser Mograine, I made my way back TO the Scarlet Monastery. I shouted AND screamed. I told the tale TO ANY that would listen. AND I would be murdered in cold blood FOR my actions, dragged TO this chamber - the dark secret of the order. But SOME did listen... SOME heard my words. Thus was born the Argent Dawn...', NULL, 12508, 0, 1, 0, 1, 0, 1, 0, 1, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL),
(8610, 'I\'m afraid that the blade which you hold in your hands is beyond saving. The hatred runs too deep. But do not lose hope, $c. Where one chapter has ended, a new one begins.$B$BFind his son - a more devout and pious man you may never meet. It is rumored that he is able to build the Ashbringer anew, without requiring the old, tainted blade.', NULL, 12510, 0, 1, 0, 1, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL);
-- Emoji 274 and 397 Holding a weapon in your hand is different from the Blizzard plan
DELETE FROM `npc_text` WHERE `ID`=8612;
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
(8612, '<High Inquisitor Fairbanks shakes his head.>$B$BNo, $r; only one of his sons is dead. The other lives...$B$B<High Inquisitor Fairbanks points to the sky.>$B$BThe Outland... Find him there... ', NULL, 12512, 0, 1, 0, 271, 0, 1, 0, 397, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL);
-- ---------npc_text-----------
-- Get ready to trigger emoticons with SmartAI
-- use smart_ai emto 8597 8599 8601 8605 8612
UPDATE `npc_text` SET `em0_1`=0,`em0_3`=0, `em0_5`=0
WHERE `ID`=8597;
UPDATE `npc_text` SET `em0_1`=0,`em0_3`=0, `em0_5`=0
WHERE `ID`=8599;
UPDATE `npc_text` SET `em0_1`=0,`em0_3`=0, `em0_5`=0
WHERE `ID`=8601;
UPDATE `npc_text` SET `em0_1`=0,`em0_3`=0, `em0_5`=0
WHERE `ID`=8605;
UPDATE `npc_text` SET `em0_1`=0,`em0_3`=0, `em0_5`=0
WHERE `ID`=8612;
-- -------------------SMARTSCRIPT START---------------
-- ---------------------------------------------------
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 4542;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 4542);
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`, `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
(4542, 0, 0, 0, 0, 0, 100, 0, 7000, 11000, 30000, 40000, 0, 11, 8282, 0, 0, 0, 0, 0, 5, 20, 0, 0, 0, 0, 0, 0, 0, 'High Inquisitor Fairbanks - In Combat - Cast Curse of Blood'),
(4542, 0, 1, 0, 0, 0, 100, 0, 6000, 11000, 15000, 20000, 0, 11, 15090, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'High Inquisitor Fairbanks - In Combat - Cast Dispel Magic'),
(4542, 0, 2, 0, 0, 0, 100, 0, 0, 3000, 20000, 20000, 0, 11, 11647, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'High Inquisitor Fairbanks - In Combat - Cast Power Word: Shield'),
(4542, 0, 3, 0, 0, 0, 100, 0, 10000, 15000, 20000, 20000, 0, 11, 12039, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'High Inquisitor Fairbanks - In Combat - Cast Heal'),
(4542, 0, 4, 5, 37, 0, 100, 1, 0, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'fairbanks - initializes -Remove UNIT_NPC_FLAG_GOSSIP'),
(4542, 0, 5, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 40, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'fairbanks - initializes - set_sheath SHEATH_STATE_MELEE'),
-- Do not hold a weapon in your hand when making expressions
(4542, 0, 6, 0, 62, 0, 100, 0, 7282, 0, 0, 0, 0, 80, 454200, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'fairbanks- Gossip_Select 7282 - emto (273 ,1,1)'),
(4542, 0, 7, 0, 62, 0, 100, 0, 7280, 0, 0, 0, 0, 80, 454201, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'fairbanks - Gossip_Select 7280 -emto (1,273,5)'),
(4542, 0, 8, 0, 62, 0, 100, 0, 7278, 0, 0, 0, 0, 80, 454202, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'fairbanks - Gossip_Select 7278 - emto (273,1,1)'),
(4542, 0, 9, 0, 62, 0, 100, 0, 7274, 0, 0, 0, 0, 80, 454203, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'fairbanks - Gossip_Select 7274 - emto (274,1,1)'),
(4542, 0, 10, 0, 62, 0, 100, 0, 7268, 0, 0, 0, 0, 80, 454204, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'fairbanks - Gossip_Select 7268 - emto (274,1,397)');
-- -------- TIMED_ACTIONLIST EMOTE
-- fairbanks - Menuid - 7282 emto(273, 1, 1)
DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 454200);
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`, `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
(454200, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ' Fairbanks - On Script - Set Sheath SHEATH_STATE_UNARMED'),
(454200, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 5, 273, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Fairbanks - On Script - Play Emote 273'),
(454200, 9, 3, 0, 0, 0, 100, 0, 2200, 2200, 0, 0, 0, 40, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ' Fairbanks - On Script - Set Sheath SHEATH_STATE_MELEE'),
(454200, 9, 4, 0, 0, 0, 100, 0, 700, 700, 0, 0, 0, 5, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Fairbanks - On Script - Play Emote 1'),
(454200, 9, 6, 0, 0, 0, 100, 0, 2400, 2400, 0, 0, 0, 5, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Fairbanks - On Script - Play Emote 1');
-- fairbanks - Menuid - 7280 emto(1, 273, 5)
DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 454201);
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`, `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
(454201, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, ' Fairbanks - On Script - Play Emote 1'),
(454201, 9, 1, 0, 0, 0, 100, 0, 2500, 2500, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ' Fairbanks - On Script - Set Sheath SHEATH_STATE_UNARMED'),
(454201, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 5, 273, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, ' Fairbanks - On Script - Play Emote 273'),
(454201, 9, 3, 0, 0, 0, 100, 0, 2400, 2400, 0, 0, 0, 40, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ' Fairbanks - On Script - Set Sheath SHEATH_STATE_MELEE'),
(454201, 9, 5, 0, 0, 0, 100, 0, 700, 700, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ' Fairbanks - On Script - Set Sheath SHEATH_STATE_UNARMED'),
(454201, 9, 6, 0, 0, 0, 100, 0, 200, 200, 0, 0, 0, 5, 5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Fairbanks - On Script - Play Emote 5'),
(454201, 9, 7, 0, 0, 0, 100, 0, 2200, 2200, 0, 0, 0, 40, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ' Fairbanks - On Script - Set Sheath SHEATH_STATE_MELEE');
-- fairbanks - Menuid - 7278 emto(273, 1, 1)
DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 454202);
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`, `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
(454202, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ' Fairbanks - On Script - Set SheathSHEATH_STATE_UNARMED'),
(454202, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 5, 273, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, ' Fairbanks - On Script - Play Emote 273'),
(454202, 9, 2, 0, 0, 0, 100, 0, 2400, 2400, 0, 0, 0, 40, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ' Fairbanks - On Script - Set Sheath SHEATH_STATE_MELEE'),
(454202, 9, 3, 0, 0, 0, 100, 0, 700, 700, 0, 0, 0, 5, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, ' Fairbanks - On Script - Play Emote 1'),
(454202, 9, 4, 0, 0, 0, 100, 0, 2400, 2400, 0, 0, 0, 5, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, ' Fairbanks - On Script - Play Emote 1');
-- fairbanks - Menuid - 7274 emto(274, 1, 1)
DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 454203);
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`, `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
(454203, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ' Fairbanks - On Script - Set Sheath SHEATH_STATE_UNARMED'),
(454203, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 5, 274, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Fairbanks - On Script - Play Emote 274'),
(454203, 9, 2, 0, 0, 0, 100, 0, 3500, 3500, 0, 0, 0, 40, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ' Fairbanks - On Script - Set Sheath SHEATH_STATE_MELEE'),
(454203, 9, 3, 0, 0, 0, 100, 0, 700, 700, 0, 0, 0, 5, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, ' Fairbanks - On Script - Play Emote 1'),
(454203, 9, 4, 0, 0, 0, 100, 0, 2400, 2400, 0, 0, 0, 5, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, ' Fairbanks - On Script - Play Emote 1');
-- fairbanks - Menuid - 7268(END) emto(274, 1, 397)
DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 454204);
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`, `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
(454204, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ' Fairbanks - On Script - Set Sheath SHEATH_STATE_UNARMED'),
(454204, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 5, 274, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, ' Fairbanks - On Script - Play Emote 274'),
(454204, 9, 2, 0, 0, 0, 100, 0, 3500, 3500, 0, 0, 0, 40, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ' Fairbanks - On Script - Set Sheath SHEATH_STATE_MELEE'),
(454204, 9, 3, 0, 0, 0, 100, 0, 700, 700, 0, 0, 0, 5, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, ' Fairbanks - On Script - Play Emote 1'),
(454204, 9, 4, 0, 0, 0, 100, 0, 2500, 2500, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ' Fairbanks - On Script - Set Sheath SHEATH_STATE_UNARMED'),
(454204, 9, 5, 0, 0, 0, 100, 0, 200, 200, 0, 0, 0, 5, 397, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, ' Fairbanks - On Script - Play Emote 397'),
(454204, 9, 6, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 0, 40, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ' Fairbanks - On Script - Set Sheath SHEATH_STATE_MELEE');
-- ----------conditions------------
-- cmangos and vmangos conditions
DELETE
FROM `conditions`
WHERE (`SourceTypeOrReferenceId` = 15) AND (`SourceGroup` = 7283) AND (`SourceEntry` = 0) AND (`SourceId` = 0) AND (`ElseGroup` = 0) AND (`ConditionTypeOrReference` = 2) AND (`ConditionTarget` = 0) AND (`ConditionValue1` = 22691) AND (`ConditionValue2` = 1) AND (`ConditionValue3` = 0);
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
(15, 7283, 0, 0, 0, 2, 0, 22691, 1, 0, 0, 0, 0, '', 'the gossip menu is only displayed if the player inventory "ASHBRINGER"--ASHBRINGER');
-- Clean up 100100 - 100116 data
DELETE
FROM `npc_text`
WHERE `ID` BETWEEN 100100 AND 100116;

View File

@@ -0,0 +1,20 @@
-- DB update 2023_09_17_12 -> 2023_09_17_13
SET @ENTRY := 17433;
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,1,20,0,100,0,9567,0,0,0,80,@ENTRY*100,2,0,0,0,0,1,0,0,0,0,0,0,0,'Vindicator Aalesia - On Quest \'Know Thine Enemy\' Finished - Run Script'),
(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,64,1,0,0,0,0,0,7,0,0,0,0,0,0,0,'Vindicator Aalesia - On Quest \'Know Thine Enemy\' Finished - Store Targetlist');
-- Actionlist SAI
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY*100 AND `source_type`=9;
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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY*100,9,0,0,0,0,100,0,0,0,0,0,83,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Vindicator Aalesia - On Script - Remove Npc Flag Questgiver'),
(@ENTRY*100,9,1,0,0,0,100,0,0,0,0,0,17,69,0,0,0,0,0,1,0,0,0,0,0,0,0,'Vindicator Aalesia - On Script - Set Emote State 69'),
(@ENTRY*100,9,2,0,0,0,100,0,4000,4000,0,0,17,26,0,0,0,0,0,1,0,0,0,0,0,0,0,'Vindicator Aalesia - On Script - Set Emote State 26'),
(@ENTRY*100,9,3,0,0,0,100,0,0,0,0,0,1,0,4000,0,0,0,0,1,0,0,0,0,0,0,0,'Vindicator Aalesia - On Script - Say Line 0'),
(@ENTRY*100,9,4,0,0,0,100,0,4000,4000,0,0,1,1,4000,0,0,0,0,1,0,0,0,0,0,0,0,'Vindicator Aalesia - On Script - Say Line 1'),
(@ENTRY*100,9,5,0,0,0,100,0,4000,4000,0,0,1,2,2000,0,0,0,0,12,1,0,0,0,0,0,0,'Vindicator Aalesia - On Script - Say Line 2'),
(@ENTRY*100,9,6,0,0,0,100,0,2000,2000,0,0,82,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Vindicator Aalesia - On Script - Add Npc Flag Questgiver');
UPDATE `creature_text` SET `Text`='No, this can\'t be... It says this creature willingly became a servant of the Legion. He transforms into a satyr and receives the Legion\'s "blessing."' WHERE `CreatureID`=@ENTRY AND `GroupID` = 2;

View File

@@ -0,0 +1,51 @@
-- DB update 2023_09_17_13 -> 2023_09_18_00
-- Hearts of the Pure Rp -------------
-- The orientation of the initial NPC This is roughly towards the coordinates that need to be sniffed
-- UPDATE `creature` SET `orientation`=4.41048 WHERE `guid`=41833;
-- Use SmatAI
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 5693;
-- Update emoticons
UPDATE `creature_text` SET `Emote`=25 WHERE `CreatureID`=5693 AND `GroupID`=0 AND `ID`=0;-- EMOTE_ONESHOT_POINT
UPDATE `creature_text` SET `Emote`=1 WHERE `CreatureID`=5693 AND `GroupID`=1 AND `ID`=0;-- EMOTE_ONESHOT_TALK
UPDATE `creature_text` SET `Emote`=25 WHERE `CreatureID`=5693 AND `GroupID`=2 AND `ID`=0;-- EMOTE_ONESHOT_POINT
UPDATE `creature_text` SET `Emote`=1 WHERE `CreatureID`=5693 AND `GroupID`=3 AND `ID`=0;-- EMOTE_ONESHOT_TALK
UPDATE `creature_text` SET `Emote`=11 WHERE `CreatureID`=5693 AND `GroupID`=4 AND `ID`=0;-- EMOTE_ONESHOT_LAUGH
-- Update unit_flags Make summoned NPCs unattackable and unselectable
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 5692;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 5692);
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`, `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
(5692, 0, 0, 0, 54, 0, 100, 0, 0, 0, 0, 0, 0, 18, 256|512|33554432, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Comar Villard Projection - Just_Summoned - set_unit_flag');
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 5691;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 5691);
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`, `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
(5691, 0, 0, 0, 54, 0, 100, 0, 0, 0, 0, 0, 0, 18, 256|512|33554432, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Comar Villard Projection - Just_Summoned - set_unit_flag');
-- SmatAI Start-------------------------------------
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 5693;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 5693);
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`, `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
(5693, 0, 0, 0, 19, 0, 100, 0, 1476, 0, 0, 0, 0, 80, 569300, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Godrick Farsan - On Quest \'Hearts of the Pure\' Taken - Run Script'),
(5693, 0, 1, 0, 20, 0, 100, 0, 1472, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Godrick Farsan - reward quest emote');
-- Timed events
DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 569300);
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`, `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
(569300, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 48, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Hearts of the Pure - Godrick Farsan - Set Active'),
(569300, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 83, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Remove Quest Giver npc flags from self.'),
(569300, 9, 2, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 0, 12, 5691, 3, 28000, 0, 0, 0, 8, 0, 0, 0, 0, 1781.16, 61.13, -61.4065, 4.869, 'Hearts of the Pure - Godrick Farsan - Spawn NPC'),
(569300, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 12, 5692, 3, 28000, 0, 0, 0, 8, 0, 0, 0, 0, 1785.77, 60.27, -61.4065, 3.961, 'Hearts of the Pure - Godrick Farsan - Spawn NPC'),
(569300, 9, 4, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 19, 5691, 10, 0, 0, 0, 0, 0, 0, 'Hearts of the Pure - Godrick Farsan - Face NPC'),
(569300, 9, 5, 0, 0, 0, 100, 0, 1500, 1500, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Hearts of the Pure - Godrick Farsan - Talk'),
(569300, 9, 6, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Hearts of the Pure - Godrick Farsan - Talk'),
(569300, 9, 7, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 19, 5692, 5, 0, 0, 0, 0, 0, 0, 'Hearts of the Pure - Godrick Farsan - Face NPC'),
(569300, 9, 8, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Hearts of the Pure - Godrick Farsan - Talk'),
(569300, 9, 9, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 0, 1, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Hearts of the Pure - Godrick Farsan - Talk'),
(569300, 9, 10, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Hearts of the Pure - Godrick Farsan - Face Player'),
(569300, 9, 11, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 0, 1, 4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Hearts of the Pure - Godrick Farsan - Talk'),
(569300, 9, 12, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 48, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Hearts of the Pure - Godrick Farsan - Remove Active'),
(569300, 9, 13, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 82, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Hearts of the Pure - Godrick Farsan - Add NPC Flags');

View File

@@ -0,0 +1,22 @@
-- DB update 2023_09_18_00 -> 2023_09_18_01
--
-- Pathing for Kalecgos Entry: 24844 'TDB FORMAT'
SET @NPC := 24844;
SET @PATH := @NPC * 10;
DELETE FROM `waypoint_data` WHERE `id`=@PATH;
INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES
(@PATH,1,163.9735,-398.0906,2.083333,0,0,0,0,100,0), -- 16:16:43
(@PATH,2,164.3802,-397.1771,2.083333,0,0,0,0,100,0), -- 16:16:43
(@PATH,3,162.7923,-386.1964,15.67094,0,0,0,0,100,0), -- 16:16:43
(@PATH,4,151.5555,-345.349,5.92646,0,0,0,0,100,0), -- 16:16:43
(@PATH,5,162.2416,-299.8032,-5.436685,0,0,0,0,100,0), -- 16:16:43
(@PATH,6,199.7482,-272.3315,-7.186677,0,0,0,0,100,0), -- 16:16:43
(@PATH,7,199.7482,-272.3315,-7.186677,0,0,0,0,100,0), -- 16:16:43
(@PATH,8,199.7482,-272.3315,-7.186677,0.06981317,0,0,0,100,0); -- 16:16:54
-- 0x1C2F2C4920184300001F1D000038BF6E .go 163.9735 -398.0906 2.083333
DELETE FROM `event_scripts` WHERE `id` = 16547;
DELETE FROM `smart_scripts` WHERE `entryorguid` = 24844;
UPDATE `creature_template` SET `AIName` = '', `ScriptName` = 'npc_kalecgos' WHERE `entry` = 24844;
UPDATE `creature_template` SET `AIName` = '' WHERE `entry` = 24848;

View File

@@ -0,0 +1,3 @@
-- DB update 2023_09_18_01 -> 2023_09_18_02
--
UPDATE `smart_scripts` SET `event_param5` = 1, `action_param3` = 1 WHERE `source_type` = 0 AND `entryorguid` IN (28994,29523,28989,28721,28725,28726);

View File

@@ -0,0 +1,5 @@
-- DB update 2023_09_18_02 -> 2023_09_18_03
--
DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 13) AND (`SourceGroup` = 1) AND (`SourceEntry` = 29967);
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
(13, 1, 29967, 0, 0, 31, 0, 3, 17176, 0, 0, 0, 0, '', 'Shade of Aran Blink (29967) can only target Shade of Aran Teleport Center (17176)');

View File

@@ -0,0 +1,15 @@
-- DB update 2023_09_18_03 -> 2023_09_18_04
--
UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = 17265;
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 17265) AND (`source_type` = 0) AND (`id` IN (0));
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `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
(17265, 0, 0, 0, 60, 0, 100, 0, 2400, 8000, 2400, 8000, 0, 11, 30184, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Fiendish Portal - On Update - Cast \'Summon Fiendish Imp\'');
UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = 17267;
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 17267) AND (`source_type` = 0) AND (`id` IN (0));
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `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
(17267, 0, 0, 0, 0, 0, 100, 0, 2000, 2000, 2000, 2200, 0, 11, 30050, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Fiendish Imp - In Combat - Cast \'Firebolt\'');
UPDATE `creature_template` SET `mechanic_immune_mask` = `mechanic_immune_mask`|1 WHERE `entry` = 17229;

View File

@@ -0,0 +1,3 @@
-- DB update 2023_09_18_04 -> 2023_09_19_00
--
UPDATE `creature_template` SET `flags_extra` = `flags_extra`|128 WHERE `entry` IN (17168, 17169, 17170, 17171, 17172, 17173, 17174, 17175, 17176, 17260, 17459);

View File

@@ -0,0 +1,3 @@
-- DB update 2023_09_19_00 -> 2023_09_19_01
--
UPDATE `creature_template` SET `mechanic_immune_mask` = `mechanic_immune_mask`|16 WHERE `entry` = 17543;

View File

@@ -0,0 +1,7 @@
-- DB update 2023_09_19_01 -> 2023_09_20_00
--
UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = 17167;
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 17167) AND (`source_type` = 0) AND (`id` IN (0));
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `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
(17167, 0, 0, 0, 0, 0, 100, 0, 2000, 2000, 2000, 2000, 2000, 11, 31012, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Conjured Elemental - In Combat - Cast \'Water Bolt\'');

View File

@@ -0,0 +1,46 @@
-- DB update 2023_09_20_00 -> 2023_09_20_01
UPDATE `quest_poi` SET `WorldMapAreaId` = 24 WHERE (`QuestID` = 7321) AND (`id` IN (0,1,2,3));
UPDATE `quest_poi` SET `id` = 4, `ObjectiveIndex` = -1 WHERE (`QuestID` = 7321) AND (`id` = 0);
UPDATE `quest_poi` SET `id` = 5, `Flags` = 3 WHERE (`QuestID` = 7321) AND (`id` = 1);
UPDATE `quest_poi` SET `id` = 6, `Flags` = 3 WHERE (`QuestID` = 7321) AND (`id` = 2);
UPDATE `quest_poi` SET `id` = 7, `ObjectiveIndex` = 4, `Flags` = 3 WHERE (`QuestID` = 7321) AND (`id` = 3);
UPDATE `quest_poi_points` SET `Idx1` = 4, `Idx2` = 0, `X` = -852, `Y` = -594 WHERE (`QuestID` = 7321) AND (`Idx1` = 0) AND (`Idx2` = 0);
UPDATE `quest_poi_points` SET `Idx1` = 5, `Idx2` = 0, `X` = -662, `Y` = -755 WHERE (`QuestID` = 7321) AND (`Idx1` = 0) AND (`Idx2` = 1);
UPDATE `quest_poi_points` SET `Idx1` = 5, `Idx2` = 1, `X` = -646, `Y` = -742 WHERE (`QuestID` = 7321) AND (`Idx1` = 0) AND (`Idx2` = 2);
UPDATE `quest_poi_points` SET `Idx1` = 5, `Idx2` = 2, `X` = -657, `Y` = -731 WHERE (`QuestID` = 7321) AND (`Idx1` = 0) AND (`Idx2` = 3);
UPDATE `quest_poi_points` SET `Idx1` = 5, `Idx2` = 3, `X` = -672, `Y` = -723 WHERE (`QuestID` = 7321) AND (`Idx1` = 0) AND (`Idx2` = 4);
UPDATE `quest_poi_points` SET `Idx1` = 5, `Idx2` = 4, `X` = -688, `Y` = -718 WHERE (`QuestID` = 7321) AND (`Idx1` = 0) AND (`Idx2` = 5);
UPDATE `quest_poi_points` SET `Idx1` = 5, `Idx2` = 5, `X` = -714, `Y` = -710 WHERE (`QuestID` = 7321) AND (`Idx1` = 1) AND (`Idx2` = 0);
UPDATE `quest_poi_points` SET `Idx1` = 5, `Idx2` = 6, `X` = -901, `Y` = -658 WHERE (`QuestID` = 7321) AND (`Idx1` = 1) AND (`Idx2` = 1);
UPDATE `quest_poi_points` SET `Idx1` = 5, `Idx2` = 7, `X` = -919, `Y` = -668 WHERE (`QuestID` = 7321) AND (`Idx1` = 1) AND (`Idx2` = 2);
UPDATE `quest_poi_points` SET `Idx1` = 5, `Idx2` = 8, `X` = -917, `Y` = -676 WHERE (`QuestID` = 7321) AND (`Idx1` = 2) AND (`Idx2` = 0);
UPDATE `quest_poi_points` SET `Idx1` = 5, `Idx2` = 9, `X` = -904, `Y` = -689 WHERE (`QuestID` = 7321) AND (`Idx1` = 2) AND (`Idx2` = 1);
UPDATE `quest_poi_points` SET `Idx1` = 5, `Idx2` = 10, `X` = -875, `Y` = -716 WHERE (`QuestID` = 7321) AND (`Idx1` = 2) AND (`Idx2` = 2);
UPDATE `quest_poi_points` SET `Idx1` = 5, `Idx2` = 11, `X` = -854, `Y` = -726 WHERE (`QuestID` = 7321) AND (`Idx1` = 2) AND (`Idx2` = 3);
UPDATE `quest_poi_points` SET `Idx1` = 6, `Idx2` = 0, `X` = -480, `Y` = -989 WHERE (`QuestID` = 7321) AND (`Idx1` = 2) AND (`Idx2` = 4);
UPDATE `quest_poi_points` SET `Idx1` = 6, `Idx2` = 1, `X` = -475, `Y` = -963 WHERE (`QuestID` = 7321) AND (`Idx1` = 2) AND (`Idx2` = 5);
UPDATE `quest_poi_points` SET `Idx1` = 6, `Idx2` = 2, `X` = -480, `Y` = -936 WHERE (`QuestID` = 7321) AND (`Idx1` = 2) AND (`Idx2` = 6);
UPDATE `quest_poi_points` SET `Idx1` = 6, `Idx2` = 3, `X` = -543, `Y` = -781 WHERE (`QuestID` = 7321) AND (`Idx1` = 2) AND (`Idx2` = 7);
UPDATE `quest_poi_points` SET `Idx1` = 6, `Idx2` = 4, `X` = -557, `Y` = -763 WHERE (`QuestID` = 7321) AND (`Idx1` = 3) AND (`Idx2` = 0);
DELETE FROM `quest_poi_points` WHERE `QuestID` = 7321 AND `Idx1` = 6 AND `Idx2` IN (5,6,7,8,9,10,11);
DELETE FROM `quest_poi_points` WHERE `QuestID` = 7321 AND `Idx1` = 7 AND `Idx2` IN (0,1,2,3,4,5,6,7,8,9,10,11);
INSERT INTO `quest_poi_points` (`QuestID`, `Idx1`, `Idx2`, `X`, `Y`, `VerifiedBuild`) VALUES
(7321, 6, 5, -575, -742, 0),
(7321, 6, 6, -596, -747, 0),
(7321, 6, 7, -614, -784, 0),
(7321, 6, 8, -609, -797, 0),
(7321, 6, 9, -549, -926, 0),
(7321, 6, 10, -528, -965, 0),
(7321, 6, 11, -512, -984, 0),
(7321, 7, 0, -238, -1121, 0),
(7321, 7, 1, -254, -1107, 0),
(7321, 7, 2, -380, -1010, 0),
(7321, 7, 3, -415, -986, 0),
(7321, 7, 4, -428, -981, 0),
(7321, 7, 5, -438, -1021, 0),
(7321, 7, 6, -423, -1042, 0),
(7321, 7, 7, -373, -1084, 0),
(7321, 7, 8, -349, -1099, 0),
(7321, 7, 9, -296, -1128, 0),
(7321, 7, 10, -286, -1131, 0),
(7321, 7, 11, -249, -1142, 0);

View File

@@ -0,0 +1,68 @@
-- DB update 2023_09_20_01 -> 2023_09_20_02
-- Sir Wendell's Grave smart ai
SET @ENTRY := 194537;
DELETE FROM `smart_scripts` WHERE `source_type` = 1 AND `entryOrGuid` = @ENTRY;
UPDATE `gameobject_template` SET `AIName` = 'SmartGameObjectAI' WHERE `entry` = @ENTRY;
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`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(@ENTRY, 1, 0, 0, 71, 0, 100, 0, 21077, 0, 0, 0, 12, 33439, 3, 19000, 0, 0, 0, 8, 0, 0, 0, 8461.727, 468.7472, 596.2335, 4.729842, 'Sir Wendell\'s Grave - On Event 21077 Inform - Summon Creature \'Sir Wendell Balfour\'');
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 22 AND `SourceEntry` = 194537 AND `SourceId` = 1;
-- Sir Wendell Balfour smart ai
SET @ENTRY := 33439;
DELETE FROM `smart_scripts` WHERE `source_type` = 0 AND `entryOrGuid` = @ENTRY;
UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = @ENTRY;
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`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(@ENTRY, 0, 0, 1, 54, 0, 100, 0, 0, 0, 0, 0, 11, 51195, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Sir Wendell Balfour - On Just Summoned - Cast \'Cosmetic - Low Poly Fire\''),
(@ENTRY, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 75, 29266, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Sir Wendell Balfour - On Just Summoned - Add Aura \'Permanent Feign Death\''),
(@ENTRY, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 67, 1, 200, 200, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Sir Wendell Balfour - On Just Summoned - Create Timed Event'),
(@ENTRY, 0, 3, 0, 59, 0, 100, 0, 1, 0, 0, 0, 11, 10389, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Sir Wendell Balfour - On Timed Event 1 Triggered - Cast \'Spawn Smoke\'');
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 22 AND `SourceEntry` = 33439 AND `SourceId` = 0;
-- Lorien's Grave smart ai
SET @ENTRY := 194539;
DELETE FROM `smart_scripts` WHERE `source_type` = 1 AND `entryOrGuid` = @ENTRY;
UPDATE `gameobject_template` SET `AIName` = 'SmartGameObjectAI' WHERE `entry` = @ENTRY;
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`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(@ENTRY, 1, 0, 0, 71, 0, 100, 0, 21075, 0, 0, 0, 12, 33455, 3, 19000, 0, 0, 0, 8, 0, 0, 0, 8441.864, 452.88184, 596.1657, 1.850049, 'Lorien\'s Grave - On Event 21075 Inform - Summon Creature \'Lorien Sunblaze\'');
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 22 AND `SourceEntry` = 194539 AND `SourceId` = 1;
-- Lorien Sunblaze smart ai
SET @ENTRY := 33455;
DELETE FROM `smart_scripts` WHERE `source_type` = 0 AND `entryOrGuid` = @ENTRY;
UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = @ENTRY;
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`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(@ENTRY, 0, 0, 1, 54, 0, 100, 0, 0, 0, 0, 0, 11, 41290, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Lorien Sunblaze - On Just Summoned - Cast \'Disease Cloud\''),
(@ENTRY, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 11, 29266, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Lorien Sunblaze - On Just Summoned - Cast \'Permanent Feign Death\''),
(@ENTRY, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 11, 61894, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Lorien Sunblaze - On Just Summoned - Cast \'Spirit Particles (green - Base)\'');
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 22 AND `SourceEntry` = 33455 AND `SourceId` = 0;
-- Connall's Grave smart ai
SET @ENTRY := 194538;
DELETE FROM `smart_scripts` WHERE `source_type` = 1 AND `entryOrGuid` = @ENTRY;
UPDATE `gameobject_template` SET `AIName` = 'SmartGameObjectAI' WHERE `entry` = @ENTRY;
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`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(@ENTRY, 1, 0, 0, 71, 0, 100, 0, 21076, 0, 0, 0, 12, 33457, 3, 19000, 0, 0, 0, 8, 0, 0, 0, 8471.436, 452.21744, 596.1551, 4.7822022, 'Connall\'s Grave - On Event 21076 Inform - Summon Creature \'Conall Irongrip\'');
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 22 AND `SourceEntry` = 194538 AND `SourceId` = 1;
-- Conall Irongrip smart ai
SET @ENTRY := 33457;
DELETE FROM `smart_scripts` WHERE `source_type` = 0 AND `entryOrGuid` = @ENTRY;
UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = @ENTRY;
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`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(@ENTRY, 0, 0, 0, 54, 0, 100, 0, 0, 0, 0, 0, 11, 29266, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Conall Irongrip - On Just Summoned - Cast \'Permanent Feign Death\'');
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 22 AND `SourceEntry` = 33457 AND `SourceId` = 0;

View File

@@ -0,0 +1,2 @@
-- DB update 2023_09_20_02 -> 2023_09_20_03
UPDATE `quest_offer_reward` SET `RewardText` = 'You brought the picks. Great! I\'ll get these to my mining students. I\'m sure they\'re eager to use them on the ore deposits of Loch Modan.$B$BThank you for your help, $N. I am in your debt, but I hope this money will at least cover your travel costs.' WHERE (`ID` = 6392);

View File

@@ -0,0 +1,14 @@
-- DB update 2023_09_20_03 -> 2023_09_20_04
DELETE FROM `creature_text` WHERE `CreatureID` = 16833;
INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
(16833, 0, 0, 'No! Not... Sedai! The orcs must pay!', 12, 0, 100, 0, 0, 0, 13997, 0, 'Makuru // Makuru');
-- Anchorite Obadei smart ai
SET @ENTRY := 16834;
DELETE FROM `smart_scripts` WHERE `source_type` = 0 AND `entryOrGuid` = @ENTRY;
UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = @ENTRY;
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`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(@ENTRY, 0, 0, 0, 20, 0, 100, 0, 9423, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 10, 57906, 16833, 0, 0, 0, 0, 0, 'Anchorite Obadei - On Quest \'Return to Obadei\' Finished - Say Line 0');
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 22 AND `SourceEntry` = 16834 AND `SourceId` = 0;

View File

@@ -0,0 +1,7 @@
-- DB update 2023_09_20_04 -> 2023_09_20_05
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 21246;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 21246);
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
(21246, 0, 0, 0, 0, 0, 100, 0, 4850, 19400, 10900, 14500, 0, 0, 11, 38461, 0, 0, 0, 0, 0, 5, 25, 0, 0, 0, 0, 0, 0, 0, 'Serpentshrine Sporebat - In Combat - Cast Sonic Charge'),
(21246, 0, 1, 0, 0, 0, 100, 0, 0, 0, 24000, 36800, 0, 0, 11, 38471, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Serpentshrine Sporebat - In Combat - Cast \'Spore Burst\'');

View File

@@ -0,0 +1,33 @@
-- DB update 2023_09_20_05 -> 2023_09_20_06
-- Summoned Succubus
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 5677;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 5677);
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
(5677, 0, 0, 0, 54, 0, 100, 513, 0, 0, 0, 0, 0, 0, 80, 567700, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Summoned Succubus - On Just Summoned - Run Script (No Repeat)'),
(5677, 0, 1, 0, 0, 0, 100, 0, 3000, 5000, 7000, 11000, 0, 0, 11, 16583, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Summoned Succubus - In Combat - Cast \'Shadow Shock\''),
(5677, 0, 2, 0, 21, 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, 'Summoned Succubus - On Reached Home - Despawn In 1000 ms');
DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 567700);
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
(567700, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 2, 35, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Summoned Succubus - Actionlist - Set Faction 35'),
(567700, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 7741, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Summoned Succubus - Actionlist - Cast \'Summoned Demon\''),
(567700, 9, 2, 0, 0, 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, 'Summoned Succubus - Actionlist - Say Line 0'),
(567700, 9, 3, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 0, 0, 2, 14, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Summoned Succubus - Actionlist - Set Faction 14'),
(567700, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Summoned Succubus - Actionlist - Start Attacking');
-- Summoned Voidwalker
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 5676;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 5676);
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
(5676, 0, 0, 0, 54, 0, 100, 1, 0, 0, 0, 0, 0, 0, 80, 567600, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Summoned Voidwalker - On Just Summoned - Run Script (No Repeat)'),
(5676, 0, 1, 0, 2, 0, 100, 1, 0, 30, 0, 0, 0, 0, 11, 7750, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Summoned Voidwalker - Between 0-30% Health - Cast \'Consuming Rage\' (No Repeat)'),
(5676, 0, 2, 0, 4, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Summoned Voidwalker - On Aggro - Say Line 1'),
(5676, 0, 3, 0, 21, 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, 'Summoned Voidwalker - On Reached Home - Despawn In 1000 ms');
DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 567600);
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
(567600, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 2, 35, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Summoned Voidwalker - Actionlist - Set Faction 35'),
(567600, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 7741, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Summoned Voidwalker - Actionlist - Cast \'Summoned Demon\''),
(567600, 9, 2, 0, 0, 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, 'Summoned Voidwalker - Actionlist - Say Line 0'),
(567600, 9, 3, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 0, 0, 2, 14, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Summoned Voidwalker - Actionlist - Set Faction 14'),
(567600, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Summoned Voidwalker - Actionlist - Start Attacking');

View File

@@ -0,0 +1,72 @@
-- DB update 2023_09_20_06 -> 2023_09_20_07
SET @Agility := 3;
SET @Strength := 4;
SET @Intellect := 5;
SET @Spirit := 6;
SET @Stamina := 7;
SET @Crit := 32;
SET @Resilience := 35;
SET @AttackPower := 38;
SET @MP5 := 43;
Set @SpellPower := 45;
-- General's Ornamented Bracers 32983 113
UPDATE `item_template` SET `StatsCount` = 5, `stat_type1` = @Stamina, `stat_value1` = 22, `stat_type2` = @Intellect, `stat_value2` = 12, `stat_type3` = @SpellPower, `stat_value3` = 20, `stat_type4` = @Crit, `stat_value4` = 14, `stat_type5` = @Resilience, `stat_value5` = 13, `armor` = 624, `AllowableClass` = 3 WHERE `entry` = 32983;
-- Marshal's Ornamented Bracers 32986 113
UPDATE `item_template` SET `StatsCount` = 5, `stat_type1` = @Stamina, `stat_value1` = 22, `stat_type2` = @Intellect, `stat_value2` = 12, `stat_type3` = @SpellPower, `stat_value3` = 20, `stat_type4` = @Crit, `stat_value4` = 14, `stat_type5` = @Resilience, `stat_value5` = 13, `armor` = 624, `AllowableClass` = 3 WHERE `entry` = 32986;
-- General's Ringmail Bracers 32991 113
UPDATE `item_template` SET `StatsCount` = 5, `stat_type1` = @Stamina, `stat_value1` = 22, `stat_type2` = @Intellect, `stat_value2` = 12, `stat_type3` = @SpellPower, `stat_value3` = 20, `stat_type4` = @Crit, `stat_value4` = 14, `stat_type5` = @Resilience, `stat_value5` = 13, `armor` = 349, `AllowableClass` = 68 WHERE `entry` = 32991;
-- Marshal's Ringmail Bracers 32994 113
UPDATE `item_template` SET `StatsCount` = 5, `stat_type1` = @Stamina, `stat_value1` = 22, `stat_type2` = @Intellect, `stat_value2` = 12, `stat_type3` = @SpellPower, `stat_value3` = 20, `stat_type4` = @Crit, `stat_value4` = 14, `stat_type5` = @Resilience, `stat_value5` = 13, `armor` = 349, `AllowableClass` = 68 WHERE `entry` = 32994;
-- General's Mooncloth Cuffs 32973 113
UPDATE `item_template` SET `StatsCount` = 4, `stat_type1` = @Stamina, `stat_value1` = 25, `stat_type2` = @Intellect, `stat_value2` = 14, `stat_type3` = @SpellPower, `stat_value3` = 22, `stat_type4` = @Resilience, `stat_value4` = 14, `armor` = 84, `AllowableClass` = 400 WHERE `entry` = 32973;
-- Marshal's Mooncloth Cuffs 32977 113
UPDATE `item_template` SET `StatsCount` = 4, `stat_type1` = @Stamina, `stat_value1` = 25, `stat_type2` = @Intellect, `stat_value2` = 14, `stat_type3` = @SpellPower, `stat_value3` = 22, `stat_type4` = @Resilience, `stat_value4` = 14, `armor` = 84, `AllowableClass` = 400 WHERE `entry` = 32977;
-- General's Plate Greaves Tier 2 30491 123
UPDATE `item_template` SET `StatsCount` = 4, `stat_type1` = @Strength, `stat_value1` = 27, `stat_type2` = @Stamina, `stat_value2` = 40, `stat_type3` = @Crit, `stat_value3` = 27, `stat_type4` = @Resilience, `stat_value4` = 27, `armor` = 1063, `AllowableClass` = 3 WHERE `entry` = 30491;
-- General's Ornamented Belt 32982 123
UPDATE `item_template` SET `StatsCount` = 5, `stat_type1` = @Stamina, `stat_value1` = 34, `stat_type2` = @Intellect, `stat_value2` = 23, `stat_type3` = @SpellPower, `stat_value3` = 28, `stat_type4` = @Crit, `stat_value4` = 23, `stat_type5` = @Resilience, `stat_value5` = 24, `armor` = 870, `AllowableClass` = 3 WHERE `entry` = 32982;
-- General's Ornamented Greaves 32984 123
UPDATE `item_template` SET `StatsCount` = 5, `stat_type1` = @Stamina, `stat_value1` = 34, `stat_type2` = @Intellect, `stat_value2` = 23, `stat_type3` = @SpellPower, `stat_value3` = 28, `stat_type4` = @Crit, `stat_value4` = 23, `stat_type5` = @Resilience, `stat_value5` = 24, `armor` = 1063, `AllowableClass` = 3 WHERE `entry` = 32984;
-- Marshal's Ornamented Belt 32985 123
UPDATE `item_template` SET `StatsCount` = 5, `stat_type1` = @Stamina, `stat_value1` = 34, `stat_type2` = @Intellect, `stat_value2` = 23, `stat_type3` = @SpellPower, `stat_value3` = 28, `stat_type4` = @Crit, `stat_value4` = 23, `stat_type5` = @Resilience, `stat_value5` = 24, `armor` = 870, `AllowableClass` = 3 WHERE `entry` = 32985;
-- Marshal's Ornamented Greaves 32987 123
UPDATE `item_template` SET `StatsCount` = 5, `stat_type1` = @Stamina, `stat_value1` = 34, `stat_type2` = @Intellect, `stat_value2` = 23, `stat_type3` = @SpellPower, `stat_value3` = 28, `stat_type4` = @Crit, `stat_value4` = 23, `stat_type5` = @Resilience, `stat_value5` = 24, `armor` = 1063, `AllowableClass` = 3 WHERE `entry` = 32987;
-- General's Ringmail Girdle 32992 123
UPDATE `item_template` SET `StatsCount` = 5, `stat_type1` = @Stamina, `stat_value1` = 34, `stat_type2` = @Intellect, `stat_value2` = 23, `stat_type3` = @SpellPower, `stat_value3` = 28, `stat_type4` = @Crit, `stat_value4` = 24, `stat_type5` = @Resilience, `stat_value5` = 23, `armor` = 487, `AllowableClass` = 68 WHERE `entry` = 32992;
-- General's Ringmail Sabatons 32993 123
UPDATE `item_template` SET `StatsCount` = 5, `stat_type1` = @Stamina, `stat_value1` = 34, `stat_type2` = @Intellect, `stat_value2` = 23, `stat_type3` = @SpellPower, `stat_value3` = 28, `stat_type4` = @Crit, `stat_value4` = 24, `stat_type5` = @Resilience, `stat_value5` = 23, `armor` = 595, `AllowableClass` = 68 WHERE `entry` = 32993;
-- Marshal's Ringmail Girdle 32995 123
UPDATE `item_template` SET `StatsCount` = 5, `stat_type1` = @Stamina, `stat_value1` = 34, `stat_type2` = @Intellect, `stat_value2` = 23, `stat_type3` = @SpellPower, `stat_value3` = 28, `stat_type4` = @Crit, `stat_value4` = 24, `stat_type5` = @Resilience, `stat_value5` = 23, `armor` = 487, `AllowableClass` = 68 WHERE `entry` = 32995;
-- Marshal's Ringmail Sabatons 32996 123
UPDATE `item_template` SET `StatsCount` = 5, `stat_type1` = @Stamina, `stat_value1` = 34, `stat_type2` = @Intellect, `stat_value2` = 23, `stat_type3` = @SpellPower, `stat_value3` = 28, `stat_type4` = @Crit, `stat_value4` = 24, `stat_type5` = @Resilience, `stat_value5` = 23, `armor` = 595, `AllowableClass` = 68 WHERE `entry` = 32996;
-- General's Mooncloth Belt 32974 123
UPDATE `item_template` SET `StatsCount` = 4, `stat_type1` = @Stamina, `stat_value1` = 39, `stat_type2` = @Intellect, `stat_value2` = 27, `stat_type3` = @SpellPower, `stat_value3` = 32, `stat_type4` = @Resilience, `stat_value4` = 27, `armor` = 117, `AllowableClass` = 400 WHERE `entry` = 32974;
-- General's Mooncloth Slippers 32975 123
UPDATE `item_template` SET `StatsCount` = 4, `stat_type1` = @Stamina, `stat_value1` = 40, `stat_type2` = @Intellect, `stat_value2` = 27, `stat_type3` = @SpellPower, `stat_value3` = 32, `stat_type4` = @Resilience, `stat_value4` = 27, `armor` = 142, `AllowableClass` = 400 WHERE `entry` = 32975;
-- Marshal's Mooncloth Belt 32976 123
UPDATE `item_template` SET `StatsCount` = 4, `stat_type1` = @Stamina, `stat_value1` = 39, `stat_type2` = @Intellect, `stat_value2` = 27, `stat_type3` = @SpellPower, `stat_value3` = 32, `stat_type4` = @Resilience, `stat_value4` = 27, `armor` = 117, `AllowableClass` = 400 WHERE `entry` = 32976;
-- Marshal's Mooncloth Slippers 32978 123
UPDATE `item_template` SET `StatsCount` = 4, `stat_type1` = @Stamina, `stat_value1` = 40, `stat_type2` = @Intellect, `stat_value2` = 27, `stat_type3` = @SpellPower, `stat_value3` = 32, `stat_type4` = @Resilience, `stat_value4` = 27, `armor` = 142, `AllowableClass` = 400 WHERE `entry` = 32978;
UPDATE `item_template` SET `Flags` = `Flags`|32768, `FlagsExtra` = `FlagsExtra`&~8192, `BuyPrice` = 0, `SellPrice` = 0, `AllowableRace` = 32767, `VerifiedBuild` = 0 WHERE `entry` IN (
32983, -- General's Ornamented Bracers
32986, -- Marshal's Ornamented Bracers
32991, -- General's Ringmail Bracers
32994, -- Marshal's Ringmail Bracers
32973, -- General's Mooncloth Cuffs
32977, -- Marshal's Mooncloth Cuffs
30491, -- General's Plate Greaves Tier 2
32982, -- General's Ornamented Belt
32984, -- General's Ornamented Greaves
32985, -- Marshal's Ornamented Belt
32987, -- Marshal's Ornamented Greaves
32992, -- General's Ringmail Girdle
32993, -- General's Ringmail Sabatons
32995, -- Marshal's Ringmail Girdle
32996, -- Marshal's Ringmail Sabatons
32974, -- General's Mooncloth Belt
32975, -- General's Mooncloth Slippers
32976, -- Marshal's Mooncloth Belt
32978 -- Marshal's Mooncloth Slippers
);

View File

@@ -1 +0,0 @@
deno*

View File

@@ -1,3 +0,0 @@
# DENO
This folder is empty and needed to host the deno binaries automatically downloaded by the ./acore.sh dahsboard

View File

@@ -575,7 +575,7 @@ if(OPENSSL_FOUND)
include(EnsureVersion)
ENSURE_VERSION("${OPENSSL_EXPECTED_VERSION}" "${OPENSSL_VERSION}" OPENSSL_VERSION_OK)
if(NOT OPENSSL_VERSION_OK)
message(FATAL_ERROR "TrinityCore needs OpenSSL version ${OPENSSL_EXPECTED_VERSION} but found too new version ${OPENSSL_VERSION}. TrinityCore needs OpenSSL 1.0.x or 1.1.x to work properly. If you still have problems please install OpenSSL 1.0.x if you still have problems search on forum for TCE00022")
message(FATAL_ERROR "AzerothCore needs OpenSSL version ${OPENSSL_EXPECTED_VERSION} but found too new version ${OPENSSL_VERSION}. AzerothCore needs OpenSSL 1.0.x or 1.1.x to work properly. If you still have problems please install OpenSSL 1.0.x if you still have problems search on forum for TCE00022")
endif()
if(NOT TARGET OpenSSL::Crypto AND

View File

@@ -1,6 +1,18 @@
/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-AGPL3
* Copyright (C) 2008+ TrinityCore <http://www.trinitycore.org/>
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published by the
* Free Software Foundation; either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _MAPDEFINES_H

View File

@@ -41,13 +41,6 @@
#include <unistd.h>
#endif
#if AC_COMPILER == AC_COMPILER_MICROSOFT
#define atoll _atoi64
#define llabs _abs64
#else
#define stricmp strcasecmp
#endif
#define STRINGIZE(a) #a
#define MAX_NETCLIENT_PACKET_SIZE (32767 - 1) // Client hardcap: int16 with trailing zero space otherwise crash on memory free

View File

@@ -32,6 +32,7 @@ namespace
std::vector<std::string> _additonalFiles;
std::vector<std::string> _args;
std::unordered_map<std::string /*name*/, std::string /*value*/> _configOptions;
std::unordered_map<std::string /*name*/, std::string /*value*/> _envVarCache;
std::mutex _configLock;
// Check system configs like *server.conf*
@@ -39,8 +40,9 @@ namespace
{
size_t foundAuth = fileName.find("authserver.conf");
size_t foundWorld = fileName.find("worldserver.conf");
size_t foundImport = fileName.find("dbimport.conf");
return foundAuth != std::string_view::npos || foundWorld != std::string_view::npos;
return foundAuth != std::string_view::npos || foundWorld != std::string_view::npos || foundImport != std::string_view::npos;
}
// Check logging system configs like Appender.* and Logger.*
@@ -119,7 +121,7 @@ namespace
auto const& itr = fileConfigs.find(confOption);
if (itr != fileConfigs.end())
{
PrintError(file, "> Config::LoadFile: Dublicate key name '{}' in config file '{}'", confOption, file);
PrintError(file, "> Config::LoadFile: Duplicate key name '{}' in config file '{}'", confOption, file);
return true;
}
@@ -282,9 +284,14 @@ namespace
return result;
}
std::string GetEnvVarName(std::string const& configName)
{
return "AC_" + IniKeyToEnvVarKey(configName);
}
Optional<std::string> EnvVarForIniKey(std::string const& key)
{
std::string envKey = "AC_" + IniKeyToEnvVarKey(key);
std::string envKey = GetEnvVarName(key);
char* val = std::getenv(envKey.c_str());
if (!val)
return std::nullopt;
@@ -329,6 +336,29 @@ bool ConfigMgr::Reload()
return true;
}
// Check the _envVarCache if the env var is there
// if not, check the env for the value
Optional<std::string> GetEnvFromCache(std::string const& configName, std::string const& envVarName)
{
auto foundInCache = _envVarCache.find(envVarName);
Optional<std::string> foundInEnv;
// If it's not in the cache
if (foundInCache == _envVarCache.end())
{
// Check the env itself
foundInEnv = EnvVarForIniKey(configName);
if (foundInEnv)
{
// If it's found in the env, put it in the cache
_envVarCache.emplace(envVarName, *foundInEnv);
}
// Return the result of checking env
return foundInEnv;
}
return foundInCache->second;
}
std::vector<std::string> ConfigMgr::OverrideWithEnvVariablesIfAny()
{
std::lock_guard<std::mutex> lock(_configLock);
@@ -356,29 +386,31 @@ template<class T>
T ConfigMgr::GetValueDefault(std::string const& name, T const& def, bool showLogs /*= true*/) const
{
std::string strValue;
auto const& itr = _configOptions.find(name);
if (itr == _configOptions.end())
bool notFound = itr == _configOptions.end();
auto envVarName = GetEnvVarName(name);
Optional<std::string> envVar = GetEnvFromCache(name, envVarName);
if (envVar)
{
Optional<std::string> envVar = EnvVarForIniKey(name);
if (!envVar)
// If showLogs and this key/value pair wasn't found in the currently saved config
if (showLogs && (notFound || itr->second != envVar->c_str()))
{
if (showLogs)
{
LOG_ERROR("server.loading", "> Config: Missing property {} in config file {}, add \"{} = {}\" to this file.",
name, _filename, name, Acore::ToString(def));
}
return def;
}
if (showLogs)
{
LOG_WARN("server.loading", "Missing property {} in config file {}, recovered with environment '{}' value.",
name, _filename, envVar->c_str());
LOG_INFO("server.loading", "> Config: Found config value '{}' from environment variable '{}'.", name, envVarName );
AddKey(name, envVar->c_str(), "ENVIRONMENT", false, false);
}
strValue = *envVar;
}
else if (notFound)
{
if (showLogs)
{
LOG_ERROR("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);
}
return def;
}
else
{
strValue = itr->second;
@@ -403,24 +435,26 @@ template<>
std::string ConfigMgr::GetValueDefault<std::string>(std::string const& name, std::string const& def, bool showLogs /*= true*/) const
{
auto const& itr = _configOptions.find(name);
if (itr == _configOptions.end())
bool notFound = itr == _configOptions.end();
auto envVarName = GetEnvVarName(name);
Optional<std::string> envVar = GetEnvFromCache(name, envVarName);
if (envVar)
{
Optional<std::string> envVar = EnvVarForIniKey(name);
if (envVar)
// If showLogs and this key/value pair wasn't found in the currently saved config
if (showLogs && (notFound || itr->second != envVar->c_str()))
{
if (showLogs)
{
LOG_WARN("server.loading", "Missing property {} in config file {}, recovered with environment '{}' value.",
name, _filename, envVar->c_str());
}
return *envVar;
LOG_INFO("server.loading", "> Config: Found config value '{}' from environment variable '{}'.", name, envVarName);
AddKey(name, *envVar, "ENVIRONMENT", false, false);
}
return *envVar;
}
else if (notFound)
{
if (showLogs)
{
LOG_ERROR("server.loading", "> Config: Missing property {} in config file {}, add \"{} = {}\" to this file.",
name, _filename, name, def);
LOG_ERROR("server.loading", "> Config: Missing property {} in config file {}, add \"{} = {}\" to this file or define '{}' as an environment variable.",
name, _filename, name, def, envVarName);
}
return def;

View File

@@ -1,7 +1,19 @@
/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
* Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/>
*/
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published by the
* Free Software Foundation; either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "GitRevision.h"
#include "revision.h"

View File

@@ -1,7 +1,19 @@
/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
* Copyright (C) 2008-2018 TrinityCore <http://www.trinitycore.org/>
*/
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published by the
* Free Software Foundation; either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __GITREVISION_H__
#define __GITREVISION_H__

View File

@@ -398,6 +398,4 @@ void Log::LoadFromConfig()
ReadAppendersFromConfig();
ReadLoggersFromConfig();
_debugLogMask = DebugLogFilters(sConfigMgr->GetOption<uint32>("DebugLogMask", LOG_FILTER_NONE, false));
}

View File

@@ -121,8 +121,6 @@ private:
Acore::Asio::IoContext* _ioContext;
Acore::Asio::Strand* _strand;
// Deprecated debug filter logs
DebugLogFilters _debugLogMask;
};
#define sLog Log::instance()

View File

@@ -46,6 +46,7 @@ enum AppenderType : uint8
APPENDER_INVALID = 0xFF // SKIP
};
// EnumUtils: DESCRIBE THIS
enum AppenderFlags : uint8
{
APPENDER_FLAGS_NONE = 0x00,
@@ -56,37 +57,4 @@ enum AppenderFlags : uint8
APPENDER_FLAGS_MAKE_FILE_BACKUP = 0x10
};
// Dprecated debug log filters need delte later
enum DebugLogFilters
{
LOG_FILTER_NONE = 0x00000000,
LOG_FILTER_UNITS = 0x00000001, // Anything related to units that doesn't fit in other categories. ie. creature formations
LOG_FILTER_PETS = 0x00000002,
LOG_FILTER_VEHICLES = 0x00000004,
LOG_FILTER_TSCR = 0x00000008, // C++ AI, instance scripts, etc.
LOG_FILTER_DATABASE_AI = 0x00000010, // SmartAI, EventAI, CreatureAI
LOG_FILTER_MAPSCRIPTS = 0x00000020,
LOG_FILTER_NETWORKIO = 0x00000040, // Anything packet/netcode related
LOG_FILTER_SPELLS_AURAS = 0x00000080,
LOG_FILTER_ACHIEVEMENTSYS = 0x00000100,
LOG_FILTER_CONDITIONSYS = 0x00000200,
LOG_FILTER_POOLSYS = 0x00000400,
LOG_FILTER_AUCTIONHOUSE = 0x00000800,
LOG_FILTER_BATTLEGROUND = 0x00001000, // Anything related to arena's and battlegrounds
LOG_FILTER_OUTDOORPVP = 0x00002000,
LOG_FILTER_CHATSYS = 0x00004000,
LOG_FILTER_LFG = 0x00008000,
LOG_FILTER_MAPS = 0x00010000, // Maps, instances, grids, cells, visibility
LOG_FILTER_PLAYER_LOADING = 0x00020000, // Debug output from Player::_Load functions
LOG_FILTER_PLAYER_ITEMS = 0x00040000, // Anything item related
LOG_FILTER_PLAYER_SKILLS = 0x00080000, // Skills related
LOG_FILTER_LOOT = 0x00100000, // Loot related
LOG_FILTER_GUILD = 0x00200000, // Guild related
LOG_FILTER_TRANSPORTS = 0x00400000, // Transport related
LOG_FILTER_WARDEN = 0x00800000, // Warden related
LOG_FILTER_BATTLEFIELD = 0x01000000, // Battlefield related
LOG_FILTER_MODULES = 0x02000000, // Modules debug
LOG_FILTER_CLOSE_SOCKET = 0x04000000, // Whenever KickPlayer() or CloseSocket() are called
};
#endif // LogCommon_h__

View File

@@ -121,4 +121,55 @@ AC_API_EXPORT size_t EnumUtils<AppenderType>::ToIndex(AppenderType value)
default: throw std::out_of_range("value");
}
}
/*****************************************************************\
|* data for enum 'AppenderFlags' in 'LogCommon.h' auto-generated *|
\*****************************************************************/
template <>
AC_API_EXPORT EnumText EnumUtils<AppenderFlags>::ToString(AppenderFlags value)
{
switch (value)
{
case APPENDER_FLAGS_NONE: return { "APPENDER_FLAGS_NONE", "APPENDER_FLAGS_NONE", "" };
case APPENDER_FLAGS_PREFIX_TIMESTAMP: return { "APPENDER_FLAGS_PREFIX_TIMESTAMP", "APPENDER_FLAGS_PREFIX_TIMESTAMP", "" };
case APPENDER_FLAGS_PREFIX_LOGLEVEL: return { "APPENDER_FLAGS_PREFIX_LOGLEVEL", "APPENDER_FLAGS_PREFIX_LOGLEVEL", "" };
case APPENDER_FLAGS_PREFIX_LOGFILTERTYPE: return { "APPENDER_FLAGS_PREFIX_LOGFILTERTYPE", "APPENDER_FLAGS_PREFIX_LOGFILTERTYPE", "" };
case APPENDER_FLAGS_USE_TIMESTAMP: return { "APPENDER_FLAGS_USE_TIMESTAMP", "APPENDER_FLAGS_USE_TIMESTAMP", "" };
case APPENDER_FLAGS_MAKE_FILE_BACKUP: return { "APPENDER_FLAGS_MAKE_FILE_BACKUP", "APPENDER_FLAGS_MAKE_FILE_BACKUP", "" };
default: throw std::out_of_range("value");
}
}
template <>
AC_API_EXPORT size_t EnumUtils<AppenderFlags>::Count() { return 6; }
template <>
AC_API_EXPORT AppenderFlags EnumUtils<AppenderFlags>::FromIndex(size_t index)
{
switch (index)
{
case 0: return APPENDER_FLAGS_NONE;
case 1: return APPENDER_FLAGS_PREFIX_TIMESTAMP;
case 2: return APPENDER_FLAGS_PREFIX_LOGLEVEL;
case 3: return APPENDER_FLAGS_PREFIX_LOGFILTERTYPE;
case 4: return APPENDER_FLAGS_USE_TIMESTAMP;
case 5: return APPENDER_FLAGS_MAKE_FILE_BACKUP;
default: throw std::out_of_range("index");
}
}
template <>
AC_API_EXPORT size_t EnumUtils<AppenderFlags>::ToIndex(AppenderFlags value)
{
switch (value)
{
case APPENDER_FLAGS_NONE: return 0;
case APPENDER_FLAGS_PREFIX_TIMESTAMP: return 1;
case APPENDER_FLAGS_PREFIX_LOGLEVEL: return 2;
case APPENDER_FLAGS_PREFIX_LOGFILTERTYPE: return 3;
case APPENDER_FLAGS_USE_TIMESTAMP: return 4;
case APPENDER_FLAGS_MAKE_FILE_BACKUP: return 5;
default: throw std::out_of_range("value");
}
}
}

View File

@@ -1,6 +1,18 @@
/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
* Copyright (C) 2008-2021 TrinityCore <http://www.trinitycore.org/>
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published by the
* Free Software Foundation; either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef EnumFlag_h__

View File

@@ -15,8 +15,8 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef TRINITY_SMARTENUM_H
#define TRINITY_SMARTENUM_H
#ifndef AC_SMARTENUM_H
#define AC_SMARTENUM_H
#include "IteratorPair.h"
#include <iterator>
@@ -130,4 +130,4 @@ public:
static char const* ToDescription(Enum value) { return ToString(value).Description; }
};
#endif
#endif // AC_SMART_ENUM_H

View File

@@ -72,8 +72,22 @@ namespace Acore
std::string const& logger, std::string const& input,
bool secure)
{
#if AC_COMPILER == AC_COMPILER_MICROSOFT
#pragma warning(push)
#pragma warning(disable:4297)
/*
Silence warning with boost 1.83
boost/process/pipe.hpp(132,5): warning C4297: 'boost::process::basic_pipebuf<char,std::char_traits<char>>::~basic_pipebuf': function assumed not to throw an exception but does
boost/process/pipe.hpp(132,5): message : destructor or deallocator has a (possibly implicit) non-throwing exception specification
boost/process/pipe.hpp(124,6): message : while compiling class template member function 'boost::process::basic_pipebuf<char,std::char_traits<char>>::~basic_pipebuf(void)'
boost/process/pipe.hpp(304,42): message : see reference to class template instantiation 'boost::process::basic_pipebuf<char,std::char_traits<char>>' being compiled
*/
#endif
ipstream outStream;
ipstream errStream;
#if AC_COMPILER == AC_COMPILER_MICROSOFT
#pragma warning(pop)
#endif
if (!secure)
{

View File

@@ -1,6 +1,18 @@
/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-AGPL3
* Copyright (C) 2008+ TrinityCore <http://www.trinitycore.org/>
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published by the
* Free Software Foundation; either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "TaskScheduler.h"

View File

@@ -1,6 +1,18 @@
/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-AGPL3
* Copyright (C) 2008+ TrinityCore <http://www.trinitycore.org/>
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published by the
* Free Software Foundation; either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _TASK_SCHEDULER_H_
@@ -432,11 +444,11 @@ public:
: _task(right._task), _owner(right._owner), _consumed(right._consumed) { }
// Move construct
TaskContext(TaskContext&& right)
TaskContext(TaskContext&& right) noexcept
: _task(std::move(right._task)), _owner(std::move(right._owner)), _consumed(std::move(right._consumed)) { }
// Copy assign
TaskContext& operator= (TaskContext const& right)
TaskContext& operator= (TaskContext const& right) noexcept
{
_task = right._task;
_owner = right._owner;
@@ -445,7 +457,7 @@ public:
}
// Move assign
TaskContext& operator= (TaskContext&& right)
TaskContext& operator= (TaskContext&& right) noexcept
{
_task = std::move(right._task);
_owner = std::move(right._owner);

View File

@@ -85,8 +85,6 @@ int main(int argc, char** argv)
if (!sConfigMgr->LoadAppConfigs())
return 1;
std::vector<std::string> overriddenKeys = sConfigMgr->OverrideWithEnvVariablesIfAny();
// Init logging
sLog->RegisterAppender<AppenderDB>();
sLog->Initialize(nullptr);
@@ -103,9 +101,6 @@ int main(int argc, char** argv)
LOG_INFO("server.authserver", "> Using Boost version: {}.{}.{}", BOOST_VERSION / 100000, BOOST_VERSION / 100 % 1000, BOOST_VERSION % 100);
});
for (std::string const& key : overriddenKeys)
LOG_INFO("server.authserver", "Configuration field {} was overridden with environment variable.", key);
OpenSSLCrypto::threadsSetup();
std::shared_ptr<void> opensslHandle(nullptr, [](void*) { OpenSSLCrypto::threadsCleanup(); });

View File

@@ -45,6 +45,7 @@ enum AuthStatus
STATUS_CLOSED
};
// cppcheck-suppress ctuOneDefinitionRuleViolation
struct AccountInfo
{
void LoadResult(Field* fields);

View File

@@ -184,8 +184,6 @@ int main(int argc, char** argv)
if (!sConfigMgr->LoadAppConfigs())
return 1;
std::vector<std::string> overriddenKeys = sConfigMgr->OverrideWithEnvVariablesIfAny();
std::shared_ptr<Acore::Asio::IoContext> ioContext = std::make_shared<Acore::Asio::IoContext>();
// Init all logs
@@ -205,9 +203,6 @@ int main(int argc, char** argv)
LOG_INFO("server.worldserver", "> Using Boost version: {}.{}.{}", BOOST_VERSION / 100000, BOOST_VERSION / 100 % 1000, BOOST_VERSION % 100);
});
for (std::string const& key : overriddenKeys)
LOG_INFO("server.worldserver", "Configuration field {} was overridden with environment variable.", key);
OpenSSLCrypto::threadsSetup();
std::shared_ptr<void> opensslHandle(nullptr, [](void*) { OpenSSLCrypto::threadsCleanup(); });

File diff suppressed because it is too large Load Diff

View File

@@ -71,7 +71,7 @@ void CharacterDatabaseConnection::DoPrepareStatements()
"resettalents_time, trans_x, trans_y, trans_z, trans_o, transguid, extra_flags, stable_slots, at_login, zone, online, death_expire_time, taxi_path, instance_mode_mask, "
"arenaPoints, totalHonorPoints, todayHonorPoints, yesterdayHonorPoints, totalKills, todayKills, yesterdayKills, chosenTitle, knownCurrencies, watchedFaction, drunk, "
"health, power1, power2, power3, power4, power5, power6, power7, instance_id, talentGroupsCount, activeTalentGroup, exploredZones, equipmentCache, ammoId, "
"knownTitles, actionBars, grantableLevels, innTriggerId, extraBonusTalentCount FROM characters WHERE guid = ?", CONNECTION_ASYNC);
"knownTitles, actionBars, grantableLevels, innTriggerId, extraBonusTalentCount, UNIX_TIMESTAMP(creation_date) FROM characters WHERE guid = ?", CONNECTION_ASYNC);
PrepareStatement(CHAR_SEL_CHARACTER_AURAS, "SELECT casterGuid, itemGuid, spell, effectMask, recalculateMask, stackCount, amount0, amount1, amount2, "
"base_amount0, base_amount1, base_amount2, maxDuration, remainTime, remainCharges FROM character_aura WHERE guid = ?", CONNECTION_ASYNC);

View File

@@ -82,7 +82,7 @@ protected:
Creature* DoSummon(uint32 entry, WorldObject* obj, float radius = 5.0f, uint32 despawnTime = 30000, TempSummonType summonType = TEMPSUMMON_CORPSE_TIMED_DESPAWN);
Creature* DoSummonFlyer(uint32 entry, WorldObject* obj, float flightZ, float radius = 5.0f, uint32 despawnTime = 30000, TempSummonType summonType = TEMPSUMMON_CORPSE_TIMED_DESPAWN);
public:
// EnumUtils: DESCRIBE THIS
// EnumUtils: DESCRIBE THIS (in CreatureAI::)
enum EvadeReason
{
EVADE_REASON_NO_HOSTILES, // the creature's threat list is empty

View File

@@ -601,7 +601,7 @@ void SmartAI::MovepointReached(uint32 id)
if (mLastWP)
{
me->SetPosition(mLastWP->x, mLastWP->y, mLastWP->z, me->GetOrientation());
me->SetHomePosition(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation());
me->SetHomePosition(me->GetPosition());
}
if (HasEscortState(SMART_ESCORT_PAUSED))

View File

@@ -593,9 +593,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
{
// may be nullptr
if (go)
{
go->CastSpell(target->ToUnit(), e.action.cast.spell);
}
if (!IsUnit(target))
continue;
@@ -604,29 +602,24 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
{
caster->CastSpell(target->ToUnit(), e.action.cast.spell, (e.action.cast.castFlags & SMARTCAST_TRIGGERED));
}
else if (me && (!(e.action.cast.castFlags & SMARTCAST_AURA_NOT_PRESENT) || !target->ToUnit()->HasAura(e.action.cast.spell)))
else if (me)
{
if (e.action.cast.castFlags & SMARTCAST_INTERRUPT_PREVIOUS)
{
me->InterruptNonMeleeSpells(false);
}
// If target has the aura, skip
if ((e.action.cast.castFlags & SMARTCAST_AURA_NOT_PRESENT) && target->ToUnit()->HasAura(e.action.cast.spell))
continue;
// If the threatlist is a singleton, cancel
if (e.action.cast.castFlags & SMARTCAST_THREATLIST_NOT_SINGLE)
if (me->GetThreatMgr().GetThreatListSize() <= 1)
break;
TriggerCastFlags triggerFlags = TRIGGERED_NONE;
if (e.action.cast.castFlags & SMARTCAST_TRIGGERED)
{
if (e.action.cast.triggerFlags)
{
triggerFlags = TriggerCastFlags(e.action.cast.triggerFlags);
}
else
{
triggerFlags = TRIGGERED_FULL_MASK;
}
}
// If target does not use mana, skip
if ((e.action.cast.castFlags & SMARTCAST_TARGET_POWER_MANA) && !target->ToUnit()->GetPower(POWER_MANA))
continue;
// Interrupts current spellcast
if (e.action.cast.castFlags & SMARTCAST_INTERRUPT_PREVIOUS)
me->InterruptNonMeleeSpells(false);
// Flag usable only if caster has max dist set.
if ((e.action.cast.castFlags & SMARTCAST_COMBAT_MOVE) && GetCasterMaxDist() > 0.0f && me->GetMaxPower(GetCasterPowerType()) > 0)
@@ -647,15 +640,19 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
}
}
TriggerCastFlags triggerFlags = TRIGGERED_NONE;
if (e.action.cast.castFlags & SMARTCAST_TRIGGERED)
{
if (e.action.cast.triggerFlags)
triggerFlags = TriggerCastFlags(e.action.cast.triggerFlags);
else
triggerFlags = TRIGGERED_FULL_MASK;
}
me->CastSpell(target->ToUnit(), e.action.cast.spell, triggerFlags);
LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction:: SMART_ACTION_CAST: Unit {} casts spell {} on target {} with castflags {}",
me->GetGUID().ToString(), e.action.cast.spell, target->GetGUID().ToString(), e.action.cast.castFlags);
}
else
{
LOG_DEBUG("scripts.ai", "Spell {} not cast because it has flag SMARTCAST_AURA_NOT_PRESENT and the target {} already has the aura",
e.action.cast.spell, target->GetGUID().ToString());
}
}
break;
}
@@ -2991,6 +2988,47 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
break;
}
case SMART_ACTION_SET_ORIENTATION_TARGET:
{
switch (e.action.orientationTarget.type)
{
case 0: // Reset
{
for (WorldObject* target : targets)
target->ToCreature()->SetFacingTo((target->ToCreature()->HasUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT) && target->ToCreature()->GetTransGUID() ? target->ToCreature()->GetTransportHomePosition() : target->ToCreature()->GetHomePosition()).GetOrientation());
break;
}
case 1: // Target target.o
{
for (WorldObject* target : targets)
target->ToCreature()->SetFacingTo(e.target.o);
break;
}
case 2: // Target source
{
for (WorldObject* target : targets)
target->ToCreature()->SetFacingToObject(me);
break;
}
case 3: // Target parameters
{
ObjectVector facingTargets;
GetTargets(facingTargets, CreateSmartEvent(SMART_EVENT_UPDATE_IC, 0, 0, 0, 0, 0, 0, 0, SMART_ACTION_NONE, 0, 0, 0, 0, 0, 0, (SMARTAI_TARGETS)e.action.orientationTarget.targetType, e.action.orientationTarget.targetParam1, e.action.orientationTarget.targetParam2, e.action.orientationTarget.targetParam3, e.action.orientationTarget.targetParam4, 0), unit);
for (WorldObject* facingTarget : facingTargets)
for (WorldObject* target : targets)
target->ToCreature()->SetFacingToObject(facingTarget);
break;
}
default:
break;
}
break;
}
default:
LOG_ERROR("sql.sql", "SmartScript::ProcessAction: Entry {} SourceType {}, Event {}, Unhandled Action type {}", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
break;
@@ -3162,7 +3200,7 @@ void SmartScript::GetTargets(ObjectVector& targets, SmartScriptHolder const& e,
if (Unit* u = me->AI()->SelectTarget(SelectTargetMethod::MaxThreat, 1, PowerUsersSelector(me, Powers(e.target.hostileRandom.powerType - 1), (float)e.target.hostileRandom.maxDist, e.target.hostileRandom.playerOnly)))
targets.push_back(u);
}
else if (Unit* u = me->AI()->SelectTarget(SelectTargetMethod::MaxThreat, 1, (float)e.target.hostileRandom.maxDist, e.target.hostileRandom.playerOnly))
else if (Unit* u = me->AI()->SelectTarget(SelectTargetMethod::MaxThreat, 1, (float)e.target.hostileRandom.maxDist, e.target.hostileRandom.playerOnly, true, -e.target.hostileRandom.aura))
targets.push_back(u);
}
break;
@@ -3174,7 +3212,7 @@ void SmartScript::GetTargets(ObjectVector& targets, SmartScriptHolder const& e,
if (Unit* u = me->AI()->SelectTarget(SelectTargetMethod::MinThreat, 0, PowerUsersSelector(me, Powers(e.target.hostileRandom.powerType - 1), (float)e.target.hostileRandom.maxDist, e.target.hostileRandom.playerOnly)))
targets.push_back(u);
}
else if (Unit* u = me->AI()->SelectTarget(SelectTargetMethod::MinThreat, 0, (float)e.target.hostileRandom.maxDist, e.target.hostileRandom.playerOnly))
else if (Unit* u = me->AI()->SelectTarget(SelectTargetMethod::MinThreat, 0, (float)e.target.hostileRandom.maxDist, e.target.hostileRandom.playerOnly, true, -e.target.hostileRandom.aura))
targets.push_back(u);
}
break;
@@ -3186,7 +3224,7 @@ void SmartScript::GetTargets(ObjectVector& targets, SmartScriptHolder const& e,
if (Unit* u = me->AI()->SelectTarget(SelectTargetMethod::Random, 0, PowerUsersSelector(me, Powers(e.target.hostileRandom.powerType - 1), (float)e.target.hostileRandom.maxDist, e.target.hostileRandom.playerOnly)))
targets.push_back(u);
}
else if (Unit* u = me->AI()->SelectTarget(SelectTargetMethod::Random, 0, (float)e.target.hostileRandom.maxDist, e.target.hostileRandom.playerOnly))
else if (Unit* u = me->AI()->SelectTarget(SelectTargetMethod::Random, 0, (float)e.target.hostileRandom.maxDist, e.target.hostileRandom.playerOnly, true, -e.target.hostileRandom.aura))
targets.push_back(u);
}
break;
@@ -3198,7 +3236,7 @@ void SmartScript::GetTargets(ObjectVector& targets, SmartScriptHolder const& e,
if (Unit* u = me->AI()->SelectTarget(SelectTargetMethod::Random, 1, PowerUsersSelector(me, Powers(e.target.hostileRandom.powerType - 1), (float)e.target.hostileRandom.maxDist, e.target.hostileRandom.playerOnly)))
targets.push_back(u);
}
else if (Unit* u = me->AI()->SelectTarget(SelectTargetMethod::Random, 1, (float)e.target.hostileRandom.maxDist, e.target.hostileRandom.playerOnly))
else if (Unit* u = me->AI()->SelectTarget(SelectTargetMethod::Random, 1, (float)e.target.hostileRandom.maxDist, e.target.hostileRandom.playerOnly, true, -e.target.hostileRandom.aura))
targets.push_back(u);
}
break;
@@ -3785,16 +3823,8 @@ void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, ui
if (!me || !me->IsEngaged() || !me->GetVictim())
return;
if (me->IsInRange(me->GetVictim(), (float)e.event.rangeRepeat.minRange, (float)e.event.rangeRepeat.maxRange))
{
if (e.event.rangeRepeat.onlyFireOnRepeat == 2)
{
e.event.rangeRepeat.onlyFireOnRepeat = 1;
RecalcTimer(e, e.event.rangeRepeat.repeatMin, e.event.rangeRepeat.repeatMax);
}
else
ProcessTimedAction(e, e.event.rangeRepeat.repeatMin, e.event.rangeRepeat.repeatMax, me->GetVictim());
}
if (me->IsInRange(me->GetVictim(), (float)e.event.minMaxRepeat.rangeMin, (float)e.event.minMaxRepeat.rangeMax))
ProcessTimedAction(e, e.event.minMaxRepeat.repeatMin, e.event.minMaxRepeat.repeatMax, me->GetVictim());
else
RecalcTimer(e, 1200, 1200); // make it predictable
@@ -3947,9 +3977,11 @@ void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, ui
if (Unit* victim = me->GetVictim())
{
if (!victim->HasInArc(static_cast<float>(M_PI), me))
ProcessTimedAction(e, e.event.behindTarget.cooldownMin, e.event.behindTarget.cooldownMax, victim);
if (e.event.minMaxRepeat.rangeMax && (me->IsInRange(victim, (float)e.event.minMaxRepeat.rangeMin, (float)e.event.minMaxRepeat.rangeMax)))
if (!victim->HasInArc(static_cast<float>(M_PI), me))
ProcessTimedAction(e, e.event.minMaxRepeat.repeatMin, e.event.minMaxRepeat.repeatMax, victim);
}
break;
}
case SMART_EVENT_RECEIVE_EMOTE:
@@ -4229,7 +4261,7 @@ void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, ui
if (IsUnit(target) && me->IsFriendlyTo(target->ToUnit()) && target->ToUnit()->IsAlive() && target->ToUnit()->IsInCombat())
{
uint32 healthPct = uint32(target->ToUnit()->GetHealthPct());
if (healthPct > e.event.friendlyHealthPct.maxHpPct || healthPct < e.event.friendlyHealthPct.minHpPct)
if (healthPct > e.event.friendlyHealthPct.hpPct)
{
continue;
}
@@ -4243,7 +4275,7 @@ void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, ui
}
case SMART_TARGET_SELF:
case SMART_TARGET_ACTION_INVOKER:
unitTarget = DoSelectLowestHpPercentFriendly((float)e.event.friendlyHealthPct.radius, e.event.friendlyHealthPct.minHpPct, e.event.friendlyHealthPct.maxHpPct);
unitTarget = DoSelectLowestHpPercentFriendly((float)e.event.friendlyHealthPct.radius, 0, e.event.friendlyHealthPct.hpPct);
break;
default:
return;
@@ -4435,14 +4467,14 @@ void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, ui
{
if (Unit* target = ObjectAccessor::GetUnit(*me, (*i)->getUnitGuid()))
{
if (!target || target->IsPet() || target->IsTotem() || !target->IsNonMeleeSpellCast(false, false, true))
if (!target || !IsPlayer(target) || !target->IsNonMeleeSpellCast(false, false, true))
continue;
if (e.event.areaCasting.rangeMin && !(me->IsInRange(target, (float)e.event.areaCasting.rangeMin, (float)e.event.areaCasting.rangeMax)))
if (!(me->IsInRange(target, (float)e.event.minMaxRepeat.rangeMin, (float)e.event.minMaxRepeat.rangeMax)))
continue;
ProcessAction(e, target);
RecalcTimer(e, e.event.areaCasting.repeatMin, e.event.areaCasting.repeatMax);
RecalcTimer(e, e.event.minMaxRepeat.repeatMin, e.event.minMaxRepeat.repeatMax);
return;
}
@@ -4463,11 +4495,11 @@ void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, ui
{
if (Unit* target = ObjectAccessor::GetUnit(*me, (*i)->getUnitGuid()))
{
if (!(me->IsInRange(target, (float)e.event.areaRange.rangeMin, (float)e.event.areaRange.rangeMax)))
if (!(me->IsInRange(target, (float)e.event.minMaxRepeat.rangeMin, (float)e.event.minMaxRepeat.rangeMax)))
continue;
ProcessAction(e, target);
RecalcTimer(e, e.event.areaRange.repeatMin, e.event.areaRange.repeatMax);
RecalcTimer(e, e.event.minMaxRepeat.repeatMin, e.event.minMaxRepeat.repeatMax);
return;
}
}
@@ -4487,16 +4519,6 @@ void SmartScript::InitTimer(SmartScriptHolder& e)
switch (e.GetEventType())
{
//set only events which have initial timers
case SMART_EVENT_RANGE:
// If onlyFireOnRepeat is true set to 2 before entering combat. Will be set back to 1 after entering combat to ignore initial firing.
if (e.event.rangeRepeat.onlyFireOnRepeat == 1)
e.event.rangeRepeat.onlyFireOnRepeat = 2;
// make it predictable
RecalcTimer(e, 1200, 1200);
break;
case SMART_EVENT_AREA_RANGE:
RecalcTimer(e, e.event.areaRange.min, e.event.areaRange.max);
break;
case SMART_EVENT_NEAR_PLAYERS:
case SMART_EVENT_NEAR_PLAYERS_NEGATION:
RecalcTimer(e, e.event.nearPlayer.firstTimer, e.event.nearPlayer.firstTimer);
@@ -4504,13 +4526,13 @@ void SmartScript::InitTimer(SmartScriptHolder& e)
case SMART_EVENT_UPDATE:
case SMART_EVENT_UPDATE_IC:
case SMART_EVENT_UPDATE_OOC:
case SMART_EVENT_RANGE:
case SMART_EVENT_AREA_RANGE:
case SMART_EVENT_AREA_CASTING:
case SMART_EVENT_IS_BEHIND_TARGET:
case SMART_EVENT_FRIENDLY_HEALTH_PCT:
RecalcTimer(e, e.event.minMaxRepeat.min, e.event.minMaxRepeat.max);
break;
case SMART_EVENT_OOC_LOS:
case SMART_EVENT_IC_LOS:
// Xinef: cooldown should be processed AFTER action is done, not before...
//RecalcTimer(e, e.event.los.cooldownMin, e.event.los.cooldownMax);
//break;
case SMART_EVENT_DISTANCE_CREATURE:
case SMART_EVENT_DISTANCE_GAMEOBJECT:
RecalcTimer(e, e.event.distance.repeat, e.event.distance.repeat);
@@ -4519,9 +4541,6 @@ void SmartScript::InitTimer(SmartScriptHolder& e)
case SMART_EVENT_NEAR_UNIT_NEGATION:
RecalcTimer(e, e.event.nearUnit.timer, e.event.nearUnit.timer);
break;
case SMART_EVENT_AREA_CASTING:
RecalcTimer(e, e.event.areaCasting.min, e.event.areaCasting.max);
break;
default:
e.active = true;
break;
@@ -4550,14 +4569,14 @@ void SmartScript::UpdateTimer(SmartScriptHolder& e, uint32 const diff)
if (e.timer < diff)
{
// delay spell cast event if another spell is being casted
// delay spell cast for another AI tick if another spell is being cast
if (e.GetActionType() == SMART_ACTION_CAST)
{
if (!(e.action.cast.castFlags & SMARTCAST_INTERRUPT_PREVIOUS))
{
if (me && me->HasUnitState(UNIT_STATE_CASTING))
{
e.timer = 1;
e.timer = 1200;
return;
}
}
@@ -4566,9 +4585,9 @@ void SmartScript::UpdateTimer(SmartScriptHolder& e, uint32 const diff)
// Delay flee for assist event if casting
if (e.GetActionType() == SMART_ACTION_FLEE_FOR_ASSIST && me && me->HasUnitState(UNIT_STATE_CASTING))
{
e.timer = 1;
e.timer = 1200;
return;
}
} // @TODO: Can't these be handled by the action themselves instead? Less expensive
e.active = true;//activate events with cooldown
switch (e.GetEventType())//process ONLY timed events
@@ -4809,10 +4828,10 @@ void SmartScript::OnInitialize(WorldObject* obj, AreaTrigger const* at)
InitTimer((*i));//calculate timers for first time use
if (i->GetEventType() == SMART_EVENT_RANGE && i->GetActionType() == SMART_ACTION_ALLOW_COMBAT_MOVEMENT)
{
if (i->action.combatMove.move == 1 && i->event.rangeRepeat.minRange > minEnableDist)
minEnableDist = i->event.rangeRepeat.minRange;
else if (i->action.combatMove.move == 0 && (i->event.rangeRepeat.maxRange < maxDisableDist || maxDisableDist == 0))
maxDisableDist = i->event.rangeRepeat.maxRange;
if (i->action.combatMove.move == 1 && i->event.minMaxRepeat.rangeMin > minEnableDist)
minEnableDist = i->event.minMaxRepeat.rangeMin;
else if (i->action.combatMove.move == 0 && (i->event.minMaxRepeat.rangeMax < maxDisableDist || maxDisableDist == 0))
maxDisableDist = i->event.minMaxRepeat.rangeMax;
}
// Xinef: if smartcast combat move flag is present

View File

@@ -264,29 +264,14 @@ void SmartAIMgr::LoadSmartAIFromDB()
case SMART_EVENT_FRIENDLY_MISSING_BUFF:
case SMART_EVENT_HAS_AURA:
case SMART_EVENT_TARGET_BUFFED:
case SMART_EVENT_RANGE:
case SMART_EVENT_AREA_RANGE:
case SMART_EVENT_AREA_CASTING:
case SMART_EVENT_IS_BEHIND_TARGET:
if (temp.event.minMaxRepeat.repeatMin == 0 && temp.event.minMaxRepeat.repeatMax == 0)
temp.event.event_flags |= SMART_EVENT_FLAG_NOT_REPEATABLE;
break;
case SMART_EVENT_RANGE:
if (temp.event.rangeRepeat.repeatMin == 0 && temp.event.rangeRepeat.repeatMax == 0)
temp.event.event_flags |= SMART_EVENT_FLAG_NOT_REPEATABLE;
// Will only work properly if value is 0 or 1
if (temp.event.rangeRepeat.onlyFireOnRepeat > 1)
temp.event.rangeRepeat.onlyFireOnRepeat = 1;
break;
case SMART_EVENT_AREA_RANGE:
if (temp.event.areaRange.repeatMin == 0 && temp.event.areaRange.repeatMax == 0)
temp.event.event_flags |= SMART_EVENT_FLAG_NOT_REPEATABLE;
break;
case SMART_EVENT_VICTIM_CASTING:
case SMART_EVENT_IS_BEHIND_TARGET:
if (temp.event.minMaxRepeat.min == 0 && temp.event.minMaxRepeat.max == 0)
temp.event.event_flags |= SMART_EVENT_FLAG_NOT_REPEATABLE;
break;
case SMART_EVENT_AREA_CASTING:
if (temp.event.areaCasting.repeatMin == 0 && temp.event.areaCasting.repeatMax == 0)
temp.event.event_flags |= SMART_EVENT_FLAG_NOT_REPEATABLE;
break;
case SMART_EVENT_FRIENDLY_IS_CC:
if (temp.event.friendlyCC.repeatMin == 0 && temp.event.friendlyCC.repeatMax == 0)
temp.event.event_flags |= SMART_EVENT_FLAG_NOT_REPEATABLE;
@@ -506,7 +491,7 @@ bool SmartAIMgr::CheckUnusedEventParams(SmartScriptHolder const& e)
case SMART_EVENT_DEATH: return NO_PARAMS;
case SMART_EVENT_EVADE: return NO_PARAMS;
case SMART_EVENT_SPELLHIT: return sizeof(SmartEvent::spellHit);
case SMART_EVENT_RANGE: return sizeof(SmartEvent::rangeRepeat);
case SMART_EVENT_RANGE: return sizeof(SmartEvent::minMaxRepeat);
case SMART_EVENT_OOC_LOS: return sizeof(SmartEvent::los);
case SMART_EVENT_RESPAWN: return sizeof(SmartEvent::respawn);
case SMART_EVENT_TARGET_HEALTH_PCT: return sizeof(SmartEvent::minMaxRepeat);
@@ -564,7 +549,7 @@ bool SmartAIMgr::CheckUnusedEventParams(SmartScriptHolder const& e)
case SMART_EVENT_GOSSIP_HELLO: return sizeof(SmartEvent::gossipHello);
case SMART_EVENT_FOLLOW_COMPLETED: return NO_PARAMS;
case SMART_EVENT_EVENT_PHASE_CHANGE: return sizeof(SmartEvent::eventPhaseChange);
case SMART_EVENT_IS_BEHIND_TARGET: return sizeof(SmartEvent::behindTarget);
case SMART_EVENT_IS_BEHIND_TARGET: return sizeof(SmartEvent::minMaxRepeat);
case SMART_EVENT_GAME_EVENT_START: return sizeof(SmartEvent::gameEvent);
case SMART_EVENT_GAME_EVENT_END: return sizeof(SmartEvent::gameEvent);
case SMART_EVENT_GO_STATE_CHANGED: return sizeof(SmartEvent::goStateChanged);
@@ -584,8 +569,8 @@ bool SmartAIMgr::CheckUnusedEventParams(SmartScriptHolder const& e)
case SMART_EVENT_NEAR_PLAYERS_NEGATION: return sizeof(SmartEvent::nearPlayerNegation);
case SMART_EVENT_NEAR_UNIT: return sizeof(SmartEvent::nearUnit);
case SMART_EVENT_NEAR_UNIT_NEGATION: return sizeof(SmartEvent::nearUnitNegation);
case SMART_EVENT_AREA_CASTING: return sizeof(SmartEvent::areaCasting);
case SMART_EVENT_AREA_RANGE: return sizeof(SmartEvent::areaRange);
case SMART_EVENT_AREA_CASTING: return sizeof(SmartEvent::minMaxRepeat);
case SMART_EVENT_AREA_RANGE: return sizeof(SmartEvent::minMaxRepeat);
default:
LOG_WARN("sql.sql", "SmartAIMgr: entryorguid {} source_type {} id {} action_type {} is using an event {} with no unused params specified in SmartAIMgr::CheckUnusedEventParams(), please report this.",
e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.GetEventType());
@@ -781,6 +766,7 @@ bool SmartAIMgr::CheckUnusedActionParams(SmartScriptHolder const& e)
case SMART_ACTION_SUMMON_RADIAL: return sizeof(SmartAction::radialSummon);
case SMART_ACTION_PLAY_SPELL_VISUAL: return sizeof(SmartAction::spellVisual);
case SMART_ACTION_FOLLOW_GROUP: return sizeof(SmartAction::followGroup);
case SMART_ACTION_SET_ORIENTATION_TARGET: return sizeof(SmartAction::orientationTarget);
default:
LOG_WARN("sql.sql", "SmartAIMgr: entryorguid {} source_type {} id {} action_type {} is using an action with no unused params specified in SmartAIMgr::CheckUnusedActionParams(), please report this.",
e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
@@ -963,21 +949,17 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
if (!IsMinMaxValid(e, e.event.minMaxRepeat.repeatMin, e.event.minMaxRepeat.repeatMax))
return false;
break;
case SMART_EVENT_RANGE:
if (!IsMinMaxValid(e, e.event.rangeRepeat.minRange, e.event.rangeRepeat.maxRange))
return false;
if (!IsMinMaxValid(e, e.event.rangeRepeat.repeatMin, e.event.rangeRepeat.repeatMax))
return false;
break;
case SMART_EVENT_AREA_RANGE:
if (!IsMinMaxValid(e, e.event.areaRange.min, e.event.areaRange.max))
case SMART_EVENT_AREA_CASTING:
case SMART_EVENT_IS_BEHIND_TARGET:
case SMART_EVENT_RANGE:
if (!IsMinMaxValid(e, e.event.minMaxRepeat.min, e.event.minMaxRepeat.max))
return false;
if (!IsMinMaxValid(e, e.event.areaRange.repeatMin, e.event.areaRange.repeatMax))
if (!IsMinMaxValid(e, e.event.minMaxRepeat.repeatMin, e.event.minMaxRepeat.repeatMax))
return false;
if (!IsMinMaxValid(e, e.event.areaRange.rangeMin, e.event.areaRange.rangeMax))
if (!IsMinMaxValid(e, e.event.minMaxRepeat.rangeMin, e.event.minMaxRepeat.rangeMax))
return false;
break;
@@ -1070,16 +1052,6 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
if (!IsMinMaxValid(e, e.event.targetCasting.repeatMin, e.event.targetCasting.repeatMax))
return false;
break;
case SMART_EVENT_AREA_CASTING:
if (!IsMinMaxValid(e, e.event.areaCasting.min, e.event.areaCasting.max))
return false;
if (!IsMinMaxValid(e, e.event.areaCasting.repeatMin, e.event.areaCasting.repeatMax))
return false;
if (!IsMinMaxValid(e, e.event.areaCasting.rangeMin, e.event.areaCasting.rangeMax))
return false;
break;
case SMART_EVENT_PASSENGER_BOARDED:
case SMART_EVENT_PASSENGER_REMOVED:
if (!IsMinMaxValid(e, e.event.minMax.repeatMin, e.event.minMax.repeatMax))
@@ -1185,10 +1157,6 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
}
break;
}
case SMART_EVENT_IS_BEHIND_TARGET:
if (!IsMinMaxValid(e, e.event.behindTarget.cooldownMin, e.event.behindTarget.cooldownMax))
return false;
break;
case SMART_EVENT_GAME_EVENT_START:
case SMART_EVENT_GAME_EVENT_END:
{
@@ -1207,10 +1175,13 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
break;
}
case SMART_EVENT_FRIENDLY_HEALTH_PCT:
if (!IsMinMaxValid(e, e.event.friendlyHealthPct.min, e.event.friendlyHealthPct.max))
return false;
if (!IsMinMaxValid(e, e.event.friendlyHealthPct.repeatMin, e.event.friendlyHealthPct.repeatMax))
return false;
if (e.event.friendlyHealthPct.maxHpPct > 100 || e.event.friendlyHealthPct.minHpPct > 100)
if (e.event.friendlyHealthPct.hpPct > 100)
{
LOG_ERROR("sql.sql", "SmartAIMgr: Entry {} SourceType {} Event {} Action {} has pct value above 100, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
return false;
@@ -1971,6 +1942,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
case SMART_ACTION_SUMMON_RADIAL:
case SMART_ACTION_PLAY_SPELL_VISUAL:
case SMART_ACTION_FOLLOW_GROUP:
case SMART_ACTION_SET_ORIENTATION_TARGET:
break;
default:
LOG_ERROR("sql.sql", "SmartAIMgr: Not handled action_type({}), event_type({}), Entry {} SourceType {} Event {}, skipped.", e.GetActionType(), e.GetEventType(), e.entryOrGuid, e.GetScriptType(), e.event_id);

View File

@@ -124,7 +124,7 @@ enum SMART_EVENT
SMART_EVENT_DEATH = 6, // NONE
SMART_EVENT_EVADE = 7, // NONE
SMART_EVENT_SPELLHIT = 8, // SpellID, School, CooldownMin, CooldownMax
SMART_EVENT_RANGE = 9, // minRange, maxRange, repeatMin, repeatMax, onlyFireOnRepeat
SMART_EVENT_RANGE = 9, // min, max, repeatMin, repeatMax, rangeMin, rangeMax
SMART_EVENT_OOC_LOS = 10, // HostilityMode, MaxRnage, CooldownMin, CooldownMax, PlayerOnly
SMART_EVENT_RESPAWN = 11, // type, MapId, ZoneId
SMART_EVENT_TARGET_HEALTH_PCT = 12, // HPMin%, HPMax%, RepeatMin, RepeatMax
@@ -182,14 +182,14 @@ enum SMART_EVENT
SMART_EVENT_GOSSIP_HELLO = 64, // event_para_1 (only) 0 = no filter set, always execute action, 1 = GossipHello only filter set, skip action if reportUse, 2 = reportUse only filter set, skip action if GossipHello
SMART_EVENT_FOLLOW_COMPLETED = 65, // none
SMART_EVENT_EVENT_PHASE_CHANGE = 66, // event phase mask (<= SMART_EVENT_PHASE_ALL)
SMART_EVENT_IS_BEHIND_TARGET = 67, // cooldownMin, CooldownMax
SMART_EVENT_IS_BEHIND_TARGET = 67, // min, max, repeatMin, repeatMax, rangeMin, rangeMax
SMART_EVENT_GAME_EVENT_START = 68, // game_event.Entry
SMART_EVENT_GAME_EVENT_END = 69, // game_event.Entry
SMART_EVENT_GO_STATE_CHANGED = 70, // go state
SMART_EVENT_GO_EVENT_INFORM = 71, // eventId
SMART_EVENT_ACTION_DONE = 72, // eventId (SharedDefines.EventId)
SMART_EVENT_ON_SPELLCLICK = 73, // clicker (unit)
SMART_EVENT_FRIENDLY_HEALTH_PCT = 74, // minHpPct, maxHpPct, repeatMin, repeatMax
SMART_EVENT_FRIENDLY_HEALTH_PCT = 74, // min, max, repeatMin, repeatMax, hpPct, range
SMART_EVENT_DISTANCE_CREATURE = 75, // guid, entry, distance, repeat
SMART_EVENT_DISTANCE_GAMEOBJECT = 76, // guid, entry, distance, repeat
SMART_EVENT_COUNTER_SET = 77, // id, value, cooldownMin, cooldownMax
@@ -210,8 +210,8 @@ enum SMART_EVENT
SMART_EVENT_NEAR_PLAYERS_NEGATION = 102, // max, radius, first timer, repeatMin, repeatMax
SMART_EVENT_NEAR_UNIT = 103, // type (0: creature 1: gob), entry, count, range, timer
SMART_EVENT_NEAR_UNIT_NEGATION = 104, // type (0: creature 1: gob), entry, count, range, timer
SMART_EVENT_AREA_CASTING = 105, // min, max, repeatMin, repeatMax, range
SMART_EVENT_AREA_RANGE = 106, // min, max, repeatMin, repeatMax, range
SMART_EVENT_AREA_CASTING = 105, // min, max, repeatMin, repeatMax, rangeMin, rangeMax
SMART_EVENT_AREA_RANGE = 106, // min, max, repeatMin, repeatMax, rangeMin, rangeMax
SMART_EVENT_AC_END = 107
};
@@ -230,17 +230,10 @@ struct SmartEvent
uint32 max;
uint32 repeatMin;
uint32 repeatMax;
uint32 rangeMin;
uint32 rangeMax;
} minMaxRepeat;
struct
{
uint32 minRange;
uint32 maxRange;
uint32 repeatMin;
uint32 repeatMax;
uint32 onlyFireOnRepeat;
} rangeRepeat;
struct
{
uint32 cooldownMin;
@@ -430,12 +423,6 @@ struct SmartEvent
uint32 phasemask;
} eventPhaseChange;
struct
{
uint32 cooldownMin;
uint32 cooldownMax;
} behindTarget;
struct
{
uint32 gameEventId;
@@ -458,10 +445,11 @@ struct SmartEvent
struct
{
uint32 minHpPct;
uint32 maxHpPct;
uint32 min;
uint32 max;
uint32 repeatMin;
uint32 repeatMax;
uint32 hpPct;
uint32 radius;
} friendlyHealthPct;
@@ -517,26 +505,6 @@ struct SmartEvent
uint32 timer;
} nearUnitNegation;
struct
{
uint32 min;
uint32 max;
uint32 repeatMin;
uint32 repeatMax;
uint32 rangeMin;
uint32 rangeMax;
} areaCasting;
struct
{
uint32 min;
uint32 max;
uint32 repeatMin;
uint32 repeatMax;
uint32 rangeMin;
uint32 rangeMax;
} areaRange;
struct
{
uint32 param1;
@@ -743,8 +711,9 @@ enum SMART_ACTION
SMART_ACTION_SUMMON_RADIAL = 228, // summonEntry, summonDuration, repetitions, startAngle, stepAngle, dist
SMART_ACTION_PLAY_SPELL_VISUAL = 229, // visualId, visualIdImpact
SMART_ACTION_FOLLOW_GROUP = 230, // followState, followType, dist
SMART_ACTION_SET_ORIENTATION_TARGET = 231, // type, target_type, target_param1, target_param2, target_param3, target_param4
SMART_ACTION_AC_END = 231, // placeholder
SMART_ACTION_AC_END = 232, // placeholder
};
enum class SmartActionSummonCreatureFlags
@@ -1453,6 +1422,16 @@ struct SmartAction
uint32 followType;
uint32 dist;
} followGroup;
struct
{
uint32 type;
uint32 targetType;
uint32 targetParam1;
uint32 targetParam2;
uint32 targetParam3;
uint32 targetParam4;
} orientationTarget;
//! Note for any new future actions
//! All parameters must have type uint32
@@ -1484,10 +1463,10 @@ enum SMARTAI_TARGETS
SMART_TARGET_NONE = 0, // NONE
SMART_TARGET_SELF = 1, // Self cast
SMART_TARGET_VICTIM = 2, // Our current target (ie: highest aggro)
SMART_TARGET_HOSTILE_SECOND_AGGRO = 3, // Second highest aggro, maxdist, playerOnly, powerType + 1
SMART_TARGET_HOSTILE_LAST_AGGRO = 4, // Dead last on aggro, maxdist, playerOnly, powerType + 1
SMART_TARGET_HOSTILE_RANDOM = 5, // Just any random target on our threat list, maxdist, playerOnly, powerType + 1
SMART_TARGET_HOSTILE_RANDOM_NOT_TOP = 6, // Any random target except top threat, maxdist, playerOnly, powerType + 1
SMART_TARGET_HOSTILE_SECOND_AGGRO = 3, // Second highest aggro, maxdist, playerOnly, powerType + 1, missing aura
SMART_TARGET_HOSTILE_LAST_AGGRO = 4, // Dead last on aggro, maxdist, playerOnly, powerType + 1, missing aura
SMART_TARGET_HOSTILE_RANDOM = 5, // Just any random target on our threat list, maxdist, playerOnly, powerType + 1, missing aura
SMART_TARGET_HOSTILE_RANDOM_NOT_TOP = 6, // Any random target except top threat, maxdist, playerOnly, powerType + 1, missing aura
SMART_TARGET_ACTION_INVOKER = 7, // Unit who caused this Event to occur
SMART_TARGET_POSITION = 8, // use xyz from event params
SMART_TARGET_CREATURE_RANGE = 9, // CreatureEntry(0any), minDist, maxDist, alive(0 - both, 1 - alive, 2 - dead)
@@ -1551,6 +1530,7 @@ struct SmartTarget
uint32 maxDist;
SAIBool playerOnly;
uint32 powerType;
uint32 aura;
} hostileRandom;
struct
@@ -1864,16 +1844,16 @@ const uint32 SmartAIEventMask[SMART_EVENT_AC_END][2] =
enum SmartEventFlags
{
SMART_EVENT_FLAG_NOT_REPEATABLE = 0x001, //Event can not repeat
SMART_EVENT_FLAG_DIFFICULTY_0 = 0x002, //Event only occurs in instance difficulty 0
SMART_EVENT_FLAG_DIFFICULTY_1 = 0x004, //Event only occurs in instance difficulty 1
SMART_EVENT_FLAG_DIFFICULTY_2 = 0x008, //Event only occurs in instance difficulty 2
SMART_EVENT_FLAG_DIFFICULTY_3 = 0x010, //Event only occurs in instance difficulty 3
SMART_EVENT_FLAG_NOT_REPEATABLE = 0x001, // Event can not repeat
SMART_EVENT_FLAG_DIFFICULTY_0 = 0x002, // Event only occurs in instance difficulty 0
SMART_EVENT_FLAG_DIFFICULTY_1 = 0x004, // Event only occurs in instance difficulty 1
SMART_EVENT_FLAG_DIFFICULTY_2 = 0x008, // Event only occurs in instance difficulty 2
SMART_EVENT_FLAG_DIFFICULTY_3 = 0x010, // Event only occurs in instance difficulty 3
SMART_EVENT_FLAG_RESERVED_5 = 0x020,
SMART_EVENT_FLAG_RESERVED_6 = 0x040,
SMART_EVENT_FLAG_DEBUG_ONLY = 0x080, //Event only occurs in debug build
SMART_EVENT_FLAG_DONT_RESET = 0x100, //Event will not reset in SmartScript::OnReset()
SMART_EVENT_FLAG_WHILE_CHARMED = 0x200, //Event occurs even if AI owner is charmed
SMART_EVENT_FLAG_DEBUG_ONLY = 0x080, // Event only occurs in debug build
SMART_EVENT_FLAG_DONT_RESET = 0x100, // Event will not reset in SmartScript::OnReset()
SMART_EVENT_FLAG_WHILE_CHARMED = 0x200, // Event occurs even if AI owner is charmed
SMART_EVENT_FLAG_DIFFICULTY_ALL = (SMART_EVENT_FLAG_DIFFICULTY_0 | SMART_EVENT_FLAG_DIFFICULTY_1 | SMART_EVENT_FLAG_DIFFICULTY_2 | SMART_EVENT_FLAG_DIFFICULTY_3),
SMART_EVENT_FLAGS_ALL = (SMART_EVENT_FLAG_NOT_REPEATABLE | SMART_EVENT_FLAG_DIFFICULTY_ALL | SMART_EVENT_FLAG_RESERVED_5 | SMART_EVENT_FLAG_RESERVED_6 | SMART_EVENT_FLAG_DEBUG_ONLY | SMART_EVENT_FLAG_DONT_RESET | SMART_EVENT_FLAG_WHILE_CHARMED)
@@ -1881,14 +1861,15 @@ enum SmartEventFlags
enum SmartCastFlags
{
SMARTCAST_INTERRUPT_PREVIOUS = 0x01, //Interrupt any spell casting
SMARTCAST_TRIGGERED = 0x02, //Triggered (this makes spell cost zero mana and have no cast time)
//CAST_FORCE_CAST = 0x04, //Forces cast even if creature is out of mana or out of range
//CAST_NO_MELEE_IF_OOM = 0x08, //Prevents creature from entering melee if out of mana or out of range
//CAST_FORCE_TARGET_SELF = 0x10, //Forces the target to cast this spell on itself
SMARTCAST_AURA_NOT_PRESENT = 0x20, //Only casts the spell if the target does not have an aura from the spell
SMARTCAST_COMBAT_MOVE = 0x40, //Prevents combat movement if cast successful. Allows movement on range, OOM, LOS
SMARTCAST_THREATLIST_NOT_SINGLE = 0x80 //Only cast if the source's threatlist is higher than one. This includes pets (see Skeram's True Fulfillment)
SMARTCAST_INTERRUPT_PREVIOUS = 0x001, // Interrupt any spell casting
SMARTCAST_TRIGGERED = 0x002, // Triggered (this makes spell cost zero mana and have no cast time)
//CAST_FORCE_CAST = 0x004, // Forces cast even if creature is out of mana or out of range
//CAST_NO_MELEE_IF_OOM = 0x008, // Prevents creature from entering melee if out of mana or out of range
//CAST_FORCE_TARGET_SELF = 0x010, // Forces the target to cast this spell on itself
SMARTCAST_AURA_NOT_PRESENT = 0x020, // Only casts the spell if the target does not have an aura from the spell
SMARTCAST_COMBAT_MOVE = 0x040, // Prevents combat movement if cast successful. Allows movement on range, OOM, LOS
SMARTCAST_THREATLIST_NOT_SINGLE = 0x080, // Only cast if the source's threatlist is higher than one. This includes pets (see Skeram's True Fulfillment)
SMARTCAST_TARGET_POWER_MANA = 0x100 // Only cast if the target has power type mana (e.g. Mana Drain)
};
enum SmartFollowType

View File

@@ -0,0 +1,70 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published by the
* Free Software Foundation; either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "CreatureAI.h"
#include "Define.h"
#include "SmartEnum.h"
#include <stdexcept>
namespace Acore::Impl::EnumUtilsImpl
{
/****************************************************************************\
|* data for enum 'CreatureAI::EvadeReason' in 'CreatureAI.h' auto-generated *|
\****************************************************************************/
template <>
AC_API_EXPORT EnumText EnumUtils<CreatureAI::EvadeReason>::ToString(CreatureAI::EvadeReason value)
{
switch (value)
{
case CreatureAI::EVADE_REASON_NO_HOSTILES: return { "EVADE_REASON_NO_HOSTILES", "EVADE_REASON_NO_HOSTILES", "the creature's threat list is empty" };
case CreatureAI::EVADE_REASON_BOUNDARY: return { "EVADE_REASON_BOUNDARY", "EVADE_REASON_BOUNDARY", "the creature has moved outside its evade boundary" };
case CreatureAI::EVADE_REASON_SEQUENCE_BREAK: return { "EVADE_REASON_SEQUENCE_BREAK", "EVADE_REASON_SEQUENCE_BREAK", "this is a boss and the pre-requisite encounters for engaging it are not defeated yet" };
case CreatureAI::EVADE_REASON_NO_PATH: return { "EVADE_REASON_NO_PATH", "EVADE_REASON_NO_PATH", "the creature was unable to reach its target for over 5 seconds" };
default: throw std::out_of_range("value");
}
}
template <>
AC_API_EXPORT size_t EnumUtils<CreatureAI::EvadeReason>::Count() { return 4; }
template <>
AC_API_EXPORT CreatureAI::EvadeReason EnumUtils<CreatureAI::EvadeReason>::FromIndex(size_t index)
{
switch (index)
{
case 0: return CreatureAI::EVADE_REASON_NO_HOSTILES;
case 1: return CreatureAI::EVADE_REASON_BOUNDARY;
case 2: return CreatureAI::EVADE_REASON_SEQUENCE_BREAK;
case 3: return CreatureAI::EVADE_REASON_NO_PATH;
default: throw std::out_of_range("index");
}
}
template <>
AC_API_EXPORT size_t EnumUtils<CreatureAI::EvadeReason>::ToIndex(CreatureAI::EvadeReason value)
{
switch (value)
{
case CreatureAI::EVADE_REASON_NO_HOSTILES: return 0;
case CreatureAI::EVADE_REASON_BOUNDARY: return 1;
case CreatureAI::EVADE_REASON_SEQUENCE_BREAK: return 2;
case CreatureAI::EVADE_REASON_NO_PATH: return 3;
default: throw std::out_of_range("value");
}
}
}

View File

@@ -82,6 +82,7 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria)
case ACHIEVEMENT_CRITERIA_TYPE_ON_LOGIN:
case ACHIEVEMENT_CRITERIA_TYPE_LOOT_EPIC_ITEM:
case ACHIEVEMENT_CRITERIA_TYPE_RECEIVE_EPIC_ITEM:
case ACHIEVEMENT_CRITERIA_TYPE_OWN_RANK:
break;
default:
if (dataType != ACHIEVEMENT_CRITERIA_DATA_TYPE_SCRIPT)
@@ -757,7 +758,12 @@ void AchievementMgr::SendCriteriaUpdate(AchievementCriteriaEntry const* entry, C
data << uint32(timedCompleted ? 0 : 1); // 1 is for keeping the counter at 0 in client
data.AppendPackedTime(progress->date);
data << uint32(timeElapsed); // time elapsed in seconds
data << uint32(0); // unk
if (sAchievementMgr->IsAverageCriteria(entry))
data << uint32(GameTime::GetGameTime().count() - GetPlayer()->GetCreationTime().count()); // for average achievements
else
data << uint32(timeElapsed); // time elapsed in seconds
GetPlayer()->SendDirectMessage(&data);
}
@@ -881,6 +887,7 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
case ACHIEVEMENT_CRITERIA_TYPE_WON_AUCTIONS: /* FIXME: for online player only currently */
case ACHIEVEMENT_CRITERIA_TYPE_ROLL_NEED:
case ACHIEVEMENT_CRITERIA_TYPE_ROLL_GREED:
case ACHIEVEMENT_CRITERIA_TYPE_ROLL_DISENCHANT:
case ACHIEVEMENT_CRITERIA_TYPE_QUEST_ABANDONED:
case ACHIEVEMENT_CRITERIA_TYPE_FLIGHT_PATHS_TAKEN:
case ACHIEVEMENT_CRITERIA_TYPE_ACCEPTED_SUMMONINGS:
@@ -1147,6 +1154,21 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
SetCriteriaProgress(achievementCriteria, 1, PROGRESS_ACCUMULATE);
break;
}
case ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_RAID:
{
// AchievementMgr::UpdateAchievementCriteria might also be called on login - skip in this case
if (!miscValue1)
continue;
Map const* map = GetPlayer()->IsInWorld() ? GetPlayer()->GetMap() : sMapMgr->FindMap(GetPlayer()->GetMapId(), GetPlayer()->GetInstanceId());
if (!map || !map->IsDungeon())
continue;
if (map->ToInstanceMap()->GetMaxPlayers() != achievementCriteria->complete_raid.groupSize)
continue;
SetCriteriaProgress(achievementCriteria, 1, PROGRESS_ACCUMULATE);
break;
}
case ACHIEVEMENT_CRITERIA_TYPE_KILLED_BY_CREATURE:
// AchievementMgr::UpdateAchievementCriteria might also be called on login - skip in this case
if (!miscValue1)
@@ -1732,6 +1754,16 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
SetCriteriaProgress(achievementCriteria, 1, PROGRESS_ACCUMULATE);
break;
}
case ACHIEVEMENT_CRITERIA_TYPE_OWN_RANK:
{
// those requirements couldn't be found in the dbc
AchievementCriteriaDataSet const* data = sAchievementMgr->GetCriteriaDataSet(achievementCriteria);
if (!data || !data->Meets(GetPlayer(), nullptr))
continue;
SetCriteriaProgress(achievementCriteria, 1);
break;
}
// std case: not exist in DBC, not triggered in code as result
case ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_HEALTH:
case ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_SPELLPOWER:
@@ -1741,8 +1773,6 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
case ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_RATING:
break;
// FIXME: not triggered in code as result, need to implement
case ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_RAID:
case ACHIEVEMENT_CRITERIA_TYPE_OWN_RANK:
case ACHIEVEMENT_CRITERIA_TYPE_TOTAL:
break; // Not implemented yet :(
}
@@ -1907,11 +1937,14 @@ bool AchievementMgr::IsCompletedCriteria(AchievementCriteriaEntry const* achieve
return true;
case ACHIEVEMENT_CRITERIA_TYPE_WIN_ARENA:
return achievementCriteria->win_arena.count && progress->counter >= achievementCriteria->win_arena.count;
case ACHIEVEMENT_CRITERIA_TYPE_OWN_RANK:
return true;
// handle all statistic-only criteria here
case ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_BATTLEGROUND:
case ACHIEVEMENT_CRITERIA_TYPE_DEATH_AT_MAP:
case ACHIEVEMENT_CRITERIA_TYPE_DEATH:
case ACHIEVEMENT_CRITERIA_TYPE_DEATH_IN_DUNGEON:
case ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_RAID:
case ACHIEVEMENT_CRITERIA_TYPE_KILLED_BY_CREATURE:
case ACHIEVEMENT_CRITERIA_TYPE_KILLED_BY_PLAYER:
case ACHIEVEMENT_CRITERIA_TYPE_DEATHS_FROM:
@@ -1936,6 +1969,7 @@ bool AchievementMgr::IsCompletedCriteria(AchievementCriteriaEntry const* achieve
case ACHIEVEMENT_CRITERIA_TYPE_RECEIVE_EPIC_ITEM:
case ACHIEVEMENT_CRITERIA_TYPE_ROLL_NEED:
case ACHIEVEMENT_CRITERIA_TYPE_ROLL_GREED:
case ACHIEVEMENT_CRITERIA_TYPE_ROLL_DISENCHANT:
case ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_HEALTH:
case ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_SPELLPOWER:
case ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_ARMOR:
@@ -2344,7 +2378,11 @@ void AchievementMgr::BuildAllDataPacket(WorldPacket* data) const
*data << uint32(0); /// @todo: This should be 1 if it is a failed timed criteria
data->AppendPackedTime(iter->second.date);
*data << uint32(now - iter->second.date);
*data << uint32(now - iter->second.date);
if (sAchievementMgr->IsAverageCriteria(sAchievementCriteriaStore.LookupEntry(iter->first)))
*data << uint32(now - GetPlayer()->GetCreationTime().count()); // for average achievements
else
*data << uint32(now - iter->second.date);
}
*data << int32(-1);
@@ -2433,6 +2471,19 @@ bool AchievementGlobalMgr::IsStatisticAchievement(AchievementEntry const* achiev
return false;
}
bool AchievementGlobalMgr::IsAverageCriteria(AchievementCriteriaEntry const* criteria) const
{
if ((sAchievementStore.LookupEntry(criteria->referredAchievement))->flags & ACHIEVEMENT_FLAG_AVERAGE)
return true;
if (AchievementEntryList const* achRefList = GetAchievementByReferencedId(criteria->referredAchievement))
for (AchievementEntryList::const_iterator itr = achRefList->begin(); itr != achRefList->end(); ++itr)
if ((*itr)->flags & ACHIEVEMENT_FLAG_AVERAGE)
return true;
return false;
}
bool AchievementGlobalMgr::IsRealmCompleted(AchievementEntry const* achievement) const
{
auto itr = _allCompletedAchievements.find(achievement->ID);
@@ -2724,6 +2775,7 @@ void AchievementGlobalMgr::LoadAchievementCriteriaData()
case ACHIEVEMENT_CRITERIA_TYPE_CAST_SPELL:
case ACHIEVEMENT_CRITERIA_TYPE_BG_OBJECTIVE_CAPTURE:
case ACHIEVEMENT_CRITERIA_TYPE_HONORABLE_KILL:
case ACHIEVEMENT_CRITERIA_TYPE_OWN_RANK:
case ACHIEVEMENT_CRITERIA_TYPE_EQUIP_EPIC_ITEM:
case ACHIEVEMENT_CRITERIA_TYPE_ROLL_NEED_ON_LOOT:
case ACHIEVEMENT_CRITERIA_TYPE_ROLL_GREED_ON_LOOT:

View File

@@ -330,6 +330,7 @@ public:
bool IsStatisticCriteria(AchievementCriteriaEntry const* achievementCriteria) const;
bool IsStatisticAchievement(AchievementEntry const* achievement) const;
bool IsAverageCriteria(AchievementCriteriaEntry const* criteria) const;
[[nodiscard]] AchievementCriteriaEntryList const* GetAchievementCriteriaByType(AchievementCriteriaTypes type) const
{

View File

@@ -761,6 +761,9 @@ bool AuctionHouseObject::BuildListAuctionItems(WorldPacket& data, Player* player
}
AuctionEntry* Aentry = itr->second;
if (!Aentry)
return false;
// Skip expired auctions
if (Aentry->expire_time < curTime.count())
{

View File

@@ -122,4 +122,4 @@ protected:
uint32 HealingDone = 0;
};
#endif // TRINITY_BATTLEGROUND_SCORE_H
#endif // _BATTLEGROUND_SCORE_H

View File

@@ -42,7 +42,7 @@ AC_API_EXPORT EnumText EnumUtils<CreatureFlagsExtra>::ToString(CreatureFlagsExtr
case CREATURE_FLAG_EXTRA_NO_TAUNT: return { "CREATURE_FLAG_EXTRA_NO_TAUNT", "CREATURE_FLAG_EXTRA_NO_TAUNT", "creature is immune to taunt auras and 'attack me' effects" };
case CREATURE_FLAG_EXTRA_NO_MOVE_FLAGS_UPDATE: return { "CREATURE_FLAG_EXTRA_NO_MOVE_FLAGS_UPDATE", "CREATURE_FLAG_EXTRA_NO_MOVE_FLAGS_UPDATE", "creature won't update movement flags" };
case CREATURE_FLAG_EXTRA_GHOST_VISIBILITY: return { "CREATURE_FLAG_EXTRA_GHOST_VISIBILITY", "CREATURE_FLAG_EXTRA_GHOST_VISIBILITY", "creature will only be visible to dead players" };
case CREATURE_FLAG_EXTRA_UNUSED_12: return { "CREATURE_FLAG_EXTRA_UNUSED_12", "CREATURE_FLAG_EXTRA_UNUSED_12", "TODO: Implement CREATURE_FLAG_EXTRA_USE_OFFHAND_ATTACK (creature will use offhand attacks)" };
case CREATURE_FLAG_EXTRA_UNUSED_12: return { "CREATURE_FLAG_EXTRA_UNUSED_12", "CREATURE_FLAG_EXTRA_UNUSED_12", "/ @todo: Implement CREATURE_FLAG_EXTRA_USE_OFFHAND_ATTACK (creature will use offhand attacks)" };
case CREATURE_FLAG_EXTRA_NO_SELL_VENDOR: return { "CREATURE_FLAG_EXTRA_NO_SELL_VENDOR", "CREATURE_FLAG_EXTRA_NO_SELL_VENDOR", "players can't sell items to this vendor" };
case CREATURE_FLAG_EXTRA_IGNORE_COMBAT: return { "CREATURE_FLAG_EXTRA_IGNORE_COMBAT", "CREATURE_FLAG_EXTRA_IGNORE_COMBAT", "" };
case CREATURE_FLAG_EXTRA_WORLDEVENT: return { "CREATURE_FLAG_EXTRA_WORLDEVENT", "CREATURE_FLAG_EXTRA_WORLDEVENT", "custom flag for world event creatures (left room for merging)" };
@@ -55,10 +55,10 @@ AC_API_EXPORT EnumText EnumUtils<CreatureFlagsExtra>::ToString(CreatureFlagsExtr
case CREATURE_FLAG_EXTRA_NO_PLAYER_DAMAGE_REQ: return { "CREATURE_FLAG_EXTRA_NO_PLAYER_DAMAGE_REQ", "CREATURE_FLAG_EXTRA_NO_PLAYER_DAMAGE_REQ", "creature does not need to take player damage for kill credit" };
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_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", "Creature does not call for assistance on initial aggro", "" };
case CREATURE_FLAG_EXTRA_IGNORE_ALL_ASSISTANCE_CALLS: return { "CREATURE_FLAG_EXTRA_IGNORE_ALL_ASSISTANCE_CALLS", "Prevents creature from responding to assistance calls", "" };
case CREATURE_FLAG_DONT_OVERRIDE_ENTRY_SAI: return { "CREATURE_FLAG_DONT_OVERRIDE_ENTRY_SAI", "Creature entry SAI won't be overriden by GUID SAI", "" };
case CREATURE_FLAG_EXTRA_MODULE: return { "CREATURE_FLAG_EXTRA_MODULE", "CREATURE_FLAG_EXTRA_MODULE", "" };
case CREATURE_FLAG_EXTRA_DONT_CALL_ASSISTANCE: return { "CREATURE_FLAG_EXTRA_DONT_CALL_ASSISTANCE", "CREATURE_FLAG_EXTRA_DONT_CALL_ASSISTANCE", "Prevent creatures from calling for assistance on initial aggro" };
case CREATURE_FLAG_EXTRA_IGNORE_ALL_ASSISTANCE_CALLS: return { "CREATURE_FLAG_EXTRA_IGNORE_ALL_ASSISTANCE_CALLS", "CREATURE_FLAG_EXTRA_IGNORE_ALL_ASSISTANCE_CALLS", "Prevents creature from responding to assistance calls" };
case CREATURE_FLAG_DONT_OVERRIDE_ENTRY_SAI: return { "CREATURE_FLAG_DONT_OVERRIDE_ENTRY_SAI", "CREATURE_FLAG_DONT_OVERRIDE_ENTRY_SAI", "Load both ENTRY and GUID specific SAI" };
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_IGNORE_PATHFINDING: return { "CREATURE_FLAG_EXTRA_IGNORE_PATHFINDING", "CREATURE_FLAG_EXTRA_IGNORE_PATHFINDING", "creature ignore pathfinding" };
case CREATURE_FLAG_EXTRA_IMMUNITY_KNOCKBACK: return { "CREATURE_FLAG_EXTRA_IMMUNITY_KNOCKBACK", "CREATURE_FLAG_EXTRA_IMMUNITY_KNOCKBACK", "creature is immune to knockback effects" };

View File

@@ -1725,7 +1725,10 @@ void GameObject::Use(Unit* user)
player->SendCinematicStart(info->camera.cinematicId);
if (info->camera.eventID)
{
GetMap()->ScriptsStart(sEventScripts, info->camera.eventID, player, this);
EventInform(info->camera.eventID);
}
return;
}

View File

@@ -196,10 +196,10 @@ struct Position
float GetRelativeAngle(const Position* pos) const
{
return GetAngle(pos) - m_orientation;
return NormalizeOrientation(GetAngle(pos) - m_orientation);
}
[[nodiscard]] float GetRelativeAngle(float x, float y) const { return GetAngle(x, y) - m_orientation; }
[[nodiscard]] float GetRelativeAngle(float x, float y) const { return NormalizeOrientation(GetAngle(x, y) - m_orientation); }
[[nodiscard]] float ToAbsoluteAngle(float relAngle) const { return NormalizeOrientation(relAngle + m_orientation); }
void GetSinCos(float x, float y, float& vsin, float& vcos) const;

View File

@@ -384,6 +384,8 @@ Player::Player(WorldSession* session): Unit(true), m_mover(this)
_activeCheats = CHEAT_NONE;
m_creationTime = 0s;
_cinematicMgr = new CinematicMgr(this);
m_achievementMgr = new AchievementMgr(this);
@@ -8043,6 +8045,12 @@ void Player::SendLoot(ObjectGuid guid, LootType loot_type)
// need know merged fishing/corpse loot type for achievements
loot->loot_type = loot_type;
if (!sScriptMgr->OnAllowedToLootContainerCheck(this, guid))
{
SendLootError(guid, LOOT_ERROR_DIDNT_KILL);
return;
}
if (permission != NONE_PERMISSION)
{
SetLootGUID(guid);
@@ -13268,6 +13276,8 @@ void Player::SetTitle(CharTitlesEntry const* title, bool lost)
data << uint32(title->bit_index);
data << uint32(lost ? 0 : 1); // 1 - earned, 0 - lost
GetSession()->SendPacket(&data);
UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_OWN_RANK);
}
uint32 Player::GetRuneBaseCooldown(uint8 index, bool skipGrace)
@@ -13544,8 +13554,13 @@ uint32 Player::CalculateTalentsPoints() const
return uint32(talentPointsForLevel * sWorld->getRate(RATE_TALENT));
}
bool Player::canFlyInZone(uint32 mapid, uint32 zone, SpellInfo const* bySpell) const
bool Player::canFlyInZone(uint32 mapid, uint32 zone, SpellInfo const* bySpell)
{
if (!sScriptMgr->OnCanPlayerFlyInZone(this, mapid,zone,bySpell))
{
return false;
}
// continent checked in SpellInfo::CheckLocation at cast and area update
uint32 v_map = GetVirtualMapForMapAndZone(mapid, zone);
if (v_map == 571 && !bySpell->HasAttribute(SPELL_ATTR7_IGNORES_COLD_WEATHER_FLYING_REQUIREMENT))

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