Merge branch 'azerothcore:master' into Playerbot_merge29102025

This commit is contained in:
kadeshar
2025-10-29 06:37:33 +01:00
committed by GitHub
98 changed files with 1384 additions and 570 deletions
+46 -14
View File
@@ -39,16 +39,17 @@ inputs:
runs:
using: composite
steps:
- name: echo cache key
shell: bash
run: echo "Cache key -> ccache:${{ runner.os }}:${{ inputs.CC }}_${{ inputs.CXX }}:${{ inputs.modules }}:pch=${{ inputs.pch }}:${{ github.ref_name }}"
- name: Cache
uses: actions/cache@v4
if: inputs.pch != 'true'
with:
path: ${{ github.workspace }}/var/ccache
# format
# ccache:OS:CC_CXX:MODULES:GITHUB_REF:GITHUB_SHA
key: ccache:${{ runner.os }}:${{ inputs.CC }}_${{ inputs.CXX }}:${{ inputs.modules }}:${{ github.ref }}:${{ github.sha }}
key: ccache:${{ runner.os }}:${{ inputs.CC }}_${{ inputs.CXX }}:${{ inputs.modules }}:pch=${{ inputs.pch }}:${{ github.ref_name }}
restore-keys: |
ccache:${{ runner.os }}:${{ inputs.CC }}_${{ inputs.CXX }}:${{ inputs.modules }}:${{ github.ref }}
ccache:${{ runner.os }}:${{ inputs.CC }}_${{ inputs.CXX }}:${{ inputs.modules }}:pch=${{ inputs.pch }}
ccache:${{ runner.os }}:${{ inputs.CC }}_${{ inputs.CXX }}:${{ inputs.modules }}
ccache:${{ runner.os }}:${{ inputs.CC }}_${{ inputs.CXX }}
@@ -73,12 +74,12 @@ runs:
UBUNTU_VERSION="$(grep VERSION_ID /etc/os-release | cut -f2 -d\")"
source /etc/os-release
if [[ "$VERSION_CODENAME" == "jammy" ]]; then
if [[ "${{ inputs.cc }}" =~ "clang-" ]]; then
CLANG_VERSION="$(echo '${{ inputs.cc }}' | cut -f2 -d\-)"
if [[ "${{ inputs.CC }}" =~ "clang-" ]]; then
CLANG_VERSION="$(echo '${{ inputs.CC }}' | cut -f2 -d\-)"
wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository "deb http://apt.llvm.org/$VERSION_CODENAME/ llvm-toolchain-$VERSION_CODENAME-$CLANG_VERSION main"
sudo apt-get -qq update
sudo apt-get -qq install '${{ inputs.cc }}'
sudo apt-get -qq install '${{ inputs.CC }}'
fi
fi
@@ -87,19 +88,44 @@ runs:
env:
CCACHE_DIR: $GITHUB_WORKSPACE/var/ccache
run: |
cat <<EOF >> $GITHUB_ENV
mkdir -p "$CCACHE_DIR"
cat <<EOF >> "$GITHUB_ENV"
CCACHE_BASEDIR=${GITHUB_WORKSPACE}
CCACHE_DIR=${{ env.CCACHE_DIR }}
CCACHE_MAXSIZE=1000MB
CCACHE_HASHDIR=1
CCACHE_MAXSIZE=5G
CCACHE_SLOPPINESS=pch_defines,time_macros,include_file_mtime
CCACHE_CPP2=true
CCACHE_COMPRESS=1
CCACHE_COMPRESSLEVEL=9
CCACHE_COMPILERCHECK=content
CCACHE_LOGFILE=$CCACHE_DIR/cache.debug
CCACHE_LOGFILE=${{ env.CCACHE_DIR }}/cache.debug
CC=${{ inputs.CC }}
CXX=${{ inputs.CXX }}
EOF
- name: ccache config snapshot
shell: bash
run: |
echo "==== Effective ccache configuration ===="
ccache -p | egrep 'base_dir|hash_dir|compiler_check|sloppiness|max_size' || true
echo
echo "==== Compiler info ===="
which ${{ inputs.CC }} && ${{ inputs.CC }} --version || true
which ${{ inputs.CXX }} && ${{ inputs.CXX }} --version || true
echo
echo "==== Previous cache stats ===="
ccache -s || true
echo
echo "==== Top cache results ===="
grep -o 'result: .*' "$CCACHE_DIR/cache.debug" 2>/dev/null | sort | uniq -c | sort -nr | head || true
- name: reset ccache stats
shell: bash
run: ccache -z || true
- name: Configure
shell: bash
run: |
@@ -107,6 +133,8 @@ runs:
mkdir build
cd build
cmake "$GITHUB_WORKSPACE" \
-DCMAKE_C_COMPILER="${{ inputs.CC }}" \
-DCMAKE_CXX_COMPILER="${{ inputs.CXX }}" \
-DCMAKE_INSTALL_PREFIX="$GITHUB_WORKSPACE/env/dist" \
-DAPPS_BUILD="all" \
-DTOOLS_BUILD=${{ inputs.tools }} \
@@ -116,8 +144,8 @@ runs:
-DCMAKE_BUILD_TYPE="Release" \
-DCMAKE_CXX_COMPILER_LAUNCHER="ccache" \
-DCMAKE_C_COMPILER_LAUNCHER="ccache" \
-DCMAKE_C_FLAGS="-Werror ${{ startsWith(inputs.cc, 'clang') && '-ferror-limit=' || '-fmax-errors=' }}${{inputs.maxerrors}} " \
-DCMAKE_CXX_FLAGS="-Werror ${{ startsWith(inputs.cxx, 'clang') && '-ferror-limit=' || '-fmax-errors=' }}${{inputs.maxerrors}}" \
-DCMAKE_C_FLAGS="-Werror ${{ startsWith(inputs.CC, 'clang') && '-ferror-limit=' || '-fmax-errors=' }}${{inputs.maxerrors}} -fdebug-prefix-map=${GITHUB_WORKSPACE}=." \
-DCMAKE_CXX_FLAGS="-Werror ${{ startsWith(inputs.CXX, 'clang') && '-ferror-limit=' || '-fmax-errors=' }}${{inputs.maxerrors}} -fdebug-prefix-map=${GITHUB_WORKSPACE}=." \
-DBUILD_TESTING="ON" \
-DUSE_SCRIPTPCH=${{ inputs.pch == 'true' && 'ON' || '' }} \
-DUSE_COREPCH=${{ inputs.pch == 'true' && 'ON' || '' }} \
@@ -190,3 +218,7 @@ runs:
else
exit 0
fi
- name: ccache stats
shell: bash
run: ccache -s || true
+5 -1
View File
@@ -10,9 +10,13 @@ on:
- synchronize
concurrency:
group: ${{ github.head_ref }} || concat(${{ github.ref }}, ${{ github.workflow }})
group: ${{ github.head_ref }} || concat(${{ github.ref_name }}, ${{ github.workflow }})
cancel-in-progress: true
permissions:
actions: write
contents: read
jobs:
build:
strategy:
+5 -1
View File
@@ -10,9 +10,13 @@ on:
- synchronize
concurrency:
group: ${{ github.head_ref }} || concat(${{ github.ref }}, ${{ github.workflow }})
group: ${{ github.head_ref }} || concat(${{ github.ref_name }}, ${{ github.workflow }})
cancel-in-progress: true
permissions:
actions: write
contents: read
jobs:
build:
strategy:
+5 -1
View File
@@ -19,8 +19,12 @@ on:
- 'src/server/shared/**/*'
- 'src/tools/**/*'
permissions:
actions: write
contents: read
concurrency:
group: ${{ github.head_ref }} || concat(${{ github.ref }}, ${{ github.workflow }})
group: ${{ github.head_ref }} || concat(${{ github.ref_name }}, ${{ github.workflow }})
cancel-in-progress: true
jobs:
+124 -1
View File
@@ -16,9 +16,13 @@ on:
workflow_dispatch:
concurrency:
group: ${{ github.head_ref }} || concat(${{ github.ref }}, ${{ github.workflow }})
group: ${{ github.head_ref }} || concat(${{ github.ref_name }}, ${{ github.workflow }})
cancel-in-progress: true
permissions:
actions: write
contents: read
env:
CONTINUOUS_INTEGRATION: true
MYSQL_ROOT_PASSWORD: root
@@ -72,6 +76,113 @@ jobs:
with:
fetch-depth: 1
- name: Install ccache
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y ccache
ccache --version
# Detect the compilers that acore.sh / CMake will end up using.
# We record both the binary name and a short version tag for the cache key.
- name: Detect compiler
id: detect
shell: bash
run: |
set -euo pipefail
CC_BIN="${CC:-}"
CXX_BIN="${CXX:-}"
[[ -z "$CC_BIN" ]] && CC_BIN="$(command -v clang || command -v gcc)"
[[ -z "$CXX_BIN" ]] && CXX_BIN="$(command -v clang++ || command -v g++)"
make_ver_id() {
local bin="$1"; local base="$(basename "$bin")"
case "$base" in
clang)
maj="$("$bin" -dumpversion 2>/dev/null | cut -d. -f1)"; [[ -z "$maj" ]] && maj="$( "$bin" --version | sed -n 's/.*version \([0-9][0-9]*\).*/\1/p' | head -1 )"
echo "clang-${maj:-unknown}"
;;
clang++)
maj="$("$bin" -dumpversion 2>/dev/null | cut -d. -f1)"; [[ -z "$maj" ]] && maj="$( "$bin" --version | sed -n 's/.*version \([0-9][0-9]*\).*/\1/p' | head -1 )"
echo "clang++-${maj:-unknown}"
;;
gcc)
maj="$("$bin" -dumpfullversion -dumpversion 2>/dev/null || "$bin" -dumpversion 2>/dev/null)"; maj="${maj%%.*}"
echo "gcc-${maj:-unknown}"
;;
g++)
maj="$("$bin" -dumpfullversion -dumpversion 2>/dev/null || "$bin" -dumpversion 2>/dev/null)"; maj="${maj%%.*}"
echo "g++-${maj:-unknown}"
;;
*)
echo "$base"
;;
esac
}
echo "cc_id=$(make_ver_id "$CC_BIN")" >> "$GITHUB_OUTPUT"
echo "cxx_id=$(make_ver_id "$CXX_BIN")" >> "$GITHUB_OUTPUT"
echo "Detected: $CC_BIN, $CXX_BIN"
- name: Prepare ccache dir
shell: bash
run: mkdir -p "${{ github.workspace }}/var/ccache"
- name: Echo cache key
shell: bash
run: echo "Cache key -> ccache:${{ runner.os }}:${{ steps.detect.outputs.cc_id }}_${{ steps.detect.outputs.cxx_id }}:${{ github.ref_name }}"
- name: Restore ccache
id: restore_ccache
uses: actions/cache/restore@v4
with:
path: ${{ github.workspace }}/var/ccache
key: ccache:${{ runner.os }}:${{ steps.detect.outputs.cc_id }}_${{ steps.detect.outputs.cxx_id }}:${{ github.ref_name }}
restore-keys: |
ccache:${{ runner.os }}:${{ steps.detect.outputs.cc_id }}_${{ steps.detect.outputs.cxx_id }}:true:pch=false:
ccache:${{ runner.os }}:${{ steps.detect.outputs.cc_id }}_${{ steps.detect.outputs.cxx_id }}:false:pch=false:
ccache:${{ runner.os }}:${{ steps.detect.outputs.cc_id }}_${{ steps.detect.outputs.cxx_id }}:true:pch=true:
ccache:${{ runner.os }}:${{ steps.detect.outputs.cc_id }}_${{ steps.detect.outputs.cxx_id }}:false:pch=true:
ccache:${{ runner.os }}:${{ steps.detect.outputs.cc_id }}_${{ steps.detect.outputs.cxx_id }}:true:
ccache:${{ runner.os }}:${{ steps.detect.outputs.cc_id }}_${{ steps.detect.outputs.cxx_id }}:false:
ccache:${{ runner.os }}:${{ steps.detect.outputs.cc_id }}_${{ steps.detect.outputs.cxx_id }}:
- name: Setup ccache env
shell: bash
env:
CCACHE_DIR: ${{ github.workspace }}/var/ccache
run: |
mkdir -p "$CCACHE_DIR"
cat <<EOF >> "$GITHUB_ENV"
CCACHE_BASEDIR=${{ github.workspace }}
CCACHE_DIR=${{ github.workspace }}/var/ccache
CCACHE_HASHDIR=1
CCACHE_MAXSIZE=5G
CCACHE_SLOPPINESS=pch_defines,time_macros,include_file_mtime
CCACHE_COMPRESS=1
CCACHE_COMPRESSLEVEL=9
CCACHE_COMPILERCHECK=content
CCACHE_LOGFILE=${{ github.workspace }}/var/ccache/cache.debug
CMAKE_C_COMPILER_LAUNCHER=ccache
CMAKE_CXX_COMPILER_LAUNCHER=ccache
EOF
- name: ccache snapshot (before)
shell: bash
run: |
echo "==== Effective ccache configuration ===="
ccache -p | egrep 'base_dir|hash_dir|compiler_check|sloppiness|max_size' || true
echo
echo "==== Previous cache stats ===="
ccache -s || true
echo
echo "==== Top cache results (from prior runs) ===="
grep -o 'result: .*' "${{ github.workspace }}/var/ccache/cache.debug" 2>/dev/null | sort | uniq -c | sort -nr | head || true
- name: Reset ccache stats
shell: bash
run: ccache -z || true
- name: Configure AzerothCore settings
run: |
touch conf/config.sh
@@ -154,3 +265,15 @@ jobs:
./acore.sh sm delete authserver
timeout-minutes: 30
continue-on-error: false
# save only if we didn't hit the cache
- name: Save ccache
if: steps.restore_ccache.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: ${{ github.workspace }}/var/ccache
key: ccache:${{ runner.os }}:${{ steps.detect.outputs.cc_id }}_${{ steps.detect.outputs.cxx_id }}:${{ github.ref_name }}
- name: ccache stats (after)
shell: bash
run: ccache -s || true
+2 -2
View File
@@ -9,7 +9,7 @@ on:
- synchronize
concurrency:
group: ${{ github.head_ref }} || concat(${{ github.ref }}, ${{ github.workflow }})
group: ${{ github.head_ref }} || concat(${{ github.ref_name }}, ${{ github.workflow }})
cancel-in-progress: true
env:
@@ -115,6 +115,6 @@ jobs:
event-type: azerothcore-new-images
client-payload: >
{
"ref": "${{ github.ref }}",
"ref": "${{ github.ref_name }}",
"sha": "${{ github.sha }}"
}
+13 -3
View File
@@ -6,9 +6,13 @@ on:
branches: [ "Playerbot" ]
concurrency:
group: ${{ github.head_ref }} || concat(${{ github.ref }}, ${{ github.workflow }})
group: ${{ github.head_ref }} || concat(${{ github.ref_name }}, ${{ github.workflow }})
cancel-in-progress: true
permissions:
actions: write
contents: read
jobs:
macos-build:
strategy:
@@ -24,13 +28,19 @@ jobs:
uses: actions/cache@v4
with:
path: ~/Library/Caches/ccache
key: ccache:${{ matrix.os }}:${{ github.ref }}:${{ github.sha }}
key: ccache:${{ matrix.os }}:${{ github.ref_name }}
restore-keys: |
ccache:${{ matrix.os }}:${{ github.ref }}
ccache:${{ matrix.os }}:${{ github.ref_name }}
ccache:${{ matrix.os }}
- name: reset ccache stats
shell: bash
run: ccache -z || true
- name: Install latest bash
run: brew install bash
- name: Configure OS
run: source ./acore.sh install-deps
- name: Build
run: source ./apps/ci/mac/ci-compile.sh
- name: ccache stats
shell: bash
run: ccache -s || true
+1 -1
View File
@@ -9,7 +9,7 @@ on:
- synchronize
concurrency:
group: ${{ github.head_ref }} || concat(${{ github.ref }}, ${{ github.workflow }})
group: ${{ github.head_ref }} || concat(${{ github.ref_name }}, ${{ github.workflow }})
cancel-in-progress: true
jobs:
+1 -1
View File
@@ -6,7 +6,7 @@ on:
branches: [ "Playerbot" ]
concurrency:
group: ${{ github.head_ref }} || concat(${{ github.ref }}, ${{ github.workflow }})
group: ${{ github.head_ref }} || concat(${{ github.ref_name }}, ${{ github.workflow }})
cancel-in-progress: true
jobs:
@@ -0,0 +1,8 @@
-- DB update 2025_10_25_00 -> 2025_10_25_01
--
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 27970;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 27970);
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
(27970, 0, 0, 0, 0, 0, 100, 2, 3000, 9000, 16000, 16000, 0, 0, 11, 51819, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Raging Construct - In Combat - Cast \'Potent Jolt\' (Normal Dungeon)'),
(27970, 0, 1, 0, 0, 0, 100, 4, 3000, 9000, 16000, 16000, 0, 0, 11, 61514, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Raging Construct - In Combat - Cast \'Potent Jolt\' (Heroic Dungeon)'),
(27970, 0, 2, 0, 0, 0, 100, 6, 4000, 7000, 9000, 12000, 0, 0, 11, 28168, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Raging Construct - In Combat - Cast \'Arcing Smash\' (Dungeon)');
@@ -0,0 +1,6 @@
-- DB update 2025_10_25_01 -> 2025_10_26_00
--
DELETE FROM `creature_formations` WHERE `leaderGUID` = 126740 OR `memberGUID` = 126740;
INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`, `point_1`, `point_2`) VALUES
(126740, 126740, 0, 0, 3, 0, 0),
(126740, 126741, 0, 0, 3, 0, 0);
@@ -0,0 +1,16 @@
-- DB update 2025_10_26_00 -> 2025_10_26_01
-- Dark Rune Elementalist
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 27962;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 27962);
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
(27962, 0, 1, 0, 0, 0, 100, 6, 5000, 9000, 16000, 20000, 0, 0, 11, 51475, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Dark Rune Elementalist - In Combat - Cast \'Summon Air Elemental\' (Dungeon)'),
(27962, 0, 2, 0, 1, 0, 100, 2, 1000, 1000, 600000, 600000, 0, 0, 11, 51776, 32, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Dark Rune Elementalist - Out of Combat - Cast \'Lightning Shield\' (Normal Dungeon)'),
(27962, 0, 3, 0, 0, 0, 100, 2, 0, 0, 20000, 30000, 0, 0, 11, 51776, 32, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Dark Rune Elementalist - In Combat - Cast \'Lightning Shield\' (Normal Dungeon)'),
(27962, 0, 4, 0, 0, 0, 100, 6, 1000, 10000, 31000, 42000, 0, 0, 11, 32693, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Dark Rune Elementalist - In Combat - Cast \'Arcane Haste\' (Dungeon)'),
(27962, 0, 5, 0, 1, 0, 100, 4, 1000, 1000, 600000, 600000, 0, 0, 11, 59025, 32, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Dark Rune Elementalist - Out of Combat - Cast \'Lightning Shield\' (Heroic Dungeon)'),
(27962, 0, 6, 0, 0, 0, 100, 4, 0, 0, 20000, 30000, 0, 0, 11, 59025, 32, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Dark Rune Elementalist - In Combat - Cast \'Lightning Shield\' (Heroic Dungeon)');
-- lesser air elemental
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 28384;
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 28384) 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`, `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
(28384, 0, 0, 0, 0, 0, 100, 6, 3000, 10000, 5000, 9000, 0, 0, 11, 15801, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Lesser Air Elemental - In Combat - Cast \'Lightning Bolt\'');
@@ -0,0 +1,15 @@
-- DB update 2025_10_26_01 -> 2025_10_26_02
-- `point`s had gaps causing core code needing to be extra complicated
UPDATE `waypoint_data` SET `point`=1 WHERE `id`=1336190 AND `point`=2 AND `action`=1336191;
UPDATE `waypoint_data` SET `point`=2 WHERE `id`=1336190 AND `point`=4 AND `action`=1336192;
UPDATE `waypoint_data` SET `point`=3 WHERE `id`=1336190 AND `point`=6 AND `action`=1336192;
UPDATE `waypoint_data` SET `point`=`point`-1 WHERE `id`=795240 AND `point`>4;
UPDATE `waypoint_data` SET `point`=`point`-1 WHERE `id`=497520 AND `point`>21;
UPDATE `waypoint_data` SET `point`=`point`-1 WHERE `id`=497520 AND `point`>33;
UPDATE `waypoint_data` SET `point`=`point`-15 WHERE `id`=1873101 AND `point`>0;
UPDATE `waypoint_data` SET `point`=`point`-1 WHERE `id`=1873101 AND `point`>5;
UPDATE `waypoint_data` SET `point`=`point`-1 WHERE `id`=1110490 AND `point`>187;
@@ -0,0 +1,6 @@
-- DB update 2025_10_26_02 -> 2025_10_26_03
--
DELETE FROM `creature_formations` WHERE (`leaderGUID` = 126747) AND (`memberGUID` IN (126747, 126748));
INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`, `point_1`, `point_2`) VALUES
(126747, 126747, 0, 0, 3, 0, 0),
(126747, 126748, 0, 0, 3, 0, 0);
@@ -0,0 +1,5 @@
-- DB update 2025_10_26_03 -> 2025_10_28_00
--
DELETE FROM `creature_template_addon` WHERE (`entry` = 30966);
INSERT INTO `creature_template_addon` (`entry`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `visibilityDistanceType`, `auras`) VALUES
(30966, 0, 0, 0, 0, 0, 0, '61367');
@@ -0,0 +1,9 @@
-- DB update 2025_10_28_00 -> 2025_10_28_01
--
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 27972;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 27972);
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
(27972, 0, 0, 0, 0, 0, 100, 2, 3000, 6000, 9000, 15000, 0, 0, 11, 52383, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 'Lightning Construct - In Combat - Cast \'Chain Lightning\' (No Repeat) (Dungeon/Normal)'),
(27972, 0, 1, 0, 0, 0, 100, 4, 3000, 6000, 9000, 15000, 0, 0, 11, 61528, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 'Lightning Construct - In Combat - Cast \'Chain Lightning\' (No Repeat) (Dungeon/Heroic)'),
(27972, 0, 2, 0, 0, 0, 100, 515, 7000, 28000, 14000, 27000, 0, 0, 11, 52341, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Lightning Construct - On Just Died - Cast \'Electrical Overload\' (Dungeon/Normal)'),
(27972, 0, 3, 0, 0, 0, 100, 517, 7000, 28000, 14000, 27000, 0, 0, 11, 59038, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Lightning Construct - On Just Died - Cast \'Electrical Overload\' (Dungeon/Heroic)');
@@ -0,0 +1,5 @@
-- DB update 2025_10_28_01 -> 2025_10_28_02
--
DELETE FROM `creature_template_addon` WHERE (`entry` = 30967);
INSERT INTO `creature_template_addon` (`entry`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `visibilityDistanceType`, `auras`) VALUES
(30967, 0, 0, 0, 0, 0, 0, '59143');
@@ -0,0 +1,5 @@
-- DB update 2025_10_28_02 -> 2025_10_28_03
--
DELETE FROM `creature_template_addon` WHERE (`entry` = 30964);
INSERT INTO `creature_template_addon` (`entry`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `visibilityDistanceType`, `auras`) VALUES
(30964, 0, 0, 0, 0, 0, 0, '59140');
+578
View File
@@ -0,0 +1,578 @@
-- DB update 2025_10_28_03 -> 2025_10_28_04
-- Set Waypoint (Goblin Racer)
DELETE FROM `waypoints` WHERE (`entry` IN (425100, 425101, 425102));
DELETE FROM `waypoint_data` WHERE (`id` IN (425100, 425101, 425102));
INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_type`, `action`, `action_chance`, `wpguid`) VALUES
(425100, 1, -6225.51, -3941.11, -58.7498, NULL, 0, 0, 0, 100, 0),
(425100, 2, -6236.21, -3935.4, -58.7498, NULL, 0, 0, 0, 100, 0),
(425100, 3, -6247.18, -3931.45, -58.7498, NULL, 0, 0, 0, 100, 0),
(425100, 4, -6258.18, -3927.22, -58.7498, NULL, 0, 0, 0, 100, 0),
(425100, 5, -6269.23, -3923.11, -58.7547, NULL, 0, 0, 0, 100, 0),
(425100, 6, -6279.39, -3918.62, -59.3734, NULL, 0, 0, 0, 100, 0),
(425100, 7, -6282.4, -3913.51, -60.9864, NULL, 0, 0, 0, 100, 0),
(425100, 8, -6281.27, -3907.82, -62.2515, NULL, 0, 0, 0, 100, 0),
(425100, 9, -6275.9, -3905.8, -62.1365, NULL, 0, 0, 0, 100, 0),
(425100, 10, -6263.77, -3905.9, -61.6845, NULL, 0, 0, 0, 100, 0),
(425100, 11, -6253.39, -3906.03, -61.3059, NULL, 0, 0, 0, 100, 0),
(425100, 12, -6239.63, -3906.45, -60.7614, NULL, 0, 0, 0, 100, 0),
(425100, 13, -6225.17, -3906.85, -60.5172, NULL, 0, 0, 0, 100, 0),
(425100, 14, -6210.59, -3906.98, -60.3689, NULL, 0, 0, 0, 100, 0),
(425100, 15, -6199.5, -3906.93, -60.2643, NULL, 0, 0, 0, 100, 0),
(425101, 1, -6191.34, -3907.16, -60.1596, NULL, 0, 1, 0, 100, 0),
(425101, 2, -6182.71, -3907.32, -60.0754, NULL, 0, 1, 0, 100, 0),
(425101, 3, -6173.72, -3907.54, -59.989, NULL, 0, 1, 0, 100, 0),
(425101, 4, -6165.55, -3907.61, -59.9135, NULL, 0, 1, 0, 100, 0),
(425101, 5, -6157.03, -3907.58, -59.8541, NULL, 0, 1, 0, 100, 0),
(425101, 6, -6149.33, -3907.56, -59.869, NULL, 0, 1, 0, 100, 0),
(425101, 7, -6141.87, -3907.27, -59.8809, NULL, 0, 1, 0, 100, 0),
(425101, 8, -6134.19, -3906.66, -59.8966, NULL, 0, 1, 0, 100, 0),
(425101, 9, -6126.41, -3906, -59.9151, NULL, 0, 1, 0, 100, 0),
(425101, 10, -6118.21, -3904.83, -59.9276, NULL, 0, 1, 0, 100, 0),
(425101, 11, -6109.64, -3903.1, -59.9142, NULL, 0, 1, 0, 100, 0),
(425101, 12, -6101.99, -3900.99, -59.8983, NULL, 0, 1, 0, 100, 0),
(425101, 13, -6094.14, -3898.34, -59.9102, NULL, 0, 1, 0, 100, 0),
(425101, 14, -6086.04, -3895.35, -59.9533, NULL, 0, 1, 0, 100, 0),
(425101, 15, -6078.54, -3892.43, -60.0029, NULL, 0, 1, 0, 100, 0),
(425101, 16, -6071.29, -3889.5, -60.0037, NULL, 0, 1, 0, 100, 0),
(425101, 17, -6064.36, -3886.7, -60.0814, NULL, 0, 1, 0, 100, 0),
(425101, 18, -6056.71, -3883.55, -60.0903, NULL, 0, 1, 0, 100, 0),
(425101, 19, -6048.43, -3880.06, -60.0819, NULL, 0, 1, 0, 100, 0),
(425101, 20, -6041.12, -3876.97, -60.2107, NULL, 0, 1, 0, 100, 0),
(425101, 21, -6033.99, -3873.77, -60.2425, NULL, 0, 1, 0, 100, 0),
(425101, 22, -6026.41, -3870.14, -60.3019, NULL, 0, 1, 0, 100, 0),
(425101, 23, -6018.84, -3866.51, -60.3987, NULL, 0, 1, 0, 100, 0),
(425101, 24, -6010.52, -3862.53, -60.463, NULL, 0, 1, 0, 100, 0),
(425101, 25, -6001.92, -3858.92, -60.4977, NULL, 0, 1, 0, 100, 0),
(425101, 26, -5994, -3855.5, -60.537, NULL, 0, 1, 0, 100, 0),
(425101, 27, -5986.28, -3852.17, -60.5544, NULL, 0, 1, 0, 100, 0),
(425101, 28, -5977.79, -3848.58, -60.6569, NULL, 0, 1, 0, 100, 0),
(425101, 29, -5969.48, -3845.51, -60.6788, NULL, 0, 1, 0, 100, 0),
(425101, 30, -5961.47, -3842.31, -60.6862, NULL, 0, 1, 0, 100, 0),
(425101, 31, -5953.81, -3838.1, -60.7637, NULL, 0, 1, 0, 100, 0),
(425101, 32, -5946.88, -3833.78, -60.7016, NULL, 0, 1, 0, 100, 0),
(425101, 33, -5939.37, -3828.83, -60.5285, NULL, 0, 1, 0, 100, 0),
(425101, 34, -5932.05, -3824.73, -60.3301, NULL, 0, 1, 0, 100, 0),
(425101, 35, -5924.41, -3820.69, -60.1505, NULL, 0, 1, 0, 100, 0),
(425101, 36, -5916.7, -3816.31, -59.9721, NULL, 0, 1, 0, 100, 0),
(425101, 37, -5908.94, -3811.77, -59.7802, NULL, 0, 1, 0, 100, 0),
(425101, 38, -5901.17, -3807.78, -59.599, NULL, 0, 1, 0, 100, 0),
(425101, 39, -5892.77, -3803.96, -59.7475, NULL, 0, 1, 0, 100, 0),
(425101, 40, -5884.03, -3800.4, -59.9015, NULL, 0, 1, 0, 100, 0),
(425101, 41, -5875.09, -3797.35, -59.7717, NULL, 0, 1, 0, 100, 0),
(425101, 42, -5866.7, -3794.49, -59.9663, NULL, 0, 1, 0, 100, 0),
(425101, 43, -5857.66, -3791.74, -60.0965, NULL, 0, 1, 0, 100, 0),
(425101, 44, -5848.34, -3789.6, -60.2175, NULL, 0, 1, 0, 100, 0),
(425101, 45, -5838.75, -3788.36, -60.7136, NULL, 0, 1, 0, 100, 0),
(425101, 46, -5829.42, -3788.33, -61.4276, NULL, 0, 1, 0, 100, 0),
(425101, 47, -5819.15, -3788.47, -61.2672, NULL, 0, 1, 0, 100, 0),
(425101, 48, -5808.65, -3788.6, -61.2449, NULL, 0, 1, 0, 100, 0),
(425101, 49, -5799.44, -3788.72, -61.4032, NULL, 0, 1, 0, 100, 0),
(425101, 50, -5790.11, -3788.86, -61.5079, NULL, 0, 1, 0, 100, 0),
(425101, 51, -5780.1, -3789.52, -61.7291, NULL, 0, 1, 0, 100, 0),
(425101, 52, -5770.1, -3790.31, -61.6892, NULL, 0, 1, 0, 100, 0),
(425101, 53, -5760.91, -3791.05, -61.4138, NULL, 0, 1, 0, 100, 0),
(425101, 54, -5751.14, -3791.82, -61.2425, NULL, 0, 1, 0, 100, 0),
(425101, 55, -5741.44, -3793.19, -60.7875, NULL, 0, 1, 0, 100, 0),
(425101, 56, -5731.58, -3795.02, -60.5013, NULL, 0, 1, 0, 100, 0),
(425101, 57, -5722.71, -3797.45, -60.7248, NULL, 0, 1, 0, 100, 0),
(425101, 58, -5714.12, -3801.59, -60.7033, NULL, 0, 1, 0, 100, 0),
(425101, 59, -5705.75, -3807.33, -61.276, NULL, 0, 1, 0, 100, 0),
(425101, 60, -5698.13, -3813.49, -61.5311, NULL, 0, 1, 0, 100, 0),
(425101, 61, -5690.2, -3821.38, -61.8514, NULL, 0, 1, 0, 100, 0),
(425101, 62, -5683.57, -3828.12, -62.058, NULL, 0, 1, 0, 100, 0),
(425101, 63, -5676.96, -3836.11, -62.4184, NULL, 0, 1, 0, 100, 0),
(425101, 64, -5672.08, -3844.19, -62.5536, NULL, 0, 1, 0, 100, 0),
(425101, 65, -5667.64, -3852.92, -62.3648, NULL, 0, 1, 0, 100, 0),
(425101, 66, -5663.64, -3861.98, -62.1911, NULL, 0, 1, 0, 100, 0),
(425101, 67, -5660.23, -3870.42, -62.0313, NULL, 0, 1, 0, 100, 0),
(425101, 68, -5656.72, -3879.57, -61.9076, NULL, 0, 1, 0, 100, 0),
(425101, 69, -5653.92, -3888.84, -61.8135, NULL, 0, 1, 0, 100, 0),
(425101, 70, -5652.15, -3898.59, -61.7162, NULL, 0, 1, 0, 100, 0),
(425101, 71, -5651.03, -3908.67, -61.5772, NULL, 0, 1, 0, 100, 0),
(425101, 72, -5650.91, -3918.93, -61.4799, NULL, 0, 1, 0, 100, 0),
(425101, 73, -5651.61, -3929.06, -61.3575, NULL, 0, 1, 0, 100, 0),
(425101, 74, -5652.3, -3939.18, -61.2442, NULL, 0, 1, 0, 100, 0),
(425101, 75, -5652.61, -3949.91, -61.1983, NULL, 0, 1, 0, 100, 0),
(425101, 76, -5652.73, -3960.29, -61.1905, NULL, 0, 1, 0, 100, 0),
(425101, 77, -5652.62, -3969.86, -61.1821, NULL, 0, 1, 0, 100, 0),
(425101, 78, -5652.49, -3980, -61.1733, NULL, 0, 1, 0, 100, 0),
(425101, 79, -5652.18, -3989.45, -61.1665, NULL, 0, 1, 0, 100, 0),
(425101, 80, -5651.97, -3999, -61.1476, NULL, 0, 1, 0, 100, 0),
(425101, 81, -5652.08, -4007.87, -61.1334, NULL, 0, 1, 0, 100, 0),
(425101, 82, -5652.02, -4017.67, -61.138, NULL, 0, 1, 0, 100, 0),
(425101, 83, -5651.95, -4027.7, -61.1301, NULL, 0, 1, 0, 100, 0),
(425101, 84, -5651.95, -4037.85, -61.1205, NULL, 0, 1, 0, 100, 0),
(425101, 85, -5652.04, -4048.35, -61.1178, NULL, 0, 1, 0, 100, 0),
(425101, 86, -5652.13, -4058.26, -61.198, NULL, 0, 1, 0, 100, 0),
(425101, 87, -5652.52, -4068.28, -61.2569, NULL, 0, 1, 0, 100, 0),
(425101, 88, -5652.11, -4077.77, -61.325, NULL, 0, 1, 0, 100, 0),
(425101, 89, -5651.96, -4088.15, -61.4121, NULL, 0, 1, 0, 100, 0),
(425101, 90, -5652.17, -4098.18, -61.4581, NULL, 0, 1, 0, 100, 0),
(425101, 91, -5654.03, -4107.79, -61.4934, NULL, 0, 1, 0, 100, 0),
(425101, 92, -5657.23, -4117.03, -61.52, NULL, 0, 1, 0, 100, 0),
(425101, 93, -5661.96, -4126.92, -61.5754, NULL, 0, 1, 0, 100, 0),
(425101, 94, -5667.81, -4136.45, -61.6158, NULL, 0, 1, 0, 100, 0),
(425101, 95, -5674.38, -4145.07, -61.4887, NULL, 0, 1, 0, 100, 0),
(425101, 96, -5681.9, -4152.55, -61.1095, NULL, 0, 1, 0, 100, 0),
(425101, 97, -5689.64, -4159.46, -60.7022, NULL, 0, 1, 0, 100, 0),
(425101, 98, -5697.77, -4165.15, -60.3832, NULL, 0, 1, 0, 100, 0),
(425101, 99, -5707.17, -4170.99, -60.7134, NULL, 0, 1, 0, 100, 0),
(425101, 100, -5717.18, -4175.44, -60.9908, NULL, 0, 1, 0, 100, 0),
(425101, 101, -5727.36, -4179.17, -61.2624, NULL, 0, 1, 0, 100, 0),
(425101, 102, -5738.05, -4182.49, -61.3718, NULL, 0, 1, 0, 100, 0),
(425101, 103, -5749.12, -4185.79, -61.4358, NULL, 0, 1, 0, 100, 0),
(425101, 104, -5760.01, -4188.84, -61.4949, NULL, 0, 1, 0, 100, 0),
(425101, 105, -5771, -4191.55, -61.5739, NULL, 0, 1, 0, 100, 0),
(425101, 106, -5782.2, -4193.87, -61.4574, NULL, 0, 1, 0, 100, 0),
(425101, 107, -5793.75, -4195.5, -61.2659, NULL, 0, 1, 0, 100, 0),
(425101, 108, -5804.87, -4196.79, -61.4307, NULL, 0, 1, 0, 100, 0),
(425101, 109, -5816.49, -4197.87, -61.7136, NULL, 0, 1, 0, 100, 0),
(425101, 110, -5827.89, -4198.71, -61.9537, NULL, 0, 1, 0, 100, 0),
(425101, 111, -5838.83, -4199.43, -62.2257, NULL, 0, 1, 0, 100, 0),
(425101, 112, -5860.84, -4200.84, -62.6325, NULL, 0, 1, 0, 100, 0),
(425101, 113, -5871.57, -4201.42, -62.6989, NULL, 0, 1, 0, 100, 0),
(425101, 114, -5882.64, -4202.02, -62.7864, NULL, 0, 1, 0, 100, 0),
(425101, 115, -5892.89, -4202.57, -62.8554, NULL, 0, 1, 0, 100, 0),
(425101, 116, -5904.42, -4203.16, -62.9321, NULL, 0, 1, 0, 100, 0),
(425101, 117, -5915.38, -4203.5, -62.8121, NULL, 0, 1, 0, 100, 0),
(425101, 118, -5925.06, -4203.69, -62.6909, NULL, 0, 1, 0, 100, 0),
(425101, 119, -5935.91, -4203.8, -62.5702, NULL, 0, 1, 0, 100, 0),
(425101, 120, -5946.41, -4203.92, -62.4459, NULL, 0, 1, 0, 100, 0),
(425101, 121, -5956.56, -4203.88, -62.3288, NULL, 0, 1, 0, 100, 0),
(425101, 122, -5967.76, -4203.6, -62.2098, NULL, 0, 1, 0, 100, 0),
(425101, 123, -5978.13, -4203.21, -62.2635, NULL, 0, 1, 0, 100, 0),
(425101, 124, -5988.37, -4202.45, -62.3194, NULL, 0, 1, 0, 100, 0),
(425101, 125, -5999.3, -4201.53, -62.3791, NULL, 0, 1, 0, 100, 0),
(425101, 126, -6009.4, -4200.55, -62.4333, NULL, 0, 1, 0, 100, 0),
(425101, 127, -6019.49, -4199.46, -62.5019, NULL, 0, 1, 0, 100, 0),
(425101, 128, -6030.61, -4198.15, -62.561, NULL, 0, 1, 0, 100, 0),
(425101, 129, -6041.04, -4196.91, -62.6382, NULL, 0, 1, 0, 100, 0),
(425101, 130, -6051.82, -4195.7, -62.6637, NULL, 0, 1, 0, 100, 0),
(425101, 131, -6061.92, -4194.74, -62.4942, NULL, 0, 1, 0, 100, 0),
(425101, 132, -6072.04, -4193.86, -62.2556, NULL, 0, 1, 0, 100, 0),
(425101, 133, -6082.05, -4193.19, -62.0819, NULL, 0, 1, 0, 100, 0),
(425101, 134, -6090.91, -4192.73, -62.0193, NULL, 0, 1, 0, 100, 0),
(425101, 135, -6101.39, -4192.19, -62.2437, NULL, 0, 1, 0, 100, 0),
(425101, 136, -6111.76, -4191.65, -62.4711, NULL, 0, 1, 0, 100, 0),
(425101, 137, -6121.08, -4191.3, -62.6608, NULL, 0, 1, 0, 100, 0),
(425101, 138, -6132.16, -4191.27, -62.4196, NULL, 0, 1, 0, 100, 0),
(425101, 139, -6142.66, -4191.63, -62.1792, NULL, 0, 1, 0, 100, 0),
(425101, 140, -6152.66, -4192.38, -61.9736, NULL, 0, 1, 0, 100, 0),
(425101, 141, -6163.01, -4193.25, -61.7382, NULL, 0, 1, 0, 100, 0),
(425101, 142, -6173, -4194.25, -61.7186, NULL, 0, 1, 0, 100, 0),
(425101, 143, -6183.19, -4195.51, -61.6798, NULL, 0, 1, 0, 100, 0),
(425101, 144, -6194.04, -4197.1, -61.656, NULL, 0, 1, 0, 100, 0),
(425101, 145, -6204.15, -4198.82, -61.6283, NULL, 0, 1, 0, 100, 0),
(425101, 146, -6214.13, -4200.68, -61.5886, NULL, 0, 1, 0, 100, 0),
(425101, 147, -6224.52, -4203.34, -61.6324, NULL, 0, 1, 0, 100, 0),
(425101, 148, -6234.1, -4205.92, -61.6652, NULL, 0, 1, 0, 100, 0),
(425101, 149, -6244.13, -4208.61, -61.7164, NULL, 0, 1, 0, 100, 0),
(425101, 150, -6254.01, -4210.92, -61.7196, NULL, 0, 1, 0, 100, 0),
(425101, 151, -6263.09, -4212.42, -61.6526, NULL, 0, 1, 0, 100, 0),
(425101, 152, -6272.89, -4213.83, -61.57, NULL, 0, 1, 0, 100, 0),
(425101, 153, -6283.78, -4215.15, -61.4885, NULL, 0, 1, 0, 100, 0),
(425101, 154, -6293.67, -4215.9, -61.4038, NULL, 0, 1, 0, 100, 0),
(425101, 155, -6302.76, -4215.79, -61.3312, NULL, 0, 1, 0, 100, 0),
(425101, 156, -6312.99, -4214.93, -61.7428, NULL, 0, 1, 0, 100, 0),
(425101, 157, -6323.21, -4213.14, -62.2589, NULL, 0, 1, 0, 100, 0),
(425101, 158, -6332.36, -4211.33, -62.8202, NULL, 0, 1, 0, 100, 0),
(425101, 159, -6340.83, -4209.17, -62.4751, NULL, 0, 1, 0, 100, 0),
(425101, 160, -6348.46, -4205.71, -61.8554, NULL, 0, 1, 0, 100, 0),
(425101, 161, -6356.22, -4200.75, -61.2628, NULL, 0, 1, 0, 100, 0),
(425101, 162, -6363.98, -4194.96, -61.3468, NULL, 0, 1, 0, 100, 0),
(425101, 163, -6371.92, -4188.64, -61.855, NULL, 0, 1, 0, 100, 0),
(425101, 164, -6379.53, -4182.48, -62.2341, NULL, 0, 1, 0, 100, 0),
(425101, 165, -6387.53, -4175.85, -62.655, NULL, 0, 1, 0, 100, 0),
(425101, 166, -6394.59, -4168.89, -62.8009, NULL, 0, 1, 0, 100, 0),
(425101, 167, -6400.52, -4161.42, -63.097, NULL, 0, 1, 0, 100, 0),
(425101, 168, -6404.69, -4152.82, -63.3336, NULL, 0, 1, 0, 100, 0),
(425101, 169, -6408.46, -4143.78, -63.5631, NULL, 0, 1, 0, 100, 0),
(425101, 170, -6412.27, -4134.38, -63.8068, NULL, 0, 1, 0, 100, 0),
(425101, 171, -6415.74, -4124.6, -63.6947, NULL, 0, 1, 0, 100, 0),
(425101, 172, -6418.75, -4114.66, -63.841, NULL, 0, 1, 0, 100, 0),
(425101, 173, -6421.09, -4104.91, -63.7418, NULL, 0, 1, 0, 100, 0),
(425101, 174, -6423.35, -4094.54, -63.688, NULL, 0, 1, 0, 100, 0),
(425101, 175, -6425.45, -4084.97, -63.5708, NULL, 0, 1, 0, 100, 0),
(425101, 176, -6426.82, -4075.04, -63.2059, NULL, 0, 1, 0, 100, 0),
(425101, 177, -6427.49, -4064.33, -63.4149, NULL, 0, 1, 0, 100, 0),
(425101, 178, -6427.68, -4054.65, -63.3226, NULL, 0, 1, 0, 100, 0),
(425101, 179, -6427.67, -4044.38, -63.2196, NULL, 0, 1, 0, 100, 0),
(425101, 180, -6427.39, -4034.11, -63.1251, NULL, 0, 1, 0, 100, 0),
(425101, 181, -6427.07, -4024.21, -63.0233, NULL, 0, 1, 0, 100, 0),
(425101, 182, -6426.55, -4015.01, -62.9283, NULL, 0, 1, 0, 100, 0),
(425101, 183, -6425.56, -4004.91, -62.8437, NULL, 0, 1, 0, 100, 0),
(425101, 184, -6424.53, -3995.99, -62.8444, NULL, 0, 1, 0, 100, 0),
(425101, 185, -6423.09, -3986.18, -62.8394, NULL, 0, 1, 0, 100, 0),
(425101, 186, -6421.28, -3975.36, -62.8359, NULL, 0, 1, 0, 100, 0),
(425101, 187, -6418.93, -3966.08, -62.8326, NULL, 0, 1, 0, 100, 0),
(425101, 188, -6416.2, -3956.43, -62.8061, NULL, 0, 1, 0, 100, 0),
(425101, 189, -6412.62, -3946.94, -62.6365, NULL, 0, 1, 0, 100, 0),
(425101, 190, -6407.84, -3937.73, -62.266, NULL, 0, 1, 0, 100, 0),
(425101, 191, -6401.56, -3927.91, -61.9102, NULL, 0, 1, 0, 100, 0),
(425101, 192, -6395.28, -3919.51, -61.6526, NULL, 0, 1, 0, 100, 0),
(425101, 193, -6387.85, -3911.94, -61.6891, NULL, 0, 1, 0, 100, 0),
(425101, 194, -6379.98, -3906.36, -61.8822, NULL, 0, 1, 0, 100, 0),
(425101, 195, -6371.86, -3902.53, -62.0803, NULL, 0, 1, 0, 100, 0),
(425101, 196, -6362.79, -3900.35, -62.2368, NULL, 0, 1, 0, 100, 0),
(425101, 197, -6352.99, -3898.99, -62.3269, NULL, 0, 1, 0, 100, 0),
(425101, 198, -6343.68, -3899.36, -62.4514, NULL, 0, 1, 0, 100, 0),
(425101, 199, -6333.33, -3900.22, -62.5877, NULL, 0, 1, 0, 100, 0),
(425101, 200, -6322.52, -3901.13, -62.8141, NULL, 0, 1, 0, 100, 0),
(425101, 201, -6311.36, -3902.06, -62.9706, NULL, 0, 1, 0, 100, 0),
(425101, 202, -6300.37, -3902.95, -63.1136, NULL, 0, 1, 0, 100, 0),
(425101, 203, -6289.89, -3903.6, -62.7118, NULL, 0, 1, 0, 100, 0),
(425101, 204, -6280.23, -3904.21, -62.3654, NULL, 0, 1, 0, 100, 0),
(425101, 205, -6270.45, -3904.84, -61.9714, NULL, 0, 1, 0, 100, 0),
(425101, 206, -6261.94, -3905.18, -61.6432, NULL, 0, 1, 0, 100, 0),
(425101, 207, -6253.55, -3905.48, -61.3237, NULL, 0, 1, 0, 100, 0),
(425101, 208, -6244.92, -3905.8, -60.9986, NULL, 0, 1, 0, 100, 0),
(425101, 209, -6236.54, -3906.1, -60.6798, NULL, 0, 1, 0, 100, 0),
(425101, 210, -6227.33, -3906.44, -60.5224, NULL, 0, 1, 0, 100, 0),
(425101, 211, -6218.47, -3906.77, -60.4412, NULL, 0, 1, 0, 100, 0),
(425101, 212, -6210.65, -3907.06, -60.3711, NULL, 0, 1, 0, 100, 0),
(425101, 213, -6199.5, -3906.93, -60.2643, NULL, 0, 1, 0, 100, 0),
(425102, 1, -6188.01, -3907.96, -60.1272, NULL, 0, 1, 0, 100, 0),
(425102, 2, -6177.6, -3906.84, -60.0201, NULL, 0, 1, 0, 100, 0),
(425102, 3, -6168.58, -3905.66, -59.9351, NULL, 0, 1, 0, 100, 0),
(425102, 4, -6157.99, -3907.73, -59.853, NULL, 0, 1, 0, 100, 0),
(425102, 5, -6148.83, -3908.73, -59.8512, NULL, 0, 1, 0, 100, 0),
(425102, 6, -6138.93, -3906.71, -59.8883, NULL, 0, 1, 0, 100, 0),
(425102, 7, -6129.07, -3906.8, -59.9096, NULL, 0, 1, 0, 100, 0),
(425102, 8, -6119.94, -3905.93, -59.9228, NULL, 0, 1, 0, 100, 0);
-- Edit SmartAI (Goblin Racer)
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 4251;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 4251);
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
(4251, 0, 0, 0, 108, 1, 10, 512, 0, 0, 0, 0, 0, 0, 87, 425103, 425104, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Goblin Racer - On Point Any of Path Any Reached - Run Random Script (Phase 1)'),
(4251, 0, 1, 0, 109, 1, 100, 512, 0, 425101, 0, 0, 0, 0, 80, 425102, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Goblin Racer - On Path 425101 Finished - Run Script (Phase 1)');
-- Edit Action List (Goblin Racer)
DELETE FROM `smart_scripts` WHERE (`source_type` = 9) AND (`entryorguid` IN (425100, 425101, 425102, 425103, 425104));
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
(425100, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 48, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Goblin Racer - Actionlist - Set Active On'),
(425100, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 232, 425100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Goblin Racer - Actionlist - Start Path 425100'),
(425101, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Goblin Racer - Actionlist - Set Event Phase 1'),
(425101, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 232, 425101, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Goblin Racer - Actionlist - Start Path 425101'),
(425102, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 10, 21681, 4507, 0, 0, 0, 0, 0, 0, 'Goblin Racer - Actionlist - Set Data 1 1'),
(425102, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Goblin Racer - Actionlist - Set Event Phase 2'),
(425102, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 86, 7035, 0, 10, 21681, 4507, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Goblin Racer - Actionlist - Cross Cast \'Goblin Racer Cheer\''),
(425102, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 232, 425102, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Goblin Racer - Actionlist - Start Path 425102'),
(425102, 9, 4, 0, 0, 0, 100, 0, 4000, 4000, 0, 0, 0, 0, 11, 60081, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Goblin Racer - Actionlist - Cast \'Cosmetic - Explosion\''),
(425102, 9, 5, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Goblin Racer - Actionlist - Despawn Instant'),
(425103, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 6600, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Goblin Racer - Actionlist - Cast \'Salt Flats Racer Speed\''),
(425104, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 6601, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Goblin Racer - Actionlist - Cast \'Salt Flats Racer Slow\'');
-- Set Waypoint (Gnome Racer)
DELETE FROM `waypoints` WHERE (`entry` IN (425200, 425201, 425202));
DELETE FROM `waypoint_data` WHERE (`id` IN (425200, 425201, 425202));
INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_type`, `action`, `action_chance`, `wpguid`) VALUES
(425200, 1, -6213.07, -3849.85, -58.7497, NULL, 0, 0, 0, 100, 0),
(425200, 2, -6213.32, -3859.06, -58.7497, NULL, 0, 0, 0, 100, 0),
(425200, 3, -6215.83, -3866.94, -58.7497, NULL, 0, 0, 0, 100, 0),
(425200, 4, -6221.18, -3875.85, -58.7497, NULL, 0, 0, 0, 100, 0),
(425200, 5, -6230.55, -3880.74, -58.8272, NULL, 0, 0, 0, 100, 0),
(425200, 6, -6240.48, -3881.41, -59.0274, NULL, 0, 0, 0, 100, 0),
(425200, 7, -6253.07, -3881.06, -59.0491, NULL, 0, 0, 0, 100, 0),
(425200, 8, -6261.79, -3882.39, -59.2914, NULL, 0, 0, 0, 100, 0),
(425200, 9, -6268.24, -3885.55, -60.3912, NULL, 0, 0, 0, 100, 0),
(425200, 10, -6271.64, -3890.09, -61.6989, NULL, 0, 0, 0, 100, 0),
(425200, 11, -6271.71, -3895.41, -62.0288, NULL, 0, 0, 0, 100, 0),
(425200, 12, -6266.81, -3897.27, -61.8543, NULL, 0, 0, 0, 100, 0),
(425200, 13, -6256.8, -3897.43, -61.4237, NULL, 0, 0, 0, 100, 0),
(425200, 14, -6245.13, -3897.58, -61.0156, NULL, 0, 0, 0, 100, 0),
(425200, 15, -6231.72, -3897.77, -60.5649, NULL, 0, 0, 0, 100, 0),
(425200, 16, -6217.37, -3897.85, -60.4397, NULL, 0, 0, 0, 100, 0),
(425200, 17, -6207.68, -3897.86, -60.3485, NULL, 0, 0, 0, 100, 0),
(425200, 18, -6200.45, -3897.66, -60.2832, NULL, 0, 0, 0, 100, 0),
(425201, 1, -6191.13, -3897.99, -60.1547, NULL, 0, 1, 0, 100, 0),
(425201, 2, -6183.44, -3898.16, -60.0868, NULL, 0, 1, 0, 100, 0),
(425201, 3, -6174.8, -3898.45, -60.0056, NULL, 0, 1, 0, 100, 0),
(425201, 4, -6165.49, -3898.95, -59.9097, NULL, 0, 1, 0, 100, 0),
(425201, 5, -6156.97, -3899.07, -59.8555, NULL, 0, 1, 0, 100, 0),
(425201, 6, -6148.45, -3898.89, -59.8717, NULL, 0, 1, 0, 100, 0),
(425201, 7, -6140.53, -3898.68, -59.8844, NULL, 0, 1, 0, 100, 0),
(425201, 8, -6132.61, -3898.29, -59.9057, NULL, 0, 1, 0, 100, 0),
(425201, 9, -6124.03, -3897.38, -59.9139, NULL, 0, 1, 0, 100, 0),
(425201, 10, -6115.28, -3895.98, -59.949, NULL, 0, 1, 0, 100, 0),
(425201, 11, -6106.84, -3893.7, -59.9951, NULL, 0, 1, 0, 100, 0),
(425201, 12, -6098.68, -3891.24, -60.0377, NULL, 0, 1, 0, 100, 0),
(425201, 13, -6090.25, -3888.54, -60.0788, NULL, 0, 1, 0, 100, 0),
(425201, 14, -6081.56, -3885.46, -60.1355, NULL, 0, 1, 0, 100, 0),
(425201, 15, -6072.5, -3882.04, -60.1736, NULL, 0, 1, 0, 100, 0),
(425201, 16, -6064.86, -3879.16, -60.2146, NULL, 0, 1, 0, 100, 0),
(425201, 17, -6056.94, -3876.05, -60.2663, NULL, 0, 1, 0, 100, 0),
(425201, 18, -6049.15, -3872.9, -60.2967, NULL, 0, 1, 0, 100, 0),
(425201, 19, -6041.14, -3869.67, -60.3445, NULL, 0, 1, 0, 100, 0),
(425201, 20, -6032.96, -3866.25, -60.3929, NULL, 0, 1, 0, 100, 0),
(425201, 21, -6024.91, -3862.81, -60.4201, NULL, 0, 1, 0, 100, 0),
(425201, 22, -6017.94, -3859.83, -60.4674, NULL, 0, 1, 0, 100, 0),
(425201, 23, -6010.55, -3856.64, -60.5121, NULL, 0, 1, 0, 100, 0),
(425201, 24, -6002.64, -3853.19, -60.5419, NULL, 0, 1, 0, 100, 0),
(425201, 25, -5994.61, -3849.69, -60.5862, NULL, 0, 1, 0, 100, 0),
(425201, 26, -5986.62, -3846.13, -60.6333, NULL, 0, 1, 0, 100, 0),
(425201, 27, -5978.73, -3842.61, -60.6723, NULL, 0, 1, 0, 100, 0),
(425201, 28, -5970.21, -3838.81, -60.7158, NULL, 0, 1, 0, 100, 0),
(425201, 29, -5961.54, -3834.75, -60.7743, NULL, 0, 1, 0, 100, 0),
(425201, 30, -5953.2, -3828.76, -60.6922, NULL, 0, 1, 0, 100, 0),
(425201, 31, -5944.69, -3822.82, -60.4692, NULL, 0, 1, 0, 100, 0),
(425201, 32, -5936.07, -3817.66, -60.2527, NULL, 0, 1, 0, 100, 0),
(425201, 33, -5926.36, -3812.3, -60.0549, NULL, 0, 1, 0, 100, 0),
(425201, 34, -5917.03, -3807.91, -59.7889, NULL, 0, 1, 0, 100, 0),
(425201, 35, -5906.75, -3802.67, -59.591, NULL, 0, 1, 0, 100, 0),
(425201, 36, -5895.76, -3797.51, -59.7463, NULL, 0, 1, 0, 100, 0),
(425201, 37, -5886.58, -3793.77, -60.0257, NULL, 0, 1, 0, 100, 0),
(425201, 38, -5876.67, -3790.31, -60.1595, NULL, 0, 1, 0, 100, 0),
(425201, 39, -5866.79, -3786.6, -60.2363, NULL, 0, 1, 0, 100, 0),
(425201, 40, -5856.81, -3782.17, -60.7624, NULL, 0, 1, 0, 100, 0),
(425201, 41, -5847.81, -3780.26, -60.9771, NULL, 0, 1, 0, 100, 0),
(425201, 42, -5838.69, -3777.91, -61.0963, NULL, 0, 1, 0, 100, 0),
(425201, 43, -5828.99, -3776.57, -61.1453, NULL, 0, 1, 0, 100, 0),
(425201, 44, -5817.79, -3776.7, -61.2493, NULL, 0, 1, 0, 100, 0),
(425201, 45, -5808.22, -3776.95, -61.3142, NULL, 0, 1, 0, 100, 0),
(425201, 46, -5799.27, -3777.61, -61.4031, NULL, 0, 1, 0, 100, 0),
(425201, 47, -5788.73, -3778.89, -61.4787, NULL, 0, 1, 0, 100, 0),
(425201, 48, -5779.45, -3779.9, -61.5685, NULL, 0, 1, 0, 100, 0),
(425201, 49, -5770.86, -3781.42, -61.6462, NULL, 0, 1, 0, 100, 0),
(425201, 50, -5761.83, -3783.77, -61.7109, NULL, 0, 1, 0, 100, 0),
(425201, 51, -5752.74, -3785.92, -61.4701, NULL, 0, 1, 0, 100, 0),
(425201, 52, -5744.52, -3787.46, -61.3502, NULL, 0, 1, 0, 100, 0),
(425201, 53, -5735.69, -3789.1, -61.0581, NULL, 0, 1, 0, 100, 0),
(425201, 54, -5727.33, -3792.11, -60.9136, NULL, 0, 1, 0, 100, 0),
(425201, 55, -5718.91, -3797.02, -60.6031, NULL, 0, 1, 0, 100, 0),
(425201, 56, -5711.88, -3802.96, -60.9495, NULL, 0, 1, 0, 100, 0),
(425201, 57, -5704.67, -3810.75, -61.4076, NULL, 0, 1, 0, 100, 0),
(425201, 58, -5698.32, -3818.22, -61.6877, NULL, 0, 1, 0, 100, 0),
(425201, 59, -5692.7, -3825.67, -62.0049, NULL, 0, 1, 0, 100, 0),
(425201, 60, -5687.31, -3833.29, -62.2746, NULL, 0, 1, 0, 100, 0),
(425201, 61, -5683.05, -3839.84, -62.4105, NULL, 0, 1, 0, 100, 0),
(425201, 62, -5679.18, -3846.37, -62.5762, NULL, 0, 1, 0, 100, 0),
(425201, 63, -5675.19, -3854.28, -62.3824, NULL, 0, 1, 0, 100, 0),
(425201, 64, -5671.32, -3862.26, -62.2226, NULL, 0, 1, 0, 100, 0),
(425201, 65, -5667.59, -3870.17, -62.0706, NULL, 0, 1, 0, 100, 0),
(425201, 66, -5664.63, -3877.78, -61.9482, NULL, 0, 1, 0, 100, 0),
(425201, 67, -5662.53, -3886.03, -61.839, NULL, 0, 1, 0, 100, 0),
(425201, 68, -5660.7, -3894.46, -61.7547, NULL, 0, 1, 0, 100, 0),
(425201, 69, -5659.71, -3903.38, -61.622, NULL, 0, 1, 0, 100, 0),
(425201, 70, -5659, -3912.57, -61.528, NULL, 0, 1, 0, 100, 0),
(425201, 71, -5657.93, -3921.85, -61.4457, NULL, 0, 1, 0, 100, 0),
(425201, 72, -5656.73, -3930.87, -61.3267, NULL, 0, 1, 0, 100, 0),
(425201, 73, -5655.31, -3940.45, -61.2273, NULL, 0, 1, 0, 100, 0),
(425201, 74, -5653.95, -3949.8, -61.1983, NULL, 0, 1, 0, 100, 0),
(425201, 75, -5652.19, -3959.55, -61.191, NULL, 0, 1, 0, 100, 0),
(425201, 76, -5650.45, -3968.72, -61.1827, NULL, 0, 1, 0, 100, 0),
(425201, 77, -5648.88, -3977.56, -61.1758, NULL, 0, 1, 0, 100, 0),
(425201, 78, -5645.48, -3987.04, -61.1671, NULL, 0, 1, 0, 100, 0),
(425201, 79, -5643.65, -3995.95, -61.1594, NULL, 0, 1, 0, 100, 0),
(425201, 80, -5642.07, -4005.56, -61.1477, NULL, 0, 1, 0, 100, 0),
(425201, 81, -5640.9, -4015.18, -61.1393, NULL, 0, 1, 0, 100, 0),
(425201, 82, -5640.18, -4024.48, -61.1313, NULL, 0, 1, 0, 100, 0),
(425201, 83, -5639.49, -4033.56, -61.1239, NULL, 0, 1, 0, 100, 0),
(425201, 84, -5638.75, -4043.8, -61.1163, NULL, 0, 1, 0, 100, 0),
(425201, 85, -5638.62, -4052.55, -61.1497, NULL, 0, 1, 0, 100, 0),
(425201, 86, -5638.78, -4061.89, -61.2196, NULL, 0, 1, 0, 100, 0),
(425201, 87, -5640.51, -4072.33, -61.2885, NULL, 0, 1, 0, 100, 0),
(425201, 88, -5643.95, -4082.94, -61.3682, NULL, 0, 1, 0, 100, 0),
(425201, 89, -5647.96, -4091.97, -61.4318, NULL, 0, 1, 0, 100, 0),
(425201, 90, -5652.74, -4099.73, -61.4644, NULL, 0, 1, 0, 100, 0),
(425201, 91, -5658.15, -4108.15, -61.5069, NULL, 0, 1, 0, 100, 0),
(425201, 92, -5663.05, -4116.77, -61.547, NULL, 0, 1, 0, 100, 0),
(425201, 93, -5668.11, -4125.02, -61.5868, NULL, 0, 1, 0, 100, 0),
(425201, 94, -5673.62, -4133.69, -61.6279, NULL, 0, 1, 0, 100, 0),
(425201, 95, -5679.39, -4141.17, -61.5546, NULL, 0, 1, 0, 100, 0),
(425201, 96, -5685.81, -4147.76, -61.2686, NULL, 0, 1, 0, 100, 0),
(425201, 97, -5693.73, -4153.52, -60.805, NULL, 0, 1, 0, 100, 0),
(425201, 98, -5702.2, -4158.68, -60.38, NULL, 0, 1, 0, 100, 0),
(425201, 99, -5711.17, -4163.68, -60.5767, NULL, 0, 1, 0, 100, 0),
(425201, 100, -5719.97, -4167.7, -60.7495, NULL, 0, 1, 0, 100, 0),
(425201, 101, -5728.91, -4171.09, -60.9849, NULL, 0, 1, 0, 100, 0),
(425201, 102, -5738.42, -4174.28, -61.3725, NULL, 0, 1, 0, 100, 0),
(425201, 103, -5747.66, -4176.74, -61.4211, NULL, 0, 1, 0, 100, 0),
(425201, 104, -5757.03, -4179.17, -61.4857, NULL, 0, 1, 0, 100, 0),
(425201, 105, -5766.08, -4181.43, -61.5319, NULL, 0, 1, 0, 100, 0),
(425201, 106, -5775.63, -4183.64, -61.523, NULL, 0, 1, 0, 100, 0),
(425201, 107, -5785.16, -4185.34, -61.3824, NULL, 0, 1, 0, 100, 0),
(425201, 108, -5794.63, -4186.67, -61.2606, NULL, 0, 1, 0, 100, 0),
(425201, 109, -5804.93, -4187.97, -61.3876, NULL, 0, 1, 0, 100, 0),
(425201, 110, -5814.68, -4188.93, -61.6206, NULL, 0, 1, 0, 100, 0),
(425201, 111, -5824.68, -4189.75, -61.8774, NULL, 0, 1, 0, 100, 0),
(425201, 112, -5833.86, -4190.43, -62.1073, NULL, 0, 1, 0, 100, 0),
(425201, 113, -5842.48, -4191, -62.3082, NULL, 0, 1, 0, 100, 0),
(425201, 114, -5851.21, -4191.57, -62.5253, NULL, 0, 1, 0, 100, 0),
(425201, 115, -5861.32, -4192.4, -62.6363, NULL, 0, 1, 0, 100, 0),
(425201, 116, -5871.21, -4193.24, -62.6999, NULL, 0, 1, 0, 100, 0),
(425201, 117, -5880.64, -4193.85, -62.7766, NULL, 0, 1, 0, 100, 0),
(425201, 118, -5889.84, -4194.21, -62.8327, NULL, 0, 1, 0, 100, 0),
(425201, 119, -5898.47, -4194.51, -62.8894, NULL, 0, 1, 0, 100, 0),
(425201, 120, -5907.67, -4194.83, -62.8819, NULL, 0, 1, 0, 100, 0),
(425201, 121, -5916.77, -4195.14, -62.7659, NULL, 0, 1, 0, 100, 0),
(425201, 122, -5926.44, -4195.48, -62.6792, NULL, 0, 1, 0, 100, 0),
(425201, 123, -5936.36, -4195.62, -62.5624, NULL, 0, 1, 0, 100, 0),
(425201, 124, -5945.7, -4195.7, -62.4532, NULL, 0, 1, 0, 100, 0),
(425201, 125, -5955.38, -4195.71, -62.3407, NULL, 0, 1, 0, 100, 0),
(425201, 126, -5965.41, -4195.57, -62.2259, NULL, 0, 1, 0, 100, 0),
(425201, 127, -5975.91, -4195.54, -62.2551, NULL, 0, 1, 0, 100, 0),
(425201, 128, -5986.3, -4195.46, -62.3111, NULL, 0, 1, 0, 100, 0),
(425201, 129, -5996.9, -4195.03, -62.3646, NULL, 0, 1, 0, 100, 0),
(425201, 130, -6006.44, -4194.28, -62.4284, NULL, 0, 1, 0, 100, 0),
(425201, 131, -6015.97, -4193.45, -62.4367, NULL, 0, 1, 0, 100, 0),
(425201, 132, -6025.38, -4192.59, -62.5398, NULL, 0, 1, 0, 100, 0),
(425201, 133, -6034.45, -4191.69, -62.5892, NULL, 0, 1, 0, 100, 0),
(425201, 134, -6043.49, -4190.67, -62.6533, NULL, 0, 1, 0, 100, 0),
(425201, 135, -6053.09, -4189.39, -62.6578, NULL, 0, 1, 0, 100, 0),
(425201, 136, -6063.16, -4188.11, -62.4733, NULL, 0, 1, 0, 100, 0),
(425201, 137, -6072.55, -4187.03, -62.2856, NULL, 0, 1, 0, 100, 0),
(425201, 138, -6082.19, -4186.11, -62.0776, NULL, 0, 1, 0, 100, 0),
(425201, 139, -6092.67, -4185.46, -62.051, NULL, 0, 1, 0, 100, 0),
(425201, 140, -6103.04, -4184.89, -62.2653, NULL, 0, 1, 0, 100, 0),
(425201, 141, -6113.42, -4184.63, -62.4858, NULL, 0, 1, 0, 100, 0),
(425201, 142, -6124.15, -4184.92, -62.6071, NULL, 0, 1, 0, 100, 0),
(425201, 143, -6134.52, -4185.2, -62.3842, NULL, 0, 1, 0, 100, 0),
(425201, 144, -6145.36, -4185.69, -62.1294, NULL, 0, 1, 0, 100, 0),
(425201, 145, -6155.71, -4186.58, -61.9095, NULL, 0, 1, 0, 100, 0),
(425201, 146, -6166.17, -4187.48, -61.7304, NULL, 0, 1, 0, 100, 0),
(425201, 147, -6177.33, -4188.44, -61.696, NULL, 0, 1, 0, 100, 0),
(425201, 148, -6185.81, -4189.2, -61.6767, NULL, 0, 1, 0, 100, 0),
(425201, 149, -6195.39, -4190.63, -61.6506, NULL, 0, 1, 0, 100, 0),
(425201, 150, -6205.03, -4192.38, -61.6175, NULL, 0, 1, 0, 100, 0),
(425201, 151, -6214.78, -4194.21, -61.5961, NULL, 0, 1, 0, 100, 0),
(425201, 152, -6224.48, -4196.3, -61.6135, NULL, 0, 1, 0, 100, 0),
(425201, 153, -6233.62, -4198.14, -61.6568, NULL, 0, 1, 0, 100, 0),
(425201, 154, -6242.89, -4199.97, -61.6911, NULL, 0, 1, 0, 100, 0),
(425201, 155, -6252.97, -4201.97, -61.7273, NULL, 0, 1, 0, 100, 0),
(425201, 156, -6262.82, -4203.9, -61.6297, NULL, 0, 1, 0, 100, 0),
(425201, 157, -6273.05, -4205.66, -61.5693, NULL, 0, 1, 0, 100, 0),
(425201, 158, -6282.99, -4206.99, -61.4881, NULL, 0, 1, 0, 100, 0),
(425201, 159, -6294.46, -4208.37, -61.3831, NULL, 0, 1, 0, 100, 0),
(425201, 160, -6304.92, -4209.25, -61.3155, NULL, 0, 1, 0, 100, 0),
(425201, 161, -6316.44, -4210.08, -61.9332, NULL, 0, 1, 0, 100, 0),
(425201, 162, -6328.2, -4210.85, -62.4794, NULL, 0, 1, 0, 100, 0),
(425201, 163, -6338.91, -4211.56, -62.6251, NULL, 0, 1, 0, 100, 0),
(425201, 164, -6348.49, -4210.64, -62.0232, NULL, 0, 1, 0, 100, 0),
(425201, 165, -6356.92, -4207.3, -61.6654, NULL, 0, 1, 0, 100, 0),
(425201, 166, -6364.13, -4202.14, -61.1157, NULL, 0, 1, 0, 100, 0),
(425201, 167, -6371.33, -4196.2, -61.4884, NULL, 0, 1, 0, 100, 0),
(425201, 168, -6378.78, -4189.83, -61.7792, NULL, 0, 1, 0, 100, 0),
(425201, 169, -6385.96, -4183.68, -62.2433, NULL, 0, 1, 0, 100, 0),
(425201, 170, -6393.2, -4176.92, -62.6041, NULL, 0, 1, 0, 100, 0),
(425201, 171, -6399.35, -4170.36, -62.9947, NULL, 0, 1, 0, 100, 0),
(425201, 172, -6404.76, -4162.21, -63.22, NULL, 0, 1, 0, 100, 0),
(425201, 173, -6409.01, -4154.56, -63.3792, NULL, 0, 1, 0, 100, 0),
(425201, 174, -6412.76, -4146.4, -63.5873, NULL, 0, 1, 0, 100, 0),
(425201, 175, -6416.19, -4138.1, -63.8013, NULL, 0, 1, 0, 100, 0),
(425201, 176, -6419.27, -4129.67, -64.0044, NULL, 0, 1, 0, 100, 0),
(425201, 177, -6421.97, -4120.87, -64.0823, NULL, 0, 1, 0, 100, 0),
(425201, 178, -6424.7, -4111.7, -63.9544, NULL, 0, 1, 0, 100, 0),
(425201, 179, -6427.14, -4102.09, -63.8454, NULL, 0, 1, 0, 100, 0),
(425201, 180, -6429.14, -4092.39, -63.739, NULL, 0, 1, 0, 100, 0),
(425201, 181, -6430.8, -4082.72, -63.6193, NULL, 0, 1, 0, 100, 0),
(425201, 182, -6431.55, -4072.96, -63.5013, NULL, 0, 1, 0, 100, 0),
(425201, 183, -6431.81, -4063.41, -63.4091, NULL, 0, 1, 0, 100, 0),
(425201, 184, -6432.07, -4053.72, -63.3199, NULL, 0, 1, 0, 100, 0),
(425201, 185, -6432.12, -4044.15, -63.2197, NULL, 0, 1, 0, 100, 0),
(425201, 186, -6432.02, -4034.24, -63.1279, NULL, 0, 1, 0, 100, 0),
(425201, 187, -6431.8, -4023.63, -63.0207, NULL, 0, 1, 0, 100, 0),
(425201, 188, -6431.49, -4013.71, -62.927, NULL, 0, 1, 0, 100, 0),
(425201, 189, -6431.01, -4004.51, -62.8465, NULL, 0, 1, 0, 100, 0),
(425201, 190, -6429.68, -3994.92, -62.8435, NULL, 0, 1, 0, 100, 0),
(425201, 191, -6428, -3984.32, -62.8388, NULL, 0, 1, 0, 100, 0),
(425201, 192, -6425.7, -3974.44, -62.8355, NULL, 0, 1, 0, 100, 0),
(425201, 193, -6423.12, -3964.14, -62.8313, NULL, 0, 1, 0, 100, 0),
(425201, 194, -6420.24, -3954.9, -62.8263, NULL, 0, 1, 0, 100, 0),
(425201, 195, -6416.66, -3945.65, -62.6458, NULL, 0, 1, 0, 100, 0),
(425201, 196, -6412.34, -3937.4, -62.5412, NULL, 0, 1, 0, 100, 0),
(425201, 197, -6406.42, -3928.75, -62.1537, NULL, 0, 1, 0, 100, 0),
(425201, 198, -6398.58, -3922.15, -61.7519, NULL, 0, 1, 0, 100, 0),
(425201, 199, -6389.51, -3916.89, -61.5696, NULL, 0, 1, 0, 100, 0),
(425201, 200, -6380.43, -3912.63, -61.7523, NULL, 0, 1, 0, 100, 0),
(425201, 201, -6370.58, -3909.01, -61.9721, NULL, 0, 1, 0, 100, 0),
(425201, 202, -6360.86, -3906.08, -62.2233, NULL, 0, 1, 0, 100, 0),
(425201, 203, -6351.73, -3903.65, -62.3375, NULL, 0, 1, 0, 100, 0),
(425201, 204, -6342.71, -3901.26, -62.4708, NULL, 0, 1, 0, 100, 0),
(425201, 205, -6333.07, -3898.94, -62.5955, NULL, 0, 1, 0, 100, 0),
(425201, 206, -6322.43, -3897.58, -62.822, NULL, 0, 1, 0, 100, 0),
(425201, 207, -6312.65, -3897.02, -62.939, NULL, 0, 1, 0, 100, 0),
(425201, 208, -6302.74, -3896.83, -63.0881, NULL, 0, 1, 0, 100, 0),
(425201, 209, -6293.4, -3896.73, -62.8319, NULL, 0, 1, 0, 100, 0),
(425201, 210, -6283.84, -3896.64, -62.4841, NULL, 0, 1, 0, 100, 0),
(425201, 211, -6274.15, -3896.57, -62.109, NULL, 0, 1, 0, 100, 0),
(425201, 212, -6263.76, -3896.5, -61.7205, NULL, 0, 1, 0, 100, 0),
(425201, 213, -6253.84, -3896.48, -61.3577, NULL, 0, 1, 0, 100, 0),
(425201, 214, -6243.23, -3896.49, -60.9442, NULL, 0, 1, 0, 100, 0),
(425201, 215, -6233.32, -3896.47, -60.5944, NULL, 0, 1, 0, 100, 0),
(425201, 216, -6222.59, -3896.66, -60.4868, NULL, 0, 1, 0, 100, 0),
(425201, 217, -6213.38, -3896.88, -60.3687, NULL, 0, 1, 0, 100, 0),
(425201, 218, -6200.45, -3897.66, -60.2832, NULL, 0, 1, 0, 100, 0),
(425202, 1, -6190.65, -3896.22, -60.1529, NULL, 0, 1, 0, 100, 0),
(425202, 2, -6180.66, -3896.07, -60.0595, NULL, 0, 1, 0, 100, 0),
(425202, 3, -6171.55, -3897.96, -59.9696, NULL, 0, 1, 0, 100, 0),
(425202, 4, -6161.52, -3896.79, -59.8741, NULL, 0, 1, 0, 100, 0),
(425202, 5, -6151.06, -3897.01, -59.8661, NULL, 0, 1, 0, 100, 0),
(425202, 6, -6141.54, -3898.68, -59.8809, NULL, 0, 1, 0, 100, 0),
(425202, 7, -6132.44, -3897.03, -59.9045, NULL, 0, 1, 0, 100, 0),
(425202, 8, -6117.72, -3893.62, -59.9211, NULL, 0, 1, 0, 100, 0);
-- Edit SmartAI (Gnome Racer)
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 4252;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 4252);
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
(4252, 0, 0, 0, 40, 1, 10, 512, 0, 0, 0, 0, 0, 0, 87, 425203, 425204, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Gnome Racer - On Point Any of Path Any Reached - Run Random Script (Phase 1)'),
(4252, 0, 1, 0, 109, 1, 100, 512, 0, 425201, 0, 0, 0, 0, 80, 425202, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Gnome Racer - On Path 425201 Finished - Run Script (Phase 1)');
-- Edit Action Lists (Gnome Racer)
DELETE FROM `smart_scripts` WHERE (`source_type` = 9) AND (`entryorguid` IN (425200, 425201, 425202, 425203, 425204));
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
(425200, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 48, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Gnome Racer - Actionlist - Set Active On'),
(425200, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 232, 425200, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Gnome Racer - Actionlist - Start Path 425200'),
(425201, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Gnome Racer - Actionlist - Set Event Phase 1'),
(425201, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 232, 425201, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Gnome Racer - Actionlist - Start Path 425201'),
(425202, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 45, 1, 2, 0, 0, 0, 0, 10, 21681, 4507, 0, 0, 0, 0, 0, 0, 'Gnome Racer - Actionlist - Set Data 1 2'),
(425202, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Gnome Racer - Actionlist - Set Event Phase 2'),
(425202, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 86, 7036, 0, 10, 21681, 4507, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Gnome Racer - Actionlist - Cross Cast \'Gnome Racer Cheer\''),
(425202, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 232, 425202, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Gnome Racer - Actionlist - Start Path 425202'),
(425202, 9, 4, 0, 0, 0, 100, 0, 4000, 4000, 0, 0, 0, 0, 11, 60081, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Gnome Racer - Actionlist - Cast \'Cosmetic - Explosion\''),
(425202, 9, 5, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Gnome Racer - Actionlist - Despawn Instant'),
(425203, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 6600, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Gnome Racer - Actionlist - Cast \'Salt Flats Racer Speed\''),
(425204, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 6601, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Gnome Racer - Actionlist - Cast \'Salt Flats Racer Slow\'');
-- Set Waypoint (Daisy)
DELETE FROM `waypoints` WHERE (`entry` IN (450700));
DELETE FROM `waypoint_data` WHERE (`id` IN (450700));
INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_type`, `action`, `action_chance`, `wpguid`) VALUES
(450700, 1, -6181.54, -3901.89, -60.0522, NULL, 0, 0, 0, 100, 0),
(450700, 2, -6181.91, -3906.66, -60.0592, NULL, 0, 0, 0, 100, 0),
(450700, 3, -6182.58, -3912.22, -59.9758, NULL, 0, 0, 0, 100, 0),
(450700, 4, -6182.4, -3917.94, -58.8287, NULL, 0, 0, 0, 100, 0);
-- Edit SmartAI (Daisy)
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 4507;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 4507);
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
(4507, 0, 0, 0, 11, 0, 100, 512, 0, 0, 0, 0, 0, 0, 80, 450700, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Daisy - On Respawn - Run Script'),
(4507, 0, 1, 0, 38, 1, 100, 513, 1, 1, 0, 0, 0, 0, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Daisy - On Data Set 1 1 - Set Event Phase 2 (Phase 1) (No Repeat)'),
(4507, 0, 2, 0, 38, 1, 100, 513, 1, 2, 0, 0, 0, 0, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Daisy - On Data Set 1 2 - Set Event Phase 2 (Phase 1) (No Repeat)'),
(4507, 0, 3, 0, 66, 0, 100, 512, 2, 0, 0, 0, 0, 0, 80, 450701, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Daisy - On Event Phase 2 Set - Run Script');
-- Esit Action List (Daisy)
DELETE FROM `smart_scripts` WHERE (`source_type` = 9) AND (`entryorguid` IN (450700, 450701));
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
(450700, 9, 0, 0, 0, 0, 100, 0, 30000, 90000, 0, 0, 0, 0, 48, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Daisy - Actionlist - Set Active On'),
(450700, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 80, 425100, 2, 0, 0, 0, 0, 10, 21680, 4251, 0, 0, 0, 0, 0, 0, 'Daisy - Actionlist - Run Script'),
(450700, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 80, 425200, 2, 0, 0, 0, 0, 10, 21682, 4252, 0, 0, 0, 0, 0, 0, 'Daisy - Actionlist - Run Script'),
(450700, 9, 3, 0, 0, 0, 100, 0, 10000, 10000, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 10, 21549, 4419, 0, 0, 0, 0, 0, 0, 'Daisy - Actionlist - Say Line 0'),
(450700, 9, 4, 0, 0, 0, 100, 0, 30000, 30000, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 10, 21145, 4620, 0, 0, 0, 0, 0, 0, 'Daisy - Actionlist - Say Line 0'),
(450700, 9, 5, 0, 0, 0, 100, 0, 30000, 30000, 0, 0, 0, 0, 5, 36, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Daisy - Actionlist - Play Emote 36'),
(450700, 9, 6, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 10, 21145, 4620, 0, 0, 0, 0, 0, 0, 'Daisy - Actionlist - Say Line 1'),
(450700, 9, 7, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 80, 425101, 2, 0, 0, 0, 0, 10, 21680, 4251, 0, 0, 0, 0, 0, 0, 'Daisy - Actionlist - Run Script'),
(450700, 9, 8, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 80, 425201, 2, 0, 0, 0, 0, 10, 21682, 4252, 0, 0, 0, 0, 0, 0, 'Daisy - Actionlist - Run Script'),
(450700, 9, 9, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Daisy - Actionlist - Set Event Phase 1'),
(450701, 9, 0, 0, 0, 0, 100, 0, 30000, 30000, 0, 0, 0, 0, 232, 450700, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Daisy - Actionlist - Start Path 450700'),
(450701, 9, 1, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 1.60989, 'Daisy - Actionlist - Set Orientation 1.60989'),
(450701, 9, 2, 0, 0, 0, 100, 0, 600000, 600000, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Daisy - Actionlist - Despawn Instant');
@@ -0,0 +1,13 @@
-- DB update 2025_10_28_04 -> 2025_10_28_05
--
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 27971;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 27971);
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
(27971, 0, 0, 0, 0, 0, 100, 2, 12000, 18000, 12000, 18000, 0, 0, 11, 51842, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 'Unrelenting Construct - In Combat - Cast \'Charge\' (No Repeat) (Dungeon/Normal)'),
(27971, 0, 1, 0, 0, 0, 100, 4, 12000, 18000, 12000, 18000, 0, 0, 11, 59040, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 'Unrelenting Construct - In Combat - Cast \'Charge\' (No Repeat) (Dungeon/Heroic)'),
(27971, 0, 2, 0, 0, 0, 100, 2, 4000, 7000, 9000, 16000, 0, 0, 11, 51491, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Unrelenting Construct - In Combat - Cast \'Unrelenting Strike\' (No Repeat) (Dungeon/Normal)'),
(27971, 0, 3, 0, 0, 0, 100, 4, 4000, 7000, 9000, 16000, 0, 0, 11, 59039, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Unrelenting Construct - In Combat - Cast \'Unrelenting Strike\' (No Repeat) (Dungeon/Heroic)'),
(27971, 0, 4, 6, 2, 0, 100, 515, 0, 25, 0, 0, 0, 0, 11, 51832, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unrelenting Construct - Between 0-25% Health - Cast \'Short Circuit\' (No Repeat) (Dungeon)'),
(27971, 0, 5, 6, 2, 0, 100, 517, 0, 25, 0, 0, 0, 0, 11, 61513, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unrelenting Construct - Between 0-25% Health - Cast \'Short Circuit\' (No Repeat) (Dungeon)'),
(27971, 0, 6, 7, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 37, 3500, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unrelenting Construct - Die from \'Short Circuit\' (Dungeon)'),
(27971, 0, 7, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unrelenting Construct - Set State Passive while waiting death (Dungeon)');
+54 -34
View File
@@ -108,20 +108,20 @@ void SmartAI::UpdateDespawn(const uint32 diff)
mDespawnTime -= diff;
}
WayPoint* SmartAI::GetNextWayPoint()
WaypointData const* SmartAI::GetNextWayPoint()
{
if (!mWayPoints || mWayPoints->empty())
return nullptr;
mCurrentWPID++;
WPPath::const_iterator itr = mWayPoints->find(mCurrentWPID);
auto itr = mWayPoints->find(mCurrentWPID);
if (itr != mWayPoints->end())
{
mLastWP = (*itr).second;
mLastWP = &(*itr).second;
if (mLastWP->id != mCurrentWPID)
LOG_ERROR("scripts.ai.sai", "SmartAI::GetNextWayPoint: Got not expected waypoint id {}, expected {}", mLastWP->id, mCurrentWPID);
return (*itr).second;
return &(*itr).second;
}
return nullptr;
}
@@ -138,12 +138,15 @@ void SmartAI::GenerateWayPointArray(Movement::PointsArray* points)
points->clear();
points->push_back(G3D::Vector3(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()));
uint32 wpCounter = mCurrentWPID;
WPPath::const_iterator itr;
while ((itr = mWayPoints->find(wpCounter++)) != mWayPoints->end())
auto itr = mWayPoints->find(wpCounter++);
do
{
WayPoint* wp = (*itr).second;
points->push_back(G3D::Vector3(wp->x, wp->y, wp->z));
WaypointData const& wp = (*itr).second;
points->push_back(G3D::Vector3(wp.x, wp.y, wp.z));
itr = mWayPoints->find(wpCounter++);
}
while (itr != mWayPoints->end());
}
else
{
@@ -152,15 +155,15 @@ void SmartAI::GenerateWayPointArray(Movement::PointsArray* points)
std::vector<G3D::Vector3> pVector;
// xinef: first point in vector is unit real position
pVector.push_back(G3D::Vector3(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()));
uint32 wpCounter = mCurrentWPID;
uint32 length = (mWayPoints->size() - mCurrentWPID) * size;
uint32 cnt = 0;
uint32 wpCounter = mCurrentWPID;
WPPath::const_iterator itr;
while ((itr = mWayPoints->find(wpCounter++)) != mWayPoints->end() && cnt++ <= length)
for (auto itr = mWayPoints->find(wpCounter); itr != mWayPoints->end() && cnt++ <= length; ++itr)
{
WayPoint* wp = (*itr).second;
pVector.push_back(G3D::Vector3(wp->x, wp->y, wp->z));
WaypointData const& wp = (*itr).second;
pVector.push_back(G3D::Vector3(wp.x, wp.y, wp.z));
}
if (pVector.size() > 2) // more than source + dest
@@ -189,21 +192,21 @@ void SmartAI::GenerateWayPointArray(Movement::PointsArray* points)
}
}
void SmartAI::StartPath(ForcedMovement forcedMovement, uint32 path, bool repeat, Unit* invoker)
void SmartAI::StartPath(ForcedMovement forcedMovement, uint32 path, bool repeat, Unit* invoker, PathSource pathSource)
{
if (HasEscortState(SMART_ESCORT_ESCORTING))
StopPath();
if (path)
{
if (!LoadPath(path))
if (!LoadPath(path, pathSource))
return;
}
if (!mWayPoints || mWayPoints->empty())
return;
if (WayPoint* wp = GetNextWayPoint())
if (WaypointData const* wp = GetNextWayPoint())
{
AddEscortState(SMART_ESCORT_ESCORTING);
mCanRepeatPath = repeat;
@@ -219,20 +222,37 @@ void SmartAI::StartPath(ForcedMovement forcedMovement, uint32 path, bool repeat,
GenerateWayPointArray(&pathPoints);
me->GetMotionMaster()->MoveSplinePath(&pathPoints, mForcedMovement);
GetScript()->ProcessEventsFor(SMART_EVENT_WAYPOINT_START, nullptr, wp->id, GetScript()->GetPathId());
GetScript()->ProcessEventsFor(SMART_EVENT_ESCORT_START, nullptr, wp->id, GetScript()->GetPathId());
}
}
bool SmartAI::LoadPath(uint32 entry)
bool SmartAI::LoadPath(uint32 entry, PathSource pathSource)
{
if (HasEscortState(SMART_ESCORT_ESCORTING))
return false;
mWayPoints = sSmartWaypointMgr->GetPath(entry);
if (!mWayPoints)
switch (pathSource)
{
GetScript()->SetPathId(0);
return false;
case PathSource::SMART_WAYPOINT_MGR:
{
mWayPoints = sSmartWaypointMgr->GetPath(entry);
if (!mWayPoints)
{
GetScript()->SetPathId(0);
return false;
}
break;
}
case PathSource::WAYPOINT_MGR:
{
mWayPoints = sWaypointMgr->GetPath(entry);
if (!mWayPoints)
{
GetScript()->SetPathId(0);
return false;
}
break;
}
}
GetScript()->SetPathId(entry);
@@ -262,12 +282,12 @@ void SmartAI::PausePath(uint32 delay, bool forced)
me->GetMotionMaster()->MoveIdle();//force stop
auto waypoint = mWayPoints->find(mCurrentWPID);
if (waypoint->second->o.has_value())
if (waypoint->second.orientation.has_value())
{
me->SetFacingTo(waypoint->second->o.has_value());
me->SetFacingTo(*waypoint->second.orientation);
}
}
GetScript()->ProcessEventsFor(SMART_EVENT_WAYPOINT_PAUSED, nullptr, mCurrentWPID, GetScript()->GetPathId());
GetScript()->ProcessEventsFor(SMART_EVENT_ESCORT_PAUSED, nullptr, mCurrentWPID, GetScript()->GetPathId());
}
void SmartAI::StopPath(uint32 DespawnTime, uint32 quest, bool fail)
@@ -285,7 +305,7 @@ void SmartAI::StopPath(uint32 DespawnTime, uint32 quest, bool fail)
me->StopMoving();
me->GetMotionMaster()->MoveIdle();
GetScript()->ProcessEventsFor(SMART_EVENT_WAYPOINT_STOPPED, nullptr, mCurrentWPID, GetScript()->GetPathId());
GetScript()->ProcessEventsFor(SMART_EVENT_ESCORT_STOPPED, nullptr, mCurrentWPID, GetScript()->GetPathId());
EndPath(fail);
}
@@ -354,13 +374,13 @@ void SmartAI::EndPath(bool fail)
return;
}
GetScript()->ProcessEventsFor(SMART_EVENT_WAYPOINT_ENDED, nullptr, mCurrentWPID, GetScript()->GetPathId());
GetScript()->ProcessEventsFor(SMART_EVENT_ESCORT_ENDED, nullptr, mCurrentWPID, GetScript()->GetPathId());
mCurrentWPID = 0;
if (mCanRepeatPath)
{
if (IsAIControlled())
StartPath(FORCED_MOVEMENT_NONE, GetScript()->GetPathId(), true);
StartPath(mForcedMovement, GetScript()->GetPathId(), true);
}
else
GetScript()->SetPathId(0);
@@ -420,7 +440,7 @@ void SmartAI::UpdatePath(const uint32 diff)
{
if (!me->IsInCombat() && !HasEscortState(SMART_ESCORT_RETURNING) && (mWPReached || mForcedPaused))
{
GetScript()->ProcessEventsFor(SMART_EVENT_WAYPOINT_RESUMED, nullptr, mCurrentWPID, GetScript()->GetPathId());
GetScript()->ProcessEventsFor(SMART_EVENT_ESCORT_RESUMED, nullptr, mCurrentWPID, GetScript()->GetPathId());
RemoveEscortState(SMART_ESCORT_PAUSED);
if (mForcedPaused)// if paused between 2 wps resend movement
{
@@ -599,7 +619,7 @@ void SmartAI::MovepointReached(uint32 id)
}
mWPReached = true;
GetScript()->ProcessEventsFor(SMART_EVENT_WAYPOINT_REACHED, nullptr, mCurrentWPID);
GetScript()->ProcessEventsFor(SMART_EVENT_ESCORT_REACHED, nullptr, mCurrentWPID);
if (mLastWP)
{
@@ -636,7 +656,7 @@ void SmartAI::MovementInform(uint32 MovementType, uint32 Data)
me->ClearUnitState(UNIT_STATE_EVADE);
if (MovementType == WAYPOINT_MOTION_TYPE)
GetScript()->ProcessEventsFor(SMART_EVENT_WAYPOINT_DATA_REACHED, nullptr, Data + 1); // Data + 1 to align smart_scripts and waypoint_data Id rows
GetScript()->ProcessEventsFor(SMART_EVENT_WAYPOINT_REACHED, nullptr, Data); // data now corresponds to columns
GetScript()->ProcessEventsFor(SMART_EVENT_MOVEMENTINFORM, nullptr, MovementType, Data);
if (!HasEscortState(SMART_ESCORT_ESCORTING))
@@ -786,7 +806,7 @@ void SmartAI::JustReachedHome()
GetScript()->ProcessEventsFor(SMART_EVENT_REACHED_HOME);
if (!UpdateVictim() && me->GetMotionMaster()->GetCurrentMovementGeneratorType() == IDLE_MOTION_TYPE && me->GetWaypointPath())
me->GetMotionMaster()->MovePath(me->GetWaypointPath(), true);
me->GetMotionMaster()->MoveWaypoint(me->GetWaypointPath(), true);
}
mJustReset = false;
@@ -943,7 +963,7 @@ void SmartAI::OnCharmed(bool /* apply */)
if (!charmed && !me->IsInEvadeMode())
{
if (mCanRepeatPath)
StartPath(FORCED_MOVEMENT_NONE, GetScript()->GetPathId(), true);
StartPath(mForcedMovement, GetScript()->GetPathId(), true);
if (Unit* charmer = me->GetCharmer())
AttackStart(charmer);
@@ -1149,7 +1169,7 @@ void SmartAI::OnSpellClick(Unit* clicker, bool& /*result*/)
void SmartAI::PathEndReached(uint32 /*pathId*/)
{
GetScript()->ProcessEventsFor(SMART_EVENT_WAYPOINT_DATA_ENDED, nullptr, 0, me->GetWaypointPath());
GetScript()->ProcessEventsFor(SMART_EVENT_WAYPOINT_ENDED, nullptr, 0, me->GetWaypointPath());
me->LoadPath(0);
}
+5 -5
View File
@@ -52,13 +52,13 @@ public:
bool IsAIControlled() const;
// Start moving to the desired MovePoint
void StartPath(ForcedMovement forcedMovement = FORCED_MOVEMENT_NONE, uint32 path = 0, bool repeat = false, Unit* invoker = nullptr);
bool LoadPath(uint32 entry);
void StartPath(ForcedMovement forcedMovement = FORCED_MOVEMENT_NONE, uint32 path = 0, bool repeat = false, Unit* invoker = nullptr, PathSource pathSource = PathSource::SMART_WAYPOINT_MGR);
bool LoadPath(uint32 entry, PathSource pathSource);
void PausePath(uint32 delay, bool forced = false);
void StopPath(uint32 DespawnTime = 0, uint32 quest = 0, bool fail = false);
void EndPath(bool fail = false);
void ResumePath();
WayPoint* GetNextWayPoint();
WaypointData const* GetNextWayPoint();
void GenerateWayPointArray(Movement::PointsArray* points);
bool HasEscortState(uint32 uiEscortState) { return (mEscortState & uiEscortState); }
void AddEscortState(uint32 uiEscortState) { mEscortState |= uiEscortState; }
@@ -227,13 +227,13 @@ private:
void ReturnToLastOOCPos();
void UpdatePath(const uint32 diff);
SmartScript mScript;
WPPath* mWayPoints;
WaypointPath const* mWayPoints;
uint32 mEscortState;
uint32 mCurrentWPID;
bool mWPReached;
bool mOOCReached;
uint32 mWPPauseTimer;
WayPoint* mLastWP;
WaypointData const* mLastWP;
uint32 mEscortNPCFlags;
uint32 GetWPCount() { return mWayPoints ? mWayPoints->size() : 0; }
bool mCanRepeatPath;
+24 -24
View File
@@ -1723,7 +1723,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
StoreCounter(e.action.setCounter.counterId, e.action.setCounter.value, e.action.setCounter.reset, e.action.setCounter.subtract);
break;
}
case SMART_ACTION_WP_START:
case SMART_ACTION_ESCORT_START:
{
if (!IsSmart())
break;
@@ -1750,16 +1750,16 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
CAST_AI(SmartAI, me->AI())->SetDespawnTime(DespawnTime);
break;
}
case SMART_ACTION_WP_PAUSE:
case SMART_ACTION_ESCORT_PAUSE:
{
if (!IsSmart())
break;
uint32 delay = e.action.wpPause.delay;
CAST_AI(SmartAI, me->AI())->PausePath(delay, e.GetEventType() == SMART_EVENT_WAYPOINT_REACHED ? false : true);
CAST_AI(SmartAI, me->AI())->PausePath(delay, e.GetEventType() == SMART_EVENT_ESCORT_REACHED ? false : true);
break;
}
case SMART_ACTION_WP_STOP:
case SMART_ACTION_ESCORT_STOP:
{
if (!IsSmart())
break;
@@ -1770,7 +1770,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
CAST_AI(SmartAI, me->AI())->StopPath(DespawnTime, quest, fail);
break;
}
case SMART_ACTION_WP_RESUME:
case SMART_ACTION_ESCORT_RESUME:
{
if (!IsSmart())
break;
@@ -2519,21 +2519,19 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
{
for (uint32 wp = e.action.startClosestWaypoint.pathId1; wp <= e.action.startClosestWaypoint.pathId2; ++wp)
{
WPPath* path = sSmartWaypointMgr->GetPath(wp);
WaypointPath* path = sSmartWaypointMgr->GetPath(wp);
if (!path || path->empty())
continue;
auto itrWp = path->find(1);
if (itrWp != path->end())
{
if (WayPoint* wpData = itrWp->second)
WaypointData& wpData = itrWp->second;
float distToThisPath = creature->GetExactDistSq(wpData.x, wpData.y, wpData.z);
if (distToThisPath < distanceToClosest)
{
float distToThisPath = creature->GetExactDistSq(wpData->x, wpData->y, wpData->z);
if (distToThisPath < distanceToClosest)
{
distanceToClosest = distToThisPath;
closestWpId = wp;
}
distanceToClosest = distToThisPath;
closestWpId = wp;
}
}
}
@@ -3221,7 +3219,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
}
break;
}
case SMART_ACTION_WAYPOINT_DATA_START:
case SMART_ACTION_WAYPOINT_START:
{
if (e.action.wpData.pathId)
{
@@ -3230,7 +3228,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (IsCreature(target))
{
target->ToCreature()->LoadPath(e.action.wpData.pathId);
target->ToCreature()->GetMotionMaster()->MovePath(e.action.wpData.pathId, e.action.wpData.repeat);
target->ToCreature()->GetMotionMaster()->MoveWaypoint(e.action.wpData.pathId, e.action.wpData.repeat, e.action.wpData.pathSource);
}
}
}
@@ -3247,7 +3245,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
{
uint32 path = urand(e.action.wpDataRandom.pathId1, e.action.wpDataRandom.pathId2);
target->ToCreature()->LoadPath(path);
target->ToCreature()->GetMotionMaster()->MovePath(path, e.action.wpDataRandom.repeat);
target->ToCreature()->GetMotionMaster()->MoveWaypoint(path, e.action.wpDataRandom.repeat);
}
}
}
@@ -4398,22 +4396,24 @@ void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, ui
{
if ((e.event.movementInform.type && var0 != e.event.movementInform.type) || (e.event.movementInform.id && var1 != e.event.movementInform.id))
return;
if (e.event.movementInform.pathId != 0 && e.event.movementInform.pathId != me->GetWaypointPath())
return;
ProcessAction(e, unit, var0, var1);
break;
}
case SMART_EVENT_TRANSPORT_RELOCATE:
case SMART_EVENT_WAYPOINT_START:
case SMART_EVENT_ESCORT_START:
{
if (e.event.waypoint.pathID && var0 != e.event.waypoint.pathID)
return;
ProcessAction(e, unit, var0);
break;
}
case SMART_EVENT_WAYPOINT_REACHED:
case SMART_EVENT_WAYPOINT_RESUMED:
case SMART_EVENT_WAYPOINT_PAUSED:
case SMART_EVENT_WAYPOINT_STOPPED:
case SMART_EVENT_WAYPOINT_ENDED:
case SMART_EVENT_ESCORT_REACHED:
case SMART_EVENT_ESCORT_RESUMED:
case SMART_EVENT_ESCORT_PAUSED:
case SMART_EVENT_ESCORT_STOPPED:
case SMART_EVENT_ESCORT_ENDED:
{
if (!me || (e.event.waypoint.pointID && var0 != e.event.waypoint.pointID) || (e.event.waypoint.pathID && GetPathId() != e.event.waypoint.pathID))
return;
@@ -4807,8 +4807,8 @@ void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, ui
RecalcTimer(e, 1200, 1200);
break;
}
case SMART_EVENT_WAYPOINT_DATA_REACHED:
case SMART_EVENT_WAYPOINT_DATA_ENDED:
case SMART_EVENT_WAYPOINT_REACHED:
case SMART_EVENT_WAYPOINT_ENDED:
{
if (!me || (e.event.wpData.pointId && var0 != e.event.wpData.pointId) || (e.event.wpData.pathId && me->GetWaypointPath() != e.event.wpData.pathId))
return;
@@ -48,12 +48,9 @@ void SmartWaypointMgr::LoadFromDB()
{
uint32 oldMSTime = getMSTime();
for (std::unordered_map<uint32, WPPath*>::iterator itr = waypoint_map.begin(); itr != waypoint_map.end(); ++itr)
for (auto itr : waypoint_map)
{
for (WPPath::iterator pathItr = itr->second->begin(); pathItr != itr->second->end(); ++pathItr)
delete pathItr->second;
delete itr->second;
delete itr.second;
}
waypoint_map.clear();
@@ -88,7 +85,7 @@ void SmartWaypointMgr::LoadFromDB()
if (last_entry != entry)
{
waypoint_map[entry] = new WPPath();
waypoint_map[entry] = new WaypointPath();
last_id = 1;
count++;
}
@@ -97,7 +94,15 @@ void SmartWaypointMgr::LoadFromDB()
LOG_ERROR("sql.sql", "SmartWaypointMgr::LoadFromDB: Path entry {}, unexpected point id {}, expected {}.", entry, id, last_id);
last_id++;
(*waypoint_map[entry])[id] = new WayPoint(id, x, y, z, o, delay);
WaypointData data;
data.id = id;
data.x = x;
data.y = y;
data.z = z;
data.orientation = o;
data.delay = delay;
data.move_type = WAYPOINT_MOVE_TYPE_MAX;
(*waypoint_map[entry]).emplace(id, data);
last_entry = entry;
total++;
@@ -109,12 +114,9 @@ void SmartWaypointMgr::LoadFromDB()
SmartWaypointMgr::~SmartWaypointMgr()
{
for (std::unordered_map<uint32, WPPath*>::iterator itr = waypoint_map.begin(); itr != waypoint_map.end(); ++itr)
for (auto itr : waypoint_map)
{
for (WPPath::iterator pathItr = itr->second->begin(); pathItr != itr->second->end(); ++pathItr)
delete pathItr->second;
delete itr->second;
delete itr.second;
}
}
@@ -625,8 +627,8 @@ bool SmartAIMgr::CheckUnusedEventParams(SmartScriptHolder const& e)
case SMART_EVENT_CORPSE_REMOVED: return NO_PARAMS;
case SMART_EVENT_AI_INIT: return NO_PARAMS;
case SMART_EVENT_DATA_SET: return sizeof(SmartEvent::dataSet);
case SMART_EVENT_WAYPOINT_START: return sizeof(SmartEvent::waypoint);
case SMART_EVENT_WAYPOINT_REACHED: return sizeof(SmartEvent::waypoint);
case SMART_EVENT_ESCORT_START: return sizeof(SmartEvent::waypoint);
case SMART_EVENT_ESCORT_REACHED: return sizeof(SmartEvent::waypoint);
case SMART_EVENT_TRANSPORT_ADDPLAYER: return NO_PARAMS;
case SMART_EVENT_TRANSPORT_ADDCREATURE: return sizeof(SmartEvent::transportAddCreature);
case SMART_EVENT_TRANSPORT_REMOVE_PLAYER: return NO_PARAMS;
@@ -641,10 +643,10 @@ bool SmartAIMgr::CheckUnusedEventParams(SmartScriptHolder const& e)
case SMART_EVENT_TEXT_OVER: return sizeof(SmartEvent::textOver);
case SMART_EVENT_RECEIVE_HEAL: return sizeof(SmartEvent::minMaxRepeat);
case SMART_EVENT_JUST_SUMMONED: return NO_PARAMS;
case SMART_EVENT_WAYPOINT_PAUSED: return sizeof(SmartEvent::waypoint);
case SMART_EVENT_WAYPOINT_RESUMED: return sizeof(SmartEvent::waypoint);
case SMART_EVENT_WAYPOINT_STOPPED: return sizeof(SmartEvent::waypoint);
case SMART_EVENT_WAYPOINT_ENDED: return sizeof(SmartEvent::waypoint);
case SMART_EVENT_ESCORT_PAUSED: return sizeof(SmartEvent::waypoint);
case SMART_EVENT_ESCORT_RESUMED: return sizeof(SmartEvent::waypoint);
case SMART_EVENT_ESCORT_STOPPED: return sizeof(SmartEvent::waypoint);
case SMART_EVENT_ESCORT_ENDED: return sizeof(SmartEvent::waypoint);
case SMART_EVENT_TIMED_EVENT_TRIGGERED: return sizeof(SmartEvent::timedEvent);
case SMART_EVENT_UPDATE: return sizeof(SmartEvent::minMaxRepeat);
case SMART_EVENT_LINK: return NO_PARAMS;
@@ -677,8 +679,8 @@ bool SmartAIMgr::CheckUnusedEventParams(SmartScriptHolder const& e)
case SMART_EVENT_AREA_CASTING: return sizeof(SmartEvent::minMaxRepeat);
case SMART_EVENT_AREA_RANGE: return sizeof(SmartEvent::minMaxRepeat);
case SMART_EVENT_SUMMONED_UNIT_EVADE: return sizeof(SmartEvent::summoned);
case SMART_EVENT_WAYPOINT_DATA_REACHED: return sizeof(SmartEvent::wpData);
case SMART_EVENT_WAYPOINT_DATA_ENDED: return sizeof(SmartEvent::wpData);
case SMART_EVENT_WAYPOINT_REACHED: return sizeof(SmartEvent::wpData);
case SMART_EVENT_WAYPOINT_ENDED: return sizeof(SmartEvent::wpData);
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());
@@ -765,9 +767,9 @@ bool SmartAIMgr::CheckUnusedActionParams(SmartScriptHolder const& e)
case SMART_ACTION_SUMMON_GO: return sizeof(SmartAction::summonGO);
case SMART_ACTION_KILL_UNIT: return NO_PARAMS;
case SMART_ACTION_ACTIVATE_TAXI: return sizeof(SmartAction::taxi);
case SMART_ACTION_WP_START: return sizeof(SmartAction::wpStart);
case SMART_ACTION_WP_PAUSE: return sizeof(SmartAction::wpPause);
case SMART_ACTION_WP_STOP: return sizeof(SmartAction::wpStop);
case SMART_ACTION_ESCORT_START: return sizeof(SmartAction::wpStart);
case SMART_ACTION_ESCORT_PAUSE: return sizeof(SmartAction::wpPause);
case SMART_ACTION_ESCORT_STOP: return sizeof(SmartAction::wpStop);
case SMART_ACTION_ADD_ITEM: return sizeof(SmartAction::item);
case SMART_ACTION_REMOVE_ITEM: return sizeof(SmartAction::item);
case SMART_ACTION_INSTALL_AI_TEMPLATE: return sizeof(SmartAction::installTtemplate);
@@ -777,7 +779,7 @@ bool SmartAIMgr::CheckUnusedActionParams(SmartScriptHolder const& e)
case SMART_ACTION_TELEPORT: return sizeof(SmartAction::teleport);
case SMART_ACTION_SET_COUNTER: return sizeof(SmartAction::setCounter);
case SMART_ACTION_STORE_TARGET_LIST: return sizeof(SmartAction::storeTargets);
case SMART_ACTION_WP_RESUME: return NO_PARAMS;
case SMART_ACTION_ESCORT_RESUME: return NO_PARAMS;
case SMART_ACTION_SET_ORIENTATION: return sizeof(SmartAction::orientation);
case SMART_ACTION_CREATE_TIMED_EVENT: return sizeof(SmartAction::timeEvent);
case SMART_ACTION_PLAYMOVIE: return sizeof(SmartAction::movie);
@@ -875,7 +877,7 @@ bool SmartAIMgr::CheckUnusedActionParams(SmartScriptHolder const& e)
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);
case SMART_ACTION_WAYPOINT_DATA_START: return sizeof(SmartAction::wpData);
case SMART_ACTION_WAYPOINT_START: return sizeof(SmartAction::wpData);
case SMART_ACTION_WAYPOINT_DATA_RANDOM: return sizeof(SmartAction::wpDataRandom);
case SMART_ACTION_MOVEMENT_STOP: return NO_PARAMS;
case SMART_ACTION_MOVEMENT_PAUSE: return sizeof(SmartAction::move);
@@ -1416,19 +1418,19 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
case SMART_EVENT_QUEST_REWARDED:
case SMART_EVENT_QUEST_FAIL:
case SMART_EVENT_JUST_SUMMONED:
case SMART_EVENT_WAYPOINT_START:
case SMART_EVENT_WAYPOINT_REACHED:
case SMART_EVENT_WAYPOINT_PAUSED:
case SMART_EVENT_WAYPOINT_RESUMED:
case SMART_EVENT_WAYPOINT_STOPPED:
case SMART_EVENT_WAYPOINT_ENDED:
case SMART_EVENT_ESCORT_START:
case SMART_EVENT_ESCORT_REACHED:
case SMART_EVENT_ESCORT_PAUSED:
case SMART_EVENT_ESCORT_RESUMED:
case SMART_EVENT_ESCORT_STOPPED:
case SMART_EVENT_ESCORT_ENDED:
case SMART_EVENT_GOSSIP_SELECT:
case SMART_EVENT_GOSSIP_HELLO:
case SMART_EVENT_JUST_CREATED:
case SMART_EVENT_FOLLOW_COMPLETED:
case SMART_EVENT_ON_SPELLCLICK:
case SMART_EVENT_WAYPOINT_DATA_REACHED:
case SMART_EVENT_WAYPOINT_DATA_ENDED:
case SMART_EVENT_WAYPOINT_REACHED:
case SMART_EVENT_WAYPOINT_ENDED:
break;
default:
LOG_ERROR("sql.sql", "SmartAIMgr: Not handled event_type({}), Entry {} SourceType {} Event {} Action {}, skipped.", e.GetEventType(), e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
@@ -1721,11 +1723,11 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
return false;
}
break;
case SMART_ACTION_WP_STOP:
case SMART_ACTION_ESCORT_STOP:
if (e.action.wpStop.quest && !IsQuestValid(e, e.action.wpStop.quest))
return false;
return IsSAIBoolValid(e, e.action.wpStop.fail);
case SMART_ACTION_WP_START:
case SMART_ACTION_ESCORT_START:
{
if (!sSmartWaypointMgr->GetPath(e.action.wpStart.pathID))
{
@@ -1940,7 +1942,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
case SMART_ACTION_STORE_TARGET_LIST:
case SMART_ACTION_COMBAT_STOP:
case SMART_ACTION_DIE:
case SMART_ACTION_WP_RESUME:
case SMART_ACTION_ESCORT_RESUME:
case SMART_ACTION_KILL_UNIT:
case SMART_ACTION_SET_INVINCIBILITY_HP_LEVEL:
case SMART_ACTION_RESET_GOBJECT:
@@ -1950,7 +1952,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
case SMART_ACTION_SET_INST_DATA64:
case SMART_ACTION_SET_DATA:
case SMART_ACTION_MOVE_FORWARD:
case SMART_ACTION_WP_PAUSE:
case SMART_ACTION_ESCORT_PAUSE:
case SMART_ACTION_SET_FLY:
case SMART_ACTION_FORCE_DESPAWN:
case SMART_ACTION_SET_INGAME_PHASE_MASK:
@@ -2020,7 +2022,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
case SMART_ACTION_PLAY_SPELL_VISUAL:
case SMART_ACTION_FOLLOW_GROUP:
case SMART_ACTION_SET_ORIENTATION_TARGET:
case SMART_ACTION_WAYPOINT_DATA_START:
case SMART_ACTION_WAYPOINT_START:
case SMART_ACTION_WAYPOINT_DATA_RANDOM:
case SMART_ACTION_MOVEMENT_STOP:
case SMART_ACTION_MOVEMENT_PAUSE:
@@ -26,29 +26,10 @@
#include "Optional.h"
#include "SpellMgr.h"
#include <limits>
#include "WaypointMgr.h"
typedef uint32 SAIBool;
struct WayPoint
{
WayPoint(uint32 _id, float _x, float _y, float _z, Optional<float> _o, uint32 _delay)
{
id = _id;
x = _x;
y = _y;
z = _z;
o = _o;
delay = _delay;
}
uint32 id;
float x;
float y;
float z;
std::optional<float> o;
uint32 delay;
};
enum eSmartAI
{
SMART_EVENT_PARAM_COUNT = 4,
@@ -149,13 +130,13 @@ enum SMART_EVENT
SMART_EVENT_SPELLHIT_TARGET = 31, // SpellID, School, CooldownMin, CooldownMax
SMART_EVENT_DAMAGED = 32, // MinDmg, MaxDmg, CooldownMin, CooldownMax
SMART_EVENT_DAMAGED_TARGET = 33, // MinDmg, MaxDmg, CooldownMin, CooldownMax
SMART_EVENT_MOVEMENTINFORM = 34, // MovementType(any), PointID
SMART_EVENT_MOVEMENTINFORM = 34, // MovementType(any), PointID, PathId(0 - any)
SMART_EVENT_SUMMON_DESPAWNED = 35, // Entry, CooldownMin, CooldownMax
SMART_EVENT_CORPSE_REMOVED = 36, // NONE
SMART_EVENT_AI_INIT = 37, // NONE
SMART_EVENT_DATA_SET = 38, // Id, Value, CooldownMin, CooldownMax
SMART_EVENT_WAYPOINT_START = 39, // PointId(0any), pathID(0any)
SMART_EVENT_WAYPOINT_REACHED = 40, // PointId(0any), pathID(0any)
SMART_EVENT_ESCORT_START = 39, // PointId(0any), pathID(0any)
SMART_EVENT_ESCORT_REACHED = 40, // PointId(0any), pathID(0any)
SMART_EVENT_TRANSPORT_ADDPLAYER = 41, // NONE
SMART_EVENT_TRANSPORT_ADDCREATURE = 42, // Entry (0 any)
SMART_EVENT_TRANSPORT_REMOVE_PLAYER = 43, // NONE
@@ -170,10 +151,10 @@ enum SMART_EVENT
SMART_EVENT_TEXT_OVER = 52, // GroupId from creature_text, creature entry who talks (0 any)
SMART_EVENT_RECEIVE_HEAL = 53, // MinHeal, MaxHeal, CooldownMin, CooldownMax
SMART_EVENT_JUST_SUMMONED = 54, // none
SMART_EVENT_WAYPOINT_PAUSED = 55, // PointId(0any), pathID(0any)
SMART_EVENT_WAYPOINT_RESUMED = 56, // PointId(0any), pathID(0any)
SMART_EVENT_WAYPOINT_STOPPED = 57, // PointId(0any), pathID(0any)
SMART_EVENT_WAYPOINT_ENDED = 58, // PointId(0any), pathID(0any)
SMART_EVENT_ESCORT_PAUSED = 55, // PointId(0any), pathID(0any)
SMART_EVENT_ESCORT_RESUMED = 56, // PointId(0any), pathID(0any)
SMART_EVENT_ESCORT_STOPPED = 57, // PointId(0any), pathID(0any)
SMART_EVENT_ESCORT_ENDED = 58, // PointId(0any), pathID(0any)
SMART_EVENT_TIMED_EVENT_TRIGGERED = 59, // id
SMART_EVENT_UPDATE = 60, // InitialMin, InitialMax, RepeatMin, RepeatMax
SMART_EVENT_LINK = 61, // INTERNAL USAGE, no params, used to link together multiple events, does not use any extra resources to iterate event lists needlessly
@@ -213,8 +194,8 @@ enum SMART_EVENT
SMART_EVENT_AREA_CASTING = 105, // min, max, repeatMin, repeatMax, rangeMin, rangeMax
SMART_EVENT_AREA_RANGE = 106, // min, max, repeatMin, repeatMax, rangeMin, rangeMax
SMART_EVENT_SUMMONED_UNIT_EVADE = 107, // CreatureId(0 all), CooldownMin, CooldownMax
SMART_EVENT_WAYPOINT_DATA_REACHED = 108, // PointId (0: any), pathId (0: any)
SMART_EVENT_WAYPOINT_DATA_ENDED = 109, // PointId (0: any), pathId (0: any)
SMART_EVENT_WAYPOINT_REACHED = 108, // PointId (0: any), pathId (0: any)
SMART_EVENT_WAYPOINT_ENDED = 109, // PointId (0: any), pathId (0: any)
SMART_EVENT_IS_IN_MELEE_RANGE = 110, // min, max, repeatMin, repeatMax, dist, invert (0: false, 1: true)
SMART_EVENT_AC_END = 111
@@ -356,6 +337,7 @@ struct SmartEvent
{
uint32 type;
uint32 id;
uint32 pathId;
} movementInform;
struct
@@ -608,9 +590,9 @@ enum SMART_ACTION
SMART_ACTION_SUMMON_GO = 50, // GameObjectID, DespawnTime, targetSummon, summonType (0 time or summoner dies/1 time)
SMART_ACTION_KILL_UNIT = 51, //
SMART_ACTION_ACTIVATE_TAXI = 52, // TaxiID
SMART_ACTION_WP_START = 53, // run/walk, pathID, canRepeat, quest, despawntime, reactState
SMART_ACTION_WP_PAUSE = 54, // time
SMART_ACTION_WP_STOP = 55, // despawnTime, quest, fail?
SMART_ACTION_ESCORT_START = 53, // run/walk, pathID, canRepeat, quest, despawntime, reactState
SMART_ACTION_ESCORT_PAUSE = 54, // time
SMART_ACTION_ESCORT_STOP = 55, // despawnTime, quest, fail?
SMART_ACTION_ADD_ITEM = 56, // itemID, count
SMART_ACTION_REMOVE_ITEM = 57, // itemID, count
SMART_ACTION_INSTALL_AI_TEMPLATE = 58, // AITemplateID
@@ -620,7 +602,7 @@ enum SMART_ACTION
SMART_ACTION_TELEPORT = 62, // mapID,
SMART_ACTION_SET_COUNTER = 63, // id, value, reset (0/1)
SMART_ACTION_STORE_TARGET_LIST = 64, // varID,
SMART_ACTION_WP_RESUME = 65, // none
SMART_ACTION_ESCORT_RESUME = 65, // none
SMART_ACTION_SET_ORIENTATION = 66, // quick change, random orientation? (0/1), turnAngle
SMART_ACTION_CREATE_TIMED_EVENT = 67, // id, InitialMin, InitialMax, RepeatMin(only if it repeats), RepeatMax(only if it repeats), chance
SMART_ACTION_PLAYMOVIE = 68, // entry
@@ -732,7 +714,7 @@ enum SMART_ACTION
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_WAYPOINT_DATA_START = 232, // pathId, repeat
SMART_ACTION_WAYPOINT_START = 232, // pathId, repeat, pathSource
SMART_ACTION_WAYPOINT_DATA_RANDOM = 233, // pathId1, pathId2, repeat
SMART_ACTION_MOVEMENT_STOP = 234, //
SMART_ACTION_MOVEMENT_PAUSE = 235, // timer
@@ -1482,6 +1464,7 @@ struct SmartAction
{
uint32 pathId;
SAIBool repeat;
PathSource pathSource;
} wpData;
struct
@@ -1853,8 +1836,8 @@ const uint32 SmartAIEventMask[SMART_EVENT_AC_END][2] =
{SMART_EVENT_CORPSE_REMOVED, SMART_SCRIPT_TYPE_MASK_CREATURE },
{SMART_EVENT_AI_INIT, SMART_SCRIPT_TYPE_MASK_CREATURE + SMART_SCRIPT_TYPE_MASK_GAMEOBJECT },
{SMART_EVENT_DATA_SET, SMART_SCRIPT_TYPE_MASK_CREATURE + SMART_SCRIPT_TYPE_MASK_GAMEOBJECT },
{SMART_EVENT_WAYPOINT_START, SMART_SCRIPT_TYPE_MASK_CREATURE },
{SMART_EVENT_WAYPOINT_REACHED, SMART_SCRIPT_TYPE_MASK_CREATURE },
{SMART_EVENT_ESCORT_START, SMART_SCRIPT_TYPE_MASK_CREATURE },
{SMART_EVENT_ESCORT_REACHED, SMART_SCRIPT_TYPE_MASK_CREATURE },
{SMART_EVENT_TRANSPORT_ADDPLAYER, SMART_SCRIPT_TYPE_MASK_TRANSPORT },
{SMART_EVENT_TRANSPORT_ADDCREATURE, SMART_SCRIPT_TYPE_MASK_TRANSPORT },
{SMART_EVENT_TRANSPORT_REMOVE_PLAYER, SMART_SCRIPT_TYPE_MASK_TRANSPORT },
@@ -1869,10 +1852,10 @@ const uint32 SmartAIEventMask[SMART_EVENT_AC_END][2] =
{SMART_EVENT_TEXT_OVER, SMART_SCRIPT_TYPE_MASK_CREATURE + SMART_SCRIPT_TYPE_MASK_GAMEOBJECT },
{SMART_EVENT_RECEIVE_HEAL, SMART_SCRIPT_TYPE_MASK_CREATURE },
{SMART_EVENT_JUST_SUMMONED, SMART_SCRIPT_TYPE_MASK_CREATURE },
{SMART_EVENT_WAYPOINT_PAUSED, SMART_SCRIPT_TYPE_MASK_CREATURE },
{SMART_EVENT_WAYPOINT_RESUMED, SMART_SCRIPT_TYPE_MASK_CREATURE },
{SMART_EVENT_WAYPOINT_STOPPED, SMART_SCRIPT_TYPE_MASK_CREATURE },
{SMART_EVENT_WAYPOINT_ENDED, SMART_SCRIPT_TYPE_MASK_CREATURE },
{SMART_EVENT_ESCORT_PAUSED, SMART_SCRIPT_TYPE_MASK_CREATURE },
{SMART_EVENT_ESCORT_RESUMED, SMART_SCRIPT_TYPE_MASK_CREATURE },
{SMART_EVENT_ESCORT_STOPPED, SMART_SCRIPT_TYPE_MASK_CREATURE },
{SMART_EVENT_ESCORT_ENDED, SMART_SCRIPT_TYPE_MASK_CREATURE },
{SMART_EVENT_TIMED_EVENT_TRIGGERED, SMART_SCRIPT_TYPE_MASK_CREATURE + SMART_SCRIPT_TYPE_MASK_GAMEOBJECT },
{SMART_EVENT_UPDATE, SMART_SCRIPT_TYPE_MASK_CREATURE + SMART_SCRIPT_TYPE_MASK_GAMEOBJECT },
{SMART_EVENT_LINK, SMART_SCRIPT_TYPE_MASK_CREATURE + SMART_SCRIPT_TYPE_MASK_GAMEOBJECT + SMART_SCRIPT_TYPE_MASK_AREATRIGGER + SMART_SCRIPT_TYPE_MASK_EVENT + SMART_SCRIPT_TYPE_MASK_GOSSIP + SMART_SCRIPT_TYPE_MASK_QUEST + SMART_SCRIPT_TYPE_MASK_SPELL + SMART_SCRIPT_TYPE_MASK_TRANSPORT + SMART_SCRIPT_TYPE_MASK_INSTANCE },
@@ -1922,8 +1905,8 @@ const uint32 SmartAIEventMask[SMART_EVENT_AC_END][2] =
{SMART_EVENT_AREA_CASTING, SMART_SCRIPT_TYPE_MASK_CREATURE },
{SMART_EVENT_AREA_RANGE, SMART_SCRIPT_TYPE_MASK_CREATURE },
{SMART_EVENT_SUMMONED_UNIT_EVADE, SMART_SCRIPT_TYPE_MASK_CREATURE + SMART_SCRIPT_TYPE_MASK_GAMEOBJECT },
{SMART_EVENT_WAYPOINT_DATA_REACHED, SMART_SCRIPT_TYPE_MASK_CREATURE },
{SMART_EVENT_WAYPOINT_DATA_ENDED, SMART_SCRIPT_TYPE_MASK_CREATURE },
{SMART_EVENT_WAYPOINT_REACHED, SMART_SCRIPT_TYPE_MASK_CREATURE },
{SMART_EVENT_WAYPOINT_ENDED, SMART_SCRIPT_TYPE_MASK_CREATURE },
{SMART_EVENT_IS_IN_MELEE_RANGE, SMART_SCRIPT_TYPE_MASK_CREATURE },
};
@@ -2010,8 +1993,6 @@ public:
static constexpr uint32 DEFAULT_PRIORITY = std::numeric_limits<uint32>::max();
};
typedef std::unordered_map<uint32, WayPoint*> WPPath;
typedef std::vector<WorldObject*> ObjectVector;
class ObjectGuidVector
@@ -2059,7 +2040,7 @@ public:
void LoadFromDB();
WPPath* GetPath(uint32 id)
WaypointPath* GetPath(uint32 id)
{
if (waypoint_map.find(id) != waypoint_map.end())
return waypoint_map[id];
@@ -2067,7 +2048,7 @@ public:
}
private:
std::unordered_map<uint32, WPPath*> waypoint_map;
std::unordered_map<uint32, WaypointPath*> waypoint_map;
};
// all events for a single entry
@@ -1178,16 +1178,19 @@ void Battleground::AddPlayer(Player* player)
sBattlegroundMgr->BuildPlayerJoinedBattlegroundPacket(&data, player);
SendPacketToTeam(teamId, &data, player, false);
player->RemoveAurasByType(SPELL_AURA_MOUNTED);
// add arena specific auras
if (isArena())
{
// restore pets health before remove
if (Pet* pet = player->GetPet())
Pet* pet = player->GetPet();
if (pet)
if (pet->IsAlive())
pet->SetHealth(pet->GetMaxHealth());
player->RemoveArenaAuras();
if (pet)
pet->RemoveArenaAuras();
player->RemoveArenaSpellCooldowns(true);
player->RemoveArenaEnchantments(TEMP_ENCHANTMENT_SLOT);
player->DestroyConjuredItems(true);
player->UnsummonPetTemporaryIfAny();
+2 -11
View File
@@ -417,6 +417,8 @@ Player::Player(WorldSession* session): Unit(), m_mover(this)
GetObjectVisibilityContainer().InitForPlayer();
sScriptMgr->OnConstructPlayer(this);
m_expectingChangeTransport = false;
}
Player::~Player()
@@ -1531,17 +1533,6 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
CombatStop();
// remove arena spell coldowns/buffs now to also remove pet's cooldowns before it's temporarily unsummoned
if (mEntry->IsBattleArena() && (HasPendingSpectatorForBG(0) || !HasPendingSpectatorForBG(GetBattlegroundId())))
{
// KEEP THIS ORDER!
RemoveArenaAuras();
if (pet)
pet->RemoveArenaAuras();
RemoveArenaSpellCooldowns(true);
}
// remove pet on map change
if (pet)
UnsummonPetTemporaryIfAny();
+5
View File
@@ -2627,6 +2627,9 @@ public:
std::string GetDebugInfo() const override;
bool IsExpectingChangeTransport() const { return m_expectingChangeTransport; }
void SetExpectingChangeTransport(bool state) { m_expectingChangeTransport = state; }
/*********************************************************/
/*** SPELL QUEUE SYSTEM ***/
/*********************************************************/
@@ -3007,6 +3010,8 @@ private:
PlayerSettingMap m_charSettingsMap;
Seconds m_creationTime;
bool m_expectingChangeTransport;
};
void AddItemsSetItem(Player* player, Item* item);
+3
View File
@@ -19562,6 +19562,9 @@ void Unit::_ExitVehicle(Position const* exitPosition)
if (!vehicleBase)
return;
if (IsPlayer())
ToPlayer()->SetExpectingChangeTransport(true);
SetControlled(false, UNIT_STATE_ROOT); // SMSG_MOVE_FORCE_UNROOT, ~MOVEMENTFLAG_ROOT
Position pos;
+3 -1
View File
@@ -423,7 +423,9 @@ bool Vehicle::AddPassenger(Unit* unit, int8 seatId)
if (_me->IsInWorld())
{
unit->SendClearTarget(); // SMSG_BREAK_TARGET
unit->SetControlled(true, UNIT_STATE_ROOT); // SMSG_FORCE_ROOT - In some cases we send SMSG_SPLINE_MOVE_ROOT here (for creatures)
unit->SetControlled(true, UNIT_STATE_ROOT); // SMSG_FORCE_ROOT - In some cases we send SMSG_SPLINE_MOVE_ROOT here (for creatures)
if (unit->IsPlayer())
unit->ToPlayer()->SetExpectingChangeTransport(true);
// also adds MOVEMENTFLAG_ROOT
Movement::MoveSplineInit init(unit);
init.DisableTransportPathTransformations();
+14 -4
View File
@@ -376,6 +376,9 @@ void WorldSession::HandleMovementOpcodes(WorldPacket& recvData)
return;
}
if (opcode == CMSG_MOVE_FALL_RESET || opcode == CMSG_MOVE_CHNG_TRANSPORT)
return;
/* process position-change */
WorldPacket data(opcode, recvData.size());
WriteMovementInfo(&data, &movementInfo);
@@ -516,7 +519,10 @@ bool WorldSession::VerifyMovementInfo(MovementInfo const& movementInfo, Player*
}
if (!mover->movespline->Finalized())
return false;
{
if (!mover->movespline->isBoarding() || (opcode != CMSG_FORCE_MOVE_UNROOT_ACK && opcode != CMSG_FORCE_MOVE_ROOT_ACK))
return false;
}
// Xinef: do not allow to move with UNIT_FLAG_DISABLE_MOVE
if (mover->HasUnitFlag(UNIT_FLAG_DISABLE_MOVE))
@@ -958,7 +964,8 @@ void WorldSession::ComputeNewClockDelta()
void WorldSession::HandleMoveRootAck(WorldPacket& recvData)
{
LOG_DEBUG("network", "WORLD: {}", GetOpcodeNameForLogging((Opcodes)recvData.GetOpcode()));
Opcodes opcode = (Opcodes)recvData.GetOpcode();
LOG_DEBUG("network", "WORLD: {}", GetOpcodeNameForLogging(opcode));
ObjectGuid guid;
uint32 counter;
@@ -973,7 +980,7 @@ void WorldSession::HandleMoveRootAck(WorldPacket& recvData)
if (mover->GetGUID() != guid)
return;
if (recvData.GetOpcode() == CMSG_FORCE_MOVE_UNROOT_ACK) // unroot case
if (opcode == CMSG_FORCE_MOVE_UNROOT_ACK) // unroot case
{
if (!mover->m_movementInfo.HasMovementFlag(MOVEMENTFLAG_ROOT))
return;
@@ -987,7 +994,10 @@ void WorldSession::HandleMoveRootAck(WorldPacket& recvData)
if (!ProcessMovementInfo(movementInfo, mover, _player, recvData))
return;
WorldPacket data(recvData.GetOpcode() == CMSG_FORCE_MOVE_UNROOT_ACK ? MSG_MOVE_UNROOT : MSG_MOVE_ROOT);
if (_player->IsExpectingChangeTransport())
return;
WorldPacket data(opcode == CMSG_FORCE_MOVE_UNROOT_ACK ? MSG_MOVE_UNROOT : MSG_MOVE_ROOT);
WriteMovementInfo(&data, &movementInfo);
mover->SendMessageToSet(&data, _player);
}
+49 -33
View File
@@ -198,54 +198,70 @@ void WorldSession::HandleActivateTaxiExpressOpcode(WorldPacket& recvData)
void WorldSession::HandleMoveSplineDoneOpcode(WorldPacket& recvData)
{
ObjectGuid guid; // used only for proper packet read
ObjectGuid guid; // used only for proper packet read
MovementInfo movementInfo; // used only for proper packet read
uint32 movementCounter; // spline counter
Unit* mover = _player->m_mover;
recvData >> guid.ReadAsPacked();
MovementInfo movementInfo; // used only for proper packet read
movementInfo.guid = guid;
ReadMovementInfo(recvData, &movementInfo);
recvData >> movementCounter;
recvData.read_skip<uint32>(); // spline id
// in taxi flight packet received in 2 case:
// 1) end taxi path in far (multi-node) flight
// 2) switch from one map to other in case multim-map taxi path
// we need process only (1)
uint32 curDest = GetPlayer()->m_taxi.GetTaxiDestination();
if (curDest)
if (_player->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_TAXI_FLIGHT)) // taxi spline case
{
TaxiNodesEntry const* curDestNode = sTaxiNodesStore.LookupEntry(curDest);
// in taxi flight packet received in 2 case:
// 1) end taxi path in far (multi-node) flight
// 2) switch from one map to other in case multim-map taxi path
// we need process only (1)
// far teleport case
if (curDestNode && curDestNode->map_id != GetPlayer()->GetMapId() && GetPlayer()->GetMotionMaster()->GetCurrentMovementGeneratorType() == FLIGHT_MOTION_TYPE)
uint32 curDest = GetPlayer()->m_taxi.GetTaxiDestination();
if (curDest)
{
if (FlightPathMovementGenerator* flight = dynamic_cast<FlightPathMovementGenerator*>(GetPlayer()->GetMotionMaster()->top()))
{
// short preparations to continue flight
flight->SetCurrentNodeAfterTeleport();
TaxiPathNodeEntry const* node = flight->GetPath()[flight->GetCurrentNode()];
flight->SkipCurrentNode();
TaxiNodesEntry const* curDestNode = sTaxiNodesStore.LookupEntry(curDest);
GetPlayer()->TeleportTo(curDestNode->map_id, node->x, node->y, node->z, GetPlayer()->GetOrientation(), TELE_TO_NOT_LEAVE_TAXI);
// far teleport case
if (curDestNode && curDestNode->map_id != GetPlayer()->GetMapId() && GetPlayer()->GetMotionMaster()->GetCurrentMovementGeneratorType() == FLIGHT_MOTION_TYPE)
{
if (FlightPathMovementGenerator* flight = dynamic_cast<FlightPathMovementGenerator*>(GetPlayer()->GetMotionMaster()->top()))
{
// short preparations to continue flight
flight->SetCurrentNodeAfterTeleport();
TaxiPathNodeEntry const* node = flight->GetPath()[flight->GetCurrentNode()];
flight->SkipCurrentNode();
GetPlayer()->TeleportTo(curDestNode->map_id, node->x, node->y, node->z, GetPlayer()->GetOrientation(), TELE_TO_NOT_LEAVE_TAXI);
}
}
return;
}
// at this point only 1 node is expected (final destination)
if (GetPlayer()->m_taxi.GetPath().size() != 1)
{
return;
}
GetPlayer()->CleanupAfterTaxiFlight();
GetPlayer()->SetFallInformation(GameTime::GetGameTime().count(), GetPlayer()->GetPositionZ());
if (GetPlayer()->pvpInfo.IsHostile)
{
GetPlayer()->CastSpell(GetPlayer(), 2479, true);
}
return;
}
// at this point only 1 node is expected (final destination)
if (GetPlayer()->m_taxi.GetPath().size() != 1)
{
if (mover->GetGUID() != guid)
return;
}
GetPlayer()->CleanupAfterTaxiFlight();
GetPlayer()->SetFallInformation(GameTime::GetGameTime().count(), GetPlayer()->GetPositionZ());
if (GetPlayer()->pvpInfo.IsHostile)
{
GetPlayer()->CastSpell(GetPlayer(), 2479, true);
}
if (!_player->IsExpectingChangeTransport() || !mover->movespline || mover->movespline->GetId() != movementCounter)
return;
_player->SetExpectingChangeTransport(false);
WorldPacket data(_player->m_movementInfo.HasMovementFlag(MOVEMENTFLAG_ROOT) ? MSG_MOVE_ROOT : MSG_MOVE_UNROOT, recvData.size());
WriteMovementInfo(&data, &movementInfo);
mover->SendMessageToSet(&data, _player);
}
void WorldSession::HandleActivateTaxiOpcode(WorldPacket& recvData)
+27 -23
View File
@@ -32,6 +32,7 @@
#include "TargetedMovementGenerator.h"
#include "WaypointMgr.h"
#include "WaypointMovementGenerator.h"
#include "SmartScriptMgr.h"
inline MovementGenerator* GetIdleMovementGenerator()
{
@@ -503,19 +504,35 @@ void MotionMaster::MoveSplinePath(Movement::PointsArray* path, ForcedMovement fo
}
}
void MotionMaster::MoveSplinePath(uint32 path_id, ForcedMovement forcedMovement)
void MotionMaster::MovePath(uint32 path_id, ForcedMovement forcedMovement, PathSource pathSource)
{
// convert the path id to a Movement::PointsArray*
Movement::PointsArray* points = new Movement::PointsArray();
WaypointPath const* path = sWaypointMgr->GetPath(path_id);
for (uint8 i = 0; i < path->size(); ++i)
WaypointPath const* path;
switch (pathSource)
{
WaypointData const* node = path->at(i);
points->push_back(G3D::Vector3(node->x, node->y, node->z));
default:
case PathSource::WAYPOINT_MGR:
path = sWaypointMgr->GetPath(path_id);
break;
case PathSource::SMART_WAYPOINT_MGR:
path = sSmartWaypointMgr->GetPath(path_id);
break;
}
if (path == nullptr)
{
LOG_ERROR("sql.sql", "WaypointMovementGenerator::LoadPath: creature {} ({}) doesn't have waypoint path id: {} pathSource: {}",
_owner->GetName(), _owner->GetGUID().ToString(), path_id, pathSource);
return;
}
Movement::PointsArray points;
for (auto& point : *path)
{
points.push_back(G3D::Vector3(point.second.x, point.second.y, point.second.z));
}
// pass the new PointsArray* to the appropriate MoveSplinePath function
MoveSplinePath(points, forcedMovement);
MoveSplinePath(&points, forcedMovement);
}
/**
@@ -881,7 +898,7 @@ void MotionMaster::Mutate(MovementGenerator* m, MovementSlot slot)
/**
* @brief Move the unit following a specific path. Doesn't work with UNIT_FLAG_DISABLE_MOVE
*/
void MotionMaster::MovePath(uint32 path_id, bool repeatable)
void MotionMaster::MoveWaypoint(uint32 path_id, bool repeatable, PathSource pathSource)
{
if (!path_id)
return;
@@ -889,20 +906,7 @@ void MotionMaster::MovePath(uint32 path_id, bool repeatable)
if (_owner->HasUnitFlag(UNIT_FLAG_DISABLE_MOVE))
return;
//We set waypoint movement as new default movement generator
// clear ALL movement generators (including default)
/*while (!empty())
{
MovementGenerator *curr = top();
curr->Finalize(*_owner);
pop();
if (!isStatic(curr))
delete curr;
}*/
//_owner->IsPlayer() ?
//Mutate(new WaypointMovementGenerator<Player>(path_id, repeatable)):
Mutate(new WaypointMovementGenerator<Creature>(path_id, repeatable), MOTION_SLOT_IDLE);
Mutate(new WaypointMovementGenerator<Creature>(path_id, pathSource, repeatable), MOTION_SLOT_IDLE);
LOG_DEBUG("movement.motionmaster", "{} ({}) start moving over path(Id:{}, repeatable: {})",
_owner->IsPlayer() ? "Player" : "Creature", _owner->GetGUID().ToString(), path_id, repeatable ? "YES" : "NO");
+8 -2
View File
@@ -89,6 +89,12 @@ enum ForcedMovement
FORCED_MOVEMENT_MAX
};
enum class PathSource
{
WAYPOINT_MGR = 0,
SMART_WAYPOINT_MGR = 1,
};
struct ChaseRange
{
ChaseRange(float range);
@@ -223,7 +229,7 @@ public:
{ MovePoint(id, pos.m_positionX, pos.m_positionY, pos.m_positionZ, forcedMovement, speed, pos.GetOrientation(), generatePath, forceDestination, MOTION_SLOT_ACTIVE); }
void MovePoint(uint32 id, float x, float y, float z, ForcedMovement forcedMovement = FORCED_MOVEMENT_NONE, float speed = 0.f, float orientation = 0.0f, bool generatePath = true, bool forceDestination = true, MovementSlot slot = MOTION_SLOT_ACTIVE);
void MoveSplinePath(Movement::PointsArray* path, ForcedMovement forcedMovement = FORCED_MOVEMENT_NONE);
void MoveSplinePath(uint32 path_id, ForcedMovement forcedMovement = FORCED_MOVEMENT_NONE);
void MovePath(uint32 path_id, ForcedMovement forcedMovement = FORCED_MOVEMENT_NONE, PathSource pathSource = PathSource::WAYPOINT_MGR);
// These two movement types should only be used with creatures having landing/takeoff animations
void MoveLand(uint32 id, Position const& pos, float speed = 0.0f);
@@ -244,7 +250,7 @@ public:
void MoveSeekAssistanceDistract(uint32 timer);
void MoveTaxiFlight(uint32 path, uint32 pathnode);
void MoveDistract(uint32 time);
void MovePath(uint32 path_id, bool repeatable);
void MoveWaypoint(uint32 path_id, bool repeatable, PathSource pathSource = PathSource::WAYPOINT_MGR);
void MoveRotate(uint32 time, RotateDirection direction);
#ifdef MOD_PLAYERBOTS
void MoveKnockbackFromForPlayer(float srcX, float srcY, float speedXY, float speedZ);
@@ -28,13 +28,26 @@
#include "Spell.h"
#include "Transport.h"
#include "World.h"
#include "SmartScriptMgr.h"
void WaypointMovementGenerator<Creature>::LoadPath(Creature* creature)
{
if (!path_id)
path_id = creature->GetWaypointPath();
switch (i_pathSource)
{
case PathSource::WAYPOINT_MGR:
{
if (!path_id)
path_id = creature->GetWaypointPath();
i_path = sWaypointMgr->GetPath(path_id);
i_path = sWaypointMgr->GetPath(path_id);
break;
}
case PathSource::SMART_WAYPOINT_MGR:
{
i_path = sSmartWaypointMgr->GetPath(path_id);
break;
}
}
if (!i_path)
{
@@ -44,6 +57,8 @@ void WaypointMovementGenerator<Creature>::LoadPath(Creature* creature)
return;
}
i_currentNode = i_path->begin()->first;
StartMoveNow(creature);
}
@@ -78,22 +93,24 @@ void WaypointMovementGenerator<Creature>::OnArrived(Creature* creature)
creature->ClearUnitState(UNIT_STATE_ROAMING_MOVE);
m_isArrivalDone = true;
if (i_path->at(i_currentNode)->event_id && urand(0, 99) < i_path->at(i_currentNode)->event_chance)
auto currentNodeItr = i_path->find(i_currentNode);
if (currentNodeItr->second.event_id && urand(0, 99) < currentNodeItr->second.event_chance)
{
LOG_DEBUG("maps.script", "Creature movement start script {} at point {} for {}.",
i_path->at(i_currentNode)->event_id, i_currentNode, creature->GetGUID().ToString());
currentNodeItr->second.event_id, i_currentNode, creature->GetGUID().ToString());
creature->ClearUnitState(UNIT_STATE_ROAMING_MOVE);
creature->GetMap()->ScriptsStart(sWaypointScripts, i_path->at(i_currentNode)->event_id, creature, nullptr);
creature->GetMap()->ScriptsStart(sWaypointScripts, currentNodeItr->second.event_id, creature, nullptr);
}
// Inform script
MovementInform(creature);
creature->UpdateWaypointID(i_currentNode);
if (i_path->at(i_currentNode)->delay)
if (currentNodeItr->second.delay)
{
creature->ClearUnitState(UNIT_STATE_ROAMING_MOVE);
Stop(i_path->at(i_currentNode)->delay);
Stop(currentNodeItr->second.delay);
}
}
@@ -113,12 +130,11 @@ bool WaypointMovementGenerator<Creature>::StartMove(Creature* creature)
if (m_isArrivalDone)
{
// Xinef: not true... update this at every waypoint!
//if ((i_currentNode == i_path->size() - 1) && !repeating) // If that's our last waypoint
{
float x = i_path->at(i_currentNode)->x;
float y = i_path->at(i_currentNode)->y;
float z = i_path->at(i_currentNode)->z;
auto currentNodeItr = i_path->find(i_currentNode);
float x = currentNodeItr->second.x;
float y = currentNodeItr->second.y;
float z = currentNodeItr->second.z;
float o = creature->GetOrientation();
if (!transportPath)
@@ -139,14 +155,17 @@ bool WaypointMovementGenerator<Creature>::StartMove(Creature* creature)
}
// Xinef: moved the upper IF here
if ((i_currentNode == i_path->size() - 1) && !repeating) // If that's our last waypoint
uint32 lastPoint = i_path->rbegin()->first;
if ((i_currentNode == lastPoint) && !repeating) // If that's our last waypoint
{
creature->AI()->PathEndReached(path_id);
creature->GetMotionMaster()->Initialize();
return false;
}
i_currentNode = (i_currentNode + 1) % i_path->size();
++i_currentNode;
if (lastPoint < i_currentNode)
i_currentNode = i_path->begin()->first;
}
// xinef: do not initialize motion if we got stunned in movementinform
@@ -155,13 +174,14 @@ bool WaypointMovementGenerator<Creature>::StartMove(Creature* creature)
return true;
}
WaypointData const* node = i_path->at(i_currentNode);
auto currentNodeItr = i_path->find(i_currentNode);
WaypointData const& node = currentNodeItr->second;
m_isArrivalDone = false;
creature->AddUnitState(UNIT_STATE_ROAMING_MOVE);
Movement::Location formationDest(node->x, node->y, node->z, 0.0f);
Movement::Location formationDest(node.x, node.y, node.z, 0.0f);
Movement::MoveSplineInit init(creature);
//! If creature is on transport, we assume waypoints set in DB are already transport offsets
@@ -172,16 +192,16 @@ bool WaypointMovementGenerator<Creature>::StartMove(Creature* creature)
trans->CalculatePassengerPosition(formationDest.x, formationDest.y, formationDest.z, &formationDest.orientation);
}
float z = node->z;
creature->UpdateAllowedPositionZ(node->x, node->y, z);
float z = node.z;
creature->UpdateAllowedPositionZ(node.x, node.y, z);
//! Do not use formationDest here, MoveTo requires transport offsets due to DisableTransportPathTransformations() call
//! but formationDest contains global coordinates
init.MoveTo(node->x, node->y, z, true, true);
init.MoveTo(node.x, node.y, z, true, true);
if (node->orientation.has_value() && node->delay > 0)
init.SetFacing(*node->orientation);
if (node.orientation.has_value() && node.delay > 0)
init.SetFacing(*node.orientation);
switch (node->move_type)
switch (node.move_type)
{
case WAYPOINT_MOVE_TYPE_LAND:
init.SetAnimation(Movement::ToGround);
@@ -203,7 +223,7 @@ bool WaypointMovementGenerator<Creature>::StartMove(Creature* creature)
//Call for creature group update
if (creature->GetFormation() && creature->GetFormation()->GetLeader() == creature)
creature->GetFormation()->LeaderMoveTo(formationDest.x, formationDest.y, formationDest.z, node->move_type);
creature->GetFormation()->LeaderMoveTo(formationDest.x, formationDest.y, formationDest.z, node.move_type);
return true;
}
@@ -239,13 +259,7 @@ bool WaypointMovementGenerator<Creature>::DoUpdate(Creature* creature, uint32 di
}
else
{
bool finished = creature->movespline->Finalized();
// xinef: code to detect pre-empetively if we should start movement to next waypoint
// xinef: do not start pre-empetive movement if current node has delay or we are ending waypoint movement
//if (!finished && !i_path->at(i_currentNode)->delay && ((i_currentNode != i_path->size() - 1) || repeating))
// finished = (creature->movespline->_Spline().length(creature->movespline->_currentSplineIdx() + 1) - creature->movespline->timePassed()) < 200;
if (finished)
if (creature->movespline->Finalized())
{
OnArrived(creature);
return StartMove(creature);
@@ -54,8 +54,8 @@ class WaypointMovementGenerator<Creature> : public MovementGeneratorMedium< Crea
public PathMovementBase<Creature, WaypointPath const*>
{
public:
WaypointMovementGenerator(uint32 _path_id = 0, bool _repeating = true, bool _stalled = false)
: PathMovementBase((WaypointPath const*)nullptr), i_nextMoveTime(0), m_isArrivalDone(false), path_id(_path_id), repeating(_repeating), stalled(_stalled) {}
WaypointMovementGenerator(uint32 _path_id = 0, PathSource pathSource = PathSource::WAYPOINT_MGR, bool _repeating = true, bool _stalled = false)
: PathMovementBase((WaypointPath const*)nullptr), i_nextMoveTime(0), m_isArrivalDone(false), path_id(_path_id), repeating(_repeating), stalled(_stalled), i_pathSource(pathSource) {}
~WaypointMovementGenerator() { i_path = nullptr; }
void DoInitialize(Creature*);
void DoFinalize(Creature*);
@@ -96,6 +96,7 @@ private:
uint32 path_id;
bool repeating;
bool stalled;
PathSource i_pathSource;
};
/** FlightPathMovementGenerator generates movement of the player for the paths
@@ -117,6 +117,7 @@ namespace Movement
[[nodiscard]] bool isCyclic() const { return splineflags.cyclic; }
[[nodiscard]] bool isFalling() const { return splineflags.falling; }
[[nodiscard]] bool isWalking() const { return splineflags.walkmode; }
[[nodiscard]] bool isBoarding() const { return splineflags.transportEnter || splineflags.transportExit; }
[[nodiscard]] Vector3 FinalDestination() const { return Initialized() ? spline.getPoint(spline.last()) : Vector3(); }
[[nodiscard]] Vector3 CurrentDestination() const { return Initialized() ? spline.getPoint(point_Idx + 1) : Vector3(); }
[[nodiscard]] int32 currentPathIdx() const;
@@ -30,9 +30,6 @@ WaypointMgr::~WaypointMgr()
{
for (WaypointPathContainer::iterator itr = _waypointStore.begin(); itr != _waypointStore.end(); ++itr)
{
for (WaypointPath::const_iterator it = itr->second.begin(); it != itr->second.end(); ++it)
delete *it;
itr->second.clear();
}
@@ -64,7 +61,7 @@ void WaypointMgr::Load()
do
{
Field* fields = result->Fetch();
WaypointData* wp = new WaypointData();
WaypointData data;
uint32 pathId = fields[0].Get<uint32>();
WaypointPath& path = _waypointStore[pathId];
@@ -79,28 +76,40 @@ void WaypointMgr::Load()
Acore::NormalizeMapCoord(x);
Acore::NormalizeMapCoord(y);
wp->id = fields[1].Get<uint32>();
wp->x = x;
wp->y = y;
wp->z = z;
wp->orientation = o;
wp->move_type = fields[6].Get<uint32>();
data.id = fields[1].Get<uint32>();
data.x = x;
data.y = y;
data.z = z;
data.orientation = o;
data.move_type = fields[6].Get<uint32>();
if (wp->move_type >= WAYPOINT_MOVE_TYPE_MAX)
if (data.move_type >= WAYPOINT_MOVE_TYPE_MAX)
{
//LOG_ERROR("sql.sql", "Waypoint {} in waypoint_data has invalid move_type, ignoring", wp->id);
delete wp;
continue;
}
wp->delay = fields[7].Get<uint32>();
wp->event_id = fields[8].Get<uint32>();
wp->event_chance = fields[9].Get<int16>();
data.delay = fields[7].Get<uint32>();
data.event_id = fields[8].Get<uint32>();
data.event_chance = fields[9].Get<int16>();
path.push_back(wp);
path.emplace(data.id, data);
++count;
} while (result->NextRow());
for (auto itr = _waypointStore.begin(); itr != _waypointStore.end(); )
{
uint32 first = itr->second.begin()->first;
uint32 last = itr->second.rbegin()->first;
if (last - first + 1 != itr->second.size())
{
LOG_ERROR("sql.sql", "Waypoint {} in waypoint_data has non-contiguous pointids, skipping", itr->first);
itr = _waypointStore.erase(itr);
}
else
++itr;
}
LOG_INFO("server.loading", ">> Loaded {} waypoints in {} ms", count, GetMSTimeDiffToNow(oldMSTime));
LOG_INFO("server.loading", " ");
}
@@ -110,9 +119,6 @@ void WaypointMgr::ReloadPath(uint32 id)
WaypointPathContainer::iterator itr = _waypointStore.find(id);
if (itr != _waypointStore.end())
{
for (WaypointPath::const_iterator it = itr->second.begin(); it != itr->second.end(); ++it)
delete *it;
_waypointStore.erase(itr);
}
@@ -130,7 +136,7 @@ void WaypointMgr::ReloadPath(uint32 id)
do
{
Field* fields = result->Fetch();
WaypointData* wp = new WaypointData();
WaypointData data;
float x = fields[1].Get<float>();
float y = fields[2].Get<float>();
@@ -142,24 +148,23 @@ void WaypointMgr::ReloadPath(uint32 id)
Acore::NormalizeMapCoord(x);
Acore::NormalizeMapCoord(y);
wp->id = fields[0].Get<uint32>();
wp->x = x;
wp->y = y;
wp->z = z;
wp->orientation = o;
wp->move_type = fields[5].Get<uint32>();
data.id = fields[0].Get<uint32>();
data.x = x;
data.y = y;
data.z = z;
data.orientation = o;
data.move_type = fields[5].Get<uint32>();
if (wp->move_type >= WAYPOINT_MOVE_TYPE_MAX)
if (data.move_type >= WAYPOINT_MOVE_TYPE_MAX)
{
//LOG_ERROR("sql.sql", "Waypoint {} in waypoint_data has invalid move_type, ignoring", wp->id);
delete wp;
continue;
}
wp->delay = fields[6].Get<uint32>();
wp->event_id = fields[7].Get<uint32>();
wp->event_chance = fields[8].Get<uint8>();
data.delay = fields[6].Get<uint32>();
data.event_id = fields[7].Get<uint32>();
data.event_chance = fields[8].Get<uint8>();
path.push_back(wp);
path.emplace(data.id, data);
} while (result->NextRow());
}
@@ -22,6 +22,7 @@
#include <optional>
#include <unordered_map>
#include <vector>
#include <map>
enum WaypointMoveType
{
@@ -39,12 +40,12 @@ struct WaypointData
float x, y, z;
std::optional<float> orientation;
uint32 delay;
uint32 event_id;
uint32 move_type;
uint8 event_chance;
uint32 event_id = 0;
uint32 move_type = 0;
uint8 event_chance = 0;
};
typedef std::vector<WaypointData*> WaypointPath;
typedef std::map<uint32, WaypointData> WaypointPath;
typedef std::unordered_map<uint32, WaypointPath> WaypointPathContainer;
class WaypointMgr
+2 -2
View File
@@ -767,7 +767,7 @@ void Map::ScriptsProcess()
if (!sWaypointMgr->GetPath(step.script->LoadPath.PathID))
LOG_ERROR("maps.script", "{} source object has an invalid path ({}), skipping.", step.script->GetDebugInfo(), step.script->LoadPath.PathID);
else
unit->GetMotionMaster()->MovePath(step.script->LoadPath.PathID, step.script->LoadPath.IsRepeatable);
unit->GetMotionMaster()->MoveWaypoint(step.script->LoadPath.PathID, step.script->LoadPath.IsRepeatable);
}
break;
@@ -888,7 +888,7 @@ void Map::ScriptsProcess()
cSource->GetMotionMaster()->MoveRandom((float)step.script->Movement.MovementDistance);
break;
case WAYPOINT_MOTION_TYPE:
cSource->GetMotionMaster()->MovePath(step.script->Movement.Path, false);
cSource->GetMotionMaster()->MoveWaypoint(step.script->Movement.Path, false);
break;
}
}
+1 -1
View File
@@ -1778,7 +1778,7 @@ bool WorldState::SummonPallid(Map* map, ScourgeInvasionData::CityAttack& zone, c
else
pathID = spawnLoc == 0 ? PATH_STORMWIND_KEEP : PATH_STORMWIND_TRADE_DISTRICT;
pallid->GetMotionMaster()->MovePath(pathID, false);
pallid->GetMotionMaster()->MoveWaypoint(pathID, false);
sWorldState->SetPallidGuid(zone.zoneId, pallid->GetGUID());
}
@@ -128,7 +128,7 @@ public:
events.ScheduleEvent(EVENT_SUMMONED_2, 2s);
break;
case EVENT_SUMMONED_2:
me->GetMotionMaster()->MovePath(GYTH_PATH_1, false);
me->GetMotionMaster()->MoveWaypoint(GYTH_PATH_1, false);
break;
default:
break;
@@ -362,10 +362,10 @@ public:
break;
case EVENT_PATH_NEFARIUS:
if (Creature* victor = ObjectAccessor::GetCreature(*me, victorGUID))
victor->GetMotionMaster()->MovePath(NEFARIUS_PATH_1, true);
victor->GetMotionMaster()->MoveWaypoint(NEFARIUS_PATH_1, true);
break;
case EVENT_PATH_REND:
me->GetMotionMaster()->MovePath(REND_PATH_1, false);
me->GetMotionMaster()->MoveWaypoint(REND_PATH_1, false);
break;
case EVENT_TELEPORT_1:
me->NearTeleportTo(194.2993f, -474.0814f, 121.4505f, -0.01225555f);
@@ -110,7 +110,7 @@ public:
if (_beastReached)
{
me->GetMotionMaster()->MovePath(BEAST_MOVEMENT_ID, true);
me->GetMotionMaster()->MoveWaypoint(BEAST_MOVEMENT_ID, true);
}
}
@@ -169,7 +169,7 @@ public:
if (!_beastReached)
{
_beastReached = true;
me->GetMotionMaster()->MovePath(BEAST_MOVEMENT_ID, true);
me->GetMotionMaster()->MoveWaypoint(BEAST_MOVEMENT_ID, true);
// There is a chance player logged in between areatriggers (realm crash or restart)
// executing part of script which happens when player enters boss room
@@ -244,7 +244,7 @@ class go_chromaggus_lever : public GameObjectScript
if (Creature* creature = _instance->GetCreature(DATA_CHROMAGGUS))
{
creature->SetHomePosition(homePos);
creature->GetMotionMaster()->MovePath(creature->GetEntry() * 10, false);
creature->GetMotionMaster()->MoveWaypoint(creature->GetEntry() * 10, false);
creature->AI()->SetGUID(player->GetGUID(), GUID_LEVER_USER);
}
@@ -343,7 +343,7 @@ public:
nefarian->setActive(true);
nefarian->SetCanFly(true);
nefarian->SetDisableGravity(true);
nefarian->GetMotionMaster()->MovePath(NEFARIAN_PATH, false);
nefarian->GetMotionMaster()->MoveWaypoint(NEFARIAN_PATH, false);
}
events.Reset();
@@ -406,7 +406,7 @@ public:
switch (eventId)
{
case EVENT_PATH_2:
me->GetMotionMaster()->MovePath(NEFARIUS_PATH_2, false);
me->GetMotionMaster()->MoveWaypoint(NEFARIUS_PATH_2, false);
events.ScheduleEvent(EVENT_CHAOS_1, 7s);
break;
case EVENT_CHAOS_1:
@@ -438,7 +438,7 @@ public:
me->DespawnOrUnsummon(1s);
break;
case EVENT_PATH_3:
me->GetMotionMaster()->MovePath(NEFARIUS_PATH_3, false);
me->GetMotionMaster()->MoveWaypoint(NEFARIUS_PATH_3, false);
break;
case EVENT_START_EVENT:
BeginEvent();
@@ -183,7 +183,7 @@ struct boss_nightbane : public BossAI
me->GetMotionMaster()->MoveTakeoff(POINT_INTRO_TAKE_OFF, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ() + 10.0f, 13.99879f);
}).Schedule(4s, [this](TaskContext /*context*/)
{
me->GetMotionMaster()->MovePath(me->GetEntry()*10, false);
me->GetMotionMaster()->MoveWaypoint(me->GetEntry()*10, false);
});
}
}
@@ -400,7 +400,7 @@ struct boss_nightbane : public BossAI
{
scheduler.Schedule(0s, [this](TaskContext /*context*/)
{
me->GetMotionMaster()->MovePath(me->GetEntry()*10+1, false);
me->GetMotionMaster()->MoveWaypoint(me->GetEntry()*10+1, false);
});
}
break;
@@ -80,7 +80,7 @@ public:
{
if (Creature* kalecgos = instance->SummonCreature(NPC_KALECGOS, KalecgosSpawnPos))
{
kalecgos->GetMotionMaster()->MovePath(PATH_KALECGOS_FLIGHT, false);
kalecgos->GetMotionMaster()->MoveWaypoint(PATH_KALECGOS_FLIGHT, false);
kalecgos->AI()->Talk(SAY_KALECGOS_SPAWN);
}
});
@@ -106,7 +106,7 @@ public:
Talk(SAY_BREAKOUT0);
me->m_Events.AddEventAtOffset([&] {
me->GetMotionMaster()->MovePath(me->GetEntry() * 10, false);
me->GetMotionMaster()->MoveWaypoint(me->GetEntry() * 10, false);
}, 5s);
}
@@ -167,13 +167,13 @@ public:
}
if (Creature* acolyte = me->SummonCreature(NPC_CRIMSON_ACOLYTE, 1640.6724f, -6032.0527f, 134.82213f, 4.654973506927490234f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000))
acolyte->GetMotionMaster()->MovePath(NPC_CRIMSON_ACOLYTE * 10, false);
acolyte->GetMotionMaster()->MoveWaypoint(NPC_CRIMSON_ACOLYTE * 10, false);
if (Creature* acolyte = me->SummonCreature(NPC_CRIMSON_ACOLYTE, 1641.0055f, -6031.893f, 134.82211f, 0.401425719261169433f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000))
acolyte->GetMotionMaster()->MovePath((NPC_CRIMSON_ACOLYTE + 1) * 10, false);
acolyte->GetMotionMaster()->MoveWaypoint((NPC_CRIMSON_ACOLYTE + 1) * 10, false);
if (Creature* acolyte = me->SummonCreature(NPC_CRIMSON_ACOLYTE, 1639.7053f, -6031.7373f, 134.82213f, 2.443460941314697265f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000))
acolyte->GetMotionMaster()->MovePath((NPC_CRIMSON_ACOLYTE + 2) * 10, false);
acolyte->GetMotionMaster()->MoveWaypoint((NPC_CRIMSON_ACOLYTE + 2) * 10, false);
break;
case 1:
Talk(SAY_BREAKOUT4);
@@ -182,13 +182,13 @@ public:
valroth->AI()->Talk(SAY_VALROTH_WAVE2);
if (Creature* acolyte = me->SummonCreature(NPC_CRIMSON_ACOLYTE, 1640.7958f, -6030.307f, 134.82211f, 4.65355682373046875f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000))
acolyte->GetMotionMaster()->MovePath((NPC_CRIMSON_ACOLYTE + 3) * 10, false);
acolyte->GetMotionMaster()->MoveWaypoint((NPC_CRIMSON_ACOLYTE + 3) * 10, false);
if (Creature* acolyte = me->SummonCreature(NPC_CRIMSON_ACOLYTE, 1641.7305f, -6030.751f, 134.82211f, 6.143558979034423828f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000))
acolyte->GetMotionMaster()->MovePath((NPC_CRIMSON_ACOLYTE + 4) * 10, false);
acolyte->GetMotionMaster()->MoveWaypoint((NPC_CRIMSON_ACOLYTE + 4) * 10, false);
if (Creature* acolyte = me->SummonCreature(NPC_CRIMSON_ACOLYTE, 1639.4657f, -6030.404f, 134.82211f, 4.502949237823486328f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000))
acolyte->GetMotionMaster()->MovePath((NPC_CRIMSON_ACOLYTE + 5) * 10, false);
acolyte->GetMotionMaster()->MoveWaypoint((NPC_CRIMSON_ACOLYTE + 5) * 10, false);
break;
case 2:
Talk(SAY_BREAKOUT5);
@@ -197,16 +197,16 @@ public:
valroth->AI()->Talk(SAY_VALROTH_WAVE3);
if (Creature* acolyte = me->SummonCreature(NPC_CRIMSON_ACOLYTE, 1641.3405f, -6031.436f, 134.82211f, 4.612849712371826171f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000))
acolyte->GetMotionMaster()->MovePath((NPC_CRIMSON_ACOLYTE + 6) * 10, false);
acolyte->GetMotionMaster()->MoveWaypoint((NPC_CRIMSON_ACOLYTE + 6) * 10, false);
if (Creature* acolyte = me->SummonCreature(NPC_CRIMSON_ACOLYTE, 1642.0404f, -6030.3843f, 134.82211f, 1.378810048103332519f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000))
acolyte->GetMotionMaster()->MovePath((NPC_CRIMSON_ACOLYTE + 7) * 10, false);
acolyte->GetMotionMaster()->MoveWaypoint((NPC_CRIMSON_ACOLYTE + 7) * 10, false);
if (Creature* acolyte = me->SummonCreature(NPC_CRIMSON_ACOLYTE, 1640.1162f, -6029.7817f, 134.82211f, 5.707226753234863281f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000))
acolyte->GetMotionMaster()->MovePath((NPC_CRIMSON_ACOLYTE + 8) * 10, false);
acolyte->GetMotionMaster()->MoveWaypoint((NPC_CRIMSON_ACOLYTE + 8) * 10, false);
if (Creature* acolyte = me->SummonCreature(NPC_CRIMSON_ACOLYTE, 1640.9948f, -6029.8027f, 134.82211f, 1.605702877044677734f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000))
acolyte->GetMotionMaster()->MovePath((NPC_CRIMSON_ACOLYTE + 9) * 10, false);
acolyte->GetMotionMaster()->MoveWaypoint((NPC_CRIMSON_ACOLYTE + 9) * 10, false);
break;
case 3:
Talk(SAY_BREAKOUT6);
@@ -223,7 +223,7 @@ public:
{
valroth->AI()->Talk(SAY_VALROTH_AGGRO);
valroth->SetReactState(REACT_AGGRESSIVE);
valroth->GetMotionMaster()->MovePath(NPC_HIGH_INQUISITOR_VALROTH * 10, false);
valroth->GetMotionMaster()->MoveWaypoint(NPC_HIGH_INQUISITOR_VALROTH * 10, false);
}
return;
default:
@@ -262,7 +262,7 @@ public:
SetInvincibility(true);
me->SetReactState(REACT_PASSIVE);
me->RemoveUnitFlag(UNIT_FLAG_IMMUNE_TO_NPC);
me->GetMotionMaster()->MovePath((me->GetEntry() + 1) * 10, false);
me->GetMotionMaster()->MoveWaypoint((me->GetEntry() + 1) * 10, false);
});
}
}
@@ -610,7 +610,7 @@ public:
// Start waypoint movement using WaypointMovementGenerator
if (uint32 pathId = me->GetWaypointPath())
{
me->GetMotionMaster()->MovePath(pathId, true); // true = repeatable
me->GetMotionMaster()->MoveWaypoint(pathId, true); // true = repeatable
}
// Schedule the first ritual after 20-30s
events.ScheduleEvent(EVENT_START_RITUAL, 20s, 30s);
@@ -797,7 +797,7 @@ public:
// Start waypoint movement using WaypointMovementGenerator
if (uint32 pathId = me->GetWaypointPath())
{
me->GetMotionMaster()->MovePath(pathId, true); // true = repeatable
me->GetMotionMaster()->MoveWaypoint(pathId, true); // true = repeatable
}
// Schedule the first ritual after 50-60s
events.ScheduleEvent(EVENT_START_RITUAL, 50s, 60s);
@@ -504,7 +504,7 @@ public:
tirion->AI()->Talk(SAY_LIGHT_OF_DAWN25, 4s);
tirion->m_Events.AddEventAtOffset([&, tirion] {
tirion->GetMotionMaster()->MovePath(NPC_HIGHLORD_TIRION_FORDRING * 10, false);
tirion->GetMotionMaster()->MoveWaypoint(NPC_HIGHLORD_TIRION_FORDRING * 10, false);
}, 14s);
events.Reset();
@@ -139,7 +139,7 @@ public:
switch (events2.ExecuteEvent())
{
case INTRO_1:
me->GetMotionMaster()->MovePath(KIRTONOS_PATH, false);
me->GetMotionMaster()->MoveWaypoint(KIRTONOS_PATH, false);
Talk(EMOTE_SUMMONED);
break;
case INTRO_2:
@@ -157,7 +157,7 @@ struct boss_felmyst : public BossAI
me->SetCanFly(true);
me->SetDisableGravity(true);
me->SendMovementFlagUpdate();
me->GetMotionMaster()->MovePath(me->GetEntry() * 10, true);
me->GetMotionMaster()->MoveWaypoint(me->GetEntry() * 10, true);
}
}
@@ -363,7 +363,7 @@ struct boss_felmyst : public BossAI
me->m_Events.AddEventAtOffset([&] {
me->SetImmuneToPC(false);
me->GetMotionMaster()->MovePath(me->GetEntry() * 10, true);
me->GetMotionMaster()->MoveWaypoint(me->GetEntry() * 10, true);
}, 8500ms);
});
}
@@ -127,7 +127,7 @@ struct boss_nalorakk : public BossAI
{
_introScheduler.CancelGroup(GROUP_CHECK_DEAD);
_waveList.clear();
me->GetMotionMaster()->MovePath(me->GetEntry()*100+1, false);
me->GetMotionMaster()->MoveWaypoint(me->GetEntry()*100+1, false);
Talk(SAY_RUN_AWAY);
_introScheduler.Schedule(5s, [this](TaskContext)
{
@@ -153,7 +153,7 @@ struct boss_nalorakk : public BossAI
_introScheduler.CancelGroup(GROUP_CHECK_DEAD);
_waveList.clear();
Talk(SAY_RUN_AWAY);
me->GetMotionMaster()->MovePath(me->GetEntry()*100+2, false);
me->GetMotionMaster()->MoveWaypoint(me->GetEntry()*100+2, false);
_introScheduler.Schedule(6s, [this](TaskContext)
{
me->SetFacingTo(1.54f);
@@ -176,7 +176,7 @@ struct boss_nalorakk : public BossAI
_introScheduler.CancelGroup(GROUP_CHECK_DEAD);
_waveList.clear();
Talk(SAY_RUN_AWAY);
me->GetMotionMaster()->MovePath(me->GetEntry() * 100 + 3, false);
me->GetMotionMaster()->MoveWaypoint(me->GetEntry() * 100 + 3, false);
_introScheduler.Schedule(6s, [this](TaskContext)
{
me->SetFacingTo(1.54f);
@@ -400,7 +400,7 @@ struct npc_harrison_jones : public ScriptedAI
Talk(SAY_HARRISON_0);
scheduler.Schedule(2s, [this](TaskContext /*task*/)
{
me->GetMotionMaster()->MovePath(HARRISON_MOVE_1, false);
me->GetMotionMaster()->MoveWaypoint(HARRISON_MOVE_1, false);
});
}
}
@@ -448,7 +448,7 @@ struct npc_harrison_jones : public ScriptedAI
// Players are Now Saved to instance at SPECIAL (Player should be notified?)
scheduler.Schedule(500ms, [this](TaskContext /*task*/)
{
me->GetMotionMaster()->MovePath(HARRISON_MOVE_2, false);
me->GetMotionMaster()->MoveWaypoint(HARRISON_MOVE_2, false);
});
}
}
@@ -521,7 +521,7 @@ struct npc_harrison_jones : public ScriptedAI
{
DoCastSelf(SPELL_STEALTH);
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
me->GetMotionMaster()->MovePath(HARRISON_MOVE_3, false);
me->GetMotionMaster()->MoveWaypoint(HARRISON_MOVE_3, false);
});
}
}
@@ -592,7 +592,7 @@ struct npc_amanishi_lookout : public NullCreatureAI
Talk(SAY_INVADERS);
me->SetUnitFlag(UNIT_FLAG_IMMUNE_TO_PC);
me->SetUnitFlag(UNIT_FLAG_RENAME);
me->GetMotionMaster()->MovePath(PATH_LOOKOUT, false);
me->GetMotionMaster()->MoveWaypoint(PATH_LOOKOUT, false);
}
}
@@ -41,7 +41,7 @@ struct boss_gahzranka : public BossAI
void IsSummonedBy(WorldObject* /*summoner*/) override
{
me->GetMotionMaster()->MovePath(me->GetEntry() * 10, false);
me->GetMotionMaster()->MoveWaypoint(me->GetEntry() * 10, false);
}
void JustEngagedWith(Unit* /*who*/) override
@@ -140,7 +140,7 @@ struct boss_jeklik : public BossAI
me->SetDisableGravity(true);
DoCastSelf(SPELL_BAT_FORM, true);
me->GetMotionMaster()->MovePath(PATH_JEKLIK_INTRO, false);
me->GetMotionMaster()->MoveWaypoint(PATH_JEKLIK_INTRO, false);
}
void PathEndReached(uint32 pathId) override
@@ -295,7 +295,7 @@ struct npc_batrider : public CreatureAI
me->SetSpeed(MOVE_WALK, 5.0f, true);
me->SetCanFly(true);
me->GetMotionMaster()->MoveSplinePath(PATH_BATRIDER_LOOP);
me->GetMotionMaster()->MovePath(PATH_BATRIDER_LOOP);
}
else
{
@@ -375,7 +375,7 @@ struct npc_batrider : public CreatureAI
if (!me->isMoving())
{
me->SetCanFly(true);
me->GetMotionMaster()->MoveSplinePath(PATH_BATRIDER_LOOP);
me->GetMotionMaster()->MovePath(PATH_BATRIDER_LOOP);
}
}
else if (_mode == BATRIDER_MODE_TRASH)
@@ -182,13 +182,13 @@ struct npc_cameron : public ScriptedAI
switch (eventId)
{
case EVENT_WP_START_GOLDSHIRE:
me->GetMotionMaster()->MovePath(GOLDSHIRE_PATH, false);
me->GetMotionMaster()->MoveWaypoint(GOLDSHIRE_PATH, false);
break;
case EVENT_WP_START_WOODS:
me->GetMotionMaster()->MovePath(WOODS_PATH, false);
me->GetMotionMaster()->MoveWaypoint(WOODS_PATH, false);
break;
case EVENT_WP_START_HOUSE:
me->GetMotionMaster()->MovePath(HOUSE_PATH, false);
me->GetMotionMaster()->MoveWaypoint(HOUSE_PATH, false);
break;
case EVENT_WP_START_LISA:
for (uint32 i = 0; i < _childrenGUIDs.size(); ++i)
@@ -197,7 +197,7 @@ struct npc_cameron : public ScriptedAI
{
if (lisa->GetEntry() == NPC_LISA)
{
lisa->GetMotionMaster()->MovePath(LISA_PATH, false);
lisa->GetMotionMaster()->MoveWaypoint(LISA_PATH, false);
break;
}
}
@@ -233,7 +233,7 @@ struct npc_cameron : public ScriptedAI
child->SearchFormation();
// Start movement
me->GetMotionMaster()->MovePath(STORMWIND_PATH, false);
me->GetMotionMaster()->MoveWaypoint(STORMWIND_PATH, false);
break;
}
@@ -386,7 +386,7 @@ struct npc_eastvale_peasent : public ScriptedAI
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
me->CastSpell(me, SPELL_TRANSFORM_PEASENT_WITH_WOOD);
me->SetSpeed(MOVE_WALK, 1.0f);
me->GetMotionMaster()->MovePath(_path, false);
me->GetMotionMaster()->MoveWaypoint(_path, false);
}
}
@@ -418,7 +418,7 @@ struct npc_eastvale_peasent : public ScriptedAI
switch (eventId)
{
case EVENT_MOVETORAELEN:
me->GetMotionMaster()->MovePath(_path + 1, false);
me->GetMotionMaster()->MoveWaypoint(_path + 1, false);
break;
case EVENT_TALKTORAELEN1:
if (Creature* realen = me->FindNearestCreature(NPC_SUPERVISOR_RAELEN, 2.0f, true))
@@ -492,7 +492,7 @@ struct npc_eastvale_peasent : public ScriptedAI
case EVENT_PATHBACK:
if (Creature* realen = ObjectAccessor::GetCreature(*me, _realenGUID))
realen->AI()->SetData(1, 1);
me->GetMotionMaster()->MovePath(_path + 2, false);
me->GetMotionMaster()->MoveWaypoint(_path + 2, false);
break;
}
}
@@ -60,7 +60,7 @@ struct npc_partygoer_pather : public ScriptedAI
switch (eventId)
{
case EVENT_PATH:
me->GetMotionMaster()->MovePath(_path, false);
me->GetMotionMaster()->MoveWaypoint(_path, false);
break;
case EVENT_RANDOM_ACTION_PATHER:
{
@@ -539,16 +539,16 @@ public:
break;
case 3:
me->SetWalk(true);
me->GetMotionMaster()->MovePath(me->GetEntry() * 100, false);
me->GetMotionMaster()->MoveWaypoint(me->GetEntry() * 100, false);
if (Creature* c = me->FindNearestCreature(NPC_THERON, 60.0f, true))
{
c->SetWalk(true);
c->GetMotionMaster()->MovePath(c->GetEntry() * 100, false);
c->GetMotionMaster()->MoveWaypoint(c->GetEntry() * 100, false);
}
if (Creature* c = me->FindNearestCreature(NPC_AURIC, 60.0f, true))
{
c->SetWalk(true);
c->GetMotionMaster()->MovePath(c->GetEntry() * 100, false);
c->GetMotionMaster()->MoveWaypoint(c->GetEntry() * 100, false);
}
break;
case 4:
@@ -1321,22 +1321,22 @@ public:
if (Unit* temp = me->SummonCreature(NPC_SW_SOLDIER, AllianceSpawn[8].x, AllianceSpawn[8].y, AllianceSpawn[8].z, 0, TEMPSUMMON_TIMED_DESPAWN, 90000))
{
allianceGuardsGUID.push_back(temp->GetGUID());
temp->GetMotionMaster()->MovePath(NPC_SW_SOLDIER * 10, false);
temp->GetMotionMaster()->MoveWaypoint(NPC_SW_SOLDIER * 10, false);
}
if (Unit* temp = me->SummonCreature(NPC_SW_SOLDIER, AllianceSpawn[8].x, AllianceSpawn[8].y, AllianceSpawn[8].z, 0, TEMPSUMMON_TIMED_DESPAWN, 90000))
{
allianceGuardsGUID.push_back(temp->GetGUID());
temp->GetMotionMaster()->MovePath((NPC_SW_SOLDIER * 10) + 1, false);
temp->GetMotionMaster()->MoveWaypoint((NPC_SW_SOLDIER * 10) + 1, false);
}
if (Unit* temp = me->SummonCreature(NPC_SW_SOLDIER, AllianceSpawn[8].x, AllianceSpawn[8].y, AllianceSpawn[8].z, 0, TEMPSUMMON_TIMED_DESPAWN, 90000))
{
allianceGuardsGUID.push_back(temp->GetGUID());
temp->GetMotionMaster()->MovePath((NPC_SW_SOLDIER * 10) + 2, false);
temp->GetMotionMaster()->MoveWaypoint((NPC_SW_SOLDIER * 10) + 2, false);
}
if (Unit* temp = me->SummonCreature(NPC_SW_SOLDIER, AllianceSpawn[8].x, AllianceSpawn[8].y, AllianceSpawn[8].z, 0, TEMPSUMMON_TIMED_DESPAWN, 90000))
{
allianceGuardsGUID.push_back(temp->GetGUID());
temp->GetMotionMaster()->MovePath((NPC_SW_SOLDIER * 10) + 3, false);
temp->GetMotionMaster()->MoveWaypoint((NPC_SW_SOLDIER * 10) + 3, false);
}
break;
case 8:
@@ -1348,7 +1348,7 @@ public:
case 10:
if (Unit* temp = me->SummonCreature(NPC_DREADLORD, AllianceSpawn[11].x, AllianceSpawn[11].y, AllianceSpawn[11].z, TEMPSUMMON_DEAD_DESPAWN))
{
temp->GetMotionMaster()->MovePath(NPC_DREADLORD * 10, false);
temp->GetMotionMaster()->MoveWaypoint(NPC_DREADLORD * 10, false);
temp->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_KNOCK_BACK, true);
temp->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_KNOCK_BACK_DEST, true);
}
@@ -1536,7 +1536,7 @@ public:
case 8:
if (Creature* jaina = ObjectAccessor::GetCreature(*me, jainaGUID))
{
jaina->GetMotionMaster()->MovePath(NPC_JAINA * 10, false);
jaina->GetMotionMaster()->MoveWaypoint(NPC_JAINA * 10, false);
jaina->setActive(true);
}
bStepping = false;
@@ -2537,9 +2537,9 @@ public:
{
case 0: // Vortex
if (Creature* whirlwind1 = me->SummonCreature(NPC_VORTEX, ThrallSpawn[0].x, ThrallSpawn[0].y, ThrallSpawn[0].z, ThrallSpawn[0].o, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 30 * IN_MILLISECONDS))
whirlwind1->GetMotionMaster()->MovePath(NPC_WHIRLWIND * 10, false);
whirlwind1->GetMotionMaster()->MoveWaypoint(NPC_WHIRLWIND * 10, false);
if (Creature* whirlwind2 = me->SummonCreature(NPC_VORTEX, ThrallSpawn[0].x, ThrallSpawn[0].y, ThrallSpawn[0].z, ThrallSpawn[0].o, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 30 * IN_MILLISECONDS))
whirlwind2->GetMotionMaster()->MovePath(NPC_WHIRLWIND * 100, false);
whirlwind2->GetMotionMaster()->MoveWaypoint(NPC_WHIRLWIND * 100, false);
break;
case 1:
// BATTLING_COURTYARD Initial Spawn
@@ -2762,7 +2762,7 @@ public:
{
hordeGuardsGUID.push_back(temp->GetGUID());
temp->AI()->Talk(SAY_FOR_THE_HORDE);
temp->GetMotionMaster()->MovePath(NPC_WARSONG_BATTLEGUARD * 100, false);
temp->GetMotionMaster()->MoveWaypoint(NPC_WARSONG_BATTLEGUARD * 100, false);
}
break;
// Valimathras Room Preparation
@@ -2975,7 +2975,7 @@ public:
me->SetWalk(false);
if (Creature* sylvanas = ObjectAccessor::GetCreature(*me, sylvanasfollowGUID))
{
sylvanas->GetMotionMaster()->MovePath(NPC_SYLVANAS * 100, false);
sylvanas->GetMotionMaster()->MoveWaypoint(NPC_SYLVANAS * 100, false);
sylvanas->setActive(true);
}
break;
@@ -3007,7 +3007,7 @@ public:
SetEscortPaused(false);
me->SetWalk(true);
if (Creature* sylvanas = ObjectAccessor::GetCreature(*me, sylvanasfollowGUID))
sylvanas->GetMotionMaster()->MovePath(NPC_SYLVANAS * 1000, false);
sylvanas->GetMotionMaster()->MoveWaypoint(NPC_SYLVANAS * 1000, false);
JumpToNextStep(3 * IN_MILLISECONDS);
break;
}
+2 -2
View File
@@ -428,7 +428,7 @@ struct npc_costumed_orphan_matron : public ScriptedAI
GetInitXYZ(x, y, z, o, path);
if (Creature* cr = me->SummonCreature(NPC_SHADE_OF_HORSEMAN, x, y, z, o, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000))
{
cr->GetMotionMaster()->MovePath(path, true);
cr->GetMotionMaster()->MoveWaypoint(path, true);
cr->AI()->DoAction(path);
horseGUID = cr->GetGUID();
}
@@ -1191,7 +1191,7 @@ struct boss_headless_horseman : public ScriptedAI
break;
case 3:
me->SetDisableGravity(true);
me->GetMotionMaster()->MovePath(236820, false);
me->GetMotionMaster()->MoveWaypoint(236820, false);
me->CastSpell(me, SPELL_SHAKE_CAMERA_SMALL, true);
player->Say(TALK_PLAYER_FELT_DEATH);
Talk(TALK_ENTRANCE);
@@ -97,7 +97,7 @@ public:
Talk(SAY_ONSPAWN, 1200ms);
if (action == DATA_ANETHERON)
me->GetMotionMaster()->MovePath(urand(ALLIANCE_BASE_CHARGE_1, ALLIANCE_BASE_CHARGE_3), false);
me->GetMotionMaster()->MoveWaypoint(urand(ALLIANCE_BASE_CHARGE_1, ALLIANCE_BASE_CHARGE_3), false);
}
void PathEndReached(uint32 pathId) override
@@ -109,7 +109,7 @@ public:
case ALLIANCE_BASE_CHARGE_3:
me->m_Events.AddEventAtOffset([this]()
{
me->GetMotionMaster()->MovePath(urand(ALLIANCE_BASE_PATROL_1, ALLIANCE_BASE_PATROL_3), true);
me->GetMotionMaster()->MoveWaypoint(urand(ALLIANCE_BASE_PATROL_1, ALLIANCE_BASE_PATROL_3), true);
}, 1s);
break;
}
@@ -86,7 +86,7 @@ public:
Talk(SAY_ONSPAWN, 1200ms);
if (action == DATA_AZGALOR)
me->GetMotionMaster()->MovePath(HORDE_BOSS_PATH, false);
me->GetMotionMaster()->MoveWaypoint(HORDE_BOSS_PATH, false);
}
void KilledUnit(Unit * victim) override
@@ -106,7 +106,7 @@ public:
Talk(SAY_ONSPAWN, 1200ms);
if (action == DATA_KAZROGAL)
me->GetMotionMaster()->MovePath(HORDE_BOSS_PATH, false);
me->GetMotionMaster()->MoveWaypoint(HORDE_BOSS_PATH, false);
}
void KilledUnit(Unit * victim) override
@@ -101,7 +101,7 @@ public:
Talk(SAY_ONSPAWN, 1200ms);
if (action == DATA_WINTERCHILL)
me->GetMotionMaster()->MovePath(urand(ALLIANCE_BASE_CHARGE_1, ALLIANCE_BASE_CHARGE_3), false);
me->GetMotionMaster()->MoveWaypoint(urand(ALLIANCE_BASE_CHARGE_1, ALLIANCE_BASE_CHARGE_3), false);
}
void PathEndReached(uint32 pathId) override
@@ -113,7 +113,7 @@ public:
case ALLIANCE_BASE_CHARGE_3:
me->m_Events.AddEventAtOffset([this]()
{
me->GetMotionMaster()->MovePath(urand(ALLIANCE_BASE_PATROL_1, ALLIANCE_BASE_PATROL_3), true);
me->GetMotionMaster()->MoveWaypoint(urand(ALLIANCE_BASE_PATROL_1, ALLIANCE_BASE_PATROL_3), true);
}, 1s);
break;
}
@@ -188,7 +188,7 @@ public:
else
{
creature->AI()->Talk(SAY_SUCCESS);
creature->GetMotionMaster()->MovePath(JAINA_RETREAT_PATH, false);
creature->GetMotionMaster()->MoveWaypoint(JAINA_RETREAT_PATH, false);
}
}
return true;
@@ -493,15 +493,15 @@ struct npc_hyjal_ground_trash : public ScriptedAI
case DATA_WINTERCHILL:
case DATA_ANETHERON:
case DATA_ALLIANCE_RETREAT:
me->GetMotionMaster()->MovePath(urand(ALLIANCE_BASE_CHARGE_1, ALLIANCE_BASE_CHARGE_3), false);
me->GetMotionMaster()->MoveWaypoint(urand(ALLIANCE_BASE_CHARGE_1, ALLIANCE_BASE_CHARGE_3), false);
break;
case DATA_KAZROGAL:
case DATA_AZGALOR:
case DATA_HORDE_RETREAT:
me->GetMotionMaster()->MovePath(urand(HORDE_BASE_CHARGE_1, HORDE_BASE_CHARGE_3), false);
me->GetMotionMaster()->MoveWaypoint(urand(HORDE_BASE_CHARGE_1, HORDE_BASE_CHARGE_3), false);
break;
case DATA_ARCHIMONDE:
me->GetMotionMaster()->MovePath(urand(NIGHT_ELF_BASE_CHARGE_1, NIGHT_ELF_BASE_CHARGE_3), false);
me->GetMotionMaster()->MoveWaypoint(urand(NIGHT_ELF_BASE_CHARGE_1, NIGHT_ELF_BASE_CHARGE_3), false);
break;
}
}
@@ -517,7 +517,7 @@ struct npc_hyjal_ground_trash : public ScriptedAI
case ALLIANCE_BASE_CHARGE_3:
me->m_Events.AddEventAtOffset([this]()
{
me->GetMotionMaster()->MovePath(urand(ALLIANCE_BASE_PATROL_1, ALLIANCE_BASE_PATROL_3), true);
me->GetMotionMaster()->MoveWaypoint(urand(ALLIANCE_BASE_PATROL_1, ALLIANCE_BASE_PATROL_3), true);
}, 1s);
break;
case HORDE_BASE_CHARGE_1:
@@ -525,7 +525,7 @@ struct npc_hyjal_ground_trash : public ScriptedAI
case HORDE_BASE_CHARGE_3:
me->m_Events.AddEventAtOffset([this]()
{
me->GetMotionMaster()->MovePath(urand(HORDE_BASE_PATROL_1, HORDE_BASE_PATROL_3), true);
me->GetMotionMaster()->MoveWaypoint(urand(HORDE_BASE_PATROL_1, HORDE_BASE_PATROL_3), true);
}, 1s);
break;
case NIGHT_ELF_BASE_CHARGE_1:
@@ -616,9 +616,9 @@ struct npc_hyjal_gargoyle : public ScriptedAI
case DATA_AZGALOR:
case DATA_HORDE_RETREAT:
if (me->GetPositionX() < 5500.f)
me->GetMotionMaster()->MovePath(urand(GARGOYLE_PATH_FORTRESS_1, GARGOYLE_PATH_FORTRESS_3), false);
me->GetMotionMaster()->MoveWaypoint(urand(GARGOYLE_PATH_FORTRESS_1, GARGOYLE_PATH_FORTRESS_3), false);
else
me->GetMotionMaster()->MovePath(urand(GARGOYLE_PATH_TROLL_CAMP_1, GARGOYLE_PATH_TROLL_CAMP_3), false);
me->GetMotionMaster()->MoveWaypoint(urand(GARGOYLE_PATH_TROLL_CAMP_1, GARGOYLE_PATH_TROLL_CAMP_3), false);
break;
default:
break;
@@ -687,9 +687,9 @@ struct npc_hyjal_frost_wyrm : public ScriptedAI
case DATA_AZGALOR:
case DATA_HORDE_RETREAT:
if (me->GetPositionX() < 5500.f)
me->GetMotionMaster()->MovePath(FROST_WYRM_FORTRESS, false);
me->GetMotionMaster()->MoveWaypoint(FROST_WYRM_FORTRESS, false);
else
me->GetMotionMaster()->MovePath(FROST_WYRM_TROLL_CAMP, false);
me->GetMotionMaster()->MoveWaypoint(FROST_WYRM_TROLL_CAMP, false);
break;
default:
break;
@@ -702,7 +702,7 @@ struct npc_hyjal_frost_wyrm : public ScriptedAI
{
me->m_Events.AddEventAtOffset([this]()
{
me->GetMotionMaster()->MovePath(FROST_WYRM_FORTRESS_PATROL, true);
me->GetMotionMaster()->MoveWaypoint(FROST_WYRM_FORTRESS_PATROL, true);
}, 1s);
}
}
@@ -48,7 +48,7 @@ struct boss_lieutenant_drake : public BossAI
{
runSecondPath = false;
pathId = me->GetEntry() * 10;
me->GetMotionMaster()->MovePath(pathId, false);
me->GetMotionMaster()->MoveWaypoint(pathId, false);
}
void JustEngagedWith(Unit* /*who*/) override
@@ -132,7 +132,7 @@ struct boss_lieutenant_drake : public BossAI
if (runSecondPath)
{
runSecondPath = false;
me->GetMotionMaster()->MovePath(pathId, true);
me->GetMotionMaster()->MoveWaypoint(pathId, true);
}
if (!UpdateVictim())
@@ -126,7 +126,7 @@ public:
Talk(SAY_QUEST_ACCEPTED);
me->RemoveNpcFlag(UNIT_NPC_FLAG_QUESTGIVER);
me->SetFaction(FACTION_ESCORTEE_N_NEUTRAL_ACTIVE);
me->GetMotionMaster()->MovePath(PATH_ESCORT, false);
me->GetMotionMaster()->MoveWaypoint(PATH_ESCORT, false);
}
}
@@ -92,7 +92,7 @@ struct boss_ayamiss : public BossAI
me->SetReactState(REACT_PASSIVE);
me->SetCanFly(false);
me->SetDisableGravity(false);
me->GetMotionMaster()->MovePath(me->GetEntry() * 10, false);
me->GetMotionMaster()->MoveWaypoint(me->GetEntry() * 10, false);
DoResetThreatList();
scheduler.CancelGroup(GROUP_AIR);
});
@@ -291,7 +291,7 @@ class spell_ayamiss_swarmer_teleport_trigger : public SpellScript
uint32 pathId = data.pathId;
caster->m_Events.AddEventAtOffset([caster, pathId]()
{
caster->GetMotionMaster()->MovePath(pathId, false);
caster->GetMotionMaster()->MoveWaypoint(pathId, false);
}, 1s);
}
@@ -361,7 +361,7 @@ public:
void HandleScript(SpellEffIndex /*effIndex*/)
{
GetCaster()->ToCreature()->GetMotionMaster()->Clear();
GetCaster()->ToCreature()->GetMotionMaster()->MovePath(_pathId, false);
GetCaster()->ToCreature()->GetMotionMaster()->MoveWaypoint(_pathId, false);
}
void Register() override
@@ -188,7 +188,7 @@ struct boss_ossirian : public BossAI
{
if (Creature* vortex = me->SummonCreature(NPC_SAND_VORTEX, pos))
{
vortex->GetMotionMaster()->MovePath(pathIds.front(), true);
vortex->GetMotionMaster()->MoveWaypoint(pathIds.front(), true);
pathIds.reverse();
}
}
@@ -204,7 +204,7 @@ public:
if (me->GetEntry() == NPC_VEM)
{
me->GetMotionMaster()->MovePath(VEM_WAYPOINT_PATH, true);
me->GetMotionMaster()->MoveWaypoint(VEM_WAYPOINT_PATH, true);
}
}
@@ -437,7 +437,7 @@ public:
{
if (Creature* add = instance->GetCreature(*addsAtBase.begin()))
{
add->GetMotionMaster()->MovePath(PATH_ADDS, false);
add->GetMotionMaster()->MoveWaypoint(PATH_ADDS, false);
movedadds.push_back(add->GetGUID());
}
@@ -121,11 +121,11 @@ public:
// Xinef: cannot use pathfinding...
if (summon->GetDistance(477.0f, 618.0f, 771.0f) < 5.0f)
summon->GetMotionMaster()->MovePath(3000012, false);
summon->GetMotionMaster()->MoveWaypoint(3000012, false);
else if (summon->GetDistance(583.0f, 617.0f, 771.0f) < 5.0f)
summon->GetMotionMaster()->MovePath(3000013, false);
summon->GetMotionMaster()->MoveWaypoint(3000013, false);
else if (summon->GetDistance(581.0f, 608.5f, 739.0f) < 5.0f)
summon->GetMotionMaster()->MovePath(3000014, false);
summon->GetMotionMaster()->MoveWaypoint(3000014, false);
}
void KilledUnit(Unit* victim) override
@@ -1071,7 +1071,7 @@ public:
Talk(SAY_TENEBRON_RESPOND);
me->SetCanFly(true);
me->SetSpeed(MOVE_FLIGHT, 3.0f);
me->GetMotionMaster()->MovePath(me->GetEntry() * 10, false);
me->GetMotionMaster()->MoveWaypoint(me->GetEntry() * 10, false);
}
}
@@ -1254,7 +1254,7 @@ public:
Talk(SAY_SHADRON_RESPOND);
me->SetCanFly(true);
me->SetSpeed(MOVE_FLIGHT, 3.0f);
me->GetMotionMaster()->MovePath(me->GetEntry() * 10, false);
me->GetMotionMaster()->MoveWaypoint(me->GetEntry() * 10, false);
}
}
@@ -1370,7 +1370,7 @@ public:
Talk(SAY_SHADRON_RESPOND);
me->SetCanFly(true);
me->SetSpeed(MOVE_FLIGHT, 3.0f);
me->GetMotionMaster()->MovePath(me->GetEntry() * 10, false);
me->GetMotionMaster()->MoveWaypoint(me->GetEntry() * 10, false);
}
}
@@ -140,7 +140,7 @@ public:
{
for (int8 i = 0; outroPositions[i].entry[GetTeamIdInInstance()] != 0; ++i)
if (Creature* summon = instance->SummonCreature(outroPositions[i].entry[GetTeamIdInInstance()], outroPositions[i].startPosition))
summon->GetMotionMaster()->MovePath(outroPositions[i].pathId, false);
summon->GetMotionMaster()->MoveWaypoint(outroPositions[i].pathId, false);
}
}
@@ -369,7 +369,7 @@ public:
if (pInstance)
{
if (Creature* c = pInstance->instance->GetCreature(pInstance->GetGuidData(DATA_TYRANNUS_EVENT_GUID)))
c->GetMotionMaster()->MovePath(PATH_BEGIN_VALUE + 10, false);
c->GetMotionMaster()->MoveWaypoint(PATH_BEGIN_VALUE + 10, false);
if (Creature* c = pInstance->instance->GetCreature(pInstance->GetGuidData(DATA_LEADER_FIRST_GUID)))
c->AI()->Talk(c->GetEntry() == NPC_JAINA_PART1 ? SAY_JAINA_KRICK_2 : SAY_SYLVANAS_KRICK_2);
}
@@ -440,7 +440,7 @@ public:
if (Creature* c = pInstance->instance->GetCreature(pInstance->GetGuidData(DATA_LEADER_FIRST_GUID)))
{
c->AI()->Talk(c->GetEntry() == NPC_JAINA_PART1 ? SAY_JAINA_KRICK_3 : SAY_SYLVANAS_KRICK_3);
c->GetMotionMaster()->MovePath(PATH_BEGIN_VALUE + 11, false);
c->GetMotionMaster()->MoveWaypoint(PATH_BEGIN_VALUE + 11, false);
}
}
me->setActive(false);
@@ -108,7 +108,7 @@ public:
{
c->RemoveAura(46598);
c->GetMotionMaster()->Clear();
c->GetMotionMaster()->MovePath(PATH_BEGIN_VALUE + 18, true);
c->GetMotionMaster()->MoveWaypoint(PATH_BEGIN_VALUE + 18, true);
}
me->SetHomePosition(exitPos);
me->GetMotionMaster()->MoveJump(exitPos, 10.0f, 2.0f);
@@ -551,7 +551,7 @@ public:
while (FBSData[i].entry)
{
if (Creature* c = me->SummonCreature(FBSData[i].entry, 688.69f + i * 1.8f, FBSSpawnPos.GetPositionY() + (float)irand(-2, 2), FBSSpawnPos.GetPositionZ(), 3 * M_PI / 2))
c->GetMotionMaster()->MovePath(FBSData[i].pathId, false);
c->GetMotionMaster()->MoveWaypoint(FBSData[i].pathId, false);
++i;
}
events.RescheduleEvent(2, 3s);
@@ -1284,7 +1284,7 @@ public:
events.RescheduleEvent(8, 2s);
break;
case 8:
me->GetMotionMaster()->MovePath(me->GetEntry() == NPC_JAINA_PART2 ? PATH_BEGIN_VALUE + 16 : PATH_BEGIN_VALUE + 17, false);
me->GetMotionMaster()->MoveWaypoint(me->GetEntry() == NPC_JAINA_PART2 ? PATH_BEGIN_VALUE + 16 : PATH_BEGIN_VALUE + 17, false);
break;
case 10:
if (Creature* x = pInstance->instance->GetCreature(pInstance->GetGuidData(DATA_MARTIN_OR_GORKUN_GUID)))
@@ -533,7 +533,7 @@ public:
case EVENT_SAURFANG_RUN:
if (Creature* factionNPC = ObjectAccessor::GetCreature(*me, _factionNPC))
{
factionNPC->GetMotionMaster()->MovePath(factionNPC->GetSpawnId() * 10, false);
factionNPC->GetMotionMaster()->MoveWaypoint(factionNPC->GetSpawnId() * 10, false);
factionNPC->DespawnOrUnsummon(46500ms);
std::list<Creature*> followers;
factionNPC->GetCreaturesWithEntryInRange(followers, 30, _instance->GetData(DATA_TEAMID_IN_INSTANCE) == TEAM_HORDE ? NPC_KOR_KRON_GENERAL : NPC_ALLIANCE_COMMANDER);
@@ -1742,7 +1742,7 @@ public:
{
sindragosa->setActive(true);
sindragosa->SetDisableGravity(true);
sindragosa->GetMotionMaster()->MovePath(NPC_SINDRAGOSA * 10, true);
sindragosa->GetMotionMaster()->MoveWaypoint(NPC_SINDRAGOSA * 10, true);
if (TempSummon* summon = sindragosa->ToTempSummon())
{
@@ -1416,7 +1416,7 @@ public:
_startTimer -= diff;
if (_startTimer <= 0)
{
me->GetMotionMaster()->MovePath(3000000 + urand(0, 11), true);
me->GetMotionMaster()->MoveWaypoint(3000000 + urand(0, 11), true);
_startTimer = 0;
}
}
@@ -354,17 +354,7 @@ public:
{
me->StopMoving();
startPath = false;
if (WaypointPath const* i_path = sWaypointMgr->GetPath(me->GetWaypointPath()))
{
Movement::PointsArray pathPoints;
pathPoints.push_back(G3D::Vector3(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()));
for (uint8 i = 0; i < i_path->size(); ++i)
{
WaypointData const* node = i_path->at(i);
pathPoints.push_back(G3D::Vector3(node->x, node->y, node->z));
}
me->GetMotionMaster()->MoveSplinePath(&pathPoints);
}
me->GetMotionMaster()->MovePath(me->GetWaypointPath(), FORCED_MOVEMENT_NONE, PathSource::WAYPOINT_MGR);
}
if (!UpdateVictim())
@@ -139,7 +139,7 @@ struct npc_enslaved_proto_drake : public ScriptedAI
_setData = true;
me->SetCanFly(true);
me->SetDisableGravity(true);
me->GetMotionMaster()->MovePath(PATH_PROTODRAKE, false);
me->GetMotionMaster()->MoveWaypoint(PATH_PROTODRAKE, false);
}
}
@@ -1688,7 +1688,7 @@ public:
// Arthas load path
if (Creature* arthas = ObjectAccessor::GetCreature(*me, _arthasGUID))
{
arthas->GetMotionMaster()->MovePath(PATH_ARTHAS, false);
arthas->GetMotionMaster()->MoveWaypoint(PATH_ARTHAS, false);
}
_events.ScheduleEvent(EVENT_THASSARIAN_SCRIPT_3, 1s);
break;
@@ -1696,7 +1696,7 @@ public:
// Talbot load path
if (Creature* talbot = ObjectAccessor::GetCreature(*me, _talbotGUID))
{
talbot->GetMotionMaster()->MovePath(PATH_TALBOT, false);
talbot->GetMotionMaster()->MoveWaypoint(PATH_TALBOT, false);
}
_events.ScheduleEvent(EVENT_THASSARIAN_SCRIPT_4, 20s);
break;
@@ -1730,7 +1730,7 @@ public:
arlos->SetWalk(true);
arlos->SetImmuneToAll(true);
arlos->RemoveNpcFlag(UNIT_NPC_FLAG_QUESTGIVER);
arlos->GetMotionMaster()->MovePath(PATH_ARLOS, false);
arlos->GetMotionMaster()->MoveWaypoint(PATH_ARLOS, false);
}
if (Creature* leryssa = me->SummonCreature(NPC_LERYSSA, 3751.0986f, 3614.9219f, 473.4048f, 4.5029f, TEMPSUMMON_CORPSE_TIMED_DESPAWN))
{
@@ -1738,7 +1738,7 @@ public:
leryssa->SetWalk(true);
leryssa->SetImmuneToAll(true);
leryssa->RemoveNpcFlag(UNIT_NPC_FLAG_GOSSIP | UNIT_NPC_FLAG_QUESTGIVER);
leryssa->GetMotionMaster()->MovePath(PATH_LERYSSA, false);
leryssa->GetMotionMaster()->MoveWaypoint(PATH_LERYSSA, false);
}
_events.ScheduleEvent(EVENT_THASSARIAN_SCRIPT_7, 7s);
break;
@@ -1993,7 +1993,7 @@ public:
_playerGUID = player->GetGUID();
CloseGossipMenuFor(player);
me->RemoveNpcFlag(UNIT_NPC_FLAG_GOSSIP);
me->GetMotionMaster()->MovePath(PATH_THASSARIAN, false);
me->GetMotionMaster()->MoveWaypoint(PATH_THASSARIAN, false);
}
}
@@ -41,25 +41,7 @@ struct npc_preparations_for_war_vehicle : public NullCreatureAI
void InitializeAI() override
{
WPPath* path = sSmartWaypointMgr->GetPath(me->GetEntry());
if (!path || path->empty())
{
me->DespawnOrUnsummon(1ms);
return;
}
Movement::PointsArray pathPoints;
pathPoints.push_back(G3D::Vector3(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()));
uint32 wpCounter = 1;
WPPath::const_iterator itr;
while ((itr = path->find(wpCounter++)) != path->end())
{
WayPoint* wp = itr->second;
pathPoints.push_back(G3D::Vector3(wp->x, wp->y, wp->z));
}
me->GetMotionMaster()->MoveSplinePath(&pathPoints);
me->GetMotionMaster()->MovePath(me->GetEntry(), FORCED_MOVEMENT_NONE, PathSource::SMART_WAYPOINT_MGR);
NullCreatureAI::InitializeAI();
pointId = 0;
@@ -614,7 +614,7 @@ public:
uint32 path = me->GetEntry() * 10 + urand(0, 4);
if (me->GetPositionY() > -1150.0f)
path += 5;
me->GetMotionMaster()->MovePath(path, false);
me->GetMotionMaster()->MoveWaypoint(path, false);
}
void MovementInform(uint32 type, uint32 point) override
@@ -589,77 +589,77 @@ public:
case EVENT_WOUNDED_MOVE:
if (me->GetPositionY() == -2835.11f)
{
me->GetMotionMaster()->MovePath(WOUNDED_MOVE_1, false);
me->GetMotionMaster()->MoveWaypoint(WOUNDED_MOVE_1, false);
me->DespawnOrUnsummon(20s);
}
if (me->GetPositionY() == -2981.89f)
{
me->GetMotionMaster()->MovePath(WOUNDED_MOVE_3, false);
me->GetMotionMaster()->MoveWaypoint(WOUNDED_MOVE_3, false);
me->DespawnOrUnsummon(18s);
}
if (me->GetPositionY() == -2934.44f)
{
me->GetMotionMaster()->MovePath(WOUNDED_MOVE_3, false);
me->GetMotionMaster()->MoveWaypoint(WOUNDED_MOVE_3, false);
me->DespawnOrUnsummon(9s);
}
if (me->GetPositionY() == -3020.99f)
{
me->GetMotionMaster()->MovePath(WOUNDED_MOVE_1, false);
me->GetMotionMaster()->MoveWaypoint(WOUNDED_MOVE_1, false);
me->DespawnOrUnsummon(22s);
}
if (me->GetPositionY() == -2964.73f)
{
me->GetMotionMaster()->MovePath(WOUNDED_MOVE_2, false);
me->GetMotionMaster()->MoveWaypoint(WOUNDED_MOVE_2, false);
me->DespawnOrUnsummon(15s);
}
if (me->GetPositionY() == -2940.50f)
{
me->GetMotionMaster()->MovePath(WOUNDED_MOVE_1, false);
me->GetMotionMaster()->MoveWaypoint(WOUNDED_MOVE_1, false);
me->DespawnOrUnsummon(20s);
}
if (me->GetPositionY() == -2847.93f)
{
me->GetMotionMaster()->MovePath(WOUNDED_MOVE_1, false);
me->GetMotionMaster()->MoveWaypoint(WOUNDED_MOVE_1, false);
me->DespawnOrUnsummon(30s);
}
if (me->GetPositionY() == -2835.31f)
{
me->GetMotionMaster()->MovePath(WOUNDED_MOVE_1, false);
me->GetMotionMaster()->MoveWaypoint(WOUNDED_MOVE_1, false);
me->DespawnOrUnsummon(27s);
}
if (me->GetPositionY() == -2822.20f)
{
me->GetMotionMaster()->MovePath(WOUNDED_MOVE_1, false);
me->GetMotionMaster()->MoveWaypoint(WOUNDED_MOVE_1, false);
me->DespawnOrUnsummon(25s);
}
if (me->GetPositionY() == -2846.31f)
{
me->GetMotionMaster()->MovePath(WOUNDED_MOVE_1, false);
me->GetMotionMaster()->MoveWaypoint(WOUNDED_MOVE_1, false);
me->DespawnOrUnsummon(21s);
}
if (me->GetPositionY() == -2897.23f)
{
me->GetMotionMaster()->MovePath(WOUNDED_MOVE_3, false);
me->GetMotionMaster()->MoveWaypoint(WOUNDED_MOVE_3, false);
me->DespawnOrUnsummon(15s);
}
if (me->GetPositionY() == -2886.01f)
{
me->GetMotionMaster()->MovePath(WOUNDED_MOVE_3, false);
me->GetMotionMaster()->MoveWaypoint(WOUNDED_MOVE_3, false);
me->DespawnOrUnsummon(25s);
}
if (me->GetPositionY() == -2906.89f)
{
me->GetMotionMaster()->MovePath(WOUNDED_MOVE_3, false);
me->GetMotionMaster()->MoveWaypoint(WOUNDED_MOVE_3, false);
me->DespawnOrUnsummon(25s);
}
if (me->GetPositionY() == -3048.94f)
{
me->GetMotionMaster()->MovePath(WOUNDED_MOVE_2, false);
me->GetMotionMaster()->MoveWaypoint(WOUNDED_MOVE_2, false);
me->DespawnOrUnsummon(30s);
}
if (me->GetPositionY() == -2961.08f)
{
me->GetMotionMaster()->MovePath(WOUNDED_MOVE_2, false);
me->GetMotionMaster()->MoveWaypoint(WOUNDED_MOVE_2, false);
me->DespawnOrUnsummon(25s);
}
break;
+1 -19
View File
@@ -1312,25 +1312,7 @@ public:
break;
case EVENT_START_FLIGHT:
{
WPPath* path = sSmartWaypointMgr->GetPath(me->GetEntry());
if (!path || path->empty())
{
me->DespawnOrUnsummon(1ms);
return;
}
Movement::PointsArray pathPoints;
pathPoints.push_back(G3D::Vector3(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()));
uint32 wpCounter = 1;
WPPath::const_iterator itr;
while ((itr = path->find(wpCounter++)) != path->end())
{
WayPoint* wp = itr->second;
pathPoints.push_back(G3D::Vector3(wp->x, wp->y, wp->z));
}
me->GetMotionMaster()->MoveSplinePath(&pathPoints);
me->GetMotionMaster()->MovePath(me->GetEntry(), FORCED_MOVEMENT_NONE, PathSource::SMART_WAYPOINT_MGR);
events.ScheduleEvent(EVENT_CHECK_PATH_REGEN_HEALTH_BURN_DAMAGE, 1min);
events.ScheduleEvent(EVENT_SYNCHRONIZE_SHIELDS, 5s);
break;
@@ -1148,17 +1148,7 @@ public:
{
if (apply && passenger->IsPlayer())
{
Movement::PointsArray pathPoints;
pathPoints.push_back(G3D::Vector3(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()));
WaypointPath const* i_path = sWaypointMgr->GetPath(NPC_PLANE);
for (uint8 i = 0; i < i_path->size(); ++i)
{
WaypointData const* node = i_path->at(i);
pathPoints.push_back(G3D::Vector3(node->x, node->y, node->z));
}
me->GetMotionMaster()->MoveSplinePath(&pathPoints);
me->GetMotionMaster()->MovePath(NPC_PLANE, FORCED_MOVEMENT_NONE, PathSource::WAYPOINT_MGR);
}
}
@@ -467,17 +467,7 @@ public:
if (startPath)
{
startPath = false;
Movement::PointsArray pathPoints;
pathPoints.push_back(G3D::Vector3(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()));
WaypointPath const* i_path = sWaypointMgr->GetPath(me->GetWaypointPath());
for (uint8 i = 0; i < i_path->size(); ++i)
{
WaypointData const* node = i_path->at(i);
pathPoints.push_back(G3D::Vector3(node->x, node->y, node->z));
}
me->GetMotionMaster()->MoveSplinePath(&pathPoints);
me->GetMotionMaster()->MovePath(me->GetWaypointPath(), FORCED_MOVEMENT_NONE, PathSource::WAYPOINT_MGR);
}
if (setCharm)
{
@@ -849,17 +839,7 @@ public:
{
Talk(TEXT_EMOTE, passenger);
Movement::PointsArray pathPoints;
pathPoints.push_back(G3D::Vector3(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()));
WaypointPath const* i_path = sWaypointMgr->GetPath(NPC_DRAKE);
for (uint8 i = 0; i < i_path->size(); ++i)
{
WaypointData const* node = i_path->at(i);
pathPoints.push_back(G3D::Vector3(node->x, node->y, node->z));
}
me->GetMotionMaster()->MoveSplinePath(&pathPoints);
me->GetMotionMaster()->MovePath(NPC_DRAKE, FORCED_MOVEMENT_NONE, PathSource::WAYPOINT_MGR);
}
}
else
@@ -1087,15 +1067,7 @@ public:
{
if (apply)
{
Movement::PointsArray pathPoints;
pathPoints.push_back(G3D::Vector3(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()));
WaypointPath const* i_path = sWaypointMgr->GetPath(me->GetEntry() * 100);
for (uint8 i = 0; i < i_path->size(); ++i)
{
WaypointData const* node = i_path->at(i);
pathPoints.push_back(G3D::Vector3(node->x, node->y, node->z));
}
me->GetMotionMaster()->MoveSplinePath(&pathPoints);
me->GetMotionMaster()->MovePath(me->GetEntry() * 100, FORCED_MOVEMENT_NONE, PathSource::WAYPOINT_MGR);
me->SetCanFly(true);
me->SetDisableGravity(true);
me->SetSpeed(MOVE_RUN, 6.0f);
@@ -66,7 +66,7 @@ struct boss_ambassador_hellmaw : public BossAI
}
else
{
me->GetMotionMaster()->MovePath(PATH_ID_START, false);
me->GetMotionMaster()->MoveWaypoint(PATH_ID_START, false);
}
}
@@ -88,7 +88,7 @@ struct boss_ambassador_hellmaw : public BossAI
DoPlaySoundToSet(me, SOUND_INTRO);
isBanished = false;
me->SetImmuneToAll(false);
me->GetMotionMaster()->MovePath(PATH_ID_START, false);
me->GetMotionMaster()->MoveWaypoint(PATH_ID_START, false);
}
void JustEngagedWith(Unit*) override
@@ -142,7 +142,7 @@ struct boss_ambassador_hellmaw : public BossAI
{
me->m_Events.AddEventAtOffset([this]()
{
me->GetMotionMaster()->MovePath(PATH_ID_PATHING, true);
me->GetMotionMaster()->MoveWaypoint(PATH_ID_PATHING, true);
}, 20s);
}
}
@@ -794,7 +794,7 @@ struct npc_akama_illidan : public ScriptedAI
if (instance->GetBossState(DATA_AKAMA_ILLIDAN) != DONE)
{
me->GetMotionMaster()->MovePath(PATH_AKAMA_ILLIDARI_COUNCIL_2, false);
me->GetMotionMaster()->MoveWaypoint(PATH_AKAMA_ILLIDARI_COUNCIL_2, false);
}
else
{
@@ -811,7 +811,7 @@ struct npc_akama_illidan : public ScriptedAI
{
me->NearTeleportTo(AkamaIllidariCouncilTeleport);
me->RemoveNpcFlag(UNIT_NPC_FLAG_GOSSIP);
me->GetMotionMaster()->MovePath(PATH_AKAMA_ILLIDARI_COUNCIL_1, false);
me->GetMotionMaster()->MoveWaypoint(PATH_AKAMA_ILLIDARI_COUNCIL_1, false);
}
break;
case ACTION_AKAMA_MINIONS:
@@ -974,7 +974,7 @@ struct npc_akama_illidan : public ScriptedAI
Talk(SAY_AKAMA_SALUTE);
}, 56955ms); // 6275ms
me->m_Events.AddEventAtOffset([&] {
me->GetMotionMaster()->MovePath(PATH_AKAMA_ILLIDARI_COUNCIL_3, false);
me->GetMotionMaster()->MoveWaypoint(PATH_AKAMA_ILLIDARI_COUNCIL_3, false);
}, 64030ms); // 7075ms
}
break;
@@ -1013,7 +1013,7 @@ struct npc_akama_illidan : public ScriptedAI
me->HandleEmoteCommand(EMOTE_ONESHOT_EXCLAMATION);
}, 9530ms); // 2830ms
me->m_Events.AddEventAtOffset([&] {
me->GetMotionMaster()->MovePath(PATH_AKAMA_MINIONS, false);
me->GetMotionMaster()->MoveWaypoint(PATH_AKAMA_MINIONS, false);
}, 14400ms); // 4870ms
}
}
@@ -273,7 +273,7 @@ struct boss_hydross_the_unstable : public BossAI
else if (summon->GetEntry() == NPC_TAINTED_HYDROSS_ELEMENTAL)
{
summon->setActive(true);
summon->GetMotionMaster()->MovePath(summon->GetEntry() * 10, false);
summon->GetMotionMaster()->MoveWaypoint(summon->GetEntry() * 10, false);
}
else
{
@@ -31,7 +31,7 @@ public:
{
if (Creature* quagmirran = instance->GetCreature(DATA_QUAGMIRRAN))
{
quagmirran->GetMotionMaster()->MovePath(quagmirran->GetEntry() * 100, true);
quagmirran->GetMotionMaster()->MoveWaypoint(quagmirran->GetEntry() * 100, true);
}
}
@@ -86,7 +86,7 @@ struct boss_ghazan : public BossAI
if (type == ACTION_MOVE_TO_PLATFORM && !_movedToPlatform)
{
_movedToPlatform = true;
me->GetMotionMaster()->MovePath((me->GetSpawnId() * 10) + 1, false);
me->GetMotionMaster()->MoveWaypoint((me->GetSpawnId() * 10) + 1, false);
}
}
@@ -100,7 +100,7 @@ struct npc_shattered_hand_scout : public ScriptedAI
DoCastSelf(SPELL_CLEAR_ALL);
me->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
Talk(SAY_INVADERS_BREACHED);
me->GetMotionMaster()->MovePath(me->GetEntry() * 10, false);
me->GetMotionMaster()->MoveWaypoint(me->GetEntry() * 10, false);
_firstZealots.clear();
std::list<Creature*> creatureList;
@@ -355,17 +355,7 @@ struct boss_alar : public BossAI
void ConstructWaypointsAndMove()
{
me->StopMoving();
if (WaypointPath const* i_path = sWaypointMgr->GetPath(me->GetWaypointPath()))
{
Movement::PointsArray pathPoints;
pathPoints.push_back(G3D::Vector3(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()));
for (uint8 i = 0; i < i_path->size(); ++i)
{
WaypointData const* node = i_path->at(i);
pathPoints.push_back(G3D::Vector3(node->x, node->y, node->z));
}
me->GetMotionMaster()->MoveSplinePath(&pathPoints);
}
me->GetMotionMaster()->MovePath(me->GetWaypointPath(), FORCED_MOVEMENT_NONE, PathSource::WAYPOINT_MGR);
}
void UpdateAI(uint32 diff) override
@@ -1860,22 +1860,22 @@ struct dragonmaw_race_npc : public ScriptedAI
switch (me->GetEntry())
{
case NPC_MUCKJAW:
me->GetMotionMaster()->MovePath(PATH_MUCKJAW, false);
me->GetMotionMaster()->MoveWaypoint(PATH_MUCKJAW, false);
break;
case NPC_TROPE:
me->GetMotionMaster()->MovePath(PATH_TROPE, false);
me->GetMotionMaster()->MoveWaypoint(PATH_TROPE, false);
break;
case NPC_CORLOK:
me->GetMotionMaster()->MovePath(PATH_CORLOK, false);
me->GetMotionMaster()->MoveWaypoint(PATH_CORLOK, false);
break;
case NPC_ICHMAN:
me->GetMotionMaster()->MovePath(PATH_ICHMAN, false);
me->GetMotionMaster()->MoveWaypoint(PATH_ICHMAN, false);
break;
case NPC_MULVERICK:
me->GetMotionMaster()->MovePath(PATH_MULVERICK, false);
me->GetMotionMaster()->MoveWaypoint(PATH_MULVERICK, false);
break;
case NPC_SKYSHATTER:
me->GetMotionMaster()->MovePath(PATH_SKYSHATTER, false);
me->GetMotionMaster()->MoveWaypoint(PATH_SKYSHATTER, false);
break;
default:
break;