diff --git a/.github/actions/docker-tag-and-build/action.yml b/.github/actions/docker-tag-and-build/action.yml new file mode 100644 index 000000000..af988bed6 --- /dev/null +++ b/.github/actions/docker-tag-and-build/action.yml @@ -0,0 +1,39 @@ +name: docker tag and build +description: a helper action to shorten generating docker tags and building +inputs: + component-name: + description: name of the component/docker image (eg worldserver, authserver) + type: string + required: true + push: + description: whether to push the image or not + type: boolean + required: true + version: + description: version tag to use for docker image + required: true + type: string +runs: + using: composite + steps: + - name: Get Docker Metadata + id: meta + uses: docker/metadata-action@v5 + with: + images: acore/ac-wotlk-${{ inputs.component-name }} + tags: | + type=raw,value=${{ inputs.version }} + type=ref,event=branch + + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: ${{ github.workspace }} + file: apps/docker/Dockerfile + push: ${{ inputs.push }} + tags: ${{ steps.meta.outputs.tags }} + target: ${{ inputs.component-name }} + build-args: | + USER_ID=1000 + GROUP_ID=1000 + DOCKER_USER=acore diff --git a/.github/workflows/docker_build.yml b/.github/workflows/docker_build.yml index 2dfc535eb..ffc3104a7 100644 --- a/.github/workflows/docker_build.yml +++ b/.github/workflows/docker_build.yml @@ -4,7 +4,11 @@ on: branches: - 'master' pull_request: - types: ['labeled', 'opened', 'synchronize', 'reopened'] + types: + - labeled + - opened + - synchronize + - reopened concurrency: group: ${{ github.head_ref }} || concat(${{ github.ref }}, ${{ github.workflow }}) @@ -12,166 +16,154 @@ concurrency: jobs: docker-build-n-deploy-dev: - strategy: - fail-fast: true - matrix: - os: [ubuntu-20.04] - runs-on: ${{ matrix.os }} + runs-on: "ubuntu-latest" if: | github.repository == 'azerothcore/azerothcore-wotlk' && !github.event.pull_request.draft - && (github.ref == 'refs/heads/master' || contains(github.event.pull_request.labels.*.name, 'run-build') || github.event.label.name == 'run-build') + && (github.ref_name == 'master' || contains(github.event.pull_request.labels.*.name, 'run-build') || github.event.label.name == 'run-build') env: COMPOSE_DOCKER_CLI_BUILD: 1 DOCKER_BUILDKIT: 1 steps: - - name: Extract branch name - shell: bash - run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" - id: extract_branch - - - name: Configure + - name: Free up disk space run: | sudo rm -rf /usr/local/lib/android sudo rm -rf /usr/share/dotnet sudo rm -rf /opt/ghc sudo rm -rf "$AGENT_TOOLSDIRECTORY" - docker --version - docker compose version - uses: actions/checkout@v4 - # we need the entire history for the ac-dev-server - # with: - # fetch-depth: 2 - - # - name: Set up Docker Buildx - # uses: docker/setup-buildx-action@v1 - name: Login to Docker Hub - if: github.repository == 'azerothcore/azerothcore-wotlk' && steps.extract_branch.outputs.branch == 'master' + if: github.repository == 'azerothcore/azerothcore-wotlk' && github.ref_name == 'master' uses: docker/login-action@v1 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Build Dev - if: github.repository == 'azerothcore/azerothcore-wotlk' - env: - #DOCKER_IMAGE_TAG: ${{ steps.extract_branch.outputs.branch }} - DOCKER_CLIENT_TIMEOUT: 400 - COMPOSE_HTTP_TIMEOUT: 400 + - name: Get version + id: version run: | - export DOCKER_USER_ID=$(id -u) - export DOCKER_GROUP_ID=$(id -u) - # pull the images first to load the docker cache layers - #./acore.sh docker pull - ./acore.sh docker build - output=$(./acore.sh version | grep "AzerothCore Rev. ") && version=${output#"AzerothCore Rev. "} - DOCKER_IMAGE_TAG=$version docker compose --profile dev --profile local build + output=$(./acore.sh version | grep "AzerothCore Rev. ") + version=${output#"AzerothCore Rev. "} + echo "version=$version" >> $GITHUB_OUTPUT - - name: Deploy Dev - #env: - # DOCKER_IMAGE_TAG: ${{ steps.extract_branch.outputs.branch }} - if: github.repository == 'azerothcore/azerothcore-wotlk' && steps.extract_branch.outputs.branch == 'master' - run: | - docker compose --profile dev --profile local push - output=$(./acore.sh version | grep "AzerothCore Rev. ") && version=${output#"AzerothCore Rev. "} - DOCKER_IMAGE_TAG=$version docker compose --profile dev --profile local push + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: acore/ac-wotlk-dev-server + tags: | + type=raw,value=${{ steps.version.outputs.version }} + type=ref,event=branch + + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: ${{ github.workspace }} + file: apps/docker/Dockerfile.dev-server + push: ${{ github.repository == 'azerothcore/azerothcore-wotlk' && github.ref_name == 'master' }} + tags: ${{ steps.meta.outputs.tags }} + build-args: | + USER_ID=1000 + GROUP_ID=1000 + DOCKER_USER=acore + + # TODO: rename this job docker-build-n-deploy-prod: - strategy: - fail-fast: true - matrix: - os: [ubuntu-20.04] - runs-on: ${{ matrix.os }} + runs-on: "ubuntu-latest" if: | github.repository == 'azerothcore/azerothcore-wotlk' && !github.event.pull_request.draft - && (github.ref == 'refs/heads/master' || contains(github.event.pull_request.labels.*.name, 'run-build') || github.event.label.name == 'run-build') + && (github.ref_name == 'master' || contains(github.event.pull_request.labels.*.name, 'run-build') || github.event.label.name == 'run-build') env: COMPOSE_DOCKER_CLI_BUILD: 1 DOCKER_BUILDKIT: 1 steps: - - name: Extract branch name - shell: bash - run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" - id: extract_branch - - - name: Configure + - name: Free up disk space run: | sudo rm -rf /usr/local/lib/android sudo rm -rf /usr/share/dotnet sudo rm -rf /opt/ghc sudo rm -rf "$AGENT_TOOLSDIRECTORY" - docker --version - docker compose version - uses: actions/checkout@v4 - # we need the entire history for the ac-dev-server - # with: - # fetch-depth: 2 - # - name: Set up Docker Buildx - # uses: docker/setup-buildx-action@v1 + # The containers created in this workflow are used by + # acore-docker, which has a dependency on mod-eluna. + # + # If you're wanting containers without mod-eluna, the best solution is to + # build them locally (such as with `docker compose build`) + - name: Download Eluna + if: github.repository == 'azerothcore/azerothcore-wotlk' && github.ref_name == 'master' + uses: actions/checkout@v4 + with: + repository: azerothcore/mod-eluna + path: modules/mod-eluna - name: Login to Docker Hub - if: github.repository == 'azerothcore/azerothcore-wotlk' && steps.extract_branch.outputs.branch == 'master' + if: github.repository == 'azerothcore/azerothcore-wotlk' && github.ref_name == 'master' uses: docker/login-action@v1 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Cache - uses: actions/cache@v3 + - name: Get version + id: version + run: | + output=$(./acore.sh version | grep "AzerothCore Rev. ") + version=${output#"AzerothCore Rev. "} + echo "version=$version" >> $GITHUB_OUTPUT + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: build worldserver + uses: ./.github/actions/docker-tag-and-build with: - path: var/docker/ccache - key: ccache:${{ matrix.os }}:clang:without-modules:${{ github.ref }}:${{ github.sha }} - restore-keys: | - ccache:${{ matrix.os }}:clang:without-modules:${{ github.ref }} - ccache:${{ matrix.os }}:clang:without-modules + component-name: worldserver + version: ${{ steps.version.outputs.version }} + push: ${{ github.repository == 'azerothcore/azerothcore-wotlk' && github.ref_name == 'master' }} - - name: Build Production images - if: github.repository == 'azerothcore/azerothcore-wotlk' - env: - #DOCKER_IMAGE_TAG: ${{ steps.extract_branch.outputs.branch }} - DOCKER_CLIENT_TIMEOUT: 220 - COMPOSE_HTTP_TIMEOUT: 220 - run: | - export DOCKER_USER_ID=$(id -u) - export DOCKER_GROUP_ID=$(id -u) - # pull the images first to load the docker cache layers - #./acore.sh docker prod:pull - ./acore.sh docker prod:build - output=$(./acore.sh version | grep "AzerothCore Rev. ") && version=${output#"AzerothCore Rev. "} - DOCKER_IMAGE_TAG=$version ./acore.sh docker prod:build - # create the container to allow the copy right after - docker compose create ac-build-prod - docker compose cp ac-build-prod:/azerothcore/var/ccache var/docker/ - echo "ccache exported" + - name: build authserver + uses: ./.github/actions/docker-tag-and-build + with: + component-name: authserver + version: ${{ steps.version.outputs.version }} + push: ${{ github.repository == 'azerothcore/azerothcore-wotlk' && github.ref_name == 'master' }} - - name: Deploy Production images - #env: - # DOCKER_IMAGE_TAG: ${{ steps.extract_branch.outputs.branch }} - if: github.repository == 'azerothcore/azerothcore-wotlk' && steps.extract_branch.outputs.branch == 'master' - run: | - docker compose --profile prod push - output=$(./acore.sh version | grep "AzerothCore Rev. ") && version=${output#"AzerothCore Rev. "} - DOCKER_IMAGE_TAG=$version docker compose --profile prod push + - name: build db-import + uses: ./.github/actions/docker-tag-and-build + with: + component-name: db-import + version: ${{ steps.version.outputs.version }} + push: ${{ github.repository == 'azerothcore/azerothcore-wotlk' && github.ref_name == 'master' }} + - name: build client-data + uses: ./.github/actions/docker-tag-and-build + with: + component-name: client-data + version: ${{ steps.version.outputs.version }} + push: ${{ github.repository == 'azerothcore/azerothcore-wotlk' && github.ref_name == 'master' }} + + - name: build tools + uses: ./.github/actions/docker-tag-and-build + with: + component-name: tools + version: ${{ steps.version.outputs.version }} + push: ${{ github.repository == 'azerothcore/azerothcore-wotlk' && github.ref_name == 'master' }} dispatch-acore-docker: needs: [ docker-build-n-deploy-prod , docker-build-n-deploy-dev] runs-on: ubuntu-latest steps: - - name: Extract branch name - shell: bash - run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" - id: extract_branch - - name: Repository Dispatch - if: github.repository == 'azerothcore/azerothcore-wotlk' && steps.extract_branch.outputs.branch == 'master' + if: github.repository == 'azerothcore/azerothcore-wotlk' && github.ref_name == 'master' uses: peter-evans/repository-dispatch@v2 with: token: ${{ secrets.ACORE_DOCKER_REPO_ACCESS_TOKEN }} diff --git a/.github/workflows/windows_build.yml b/.github/workflows/windows_build.yml index 9210ae8ae..76d78e7e0 100644 --- a/.github/workflows/windows_build.yml +++ b/.github/workflows/windows_build.yml @@ -45,7 +45,7 @@ jobs: - name: Copy dll files shell: bash run: | - cp "/c/Program Files/OpenSSL-Win64/bin/legacy.dll" "env/dist" + cp "/c/Program Files/OpenSSL/bin/legacy.dll" "env/dist" - name: Dry run authserver shell: bash run: | diff --git a/.gitignore b/.gitignore index a6673353c..afe157983 100644 --- a/.gitignore +++ b/.gitignore @@ -24,7 +24,8 @@ /src/server/scripts/Custom/* !/src/server/scripts/Custom/README.md -/docker-compose.override.yml +/*.override.yml +/*.override.yaml !.gitkeep diff --git a/apps/docker/Dockerfile b/apps/docker/Dockerfile index aee1d680e..3e3a928d7 100644 --- a/apps/docker/Dockerfile +++ b/apps/docker/Dockerfile @@ -1,20 +1,32 @@ -#syntax=docker/dockerfile:1.2 +ARG UBUNTU_VERSION=22.04 # lts +ARG TZ=Etc/UTC -#================================================================ -# -# DEV: Stage used for the development environment -# and the locally built services -# -#================================================================= +# This target lays out the general directory skeleton for AzerothCore, +# This target isn't intended to be directly used +FROM ubuntu:$UBUNTU_VERSION as skeleton -FROM ubuntu:20.04 as base -ARG USER_ID=1000 -ARG GROUP_ID=1000 -ARG DOCKER_USER=acore +ARG DOCKER=1 +ARG DEBIAN_FRONTEND=noninteractive -LABEL description="AC base image for dev containers" +ENV TZ=$TZ +ENV AC_FORCE_CREATE_DB=1 -# List of timezones: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones +RUN mkdir -pv \ + /azerothcore/bin \ + /azerothcore/data \ + /azerothcore/deps \ + /azerothcore/env/dist/bin \ + /azerothcore/env/dist/data/Cameras \ + /azerothcore/env/dist/data/dbc \ + /azerothcore/env/dist/data/maps \ + /azerothcore/env/dist/data/mmaps \ + /azerothcore/env/dist/data/vmaps \ + /azerothcore/env/dist/logs \ + /azerothcore/env/dist/temp \ + /azerothcore/env/dist/etc \ + /azerothcore/modules \ + /azerothcore/src \ + /azerothcore/build ENV DOCKER=1 @@ -83,22 +95,42 @@ RUN bash /azerothcore/acore.sh quit WORKDIR /azerothcore -#================================================================ -# -# Dev: create dev server image -# -#================================================================= +# This target builds the docker image +# This target can be useful to inspect the explicit outputs from the build, +FROM skeleton as build -FROM base as dev +ARG CTOOLS_BUILD="all" +ARG CTYPE="RelWithDebInfo" +ARG CCACHE_CPP2="true" +ARG CSCRIPTPCH="OFF" +ARG CSCRIPTS="static" +ARG CMODULES="static" +ARG CSCRIPTS_DEFAULT_LINKAGE="static" +ARG CWITH_WARNINGS="ON" +ARG CMAKE_EXTRA_OPTIONS="" +ARG GIT_DISCOVERY_ACROSS_FILESYSTEM=1 -LABEL description="AC dev image for dev containers" +ARG CCACHE_DIR="/ccache" +ARG CCACHE_MAXSIZE="1000MB" +ARG CCACHE_SLOPPINESS="pch_defines,time_macros,include_file_mtime" +ARG CCACHE_COMPRESS="" +ARG CCACHE_COMPRESSLEVEL="9" +ARG CCACHE_COMPILERCHECK="content" +ARG CCACHE_LOGFILE="" -USER $DOCKER_USER +RUN apt-get update \ + && apt-get install -y --no-install-recommends \ + build-essential ccache libtool cmake-data make cmake clang \ + git lsb-base curl unzip default-mysql-client openssl \ + default-libmysqlclient-dev libboost-all-dev libssl-dev libmysql++-dev \ + libreadline-dev zlib1g-dev libbz2-dev libncurses5-dev \ + && rm -rf /var/lib/apt/lists/* -# copy everything so we can work directly within the container -# using tools such as vscode dev-container -# NOTE: this folder is different by the /azerothcore (which is binded instead) -COPY --chown=$DOCKER_USER:$DOCKER_USER . /azerothcore +COPY CMakeLists.txt /azerothcore/CMakeLists.txt +COPY conf /azerothcore/conf +COPY deps /azerothcore/deps +COPY src /azerothcore/src +COPY modules /azerothcore/modules #================================================================ # @@ -288,57 +320,183 @@ ENV DATAPATH_ZIP=/tmp/data.zip RUN mkdir -p "$DATAPATH" ARG CACHEBUST=1 -# RUN --mount=type=bind,target=/azerothcore-temp,readwrite --mount=type=cache,target=/azerothcore/env/dist/data-temp /azerothcore-temp/acore.sh client-data && cp -rT /azerothcore/env/dist/data-temp/ /azerothcore/env/dist/data && chown -R $DOCKER_USER:$DOCKER_USER /azerothcore -RUN --mount=type=bind,target=/azerothcore-temp,readwrite /azerothcore-temp/acore.sh client-data && chown -R $DOCKER_USER:$DOCKER_USER /azerothcore -USER $DOCKER_USER +WORKDIR /azerothcore/build -#================================================================ -# -# TOOLS -# -#================================================================= +RUN --mount=type=cache,target=/ccache,sharing=locked \ + # This may seem silly (and it is), but AzerothCore wants the git repo at + # build time. The git repo is _huge_ and it's not something that really + # makes sense to mount into the container, but this way we can let the build + # have the information it needs without including the hundreds of megabytes + # of git repo into the container. + --mount=type=bind,target=/azerothcore/.git,source=.git \ + git config --global --add safe.directory /azerothcore \ + && cmake /azerothcore \ + -DCMAKE_INSTALL_PREFIX="/azerothcore/env/dist" \ + -DAPPS_BUILD="all" \ + -DTOOLS_BUILD="$CTOOLS_BUILD" \ + -DSCRIPTS="$CSCRIPTS" \ + -DMODULES="$CMODULES" \ + -DWITH_WARNINGS="$CWITH_WARNINGS" \ + -DCMAKE_BUILD_TYPE="$CTYPE" \ + -DCMAKE_CXX_COMPILER="clang++" \ + -DCMAKE_C_COMPILER="clang" \ + -DCMAKE_CXX_COMPILER_LAUNCHER="ccache" \ + -DCMAKE_C_COMPILER_LAUNCHER="ccache" \ + -DBoost_USE_STATIC_LIBS="ON" \ + && cmake --build . --config "$CTYPE" -j $(($(nproc) + 1)) \ + && cmake --install . --config "$CTYPE" + +############################# +# Base runtime for services # +############################# + +FROM skeleton as runtime -FROM ubuntu:20.04 as tools ARG USER_ID=1000 ARG GROUP_ID=1000 ARG DOCKER_USER=acore -LABEL description="AC Production: tools" +ENV ACORE_COMPONENT=undefined -# List of timezones: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones +# Install base dependencies for azerothcore +RUN apt-get update && \ + apt-get install -y --no-install-recommends \ + libmysqlclient21 libreadline8 \ + gettext-base default-mysql-client && \ + rm -rf /var/lib/apt/lists/* -# set timezone environment variable -ENV TZ=Etc/UTC +COPY --from=build /azerothcore/env/dist/etc/ /azerothcore/env/ref/etc -# set noninteractive mode so tzdata doesn't ask to set timezone on install -ENV DEBIAN_FRONTEND=noninteractive +VOLUME /azerothcore/env/dist/etc RUN apt-get update && apt-get install -y libmysqlclient-dev libssl-dev libbz2-dev \ libboost-system1.7*-dev libboost-filesystem1.7*-dev libboost-program-options1.7*-dev libboost-iostreams1.7*-dev libboost-thread1.7*-dev \ sudo && rm -rf /var/lib/apt/lists/* ; -# Create a non-root user -RUN addgroup --gid "$GROUP_ID" "$DOCKER_USER" && \ - adduser --disabled-password --gecos '' --uid "$USER_ID" --gid "$GROUP_ID" "$DOCKER_USER" && \ +RUN groupadd --gid "$GROUP_ID" "$DOCKER_USER" && \ + useradd -d /azerothcore --uid "$USER_ID" --gid "$GROUP_ID" "$DOCKER_USER" && \ passwd -d "$DOCKER_USER" && \ - echo "$DOCKER_USER ALL=(ALL:ALL) NOPASSWD: ALL" >> /etc/sudoers + chown -R "$DOCKER_USER:$DOCKER_USER" /azerothcore -RUN mkdir -p /azerothcore/env/client/ -RUN chown -R $DOCKER_USER:$DOCKER_USER /azerothcore +COPY apps/docker/entrypoint.sh /entrypoint.sh +RUN chmod -v +x /entrypoint.sh USER $DOCKER_USER -WORKDIR /azerothcore/env/client/ +ENTRYPOINT ["/entrypoint.sh"] -RUN mkdir -p /azerothcore/env/client/Cameras -RUN mkdir -p /azerothcore/env/client/dbc -RUN mkdir -p /azerothcore/env/client/maps -RUN mkdir -p /azerothcore/env/client/mmaps -RUN mkdir -p /azerothcore/env/client/vmaps +############### +# Auth Server # +############### -COPY --chown=$DOCKER_USER:$DOCKER_USER --from=build /azerothcore/env/dist/bin/map_extractor /azerothcore/env/client/map_extractor -COPY --chown=$DOCKER_USER:$DOCKER_USER --from=build /azerothcore/env/dist/bin/mmaps_generator /azerothcore/env/client/mmaps_generator -COPY --chown=$DOCKER_USER:$DOCKER_USER --from=build /azerothcore/env/dist/bin/vmap4_assembler /azerothcore/env/client/vmap4_assembler -COPY --chown=$DOCKER_USER:$DOCKER_USER --from=build /azerothcore/env/dist/bin/vmap4_extractor /azerothcore/env/client/vmap4_extractor +FROM runtime as authserver +LABEL description "AzerothCore Auth Server" +ENV ACORE_COMPONENT=authserver +# Don't run database migrations. We can leave that up to the db-import container +ENV AC_UPDATES_ENABLE_DATABASES=0 +# This disables user prompts. The console is still active, however +ENV AC_DISABLE_INTERACTIVE=1 +ENV AC_CLOSE_IDLE_CONNECTIONS=0 + +COPY --chown=$DOCKER_USER:$DOCKER_USER \ + --from=build \ + /azerothcore/env/dist/bin/authserver /azerothcore/env/dist/bin/authserver + + +CMD ["authserver"] + +################ +# World Server # +################ + +FROM runtime as worldserver + +LABEL description "AzerothCore World Server" + +ENV ACORE_COMPONENT=worldserver +# Don't run database migrations. We can leave that up to the db-import container +ENV AC_UPDATES_ENABLE_DATABASES=0 +# This disables user prompts. The console is still active, however +ENV AC_DISABLE_INTERACTIVE=1 +ENV AC_CLOSE_IDLE_CONNECTIONS=0 + +COPY --chown=$DOCKER_USER:$DOCKER_USER \ + --from=build \ + /azerothcore/env/dist/bin/worldserver /azerothcore/env/dist/bin/worldserver + +VOLUME /azerothcore/env/dist/etc + +CMD ["worldserver"] + +############# +# DB Import # +############# + +FROM runtime as db-import + +LABEL description "AzerothCore Database Import tool" + +USER $DOCKER_USER + +ENV ACORE_COMPONENT=dbimport + +COPY --chown=$DOCKER_USER:$DOCKER_USER \ + data data + +COPY --chown=$DOCKER_USER:$DOCKER_USER\ + --from=build \ + /azerothcore/env/dist/bin/dbimport /azerothcore/env/dist/bin/dbimport + +CMD /azerothcore/env/dist/bin/dbimport + +############### +# Client Data # +############### + +FROM skeleton as client-data + +LABEL description="AzerothCore client-data" + +ENV DATAPATH=/azerothcore/env/dist/data + +RUN apt-get update && \ + apt-get install -y curl unzip && \ + rm -rf /var/lib/apt/lists/* + +COPY --chown=$DOCKER_USER:$DOCKER_USER apps apps + +VOLUME /azerothcore/env/dist/data + +USER $DOCKER_USER + +CMD bash -c "source /azerothcore/apps/installer/includes/functions.sh && inst_download_client_data" + +################## +# Map Extractors # +################## + +FROM runtime as tools + +LABEL description "AzerothCore Tools" + +WORKDIR /azerothcore/env/dist/ + +RUN mkdir -pv /azerothcore/env/dist/Cameras \ + /azerothcore/env/dist/dbc \ + /azerothcore/env/dist/maps \ + /azerothcore/env/dist/mmaps \ + /azerothcore/env/dist/vmaps + +COPY --chown=$DOCKER_USER:$DOCKER_USER --from=build \ + /azerothcore/env/dist/bin/map_extractor /azerothcore/env/dist/bin/map_extractor + +COPY --chown=$DOCKER_USER:$DOCKER_USER --from=build \ + /azerothcore/env/dist/bin/mmaps_generator /azerothcore/env/dist/bin/mmaps_generator + +COPY --chown=$DOCKER_USER:$DOCKER_USER --from=build \ + /azerothcore/env/dist/bin/vmap4_assembler /azerothcore/env/dist/bin/vmap4_assembler + +COPY --chown=$DOCKER_USER:$DOCKER_USER --from=build \ + /azerothcore/env/dist/bin/vmap4_extractor /azerothcore/env/dist/bin/vmap4_extractor diff --git a/apps/docker/Dockerfile.dev-server b/apps/docker/Dockerfile.dev-server new file mode 100644 index 000000000..8924c4688 --- /dev/null +++ b/apps/docker/Dockerfile.dev-server @@ -0,0 +1,83 @@ +#syntax=docker/dockerfile:1.2 + +#================================================================ +# +# DEV: Stage used for the development environment +# and the locally built services +# +#================================================================= + +FROM ubuntu:22.04 as dev +ARG USER_ID=1000 +ARG GROUP_ID=1000 +ARG DOCKER_USER=acore +ARG TZ=Etc/UTC + +LABEL description="AC base image for dev containers" + +# List of timezones: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones + +ENV DOCKER=1 + +# Ensure ac-dev-server can properly pull versions +ENV GIT_DISCOVERY_ACROSS_FILESYSTEM=1 + +# set timezone environment variable +ENV TZ=$TZ + +# set noninteractive mode so tzdata doesn't ask to set timezone on install +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt-get update \ + && apt-get install -y \ + gdb gdbserver git dos2unix lsb-core sudo curl unzip \ + make cmake clang libmysqlclient-dev libboost-all-dev \ + build-essential libtool cmake-data openssl libgoogle-perftools-dev google-perftools \ + libssl-dev libmysql++-dev libreadline6-dev zlib1g-dev libbz2-dev mysql-client \ + libncurses5-dev ccache tzdata \ + && rm -rf /var/lib/apt/lists/* + +# Ensure git will work with the AzerothCore source directory +RUN git config --global --add safe.directory /azerothcore + +# change timezone in container +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime \ + && echo $TZ > /etc/timezone && dpkg-reconfigure --frontend noninteractive tzdata + +# Create a non-root user +RUN addgroup --gid "$GROUP_ID" "$DOCKER_USER" && \ + adduser --disabled-password --gecos '' --uid "$USER_ID" --gid "$GROUP_ID" "$DOCKER_USER" && \ + passwd -d "$DOCKER_USER" && \ + echo "$DOCKER_USER ALL=(ALL:ALL) NOPASSWD: ALL" >> /etc/sudoers + +# must be created to set the correct permissions on them +RUN mkdir -p \ + /azerothcore/env/dist/bin \ + /azerothcore/env/dist/data/Cameras \ + /azerothcore/env/dist/data/dbc \ + /azerothcore/env/dist/data/maps \ + /azerothcore/env/dist/data/mmaps \ + /azerothcore/env/dist/data/vmaps \ + /azerothcore/env/dist/logs \ + /azerothcore/env/dist/temp \ + /azerothcore/env/dist/etc \ + /azerothcore/var/build/obj + +# Correct permissions for non-root operations +RUN chown -R $DOCKER_USER:$DOCKER_USER /home/acore /run /opt /azerothcore + +USER $DOCKER_USER + +# copy only necessary files for the acore dashboard +COPY --chown=$DOCKER_USER:$DOCKER_USER apps /azerothcore/apps +COPY --chown=$DOCKER_USER:$DOCKER_USER bin /azerothcore/bin +COPY --chown=$DOCKER_USER:$DOCKER_USER conf /azerothcore/conf +COPY --chown=$DOCKER_USER:$DOCKER_USER data /azerothcore/data +COPY --chown=$DOCKER_USER:$DOCKER_USER deps /azerothcore/deps +COPY --chown=$DOCKER_USER:$DOCKER_USER acore.json /azerothcore/acore.json +COPY --chown=$DOCKER_USER:$DOCKER_USER acore.sh /azerothcore/acore.sh + +# Download deno and make sure the dashboard works +RUN bash /azerothcore/acore.sh quit + +WORKDIR /azerothcore diff --git a/apps/docker/README.md b/apps/docker/README.md index 80cd4fa10..546cbbfaa 100644 --- a/apps/docker/README.md +++ b/apps/docker/README.md @@ -1,27 +1,41 @@ -# Run AzerothCore with Docker +# Docker -*This readme it's a summary of the AzerothCore docker features.* +Full documentation is [on our wiki](https://www.azerothcore.org/wiki/install-with-docker#installation) -Docker. is a software that performs operating-system-level virtualization, allowing to wrap and launch applications inside containers. +## Building -Thanks to Docker, you can quickly setup and run AzerothCore in any operating system. +### Prerequisites -The **only** requirement is having [Docker](https://docs.docker.com/install/) installed into your system. Forget about installing mysql, visual studio, cmake, etc... +Ensure that you have docker, docker compose (v2), and the docker buildx command +installed. -### Installation instructions +It's all bundled with [Docker Desktop](https://docs.docker.com/get-docker/), +though if you're using Linux you can install them through your distribution's +package manage or by using the [documentation from docker](https://docs.docker.com/engine/install/) -Check the [Install with Docker](https://www.azerothcore.org/wiki/Install-with-Docker) guide. +### Running the Build -### Memory usage +1. Build containers with command -The total amount of RAM when running all AzerothCore docker containers is **less than 2 GB**. +```console +$ docker compose build +``` -![AzerothCore containers memory](https://user-images.githubusercontent.com/75517/51078287-10e65b80-16b3-11e9-807f-f59a5844dae5.png) + 1. Note that the initial build will take a long time, though subsequent builds should be faster +2. Start containers with command -### Docker containers vs Virtual machines +```console +$ docker compose up -d +# Skip the build step +$ docker compose up -d --build +``` -Using Docker will have the same benefits as using virtual machines, but with much less overhead: + 1. Note that this command may take a while the first time, for the database import -![Docker containers vs Virtual machines](https://user-images.githubusercontent.com/75517/51078179-d4fec680-16b1-11e9-8ce6-87b5053f55dd.png) +3. (on first install) You'll need to attach to the worldserver and create an Admin account +```console +$ docker compose attach ac-worldserver +AC> account create admin password 3 -1 +``` diff --git a/apps/docker/config-docker.sh b/apps/docker/config-docker.sh deleted file mode 100644 index 7f5482480..000000000 --- a/apps/docker/config-docker.sh +++ /dev/null @@ -1,8 +0,0 @@ -CUR_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - -CTOOLS_BUILD=all - -# allow the user to override configs -if [ -f "$AC_PATH_CONF/config.sh" ]; then - source "$AC_PATH_CONF/config.sh" # should overwrite previous -fi diff --git a/apps/docker/docker-build-dev.sh b/apps/docker/docker-build-dev.sh deleted file mode 100644 index ced35c437..000000000 --- a/apps/docker/docker-build-dev.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash - -CUR_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - -source "$CUR_PATH/docker-build-prod.sh" - -echo "Fixing EOL..." -# using -n (new file mode) should also fix the issue -# when the file is created with the default acore user but you -# set a different user into the docker configurations -for file in "env/dist/etc/"* -do - dos2unix -n $file $file -done diff --git a/apps/docker/docker-build-prod.sh b/apps/docker/docker-build-prod.sh deleted file mode 100755 index 07a42474b..000000000 --- a/apps/docker/docker-build-prod.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash - -cd /azerothcore - -bash acore.sh compiler build diff --git a/apps/docker/docker-cmd.sh b/apps/docker/docker-cmd.sh index 89e41e14a..c3b61a067 100644 --- a/apps/docker/docker-cmd.sh +++ b/apps/docker/docker-cmd.sh @@ -54,7 +54,7 @@ while [[ $# -gt 0 ]]; do case "$1" in start:app) set -x - docker compose --profile app up + docker compose up set +x # pop the head off of the queue of args # After this, the value of $1 is the value of $2 @@ -63,106 +63,138 @@ while [[ $# -gt 0 ]]; do start:app:d) set -x - docker compose --profile app up -d + docker compose up -d set +x shift ;; build) set -x - docker compose --profile local --profile dev --profile dev-build build - docker compose --profile dev-build run --rm --no-deps ac-dev-build /bin/bash /azerothcore/apps/docker/docker-build-dev.sh + docker compose build set +x shift ;; pull) set -x - docker compose --profile local --profile dev --profile dev-build pull - docker image prune -f + docker compose pull set +x shift ;; build:nocache) set -x - docker compose --profile local --profile dev --profile dev-build build --no-cache - docker image prune -f - docker compose run --rm --no-deps ac-dev-build /bin/bash /azerothcore/apps/docker/docker-build-dev.sh + docker compose build --no-cache set +x shift ;; clean:build) set -x - docker image prune -f - docker compose run --rm --no-deps ac-dev-server bash acore.sh compiler clean - docker compose run --rm --no-deps ac-dev-server bash acore.sh compiler ccacheClean + # Don't run 'docker buildx prune' since it may "escape" our bubble + # and affect other projects on the user's workstation/server + cat < https://docs.docker.com/engine/reference/commandline/buildx_prune/ +EOF set +x shift ;; client-data) set -x - docker compose run --rm --no-deps ac-dev-server bash acore.sh client-data + docker compose up ac-client-data-init set +x shift ;; dev:up) set -x - docker compose up -d ac-dev-server + docker compose --profile dev up ac-dev-server -d set +x shift ;; dev:build) set -x - docker compose run --rm ac-dev-server bash acore.sh compiler build + docker compose --profile dev run --rm ac-dev-server bash /azerothcore/acore.sh compiler build set +x shift ;; dev:dash) set -x - docker compose run --rm ac-dev-server bash /azerothcore/acore.sh ${@:2} + docker compose --profile dev run --rm ac-dev-server bash /azerothcore/acore.sh ${@:2} set +x shift ;; dev:shell) set -x - docker compose up -d ac-dev-server - docker compose exec ac-dev-server bash ${@:2} + docker compose --profile dev up -d ac-dev-server + docker compose --profile dev exec ac-dev-server bash ${@:2} set +x shift ;; build:prod|prod:build) + cat < 2023_09_27_01 +DELETE FROM `npc_vendor` WHERE `entry` = 31580 AND `item` IN(42943, 42944, 42945, 42946, 42947, 42948, 42949, 42950, 42951, 42952, 42984, 42985, 42991, 42992, 48677, 48683, 48685, 48687, 48689, 48691, 48716, 48718); diff --git a/data/sql/updates/db_world/2023_09_27_02.sql b/data/sql/updates/db_world/2023_09_27_02.sql new file mode 100644 index 000000000..503859d21 --- /dev/null +++ b/data/sql/updates/db_world/2023_09_27_02.sql @@ -0,0 +1,3 @@ +-- DB update 2023_09_27_01 -> 2023_09_27_02 +-- +ALTER TABLE `quest_template` MODIFY COLUMN `AllowableRaces` INT UNSIGNED NOT NULL DEFAULT 0; diff --git a/data/sql/updates/db_world/2023_09_29_00.sql b/data/sql/updates/db_world/2023_09_29_00.sql new file mode 100644 index 000000000..01f923c0a --- /dev/null +++ b/data/sql/updates/db_world/2023_09_29_00.sql @@ -0,0 +1,3 @@ +-- DB update 2023_09_27_02 -> 2023_09_29_00 +-- +UPDATE `conditions` SET `ConditionTypeOrReference` = 8 WHERE `SourceGroup` = 8441 AND `ConditionTypeOrReference` = 9; diff --git a/data/sql/updates/db_world/2023_10_01_00.sql b/data/sql/updates/db_world/2023_10_01_00.sql new file mode 100644 index 000000000..c218082b9 --- /dev/null +++ b/data/sql/updates/db_world/2023_10_01_00.sql @@ -0,0 +1,5 @@ +-- DB update 2023_09_29_00 -> 2023_10_01_00 +-- +DELETE FROM `creature_text` WHERE `CreatureId` = 16524 AND `GroupID` = 10; +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(16524, 10, 0, '%s begins channelling his mana into a powerful arcane spell.', 16, 0, 100, 13515, 3, 'Shade of Aran EMOTE_ARCANE_EXPLOSION'); diff --git a/data/sql/updates/db_world/2023_10_01_01.sql b/data/sql/updates/db_world/2023_10_01_01.sql new file mode 100644 index 000000000..1dc33533d --- /dev/null +++ b/data/sql/updates/db_world/2023_10_01_01.sql @@ -0,0 +1,5 @@ +-- DB update 2023_10_01_00 -> 2023_10_01_01 +-- +DELETE FROM `creature_template_movement` WHERE `CreatureId` = 17265; +INSERT INTO `creature_template_movement` (`CreatureId`, `Ground`, `Rooted`) VALUES +(17265, 1, 1); diff --git a/data/sql/updates/db_world/2023_10_01_02.sql b/data/sql/updates/db_world/2023_10_01_02.sql new file mode 100644 index 000000000..2f1cdcc1a --- /dev/null +++ b/data/sql/updates/db_world/2023_10_01_02.sql @@ -0,0 +1,3 @@ +-- DB update 2023_10_01_01 -> 2023_10_01_02 +-- +UPDATE `creature_template` SET `mechanic_immune_mask`=`mechanic_immune_mask`|33554432 WHERE `entry` = 17535; diff --git a/data/sql/updates/db_world/2023_10_01_03.sql b/data/sql/updates/db_world/2023_10_01_03.sql new file mode 100644 index 000000000..7bb3d7f5c --- /dev/null +++ b/data/sql/updates/db_world/2023_10_01_03.sql @@ -0,0 +1,95 @@ +-- DB update 2023_10_01_02 -> 2023_10_01_03 +-- +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (21218, 21220, 21221, 21224, 21225, 21226, 21228, 21229, 21230, 21231, 21232, 21251, 21263, 21298, 21299, 21301, 21339, 21806, 21863, 21865, 21873, 21920, 22009, 22055, 22056, 22250) AND `source_type` = 0; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(21218, 0, 0, 0, 0, 0, 100, 0, 16300, 19300, 10090, 19400, 0, 0, 11, 38572, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Vashj\'ir Honor Guard - In Combat - Cast Mortal Cleave'),-- fully sniffed +(21218, 0, 1, 0, 105, 0, 100, 0, 15750, 16850, 15750, 16850, 0, 5, 11, 38576, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Vashj\'ir Honor Guard - Victim Casting - Cast Knockback'),-- fully sniffed +(21218, 0, 2, 3, 2, 0, 100, 1, 0, 50, 0, 0, 0, 0, 11, 38947, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Vashj\'ir Honor Guard - Between Health 0-50% - Cast Frenzy'),-- fully sniffed +(21218, 0, 3, 0, 61, 0, 50, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Vashj\'ir Honor Guard - Between Health 0-50% - Talk'), +(21218, 0, 4, 0, 12, 0, 100, 0, 0, 20, 15000, 15000, 0, 0, 11, 38959, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Vashj\'ir Honor Guard - Target Health 0-20% - Cast Execute'),-- not sniffed thus unchanged +(21220, 0, 0, 0, 0, 0, 100, 0, 4800, 6900, 3650, 14750, 0, 0, 11, 38582, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Priestess - In Combat - Cast Holy Smite'),-- fully sniffed +(21220, 0, 1, 0, 0, 0, 100, 0, 6050, 12850, 6050, 17050, 0, 0, 11, 38585, 0, 0, 0, 0, 0, 5, 40, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Priestess - In Combat - Cast Holy Fire'),-- fully sniffed +(21220, 0, 2, 0, 14, 0, 100, 0, 25000, 35, 8500, 16100, 0, 0, 11, 38580, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Priestess - Friendly Missing Health - Cast Greater Heal'),-- fully sniffed +(21220, 0, 3, 0, 4, 0, 100, 0, 0, 0, 0, 0, 0, 0, 39, 20, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Priestess - On Aggro - Call For Help'), +(21221, 0, 0, 0, 0, 0, 100, 0, 0, 2000, 2000, 2000, 0, 0, 11, 38904, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Beast-Tamer - In Combat - Cast Throw'),-- not sniffed thus unchanged +(21221, 0, 1, 0, 0, 0, 100, 0, 6050, 10850, 6050, 12950, 0, 0, 11, 38474, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Beast-Tamer - In Combat - Cast Cleave'),-- fully sniffed +(21221, 0, 2, 0, 0, 0, 100, 0, 6050, 7250, 15800, 19200, 0, 0, 11, 38484, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Beast-Tamer - In Combat - Cast Bestial Wrath'),-- fully sniffed +(21224, 0, 0, 0, 14, 0, 100, 0, 8000, 40, 8000, 10000, 0, 0, 11, 38658, 64, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Tidewalker Depth-Seer - Friendly Missing Health - Cast Healing Touch'),-- not sniffed thus unchanged +(21224, 0, 1, 0, 16, 1, 100, 0, 38657, 40, 7000, 10000, 0, 0, 11, 38657, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Tidewalker Depth-Seer - Friendly Missing Buff - Cast Rejuvenation'),-- not sniffed thus unchanged +(21224, 0, 2, 0, 0, 0, 100, 0, 8450, 8450, 25000, 35000, 0, 0, 11, 38659, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Tidewalker Depth-Seer - In Combat - Cast Tranquility'),-- repeat timer not sniffed +(21224, 0, 3, 0, 4, 0, 100, 512, 0, 0, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Tidewalker Depth-Seer - On Aggro - Set Event Phase'), +(21225, 0, 0, 0, 0, 0, 100, 0, 8650, 8850, 18000, 25000, 0, 0, 11, 39070, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Tidewalker Warrior - In Combat - Cast Bloodthirst'),-- repeat timer not sniffed +(21225, 0, 1, 0, 0, 0, 100, 0, 10000, 15000, 25000, 30000, 0, 0, 11, 38664, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Tidewalker Warrior - In Combat - Cast Enrage'),-- not sniffed thus unchanged +(21225, 0, 2, 0, 0, 0, 100, 0, 3000, 10000, 10000, 15000, 0, 0, 11, 39069, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Tidewalker Warrior - In Combat - Cast Uppercut'),-- not sniffed thus unchanged +(21226, 0, 0, 0, 0, 0, 100, 0, 7250, 8850, 3000, 4000, 0, 0, 11, 39065, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Tidewalker Shaman - In Combat - Cast Lightning Bolt'),-- repeat timer not sniffed +(21226, 0, 1, 0, 0, 0, 100, 0, 0, 0, 60000, 60000, 0, 0, 11, 39067, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Tidewalker Shaman - In Combat - Cast Lightning Shield'),-- not sniffed thus unchanged +(21226, 0, 2, 0, 0, 0, 100, 0, 3000, 10000, 10000, 15000, 0, 0, 11, 39066, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Tidewalker Shaman - In Combat - Cast Chain Lightning'),-- not sniffed thus unchanged +(21228, 0, 0, 0, 0, 0, 100, 0, 0, 1000, 2000, 2200, 0, 0, 11, 39064, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Tidewalker Hydromancer - In Combat - Cast FrostBolt'),-- not sniffed correctly thus unchanged +(21228, 0, 1, 0, 0, 0, 100, 0, 5000, 10000, 10000, 15000, 0, 0, 11, 39062, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Tidewalker Hydromancer - In Combat - Cast Frost Shock'),-- not sniffed thus unchanged +(21228, 0, 2, 0, 106, 0, 100, 0, 10000, 15000, 10000, 15000, 0, 10, 11, 39063, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Tidewalker Hydromancer - Within Range 0-10yd - Cast Frost Nova'),-- not sniffed correctly thus unchanged +(21229, 0, 0, 0, 0, 0, 100, 0, 10900, 21200, 120000, 120000, 0, 0, 11, 39027, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Greyheart Tidecaller - In Combat - Cast Poison Shield'),-- repeat unchanged due to logical timer +(21229, 0, 1, 0, 0, 0, 100, 0, 5200, 11900, 35150, 35150, 0, 0, 11, 38624, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Greyheart Tidecaller - In Combat - Cast Water Elemental Totem'), +(21230, 0, 0, 0, 4, 0, 100, 512, 0, 0, 0, 0, 0, 0, 30, 1, 2, 3, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Greyheart Nether-Mage - On Aggro - Set Event Phase Random'), +(21230, 0, 1, 0, 0, 1, 100, 0, 1550, 9550, 2400, 8700, 0, 0, 11, 38641, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Greyheart Nether-Mage - In Combat - Cast Fireball'),-- fully sniffed +(21230, 0, 2, 0, 0, 1, 100, 0, 1200, 2000, 60000, 60000, 0, 0, 11, 38648, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Greyheart Nether-Mage - In Combat - Cast Fire Destruction'),-- repeat timer not sniffed +(21230, 0, 3, 0, 0, 1, 100, 0, 12100, 22000, 10950, 18150, 0, 0, 11, 38635, 0, 0, 0, 0, 0, 5, 40, 0, 0, 0, 0, 0, 0, 0, 'Greyheart Nether-Mage - In Combat - Cast Rain of Fire'),-- fully sniffed +(21230, 0, 4, 0, 0, 1, 100, 0, 8500, 12300, 6050, 20850, 0, 0, 11, 38636, 0, 0, 0, 0, 0, 5, 30, 0, 0, 0, 0, 0, 0, 0, 'Greyheart Nether-Mage - In Combat - Cast Scorch'),-- fully sniffed +(21230, 0, 5, 0, 0, 2, 100, 0, 4800, 10900, 1200, 6700, 0, 0, 11, 38645, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Greyheart Nether-Mage - In Combat - Cast Frostbolt'),-- fully sniffed +(21230, 0, 6, 0, 0, 2, 100, 0, 1200, 9600, 60000, 60000, 0, 0, 11, 38649, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Greyheart Nether-Mage - In Combat - Cast Frost Destruction'),-- repeat timer not sniffed +(21230, 0, 7, 0, 0, 2, 100, 0, 21750, 35150, 14000, 17000, 0, 0, 11, 38644, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Greyheart Nether-Mage - In Combat - Cast Cone of Cold'),-- repeat timer not sniffed +(21230, 0, 8, 0, 0, 2, 100, 1, 7250, 24250, 0, 0, 0, 0, 11, 38646, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Greyheart Nether-Mage - In Combat - Cast Blizzard'),-- new added spell +(21230, 0, 9, 0, 0, 4, 100, 0, 7250, 12950, 13500, 14900, 0, 0, 11, 38633, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Greyheart Nether-Mage - In Combat - Cast Arcane Volley'),-- fully sniffed +(21230, 0, 10, 0, 0, 4, 100, 0, 350, 4650, 60000, 60000, 0, 0, 11, 38647, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Greyheart Nether-Mage - In Combat - Cast Arcane Destruction'),-- repeat timer not sniffed +(21230, 0, 11, 0, 0, 4, 100, 0, 17350, 21400, 14550, 15350, 0, 0, 11, 38634, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Greyheart Nether-Mage - In Combat - Cast Arcane Lightning'),-- fully sniffed +(21230, 0, 12, 0, 0, 4, 100, 0, 8450, 12550, 12100, 22800, 0, 0, 11, 38642, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Greyheart Nether-Mage - In Combat - Cast Blink'),-- new added spell +(21231, 0, 0, 0, 0, 0, 100, 0, 5000, 12000, 10000, 15000, 0, 0, 11, 38631, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Greyheart Shield-Bearer - In Combat - Cast Avenger\'s Shield'),-- not sniffed correctly thus unchanged +(21231, 0, 1, 9, 0, 0, 100, 0, 8, 25, 10000, 15000, 0, 0, 11, 38630, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Greyheart Shield-Bearer - In Combat - Cast Shield Charge'),-- not sniffed correctly thus unchanged +(21232, 0, 0, 0, 25, 0, 100, 257, 0, 0, 0, 0, 0, 0, 11, 29651, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Greyheart Skulker - On Reset - Cast Dual Wield'), +(21232, 0, 1, 0, 105, 0, 100, 0, 4800, 13100, 4850, 9050, 0, 5, 11, 38625, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Greyheart Skulker - Victim Casting - Cast Kick'),-- fully sniffed +(21251, 0, 0, 0, 4, 0, 100, 512, 0, 0, 0, 0, 0, 0, 30, 1, 2, 3, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Underbog Colossus - On Aggro - Set Random Phase'), +(21251, 0, 1, 0, 0, 1, 100, 0, 19400, 19400, 13350, 16950, 0, 0, 11, 39031, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Underbog Colossus - In Combat - Cast Enrage (Phase 1)'),-- fully sniffed +(21251, 0, 2, 0, 0, 1, 100, 1, 0, 0, 0, 0, 0, 0, 11, 39014, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Underbog Colossus - In Combat - Cast Atrophic Blow (Phase 1)'),-- not sniffed thus unchanged +(21251, 0, 3, 0, 0, 2, 100, 0, 16950, 16950, 25500, 29100, 0, 0, 11, 38971, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Underbog Colossus - In Combat - Cast Acid Geyser (Phase 2)'),-- fully sniffed +(21251, 0, 4, 0, 0, 2, 100, 0, 25450, 25450, 29150, 29150, 0, 0, 11, 39044, 0, 0, 0, 0, 0, 5, 40, 1, 0, 0, 0, 0, 0, 0, 'Underbog Colossus - In Combat - Cast Serpentshrine Parasite (Phase 2)'),-- fully sniffed +(21251, 0, 5, 0, 0, 4, 100, 0, 19450, 19450, 25450, 25450, 0, 0, 11, 38976, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Underbog Colossus - In Combat - Cast Spore Quake (Phase 3)'),-- fully sniffed +(21251, 0, 6, 0, 0, 4, 100, 0, 27900, 27900, 29100, 29100, 0, 0, 11, 39032, 0, 0, 0, 0, 0, 5, 40, 1, 0, 0, 0, 0, 0, 0, 'Underbog Colossus - In Combat - Cast Initial Infection (Phase 3)'),-- fully sniffed +(21251, 0, 7, 0, 6, 0, 80, 512, 0, 0, 0, 0, 0, 0, 125, 1, 4, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Underbog Colossus - On Death - Run Random Timed Event'), +(21251, 0, 8, 0, 59, 0, 100, 512, 1, 0, 0, 0, 0, 0, 11, 38718, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Underbog Colossus - On Timed Event - Cast Toxic Pool'),-- unchanged +(21251, 0, 9, 0, 59, 0, 100, 512, 2, 0, 0, 0, 0, 0, 11, 38922, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Underbog Colossus - On Timed Event - Cast Summon Colossus Lurkers'),-- unchanged +(21251, 0, 10, 0, 59, 0, 100, 512, 3, 0, 0, 0, 0, 0, 11, 38928, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Underbog Colossus - On Timed Event - Cast Summon Colossus Ragers'),-- unchanged +(21251, 0, 11, 0, 59, 0, 100, 512, 4, 0, 0, 0, 0, 0, 11, 38726, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Underbog Colossus - On Timed Event - Cast Summon Serpentshrine Mushroom'),-- unchanged +(21263, 0, 0, 0, 0, 0, 100, 0, 6050, 17850, 7250, 16350, 0, 0, 11, 38995, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Greyheart Technician - In Combat - Cast Hamstring'),-- fully sniffed +(21298, 0, 0, 0, 0, 0, 80, 0, 10850, 17550, 10900, 17000, 0, 0, 11, 38599, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Serpentguard - In Combat - Cast \'Spell Reflection\''),-- fully sniffed +(21298, 0, 1, 0, 0, 0, 100, 0, 0, 0, 59000, 60000, 0, 0, 11, 38603, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Serpentguard - In Combat - Cast \'Corrupt Devotion Aura\''),-- not sniffed thus unchanged +(21299, 0, 0, 0, 0, 0, 80, 0, 10900, 16000, 22900, 32900, 0, 0, 11, 38626, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Fathom-Witch - In Combat - Cast \'Domination\''),-- repeat timer not sniffed +(21299, 0, 1, 0, 0, 0, 100, 0, 14700, 18500, 66300, 89300, 0, 0, 11, 38627, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Fathom-Witch - In Combat - Cast \'Shadow Nova\''),-- repeat timer not sniffed +(21299, 0, 2, 0, 0, 0, 100, 0, 4450, 5850, 3650, 8450, 0, 0, 11, 38628, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Fathom-Witch - In Combat - Cast \'Shadow Bolt\''),-- fully sniffed +(21301, 0, 0, 0, 0, 0, 100, 0, 6850, 12350, 19400, 27400, 0, 0, 11, 38591, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Shatterer - In Combat - Cast Shatter Armor'),-- fully sniffed +(21301, 0, 1, 0, 4, 0, 100, 0, 0, 0, 0, 0, 0, 0, 39, 20, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Shatterer - On Aggro - Call For Help'), +(21339, 0, 0, 0, 0, 0, 100, 0, 9700, 22400, 13350, 40050, 0, 0, 11, 38491, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Hate-Screamer - In Combat - Cast Silence'),-- fully sniffed +(21339, 0, 1, 0, 0, 0, 100, 0, 3600, 10900, 4850, 12950, 0, 0, 11, 38496, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Hate-Screamer - In Combat - Cast Sonic Scream'),-- fully sniffed +(21806, 0, 0, 0, 0, 0, 100, 0, 6050, 9250, 8500, 11600, 0, 0, 11, 37531, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Greyheart Spellbinder - In Combat - Cast Mind Blast'),-- fully sniffed +(21806, 0, 1, 0, 105, 0, 100, 0, 6050, 6050, 8000, 10000, 0, 45, 11, 39076, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Greyheart Spellbinder - In Combat - Cast Spell Shock'),-- repeat timer not sniffed +(21806, 0, 2, 0, 4, 0, 100, 0, 0, 0, 0, 0, 0, 0, 39, 20, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Greyheart Spellbinder - On Aggro - Call For Help'), +(21806, 0, 3, 0, 1, 0, 100, 1, 1000, 1000, 0, 0, 0, 0, 11, 37626, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Greyheart Spellbinder - Out of Combat - Cast Green Beam'), +(21863, 0, 0, 0, 0, 0, 100, 0, 9650, 15750, 12150, 15750, 0, 0, 11, 38650, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Serpentshrine Lurker - In Combat - Cast Rancid Mushroom'),-- fully sniffed +(21863, 0, 1, 0, 0, 0, 100, 0, 12150, 18150, 15000, 22000, 0, 0, 11, 38655, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Serpentshrine Lurker - In Combat - Cast Poison Bolt Volley'),-- repeat timer not sniffed +(21865, 0, 0, 0, 0, 0, 100, 0, 1200, 9500, 3200, 11400, 0, 0, 11, 37770, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Ambusher - In Combat - Cast Shoot'),-- fully sniffed +(21865, 0, 1, 0, 0, 0, 100, 0, 7250, 14850, 12100, 16000, 0, 0, 11, 37790, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Ambusher - In Combat - Cast Spread Shot'),-- fully sniffed +(21873, 0, 0, 0, 0, 0, 100, 0, 1000, 5000, 9000, 12000, 0, 0, 11, 28168, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Guardian - In Combat - Cast Arcing Smash'),-- not sniffed correctly +(21873, 0, 1, 0, 0, 0, 100, 0, 8000, 12000, 14000, 18000, 0, 0, 11, 9080, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Guardian - In Combat - Cast Hamstring'),-- not sniffed but weird ID +(21920, 0, 0, 0, 0, 0, 100, 0, 7650, 26050, 7250, 26950, 0, 0, 11, 41932, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Tidewalker Lurker - In Combat - Cast Carnivorous Bite'),-- fully sniffed +(22009, 0, 0, 0, 60, 0, 100, 1, 100, 100, 0, 0, 0, 0, 38, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Tainted Elemental - On Reset - Set In Combat With Zone'), +(22009, 0, 1, 0, 60, 0, 100, 0, 100, 500, 2350, 2650, 0, 0, 11, 38253, 0, 0, 0, 0, 0, 5, 200, 0, 0, 0, 0, 0, 0, 0, 'Tainted Elemental - In Combat - Cast Poison Bolt'),-- fully sniffed +(22009, 0, 2, 0, 60, 0, 100, 769, 15000, 15000, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Tainted Elemental - On Update - Despawn'), +(22055, 0, 0, 0, 4, 0, 100, 0, 0, 0, 0, 0, 0, 0, 38, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Elite - On Aggro - Set In Combat With Zone'), +(22055, 0, 1, 0, 0, 0, 100, 0, 6850, 17250, 1250, 15750, 0, 0, 11, 38260, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Elite - In Combat - Cast Cleave'),-- fully sniffed +(22055, 0, 2, 0, 0, 0, 100, 0, 15350, 17750, 8000, 10000, 0, 0, 11, 38262, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Elite - In Combat - Cast Hamstring'),-- repeat not sniffed +(22055, 0, 3, 0, 34, 0, 100, 0, 8, 1, 0, 0, 0, 0, 38, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Elite - Movement Inform - Set In Combat With Zone'), +(22056, 0, 0, 0, 4, 0, 100, 0, 0, 0, 0, 0, 0, 0, 38, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Strider - On Aggro - Set In Combat With Zone'), +(22056, 0, 1, 0, 0, 0, 100, 0, 15700, 15700, 10850, 13350, 0, 0, 11, 38259, 0, 0, 0, 0, 0, 5, 40, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Strider - In Combat - Cast Mind Blast'),-- fully sniffed +(22056, 0, 2, 0, 34, 0, 100, 0, 8, 1, 0, 0, 0, 0, 38, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Strider - Movement Inform - Set In Combat With Zone'), +(22250, 0, 0, 0, 25, 0, 100, 769, 0, 0, 0, 0, 0, 0, 41, 21000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rancid Mushroom - On Reset - Despawn'), +(22250, 0, 1, 0, 0, 0, 100, 0, 1150, 1150, 1200, 3400, 0, 0, 11, 31698, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rancid Mushroom - In Combat - Cast Grow'),-- fully sniffed +(22250, 0, 2, 3, 0, 0, 100, 1, 22950, 22950, 0, 0, 0, 0, 11, 38652, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rancid Mushroom - In Combat - Cast Spore Cloud (no repeat)'),-- fully sniffed +(22250, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 37, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rancid Mushroom - In Combat - Die'); diff --git a/data/sql/updates/db_world/2023_10_01_04.sql b/data/sql/updates/db_world/2023_10_01_04.sql new file mode 100644 index 000000000..a8dd6809a --- /dev/null +++ b/data/sql/updates/db_world/2023_10_01_04.sql @@ -0,0 +1,8 @@ +-- DB update 2023_10_01_03 -> 2023_10_01_04 +-- #12145 midsummer add spell script spell_midsummer_ribbon_pole_visual +DELETE FROM `spell_script_names` WHERE `spell_id` IN (29531, 29705, 29726, 29727); +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(29531, 'spell_midsummer_ribbon_pole_visual'), +(29705, 'spell_midsummer_ribbon_pole_visual'), +(29726, 'spell_midsummer_ribbon_pole_visual'), +(29727, 'spell_midsummer_ribbon_pole_visual'); diff --git a/data/sql/updates/db_world/2023_10_05_00.sql b/data/sql/updates/db_world/2023_10_05_00.sql new file mode 100644 index 000000000..aa13f0dac --- /dev/null +++ b/data/sql/updates/db_world/2023_10_05_00.sql @@ -0,0 +1,3 @@ +-- DB update 2023_10_01_04 -> 2023_10_05_00 +-- +DELETE FROM `spell_threat` WHERE `entry`=29166; diff --git a/data/sql/updates/db_world/2023_10_07_00.sql b/data/sql/updates/db_world/2023_10_07_00.sql new file mode 100644 index 000000000..ba6491523 --- /dev/null +++ b/data/sql/updates/db_world/2023_10_07_00.sql @@ -0,0 +1,5 @@ +-- DB update 2023_10_05_00 -> 2023_10_07_00 +-- Banner of Provocation +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 17 AND `SourceGroup` = 0 AND `SourceEntry` = 27517; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(17, 0, 27517, 0, 0, 30, 0, 181058, 20, 0, 1, 25, 0, '', 'Allow using "Banner of Provocation" if there are no other banners within 20y.'); diff --git a/data/sql/updates/db_world/2023_10_07_01.sql b/data/sql/updates/db_world/2023_10_07_01.sql new file mode 100644 index 000000000..9dc34a2ac --- /dev/null +++ b/data/sql/updates/db_world/2023_10_07_01.sql @@ -0,0 +1,8 @@ +-- DB update 2023_10_07_00 -> 2023_10_07_01 +-- Lord Valthalak's Amulet +DELETE FROM `spell_script_names` WHERE `spell_id`=27360; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES (27360, 'spell_gen_valthalak_amulet'); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 17 AND `SourceGroup` = 0 AND `SourceEntry` = 27360; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(17, 0, 27360, 0, 0, 29, 0, 16073, 50, 0, 1, 0, 0, '', 'Allow using Lord Valthalak\'s Amulet only if there is no Spirit of Lord Valthalak within 50 yards.'); diff --git a/data/sql/updates/db_world/2023_10_07_02.sql b/data/sql/updates/db_world/2023_10_07_02.sql new file mode 100644 index 000000000..6df8940c6 --- /dev/null +++ b/data/sql/updates/db_world/2023_10_07_02.sql @@ -0,0 +1,44 @@ +-- DB update 2023_10_07_01 -> 2023_10_07_02 +-- Stone Fury from Trinity +UPDATE `creature_template` SET `MovementType` = 2 WHERE (`entry` = 2258); + +DELETE FROM `creature_template_addon` WHERE (`entry` = 2258); +INSERT INTO `creature_template_addon` (`entry`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `visibilityDistanceType`, `auras`) VALUES +(2258, 639130, 0, 0, 1, 0, 0, ''); + +DELETE FROM `creature` WHERE (`id1` = 2258) AND (`guid` IN (63913)); +INSERT INTO `creature` (`guid`, `id1`, `id2`, `id3`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `ScriptName`, `VerifiedBuild`) VALUES +(63913, 2258, 0, 0, 0, 0, 0, 1, 1, 0, 664.315, -1027.59, 160.39, 5.21757, 72000, 0, 0, 1536, 0, 2, 0, 0, 0, '', 0); + +DELETE FROM `waypoint_data` WHERE `id` = 639130; +INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_type`, `action`, `action_chance`, `wpguid`) VALUES +(639130, 1, 664.315, -1027.59, 160.39, NULL, 0, 0, 0, 100, 0), +(639130, 2, 654.02, -1032.34, 163.127, NULL, 0, 0, 0, 100, 0), +(639130, 3, 634.638, -1041.36, 163.816, NULL, 0, 0, 0, 100, 0), +(639130, 4, 622.304, -1055.48, 163.186, NULL, 0, 0, 0, 100, 0), +(639130, 5, 620.168, -1114.91, 160.186, NULL, 0, 0, 0, 100, 0), +(639130, 6, 627.218, -1131.61, 159.535, NULL, 0, 0, 0, 100, 0), +(639130, 7, 631.939, -1149.35, 155.421, NULL, 0, 0, 0, 100, 0), +(639130, 8, 629.934, -1192.34, 145.181, NULL, 0, 0, 0, 100, 0), +(639130, 9, 633.981, -1229.12, 136.877, NULL, 0, 0, 0, 100, 0), +(639130, 10, 634.73, -1271.43, 121.429, NULL, 0, 0, 0, 100, 0), +(639130, 11, 627.306, -1321.81, 106.197, NULL, 0, 0, 0, 100, 0), +(639130, 12, 629.422, -1375.57, 93.9589, NULL, 0, 0, 0, 100, 0), +(639130, 13, 643.925, -1408.88, 87.1831, NULL, 0, 0, 0, 100, 0), +(639130, 14, 668.443, -1437.6, 81.8552, NULL, 0, 0, 0, 100, 0), +(639130, 15, 708.689, -1455.94, 81.4619, NULL, 0, 0, 0, 100, 0), +(639130, 16, 745.689, -1459.7, 80.3421, NULL, 0, 0, 0, 100, 0), +(639130, 17, 708.769, -1455.86, 81.4599, NULL, 0, 0, 0, 100, 0), +(639130, 18, 667.903, -1437.37, 81.9153, NULL, 0, 0, 0, 100, 0), +(639130, 19, 643.733, -1408.63, 87.2146, NULL, 0, 0, 0, 100, 0), +(639130, 20, 629.19, -1375.19, 94.0446, NULL, 0, 0, 0, 100, 0), +(639130, 21, 627.374, -1321.59, 106.257, NULL, 0, 0, 0, 100, 0), +(639130, 22, 634.783, -1271.27, 121.478, NULL, 0, 0, 0, 100, 0), +(639130, 23, 633.98, -1228.57, 137.007, NULL, 0, 0, 0, 100, 0), +(639130, 24, 629.947, -1191.76, 145.328, NULL, 0, 0, 0, 100, 0), +(639130, 25, 631.939, -1148.87, 155.504, NULL, 0, 0, 0, 100, 0), +(639130, 26, 627.116, -1131.07, 159.662, NULL, 0, 0, 0, 100, 0), +(639130, 27, 620.092, -1114.7, 160.189, NULL, 0, 0, 0, 100, 0), +(639130, 28, 622.218, -1054.98, 163.22, NULL, 0, 0, 0, 100, 0), +(639130, 29, 634.789, -1041.15, 163.826, NULL, 0, 0, 0, 100, 0), +(639130, 30, 653.802, -1032.34, 163.225, NULL, 0, 0, 0, 100, 0); diff --git a/data/sql/updates/db_world/2023_10_08_00.sql b/data/sql/updates/db_world/2023_10_08_00.sql new file mode 100644 index 000000000..c5717a04a --- /dev/null +++ b/data/sql/updates/db_world/2023_10_08_00.sql @@ -0,0 +1,4 @@ +-- DB update 2023_10_07_02 -> 2023_10_08_00 +-- +DELETE FROM `command` WHERE `name`='commentator'; +INSERT INTO `command` (`name`, `security`, `help`) VALUES ('commentator', 2, 'Syntax: .commentator [on/off]\r\n\r\nEnable or Disable in game Commentator tag or show current state if on/off not provided.'); diff --git a/data/sql/updates/db_world/2023_10_08_01.sql b/data/sql/updates/db_world/2023_10_08_01.sql new file mode 100644 index 000000000..4b238a56e --- /dev/null +++ b/data/sql/updates/db_world/2023_10_08_01.sql @@ -0,0 +1,77 @@ +-- DB update 2023_10_08_00 -> 2023_10_08_01 +-- Blackrock Depths - Dark Iron Deposit(s) +DELETE FROM `gameobject` WHERE `id` = 165658 AND `map` = 230; +DELETE FROM `pool_template` WHERE `entry` BETWEEN 11700 AND 11705; +DELETE FROM `pool_gameobject` WHERE `pool_entry` BETWEEN 11700 AND 11705 AND `guid` BETWEEN 10601 and 10626; + +INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(10601, 165658, 230, 0, 0, 1, 1, 884.448, -410.508, -48.2044, 4.34587, 0, 0, -0.824126, 0.566406, 604800, 100, 1), +(10602, 165658, 230, 0, 0, 1, 1, 1215.01, -384.236, -98.9694, 1.79769, 0, 0, 0.782608, 0.622515, 604800, 100, 1), +(10603, 165658, 230, 0, 0, 1, 1, 418.63, -158.696, -63.1528, 0.226893, 0, 0, 0.113203, 0.993572, 604800, 100, 1), +(10604, 165658, 230, 0, 0, 1, 1, 980.556, -419.592, -59.3434, 4.4855, 0, 0, -0.782608, 0.622515, 604800, 100, 1), +(10605, 165658, 230, 0, 0, 1, 1, 756.207, 158.727, -72.2169, -1.23918, 0, 0, -0.580703, 0.814116, 604800, 100, 1), +(10606, 165658, 230, 0, 0, 1, 1, 640.727, 28.869, -74.0452, 1.8675, 0, 0, 0.803857, 0.594823, 604800, 100, 1), +(10607, 165658, 230, 0, 0, 1, 1, 1002.0756, -395.6539, -64.0793, 0.15708, 0, 0, 0.0784591, 0.996917, 604800, 100, 1), +(10608, 165658, 230, 0, 0, 1, 1, 646.092, 193.607, -72.1246, 0.523598, 0, 0, 0.258819, 0.965926, 604800, 100, 1), +(10609, 165658, 230, 0, 0, 1, 1, 670.734, -201.308, -78.1551, 3.75246, 0, 0, -0.953716, 0.300708, 604800, 100, 1), +(10610, 165658, 230, 0, 0, 1, 1, 673.099, -21.6642, -73.7605, 2.74016, 0, 0, 0.979924, 0.19937, 604800, 100, 1), +(10611, 165658, 230, 0, 0, 1, 1, 313.624, -211.422, -77.3546, -0.663223, 0, 0, -0.325567, 0.945519, 604800, 100, 1), +(10612, 165658, 230, 0, 0, 1, 1, 1014.22, -356.364, -65.7033, 1.13446, 0, 0, 0.537299, 0.843392, 604800, 100, 1), +(10613, 165658, 230, 0, 0, 1, 1, 637.928, -162.775, -70.9528, -2.75761, 0, 0, -0.981627, 0.190812, 604800, 100, 1), +(10614, 165658, 230, 0, 0, 1, 1, 545.169, -128.195, -60.3184, -1.72788, 0, 0, 0.760406, -0.649448, 604800, 100, 1), +(10615, 165658, 230, 0, 0, 1, 1, 977.641, -316.468, -70.6036, 1.79769, 0, 0, 0.782608, 0.622515, 604800, 100, 1), +(10616, 165658, 230, 0, 0, 1, 1, 636.57, -274.759, -83.7882, 4.01426, 0, 0, -0.906307, 0.422619, 604800, 100, 1), +(10617, 165658, 230, 0, 0, 1, 1, 679.721, 102.181, -73.2564, -1.18682, 0, 0, 0.559193, -0.829037, 604800, 100, 1), +(10618, 165658, 230, 0, 0, 1, 1, 634.768, -56.406, -73.6264, 2.96704, 0, 0, 0.996194, 0.087165, 604800, 100, 1), +(10619, 165658, 230, 0, 0, 1, 1, 327.184, -58.5715, -71.3615, 0.715585, 0, 0, 0.350207, 0.936672, 604800, 100, 1), +(10620, 165658, 230, 0, 0, 1, 1, 1204.1, -350.158, -93.6315, 0.59341, 0, 0, 0.292371, 0.956305, 604800, 100, 1), +(10621, 165658, 230, 0, 0, 1, 1, 918.903, -447.008, -53.8907, 0.261798, 0, 0, 0.130526, 0.991445, 604800, 100, 1), +(10622, 165658, 230, 0, 0, 1, 1, 748.476, -53.7894, -71.278, 2.96706, 0, 0, 0.996195, 0.0871558, 604800, 100, 1), +(10623, 165658, 230, 0, 0, 1, 1, 291.891, -122.786, -69.1713, 1.41372, 0, 0, 0.649447, 0.760406, 604800, 100, 1), +(10624, 165658, 230, 0, 0, 1, 1, 503.193, -190.118, -59.3156, -0.401426, 0, 0, 0.199368, -0.979925, 604800, 100, 1), +(10625, 165658, 230, 0, 0, 1, 1, 643.342, 144.62, -73.8284, 0.523598, 0, 0, 0.258819, 0.965926, 604800, 100, 1), +(10626, 165658, 230, 0, 0, 1, 1, 964.466, -436.64, -54.6864, 5.96903, 0, 0, -0.156434, 0.987688, 604800, 100, 1); + +SET +@Bridge = 11700, +@Prison = 11701, +@Arena = 11702, +@Gar = 11703, +@Highway = 11704, +@City = 11705; + +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(@Bridge, 1, 'BRD - Dark Iron Deposit - Bridge'), +(@Prison, 1, 'BRD - Dark Iron Deposit - Prison'), +(@Arena, 1, 'BRD - Dark Iron Deposit - Arena'), +(@Gar, 1, 'BRD - Dark Iron Deposit - Gar'), +(@Highway, 1, 'BRD - Dark Iron Deposit - Highway'), +(@City, 1, 'BRD - Dark Iron Deposit - City'); + +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(10602, @Bridge, 0, 'Dark Iron Deposit - Bridge'), +(10620, @Bridge, 0, 'Dark Iron Deposit - Bridge'), +(10619, @Prison, 0, 'Dark Iron Deposit - Prison'), +(10623, @Prison, 0, 'Dark Iron Deposit - Prison'), +(10611, @Prison, 0, 'Dark Iron Deposit - Prison'), +(10603, @Prison, 0, 'Dark Iron Deposit - Prison'), +(10624, @Arena, 0, 'Dark Iron Deposit - Arena'), +(10616, @Arena, 0, 'Dark Iron Deposit - Arena'), +(10609, @Arena, 0, 'Dark Iron Deposit - Arena'), +(10613, @Arena, 0, 'Dark Iron Deposit - Arena'), +(10614, @Arena, 0, 'Dark Iron Deposit - Arena'), +(10608, @Gar, 0, 'Dark Iron Deposit - Gar'), +(10625, @Gar, 0, 'Dark Iron Deposit - Gar'), +(10617, @Gar, 0, 'Dark Iron Deposit - Gar'), +(10605, @Gar, 0, 'Dark Iron Deposit - Gar'), +(10606, @Highway, 0, 'Dark Iron Deposit - Highway'), +(10610, @Highway, 0, 'Dark Iron Deposit - Highway'), +(10618, @Highway, 0, 'Dark Iron Deposit - Highway'), +(10622, @Highway, 0, 'Dark Iron Deposit - Highway'), +(10615, @City, 0, 'Dark Iron Deposit - City'), +(10612, @City, 0, 'Dark Iron Deposit - City'), +(10607, @City, 0, 'Dark Iron Deposit - City'), +(10604, @City, 0, 'Dark Iron Deposit - City'), +(10626, @City, 0, 'Dark Iron Deposit - City'), +(10621, @City, 0, 'Dark Iron Deposit - City'), +(10601, @City, 0, 'Dark Iron Deposit - City'); diff --git a/data/sql/updates/db_world/2023_10_08_02.sql b/data/sql/updates/db_world/2023_10_08_02.sql new file mode 100644 index 000000000..6ac627e48 --- /dev/null +++ b/data/sql/updates/db_world/2023_10_08_02.sql @@ -0,0 +1,3 @@ +-- DB update 2023_10_08_01 -> 2023_10_08_02 +-- Ghostweave Patterns +DELETE FROM `reference_loot_template` WHERE `Entry` IN (24708,24709) AND `Item` IN (14495,14480,14473,14477); diff --git a/data/sql/updates/db_world/2023_10_08_03.sql b/data/sql/updates/db_world/2023_10_08_03.sql new file mode 100644 index 000000000..d9c55b360 --- /dev/null +++ b/data/sql/updates/db_world/2023_10_08_03.sql @@ -0,0 +1,19 @@ +-- DB update 2023_10_08_02 -> 2023_10_08_03 +-- "Dirty" Michael Crowe +DELETE FROM `waypoint_data` WHERE `id`=306490; +DELETE FROM `waypoint_scripts` WHERE `id`=23; +DELETE FROM `creature_addon` WHERE `guid` = 30649; +UPDATE `creature` SET `MovementType` = 0 WHERE `id1` = 23896 AND `guid` = 30649; + +DELETE FROM `creature_template_addon` WHERE (`entry` = 23896); +INSERT INTO `creature_template_addon` (`entry`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `visibilityDistanceType`, `auras`) VALUES +(23896, 0, 0, 0, 1, 0, 0, ''); + +DELETE FROM `creature_text` WHERE `CreatureID`=23896; +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(23896, 0, 0, 'You might wanna stand back. Fish guttin\' is a dirty job.', 12, 0, 100, 1, 0, 0, 22392, 0, '"Dirty" Michael Crowe'); + +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 23896; +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 23896); +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 +(23896, 0, 0, 0, 1, 0, 100, 0, 60000, 120000, 60000, 120000, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, '"Dirty" Michael Crowe - Out of Combat - Say Line 0'); diff --git a/data/sql/updates/db_world/2023_10_08_04.sql b/data/sql/updates/db_world/2023_10_08_04.sql new file mode 100644 index 000000000..4a672363a --- /dev/null +++ b/data/sql/updates/db_world/2023_10_08_04.sql @@ -0,0 +1,18 @@ +-- DB update 2023_10_08_03 -> 2023_10_08_04 +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (1561,3643) AND `source_type` = 1; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +-- Sealed Crate +(1561, 1, 0, 0, 19, 0, 100, 0, 74, 0, 0, 0, 0, 0, 12, 2044, 1, 30000, 0, 0, 0, 8, 0, 0, 0, 0, -8841.93, 985.171, 98.6999, 6.00926, 'Sealed Crate - On Quest \'The Legend of Stalvan\' Taken - Summon Creature \'Forlorn Spirit\''), +-- Old Footlocker +(3643, 1, 0, 0, 20, 0, 100, 0, 67, 0, 0, 0, 0, 0, 12, 2044, 2, 30000, 0, 0, 0, 8, 0, 0, 0, 0, -10951.4, 1568.86, 46.9779, 3.75142, 'Old Footlocker - On Quest \'The Legend of Stalvan\' Finished - Summon Creature \'Forlorn Spirit\''); + +-- Forlorn Spirit +DELETE FROM `smart_scripts` WHERE `entryorguid` = 2044 AND `source_type` = 0; +DELETE FROM `smart_scripts` WHERE `entryorguid` = 204400 AND `source_type` = 9; + +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `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 +(2044, 0, 0, 0, 11, 0, 100, 0, 0, 0, 0, 0, 0, 0, 80, 204400, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Forlorn Spirit - On Respawn - Run Script'), +(2044, 0, 1, 0, 0, 0, 100, 0, 2000, 2000, 2000, 2000, 0, 0, 11, 3105, 32, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Forlorn Spirit - In Combat - Cast \'Curse of Stalvan\''), +(2044, 0, 2, 0, 0, 0, 100, 0, 10000, 15000, 18500, 27000, 0, 0, 11, 118, 32, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 'Forlorn Spirit - In Combat - Cast \'Polymorph\' (Skip Tank)'), +(204400, 9, 0, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 21, 15, 0, 0, 0, 0, 0, 0, 0, 'Forlorn Spirit - Actionlist - Say Line 0'), +(204400, 9, 1, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 21, 15, 0, 0, 0, 0, 0, 0, 0, 'Forlorn Spirit - Actionlist - Start Attacking'); diff --git a/data/sql/updates/db_world/2023_10_08_05.sql b/data/sql/updates/db_world/2023_10_08_05.sql new file mode 100644 index 000000000..676521823 --- /dev/null +++ b/data/sql/updates/db_world/2023_10_08_05.sql @@ -0,0 +1,9 @@ +-- DB update 2023_10_08_04 -> 2023_10_08_05 +-- Terrorclaw +DELETE FROM `creature_template_addon` WHERE (`entry` = 20477); +INSERT INTO `creature_template_addon` (`entry`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `visibilityDistanceType`, `auras`) VALUES +(20477, 0, 0, 0, 0, 0, 0, '35408'); + +DELETE FROM `smart_scripts` WHERE `source_type` = 0 AND `entryorguid` = 20477; +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 +(20477, 0, 0, 0, 0, 0, 100, 0, 2000, 2000, 5000, 9000, 0, 0, 11, 40504, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Terrorclaw - In Combat - Cast \'Cleave\''); diff --git a/data/sql/updates/db_world/2023_10_08_06.sql b/data/sql/updates/db_world/2023_10_08_06.sql new file mode 100644 index 000000000..469665ba9 --- /dev/null +++ b/data/sql/updates/db_world/2023_10_08_06.sql @@ -0,0 +1,10 @@ +-- DB update 2023_10_08_05 -> 2023_10_08_06 +-- Pamela's Doll +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 10926; + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 10926); +DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 1092600); +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 +(10926, 0, 0, 0, 20, 0, 100, 0, 5149, 0, 0, 0, 0, 0, 80, 1092600, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Pamela Redpath - On Quest \'Pamela\'s Doll\' Finished - Run Script'), +(1092600, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Pamela Redpath - Actionlist - Say Line 4'), +(1092600, 9, 1, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 0, 0, 1, 5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Pamela Redpath - Actionlist - Say Line 5'); diff --git a/data/sql/updates/db_world/2023_10_08_07.sql b/data/sql/updates/db_world/2023_10_08_07.sql new file mode 100644 index 000000000..786453f9b --- /dev/null +++ b/data/sql/updates/db_world/2023_10_08_07.sql @@ -0,0 +1,4 @@ +-- DB update 2023_10_08_06 -> 2023_10_08_07 +-- 64930 - Electrified | Shaman T8 Elemental 4P Bonus +DELETE FROM `spell_script_names` WHERE `spell_id` = 64928; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES (64928, 'spell_sha_t8_electrified'); diff --git a/data/sql/updates/db_world/2023_10_08_08.sql b/data/sql/updates/db_world/2023_10_08_08.sql new file mode 100644 index 000000000..bc9f01ec5 --- /dev/null +++ b/data/sql/updates/db_world/2023_10_08_08.sql @@ -0,0 +1,8 @@ +-- DB update 2023_10_08_07 -> 2023_10_08_08 +-- Annihilator - Armor Shatter +DELETE FROM `spell_custom_attr` WHERE `spell_id`=16928; +INSERT INTO `spell_custom_attr` (`spell_id`, `attributes`) VALUES (16928, 4194304); + +-- Bashguuder & Bashguuder - Puncture Armor +DELETE FROM `spell_custom_attr` WHERE `spell_id`=17315; +INSERT INTO `spell_custom_attr` (`spell_id`, `attributes`) VALUES (17315, 4194304); diff --git a/data/sql/updates/db_world/2023_10_10_00.sql b/data/sql/updates/db_world/2023_10_10_00.sql new file mode 100644 index 000000000..2050f08cb --- /dev/null +++ b/data/sql/updates/db_world/2023_10_10_00.sql @@ -0,0 +1,14 @@ +-- DB update 2023_10_08_08 -> 2023_10_10_00 +-- Eridan Bluewind +DELETE FROM `smart_scripts` WHERE `entryorguid` = 9116 AND `source_type` = 0 AND `id` = 2; +DELETE FROM `smart_scripts` WHERE `source_type` = 9 AND `entryorguid` = 911600; + +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 +(9116, 0, 2, 0, 19, 0, 100, 0, 4442, 0, 0, 0, 0, 0, 80, 911600, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Eridan Bluewind - On Quest \'Purified!\' Taken - Run Script'), +(911600, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 83, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Eridan Bluewind - On Script - Remove Npc Flags Questgiver'), +(911600, 9, 1, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Eridan Bluewind - On Script - Say Line 0'), +(911600, 9, 2, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 2.59669, 'Eridan Bluewind - On Script - Set Orientation 2,59669'), +(911600, 9, 3, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 0, 0, 11, 28892, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Eridan Bluewind - On Script - Cast \'Nature Channeling\''), +(911600, 9, 4, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 2.72271, 'Eridan Bluewind - On Script - Set Orientation 2,72271'), +(911600, 9, 5, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Eridan Bluewind - On Script - Say Line 1'), +(911600, 9, 6, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 82, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Eridan Bluewind - On Script - Add Npc Flags Questgiver'); diff --git a/data/sql/updates/db_world/2023_10_10_01.sql b/data/sql/updates/db_world/2023_10_10_01.sql new file mode 100644 index 000000000..0fb82308a --- /dev/null +++ b/data/sql/updates/db_world/2023_10_10_01.sql @@ -0,0 +1,6 @@ +-- DB update 2023_10_10_00 -> 2023_10_10_01 +-- Place Draenei Banner +UPDATE `conditions` SET `Comment` = '\'Place Draenei Banner\' - Target only Lord Xiz' WHERE (`SourceTypeOrReferenceId` = 13) AND (`SourceGroup` = 1) AND (`SourceEntry` = 30988) AND (`ConditionTypeOrReference` = 31) AND (`ConditionValue1` = 3) AND (`ConditionValue2` = 17701); +DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 17) AND (`SourceGroup` = 0) AND (`SourceEntry` = 30988) AND (`ConditionTypeOrReference` = 29) AND (`ConditionValue1` = 17701) AND (`ConditionValue2` = 5) AND (`ConditionValue3` = 1); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(17, 0, 30988, 0, 0, 29, 0, 17701, 5, 1, 0, 0, 0, '', 'Allow casting \'Place Draenei Banner\' only if Lord Xiz is within 5 yards and dead.'); diff --git a/data/sql/updates/db_world/2023_10_10_02.sql b/data/sql/updates/db_world/2023_10_10_02.sql new file mode 100644 index 000000000..8316f204d --- /dev/null +++ b/data/sql/updates/db_world/2023_10_10_02.sql @@ -0,0 +1,3 @@ +-- DB update 2023_10_10_01 -> 2023_10_10_02 +-- Ores and Herbs should be visible in visible in all phases +UPDATE `gameobject` SET `phaseMask`='255' WHERE `id` IN(1617,1618,1619,3724,3725,3726,1620,1621,3727,3729,1622,1623,1624,2045,3730,2041,2046,1628,2044,2041,2043,176636,176642,142140,142141,142142,142143,142144,180165,183046,180164,176641,176640,176639,176638,176637,142145,176583,176584,176586,176587,176588,176589,180166,180167, 180168,183043,183044,183045,181270,181271,181275,181276,181277,181278,183385,181279,181282,181281,189973,190169,190173,190175,190174,190170,190172,191019,190171,190176,1731,181248,103713,2055,3763,1732,3764,103711,181249,2054,1733,1735,105569,73939,1734,2040,123310,150079,150080,176645,181109,2047,123309,150081,150082,181108,176643,123848,175404,181555,181556,181557,181569,181570,189978,189979,189980,189981,191133) AND `map` IN(0,1,530,571); diff --git a/data/sql/updates/db_world/2023_10_10_03.sql b/data/sql/updates/db_world/2023_10_10_03.sql new file mode 100644 index 000000000..d1e031eca --- /dev/null +++ b/data/sql/updates/db_world/2023_10_10_03.sql @@ -0,0 +1,29 @@ +-- DB update 2023_10_10_02 -> 2023_10_10_03 +-- J.D. Collie +UPDATE `smart_scripts` SET `comment` = 'J.D. Collie - On Quest \'Making Sense of It\' Taken - Run Script' WHERE `entryorguid` = 9117 AND `source_type` = 0 AND `id` = 0; + +DELETE FROM `smart_scripts` WHERE `entryorguid`=9117 AND `source_type`=0 AND `id` IN (2,3,4); +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (911701,911702,911703) AND `source_type`=9; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `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 +(9117, 0, 2, 0, 20, 0, 100, 0, 3941, 0, 0, 0, 0, 0, 80, 911701, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'J.D. Collie - On Quest \'A Gnome\'s Assistance\' Finished - Run Script'), +(9117, 0, 3, 0, 40, 0, 100, 0, 1, 911700, 0, 0, 0, 0, 80, 911702, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'J.D. Collie - On Waypoint 1 Reached - Run Script'), +(9117, 0, 4, 0, 40, 0, 100, 0, 2, 911700, 0, 0, 0, 0, 80, 911703, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'J.D. Collie - On Waypoint 2 Reached - Run Script'), +(911701, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 83, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'J.D. Collie - On Script - Remove Npc Flag Questgiver & Gossip'), +(911701, 9, 1, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 0, 0, 1, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'J.D. Collie - On Script - Say Line 8'), +(911701, 9, 2, 0, 0, 0, 100, 0, 4000, 4000, 0, 0, 0, 0, 53, 1, 911700, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'J.D. Collie - On Script - Start Waypoint'), +(911702, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 54, 16000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'J.D. Collie - On Script - Pause Waypoint'), +(911702, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 5.86, 'J.D. Collie - Actionlist - Set Orientation'), +(911702, 9, 2, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 0, 0, 1, 9, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'J.D. Collie - On Script - Say Line 9'), +(911702, 9, 3, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 0, 0, 1, 4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'J.D. Collie - On Script - Say Line 4'), +(911702, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 32990, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'J.D. Collie - On Script - Cast \'Enchanting Cast Visual\''), +(911702, 9, 5, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 0, 0, 1, 5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'J.D. Collie - On Script - Say Line 5'), +(911702, 9, 6, 0, 0, 0, 100, 0, 4000, 4000, 0, 0, 0, 0, 1, 6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'J.D. Collie - On Script - Say Line 6'), +(911702, 9, 7, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 0, 0, 1, 7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'J.D. Collie - On Script - Say Line 7'), +(911703, 9, 0, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0.872665, 'J.D. Collie - On Script - Set Orientation'), +(911703, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 82, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'J.D. Collie - On Script - Add Npc Flag Questgiver & Gossip'), +(911703, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'J.D. Collie - On Script - Say Line 3'); + +DELETE FROM `waypoints` WHERE `entry`=911700; +INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `point_comment`) VALUES +(911700, 1, -6027.85, -1020.16, -217.056, NULL, 0, ''), +(911700, 2, -6033.25, -1017.56, -217.055, NULL, 0, ''); diff --git a/data/sql/updates/db_world/2023_10_10_04.sql b/data/sql/updates/db_world/2023_10_10_04.sql new file mode 100644 index 000000000..395a7b001 --- /dev/null +++ b/data/sql/updates/db_world/2023_10_10_04.sql @@ -0,0 +1,3 @@ +-- DB update 2023_10_10_03 -> 2023_10_10_04 +-- Shellfish +UPDATE `gameobject_loot_template` SET `MaxCount` = 2 WHERE `Entry` = 13944 and `Item` = 13545; diff --git a/data/sql/updates/db_world/2023_10_10_05.sql b/data/sql/updates/db_world/2023_10_10_05.sql new file mode 100644 index 000000000..54698aa70 --- /dev/null +++ b/data/sql/updates/db_world/2023_10_10_05.sql @@ -0,0 +1,3 @@ +-- DB update 2023_10_10_04 -> 2023_10_10_05 +-- Hex Lord Malacrass +UPDATE `creature_template_addon` SET `bytes2` = 1 WHERE `entry` = 24239; diff --git a/data/sql/updates/db_world/2023_10_10_06.sql b/data/sql/updates/db_world/2023_10_10_06.sql new file mode 100644 index 000000000..0664c1f96 --- /dev/null +++ b/data/sql/updates/db_world/2023_10_10_06.sql @@ -0,0 +1,71 @@ +-- DB update 2023_10_10_05 -> 2023_10_10_06 +-- Quest: Cuergo's Gold +UPDATE `gameobject_template` SET `AIName` = 'SmartGameObjectAI', `ScriptName` = '' WHERE `entry` = 142189; + +DELETE FROM `smart_scripts` WHERE (`source_type` = 1 AND `entryorguid` = 142189); +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 +(142189, 1, 0, 0, 70, 0, 100, 0, 2, 0, 0, 0, 0, 0, 80, 14218900, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Inconspicuous Landmark - On Gameobject State Changed - Run Script'); + +DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 14218900); +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 +(14218900, 9, 0, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 0, 0, 50, 142194, 300, 0, 0, 0, 0, 1, 0, 0, 0, 0, -2, -3, 0, 0, 'Inconspicuous Landmark - Actionlist - Summon Gameobject \'Pirate\'s Treasure!\''), +(14218900, 9, 1, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 0, 0, 12, 7898, 3, 5000, 0, 0, 0, 1, 0, 0, 0, 0, -2, -3, 0, 0, 'Inconspicuous Landmark - Actionlist - Summon Creature \'Pirate treasure trigger mob\''); + +DELETE FROM `gameobject` WHERE `id` = 142189; +INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `ScriptName`, `VerifiedBuild`, `Comment`) VALUES +(17231, 142189, 1, 0, 0, 1, 1, -10249.2, -3981.8, 1.66783, -0.750491, 0, 0, -0.366501, 0.930418, 600, 100, 1, '', NULL, NULL), +(17232, 142189, 1, 0, 0, 1, 1, -10119.7, -4052.46, 5.33005, -0.366519, 0, 0, -0.182235, 0.983255, 600, 100, 1, '', NULL, NULL), +(17233, 142189, 1, 0, 0, 1, 1, -10050.8, -3717.16, 5.44262, 2.65289, 0, 0, 0.970295, 0.241925, 600, 100, 1, '', NULL, NULL), +(17234, 142189, 1, 0, 0, 1, 1, -10154.2, -3948.64, 7.74473, 2.65289, 0, 0, 0, 0, 600, 100, 1, '', NULL, NULL), +(17235, 142189, 1, 0, 0, 1, 1, -10285.8, -3881.83, 1.07085, -2.26893, 0, 0, -0.906307, 0.422619, 600, 100, 1, '', NULL, NULL), +(17236, 142189, 1, 0, 0, 1, 1, -10217, -3817.65, 1.35298, 2.65289, 0, 0, 0.970295, 0.241925, 600, 100, 1, '', NULL, NULL); + +DELETE FROM `pool_template` WHERE `entry` IN (355,112); +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES (112, 1, 'Tanaris - Inconspicuous Landmark Pool'); + +DELETE FROM `pool_gameobject` WHERE `pool_entry` IN (355,112); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(17231, 112, 0, 'Inconspicuous Landmark'), +(17232, 112, 0, 'Inconspicuous Landmark'), +(17233, 112, 0, 'Inconspicuous Landmark'), +(17234, 112, 0, 'Inconspicuous Landmark'), +(17235, 112, 0, 'Inconspicuous Landmark'), +(17236, 112, 0, 'Inconspicuous Landmark'); + +-- Pirate treasure trigger mob +UPDATE `creature_template` SET `flags_extra` = `flags_extra`|128 WHERE `entry` = 7898; +DELETE FROM `smart_scripts` WHERE (`entryorguid` = 7898) AND (`source_type` = 0); +DELETE FROM `smart_scripts` WHERE (`entryorguid` = 789800) AND (`source_type` = 9); + +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `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 +(7898, 0, 0, 1, 54, 0, 100, 0, 0, 0, 0, 0, 0, 0, 12, 7899, 1, 300000, 0, 0, 0, 202, 25, 2, 1, 0, 0, 0, 0, 0, 'Pirate treasure trigger mob - On Just Summoned - Summon Creature \'Treasure Hunting Pirate\''), +(7898, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 12, 7902, 1, 300000, 0, 0, 0, 202, 25, 2, 1, 0, 0, 0, 0, 0, 'Pirate treasure trigger mob - On Just Summoned - Summon Creature \'Treasure Hunting Buccaneer\''), +(7898, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 12, 7901, 1, 300000, 0, 0, 0, 202, 25, 1, 1, 0, 0, 0, 0, 0, 'Pirate treasure trigger mob - On Just Summoned - Summon Creature \'Treasure Hunting Swashbuckler\''); + +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (7899,7901,7902); +DELETE FROM `smart_scripts` WHERE `source_type` = 0 AND `entryorguid` IN (7899,7901,7902); +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 +-- Treasure Hunting Pirate +(7899, 0, 0, 0, 54, 0, 100, 0, 0, 0, 0, 0, 0, 0, 69, 0, 0, 1, 3, 0, 0, 20, 142194, 0, 0, 0, 0, 0, 0, 0, 'Treasure Hunting Pirate - On Just Summoned - Move To Closest Creature \'Pirate\'s Treasure!\''), +(7899, 0, 1, 0, 34, 0, 100, 0, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Treasure Hunting Pirate - On Reached Point 0 - Say Line 0'), +(7899, 0, 2, 0, 0, 0, 100, 0, 3000, 7000, 8200, 18100, 0, 0, 11, 11976, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Treasure Hunting Pirate - In Combat - Cast \'Strike\''), +-- Treasure Hunting Swashbuckler +(7901, 0, 0, 0, 54, 0, 100, 0, 0, 0, 0, 0, 0, 0, 69, 0, 0, 1, 3, 0, 0, 20, 142194, 0, 0, 0, 0, 0, 0, 0, 'Treasure Hunting Swashbuckler - On Just Summoned - Move To Closest Creature \'Pirate\'s Treasure!\''), +(7901, 0, 1, 0, 34, 0, 100, 0, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Treasure Hunting Swashbuckler - On Reached Point 0 - Say Line 0'), +(7901, 0, 2, 0, 0, 0, 100, 0, 10200, 23100, 21900, 28400, 0, 0, 11, 6713, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Treasure Hunting Swashbuckler - In Combat - Cast \'Disarm\''), +-- Treasure Hunting Buccaneer +(7902, 0, 0, 0, 54, 0, 100, 0, 0, 0, 0, 0, 0, 0, 69, 0, 0, 1, 3, 0, 0, 20, 142194, 0, 0, 0, 0, 0, 0, 0, 'Treasure Hunting Buccaneer - On Just Summoned - Move To Closest Creature \'Pirate\'s Treasure!\''), +(7902, 0, 1, 0, 34, 0, 100, 0, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Treasure Hunting Buccaneer - On Reached Point 0 - Say Line 0'), +(7902, 0, 2, 0, 0, 0, 100, 0, 3000, 7000, 8200, 18100, 0, 0, 11, 11976, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Treasure Hunting Buccaneer - In Combat - Cast \'Strike\''); + +DELETE FROM `creature_text` WHERE `CreatureID` IN (7899,7901,7902); +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(7899,0,0,'Hey! Get away from our treasure!',12,0,100,0,0,0,3931,0,'Treasure Hunting Pirate'), +(7899,0,1,'That\'s our treasure, you lubber!',12,0,100,0,0,0,3931,0,'Treasure Hunting Pirate'), +(7899,0,2,'We didn\'t hide this stuff just you could steal it!',12,0,100,0,0,0,3931,0,'Treasure Hunting Pirate'), +(7901,0,0,'Hey! Get away from our treasure!',12,0,100,0,0,0,3931,0,'Treasure Hunting Swashbuckler'), +(7901,0,1,'That\'s our treasure, you lubber!',12,0,100,0,0,0,3931,0,'Treasure Hunting Swashbuckler'), +(7901,0,2,'We didn\'t hide this stuff just you could steal it!',12,0,100,0,0,0,3931,0,'Treasure Hunting Swashbuckler'), +(7902,0,0,'Hey! Get away from our treasure!',12,0,100,0,0,0,3931,0,'Treasure Hunting Buccaneer'), +(7902,0,1,'That\'s our treasure, you lubber!',12,0,100,0,0,0,3931,0,'Treasure Hunting Buccaneer'), +(7902,0,2,'We didn\'t hide this stuff just you could steal it!',12,0,100,0,0,0,3931,0,'Treasure Hunting Buccaneer'); diff --git a/data/sql/updates/db_world/2023_10_10_07.sql b/data/sql/updates/db_world/2023_10_10_07.sql new file mode 100644 index 000000000..6e6bb450f --- /dev/null +++ b/data/sql/updates/db_world/2023_10_10_07.sql @@ -0,0 +1,18 @@ +-- DB update 2023_10_10_06 -> 2023_10_10_07 +-- Change from 150 minutes to 5 +UPDATE `event_scripts` SET `datalong2` = 300000 WHERE `id` = 3084 AND `command` = 10; + +DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 17) AND (`SourceGroup` = 0) AND (`SourceEntry` = 12283); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(17, 0, 12283, 0, 0, 29, 0, 8392, 20, 0, 1, 0, 0, '', 'Allow using Standard Issue Flare Gun only if no Pilot Xiggs Fuselighter is within 20 yards.'); + +-- Pilot Xiggs Fuselighter +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 8392; + +DELETE FROM `smart_scripts` WHERE (`entryorguid` = 8392) AND (`source_type` = 0); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(8392, 0, 0, 0, 54, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Pilot Xiggs Fuselighter - On Just Summoned - Say Line 0'); + +DELETE FROM `creature_text` WHERE `CreatureID`=8392; +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(8392, 0, 1, 'Been waitin\' for ya, $n. Glad to see you\'ve come through. Do you have the shipment?', 12, 7, 100, 3, 0, 0, 4406, 0, 'Pilot Xiggs Fuselighter - Greet on summon'); diff --git a/data/sql/updates/db_world/2023_10_10_08.sql b/data/sql/updates/db_world/2023_10_10_08.sql new file mode 100644 index 000000000..0c1ce794e --- /dev/null +++ b/data/sql/updates/db_world/2023_10_10_08.sql @@ -0,0 +1,4 @@ +-- DB update 2023_10_10_07 -> 2023_10_10_08 +-- Plague Wagon Empty +DELETE FROM `gameobject` WHERE `guid`=242285; +DELETE FROM `game_event_gameobject` WHERE `guid`=242285; diff --git a/data/sql/updates/db_world/2023_10_10_09.sql b/data/sql/updates/db_world/2023_10_10_09.sql new file mode 100644 index 000000000..eb015e305 --- /dev/null +++ b/data/sql/updates/db_world/2023_10_10_09.sql @@ -0,0 +1,26 @@ +-- DB update 2023_10_10_08 -> 2023_10_10_09 +-- +DELETE FROM `gameobject` WHERE `guid` IN (9266,9268,9270,9272,9273,9274); +INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `ScriptName`, `VerifiedBuild`, `Comment`) VALUES +(9266, 2040, 1, 405, 598, 1, 1, -1774, 2968.79, 37.432, 4.232, 0, 0, 0, 0, 2700, 100, 1, '', 0, NULL), +(9268, 2040, 1, 405, 598, 1, 1, -1778, 2997.54, 35.715, 4.76, 0, 0, 0, 0, 2700, 100, 1, '', 0, NULL), +(9270, 2040, 1, 405, 598, 1, 1, -1765, 2986.9, 40.316, 5.803, 0, 0, 0, 0, 2700, 100, 1, '', 0, NULL), +(9272, 1735, 1, 405, 598, 1, 1, -1774, 2968.79, 37.432, 4.232, 0, 0, 0, 0, 2700, 100, 1, '', 0, NULL), +(9273, 1735, 1, 405, 598, 1, 1, -1778, 2997.54, 35.715, 4.76, 0, 0, 0, 0, 2700, 100, 1, '', 0, NULL), +(9274, 1735, 1, 405, 598, 1, 1, -1765, 2986.9, 40.316, 5.803, 0, 0, 0, 0, 2700, 100, 1, '', 0, NULL); + +DELETE FROM `pool_template` WHERE `entry` = 11699; +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(11699, 1, 'Desolace Mithril Deposit Pool'); + +DELETE FROM `pool_gameobject` WHERE `guid` IN (9256,9257,9258,9266,9268,9270,9272,9273,9274); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(9256, 11699, 3.3, 'Spawn Point 1 - Truesilver'), +(9266, 11699, 0, 'Spawn Point 1 - Mithril'), +(9272, 11699, 8.3, 'Spawn Point 1 - Iron'), +(9257, 11699, 3.3, 'Spawn Point 2 - Truesilver'), +(9268, 11699, 0, 'Spawn Point 2 - Mithril'), +(9273, 11699, 8.3, 'Spawn Point 2 - Iron'), +(9258, 11699, 3.3, 'Spawn Point 3 - Truesilver'), +(9270, 11699, 0, 'Spawn Point 3 - Mithril'), +(9274, 11699, 8.3, 'Spawn Point 3 - Iron'); diff --git a/data/sql/updates/db_world/2023_10_10_10.sql b/data/sql/updates/db_world/2023_10_10_10.sql new file mode 100644 index 000000000..13b813901 --- /dev/null +++ b/data/sql/updates/db_world/2023_10_10_10.sql @@ -0,0 +1,9 @@ +-- DB update 2023_10_10_09 -> 2023_10_10_10 +-- Mrs. Dalson's Diary +DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 1) AND (`SourceGroup` = 10816) AND (`SourceEntry` = 12738); +DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 14) AND (`SourceGroup` = 3001) AND (`SourceEntry` = 3694); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(1, 10816, 12738, 0, 0, 8, 0, 5058, 0, 0, 0, 0, 0, '', 'Drop Dalson Outhouse Key from Wandering Skeletons only if quest Mrs. Dalson\'s Diary has been rewarded.'), +(14, 3001, 3694, 0, 0, 8, 0, 5058, 0, 0, 0, 0, 0, '', 'Show Mrs. Dalson\'s Diary\'s gossip menu only if quest Mrs. Dalson\'s Diary has been rewarded.'); +-- Repeatable flag (also messes with condition quest_rewarded for some reason) +UPDATE `quest_template_addon` SET `SpecialFlags` = `SpecialFlags`&~1 WHERE (`ID` = 5058); diff --git a/data/sql/updates/db_world/2023_10_10_11.sql b/data/sql/updates/db_world/2023_10_10_11.sql new file mode 100644 index 000000000..33e9e739e --- /dev/null +++ b/data/sql/updates/db_world/2023_10_10_11.sql @@ -0,0 +1,30 @@ +-- DB update 2023_10_10_10 -> 2023_10_10_11 +-- Venomhide Hatchling feed items +DELETE FROM `spell_script_names` WHERE `spell_id` IN (65200,65258,65265,68359,68358,68360); +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(65200, 'spell_item_venomhide_feed'), +(65258, 'spell_item_venomhide_feed'), +(65265, 'spell_item_venomhide_feed'), +(68359, 'spell_item_venomhide_feed'), +(68358, 'spell_item_venomhide_feed'), +(68360, 'spell_item_venomhide_feed'); + +-- Mor'vek +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 11701; + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 11701); +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 +(11701, 0, 0, 0, 20, 0, 100, 0, 13906, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 19, 34320, 10, 0, 0, 0, 0, 0, 0, 'Mor\'vek - On Quest \'They Grow Up So Fast\' Finished - Despawn Closest Venomhide Hatchling'); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 13 AND `SourceGroup` = 1 AND `SourceEntry` IN (65200,65258,65265); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 19 AND `SourceGroup` = 0 AND `ConditionTypeOrReference` = 9 AND `ConditionValue1` = 13906; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(19, 0, 13903, 0, 0, 9, 0, 13906, 0, 0, 0, 0, 0, '', 'Show quest \'Gorishi Grub\' only if on quest \'They Grow Up So Fast\''), +(19, 0, 13917, 0, 0, 9, 0, 13906, 0, 0, 0, 0, 0, '', 'Show quest \'Gorishi Grub\' only if on quest \'They Grow Up So Fast\''), +(19, 0, 13889, 0, 0, 9, 0, 13906, 0, 0, 0, 0, 0, '', 'Show quest \'Hungry, Hungry Hatchling\' only if on quest \'They Grow Up So Fast\''), +(19, 0, 13915, 0, 0, 9, 0, 13906, 0, 0, 0, 0, 0, '', 'Show quest \'Hungry, Hungry Hatchling\' only if on quest \'They Grow Up So Fast\''), +(19, 0, 13904, 0, 0, 9, 0, 13906, 0, 0, 0, 0, 0, '', 'Show quest \'Poached, Scrambled, Or Raw?\' only if on quest \'They Grow Up So Fast\''), +(19, 0, 13916, 0, 0, 9, 0, 13906, 0, 0, 0, 0, 0, '', 'Show quest \'Poached, Scrambled, Or Raw?\' only if on quest \'They Grow Up So Fast\''), +(19, 0, 13905, 0, 0, 9, 0, 13906, 0, 0, 0, 0, 0, '', 'Show quest \'Searing Roc Feathers\' only if on quest \'They Grow Up So Fast\''), +(19, 0, 13914, 0, 0, 9, 0, 13906, 0, 0, 0, 0, 0, '', 'Show quest \'Searing Roc Feathers\' only if on quest \'They Grow Up So Fast\''); diff --git a/data/sql/updates/db_world/2023_10_10_12.sql b/data/sql/updates/db_world/2023_10_10_12.sql new file mode 100644 index 000000000..98ed927da --- /dev/null +++ b/data/sql/updates/db_world/2023_10_10_12.sql @@ -0,0 +1,51 @@ +-- DB update 2023_10_10_11 -> 2023_10_10_12 +-- Witchbane Torch +SET @GUID := 5448; +DELETE FROM `gameobject` WHERE `guid`=@GUID; +INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `ScriptName`, `VerifiedBuild`, `Comment`) VALUES +(@GUID, 186425, 1, 0, 0, 1, 1, -2967.03, -3872.18, 33.0928, 2.24779, 0, 0, -0.90179, -0.432175, -20, 255, 1, '', 0, ''); + +DELETE FROM `event_scripts` WHERE `id`=15452; +INSERT INTO `event_scripts` (`id`, `delay`, `command`, `datalong`, `datalong2`, `dataint`, `x`, `y`, `z`, `o`) VALUES +(15452,0,9,@GUID,20,0,0,0,0,0); + +UPDATE `gameobject_template` SET `AIName` = 'SmartGameObjectAI' WHERE `entry` = 186425; + +DELETE FROM `smart_scripts` WHERE (`source_type` = 1 AND `entryorguid` = 186425); +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 +(186425, 1, 0, 0, 70, 0, 100, 0, 1, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, 4792, 0, 0, 0, 0, 0, 0, 0, 'Witchbane Torch - On Gameobject State Changed - Set Data 1 1 to \'Swamp Eye\' Jarl'); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry` IN (42517,42515); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(13,1,42517,0,0,31,0,3,23869,0,0,0,0,'','Spell \'Beam to Zelfrax\' can only target \'Invis Zelfrax Origin\''), +(13,1,42515,0,0,31,0,3,23868,0,0,0,0,'','Spell \'Jarl Beam\' can only target \'Invis Zelfrax Target\''); + +-- "Swamp Eye" Jarl +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=4792; +DELETE FROM `smart_scripts` WHERE `entryorguid`=4792 AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid`=479200 AND `source_type`=9; + +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `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 +(4792, 0, 0, 0, 38, 0, 100, 0, 1, 1, 0, 0, 0, 0, 80, 479200, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, '\'Swamp Eye\' Jarl - On Data Set 1 1 - Run Script'), +(479200, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 42515, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, '\'Swamp Eye\' Jarl - Actionlist - Cast \'Jarl Beam\''), +(479200, 9, 1, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 0, 0, 86, 42517, 0, 19, 23868, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, '\'Swamp Eye\' Jarl - Actionlist - Cross Cast \'Beam to Zelfrax\''), +(479200, 9, 2, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 0, 0, 12, 23864, 3, 300000, 0, 0, 0, 8, 0, 0, 0, 0, -2984.98, -3853.72, 45.7142, 5.44525, '\'Swamp Eye\' Jarl - Actionlist - Summon Creature \'Zelfrax\''); + +-- Zelfrax +DELETE FROM `waypoints` WHERE `entry` = 23864; +INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `point_comment`) VALUES +(23864, 1, -2965.74, -3873.83, 33.3183, NULL, 0, ''); + +UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' ,`unit_flags` = `unit_flags`&~(768) WHERE `entry` = 23864; +DELETE FROM `smart_scripts` WHERE `entryorguid`=23864 AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (2386400,2386401) AND `source_type`=9; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `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 +(23864, 0, 0, 1, 54, 0, 100, 0, 0, 0, 0, 0, 0, 0, 18, 768, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Zelfrax - On Just Summoned - Set Flags Immune To Players & Immune To NPC\'s'), +(23864, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 80, 2386400, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Zelfrax - On Just Summoned - Run Script'), +(23864, 0, 2, 0, 40, 0, 100, 0, 1, 23864, 0, 0, 0, 0, 80, 2386401, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Zelfrax - On Point 1 of Path 23864 Reached - Run Script'), +(2386400, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Zelfrax - Actionlist - Say Line 0'), +(2386400, 9, 1, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Zelfrax - Actionlist - Say Line 1'), +(2386400, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 53, 1, 23864, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Zelfrax - Actionlist - Start Waypoint Path 23864'), +(2386401, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 101, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Zelfrax - Actionlist - Set Home Position'), +(2386401, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 19, 768, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Zelfrax - Actionlist - Remove Flags Immune To Players & Immune To NPC\'s'), +(2386401, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 21, 30, 0, 0, 0, 0, 0, 0, 0, 'Zelfrax - Actionlist - Start Attacking'); diff --git a/data/sql/updates/db_world/2023_10_10_13.sql b/data/sql/updates/db_world/2023_10_10_13.sql new file mode 100644 index 000000000..a18a9610f --- /dev/null +++ b/data/sql/updates/db_world/2023_10_10_13.sql @@ -0,0 +1,3 @@ +-- DB update 2023_10_10_12 -> 2023_10_10_13 +-- Alliance / Horde Cleric +UPDATE `smart_scripts` SET `event_param5` = 1 WHERE `source_type` = 0 AND `entryorguid` IN (26805,26803) AND `id` IN (0,1); diff --git a/data/sql/updates/db_world/2023_10_10_14.sql b/data/sql/updates/db_world/2023_10_10_14.sql new file mode 100644 index 000000000..a6a6b1833 --- /dev/null +++ b/data/sql/updates/db_world/2023_10_10_14.sql @@ -0,0 +1,6 @@ +-- DB update 2023_10_10_13 -> 2023_10_10_14 +-- Zeppelin Power Core +UPDATE `creature_template_addon` SET `auras` = '42491' WHERE (`entry` = 23832); +UPDATE `creature_template` SET `AIName` = '' WHERE `entry` = 23832; +DELETE FROM `smart_scripts` WHERE (`entryorguid` = 23832) AND (`source_type` = 0); +DELETE FROM `smart_scripts` WHERE (`entryorguid` = 2383200) AND (`source_type` = 9); diff --git a/data/sql/updates/db_world/2023_10_11_00.sql b/data/sql/updates/db_world/2023_10_11_00.sql new file mode 100644 index 000000000..7fc078bdb --- /dev/null +++ b/data/sql/updates/db_world/2023_10_11_00.sql @@ -0,0 +1,4 @@ +-- DB update 2023_10_10_14 -> 2023_10_11_00 +-- Bad Attitude +UPDATE `creature_template` SET `AIName` = '' WHERE `entry` IN (1082,1084,1400,1417); +DELETE FROM `smart_scripts` WHERE `source_type` = 0 AND `entryorguid` IN (1082,1084,1400,1417); diff --git a/data/sql/updates/db_world/2023_10_11_01.sql b/data/sql/updates/db_world/2023_10_11_01.sql new file mode 100644 index 000000000..9486fda66 --- /dev/null +++ b/data/sql/updates/db_world/2023_10_11_01.sql @@ -0,0 +1,6 @@ +-- DB update 2023_10_11_00 -> 2023_10_11_01 +-- Call of the Wild +DELETE FROM `spell_script_names` WHERE `spell_id` IN (-24604,53434); +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(-24604, 'spell_hun_target_self_and_pet'), +(53434, 'spell_hun_target_self_and_pet'); diff --git a/data/sql/updates/db_world/2023_10_12_00.sql b/data/sql/updates/db_world/2023_10_12_00.sql new file mode 100644 index 000000000..7b96b319d --- /dev/null +++ b/data/sql/updates/db_world/2023_10_12_00.sql @@ -0,0 +1,569 @@ +-- DB update 2023_10_11_01 -> 2023_10_12_00 +-- +-- Remove existing Durotar Herbalism Nodes: +DELETE FROM `pool_gameobject` WHERE `pool_entry` BETWEEN 498 AND 501; +DELETE FROM `pool_template` WHERE `entry` BETWEEN 498 AND 501; + +-- Lets work on Mageroyal first. There are 16 Nodes and all have been captured and parsed succesfully into 4 pools (pools are also blizzlike in this case, rest are estimates) +-- Remove Existing Mageroyal: +DELETE FROM `gameobject` where `guid` IN (43887, 43898, 43900, 43901, 43902, 43904, 43897, 43899, 43903, 43905, 43906, 43987, 44064, 44065, 44066); + +-- Insert Durotar Mageroyal from packets: +SET @OGUID := 10601; +DELETE FROM `gameobject` WHERE `guid` BETWEEN @OGUID+0 AND @OGUID+15; +INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `VerifiedBuild`, `Comment`) VALUES +(@OGUID+5, 1620, 1, 14, 0, 1, 255, 933.9453125, -4606.53271484375, 18.46714210510253906, 0.663223206996917724, 0, 0, 0.325567245483398437, 0.945518851280212402, 360, 255, 1, 46779, '6/16 all known Durotar Mageroyal sniffed'), +(@OGUID+1, 1620, 1, 14, 0, 1, 255, 1208.466552734375, -5022.59423828125, 9.973286628723144531, 4.1538848876953125, 0, 0, -0.8746194839477539, 0.484810054302215576, 360, 255, 1, 46779, '2/16 all known Durotar Mageroyal sniffed'), +(@OGUID+14, 1620, 1, 14, 0, 1, 255, 65.1474609375, -4306.45166015625, 62.99754714965820312, 3.316144466400146484, 0, 0, -0.99619388580322265, 0.087165042757987976, 360, 255, 1, 46779, '15/16 all known Durotar Mageroyal sniffed'), +(@OGUID+10, 1620, 1, 14, 0, 1, 255, 816.496826171875, -4099.66064453125, -13.1231689453125, 4.398232460021972656, 0, 0, -0.80901622772216796, 0.587786316871643066, 360, 255, 1, 46779, '11/16 all known Durotar Mageroyal sniffed'), +(@OGUID+4, 1620, 1, 14, 0, 1, 255, 1131.9041748046875, -4685.81005859375, 20.08868789672851562, 4.223697185516357421, 0, 0, -0.85716724395751953, 0.515038192272186279, 360, 255, 1, 46779, '5/16 all known Durotar Mageroyal sniffed'), +(@OGUID+11, 1620, 1, 14, 0, 1, 255, 868.1712646484375, -4209.015625, -13.5084400177001953, 5.35816192626953125, 0, 0, -0.446197509765625, 0.894934535026550292, 360, 255, 1, 46779, '12/16 all known Durotar Mageroyal sniffed'), +(@OGUID+7, 1620, 1, 14, 0, 1, 255, 1001.31341552734375, -4820.7255859375, 16.75281143188476562, 6.09120035171508789, 0, 0, -0.09584522247314453, 0.995396256446838378, 360, 255, 1, 46779, '8/16 all known Durotar Mageroyal sniffed'), +(@OGUID+13, 1620, 1, 14, 0, 1, 255, 12.62858104705810546, -4112.0380859375, 68.98575592041015625, 4.380776405334472656, 0, 0, -0.81411552429199218, 0.580702960491180419, 360, 255, 1, 46779, '14/16 all known Durotar Mageroyal sniffed'), +(@OGUID+6, 1620, 1, 14, 0, 1, 255, 969.2032470703125, -4704.16748046875, 30.33428573608398437, 4.834563255310058593, 0, 0, -0.66261959075927734, 0.748956084251403808, 360, 255, 1, 46779, '7/16 all known Durotar Mageroyal sniffed'), +(@OGUID+3, 1620, 1, 14, 0, 1, 255, 607.72735595703125, -4524.541015625, 11.38043594360351562, 2.251473426818847656, 0, 0, 0.902585029602050781, 0.430511653423309326, 360, 255, 1, 46779, '4/16 all known Durotar Mageroyal sniffed'), +(@OGUID+9, 1620, 1, 14, 0, 1, 255, 962.67132568359375, -4245.0693359375, -8.28712177276611328, 3.298687219619750976, 0, 0, -0.99691677093505859, 0.078466430306434631, 360, 255, 1, 46779, '10/16 all known Durotar Mageroyal sniffed'), +(@OGUID+12, 1620, 1, 14, 0, 1, 255, -157.146484375, -3992.43310546875, 57.29217529296875, 4.660029888153076171, 0, 0, -0.72537422180175781, 0.688354730606079101, 360, 255, 1, 46779, '13/16 all known Durotar Mageroyal sniffed'), +(@OGUID+2, 1620, 1, 14, 0, 1, 255, 763.56890869140625, -5037.0380859375, 7.180908203125, 0.366517573595046997, 0, 0, 0.182234764099121093, 0.98325502872467041, 360, 255, 1, 46779, '3/16 all known Durotar Mageroyal sniffed'), +(@OGUID+8, 1620, 1, 14, 0, 1, 255, 931.2001953125, -4038.233154296875, -13.346710205078125, 3.9793548583984375, 0, 0, -0.9135446548461914, 0.406738430261611938, 360, 255, 1, 46779, '9/16 all known Durotar Mageroyal sniffed'), +(@OGUID+0, 1620, 1, 14, 0, 1, 255, 1450.59326171875, -4902.47802734375, 9.712756156921386718, 3.839725255966186523, 0, 0, -0.93969249725341796, 0.34202045202255249, 360, 255, 1, 46779, '1/16 all known Durotar Mageroyal sniffed'), +(@OGUID+15, 1620, 1, 14, 0, 1, 255, 122.14996337890625, -4474.04931640625, 37.63466262817382812, 2.076939344406127929, 0, 0, 0.861628532409667968, 0.50753939151763916, 360, 255, 1, 46779, '16/16 all known Durotar Mageroyal sniffed'); + +-- Make Mageroyal Pooling: +SET @OBJECTPOOLS :=112; +DELETE FROM `pool_gameobject` WHERE `guid` BETWEEN @OGUID+0 AND @OGUID+15; +DELETE FROM `pool_template` WHERE `entry` BETWEEN @OBJECTPOOLS+0 AND @OBJECTPOOLS+3; + +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(@OBJECTPOOLS+0, 1, 'Durotar Mageroyal A Pool 1/4'); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(@OGUID+0, @OBJECTPOOLS+0, 0, 'Durotar Mageroyal A 1/4'), +(@OGUID+1, @OBJECTPOOLS+0, 0, 'Durotar Mageroyal A 2/4'), +(@OGUID+2, @OBJECTPOOLS+0, 0, 'Durotar Mageroyal A 3/4'), +(@OGUID+3, @OBJECTPOOLS+0, 0, 'Durotar Mageroyal A 4/4'); + +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(@OBJECTPOOLS+1, 1, 'Durotar Mageroyal Razorwind Canyon Pool 2/4'); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(@OGUID+4, @OBJECTPOOLS+1, 0, 'Durotar Mageroyal Razorwind Canyon 1/4'), +(@OGUID+5, @OBJECTPOOLS+1, 0, 'Durotar Mageroyal Razorwind Canyon 2/4'), +(@OGUID+6, @OBJECTPOOLS+1, 0, 'Durotar Mageroyal Razorwind Canyon 3/4'), +(@OGUID+7, @OBJECTPOOLS+1, 0, 'Durotar Mageroyal Razorwind Canyon 4/4'); + +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(@OBJECTPOOLS+2, 1, 'Durotar Mageroyal Thunder Ridge 3/4'); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(@OGUID+8, @OBJECTPOOLS+2, 0, 'Durotar Mageroyal Thunder Ridge 1/4'), +(@OGUID+9, @OBJECTPOOLS+2, 0, 'Durotar Mageroyal Thunder Ridge 2/4'), +(@OGUID+10, @OBJECTPOOLS+2, 0, 'Durotar Mageroyal Thunder Ridge 3/4'), +(@OGUID+11, @OBJECTPOOLS+2, 0, 'Durotar Mageroyal Thunder Ridge 4/4'); + +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(@OBJECTPOOLS+3, 1, 'Durotar Mageroyal Razormane Grounds 4/4'); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(@OGUID+12, @OBJECTPOOLS+3, 0, 'Durotar Mageroyal Razormane Grounds 1/4'), +(@OGUID+13, @OBJECTPOOLS+3, 0, 'Durotar Mageroyal Razormane Grounds 2/4'), +(@OGUID+14, @OBJECTPOOLS+3, 0, 'Durotar Mageroyal Razormane Grounds 3/4'), +(@OGUID+15, @OBJECTPOOLS+3, 0, 'Durotar Mageroyal Razormane Grounds 4/4'); + +-- Earthroot has all known 45 spawns captured and one orientation extra +-- Remove existing Earthroot from Durotar: +DELETE FROM `gameobject` where `guid` IN (43855, 43856, 43868, 43873, 43874, 43877, 43880, 43883, 43885, 43886, 43895, 43896, 43981, 43982, 43992, 43999, 44000, 44011, 44012, 44024, 44025, 44026, 44027, 44029, 44041, 44042, 44043, 44045, 44050, 44051, 44054, 44055, 44058, 44059, 44061, 44062); + +-- Insert Durotar Earthroot from packets: +SET @OGUID := 21871; +DELETE FROM `gameobject` WHERE `guid` BETWEEN @OGUID+0 AND @OGUID+45; +INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `VerifiedBuild`, `Comment`) VALUES +(@OGUID+3, 1619, 1, 14, 0, 1, 255, 1118.32080078125, -4499.89794921875, 20.3045196533203125, 1.85004889965057373, 0, 0, 0.798635482788085937, 0.60181504487991333, 360, 255, 1, 46779, '4/46 all known Durotar Earthroot sniffed'), +(@OGUID+20, 1619, 1, 14, 0, 1, 255, 1256.7501220703125, -4683.24072265625, 16.37722587585449218, 2.565631866455078125, 0, 0, 0.958819389343261718, 0.284016460180282592, 360, 255, 1, 46779, '21/46 all known Durotar Earthroot sniffed'), +(@OGUID+26, 1619, 1, 14, 0, 1, 255, 223.0199737548828125, -5020.4990234375, 15.02139472961425781, 1.815141916275024414, 0, 0, 0.788010597229003906, 0.615661680698394775, 360, 255, 1, 46779, '27/46 all known Durotar Earthroot sniffed'), +(@OGUID+36, 1619, 1, 14, 0, 1, 255, -94.275390625, -5147.6259765625, 26.58465576171875, 0.663223206996917724, 0, 0, 0.325567245483398437, 0.945518851280212402, 360, 255, 1, 46779, '37/46 all known Durotar Earthroot sniffed'), +(@OGUID+41, 1619, 1, 14, 0, 1, 255, -675.49847412109375, -4823.72802734375, 35.99216842651367187, 2.234017848968505859, 0, 0, 0.898793220520019531, 0.438372820615768432, 360, 255, 1, 46779, '42/46 all known Durotar Earthroot sniffed'), +(@OGUID+38, 1619, 1, 14, 0, 1, 255, -233.734161376953125, -4837.064453125, 28.83690834045410156, 0.733038187026977539, 0, 0, 0.358367919921875, 0.933580458164215087, 360, 255, 1, 46779, '39/46 all known Durotar Earthroot sniffed'), +(@OGUID+31, 1619, 1, 14, 0, 1, 255, 52.99175262451171875, -4088.75048828125, 59.79741668701171875, 2.740161895751953125, 0, 0, 0.979924201965332031, 0.199370384216308593, 360, 255, 1, 46779, '32/46 all known Durotar Earthroot sniffed'), +(@OGUID+15, 1619, 1, 14, 0, 1, 255, 432.176116943359375, -3955.28564453125, 29.58817291259765625, 3.90954136848449707, 0, 0, -0.92718315124511718, 0.37460830807685852, 360, 255, 1, 46779, '16/46 all known Durotar Earthroot sniffed'), +(@OGUID+12, 1619, 1, 14, 0, 1, 255, 659.61102294921875, -4089.32421875, 16.22521209716796875, 1.780233979225158691, 0, 0, 0.7771453857421875, 0.629321098327636718, 360, 255, 1, 46779, '13/46 all known Durotar Earthroot sniffed'), +(@OGUID+13, 1619, 1, 14, 0, 1, 255, 574.80999755859375, -4254.13720703125, 14.17972564697265625, 0.610863447189331054, 0, 0, 0.3007049560546875, 0.953717231750488281, 360, 255, 1, 46779, '14/46 all known Durotar Earthroot sniffed'), +(@OGUID+7, 1619, 1, 14, 0, 1, 255, 942.25665283203125, -4404.73046875, 18.45261383056640625, 0.383971005678176879, 0, 0, 0.190808296203613281, 0.981627285480499267, 360, 255, 1, 46779, '8/46 all known Durotar Earthroot sniffed'), +(@OGUID+2, 1619, 1, 14, 0, 1, 255, 1101.1954345703125, -4333.6513671875, 25.76436996459960937, 4.328419685363769531, 0, 0, -0.82903671264648437, 0.559194147586822509, 360, 255, 1, 46779, '3/46 all known Durotar Earthroot sniffed'), +(@OGUID+1, 1619, 1, 14, 0, 1, 255, 1150.2880859375, -4129.90478515625, 20.5688934326171875, 1.012289404869079589, 0, 0, 0.484808921813964843, 0.87462007999420166, 360, 255, 1, 46779, '2/46 all known Durotar Earthroot sniffed'), +(@OGUID+40, 1619, 1, 14, 0, 1, 255, -460.1573486328125, -4712.15087890625, 37.342041015625, 5.672322273254394531, 0, 0, -0.3007049560546875, 0.953717231750488281, 360, 255, 1, 46779, '41/46 all known Durotar Earthroot sniffed'), +(@OGUID+25, 1619, 1, 14, 0, 1, 255, 225.31207275390625, -4230.01708984375, 41.82802200317382812, 4.537858963012695312, 0, 0, -0.76604366302490234, 0.642788589000701904, 360, 255, 1, 46779, '26/46 all known Durotar Earthroot sniffed'), +(@OGUID+42, 1619, 1, 14, 0, 1, 255, -759.6065673828125, -4672.27978515625, 39.17332077026367187, 3.735006093978881835, 0, 0, -0.95630455017089843, 0.292372345924377441, 360, 255, 1, 46779, '43/46 all known Durotar Earthroot sniffed'), +(@OGUID+43, 1619, 1, 14, 0, 1, 255, -734.75152587890625, -4977.02978515625, 22.22920608520507812, 6.073746204376220703, 0, 0, -0.10452842712402343, 0.994521915912628173, 360, 255, 1, 46779, '44/46 all known Durotar Earthroot sniffed'), +(@OGUID+35, 1619, 1, 14, 0, 1, 255, -74.4194869995117187, -4801.1376953125, 25.06105232238769531, 5.044002056121826171, 0, 0, -0.58070278167724609, 0.814115643501281738, 360, 255, 1, 46779, '36/46 all known Durotar Earthroot sniffed'), +(@OGUID+24, 1619, 1, 14, 0, 1, 255, 341.038970947265625, -5138.8828125, 6.930376052856445312, 4.939284324645996093, 0, 0, -0.6225137710571289, 0.78260880708694458, 360, 255, 1, 46779, '25/46 all known Durotar Earthroot sniffed'), +(@OGUID+37, 1619, 1, 14, 0, 1, 255, -116.038627624511718, -4694.84228515625, 29.52692413330078125, 5.323255538940429687, 0, 0, -0.46174812316894531, 0.887011110782623291, 360, 255, 1, 46779, '38/46 all known Durotar Earthroot sniffed'), +(@OGUID+29, 1619, 1, 14, 0, 1, 255, 141.170135498046875, -4584.783203125, 65.2907867431640625, 1.902408957481384277, 0, 0, 0.814115524291992187, 0.580702960491180419, 360, 255, 1, 46779, '30/46 all known Durotar Earthroot sniffed'), +(@OGUID+39, 1619, 1, 14, 0, 1, 255, -318.69769287109375, -4857.83935546875, 40.7213134765625, 0.087265998125076293, 0, 0, 0.043619155883789062, 0.999048233032226562, 360, 255, 1, 46779, '40/46 all known Durotar Earthroot sniffed'), +(@OGUID+23, 1619, 1, 14, 0, 1, 255, 663.150390625, -4806.96875, 26.246063232421875, 4.136432647705078125, 0, 0, -0.87881660461425781, 0.477159708738327026, 360, 255, 1, 46779, '24/46 all known Durotar Earthroot sniffed'), +(@OGUID+9, 1619, 1, 14, 0, 1, 255, 820.78009033203125, -4342.0625, 16.78577995300292968, 5.497788906097412109, 0, 0, -0.38268280029296875, 0.923879802227020263, 360, 255, 1, 46779, '10/46 all known Durotar Earthroot sniffed'), +(@OGUID+0, 1619, 1, 14, 0, 1, 255, 1234.4581298828125, -4130.6484375, 26.204437255859375, 1.064649581909179687, 0, 0, 0.507537841796875, 0.861629426479339599, 360, 255, 1, 46779, '1/46 all known Durotar Earthroot sniffed'), +(@OGUID+5, 1619, 1, 14, 0, 1, 255, 958.55010986328125, -4054.565673828125, -11.1735868453979492, 3.961898565292358398, 0, 0, -0.91705989837646484, 0.398749500513076782, 360, 255, 1, 46779, '6/46 all known Durotar Earthroot sniffed'), +(@OGUID+18, 1619, 1, 14, 0, 1, 255, 1150.2882080078125, -4129.90478515625, 20.65157508850097656, 1.012289404869079589, 0, 0, 0.484808921813964843, 0.87462007999420166, 360, 255, 1, 46779, '19/46 all known Durotar Earthroot sniffed, duplicate orientation found'), +(@OGUID+19, 1619, 1, 14, 0, 1, 255, 1313.9761962890625, -4928.82861328125, 9.163771629333496093, 1.919861555099487304, 0, 0, 0.819151878356933593, 0.573576688766479492, 360, 255, 1, 46779, '20/46 all known Durotar Earthroot sniffed'), +(@OGUID+8, 1619, 1, 14, 0, 1, 255, 912.63800048828125, -4033.7822265625, -11.5388202667236328, 3.351046562194824218, 0, 0, -0.99452114105224609, 0.104535527527332305, 360, 255, 1, 46779, '9/46 all known Durotar Earthroot sniffed'), +(@OGUID+44, 1619, 1, 14, 0, 1, 255, -861.29559326171875, -4725.5048828125, 28.71560096740722656, 2.321286916732788085, 0, 0, 0.917059898376464843, 0.398749500513076782, 360, 255, 1, 46779, '45/46 all known Durotar Earthroot sniffed'), +(@OGUID+16, 1619, 1, 14, 0, 1, 255, 399.1748046875, -4201.98193359375, 26.73043632507324218, 5.427974700927734375, 0, 0, -0.41469287872314453, 0.909961462020874023, 360, 255, 1, 46779, '17/46 all known Durotar Earthroot sniffed'), +(@OGUID+11, 1619, 1, 14, 0, 1, 255, 749.328369140625, -4482.91357421875, 22.01276588439941406, 6.230826377868652343, 0, 0, -0.02617645263671875, 0.999657332897186279, 360, 255, 1, 46779, '12/46 all known Durotar Earthroot sniffed'), +(@OGUID+6, 1619, 1, 14, 0, 1, 255, 944.3758544921875, -4231.93603515625, -6.23416709899902343, 1.361356139183044433, 0, 0, 0.629320144653320312, 0.77714616060256958, 360, 255, 1, 46779, '7/46 all known Durotar Earthroot sniffed'), +(@OGUID+10, 1619, 1, 14, 0, 1, 255, 765.45294189453125, -3869.986083984375, 24.05956268310546875, 1.169368624687194824, 0, 0, 0.551936149597167968, 0.833886384963989257, 360, 255, 1, 46779, '11/46 all known Durotar Earthroot sniffed'), +(@OGUID+21, 1619, 1, 14, 0, 1, 255, 1138.760498046875, -4902.47314453125, 17.50710487365722656, 6.09120035171508789, 0, 0, -0.09584522247314453, 0.995396256446838378, 360, 255, 1, 46779, '22/46 all known Durotar Earthroot sniffed'), +(@OGUID+17, 1619, 1, 14, 0, 1, 255, 459.593963623046875, -4523.13818359375, 50.90013504028320312, 2.44346022605895996, 0, 0, 0.939692497253417968, 0.34202045202255249, 360, 255, 1, 46779, '18/46 all known Durotar Earthroot sniffed'), +(@OGUID+4, 1619, 1, 14, 0, 1, 255, 934.80511474609375, -3918.829833984375, 19.61922836303710937, 1.658061861991882324, 0, 0, 0.737277030944824218, 0.67559051513671875, 360, 255, 1, 46779, '5/46 all known Durotar Earthroot sniffed'), +(@OGUID+14, 1619, 1, 14, 0, 1, 255, 515.15960693359375, -3927.331298828125, 22.48749732971191406, 1.553341388702392578, 0, 0, 0.700908660888671875, 0.713251054286956787, 360, 255, 1, 46779, '15/46 all known Durotar Earthroot sniffed'), +(@OGUID+30, 1619, 1, 14, 0, 1, 255, 37.111328125, -3984.507080078125, 48.36726760864257812, 3.717553615570068359, 0, 0, -0.95881938934326171, 0.284016460180282592, 360, 255, 1, 46779, '31/46 all known Durotar Earthroot sniffed'), +(@OGUID+28, 1619, 1, 14, 0, 1, 255, 159.86285400390625, -3927.96142578125, 45.60350418090820312, 1.431168079376220703, 0, 0, 0.656058311462402343, 0.754710197448730468, 360, 255, 1, 46779, '29/46 all known Durotar Earthroot sniffed'), +(@OGUID+34, 1619, 1, 14, 0, 1, 255, -61.41796875, -4616.05615234375, 42.88976669311523437, 5.096362113952636718, 0, 0, -0.55919265747070312, 0.829037725925445556, 360, 255, 1, 46779, '35/46 all known Durotar Earthroot sniffed'), +(@OGUID+45, 1619, 1, 14, 0, 1, 255, -1004.580322265625, -4805.931640625, 12.89675140380859375, 4.939284324645996093, 0, 0, -0.6225137710571289, 0.78260880708694458, 360, 255, 1, 46779, '46/46 all known Durotar Earthroot sniffed'), +(@OGUID+32, 1619, 1, 14, 0, 1, 255, 34.8250885009765625, -4923.9091796875, 13.55170345306396484, 0, 0, 0, 0, 1, 360, 255, 1, 46779, '33/46 all known Durotar Earthroot sniffed'), +(@OGUID+27, 1619, 1, 14, 0, 1, 255, 191.5199737548828125, -4436.94140625, 33.908660888671875, 1.029743075370788574, 0, 0, 0.492423057556152343, 0.870355963706970214, 360, 255, 1, 46779, '28/46 all known Durotar Earthroot sniffed'), +(@OGUID+22, 1619, 1, 14, 0, 1, 255, 944.28863525390625, -4952.1572265625, 10.04678821563720703, 3.874631166458129882, 0, 0, -0.93358039855957031, 0.358368009328842163, 360, 255, 1, 46779, '23/46 all known Durotar Earthroot sniffed'), +(@OGUID+33, 1619, 1, 14, 0, 1, 255, -114.458106994628906, -3897.579345703125, 44.01530838012695312, 0.785396754741668701, 0, 0, 0.38268280029296875, 0.923879802227020263, 360, 255, 1, 46779, '34/46 all known Durotar Earthroot sniffed'); + +-- Make Durotar Earthroot Pooling: +SET @OBJECTPOOLS :=116; +DELETE FROM `pool_gameobject` WHERE `guid` BETWEEN @OGUID+0 AND @OGUID+45; +DELETE FROM `pool_template` WHERE `entry` BETWEEN @OBJECTPOOLS+0 AND @OBJECTPOOLS+4; + +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(@OBJECTPOOLS+0, 1, 'Durotar Earthroot Northmost Pool 1/5'); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(@OGUID+0, @OBJECTPOOLS+0, 0, 'Durotar Earthroot Northmost 1/5'), +(@OGUID+1, @OBJECTPOOLS+0, 0, 'Durotar Earthroot Northmost 2/5'), +(@OGUID+2, @OBJECTPOOLS+0, 0, 'Durotar Earthroot Northmost 3/5'), +(@OGUID+3, @OBJECTPOOLS+0, 0, 'Durotar Earthroot Northmost 4/5'), +(@OGUID+18, @OBJECTPOOLS+0, 0, 'Durotar Earthroot Northmost 5/5'); + +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(@OBJECTPOOLS+1, 5, 'Durotar Earthroot NW Pool 2/5'); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(@OGUID+4, @OBJECTPOOLS+1, 0, 'Durotar Earthroot NW 1/14'), +(@OGUID+5, @OBJECTPOOLS+1, 0, 'Durotar Earthroot NW 2/14'), +(@OGUID+6, @OBJECTPOOLS+1, 0, 'Durotar Earthroot NW 3/14'), +(@OGUID+7, @OBJECTPOOLS+1, 0, 'Durotar Earthroot NW 4/14'), +(@OGUID+8, @OBJECTPOOLS+1, 0, 'Durotar Earthroot NW 5/14'), +(@OGUID+9, @OBJECTPOOLS+1, 0, 'Durotar Earthroot NW 6/14'), +(@OGUID+10, @OBJECTPOOLS+1, 0, 'Durotar Earthroot NW 7/14'), +(@OGUID+11, @OBJECTPOOLS+1, 0, 'Durotar Earthroot NW 8/14'), +(@OGUID+12, @OBJECTPOOLS+1, 0, 'Durotar Earthroot NW 9/14'), +(@OGUID+13, @OBJECTPOOLS+1, 0, 'Durotar Earthroot NW 10/14'), +(@OGUID+14, @OBJECTPOOLS+1, 0, 'Durotar Earthroot NW 11/14'), +(@OGUID+15, @OBJECTPOOLS+1, 0, 'Durotar Earthroot NW 12/14'), +(@OGUID+16, @OBJECTPOOLS+1, 0, 'Durotar Earthroot NW 13/14'), +(@OGUID+17, @OBJECTPOOLS+1, 0, 'Durotar Earthroot NW 14/14'); + +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(@OBJECTPOOLS+2, 2, 'Durotar Earthroot NE Pool 3/5'); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(@OGUID+19, @OBJECTPOOLS+2, 0, 'Durotar Earthroot NE 1/5'), +(@OGUID+20, @OBJECTPOOLS+2, 0, 'Durotar Earthroot NE 2/5'), +(@OGUID+21, @OBJECTPOOLS+2, 0, 'Durotar Earthroot NE 3/5'), +(@OGUID+22, @OBJECTPOOLS+2, 0, 'Durotar Earthroot NE 4/5'), +(@OGUID+23, @OBJECTPOOLS+2, 0, 'Durotar Earthroot NE 5/5'); + +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(@OBJECTPOOLS+3, 6, 'Durotar Earthroot Center Pool 4/5'); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(@OGUID+24, @OBJECTPOOLS+3, 0, 'Durotar Earthroot Center 1/17'), +(@OGUID+25, @OBJECTPOOLS+3, 0, 'Durotar Earthroot Center 2/17'), +(@OGUID+26, @OBJECTPOOLS+3, 0, 'Durotar Earthroot Center 3/17'), +(@OGUID+27, @OBJECTPOOLS+3, 0, 'Durotar Earthroot Center 4/17'), +(@OGUID+28, @OBJECTPOOLS+3, 0, 'Durotar Earthroot Center 5/17'), +(@OGUID+29, @OBJECTPOOLS+3, 0, 'Durotar Earthroot Center 6/17'), +(@OGUID+30, @OBJECTPOOLS+3, 0, 'Durotar Earthroot Center 7/17'), +(@OGUID+31, @OBJECTPOOLS+3, 0, 'Durotar Earthroot Center 8/17'), +(@OGUID+32, @OBJECTPOOLS+3, 0, 'Durotar Earthroot Center 9/17'), +(@OGUID+33, @OBJECTPOOLS+3, 0, 'Durotar Earthroot Center 10/17'), +(@OGUID+34, @OBJECTPOOLS+3, 0, 'Durotar Earthroot Center 11/17'), +(@OGUID+35, @OBJECTPOOLS+3, 0, 'Durotar Earthroot Center 12/17'), +(@OGUID+36, @OBJECTPOOLS+3, 0, 'Durotar Earthroot Center 13/17'), +(@OGUID+37, @OBJECTPOOLS+3, 0, 'Durotar Earthroot Center 14/17'), +(@OGUID+38, @OBJECTPOOLS+3, 0, 'Durotar Earthroot Center 15/17'), +(@OGUID+39, @OBJECTPOOLS+3, 0, 'Durotar Earthroot Center 16/17'), +(@OGUID+40, @OBJECTPOOLS+3, 0, 'Durotar Earthroot Center 17/17'); + +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(@OBJECTPOOLS+4, 2, 'Durotar Earthroot South Pool 5/5'); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(@OGUID+41, @OBJECTPOOLS+4, 0, 'Durotar Earthroot South 1/5'), +(@OGUID+42, @OBJECTPOOLS+4, 0, 'Durotar Earthroot South 2/5'), +(@OGUID+43, @OBJECTPOOLS+4, 0, 'Durotar Earthroot South 3/5'), +(@OGUID+44, @OBJECTPOOLS+4, 0, 'Durotar Earthroot South 4/5'), +(@OGUID+45, @OBJECTPOOLS+4, 0, 'Durotar Earthroot South 5/5'); + +-- Peacebloom has presumed all known 76 spawns captured +-- Remove existing Peacebloom from Durotar: +DELETE FROM `gameobject` where `guid` IN (43735, 43736, 43737, 43738, 43763, 43775, 43780, 43796, 43801, 43832, 43808, 43817, 43829, 43834, 43836, 43841, 43847, 43980, 43983, 43984, 43985, 43986, 44001, 44002, 44003, 44008, 44009, 44010, 44013, 44016, 44017, 44020, 44021, 44022, 44023, 44028, 44030, 44031, 44110, 44111, 44122, 44125, 44126, 44127, 44128, 44130, 44132, 44136, 44140, 44141, 44142, 44144, 44145, 44146, 44148, 44149, 44377, 44475, 44476); + +-- Insert Durotar Peacebloom from packets: +SET @OGUID :=64519; +DELETE FROM `gameobject` WHERE `guid` BETWEEN @OGUID+0 AND @OGUID+75; +INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `VerifiedBuild`, `Comment`) VALUES +(@OGUID+24, 1618, 1, 14, 0, 1, 255, 576.44012451171875, -4645.88134765625, 31.64385986328125, 4.834563255310058593, 0, 0, -0.66261959075927734, 0.748956084251403808, 360, 255, 1, 46779, '24/76 all known Durotar Peacebloom sniffed'), +(@OGUID+75, 1618, 1, 14, 0, 1, 255, 872.485595703125, -4636.94775390625, 14.79042530059814453, 5.637413978576660156, 0, 0, -0.31730461120605468, 0.948323667049407958, 360, 255, 1, 46779, '75/76 all known Durotar Peacebloom sniffed'), +(@OGUID+13, 1618, 1, 14, 0, 1, 255, 1153.5992431640625, -4530.12255859375, 19.53768539428710937, 1.745326757431030273, 0, 0, 0.766043663024902343, 0.642788589000701904, 360, 255, 1, 46779, '13/76 all known Durotar Peacebloom sniffed'), +(@OGUID+11, 1618, 1, 14, 0, 1, 255, 1235.6951904296875, -4640.08251953125, 17.40758895874023437, 5.794494152069091796, 0, 0, -0.24192142486572265, 0.970295846462249755, 360, 255, 1, 46779, '11/76 all known Durotar Peacebloom sniffed'), +(@OGUID+7, 1618, 1, 14, 0, 1, 255, 1351.0560302734375, -4764.1064453125, 26.99089622497558593, 0, 0, 0, 0, 1, 360, 255, 1, 46779, '7/76 all known Durotar Peacebloom sniffed'), +(@OGUID+18, 1618, 1, 14, 0, 1, 255, 950.41864013671875, -4981.32666015625, 9.415129661560058593, 5.515241622924804687, 0, 0, -0.37460613250732421, 0.927184045314788818, 360, 255, 1, 46779, '18/76 all known Durotar Peacebloom sniffed'), +(@OGUID+71, 1618, 1, 14, 0, 1, 255, -721.23626708984375, -5611.30712890625, 25.56131935119628906, 4.694936752319335937, 0, 0, -0.71325016021728515, 0.700909554958343505, 360, 255, 1, 46779, '71/76 all known Durotar Peacebloom sniffed'), +(@OGUID+74, 1618, 1, 14, 0, 1, 255, -1190.880126953125, -5502.5244140625, 5.268311977386474609, 1.134462952613830566, 0, 0, 0.537299156188964843, 0.843391716480255126, 360, 255, 1, 46779, '74/76 all known Durotar Peacebloom sniffed'), +(@OGUID+68, 1618, 1, 14, 0, 1, 255, -945.416015625, -4816.14697265625, 13.898681640625, 3.804818391799926757, 0, 0, -0.94551849365234375, 0.325568377971649169, 360, 255, 1, 46779, '68/76 all known Durotar Peacebloom sniffed'), +(@OGUID+67, 1618, 1, 14, 0, 1, 255, -1007.18267822265625, -4740.14697265625, 14.23654556274414062, 4.852017402648925781, 0, 0, -0.65605831146240234, 0.754710197448730468, 360, 255, 1, 46779, '67/76 all known Durotar Peacebloom sniffed'), +(@OGUID+63, 1618, 1, 14, 0, 1, 255, -582.867431640625, -4845.39501953125, 35.45242691040039062, 3.892086982727050781, 0, 0, -0.93041706085205078, 0.366502493619918823, 360, 255, 1, 46779, '63/76 all known Durotar Peacebloom sniffed'), +(@OGUID+62, 1618, 1, 14, 0, 1, 255, -453.350250244140625, -4824.06396484375, 38.12348175048828125, 1.640606880187988281, 0, 0, 0.731352806091308593, 0.6819993257522583, 360, 255, 1, 46779, '62/76 all known Durotar Peacebloom sniffed'), +(@OGUID+41, 1618, 1, 14, 0, 1, 255, 122.60546875, -4414.103515625, 37.66838836669921875, 0.209439441561698913, 0, 0, 0.104528427124023437, 0.994521915912628173, 360, 255, 1, 46779, '41/76 all known Durotar Peacebloom sniffed'), +(@OGUID+40, 1618, 1, 14, 0, 1, 255, 79.77994537353515625, -4245.79150390625, 59.7068023681640625, 3.735006093978881835, 0, 0, -0.95630455017089843, 0.292372345924377441, 360, 255, 1, 46779, '40/76 all known Durotar Peacebloom sniffed'), +(@OGUID+43, 1618, 1, 14, 0, 1, 255, 51.63259506225585937, -4151.8984375, 63.73382568359375, 4.677483558654785156, 0, 0, -0.71933937072753906, 0.694658815860748291, 360, 255, 1, 46779, '43/76 all known Durotar Peacebloom sniffed'), +(@OGUID+39, 1618, 1, 14, 0, 1, 255, 106.3723983764648437, -4009.619873046875, 46.37731170654296875, 5.829400539398193359, 0, 0, -0.22495079040527343, 0.974370121955871582, 360, 255, 1, 46779, '39/76 all known Durotar Peacebloom sniffed'), +(@OGUID+32, 1618, 1, 14, 0, 1, 255, 481.166229248046875, -3884.92529296875, 20.675811767578125, 2.583080768585205078, 0, 0, 0.961260795593261718, 0.275640487670898437, 360, 255, 1, 46779, '32/76 all known Durotar Peacebloom sniffed'), +(@OGUID+6, 1618, 1, 14, 0, 1, 255, 587.15203857421875, -4016.65625, 10.35272407531738281, 0.034906249493360519, 0, 0, 0.017452239990234375, 0.999847710132598876, 360, 255, 1, 46779, '6/76 all known Durotar Peacebloom sniffed'), +(@OGUID+26, 1618, 1, 14, 0, 1, 255, 544.14190673828125, -4190.08935546875, 16.03062057495117187, 5.096362113952636718, 0, 0, -0.55919265747070312, 0.829037725925445556, 360, 255, 1, 46779, '26/76 all known Durotar Peacebloom sniffed'), +(@OGUID+27, 1618, 1, 14, 0, 1, 255, 552.92218017578125, -4382.99072265625, 25.674591064453125, 4.415683269500732421, 0, 0, -0.80385684967041015, 0.594822824001312255, 360, 255, 1, 46779, '27/76 all known Durotar Peacebloom sniffed'), +(@OGUID+2, 1618, 1, 14, 0, 1, 255, 979.56207275390625, -3922.735595703125, 18.49326515197753906, 5.777040958404541015, 0, 0, -0.25037956237792968, 0.968147754669189453, 360, 255, 1, 46779, '2/76 all known Durotar Peacebloom sniffed'), +(@OGUID+61, 1618, 1, 14, 0, 1, 255, -427.984161376953125, -4721.78515625, 39.59911346435546875, 4.1538848876953125, 0, 0, -0.8746194839477539, 0.484810054302215576, 360, 255, 1, 46779, '61/76 all known Durotar Peacebloom sniffed'), +(@OGUID+35, 1618, 1, 14, 0, 1, 255, 209.837890625, -4051.300048828125, 44.49655532836914062, 2.268925428390502929, 0, 0, 0.906307220458984375, 0.422619491815567016, 360, 255, 1, 46779, '35/76 all known Durotar Peacebloom sniffed'), +(@OGUID+36, 1618, 1, 14, 0, 1, 255, 211.5045623779296875, -4300.72265625, 43.43696975708007812, 5.602506637573242187, 0, 0, -0.33380699157714843, 0.942641437053680419, 360, 255, 1, 46779, '36/76 all known Durotar Peacebloom sniffed'), +(@OGUID+51, 1618, 1, 14, 0, 1, 255, 111.74609375, -5011.83349609375, 9.826634407043457031, 1.448621988296508789, 0, 0, 0.662619590759277343, 0.748956084251403808, 360, 255, 1, 46779, '51/76 all known Durotar Peacebloom sniffed'), +(@OGUID+58, 1618, 1, 14, 0, 1, 255, -237.703567504882812, -4733.990234375, 30.96081161499023437, 4.817109584808349609, 0, 0, -0.66913032531738281, 0.74314504861831665, 360, 255, 1, 46779, '58/76 all known Durotar Peacebloom sniffed'), +(@OGUID+33, 1618, 1, 14, 0, 1, 255, 410.00152587890625, -3984.354736328125, 30.216949462890625, 2.862335443496704101, 0, 0, 0.990267753601074218, 0.139175355434417724, 360, 255, 1, 46779, '33/76 all known Durotar Peacebloom sniffed'), +(@OGUID+55, 1618, 1, 14, 0, 1, 255, -146.132156372070312, -4716.8251953125, 29.02817153930664062, 5.305802345275878906, 0, 0, -0.46947097778320312, 0.882947921752929687, 360, 255, 1, 46779, '55/76 all known Durotar Peacebloom sniffed'), +(@OGUID+60, 1618, 1, 14, 0, 1, 255, -315.7734375, -4749.27197265625, 36.00954818725585937, 1.832594871520996093, 0, 0, 0.793353080749511718, 0.608761727809906005, 360, 255, 1, 46779, '60/76 all known Durotar Peacebloom sniffed'), +(@OGUID+54, 1618, 1, 14, 0, 1, 255, -55.2087669372558593, -5059.32275390625, 10.38722896575927734, 1.221729278564453125, 0, 0, 0.573575973510742187, 0.819152355194091796, 360, 255, 1, 46779, '54/76 all known Durotar Peacebloom sniffed'), +(@OGUID+53, 1618, 1, 14, 0, 1, 255, 22.66449737548828125, -5074.466796875, 8.78829193115234375, 0.174532130360603332, 0, 0, 0.087155342102050781, 0.996194720268249511, 360, 255, 1, 46779, '53/76 all known Durotar Peacebloom sniffed'), +(@OGUID+56, 1618, 1, 14, 0, 1, 255, -146.28277587890625, -4849.16162109375, 19.79057884216308593, 3.194002151489257812, 0, 0, -0.99965667724609375, 0.026201646775007247, 360, 255, 1, 46779, '56/76 all known Durotar Peacebloom sniffed'), +(@OGUID+70, 1618, 1, 14, 0, 1, 255, -808.89044189453125, -5355.294921875, 2.164660930633544921, 4.607671737670898437, 0, 0, -0.74314403533935546, 0.669131457805633544, 360, 255, 1, 46779, '70/76 all known Durotar Peacebloom sniffed'), +(@OGUID+46, 1618, 1, 14, 0, 1, 255, -174.129348754882812, -3886.43017578125, 41.30976486206054687, 3.996806621551513671, 0, 0, -0.90996074676513671, 0.414694398641586303, 360, 255, 1, 46779, '46/76 all known Durotar Peacebloom sniffed'), +(@OGUID+20, 1618, 1, 14, 0, 1, 255, 772.42034912109375, -4337.3681640625, 17.64434814453125, 1.588248729705810546, 0, 0, 0.713250160217285156, 0.700909554958343505, 360, 255, 1, 46779, '20/76 all known Durotar Peacebloom sniffed'), +(@OGUID+22, 1618, 1, 14, 0, 1, 255, 740.525390625, -4847.93359375, 32.43145370483398437, 3.071766138076782226, 0, 0, 0.999390602111816406, 0.034906134009361267, 360, 255, 1, 46779, '22/76 all known Durotar Peacebloom sniffed'), +(@OGUID+15, 1618, 1, 14, 0, 1, 255, 1080.1187744140625, -4207.169921875, 20.04167938232421875, 5.375615119934082031, 0, 0, -0.4383707046508789, 0.898794233798980712, 360, 255, 1, 46779, '15/76 all known Durotar Peacebloom sniffed'), +(@OGUID+5, 1618, 1, 14, 0, 1, 255, 687.802001953125, -3908.257080078125, 15.48861503601074218, 5.95157480239868164, 0, 0, -0.16504669189453125, 0.986285746097564697, 360, 255, 1, 46779, '5/76 all known Durotar Peacebloom sniffed'), +(@OGUID+14, 1618, 1, 14, 0, 1, 255, 1166.1929931640625, -4927.8125, 16.59576416015625, 4.136432647705078125, 0, 0, -0.87881660461425781, 0.477159708738327026, 360, 255, 1, 46779, '14/76 all known Durotar Peacebloom sniffed'), +(@OGUID+8, 1618, 1, 14, 0, 1, 255, 1317.8629150390625, -4986.07373046875, 2.624479055404663085, 2.460912704467773437, 0, 0, 0.942641258239746093, 0.333807557821273803, 360, 255, 1, 46779, '8/76 all known Durotar Peacebloom sniffed'), +(@OGUID+65, 1618, 1, 14, 0, 1, 255, -726.66131591796875, -4810.6435546875, 25.44516754150390625, 2.932138919830322265, 0, 0, 0.994521141052246093, 0.104535527527332305, 360, 255, 1, 46779, '65/76 all known Durotar Peacebloom sniffed'), +(@OGUID+29, 1618, 1, 14, 0, 1, 255, 456.34320068359375, -4551.5546875, 52.29912948608398437, 5.829400539398193359, 0, 0, -0.22495079040527343, 0.974370121955871582, 360, 255, 1, 46779, '29/76 all known Durotar Peacebloom sniffed'), +(@OGUID+66, 1618, 1, 14, 0, 1, 255, -713.90667724609375, -5020.736328125, 17.04654502868652343, 0.820303261280059814, 0, 0, 0.398748397827148437, 0.917060375213623046, 360, 255, 1, 46779, '66/76 all known Durotar Peacebloom sniffed'), +(@OGUID+21, 1618, 1, 14, 0, 1, 255, 710.62469482421875, -4209.046875, 16.87834548950195312, 6.14356088638305664, 0, 0, -0.06975555419921875, 0.997564136981964111, 360, 255, 1, 46779, '21/76 all known Durotar Peacebloom sniffed'), +(@OGUID+0, 1618, 1, 14, 0, 1, 255, 1192.5826416015625, -4006.66064453125, 17.00342559814453125, 4.276057243347167968, 0, 0, -0.84339141845703125, 0.537299633026123046, 360, 255, 1, 46779, '76/76 all known Durotar Peacebloom sniffed'), +(@OGUID+4, 1618, 1, 14, 0, 1, 255, 808.3974609375, -3849.423583984375, 18.24977493286132812, 0.610863447189331054, 0, 0, 0.3007049560546875, 0.953717231750488281, 360, 255, 1, 46779, '4/76 all known Durotar Peacebloom sniffed'), +(@OGUID+9, 1618, 1, 14, 0, 1, 255, 1267.2899169921875, -4862.4521484375, 15.57356643676757812, 4.433136463165283203, 0, 0, -0.79863548278808593, 0.60181504487991333, 360, 255, 1, 46779, '9/76 all known Durotar Peacebloom sniffed'), +(@OGUID+17, 1618, 1, 14, 0, 1, 255, 1049.1593017578125, -4971.99072265625, 15.59623908996582031, 0.15707901120185852, 0, 0, 0.078458786010742187, 0.996917366981506347, 360, 255, 1, 46779, '17/76 all known Durotar Peacebloom sniffed'), +(@OGUID+10, 1618, 1, 14, 0, 1, 255, 1217.0572509765625, -4204.306640625, 26.21006393432617187, 5.270895957946777343, 0, 0, -0.48480892181396484, 0.87462007999420166, 360, 255, 1, 46779, '10/76 all known Durotar Peacebloom sniffed'), +(@OGUID+37, 1618, 1, 14, 0, 1, 255, 185.3385467529296875, -4189.9609375, 44.99439239501953125, 4.049167633056640625, 0, 0, -0.89879322052001953, 0.438372820615768432, 360, 255, 1, 46779, '37/76 all known Durotar Peacebloom sniffed'), +(@OGUID+45, 1618, 1, 14, 0, 1, 255, -79.995880126953125, -3888.22314453125, 46.93803787231445312, 5.93412017822265625, 0, 0, -0.17364788055419921, 0.984807789325714111, 360, 255, 1, 46779, '45/76 all known Durotar Peacebloom sniffed'), +(@OGUID+64, 1618, 1, 14, 0, 1, 255, -727.39410400390625, -4670.90478515625, 36.80979537963867187, 3.926995515823364257, 0, 0, -0.92387866973876953, 0.38268551230430603, 360, 255, 1, 46779, '64/76 all known Durotar Peacebloom sniffed'), +(@OGUID+50, 1618, 1, 14, 0, 1, 255, 81.68120574951171875, -4855.02734375, 16.23387908935546875, 4.572763919830322265, 0, 0, -0.75470924377441406, 0.656059443950653076, 360, 255, 1, 46779, '50/76 all known Durotar Peacebloom sniffed'), +(@OGUID+73, 1618, 1, 14, 0, 1, 255, -1229.1939697265625, -5419.7578125, 4.692111015319824218, 1.500982880592346191, 0, 0, 0.681998252868652343, 0.731353819370269775, 360, 255, 1, 46779, '73/76 all known Durotar Peacebloom sniffed'), +(@OGUID+72, 1618, 1, 14, 0, 1, 255, -1123.9193115234375, -5132.35791015625, 2.308864116668701171, 0.069811686873435974, 0, 0, 0.034898757934570312, 0.999390840530395507, 360, 255, 1, 46779, '72/76 all known Durotar Peacebloom sniffed'), +(@OGUID+23, 1618, 1, 14, 0, 1, 255, 621.03289794921875, -4322.41064453125, 18.90568351745605468, 1.239183306694030761, 0, 0, 0.580702781677246093, 0.814115643501281738, 360, 255, 1, 46779, '23/76 all known Durotar Peacebloom sniffed'), +(@OGUID+1, 1618, 1, 14, 0, 1, 255, 1123.47412109375, -4109.10791015625, 18.93925666809082031, 3.543023586273193359, 0, 0, -0.97992420196533203, 0.199370384216308593, 360, 255, 1, 46779, '1/76 all known Durotar Peacebloom sniffed'), +(@OGUID+25, 1618, 1, 14, 0, 1, 255, 590.79327392578125, -4870.73046875, 24.64709281921386718, 4.764749526977539062, 0, 0, -0.6883544921875, 0.725374460220336914, 360, 255, 1, 46779, '25/76 all known Durotar Peacebloom sniffed'), +(@OGUID+3, 1618, 1, 14, 0, 1, 255, 871.44091796875, -3921.874267578125, 20.81670379638671875, 4.799657344818115234, 0, 0, -0.67558956146240234, 0.737277925014495849, 360, 255, 1, 46779, '3/76 all known Durotar Peacebloom sniffed'), +(@OGUID+44, 1618, 1, 14, 0, 1, 255, -17.5935325622558593, -4018.5361328125, 59.22353744506835937, 2.600535154342651367, 0, 0, 0.963629722595214843, 0.26724100112915039, 360, 255, 1, 46779, '44/76 all known Durotar Peacebloom sniffed'), +(@OGUID+38, 1618, 1, 14, 0, 1, 255, 139.2584686279296875, -3887.162353515625, 39.86974334716796875, 3.752462387084960937, 0, 0, -0.95371627807617187, 0.300707906484603881, 360, 255, 1, 46779, '38/76 all known Durotar Peacebloom sniffed'), +(@OGUID+49, 1618, 1, 14, 0, 1, 255, 115.5776901245117187, -4686.57373046875, 27.42041015625, 1.186823248863220214, 0, 0, 0.559192657470703125, 0.829037725925445556, 360, 255, 1, 46779, '49/76 all known Durotar Peacebloom sniffed'), +(@OGUID+12, 1618, 1, 14, 0, 1, 255, 1153.6693115234375, -4312.61328125, 21.21240806579589843, 3.682650327682495117, 0, 0, -0.96362972259521484, 0.26724100112915039, 360, 255, 1, 46779, '12/76 all known Durotar Peacebloom sniffed'), +(@OGUID+34, 1618, 1, 14, 0, 1, 255, 482.284393310546875, -4083.93310546875, 30.25545310974121093, 2.879789113998413085, 0, 0, 0.991444587707519531, 0.130528271198272705, 360, 255, 1, 46779, '34/76 all known Durotar Peacebloom sniffed'), +(@OGUID+28, 1618, 1, 14, 0, 1, 255, 481.5009765625, -4376.1796875, 36.150115966796875, 0.087265998125076293, 0, 0, 0.043619155883789062, 0.999048233032226562, 360, 255, 1, 46779, '28/76 all known Durotar Peacebloom sniffed'), +(@OGUID+42, 1618, 1, 14, 0, 1, 255, 41.62065887451171875, -3916.78076171875, 44.42875289916992187, 4.747295856475830078, 0, 0, -0.69465827941894531, 0.719339847564697265, 360, 255, 1, 46779, '42/76 all known Durotar Peacebloom sniffed'), +(@OGUID+59, 1618, 1, 14, 0, 1, 255, -249.421493530273437, -4915.39306640625, 26.49920463562011718, 3.403396368026733398, 0, 0, -0.99144458770751953, 0.130528271198272705, 360, 255, 1, 46779, '59/76 all known Durotar Peacebloom sniffed'), +(@OGUID+52, 1618, 1, 14, 0, 1, 255, -15.9546985626220703, -4872.8359375, 19.71653938293457031, 1.972219824790954589, 0, 0, 0.83388519287109375, 0.55193793773651123, 360, 255, 1, 46779, '52/76 all known Durotar Peacebloom sniffed'), +(@OGUID+48, 1618, 1, 14, 0, 1, 255, 188.7855987548828125, -5087.7841796875, 10.83263683319091796, 5.881760597229003906, 0, 0, -0.19936752319335937, 0.979924798011779785, 360, 255, 1, 46779, '48/76 all known Durotar Peacebloom sniffed'), +(@OGUID+16, 1618, 1, 14, 0, 1, 255, 1022.24871826171875, -4360.6435546875, 17.70088958740234375, 2.740161895751953125, 0, 0, 0.979924201965332031, 0.199370384216308593, 360, 255, 1, 46779, '16/76 all known Durotar Peacebloom sniffed'), +(@OGUID+31, 1618, 1, 14, 0, 1, 255, 411.253570556640625, -4226.1591796875, 25.42971992492675781, 5.794494152069091796, 0, 0, -0.24192142486572265, 0.970295846462249755, 360, 255, 1, 46779, '31/76 all known Durotar Peacebloom sniffed'), +(@OGUID+57, 1618, 1, 14, 0, 1, 255, -125.188812255859375, -4933.2470703125, 19.89044380187988281, 2.879789113998413085, 0, 0, 0.991444587707519531, 0.130528271198272705, 360, 255, 1, 46779, '57/76 all known Durotar Peacebloom sniffed'), +(@OGUID+69, 1618, 1, 14, 0, 1, 255, -1340.7806396484375, -5140.3271484375, 3.484854936599731445, 2.740161895751953125, 0, 0, 0.979924201965332031, 0.199370384216308593, 360, 255, 1, 46779, '69/76 all known Durotar Peacebloom sniffed'), +(@OGUID+19, 1618, 1, 14, 0, 1, 255, 809.23101806640625, -5008.37353515625, 10.34244728088378906, 0.436331570148468017, 0, 0, 0.216439247131347656, 0.976296067237854003, 360, 255, 1, 46779, '19/76 all known Durotar Peacebloom sniffed'), +(@OGUID+30, 1618, 1, 14, 0, 1, 255, 458.79547119140625, -4891.96435546875, 20.88724708557128906, 0.680676698684692382, 0, 0, 0.333806037902832031, 0.942641794681549072, 360, 255, 1, 46779, '30/76 all known Durotar Peacebloom sniffed'), +(@OGUID+47, 1618, 1, 14, 0, 1, 255, 280.476348876953125, -5047.20166015625, 11.75045204162597656, 0.820303261280059814, 0, 0, 0.398748397827148437, 0.917060375213623046, 360, 255, 1, 46779, '47/76 all known Durotar Peacebloom sniffed'); + +-- Make Durotar Peacebloom Pooling: +SET @OBJECTPOOLS :=121; +DELETE FROM `pool_gameobject` WHERE `guid` BETWEEN @OGUID+0 AND @OGUID+75; +DELETE FROM `pool_template` WHERE `entry` BETWEEN @OBJECTPOOLS+0 AND @OBJECTPOOLS+7; + +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(@OBJECTPOOLS+0, 3, 'Durotar Peacebloom NW Pool 1/8'); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(@OGUID+0, @OBJECTPOOLS+0, 0, 'Durotar Peacebloom 1/7'), +(@OGUID+1, @OBJECTPOOLS+0, 0, 'Durotar Peacebloom 2/7'), +(@OGUID+2, @OBJECTPOOLS+0, 0, 'Durotar Peacebloom 3/7'), +(@OGUID+3, @OBJECTPOOLS+0, 0, 'Durotar Peacebloom 4/7'), +(@OGUID+4, @OBJECTPOOLS+0, 0, 'Durotar Peacebloom 5/7'), +(@OGUID+5, @OBJECTPOOLS+0, 0, 'Durotar Peacebloom 6/7'), +(@OGUID+6, @OBJECTPOOLS+0, 0, 'Durotar Peacebloom 7/7'); + +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(@OBJECTPOOLS+1, 4, 'Durotar Peacebloom NE Pool 2/8'); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(@OGUID+7, @OBJECTPOOLS+1, 0, 'Durotar Peacebloom NE 1/13'), +(@OGUID+8, @OBJECTPOOLS+1, 0, 'Durotar Peacebloom NE 2/13'), +(@OGUID+9, @OBJECTPOOLS+1, 0, 'Durotar Peacebloom NE 3/13'), +(@OGUID+10, @OBJECTPOOLS+1, 0, 'Durotar Peacebloom NE 4/13'), +(@OGUID+11, @OBJECTPOOLS+1, 0, 'Durotar Peacebloom NE 5/13'), +(@OGUID+12, @OBJECTPOOLS+1, 0, 'Durotar Peacebloom NE 6/13'), +(@OGUID+13, @OBJECTPOOLS+1, 0, 'Durotar Peacebloom NE 7/13'), +(@OGUID+14, @OBJECTPOOLS+1, 0, 'Durotar Peacebloom NE 8/13'), +(@OGUID+15, @OBJECTPOOLS+1, 0, 'Durotar Peacebloom NE 9/13'), +(@OGUID+16, @OBJECTPOOLS+1, 0, 'Durotar Peacebloom NE 10/13'), +(@OGUID+17, @OBJECTPOOLS+1, 0, 'Durotar Peacebloom NE 11/13'), +(@OGUID+18, @OBJECTPOOLS+1, 0, 'Durotar Peacebloom NE 12/13'), +(@OGUID+75, @OBJECTPOOLS+1, 0, 'Durotar Peacebloom NE 13/13'); + +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(@OBJECTPOOLS+2, 5, 'Durotar Peacebloom East Valley Pool 3/8'); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(@OGUID+19, @OBJECTPOOLS+2, 0, 'Durotar Peacebloom East Valley 1/13'), +(@OGUID+20, @OBJECTPOOLS+2, 0, 'Durotar Peacebloom East Valley 2/13'), +(@OGUID+21, @OBJECTPOOLS+2, 0, 'Durotar Peacebloom East Valley 3/13'), +(@OGUID+22, @OBJECTPOOLS+2, 0, 'Durotar Peacebloom East Valley 4/13'), +(@OGUID+23, @OBJECTPOOLS+2, 0, 'Durotar Peacebloom East Valley 5/13'), +(@OGUID+24, @OBJECTPOOLS+2, 0, 'Durotar Peacebloom East Valley 6/13'), +(@OGUID+25, @OBJECTPOOLS+2, 0, 'Durotar Peacebloom East Valley 7/13'), +(@OGUID+26, @OBJECTPOOLS+2, 0, 'Durotar Peacebloom East Valley 8/13'), +(@OGUID+27, @OBJECTPOOLS+2, 0, 'Durotar Peacebloom East Valley 9/13'), +(@OGUID+28, @OBJECTPOOLS+2, 0, 'Durotar Peacebloom East Valley 10/13'), +(@OGUID+29, @OBJECTPOOLS+2, 0, 'Durotar Peacebloom East Valley 11/13'), +(@OGUID+30, @OBJECTPOOLS+2, 0, 'Durotar Peacebloom East Valley 12/13'), +(@OGUID+31, @OBJECTPOOLS+2, 0, 'Durotar Peacebloom East Valley 13/13'); + +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(@OBJECTPOOLS+3, 2, 'Durotar Peacebloom West Zone Exit Pool 4/8'); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(@OGUID+32, @OBJECTPOOLS+3, 0, 'Durotar Peacebloom West Zone Exit 1/4'), +(@OGUID+33, @OBJECTPOOLS+3, 0, 'Durotar Peacebloom West Zone Exit 2/4'), +(@OGUID+34, @OBJECTPOOLS+3, 0, 'Durotar Peacebloom West Zone Exit 3/4'), +(@OGUID+35, @OBJECTPOOLS+3, 0, 'Durotar Peacebloom West Zone Exit 4/4'); + +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(@OBJECTPOOLS+4, 4, 'Durotar Peacebloom Southern Razormane Pool 5/8'); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(@OGUID+36, @OBJECTPOOLS+4, 0, 'Durotar Peacebloom Southern Razormane 1/11'), +(@OGUID+37, @OBJECTPOOLS+4, 0, 'Durotar Peacebloom Southern Razormane 2/11'), +(@OGUID+38, @OBJECTPOOLS+4, 0, 'Durotar Peacebloom Southern Razormane 3/11'), +(@OGUID+39, @OBJECTPOOLS+4, 0, 'Durotar Peacebloom Southern Razormane 4/11'), +(@OGUID+40, @OBJECTPOOLS+4, 0, 'Durotar Peacebloom Southern Razormane 5/11'), +(@OGUID+41, @OBJECTPOOLS+4, 0, 'Durotar Peacebloom Southern Razormane 6/11'), +(@OGUID+42, @OBJECTPOOLS+4, 0, 'Durotar Peacebloom Southern Razormane 7/11'), +(@OGUID+43, @OBJECTPOOLS+4, 0, 'Durotar Peacebloom Southern Razormane 8/11'), +(@OGUID+44, @OBJECTPOOLS+4, 0, 'Durotar Peacebloom Southern Razormane 9/11'), +(@OGUID+45, @OBJECTPOOLS+4, 0, 'Durotar Peacebloom Southern Razormane 10/11'), +(@OGUID+46, @OBJECTPOOLS+4, 0, 'Durotar Peacebloom Southern Razormane 11/11'); + +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(@OBJECTPOOLS+5, 5, 'Durotar Peacebloom Eastern Stretch Pool 6/8'); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(@OGUID+47, @OBJECTPOOLS+5, 0, 'Durotar Peacebloom Eastern Stretch 1/16'), +(@OGUID+48, @OBJECTPOOLS+5, 0, 'Durotar Peacebloom Eastern Stretch 2/16'), +(@OGUID+49, @OBJECTPOOLS+5, 0, 'Durotar Peacebloom Eastern Stretch 3/16'), +(@OGUID+50, @OBJECTPOOLS+5, 0, 'Durotar Peacebloom Eastern Stretch 4/16'), +(@OGUID+51, @OBJECTPOOLS+5, 0, 'Durotar Peacebloom Eastern Stretch 5/16'), +(@OGUID+52, @OBJECTPOOLS+5, 0, 'Durotar Peacebloom Eastern Stretch 6/16'), +(@OGUID+53, @OBJECTPOOLS+5, 0, 'Durotar Peacebloom Eastern Stretch 7/16'), +(@OGUID+54, @OBJECTPOOLS+5, 0, 'Durotar Peacebloom Eastern Stretch 8/16'), +(@OGUID+55, @OBJECTPOOLS+5, 0, 'Durotar Peacebloom Eastern Stretch 9/16'), +(@OGUID+56, @OBJECTPOOLS+5, 0, 'Durotar Peacebloom Eastern Stretch 10/16'), +(@OGUID+57, @OBJECTPOOLS+5, 0, 'Durotar Peacebloom Eastern Stretch 11/16'), +(@OGUID+58, @OBJECTPOOLS+5, 0, 'Durotar Peacebloom Eastern Stretch 12/16'), +(@OGUID+59, @OBJECTPOOLS+5, 0, 'Durotar Peacebloom Eastern Stretch 13/16'), +(@OGUID+60, @OBJECTPOOLS+5, 0, 'Durotar Peacebloom Eastern Stretch 14/16'), +(@OGUID+61, @OBJECTPOOLS+5, 0, 'Durotar Peacebloom Eastern Stretch 15/16'), +(@OGUID+62, @OBJECTPOOLS+5, 0, 'Durotar Peacebloom Eastern Stretch 16/16'); + +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(@OBJECTPOOLS+6, 3, 'Durotar Peacebloom Senjin Echos Pool 7/8'); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(@OGUID+63, @OBJECTPOOLS+6, 0, 'Durotar Peacebloom Senjin Echos 1/7'), +(@OGUID+64, @OBJECTPOOLS+6, 0, 'Durotar Peacebloom Senjin Echos 2/7'), +(@OGUID+65, @OBJECTPOOLS+6, 0, 'Durotar Peacebloom Senjin Echos 3/7'), +(@OGUID+66, @OBJECTPOOLS+6, 0, 'Durotar Peacebloom Senjin Echos 4/7'), +(@OGUID+67, @OBJECTPOOLS+6, 0, 'Durotar Peacebloom Senjin Echos 5/7'), +(@OGUID+68, @OBJECTPOOLS+6, 0, 'Durotar Peacebloom Senjin Echos 6/7'), +(@OGUID+69, @OBJECTPOOLS+6, 0, 'Durotar Peacebloom Senjin Echos 7/7'); + +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(@OBJECTPOOLS+7, 1, 'Durotar Peacebloom Echo Isles Pool 8/8'); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(@OGUID+70, @OBJECTPOOLS+7, 0, 'Durotar Peacebloom Echo Isles 1/5'), +(@OGUID+71, @OBJECTPOOLS+7, 0, 'Durotar Peacebloom Echo Isles 2/5'), +(@OGUID+72, @OBJECTPOOLS+7, 0, 'Durotar Peacebloom Echo Isles 3/5'), +(@OGUID+73, @OBJECTPOOLS+7, 0, 'Durotar Peacebloom Echo Isles 4/5'), +(@OGUID+74, @OBJECTPOOLS+7, 0, 'Durotar Peacebloom Echo Isles 5/5'); + +-- Silverleaf has presumed 68 spawns captured +-- Remove existing Silverleaf from Durotar: +DELETE FROM `gameobject` where `guid` IN (43526, 43530, 43534, 43539, 43541, 43542, 43544, 43545, 43549, 43556, 43558, 43559, 43560, 43562, 43565, 43572, 43573, 43574, 43577, 43578, 43579, 43580, 43581, 43591, 43594, 43595, 43598, 43599, 43602, 43603, 43606, 43607, 43608, 43610, 43611, 43612, 43615, 43618, 43619, 43620, 43621, 43624, 43625, 43630, 43631, 43633, 43634, 43635, 43636, 43640, 43641, 43642, 43643, 43646, 43651, 43654, 43655, 43658, 43661, 43662, 43663, 43664, 43665, 43670, 43671, 43679, 43680, 43681, 43688, 43690, 43691, 43696, 43697, 43698, 43699, 43701, 43702, 43704, 43712, 43715, 43716, 43718, 43720, 43721, 43722, 43724, 43725, 43730, 43732, 43733, 43933, 43936, 43937, 43938, 43979, 43988, 43989, 43990, 43991, 43993, 43994, 43995, 43996, 43997, 43998, 44004, 44005, 44006, 44007, 44014, 44015, 44018, 44019, 44032, 44152, 44153, 44154, 44155, 44163, 44164, 44165, 44169, 44170, 44171, 44172, 44173, 44174, 44178, 44183, 44187, 44188, 44189, 44192, 44196); + +-- Insert Durotar Silverleaf from packets: +SET @OGUID :=55775; +DELETE FROM `gameobject` WHERE `guid` BETWEEN @OGUID+0 AND @OGUID+67; +INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `VerifiedBuild`, `Comment`) VALUES +(@OGUID+5, 1617, 1, 14, 0, 1, 255, 1199.12255859375, -4974.04443359375, 11.18363094329833984, 1.413715124130249023, 0, 0, 0.649447441101074218, 0.760406434535980224, 360, 255, 1, 46779, '5/68 all known Durotar Silverleaf sniffed'), +(@OGUID+6, 1617, 1, 14, 0, 1, 255, 1226.707763671875, -5050.54541015625, 4.648762226104736328, 3.682650327682495117, 0, 0, -0.96362972259521484, 0.26724100112915039, 360, 255, 1, 46779, '6/68 all known Durotar Silverleaf sniffed'), +(@OGUID+2, 1617, 1, 14, 0, 1, 255, 1428.4954833984375, -4748.66650390625, 30.07084465026855468, 2.879789113998413085, 0, 0, 0.991444587707519531, 0.130528271198272705, 360, 255, 1, 46779, '2/68 all known Durotar Silverleaf sniffed'), +(@OGUID+1, 1617, 1, 14, 0, 1, 255, 1402.1968994140625, -4671.181640625, 32.9783782958984375, 2.024578809738159179, 0, 0, 0.848047256469726562, 0.529920578002929687, 360, 255, 1, 46779, '1/68 all known Durotar Silverleaf sniffed'), +(@OGUID+24, 1617, 1, 14, 0, 1, 255, 881.399658203125, -4937.3671875, 11.08956336975097656, 1.832594871520996093, 0, 0, 0.793353080749511718, 0.608761727809906005, 360, 255, 1, 46779, '24/68 all known Durotar Silverleaf sniffed'), +(@OGUID+28, 1617, 1, 14, 0, 1, 255, 654.6025390625, -4906.94287109375, 25.16013526916503906, 4.642575740814208984, 0, 0, -0.731353759765625, 0.681998312473297119, 360, 255, 1, 46779, '28/68 all known Durotar Silverleaf sniffed'), +(@OGUID+30, 1617, 1, 14, 0, 1, 255, 478.513031005859375, -4947.251953125, 33.46242523193359375, 1.797688722610473632, 0, 0, 0.7826080322265625, 0.622514784336090087, 360, 255, 1, 46779, '30/68 all known Durotar Silverleaf sniffed'), +(@OGUID+32, 1617, 1, 14, 0, 1, 255, 332.682281494140625, -4996.80908203125, 19.57125663757324218, 0.034906249493360519, 0, 0, 0.017452239990234375, 0.999847710132598876, 360, 255, 1, 46779, '32/68 all known Durotar Silverleaf sniffed'), +(@OGUID+41, 1617, 1, 14, 0, 1, 255, -116.260200500488281, -5164.296875, 19.90396499633789062, 5.881760597229003906, 0, 0, -0.19936752319335937, 0.979924798011779785, 360, 255, 1, 46779, '41/68 all known Durotar Silverleaf sniffed'), +(@OGUID+45, 1617, 1, 14, 0, 1, 255, -224.297958374023437, -5066.6650390625, 21.06113243103027343, 2.617989301681518554, 0, 0, 0.965925216674804687, 0.258821308612823486, 360, 255, 1, 46779, '45/68 all known Durotar Silverleaf sniffed'), +(@OGUID+46, 1617, 1, 14, 0, 1, 255, -236.168182373046875, -5203.22509765625, 20.0912322998046875, 5.462882041931152343, 0, 0, -0.39874839782714843, 0.917060375213623046, 360, 255, 1, 46779, '46/68 all known Durotar Silverleaf sniffed'), +(@OGUID+62, 1617, 1, 14, 0, 1, 255, -836.31915283203125, -5351.60986328125, 3.831897974014282226, 4.258606910705566406, 0, 0, -0.84804725646972656, 0.529920578002929687, 360, 255, 1, 46779, '62/68 all known Durotar Silverleaf sniffed'), +(@OGUID+60, 1617, 1, 14, 0, 1, 255, -925.78167724609375, -4689.3427734375, 25.75434494018554687, 2.373644113540649414, 0, 0, 0.927183151245117187, 0.37460830807685852, 360, 255, 1, 46779, '60/68 all known Durotar Silverleaf sniffed'), +(@OGUID+47, 1617, 1, 14, 0, 1, 255, -293.876739501953125, -4903.55712890625, 31.53289222717285156, 5.009094715118408203, 0, 0, -0.59482288360595703, 0.80385679006576538, 360, 255, 1, 46779, '47/68 all known Durotar Silverleaf sniffed'), +(@OGUID+37, 1617, 1, 14, 0, 1, 255, 10.69900226593017578, -4619.18017578125, 44.09099578857421875, 5.480334281921386718, 0, 0, -0.39073085784912109, 0.920504987239837646, 360, 255, 1, 46779, '37/68 all known Durotar Silverleaf sniffed'), +(@OGUID+22, 1617, 1, 14, 0, 1, 255, 64.93099212646484375, -4331.1171875, 61.72869110107421875, 3.22885894775390625, 0, 0, -0.99904823303222656, 0.043619260191917419, 360, 255, 1, 46779, '22/68 all known Durotar Silverleaf sniffed'), +(@OGUID+67, 1617, 1, 14, 0, 1, 255, 20.90711784362792968, -4266.0341796875, 72.0731048583984375, 6.265733242034912109, 0, 0, -0.00872611999511718, 0.999961912631988525, 360, 255, 1, 46779, '67/68 all known Durotar Silverleaf sniffed'), +(@OGUID+20, 1617, 1, 14, 0, 1, 255, 101.7131118774414062, -4080.67529296875, 54.75529098510742187, 1.221729278564453125, 0, 0, 0.573575973510742187, 0.819152355194091796, 360, 255, 1, 46779, '20/68 all known Durotar Silverleaf sniffed'), +(@OGUID+15, 1617, 1, 14, 0, 1, 255, 794.43817138671875, -4269.77783203125, 18.87027931213378906, 2.146752834320068359, 0, 0, 0.878816604614257812, 0.477159708738327026, 360, 255, 1, 46779, '15/68 all known Durotar Silverleaf sniffed'), +(@OGUID+11, 1617, 1, 14, 0, 1, 255, 1098.228271484375, -4026.997314453125, 17.61180686950683593, 5.270895957946777343, 0, 0, -0.48480892181396484, 0.87462007999420166, 360, 255, 1, 46779, '11/68 all known Durotar Silverleaf sniffed'), +(@OGUID+10, 1617, 1, 14, 0, 1, 255, 1303.82275390625, -4208.95361328125, 27.4298095703125, 2.809975385665893554, 0, 0, 0.986285209655761718, 0.165049895644187927, 360, 255, 1, 46779, '10/68 all known Durotar Silverleaf sniffed'), +(@OGUID+17, 1617, 1, 14, 0, 1, 255, 540.0294189453125, -4440.9404296875, 36.00847244262695312, 4.956737518310546875, 0, 0, -0.61566066741943359, 0.788011372089385986, 360, 255, 1, 46779, '17/68 all known Durotar Silverleaf sniffed'), +(@OGUID+51, 1617, 1, 14, 0, 1, 255, -496.944671630859375, -4685.08056640625, 38.02862930297851562, 4.293513298034667968, 0, 0, -0.8386697769165039, 0.544640243053436279, 360, 255, 1, 46779, '51/68 all known Durotar Silverleaf sniffed'), +(@OGUID+55, 1617, 1, 14, 0, 1, 255, -665.78558349609375, -5000.4169921875, 24.34447669982910156, 4.555310726165771484, 0, 0, -0.76040554046630859, 0.649448513984680175, 360, 255, 1, 46779, '55/68 all known Durotar Silverleaf sniffed'), +(@OGUID+64, 1617, 1, 14, 0, 1, 255, -1100.570556640625, -5415.5537109375, 12.51249217987060546, 5.829400539398193359, 0, 0, -0.22495079040527343, 0.974370121955871582, 360, 255, 1, 46779, '64/68 all known Durotar Silverleaf sniffed'), +(@OGUID+49, 1617, 1, 14, 0, 1, 255, -410.6124267578125, -4662.3447265625, 42.35511016845703125, 4.607671737670898437, 0, 0, -0.74314403533935546, 0.669131457805633544, 360, 255, 1, 46779, '49/68 all known Durotar Silverleaf sniffed'), +(@OGUID+53, 1617, 1, 14, 0, 1, 255, -547.2413330078125, -4659.25537109375, 40.40694046020507812, 0.471238493919372558, 0, 0, 0.233445167541503906, 0.972369968891143798, 360, 255, 1, 46779, '53/68 all known Durotar Silverleaf sniffed'), +(@OGUID+38, 1617, 1, 14, 0, 1, 255, -62.4102668762207031, -5153.82666015625, 9.282894134521484375, 0.820303261280059814, 0, 0, 0.398748397827148437, 0.917060375213623046, 360, 255, 1, 46779, '38/68 all known Durotar Silverleaf sniffed'), +(@OGUID+43, 1617, 1, 14, 0, 1, 255, -168.53515625, -5166.66943359375, 24.97609519958496093, 0, 0, 0, 0, 1, 360, 255, 1, 46779, '43/68 all known Durotar Silverleaf sniffed'), +(@OGUID+48, 1617, 1, 14, 0, 1, 255, -334.918182373046875, -5162.35498046875, 20.76618766784667968, 3.647741317749023437, 0, 0, -0.96814727783203125, 0.250381410121917724, 360, 255, 1, 46779, '48/68 all known Durotar Silverleaf sniffed'), +(@OGUID+40, 1617, 1, 14, 0, 1, 255, -119.825958251953125, -4860.9248046875, 21.40077590942382812, 4.014260292053222656, 0, 0, -0.90630722045898437, 0.422619491815567016, 360, 255, 1, 46779, '40/68 all known Durotar Silverleaf sniffed'), +(@OGUID+39, 1617, 1, 14, 0, 1, 255, -109.583770751953125, -4607.2548828125, 46.388336181640625, 5.340708732604980468, 0, 0, -0.45398998260498046, 0.891006767749786376, 360, 255, 1, 46779, '39/68 all known Durotar Silverleaf sniffed'), +(@OGUID+34, 1617, 1, 14, 0, 1, 255, 145.64874267578125, -4619.6201171875, 29.96367835998535156, 0.610863447189331054, 0, 0, 0.3007049560546875, 0.953717231750488281, 360, 255, 1, 46779, '34/68 all known Durotar Silverleaf sniffed'), +(@OGUID+21, 1617, 1, 14, 0, 1, 255, 135.734161376953125, -4484.05078125, 36.53779983520507812, 6.12610626220703125, 0, 0, -0.07845878601074218, 0.996917366981506347, 360, 255, 1, 46779, '21/68 all known Durotar Silverleaf sniffed'), +(@OGUID+57, 1617, 1, 14, 0, 1, 255, -801.76409912109375, -4569.8369140625, 49.57865524291992187, 2.967041015625, 0, 0, 0.996193885803222656, 0.087165042757987976, 360, 255, 1, 46779, '57/68 all known Durotar Silverleaf sniffed'), +(@OGUID+58, 1617, 1, 14, 0, 1, 255, -783.00457763671875, -4813.3828125, 20.22387313842773437, 0.680676698684692382, 0, 0, 0.333806037902832031, 0.942641794681549072, 360, 255, 1, 46779, '58/68 all known Durotar Silverleaf sniffed'), +(@OGUID+23, 1617, 1, 14, 0, 1, 255, 62.31228256225585937, -4479.89306640625, 47.769866943359375, 1.588248729705810546, 0, 0, 0.713250160217285156, 0.700909554958343505, 360, 255, 1, 46779, '23/68 all known Durotar Silverleaf sniffed'), +(@OGUID+26, 1617, 1, 14, 0, 1, 255, 758.82586669921875, -4728.86474609375, 37.44508743286132812, 3.961898565292358398, 0, 0, -0.91705989837646484, 0.398749500513076782, 360, 255, 1, 46779, '26/68 all known Durotar Silverleaf sniffed'), +(@OGUID+12, 1617, 1, 14, 0, 1, 255, 1053.7669677734375, -4301.228515625, 17.49706840515136718, 1.274088263511657714, 0, 0, 0.594821929931640625, 0.80385744571685791, 360, 255, 1, 46779, '12/68 all known Durotar Silverleaf sniffed'), +(@OGUID+8, 1617, 1, 14, 0, 1, 255, 1285.0394287109375, -4064.3291015625, 33.28411102294921875, 4.223697185516357421, 0, 0, -0.85716724395751953, 0.515038192272186279, 360, 255, 1, 46779, '8/68 all known Durotar Silverleaf sniffed'), +(@OGUID+7, 1617, 1, 14, 0, 1, 255, 1056.9949951171875, -5000.04345703125, 17.49074172973632812, 4.9218292236328125, 0, 0, -0.62932014465332031, 0.77714616060256958, 360, 255, 1, 46779, '7/68 all known Durotar Silverleaf sniffed'), +(@OGUID+3, 1617, 1, 14, 0, 1, 255, 1429.0692138671875, -4813.3798828125, 24.61579322814941406, 3.769911527633666992, 0, 0, -0.95105648040771484, 0.309017121791839599, 360, 255, 1, 46779, '3/68 all known Durotar Silverleaf sniffed'), +(@OGUID+0, 1617, 1, 14, 0, 1, 255, 1358.301025390625, -4569.46337890625, 37.89192581176757812, 5.969027042388916015, 0, 0, -0.1564340591430664, 0.987688362598419189, 360, 255, 1, 46779, '68/68 all known Durotar Silverleaf sniffed'), +(@OGUID+19, 1617, 1, 14, 0, 1, 255, 295.77886962890625, -4322.27490234375, 33.3949127197265625, 0.488691210746765136, 0, 0, 0.241921424865722656, 0.970295846462249755, 360, 255, 1, 46779, '19/68 all known Durotar Silverleaf sniffed'), +(@OGUID+59, 1617, 1, 14, 0, 1, 255, -840.15277099609375, -4632.03271484375, 40.95009231567382812, 2.164205789566040039, 0, 0, 0.882946968078613281, 0.469472706317901611, 360, 255, 1, 46779, '59/68 all known Durotar Silverleaf sniffed'), +(@OGUID+16, 1617, 1, 14, 0, 1, 255, 776.60968017578125, -4406.03759765625, 18.81634330749511718, 5.532694816589355468, 0, 0, -0.3665008544921875, 0.93041771650314331, 360, 255, 1, 46779, '16/68 all known Durotar Silverleaf sniffed'), +(@OGUID+9, 1617, 1, 14, 0, 1, 255, 1292.541259765625, -4168.68701171875, 27.76622772216796875, 0.226892471313476562, 0, 0, 0.113203048706054687, 0.993571877479553222, 360, 255, 1, 46779, '9/68 all known Durotar Silverleaf sniffed'), +(@OGUID+14, 1617, 1, 14, 0, 1, 255, 763.7265625, -3959.33544921875, 19.37665939331054687, 1.134462952613830566, 0, 0, 0.537299156188964843, 0.843391716480255126, 360, 255, 1, 46779, '14/68 all known Durotar Silverleaf sniffed'), +(@OGUID+25, 1617, 1, 14, 0, 1, 255, 821.03125, -4890.18310546875, 35.38489151000976562, 1.047197580337524414, 0, 0, 0.5, 0.866025388240814208, 360, 255, 1, 46779, '25/68 all known Durotar Silverleaf sniffed'), +(@OGUID+4, 1617, 1, 14, 0, 1, 255, 1216.4288330078125, -4797.841796875, 15.94697761535644531, 1.675513744354248046, 0, 0, 0.743144035339355468, 0.669131457805633544, 360, 255, 1, 46779, '4/68 all known Durotar Silverleaf sniffed'), +(@OGUID+36, 1617, 1, 14, 0, 1, 255, 92.46224212646484375, -4616.64794921875, 49.78679275512695312, 5.044002056121826171, 0, 0, -0.58070278167724609, 0.814115643501281738, 360, 255, 1, 46779, '36/68 all known Durotar Silverleaf sniffed'), +(@OGUID+56, 1617, 1, 14, 0, 1, 255, -690.43206787109375, -5610.8916015625, 26.65709304809570312, 2.129300594329833984, 0, 0, 0.874619483947753906, 0.484810054302215576, 360, 255, 1, 46779, '56/68 all known Durotar Silverleaf sniffed'), +(@OGUID+29, 1617, 1, 14, 0, 1, 255, 553.1600341796875, -4918.81494140625, 27.35105705261230468, 3.857182979583740234, 0, 0, -0.93667125701904296, 0.350209832191467285, 360, 255, 1, 46779, '29/68 all known Durotar Silverleaf sniffed'), +(@OGUID+31, 1617, 1, 14, 0, 1, 255, 429.8603515625, -4974.40625, 36.593505859375, 5.270895957946777343, 0, 0, -0.48480892181396484, 0.87462007999420166, 360, 255, 1, 46779, '31/68 all known Durotar Silverleaf sniffed'), +(@OGUID+33, 1617, 1, 14, 0, 1, 255, 364.98675537109375, -5048.28564453125, 21.98761177062988281, 4.625123500823974609, 0, 0, -0.73727703094482421, 0.67559051513671875, 360, 255, 1, 46779, '33/68 all known Durotar Silverleaf sniffed'), +(@OGUID+18, 1617, 1, 14, 0, 1, 255, 385.5419921875, -4081.228271484375, 32.075347900390625, 4.031712055206298828, 0, 0, -0.90258502960205078, 0.430511653423309326, 360, 255, 1, 46779, '18/68 all known Durotar Silverleaf sniffed'), +(@OGUID+42, 1617, 1, 14, 0, 1, 255, -194.91168212890625, -4635.5029296875, 42.44704055786132812, 3.403396368026733398, 0, 0, -0.99144458770751953, 0.130528271198272705, 360, 255, 1, 46779, '42/68 all known Durotar Silverleaf sniffed'), +(@OGUID+52, 1617, 1, 14, 0, 1, 255, -513.9561767578125, -4869.1884765625, 35.99258041381835937, 6.03883981704711914, 0, 0, -0.12186908721923828, 0.9925462007522583, 360, 255, 1, 46779, '52/68 all known Durotar Silverleaf sniffed'), +(@OGUID+13, 1617, 1, 14, 0, 1, 255, 859.83758544921875, -4397.94384765625, 16.41344642639160156, 4.572763919830322265, 0, 0, -0.75470924377441406, 0.656059443950653076, 360, 255, 1, 46779, '13/68 all known Durotar Silverleaf sniffed'), +(@OGUID+50, 1617, 1, 14, 0, 1, 255, -424.18792724609375, -4871.5634765625, 40.11857986450195312, 0.680676698684692382, 0, 0, 0.333806037902832031, 0.942641794681549072, 360, 255, 1, 46779, '50/68 all known Durotar Silverleaf sniffed'), +(@OGUID+61, 1617, 1, 14, 0, 1, 255, -1028.3353271484375, -4863.8994140625, 8.512418746948242187, 5.567600727081298828, 0, 0, -0.35020732879638671, 0.936672210693359375, 360, 255, 1, 46779, '61/68 all known Durotar Silverleaf sniffed'), +(@OGUID+44, 1617, 1, 14, 0, 1, 255, -255.429473876953125, -4707.501953125, 34.32258224487304687, 3.804818391799926757, 0, 0, -0.94551849365234375, 0.325568377971649169, 360, 255, 1, 46779, '44/68 all known Durotar Silverleaf sniffed'), +(@OGUID+54, 1617, 1, 14, 0, 1, 255, -609.551025390625, -4933.75146484375, 37.45981979370117187, 1.291541695594787597, 0, 0, 0.60181427001953125, 0.798636078834533691, 360, 255, 1, 46779, '54/68 all known Durotar Silverleaf sniffed'), +(@OGUID+35, 1617, 1, 14, 0, 1, 255, 117.1783828735351562, -4960.396484375, 9.156251907348632812, 2.024578809738159179, 0, 0, 0.848047256469726562, 0.529920578002929687, 360, 255, 1, 46779, '35/68 all known Durotar Silverleaf sniffed'), +(@OGUID+66, 1617, 1, 14, 0, 1, 255, -1390.3603515625, -5156.8828125, 2.4388580322265625, 2.809975385665893554, 0, 0, 0.986285209655761718, 0.165049895644187927, 360, 255, 1, 46779, '66/68 all known Durotar Silverleaf sniffed'), +(@OGUID+27, 1617, 1, 14, 0, 1, 255, 716.880126953125, -5005.5654296875, 15.14517402648925781, 6.265733242034912109, 0, 0, -0.00872611999511718, 0.999961912631988525, 360, 255, 1, 46779, '27/68 all known Durotar Silverleaf sniffed'), +(@OGUID+65, 1617, 1, 14, 0, 1, 255, -1244.3306884765625, -5499.28369140625, 5.331966876983642578, 1.535889506340026855, 0, 0, 0.694658279418945312, 0.719339847564697265, 360, 255, 1, 46779, '65/68 all known Durotar Silverleaf sniffed'), +(@OGUID+63, 1617, 1, 14, 0, 1, 255, -1118.697509765625, -5156.806640625, 1.814450979232788085, 0.802850961685180664, 0, 0, 0.390730857849121093, 0.920504987239837646, 360, 255, 1, 46779, '63/68 all known Durotar Silverleaf sniffed'); + +-- Make Durotar Silverleaf Pooling: +SET @OBJECTPOOLS :=129; +DELETE FROM `pool_gameobject` WHERE `guid` BETWEEN @OGUID+0 AND @OGUID+67; +DELETE FROM `pool_template` WHERE `entry` BETWEEN @OBJECTPOOLS+0 AND @OBJECTPOOLS+7; + +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(@OBJECTPOOLS+0, 4, 'Durotar Silverleaf NW Pool 1/7'); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(@OGUID+0, @OBJECTPOOLS+0, 0, 'Durotar Silverleaf NW 1/7'), +(@OGUID+1, @OBJECTPOOLS+0, 0, 'Durotar Silverleaf NW 2/8'), +(@OGUID+2, @OBJECTPOOLS+0, 0, 'Durotar Silverleaf NW 3/8'), +(@OGUID+3, @OBJECTPOOLS+0, 0, 'Durotar Silverleaf NW 4/8'), +(@OGUID+4, @OBJECTPOOLS+0, 0, 'Durotar Silverleaf NW 5/8'), +(@OGUID+5, @OBJECTPOOLS+0, 0, 'Durotar Silverleaf NW 6/8'), +(@OGUID+6, @OBJECTPOOLS+0, 0, 'Durotar Silverleaf NW 7/8'), +(@OGUID+7, @OBJECTPOOLS+0, 0, 'Durotar Silverleaf NW 8/8'); + +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(@OBJECTPOOLS+1, 3, 'Durotar Silverleaf NW Pool 2/7'); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(@OGUID+8, @OBJECTPOOLS+1, 0, 'Durotar Silverleaf NW 1/5'), +(@OGUID+9, @OBJECTPOOLS+1, 0, 'Durotar Silverleaf NW 2/5'), +(@OGUID+10, @OBJECTPOOLS+1, 0, 'Durotar Silverleaf NW 3/5'), +(@OGUID+11, @OBJECTPOOLS+1, 0, 'Durotar Silverleaf NW 4/5'), +(@OGUID+12, @OBJECTPOOLS+1, 0, 'Durotar Silverleaf NW 5/5'); + +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(@OBJECTPOOLS+2, 4, 'Durotar Silverleaf West Pool 3/7'); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(@OGUID+13, @OBJECTPOOLS+2, 0, 'Durotar Silverleaf West 1/12'), +(@OGUID+14, @OBJECTPOOLS+2, 0, 'Durotar Silverleaf West 2/12'), +(@OGUID+15, @OBJECTPOOLS+2, 0, 'Durotar Silverleaf West 3/12'), +(@OGUID+16, @OBJECTPOOLS+2, 0, 'Durotar Silverleaf West 4/12'), +(@OGUID+17, @OBJECTPOOLS+2, 0, 'Durotar Silverleaf West 5/12'), +(@OGUID+18, @OBJECTPOOLS+2, 0, 'Durotar Silverleaf West 6/12'), +(@OGUID+19, @OBJECTPOOLS+2, 0, 'Durotar Silverleaf West 7/12'), +(@OGUID+20, @OBJECTPOOLS+2, 0, 'Durotar Silverleaf West 8/12'), +(@OGUID+21, @OBJECTPOOLS+2, 0, 'Durotar Silverleaf West 9/12'), +(@OGUID+22, @OBJECTPOOLS+2, 0, 'Durotar Silverleaf West 10/12'), +(@OGUID+23, @OBJECTPOOLS+2, 0, 'Durotar Silverleaf West 11/12'), +(@OGUID+67, @OBJECTPOOLS+2, 0, 'Durotar Silverleaf West 12/12'); + +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(@OBJECTPOOLS+3, 5, 'Durotar Silverleaf East Valley Pool 4/7'); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(@OGUID+24, @OBJECTPOOLS+3, 0, 'Durotar Silverleaf East Valley 1/14'), +(@OGUID+25, @OBJECTPOOLS+3, 0, 'Durotar Silverleaf East Valley 2/14'), +(@OGUID+26, @OBJECTPOOLS+3, 0, 'Durotar Silverleaf East Valley 3/14'), +(@OGUID+27, @OBJECTPOOLS+3, 0, 'Durotar Silverleaf East Valley 4/14'), +(@OGUID+28, @OBJECTPOOLS+3, 0, 'Durotar Silverleaf East Valley 5/14'), +(@OGUID+29, @OBJECTPOOLS+3, 0, 'Durotar Silverleaf East Valley 6/14'), +(@OGUID+30, @OBJECTPOOLS+3, 0, 'Durotar Silverleaf East Valley 7/14'), +(@OGUID+31, @OBJECTPOOLS+3, 0, 'Durotar Silverleaf East Valley 8/14'), +(@OGUID+32, @OBJECTPOOLS+3, 0, 'Durotar Silverleaf East Valley 9/14'), +(@OGUID+33, @OBJECTPOOLS+3, 0, 'Durotar Silverleaf East Valley 10/14'), +(@OGUID+34, @OBJECTPOOLS+3, 0, 'Durotar Silverleaf East Valley 11/14'), +(@OGUID+35, @OBJECTPOOLS+3, 0, 'Durotar Silverleaf East Valley 12/14'), +(@OGUID+36, @OBJECTPOOLS+3, 0, 'Durotar Silverleaf East Valley 13/14'), +(@OGUID+37, @OBJECTPOOLS+3, 0, 'Durotar Silverleaf East Valley 14/14'); + +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(@OBJECTPOOLS+4, 8, 'Durotar Silverleaf East Coast Pool 5/7'); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(@OGUID+38, @OBJECTPOOLS+4, 0, 'Durotar Silverleaf East Coast 1/17'), +(@OGUID+39, @OBJECTPOOLS+4, 0, 'Durotar Silverleaf East Coast 2/17'), +(@OGUID+40, @OBJECTPOOLS+4, 0, 'Durotar Silverleaf East Coast 3/17'), +(@OGUID+41, @OBJECTPOOLS+4, 0, 'Durotar Silverleaf East Coast 4/17'), +(@OGUID+42, @OBJECTPOOLS+4, 0, 'Durotar Silverleaf East Coast 5/17'), +(@OGUID+43, @OBJECTPOOLS+4, 0, 'Durotar Silverleaf East Coast 6/17'), +(@OGUID+44, @OBJECTPOOLS+4, 0, 'Durotar Silverleaf East Coast 7/17'), +(@OGUID+45, @OBJECTPOOLS+4, 0, 'Durotar Silverleaf East Coast 8/17'), +(@OGUID+46, @OBJECTPOOLS+4, 0, 'Durotar Silverleaf East Coast 9/17'), +(@OGUID+47, @OBJECTPOOLS+4, 0, 'Durotar Silverleaf East Coast 10/17'), +(@OGUID+48, @OBJECTPOOLS+4, 0, 'Durotar Silverleaf East Coast 11/17'), +(@OGUID+49, @OBJECTPOOLS+4, 0, 'Durotar Silverleaf East Coast 12/17'), +(@OGUID+50, @OBJECTPOOLS+4, 0, 'Durotar Silverleaf East Coast 13/17'), +(@OGUID+51, @OBJECTPOOLS+4, 0, 'Durotar Silverleaf East Coast 14/17'), +(@OGUID+52, @OBJECTPOOLS+4, 0, 'Durotar Silverleaf East Coast 15/17'), +(@OGUID+53, @OBJECTPOOLS+4, 0, 'Durotar Silverleaf East Coast 16/17'), +(@OGUID+54, @OBJECTPOOLS+4, 0, 'Durotar Silverleaf East Coast 17/17'); + +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(@OBJECTPOOLS+5, 2, 'Durotar Silverleaf Senjin Echo Pool 6/7'); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(@OGUID+55, @OBJECTPOOLS+5, 0, 'Durotar Silverleaf Senjin Echo 1/7'), +(@OGUID+56, @OBJECTPOOLS+5, 0, 'Durotar Silverleaf Senjin Echo 2/7'), +(@OGUID+57, @OBJECTPOOLS+5, 0, 'Durotar Silverleaf Senjin Echo 3/7'), +(@OGUID+58, @OBJECTPOOLS+5, 0, 'Durotar Silverleaf Senjin Echo 4/7'), +(@OGUID+59, @OBJECTPOOLS+5, 0, 'Durotar Silverleaf Senjin Echo 5/7'), +(@OGUID+60, @OBJECTPOOLS+5, 0, 'Durotar Silverleaf Senjin Echo 6/7'), +(@OGUID+61, @OBJECTPOOLS+5, 0, 'Durotar Silverleaf Senjin Echo 7/7'); + +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(@OBJECTPOOLS+6, 1, 'Durotar Silverleaf Echo Isles Pool 7/7'); +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(@OGUID+62, @OBJECTPOOLS+6, 0, 'Durotar Silverleaf Echo Isles 1/5'), +(@OGUID+63, @OBJECTPOOLS+6, 0, 'Durotar Silverleaf Echo Isles 2/5'), +(@OGUID+64, @OBJECTPOOLS+6, 0, 'Durotar Silverleaf Echo Isles 3/5'), +(@OGUID+65, @OBJECTPOOLS+6, 0, 'Durotar Silverleaf Echo Isles 4/5'), +(@OGUID+66, @OBJECTPOOLS+6, 0, 'Durotar Silverleaf Echo Isles 5/5'); diff --git a/data/sql/updates/db_world/2023_10_12_01.sql b/data/sql/updates/db_world/2023_10_12_01.sql new file mode 100644 index 000000000..342579666 --- /dev/null +++ b/data/sql/updates/db_world/2023_10_12_01.sql @@ -0,0 +1,8 @@ +-- DB update 2023_10_12_00 -> 2023_10_12_01 +-- Item - Chamber of Aspects 25 Nuker Trinket +DELETE FROM `spell_proc_event` WHERE `entry` = 75465; +INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `procPhase`, `ppmRate`, `CustomChance`, `Cooldown`) VALUES +(75465,0,0,0,0,0,0,0,0,0,0,45000); + +-- Item - Chamber of Aspects 25 Heroic Nuker Trinket +UPDATE `spell_proc_event` SET `Cooldown` = 45000 WHERE `entry` = 75474; diff --git a/data/sql/updates/db_world/2023_10_12_02.sql b/data/sql/updates/db_world/2023_10_12_02.sql new file mode 100644 index 000000000..af24c967f --- /dev/null +++ b/data/sql/updates/db_world/2023_10_12_02.sql @@ -0,0 +1,8 @@ +-- DB update 2023_10_12_01 -> 2023_10_12_02 +-- 37565 - Flexibility | Item - Priest T4 Holy/Discipline 4P Bonus +DELETE FROM `spell_script_names` WHERE `spell_id`=37565; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES (37565, 'spell_pri_t4_4p_bonus'); + +DELETE FROM `spell_proc_event` WHERE `entry`=37565; +INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `procPhase`, `ppmRate`, `CustomChance`, `Cooldown`) VALUES +(37565, 0, 6, 4096, 0, 0, 16384, 0, 1, 0, 0, 0); diff --git a/data/sql/updates/db_world/2023_10_12_03.sql b/data/sql/updates/db_world/2023_10_12_03.sql new file mode 100644 index 000000000..159bffee9 --- /dev/null +++ b/data/sql/updates/db_world/2023_10_12_03.sql @@ -0,0 +1,3 @@ +-- DB update 2023_10_12_02 -> 2023_10_12_03 +-- Seeking the Kor Gem, Bailor's Ore Shipment +UPDATE `quest_template_addon` SET `PrevQuestID` = 1653 WHERE `ID` IN (1442,1655); diff --git a/data/sql/updates/db_world/2023_10_12_04.sql b/data/sql/updates/db_world/2023_10_12_04.sql new file mode 100644 index 000000000..c2bd26599 --- /dev/null +++ b/data/sql/updates/db_world/2023_10_12_04.sql @@ -0,0 +1,12 @@ +-- DB update 2023_10_12_03 -> 2023_10_12_04 +-- Gor'mul RP +DELETE FROM `smart_scripts` WHERE `entryorguid` = 2792 AND `source_type` = 0; +DELETE FROM `smart_scripts` WHERE `entryorguid` = 279200 AND `source_type` = 9; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `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 +(2792, 0, 0, 0, 20, 0, 100, 0, 702, 0, 0, 0, 0, 0, 80, 279200, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Gor\'mul - On Quest \'Guile of the Raptor (Part 2)\' finished - Run Script'), +(279200, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 83, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Gor\'mul - On Script - Remove Npc Flag Questgiver'), +(279200, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 4153, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Gor\'mul - On Script - Cast Guile of the Raptor'), +(279200, 9, 2, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Gor\'mul - On Script - Say Line 0'), +(279200, 9, 3, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Gor\'mul - On Script - Say Line 1'), +(279200, 9, 4, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Gor\'mul - On Script - Say Line 2'), +(279200, 9, 5, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 0, 0, 82, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Gor\'mul - On Script - Add Npc Flag Questgiver'); diff --git a/data/sql/updates/db_world/2023_10_15_00.sql b/data/sql/updates/db_world/2023_10_15_00.sql new file mode 100644 index 000000000..60c9ff02d --- /dev/null +++ b/data/sql/updates/db_world/2023_10_15_00.sql @@ -0,0 +1,11 @@ +-- DB update 2023_10_12_04 -> 2023_10_15_00 +-- Paelarin +DELETE FROM `gossip_menu` WHERE (`MenuID` = 7311) AND (`TextID` IN (8679)); +INSERT INTO `gossip_menu` (`MenuID`, `TextID`) VALUES +(7311, 8679); + +DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 15) AND (`SourceGroup` = 7311) AND (`SourceEntry` = 0); +DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 14) AND (`SourceGroup` = 7311) AND (`SourceEntry` = 8679); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(15, 7311, 0, 0, 0, 16, 0, 128, 0, 0, 1, 0, 0, '', 'Show gossip menu 7311 option 0 only if player is not a troll.'), +(14, 7311, 8679, 0, 0, 16, 0, 128, 0, 0, 0, 0, 0, '', 'Show gossip menu 7311, npc text 8679 only if player race is a troll.'); diff --git a/data/sql/updates/db_world/2023_10_16_00.sql b/data/sql/updates/db_world/2023_10_16_00.sql new file mode 100644 index 000000000..a1dbb5c37 --- /dev/null +++ b/data/sql/updates/db_world/2023_10_16_00.sql @@ -0,0 +1,3 @@ +-- DB update 2023_10_15_00 -> 2023_10_16_00 +-- +UPDATE `creature_template` SET `flags_extra` = `flags_extra`|256 WHERE `entry` = 21216; diff --git a/data/sql/updates/db_world/2023_10_16_01.sql b/data/sql/updates/db_world/2023_10_16_01.sql new file mode 100644 index 000000000..4d38e9401 --- /dev/null +++ b/data/sql/updates/db_world/2023_10_16_01.sql @@ -0,0 +1,4 @@ +-- DB update 2023_10_16_00 -> 2023_10_16_01 +-- Scourge Banner +DELETE FROM `spell_script_names` WHERE `spell_id`=16989 AND `ScriptName`='spell_gen_planting_scourge_banner'; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES (16989, 'spell_gen_planting_scourge_banner'); diff --git a/data/sql/updates/db_world/2023_10_16_02.sql b/data/sql/updates/db_world/2023_10_16_02.sql new file mode 100644 index 000000000..23bcc6ae5 --- /dev/null +++ b/data/sql/updates/db_world/2023_10_16_02.sql @@ -0,0 +1,6 @@ +-- DB update 2023_10_16_01 -> 2023_10_16_02 +-- Elder Cloud Serpent +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 4119); +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 +(4119, 0, 0, 0, 0, 0, 100, 0, 0, 0, 3400, 4800, 0, 0, 11, 8246, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Elder Cloud Serpent - In Combat - Cast \'Lightning Bolt\''), +(4119, 0, 1, 0, 0, 0, 100, 0, 0, 0, 7000, 11000, 0, 0, 11, 421, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Elder Cloud Serpent - In Combat - Cast \'Chain Lightning\''); diff --git a/data/sql/updates/db_world/2023_10_16_03.sql b/data/sql/updates/db_world/2023_10_16_03.sql new file mode 100644 index 000000000..8e27ac3a9 --- /dev/null +++ b/data/sql/updates/db_world/2023_10_16_03.sql @@ -0,0 +1,5 @@ +-- DB update 2023_10_16_02 -> 2023_10_16_03 +-- +DELETE FROM `spell_proc_event` WHERE `entry`=35399; +INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `procPhase`, `ppmRate`, `CustomChance`, `Cooldown`) VALUES +(35399, 0, 0, 0, 0, 0, 131072, 2048, 0, 0, 0, 0); diff --git a/data/sql/updates/db_world/2023_10_16_04.sql b/data/sql/updates/db_world/2023_10_16_04.sql new file mode 100644 index 000000000..e1979fa67 --- /dev/null +++ b/data/sql/updates/db_world/2023_10_16_04.sql @@ -0,0 +1,3 @@ +-- DB update 2023_10_16_03 -> 2023_10_16_04 +-- Shamanistic Rage PPM 10 -> 18 +UPDATE `spell_proc_event` SET `ppmRate` = 18 WHERE `entry` = 30823; diff --git a/data/sql/updates/db_world/2023_10_17_00.sql b/data/sql/updates/db_world/2023_10_17_00.sql new file mode 100644 index 000000000..0e6e9794d --- /dev/null +++ b/data/sql/updates/db_world/2023_10_17_00.sql @@ -0,0 +1,43 @@ +-- DB update 2023_10_16_04 -> 2023_10_17_00 +-- Move Mindless Skeletons (11197) created by Baron Rivendare (10440) +-- to more accurate locations based on sniffed data. +DELETE FROM `spell_target_position` WHERE `ID`=17475 AND `EffectIndex`=0; +INSERT INTO `spell_target_position` (`ID`, `EffectIndex`, `MapID`, `PositionX`, `PositionY`, `PositionZ`, `Orientation`, `VerifiedBuild`) VALUES (17475, 0, 329, 4012.92, -3365.70, 116.251, 0.745, 50664); +DELETE FROM `spell_target_position` WHERE `ID`=17476 AND `EffectIndex`=0; +INSERT INTO `spell_target_position` (`ID`, `EffectIndex`, `MapID`, `PositionX`, `PositionY`, `PositionZ`, `Orientation`, `VerifiedBuild`) VALUES (17476, 0, 329, 4009.10, -3352.31, 116.712, 0.299, 50664); +DELETE FROM `spell_target_position` WHERE `ID`=17477 AND `EffectIndex`=0; +INSERT INTO `spell_target_position` (`ID`, `EffectIndex`, `MapID`, `PositionX`, `PositionY`, `PositionZ`, `Orientation`, `VerifiedBuild`) VALUES (17477, 0, 329, 4013.96, -3338.65, 116.242, 6.094, 50664); +DELETE FROM `spell_target_position` WHERE `ID`=17478 AND `EffectIndex`=0; +INSERT INTO `spell_target_position` (`ID`, `EffectIndex`, `MapID`, `PositionX`, `PositionY`, `PositionZ`, `Orientation`, `VerifiedBuild`) VALUES (17478, 0, 329, 4051.75, -3339.05, 116.241, 3.340, 50664); +DELETE FROM `spell_target_position` WHERE `ID`=17479 AND `EffectIndex`=0; +INSERT INTO `spell_target_position` (`ID`, `EffectIndex`, `MapID`, `PositionX`, `PositionY`, `PositionZ`, `Orientation`, `VerifiedBuild`) VALUES (17479, 0, 329, 4055.96, -3351.46, 116.586, 2.870, 50664); +DELETE FROM `spell_target_position` WHERE `ID`=17480 AND `EffectIndex`=0; +INSERT INTO `spell_target_position` (`ID`, `EffectIndex`, `MapID`, `PositionX`, `PositionY`, `PositionZ`, `Orientation`, `VerifiedBuild`) VALUES (17480, 0, 329, 4053.11, -3364.98, 116.402, 2.287, 50664); + +-- Additionally, cause the Baron to despawn his summoned Mindless Skeletons +-- when he is reset. +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 10440; + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 10440); +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 +(10440, 0, 0, 0, 0, 0, 100, 0, 4000, 9000, 7000, 11000, 0, 0, 11, 15284, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Baron Rivendare - In Combat - Cast \'Cleave\''), +(10440, 0, 1, 0, 0, 0, 100, 0, 1000, 6000, 6000, 9000, 0, 0, 11, 17393, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Baron Rivendare - In Combat - Cast \'Shadow Bolt\''), +(10440, 0, 2, 0, 0, 0, 100, 0, 7000, 11000, 9000, 15000, 0, 0, 11, 15708, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Baron Rivendare - In Combat - Cast \'Mortal Strike\''), +(10440, 0, 3, 0, 0, 0, 100, 513, 0, 0, 0, 0, 0, 0, 11, 17467, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Baron Rivendare - In Combat - Cast \'Unholy Aura\' (No Repeat)'), +(10440, 0, 4, 5, 0, 0, 100, 0, 10000, 10000, 20000, 20000, 0, 0, 11, 17473, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Baron Rivendare - In Combat - Cast \'Raise Dead\''), +(10440, 0, 5, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Baron Rivendare - In Combat - Say Line 7'), +(10440, 0, 6, 0, 0, 0, 100, 0, 22000, 22000, 20000, 20000, 0, 0, 1, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Baron Rivendare - In Combat - Say Line 8'), +(10440, 0, 7, 8, 0, 0, 100, 512, 11000, 11000, 20000, 20000, 0, 0, 11, 17475, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Baron Rivendare - In Combat - Cast \'Raise Dead\''), +(10440, 0, 8, 9, 61, 0, 100, 512, 0, 0, 0, 0, 0, 0, 11, 17476, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Baron Rivendare - In Combat - Cast \'Raise Dead\''), +(10440, 0, 9, 10, 61, 0, 100, 512, 0, 0, 0, 0, 0, 0, 11, 17477, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Baron Rivendare - In Combat - Cast \'Raise Dead\''), +(10440, 0, 10, 11, 61, 0, 100, 512, 0, 0, 0, 0, 0, 0, 11, 17478, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Baron Rivendare - In Combat - Cast \'Raise Dead\''), +(10440, 0, 11, 12, 61, 0, 100, 512, 0, 0, 0, 0, 0, 0, 11, 17479, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Baron Rivendare - In Combat - Cast \'Raise Dead\''), +(10440, 0, 12, 0, 61, 0, 100, 512, 0, 0, 0, 0, 0, 0, 11, 17480, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Baron Rivendare - In Combat - Cast \'Raise Dead\''), +(10440, 0, 13, 0, 6, 0, 100, 512, 0, 0, 0, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 19, 16031, 100, 0, 0, 0, 0, 0, 0, 'Baron Rivendare - On Just Died - Free Prisoner'), +(10440, 0, 14, 0, 4, 0, 100, 512, 0, 0, 0, 0, 0, 0, 118, 1, 0, 0, 0, 0, 0, 14, 35848, 0, 0, 0, 0, 0, 0, 0, 'Baron Rivendare - On Aggro - Set GO State To 1'), +(10440, 0, 15, 0, 6, 0, 100, 512, 0, 0, 0, 0, 0, 0, 118, 0, 0, 0, 0, 0, 0, 14, 35848, 0, 0, 0, 0, 0, 0, 0, 'Baron Rivendare - On Just Died - Set GO State To 0'), +(10440, 0, 16, 0, 25, 0, 100, 512, 0, 0, 0, 0, 0, 0, 118, 0, 0, 0, 0, 0, 0, 14, 35848, 0, 0, 0, 0, 0, 0, 0, 'Baron Rivendare - On Reset - Set GO State To 0'), +(10440, 0, 17, 18, 0, 0, 100, 512, 1000, 1000, 100, 100, 0, 0, 118, 0, 0, 0, 0, 0, 0, 14, 35848, 0, 0, 0, 0, 0, 0, 0, 'Baron Rivendare - In Combat - Set GO State To 0'), +(10440, 0, 18, 0, 61, 0, 100, 512, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Baron Rivendare - In Combat - Evade'), +(10440, 0, 19, 0, 25, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 204, 11197, 0, 0, 0, 0, 0, 0, 0, 'Baron Rivendare - On Reset - Kill Summoned Creatures'); + diff --git a/data/sql/updates/db_world/2023_10_17_01.sql b/data/sql/updates/db_world/2023_10_17_01.sql new file mode 100644 index 000000000..902b068f0 --- /dev/null +++ b/data/sql/updates/db_world/2023_10_17_01.sql @@ -0,0 +1,6 @@ +-- DB update 2023_10_17_00 -> 2023_10_17_01 +-- Minor Manifestation of Earth +UPDATE `creature_template` SET `AIName` = '' WHERE `entry` = 5891; +UPDATE `creature_template_addon` SET `auras` = '8203' WHERE (`entry` = 5891); + +DELETE FROM `smart_scripts` WHERE (`entryorguid` = 5891) AND (`source_type` = 0); diff --git a/data/sql/updates/db_world/2023_10_17_02.sql b/data/sql/updates/db_world/2023_10_17_02.sql new file mode 100644 index 000000000..05fdf6a15 --- /dev/null +++ b/data/sql/updates/db_world/2023_10_17_02.sql @@ -0,0 +1,14 @@ +-- DB update 2023_10_17_01 -> 2023_10_17_02 +-- Midsummer Celebrants - Applause/Cheer +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 16781; + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 16781); +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 +(16781, 0, 0, 1, 8, 0, 100, 0, 45407, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Midsummer Celebrant - On Spellhit \'Reveler - Applause/Cheer\' - Set Orientation Invoker'), +(16781, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 80, 1678100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Midsummer Celebrant - On Spellhit \'Reveler - Applause/Cheer\' - Run Script'); + +DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 1678100); +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 +(1678100, 9, 0, 0, 0, 0, 100, 0, 100, 100, 0, 0, 0, 0, 10, 4, 21, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Midsummer Celebrant - Actionlist - Play Random Emote (4, 21)'), +(1678100, 9, 1, 0, 0, 0, 100, 0, 4200, 4200, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Midsummer Celebrant - Actionlist - Set Orientation Home Position'); + diff --git a/data/sql/updates/db_world/2023_10_17_03.sql b/data/sql/updates/db_world/2023_10_17_03.sql new file mode 100644 index 000000000..c9dbafdc9 --- /dev/null +++ b/data/sql/updates/db_world/2023_10_17_03.sql @@ -0,0 +1,12 @@ +-- DB update 2023_10_17_02 -> 2023_10_17_03 +-- Eridan Bluewind +DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 911600); +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 +(911600, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 83, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Eridan Bluewind - On Script - Remove Npc Flags Gossip & Questgiver'), +(911600, 9, 1, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Eridan Bluewind - On Script - Say Line 0'), +(911600, 9, 2, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 2.59669, 'Eridan Bluewind - On Script - Set Orientation 2,59669'), +(911600, 9, 3, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 0, 0, 11, 28892, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Eridan Bluewind - On Script - Cast \'Nature Channeling\''), +(911600, 9, 4, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 2.72271, 'Eridan Bluewind - On Script - Set Orientation 2,72271'), +(911600, 9, 5, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Eridan Bluewind - On Script - Say Line 1'), +(911600, 9, 6, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 28, 28892, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Eridan Bluewind - On Script - Remove Aura \'Nature Channeling\''), +(911600, 9, 7, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 0, 0, 82, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Eridan Bluewind - On Script - Add Npc Flags Gossip & Questgiver'); diff --git a/data/sql/updates/db_world/2023_10_17_04.sql b/data/sql/updates/db_world/2023_10_17_04.sql new file mode 100644 index 000000000..d04d20561 --- /dev/null +++ b/data/sql/updates/db_world/2023_10_17_04.sql @@ -0,0 +1,7 @@ +-- DB update 2023_10_17_03 -> 2023_10_17_04 +-- +DELETE FROM `creature` WHERE `guid` IN (93763, 93764, 93765); +INSERT INTO `creature` (`guid`, `id1`, `id2`, `id3`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `ScriptName`, `VerifiedBuild`, `CreateObject`, `Comment`) VALUES +(93763, 21964, 0, 0, 548, 0, 0, 1, 1, 0, 463.83, -540.23, -7.54, 3.15, 604800, 0, 0, 603120, 161550, 0, 0, 0, 0, '', 0, 0, NULL), +(93764, 21965, 0, 0, 548, 0, 0, 1, 1, 1, 459.61, -534.81, -7.54, 3.82, 604800, 0, 0, 603120, 161550, 0, 0, 0, 0, '', 0, 0, NULL), +(93765, 21966, 0, 0, 548, 0, 0, 1, 1, 1, 459.94, -547.28, -7.54, 2.42, 604800, 0, 0, 603120, 161550, 0, 0, 0, 0, '', 0, 0, NULL); diff --git a/data/sql/updates/db_world/2023_10_17_05.sql b/data/sql/updates/db_world/2023_10_17_05.sql new file mode 100644 index 000000000..1c76ed537 --- /dev/null +++ b/data/sql/updates/db_world/2023_10_17_05.sql @@ -0,0 +1,4 @@ +-- DB update 2023_10_17_04 -> 2023_10_17_05 +-- +UPDATE `creature_template_addon` SET `auras` = '35777 43905' WHERE `entry` = 23698; +UPDATE `creature_addon` SET `auras` = '35777 43905 44096' WHERE `guid` = 88960; diff --git a/data/sql/updates/db_world/2023_10_17_06.sql b/data/sql/updates/db_world/2023_10_17_06.sql new file mode 100644 index 000000000..aa21f2f40 --- /dev/null +++ b/data/sql/updates/db_world/2023_10_17_06.sql @@ -0,0 +1,6 @@ +-- DB update 2023_10_17_05 -> 2023_10_17_06 +-- Ravenous Windroc +UPDATE `smart_scripts` SET `action_param2` = 0 WHERE `entryorguid` = 18220 AND `source_type` = 0 AND `id` = 0; + +DELETE FROM `spell_custom_attr` WHERE `spell_id`=30285; +INSERT INTO `spell_custom_attr` (`spell_id`, `attributes`) VALUES (30285, 4194304); diff --git a/data/sql/updates/db_world/2023_10_17_07.sql b/data/sql/updates/db_world/2023_10_17_07.sql new file mode 100644 index 000000000..6438a8a53 --- /dev/null +++ b/data/sql/updates/db_world/2023_10_17_07.sql @@ -0,0 +1,3 @@ +-- DB update 2023_10_17_06 -> 2023_10_17_07 +-- Moroes guests +UPDATE `creature_template` SET `minlevel` = 70, `maxlevel` = 70 WHERE (`entry` = 19874); diff --git a/data/sql/updates/db_world/2023_10_18_00.sql b/data/sql/updates/db_world/2023_10_18_00.sql new file mode 100644 index 000000000..27ab6a99c --- /dev/null +++ b/data/sql/updates/db_world/2023_10_18_00.sql @@ -0,0 +1,15 @@ +-- DB update 2023_10_17_07 -> 2023_10_18_00 +-- midsummer creatureAI npc_midsummer_ribbon_pole_target +UPDATE `creature_template` SET `ScriptName` = 'npc_midsummer_ribbon_pole_target' WHERE `entry` = 17066; + +-- midsummer NPC Big Dancing Flame - SmartAI - fire dance spell +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 26267; + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 26267); +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 +(26267, 0, 0, 0, 54, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 45418, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Big Dancing Flames - On Just Summoned - Cast Spell \'Fire Dancing\''); + +-- midsummer add spell script spell_midsummer_ribbon_pole_firework +DELETE FROM `spell_script_names` WHERE `spell_id` = 46847; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(46847, 'spell_midsummer_ribbon_pole_firework'); diff --git a/data/sql/updates/db_world/2023_10_18_01.sql b/data/sql/updates/db_world/2023_10_18_01.sql new file mode 100644 index 000000000..1ecbaf702 --- /dev/null +++ b/data/sql/updates/db_world/2023_10_18_01.sql @@ -0,0 +1,23 @@ +-- DB update 2023_10_18_00 -> 2023_10_18_01 +-- Use sniffed values for Midsummer Music Doodad spawns +DELETE FROM `gameobject` WHERE `id` = 188174 AND `guid` IN (50573, 50571, 50557, 50556, 50555, 50554, 50553, 50552); +INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `VerifiedBuild`) VALUES +(50573, 188174, 0, 0, 0, 1, 1, -4695.85888671875, -1218.7857666015625, 501.659393310546875, 5.93412017822265625, 0, 0, -0.17364788055419921, 0.984807789325714111, 120, 255, 1, 50063), +(50571, 188174, 0, 0, 0, 1, 1, 1817.0294189453125, 223.62457275390625, 59.57859420776367187, 3.089183330535888671, 0, 0, 0.99965667724609375, 0.026201646775007247, 120, 255, 1, 50063), +(50557, 188174, 530, 0, 0, 1, 1, -1748.7203369140625, 5333.59619140625, -12.4281425476074218, 4.398232460021972656, 0, 0, -0.80901622772216796, 0.587786316871643066, 120, 255, 1, 50063), +(50556, 188174, 1, 0, 0, 1, 1, -1023.13018798828125, 298.5625, 135.745941162109375, 1.640606880187988281, 0, 0, 0.731352806091308593, 0.6819993257522583, 120, 255, 1, 50063), +(50555, 188174, 1, 0, 0, 1, 1, 8703.021484375, 947.47265625, 13.45331859588623046, 3.857182979583740234, 0, 0, -0.93667125701904296, 0.350209832191467285, 120, 255, 1, 50063), +(50554, 188174, 0, 0, 0, 1, 1, -8836.6044921875, 866.36004638671875, 98.71681976318359375, 2.094393253326416015, 0, 0, 0.866024971008300781, 0.50000077486038208, 120, 255, 1, 50063), +(50553, 188174, 530, 0, 0, 1, 1, 9794.822265625, -7248.7412109375, 26.09736061096191406, 3.682650327682495117, 0, 0, -0.96362972259521484, 0.26724100112915039, 120, 255, 1, 50063), +(50552, 188174, 530, 0, 0, 1, 1, -3798.689208984375, -11508.978515625, -134.82122802734375, 5.061456203460693359, 0, 0, -0.57357597351074218, 0.819152355194091796, 120, 255, 1, 50063); + +DELETE FROM `game_event_gameobject` WHERE `eventEntry` = 1 AND `guid` IN (50573, 50571, 50557, 50556, 50555, 50554, 50553, 50552); +INSERT INTO `game_event_gameobject` (`eventEntry`,`guid`) VALUES +(1, 50573), +(1, 50571), +(1, 50557), +(1, 50556), +(1, 50555), +(1, 50554), +(1, 50553), +(1, 50552); diff --git a/data/sql/updates/db_world/2023_10_18_02.sql b/data/sql/updates/db_world/2023_10_18_02.sql new file mode 100644 index 000000000..039a3cee4 --- /dev/null +++ b/data/sql/updates/db_world/2023_10_18_02.sql @@ -0,0 +1,9 @@ +-- DB update 2023_10_18_01 -> 2023_10_18_02 +-- Strange Engine Part +DELETE FROM `gameobject_loot_template` WHERE `Entry` = 19605 AND `Item` = 34469; +INSERT INTO `gameobject_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES +(19605, 34469, 0, 0.5, 0, 1, 1, 1, 1, 'Strange Engine Part'); + +-- Make it repeatable + correct gold reward +UPDATE `quest_template_addon` SET `SpecialFlags` = `SpecialFlags`|1 WHERE (`ID` = 11531); +UPDATE `quest_template` SET `RewardBonusMoney` = 75900 WHERE (`ID` = 11531); diff --git a/data/sql/updates/db_world/2023_10_20_00.sql b/data/sql/updates/db_world/2023_10_20_00.sql new file mode 100644 index 000000000..77fa00ad0 --- /dev/null +++ b/data/sql/updates/db_world/2023_10_20_00.sql @@ -0,0 +1,6 @@ +-- DB update 2023_10_18_02 -> 2023_10_20_00 +-- +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 19 AND `SourceGroup` = 0 AND `SourceEntry` IN (10024,10017); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(19, 0, 10024, 0, 0, 5, 0, 934, 7, 0, 0, 0, 0, '', 'Show quest \'Voren\'thal\'s Visions\' only if the player is unfriendly or lower towards The Scryers.'), +(19, 0, 10017, 0, 0, 5, 0, 932, 7, 0, 0, 0, 0, '', 'Show quest \'Strained Supplies\' only if the player is unfriendly or lower towards The Aldor.'); diff --git a/data/sql/updates/db_world/2023_10_20_01.sql b/data/sql/updates/db_world/2023_10_20_01.sql new file mode 100644 index 000000000..8c9e8cc0e --- /dev/null +++ b/data/sql/updates/db_world/2023_10_20_01.sql @@ -0,0 +1,3 @@ +-- DB update 2023_10_20_00 -> 2023_10_20_01 +-- Adyen the Lightwarden +UPDATE `creature_template` SET `unit_flags` = `unit_flags`&~256 WHERE `entry` = 18537; diff --git a/data/sql/updates/db_world/2023_10_20_02.sql b/data/sql/updates/db_world/2023_10_20_02.sql new file mode 100644 index 000000000..589f57d58 --- /dev/null +++ b/data/sql/updates/db_world/2023_10_20_02.sql @@ -0,0 +1,20 @@ +-- DB update 2023_10_20_01 -> 2023_10_20_02 +-- +DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_calling_korkron_or_wildhammer'; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(38249, 'spell_calling_korkron_or_wildhammer'), +(38119, 'spell_calling_korkron_or_wildhammer'); + +UPDATE `creature_template` SET `ScriptName`='npc_korkron_or_wildhammer' WHERE `entry` IN (22059, 21998); + +UPDATE `creature_template` SET `speed_run` = 2.28571 WHERE `entry` IN (22059, 21998); + +SET @NPC_WILDHAMMER_GRYPHON_RIDER := 22059; +DELETE FROM `creature_text` WHERE `CreatureID`=@NPC_WILDHAMMER_GRYPHON_RIDER; +INSERT INTO `creature_text` (`CreatureID`,`GroupID`,`ID`,`Text`,`Type`,`Language`,`Probability`,`Emote`,`Duration`,`Sound`,`BroadcastTextId`, `TextRange`, `comment`) VALUES +(@NPC_WILDHAMMER_GRYPHON_RIDER, 0, 0, 'What is it, $r? Have you gathered some new information?', 12, 0, 100, 0, 0, 0, 19742, 0, 'SAY_LAND'); + +SET @NPC_KORKRON_WIND_RIDER := 21998; +DELETE FROM `creature_text` WHERE `CreatureID`=@NPC_KORKRON_WIND_RIDER; +INSERT INTO `creature_text` (`CreatureID`,`GroupID`,`ID`,`Text`,`Type`,`Language`,`Probability`,`Emote`,`Duration`,`Sound`,`BroadcastTextId`, `TextRange`, `comment`) VALUES +(@NPC_KORKRON_WIND_RIDER, 0, 0, 'Speak quickly, $n. We haven\'t much time!', 12, 0, 100, 0, 0, 0, 19675, 0, 'SAY_LAND'); diff --git a/data/sql/updates/db_world/2023_10_20_03.sql b/data/sql/updates/db_world/2023_10_20_03.sql new file mode 100644 index 000000000..ea8448b82 --- /dev/null +++ b/data/sql/updates/db_world/2023_10_20_03.sql @@ -0,0 +1,5 @@ +-- DB update 2023_10_20_02 -> 2023_10_20_03 +-- +DELETE FROM `creature_template_addon` WHERE `entry` = 21229; +INSERT INTO `creature_template_addon` (`entry`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `visibilityDistanceType`, `auras`) VALUES +(21229, 0, 0, 0, 1, 0, 0, '38620'); diff --git a/data/sql/updates/db_world/2023_10_20_04.sql b/data/sql/updates/db_world/2023_10_20_04.sql new file mode 100644 index 000000000..12ba3f71b --- /dev/null +++ b/data/sql/updates/db_world/2023_10_20_04.sql @@ -0,0 +1,6 @@ +-- DB update 2023_10_20_03 -> 2023_10_20_04 +-- Bloodlust/Heroism - Karazhan chest event +DELETE FROM `spell_cooldown_overrides` WHERE `Id` IN (37472,37471); +INSERT INTO `spell_cooldown_overrides` (`Id`, `RecoveryTime`, `CategoryRecoveryTime`, `StartRecoveryTime`, `StartRecoveryCategory`) VALUES +(37472, 15000, 15000, 0, 0), +(37471, 15000, 15000, 0, 0); diff --git a/data/sql/updates/db_world/2023_10_20_05.sql b/data/sql/updates/db_world/2023_10_20_05.sql new file mode 100644 index 000000000..e1c094bf4 --- /dev/null +++ b/data/sql/updates/db_world/2023_10_20_05.sql @@ -0,0 +1,39 @@ +-- DB update 2023_10_20_04 -> 2023_10_20_05 +-- Morja +DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 14) AND (`SourceGroup` = 6227) AND (`SourceEntry` = 7401); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(14, 6227, 7401, 0, 0, 8, 0, 7946, 0, 0, 0, 0, 0, '', 'Show gossip menu only if quest \'Spawn of Jubjub\' has been completed.'); + +DELETE FROM `npc_text` WHERE `ID`=7401; +INSERT INTO `npc_text` (`ID`, `text0_0`, `text0_1`, `BroadcastTextID0`) VALUES +(7401, '', 'I\'m so happy that Jubjub returned! I only hope that I don\'t run out of Dark Iron ale soon, or I fear my pet frog might once again escape!', 10169); + +DELETE FROM `creature_text` WHERE `CreatureID`=14871; +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(14871, 0, 0, 'Hi Jubjub. I missed you!', 12, 0, 100, 0, 0, 0, 10170, 0, 'Morja - Jubjub Summon'), +(14871, 1, 0, 'Jubjub? Where are you, Jubjub? Oh no! Where did you go this time!', 12, 0, 100, 0, 0, 0, 10171, 0, 'Morja - Jubjub Despawn'); + +DELETE FROM `gossip_menu` WHERE (`MenuID` = 6227) AND (`TextID` = 7401); +INSERT INTO `gossip_menu` (`MenuID`, `TextID`) VALUES +(6227, 7401); + +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 14871; + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 14871); +DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 1487100); +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 +(14871, 0, 0, 0, 11, 0, 100, 0, 0, 0, 0, 0, 0, 0, 83, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Morja - On Respawn - Remove Npc Flags Questgiver'), +(14871, 0, 1, 0, 38, 0, 100, 0, 1, 1, 60000, 60000, 0, 0, 80, 1487100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Morja - On Data Set 1 1 - Run Script'), +(1487100, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Morja - Actionlist - Say Line 0'), +(1487100, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 82, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Morja - Actionlist - Add Npc Flags Questgiver'), +(1487100, 9, 2, 0, 0, 0, 100, 0, 60000, 60000, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Morja - Actionlist - Say Line 1'), +(1487100, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 83, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Morja - Actionlist - Remove Npc Flags Questgiver'); + +-- Dark Iron Ale +DELETE FROM `smart_scripts` WHERE (`entryorguid` = 165578) AND (`source_type` = 1) AND (`id` IN (3)); +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 +(165578, 1, 3, 0, 63, 0, 100, 0, 0, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, 14871, 5, 0, 0, 0, 0, 0, 0, 'Dark Iron Ale Mug - On Just Created - Set Data to Morja'); + +DELETE FROM `spell_script_names` WHERE `spell_id`=23853 AND `ScriptName`='spell_gen_jubling_cooldown'; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(23853, 'spell_gen_jubling_cooldown'); diff --git a/data/sql/updates/db_world/2023_10_21_00.sql b/data/sql/updates/db_world/2023_10_21_00.sql new file mode 100644 index 000000000..c1d5352fe --- /dev/null +++ b/data/sql/updates/db_world/2023_10_21_00.sql @@ -0,0 +1,6 @@ +-- DB update 2023_10_20_05 -> 2023_10_21_00 +-- Yehkinya Bramble +DELETE FROM `spell_script_names` WHERE `spell_id`=12699 AND `ScriptName`='spell_gen_yehkinya_bramble'; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES (12699, 'spell_gen_yehkinya_bramble'); + +DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 13) AND (`SourceGroup` = 1) AND (`SourceEntry` = 12699) AND (`SourceId` = 0); diff --git a/data/sql/updates/db_world/2023_10_21_01.sql b/data/sql/updates/db_world/2023_10_21_01.sql new file mode 100644 index 000000000..376d10dd6 --- /dev/null +++ b/data/sql/updates/db_world/2023_10_21_01.sql @@ -0,0 +1,7 @@ +-- DB update 2023_10_21_00 -> 2023_10_21_01 +-- Duplicated gossip option +DELETE FROM `gossip_menu_option` WHERE (`MenuID` = 10316) AND (`OptionID` = 1); + +DELETE FROM `spell_script_names` WHERE `spell_id`=62536 AND `ScriptName`='spell_frog_kiss'; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(62536, 'spell_frog_kiss'); diff --git a/data/sql/updates/db_world/2023_10_21_02.sql b/data/sql/updates/db_world/2023_10_21_02.sql new file mode 100644 index 000000000..be03e4f34 --- /dev/null +++ b/data/sql/updates/db_world/2023_10_21_02.sql @@ -0,0 +1,6 @@ +-- DB update 2023_10_21_01 -> 2023_10_21_02 +-- Shadow Mend/Healing - Karazhan chest event +DELETE FROM `spell_cooldown_overrides` WHERE `Id` IN (37456,37455); +INSERT INTO `spell_cooldown_overrides` (`Id`, `RecoveryTime`, `CategoryRecoveryTime`, `StartRecoveryTime`, `StartRecoveryCategory`) VALUES +(37456, 20000, 20000, 0, 0), +(37455, 20000, 20000, 0, 0); diff --git a/data/sql/updates/db_world/2023_10_21_03.sql b/data/sql/updates/db_world/2023_10_21_03.sql new file mode 100644 index 000000000..b0ff3b184 --- /dev/null +++ b/data/sql/updates/db_world/2023_10_21_03.sql @@ -0,0 +1,6 @@ +-- DB update 2023_10_21_02 -> 2023_10_21_03 +-- Quest: Grim Message +DELETE FROM `gameobject` WHERE `id` = 142698; +INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `ScriptName`, `VerifiedBuild`) VALUES +(99872, 142698, 0, 0, 0, 1, 1, -21.77, -2802.7, 121.85, 0, 0, 0, 0, 0, 180, 0, 1, '', 0), +(99873, 142698, 0, 0, 0, 1, 1, -24.2883, -2468.25, 122.442, 0, 0, 0, 0, 0, 180, 0, 1, '', 0); diff --git a/data/sql/updates/db_world/2023_10_21_04.sql b/data/sql/updates/db_world/2023_10_21_04.sql new file mode 100644 index 000000000..4b6a27645 --- /dev/null +++ b/data/sql/updates/db_world/2023_10_21_04.sql @@ -0,0 +1,32 @@ +-- DB update 2023_10_21_03 -> 2023_10_21_04 +-- Quest: Corrupted Sabers +DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 15) AND (`SourceGroup` = 55002) AND (`SourceEntry` = 1); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(15, 55002, 1, 0, 0, 47, 0, 4506, 8, 0, 0, 0, 0, '', 'Show Corrupted Saber gossip menu option only if player is on the quest "Corrupted Sabers".'); + +DELETE FROM `creature_text` WHERE `CreatureID` IN (9936,10042); +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(10042, 0, 0, '%s follows $n obediently.', 16, 0, 100, 0, 0, 0, 5940, 0, 'Corrupted Saber'); + +UPDATE `creature_template` SET `AIName` = 'SmartAI', `gossip_menu_id` = 55002, `npcflag` = `npcflag`|1 WHERE (`entry` = 10042); +UPDATE `creature_template` SET `AIName` = '', `gossip_menu_id` = 0, `npcflag` = `npcflag`&~1 WHERE (`entry` = 9936); + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 9937); +DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 993700); +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 +(9937, 0, 0, 1, 54, 0, 100, 0, 0, 0, 0, 0, 0, 0, 80, 993700, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Common Kitten - On Just Summoned - Run Script'), +(9937, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Common Kitten - On Just Summoned - Remove Npc Flags Gossip'), +(9937, 0, 2, 3, 75, 0, 100, 0, 0, 9996, 5, 2000, 0, 0, 103, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Common Kitten - On Distance 5y To Creature - Set Rooted On'), +(9937, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 82, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Common Kitten - On Distance 5y To Creature - Add Npc Flags Gossip'), +(9937, 0, 4, 5, 62, 0, 100, 0, 55002, 1, 0, 0, 0, 0, 26, 4506, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 'Common Kitten - On Gossip Option 1 Selected - Quest Credit \'Corrupted Sabers\' to Owner or Summoner'), +(9937, 0, 5, 6, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Common Kitten - On Gossip Option 1 Selected - Close Gossip'), +(9937, 0, 6, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 10000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Common Kitten - On Gossip Option 1 Selected - Despawn In 10000 ms'), +(993700, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Common Kitten - Actionlist - Say Line 0'), +(993700, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 136, 1, 0, 5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Common Kitten - Actionlist - Set Run Speed to 0.5'), +(993700, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 69, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 4582.23, -216.14, 300.23, 0, 'Common Kitten - Actionlist - Move To Position'), +(993700, 9, 3, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 0, 0, 36, 10042, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Common Kitten - Actionlist - Update Template To \'Corrupted Saber\''), +(993700, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 16510, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Common Kitten - Actionlist - Cast \'Corrupted Saber Visual (DND)\''), +(993700, 9, 5, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Common Kitten - Actionlist - Remove Npc Flags Gossip'), +(993700, 9, 6, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Common Kitten - Actionlist - Say Line 0'), +(993700, 9, 7, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 29, 2, 90, 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 'Common Kitten - Actionlist - Start Follow Owner Or Summoner'), +(993700, 9, 8, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 136, 1, 1, 42, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Common Kitten - Actionlist - Set Run Speed to 1.42'); diff --git a/data/sql/updates/db_world/2023_10_21_05.sql b/data/sql/updates/db_world/2023_10_21_05.sql new file mode 100644 index 000000000..522eefeae --- /dev/null +++ b/data/sql/updates/db_world/2023_10_21_05.sql @@ -0,0 +1,11 @@ +-- DB update 2023_10_21_04 -> 2023_10_21_05 +-- +ALTER TABLE `spell_cooldown_overrides` + ADD COLUMN `Comment` TEXT; + +UPDATE `spell_cooldown_overrides` SET `Comment`='Karazhan Chest - Heroism' WHERE `Id`=37471; +UPDATE `spell_cooldown_overrides` SET `Comment`='Karazhan Chest - Bloodlust' WHERE `Id`=37472; +UPDATE `spell_cooldown_overrides` SET `Comment`='Fel Reaver Sentinel - Turbo Boost' WHERE `Id`=37920; +UPDATE `spell_cooldown_overrides` SET `Comment`='Fel Reaver Sentinel - World Breaker' WHERE `Id`=38006; +UPDATE `spell_cooldown_overrides` SET `Comment`='Fel Reaver Sentinel - Sonic Boom' WHERE `Id`=38052; +UPDATE `spell_cooldown_overrides` SET `Comment`='Fel Reaver Sentinel - Destroy Deathforged Infernal' WHERE `Id`=38055; diff --git a/data/sql/updates/db_world/2023_10_21_06.sql b/data/sql/updates/db_world/2023_10_21_06.sql new file mode 100644 index 000000000..9b3a02f60 --- /dev/null +++ b/data/sql/updates/db_world/2023_10_21_06.sql @@ -0,0 +1,5 @@ +-- DB update 2023_10_21_05 -> 2023_10_21_06 +-- +DELETE FROM `creature_addon` WHERE `guid` = 135692; +DELETE FROM `waypoint_data` WHERE `id` = 1356920; +UPDATE `creature` SET `MovementType` = 1 WHERE `guid` = 135692; diff --git a/data/sql/updates/db_world/2023_10_22_00.sql b/data/sql/updates/db_world/2023_10_22_00.sql new file mode 100644 index 000000000..3d79379b9 --- /dev/null +++ b/data/sql/updates/db_world/2023_10_22_00.sql @@ -0,0 +1,279 @@ +-- DB update 2023_10_21_06 -> 2023_10_22_00 +SET @As_Probability=100; +SET @AE_Probability=50; +-- ------------------------------Scarlet Sorcerer----------------------------- +-- Scarlet Sorcerer say +DELETE FROM `creature_text` WHERE `CreatureID`=4294; +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +-- AshbringerEvent Talk + (4294, 0, 0, 'I am unworthy, $g sir:ma\'am;.', 12, 0, @As_Probability, 0, 0, 0, 12380, 0, 'Scarlet Sorcerer'), + (4294, 0, 1, 'Have you come to save this world? To cleanse it?', 12, 0, @As_Probability, 0, 0, 0, 12381, 0, 'Scarlet Sorcerer'), + (4294, 0, 2, 'My $g Lord:Lady;, please allow me to live long enough to see you purge this world of the infidels.', 12, 0, @As_Probability, 0, 0, 0, 12382, 0, 'Scarlet Sorcerer'), + (4294, 0, 3, 'And so it begins...', 12, 0, @As_Probability, 0, 0, 0, 12383, 0, 'Scarlet Sorcerer'), + (4294, 0, 4, 'Take me with you, $g sir:ma\'am;.', 12, 0, @As_Probability, 0, 0, 0, 12384, 0, 'Scarlet Sorcerer'), + (4294, 0, 5, 'Ashbringer...', 12, 0, @As_Probability, 0, 0, 0, 12378, 0, 'Scarlet Sorcerer'), + (4294, 0, 6, 'Kneel! Kneel before the Ashbringer!', 12, 0, @As_Probability, 0, 0, 0, 12379, 0, 'Scarlet Sorcerer'), +-- On Aggro Talk + (4294, 1, 0, 'You carry the taint of the Scourge. Prepare to enter the Twisting Nether.', 12, 7, 25, 0, 0, 0, 2625, 0, 'Scarlet Sorcerer'), + (4294, 1, 1, 'There is no escape for you. The Crusade shall destroy all who carry the Scourge\'s taint.', 12, 7, 25, 0, 0, 0, 2626, 0, 'Scarlet Sorcerer'), + (4294, 1, 2, 'The Light condemns all who harbor evil. Now you will die!', 12, 7, 25, 0, 0, 0, 2627, 0, 'Scarlet Sorcerer'), + (4294, 1, 3, 'The Scarlet Crusade shall smite the wicked and drive evil from these lands!', 12, 7, 25, 0, 0, 0, 2628, 0, 'Scarlet Sorcerer'); + +-- Scarlet Sorcerer SmartAI +UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = 4294; +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 4294); +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 +(4294, 0, 0, 0, 4, 0, 20, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Sorcerer - On Aggro - Say Line 1'), +(4294, 0, 1, 0, 0, 0, 100, 0, 4000, 8000, 15000, 25000, 0, 0, 11, 6146, 0, 0, 0, 0, 0, 5, 30, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Sorcerer - In Combat - Cast Slow'), +(4294, 0, 2, 0, 0, 0, 100, 0, 0, 1000, 3000, 3500, 0, 0, 11, 9672, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Sorcerer - In Combat - Cast Frostbolt'), +(4294, 0, 3, 0, 0, 0, 100, 0, 14000, 29000, 19000, 28000, 0, 0, 11, 9672, 0, 0, 0, 0, 0, 5, 30, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Sorcerer - In Combat - Cast Blizzard'), +(4294, 0, 4, 0, 2, 0, 100, 1, 0, 15, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Sorcerer - Between 0-15% Health - Flee For Assist'), +-- AshbringerEvent +(4294, 0, 5, 0, 8, 0, 100, 769, 28441, 0, 0, 0, 0, 0, 80, 429400, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Sorcerer - spellhit_target - AshbringerEvent'); + +-- AshbringerEvent Timed Actionlis +DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 429400); +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 +(429400, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 2, 35, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Monaster AshbringerEvent - On Script - Set_Faction Friend'), +(429400, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 89, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Monaster AshbringerEvent - On Script - stop movement'), +(429400, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Monaster AshbringerEvent - On Script - Set Facing player'), +(429400, 9, 3, 0, 0, 0, 100, 0, 500, 500, 0, 0, 0, 0, 91, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Monaster AshbringerEvent - On Script - SetStandState UNIT_STAND_STATE_STAND'), +(429400, 9, 4, 0, 0, 0, 100, 0, 500, 2500, 0, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Monaster AshbringerEvent - On Script - SetSheath SHEATH_STATE_UNARMED'), +(429400, 9, 5, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 90, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Monaster AshbringerEvent - On Script - SetSheath UNIT_STAND_STATE_KNEEL'), +(429400, 9, 6, 0, 0, 0, @AE_Probability, 0, 1000, 2000, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Monaster AshbringerEvent - On Script - Talk 0'); + +-- ------------------------------Scarlet Myrmidon----------------------------- +-- Scarlet Myrmidon say +DELETE FROM `creature_text` WHERE `CreatureID`=4295; +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +-- AshbringerEvent Talk + (4295, 0, 0, 'I am unworthy, $g sir:ma\'am;.', 12, 0, @As_Probability, 0, 0, 0, 12380, 0, 'Scarlet Myrmidon'), + (4295, 0, 1, 'Have you come to save this world? To cleanse it?', 12, 0, @As_Probability, 0, 0, 0, 12381, 0, 'Scarlet Myrmidon'), + (4295, 0, 2, 'My $g Lord:Lady;, please allow me to live long enough to see you purge this world of the infidels.', 12, 0, @As_Probability, 0, 0, 0, 12382, 0, 'Scarlet Myrmidon'), + (4295, 0, 3, 'And so it begins...', 12, 0, @As_Probability, 0, 0, 0, 12383, 0, 'Scarlet Myrmidon'), + (4295, 0, 4, 'Take me with you, $g sir:ma\'am;.', 12, 0, @As_Probability, 0, 0, 0, 12384, 0, 'Scarlet Myrmidon'), + (4295, 0, 5, 'Ashbringer...', 12, 0, @As_Probability, 0, 0, 0, 12378, 0, 'Scarlet Myrmidon'), + (4295, 0, 6, 'Kneel! Kneel before the Ashbringer!', 12, 0, @As_Probability, 0, 0, 0, 12379, 0, 'Scarlet Myrmidon'), +-- On Aggro Talk + (4295, 1, 0, 'You carry the taint of the Scourge. Prepare to enter the Twisting Nether.', 12, 7, 25, 0, 0, 0, 2625, 0, 'Scarlet Myrmidon'), + (4295, 1, 1, 'There is no escape for you. The Crusade shall destroy all who carry the Scourge\'s taint.', 12, 7, 25, 0, 0, 0, 2626, 0, 'Scarlet Myrmidon'), + (4295, 1, 2, 'The Light condemns all who harbor evil. Now you will die!', 12, 7, 25, 0, 0, 0, 2627, 0, 'Scarlet Myrmidon'), + (4295, 1, 3, 'The Scarlet Crusade shall smite the wicked and drive evil from these lands!', 12, 7, 25, 0, 0, 0, 2628, 0, 'Scarlet Myrmidon'), + (4295, 2, 0, '%s goes into a frenzy!', 16, 0, 100, 0, 0, 0, 1191, 0, 'Scarlet Myrmidon'); + +UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = 4295; +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 4295); +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 +(4295, 0, 0, 0, 4, 0, 20, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Myrmidon - On Aggro - Say Line 1'), +(4295, 0, 1, 2, 2, 0, 100, 1, 0, 40, 0, 0, 0, 0, 11, 8269, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Myrmidon - Between 0-40% Health - Cast Frenzy'), +(4295, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Myrmidon - Between 0-40% Health - Say Line 2'), +-- AshbringerEvent +(4295, 0, 3, 0, 8, 0, 100, 769, 28441, 0, 0, 0, 0, 0, 80, 429400, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Myrmidon - spellhit_target - AshbringerEvent'); + + +-- ------------------------------Scarlet Defender ----------------------------- +-- Scarlet Defender say +DELETE FROM `creature_text` WHERE `CreatureID`=4298; +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +-- AshbringerEvent Talk + (4298, 0, 0, 'I am unworthy, $g sir:ma\'am;.', 12, 0, @As_Probability, 0, 0, 0, 12380, 0, 'Scarlet Defender'), + (4298, 0, 1, 'Have you come to save this world? To cleanse it?', 12, 0, @As_Probability, 0, 0, 0, 12381, 0, 'Scarlet Defender'), + (4298, 0, 2, 'My $g Lord:Lady;, please allow me to live long enough to see you purge this world of the infidels.', 12, 0, @As_Probability, 0, 0, 0, 12382, 0, 'Scarlet Defender'), + (4298, 0, 3, 'And so it begins...', 12, 0, @As_Probability, 0, 0, 0, 12383, 0, 'Scarlet Defender'), + (4298, 0, 4, 'Take me with you, $g sir:ma\'am;.', 12, 0, @As_Probability, 0, 0, 0, 12384, 0, 'Scarlet Defender'), + (4298, 0, 5, 'Ashbringer...', 12, 0, @As_Probability, 0, 0, 0, 12378, 0, 'Scarlet Defender'), + (4298, 0, 6, 'Kneel! Kneel before the Ashbringer!', 12, 0, @As_Probability, 0, 0, 0, 12379, 0, 'Scarlet Defender'), +-- On Aggro Talk + (4298, 1, 0, 'You carry the taint of the Scourge. Prepare to enter the Twisting Nether.', 12, 7, 25, 0, 0, 0, 2625, 0, 'Scarlet Defender'), + (4298, 1, 1, 'There is no escape for you. The Crusade shall destroy all who carry the Scourge\'s taint.', 12, 7, 25, 0, 0, 0, 2626, 0, 'Scarlet Defender'), + (4298, 1, 2, 'The Light condemns all who harbor evil. Now you will die!', 12, 7, 25, 0, 0, 0, 2627, 0, 'Scarlet Defender'), + (4298, 1, 3, 'The Scarlet Crusade shall smite the wicked and drive evil from these lands!', 12, 7, 25, 0, 0, 0, 2628, 0, 'Scarlet Defender'); + +-- Scarlet Defender SmartAI +UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = 4298; +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 4298); +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 +(4298, 0, 0, 0, 25, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 3637, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Defender - On Reset - Cast Improved Blocking III'), +(4298, 0, 1, 0, 4, 0, 20, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Defender - On Aggro - Say Line 1'), +(4298, 0, 2, 0, 0, 0, 100, 0, 0, 2000, 180000, 180000, 0, 0, 11, 7164, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Defender - In Combat - Cast Defensive Stance'), +(4298, 0, 3, 0, 13, 0, 100, 0, 8000, 11000, 0, 0, 0, 0, 11, 11972, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Defender - Victim Casting - Cast Shield Bash'), +(4298, 0, 4, 0, 2, 0, 100, 1, 0, 15, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Defender - Between 0-15% Health - Flee For Assist'), +-- AshbringerEvent +(4298, 0, 5, 0, 8, 0, 100, 769, 28441, 0, 0, 0, 0, 0, 80, 429400, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Defender - spellhit_target - AshbringerEvent'); + +-- ------------------------------Scarlet Chaplain ----------------------------- +-- Scarlet Chaplain say-- +DELETE FROM `creature_text` WHERE `CreatureID`=4299; +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +-- AshbringerEvent Talk + (4299, 0, 0, 'I am unworthy, $g sir:ma\'am;.', 12, 0, @As_Probability, 0, 0, 0, 12380, 0, 'Ashbringer Event'), + (4299, 0, 1, 'Have you come to save this world? To cleanse it?', 12, 0, @As_Probability, 0, 0, 0, 12381, 0, 'Ashbringer Event'), + (4299, 0, 2, 'My $g Lord:Lady;, please allow me to live long enough to see you purge this world of the infidels.', 12, 0, @As_Probability, 0, 0, 0, 12382, 0, 'Scarlet Chaplain'), + (4299, 0, 3, 'And so it begins...', 12, 0, @As_Probability, 0, 0, 0, 12383, 0, 'Scarlet Chaplain'), + (4299, 0, 4, 'Take me with you, $g sir:ma\'am;.', 12, 0, @As_Probability, 0, 0, 0, 12384, 0, 'Scarlet Chaplain'), + (4299, 0, 5, 'Ashbringer...', 12, 0, @As_Probability, 0, 0, 0, 12378, 0, 'Scarlet Chaplain'), + (4299, 0, 6, 'Kneel! Kneel before the Ashbringer!', 12, 0, @As_Probability, 0, 0, 0, 12379, 0, 'Scarlet Chaplain'), +-- On Aggro Talk + (4299, 1, 0, 'You carry the taint of the Scourge. Prepare to enter the Twisting Nether.', 12, 7, 25, 0, 0, 0, 2625, 0, 'Scarlet Chaplain'), + (4299, 1, 1, 'There is no escape for you. The Crusade shall destroy all who carry the Scourge\'s taint.', 12, 7, 25, 0, 0, 0, 2626, 0, 'Scarlet Chaplain'), + (4299, 1, 2, 'The Light condemns all who harbor evil. Now you will die!', 12, 7, 25, 0, 0, 0, 2627, 0, 'Scarlet Chaplain'), + (4299, 1, 3, 'The Scarlet Crusade shall smite the wicked and drive evil from these lands!', 12, 7, 25, 0, 0, 0, 2628, 0, 'Scarlet Chaplain'); + +-- Scarlet Chaplain SmartAI-- +UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = 4299; +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 4299); +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 +(4299, 0, 0, 0, 1, 0, 100, 0, 1000, 1000, 1200000, 1200000, 0, 0, 11, 1006, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Chaplain - Out of Combat - Cast Inner Fire'), +(4299, 0, 1, 0, 4, 0, 20, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Chaplain - On Aggro - Say Line 1'), +(4299, 0, 2, 0, 4, 0, 100, 512, 0, 0, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Chaplain - On Aggro - Set Event Phase'), +(4299, 0, 3, 0, 16, 1, 100, 0, 6066, 40, 8000, 8000, 0, 0, 11, 6066, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Chaplain - Friendly Missing Buff - Cast Power Word: Shield'), +(4299, 0, 4, 0, 14, 0, 100, 0, 400, 40, 8000, 8000, 0, 0, 11, 8362, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Chaplain - Friendly Missing Health - Cast Renew'), +(4299, 0, 5, 0, 2, 0, 100, 1, 0, 15, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Chaplain - Between 0-15% Health - Flee For Assist'), + +-- AshbringerEvent +(4299, 0, 6, 0, 8, 0, 100, 769, 28441, 0, 0, 0, 0, 0, 80, 429400, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Chaplain - spellhit_target - AshbringerEvent'); + +-- ------------------------------Scarlet Wizard ----------------------------- +-- Scarlet Wizard say--- +DELETE FROM `creature_text` WHERE `CreatureID`=4300; +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +-- AshbringerEvent Talk + (4300, 0, 0, 'I am unworthy, $g sir:ma\'am;.', 12, 0, @As_Probability, 0, 0, 0, 12380, 0, 'Scarlet Wizard'), + (4300, 0, 1, 'Have you come to save this world? To cleanse it?', 12, 0, @As_Probability, 0, 0, 0, 12381, 0, 'Scarlet Wizard'), + (4300, 0, 2, 'My $g Lord:Lady;, please allow me to live long enough to see you purge this world of the infidels.', 12, 0, @As_Probability, 0, 0, 0, 12382, 0, 'Scarlet Wizard'), + (4300, 0, 3, 'And so it begins...', 12, 0, @As_Probability, 0, 0, 0, 12383, 0, 'Scarlet Wizard'), + (4300, 0, 4, 'Take me with you, $g sir:ma\'am;.', 12, 0, @As_Probability, 0, 0, 0, 12384, 0, 'Scarlet Wizard'), + (4300, 0, 5, 'Ashbringer...', 12, 0, @As_Probability, 0, 0, 0, 12378, 0, 'Scarlet Wizard'), + (4300, 0, 6, 'Kneel! Kneel before the Ashbringer!', 12, 0, @As_Probability, 0, 0, 0, 12379, 0, 'Scarlet Wizard'), +-- On Aggro Talk + (4300, 1, 1, 'There is no escape for you. The Crusade shall destroy all who carry the Scourge\'s taint.', 12, 7, 25, 0, 0, 0, 2626, 0, 'Scarlet Wizard'), + (4300, 1, 2, 'The Light condemns all who harbor evil. Now you will die!', 12, 7, 25, 0, 0, 0, 2627, 0, 'Scarlet Wizard'), + (4300, 1, 3, 'The Scarlet Crusade shall smite the wicked and drive evil from these lands!', 12, 7, 25, 0, 0, 0, 2628, 0, 'Scarlet Wizard'); + +-- Scarlet Wizard SmartAI--- +UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = 4300; +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 4300); +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 +(4300, 0, 0, 0, 4, 0, 20, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Wizard - On Aggro - Say Line 1'), +(4300, 0, 1, 0, 106, 0, 100, 0, 2000, 6000, 7000, 11000, 0, 10, 11, 8439, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Wizard - In Combat - Cast Arcane Explosion'), +(4300, 0, 2, 0, 0, 0, 100, 0, 1000, 5000, 30000, 30000, 0, 0, 11, 2601, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Wizard - In Combat - Cast Fire Shield III'), +(4300, 0, 3, 0, 2, 0, 100, 1, 0, 15, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Wizard - Between 0-15% Health - Flee For Assist'), +-- AshbringerEvent +(4300, 0, 4, 0, 8, 0, 100, 769, 28441, 0, 0, 0, 0, 0, 80, 429400, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Wizard - spellhit_target - AshbringerEvent'); + +-- ------------------------------Scarlet Centurion ----------------------------- +-- Scarlet Centurion say-- +DELETE FROM `creature_text` WHERE `CreatureID`=4301; +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +-- AshbringerEvent Talk + (4301, 0, 0, 'I am unworthy, $g sir:ma\'am;.', 12, 0, @As_Probability, 0, 0, 0, 12380, 0, 'Scarlet Centurion'), + (4301, 0, 1, 'Have you come to save this world? To cleanse it?', 12, 0, @As_Probability, 0, 0, 0, 12381, 0, 'Scarlet Centurion'), + (4301, 0, 2, 'My $g Lord:Lady;, please allow me to live long enough to see you purge this world of the infidels.', 12, 0, @As_Probability, 0, 0, 0, 12382, 0, 'Scarlet Centurion'), + (4301, 0, 3, 'And so it begins...', 12, 0, @As_Probability, 0, 0, 0, 12383, 0, 'Scarlet Centurion'), + (4301, 0, 4, 'Take me with you, $g sir:ma\'am;.', 12, 0, @As_Probability, 0, 0, 0, 12384, 0, 'Scarlet Centurion'), + (4301, 0, 5, 'Ashbringer...', 12, 0, @As_Probability, 0, 0, 0, 12378, 0, 'Scarlet Centurion'), + (4301, 0, 6, 'Kneel! Kneel before the Ashbringer!', 12, 0, @As_Probability, 0, 0, 0, 12379, 0, 'Scarlet Centurion'), +-- On Aggro Talk + (4301, 1, 0, 'You carry the taint of the Scourge. Prepare to enter the Twisting Nether.', 12, 7, 25, 0, 0, 0, 2625, 0, 'Scarlet Centurion'), + (4301, 1, 1, 'There is no escape for you. The Crusade shall destroy all who carry the Scourge\'s taint.', 12, 7, 25, 0, 0, 0, 2626, 0, 'Scarlet Centurion'), + (4301, 1, 2, 'The Light condemns all who harbor evil. Now you will die!', 12, 7, 25, 0, 0, 0, 2627, 0, 'Scarlet Centurion'), + (4301, 1, 3, 'The Scarlet Crusade shall smite the wicked and drive evil from these lands!', 12, 7, 25, 0, 0, 0, 2628, 0, 'Scarlet Centurion'); + +-- Scarlet Centurion SmartAI +UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = 4301; +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 4301); +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 +(4301, 0, 0, 0, 4, 0, 20, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Centurion - On Aggro - Say Line 1'), +(4301, 0, 1, 0, 0, 0, 100, 0, 2000, 6000, 50000, 70000, 0, 0, 11, 31403, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Centurion - In Combat - Cast Battle Shout'), +(4301, 0, 2, 0, 2, 0, 100, 1, 0, 15, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Centurion - Between 0-15% Health - Flee For Assist'), +-- AshbringerEvent +(4301, 0, 3, 0, 8, 0, 100, 769, 28441, 0, 0, 0, 0, 0, 80, 429400, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Centurion - spellhit_target - AshbringerEvent'); + +-- ------------------------------Scarlet Champion-- ------------------------------ +-- Scarlet Champion say-- +DELETE FROM `creature_text` WHERE `CreatureID`=4302; +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +-- AshbringerEvent Talk + (4302, 0, 0, 'I am unworthy, $g sir:ma\'am;.', 12, 0, @As_Probability, 0, 0, 0, 12380, 0, 'Scarlet Champion'), + (4302, 0, 1, 'Have you come to save this world? To cleanse it?', 12, 0, @As_Probability, 0, 0, 0, 12381, 0, 'Scarlet Champion'), + (4302, 0, 2, 'My $g Lord:Lady;, please allow me to live long enough to see you purge this world of the infidels.', 12, 0, @As_Probability, 0, 0, 0, 12382, 0, 'Scarlet Champion'), + (4302, 0, 3, 'And so it begins...', 12, 0, @As_Probability, 0, 0, 0, 12383, 0, 'Scarlet Champion'), + (4302, 0, 4, 'Take me with you, $g sir:ma\'am;.', 12, 0, @As_Probability, 0, 0, 0, 12384, 0, 'Scarlet Champion'), + (4302, 0, 5, 'Ashbringer...', 12, 0, @As_Probability, 0, 0, 0, 12378, 0, 'Scarlet Champion'), + (4302, 0, 6, 'Kneel! Kneel before the Ashbringer!', 12, 0, @As_Probability, 0, 0, 0, 12379, 0, 'Scarlet Champion'), +-- On Aggro Talk + (4302, 1, 0, 'You carry the taint of the Scourge. Prepare to enter the Twisting Nether.', 12, 7, 25, 0, 0, 0, 2625, 0, 'Scarlet Champion'), + (4302, 1, 1, 'There is no escape for you. The Crusade shall destroy all who carry the Scourge\'s taint.', 12, 7, 25, 0, 0, 0, 2626, 0, 'Scarlet Champion'), + (4302, 1, 2, 'The Light condemns all who harbor evil. Now you will die!', 12, 7, 25, 0, 0, 0, 2627, 0, 'Scarlet Champion'), + (4302, 1, 3, 'The Scarlet Crusade shall smite the wicked and drive evil from these lands!', 12, 7, 25, 0, 0, 0, 2628, 0, 'Scarlet Champion'); +-- Scarlet Champion SmartAI +UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = 4302; + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 4302); +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 +(4302, 0, 0, 0, 4, 0, 20, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Champion - On Aggro - Say Line 1'), +(4302, 0, 1, 0, 0, 0, 100, 0, 1000, 5000, 6000, 9000, 0, 0, 11, 17143, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Champion - In Combat - Cast Holy Strike'), +(4302, 0, 2, 0, 2, 0, 100, 1, 0, 15, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Champion - Between 0-15% Health - Flee For Assist'), +-- AshbringerEvent +(4302, 0, 3, 0, 8, 0, 100, 769, 28441, 0, 0, 0, 0, 0, 80, 429400, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Champion - spellhit_target - AshbringerEvent'); + +-- ------------------------------Scarlet Abbot ------- +-- Scarlet Abbot say-- +DELETE FROM `creature_text` WHERE `CreatureID`=4303; +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +-- AshbringerEvent Talk + (4303, 0, 0, 'I am unworthy, $g sir:ma\'am;.', 12, 0, @As_Probability, 0, 0, 0, 12380, 0, 'Scarlet Abbot'), + (4303, 0, 1, 'Have you come to save this world? To cleanse it?', 12, 0, @As_Probability, 0, 0, 0, 12381, 0, 'Scarlet Abbot'), + (4303, 0, 2, 'My $g Lord:Lady;, please allow me to live long enough to see you purge this world of the infidels.', 12, 0, @As_Probability, 0, 0, 0, 12382, 0, 'Scarlet Abbot'), + (4303, 0, 3, 'And so it begins...', 12, 0, @As_Probability, 0, 0, 0, 12383, 0, 'Scarlet Abbot'), + (4303, 0, 4, 'Take me with you, $g sir:ma\'am;.', 12, 0, @As_Probability, 0, 0, 0, 12384, 0, 'Scarlet Abbot'), + (4303, 0, 5, 'Ashbringer...', 12, 0, @As_Probability, 0, 0, 0, 12378, 0, 'Scarlet Abbot'), + (4303, 0, 6, 'Kneel! Kneel before the Ashbringer!', 12, 0, @As_Probability, 0, 0, 0, 12379, 0, 'Scarlet Abbot'), +-- On Aggro Talk + (4303, 1, 0, 'You carry the taint of the Scourge. Prepare to enter the Twisting Nether.', 12, 7, 25, 0, 0, 0, 2625, 0, 'Scarlet Abbot'), + (4303, 1, 1, 'There is no escape for you. The Crusade shall destroy all who carry the Scourge\'s taint.', 12, 7, 25, 0, 0, 0, 2626, 0, 'Scarlet Abbot'), + (4303, 1, 2, 'The Light condemns all who harbor evil. Now you will die!', 12, 7, 25, 0, 0, 0, 2627, 0, 'Scarlet Abbot'), + (4303, 1, 3, 'The Scarlet Crusade shall smite the wicked and drive evil from these lands!', 12, 7, 25, 0, 0, 0, 2628, 0, 'Scarlet Abbot'), + (4303, 2, 0, '%s becomes enraged!', 16, 0, 100, 0, 0, 0, 24144, 0, 'Scarlet Abbot'); + +-- Scarlet Abbot SmartAI +UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = 4303; +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 4303); +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 +(4303, 0, 0, 0, 4, 0, 20, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Abbot - On Aggro - Say Line 1'), +(4303, 0, 1, 0, 14, 0, 100, 0, 400, 40, 8000, 8000, 0, 0, 11, 8362, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Abbot - Friendly Missing Health - Cast Renew'), +(4303, 0, 2, 0, 14, 0, 100, 0, 600, 40, 4000, 8000, 0, 0, 11, 6064, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Abbot - Friendly Missing Health - Cast Heal'), +(4303, 0, 3, 4, 2, 0, 100, 1, 0, 40, 0, 0, 0, 0, 11, 8269, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Abbot - Between 0-40% Health - Cast Frenzy'), +(4303, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Abbot - Between 0-40% Health - Say Line 2'), +-- AshbringerEvent +(4303, 0, 5, 0, 8, 0, 100, 769, 28441, 0, 0, 0, 0, 0, 80, 429400, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Abbot - spellhit_target - AshbringerEvent'); + + +-- ------------------------------Scarlet Monk ------- +-- Scarlet Monk say -- +DELETE FROM `creature_text` WHERE `CreatureID`=4540; +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +-- AshbringerEvent TALK + (4540, 0, 0, 'I am unworthy, $g sir:ma\'am;.', 12, 0, @As_Probability, 0, 0, 0, 12380, 0, 'Scarlet Monk'), + (4540, 0, 1, 'Have you come to save this world? To cleanse it?', 12, 0, @As_Probability, 0, 0, 0, 12381, 0, 'Scarlet Monk'), + (4540, 0, 2, 'My $g Lord:Lady;, please allow me to live long enough to see you purge this world of the infidels.', 12, 0, @As_Probability, 0, 0, 0, 12382, 0, 'Scarlet Monk'), + (4540, 0, 3, 'And so it begins...', 12, 0, @As_Probability, 0, 0, 0, 12383, 0, 'Scarlet Monk'), + (4540, 0, 4, 'Take me with you, $g sir:ma\'am;.', 12, 0, @As_Probability, 0, 0, 0, 12384, 0, 'Scarlet Monk'), + (4540, 0, 5, 'Ashbringer...', 12, 0, @As_Probability, 0, 0, 0, 12378, 0, 'Scarlet Monk'), + (4540, 0, 6, 'Kneel! Kneel before the Ashbringer!', 12, 0, @As_Probability, 0, 0, 0, 12379, 0, 'Scarlet Monk'), +-- On Aggro TALK + (4540, 1, 0, 'You carry the taint of the Scourge. Prepare to enter the Twisting Nether.', 12, 7, 25, 0, 0, 0, 2625, 0, 'Scarlet Monk'), + (4540, 1, 1, 'There is no escape for you. The Crusade shall destroy all who carry the Scourge\'s taint.', 12, 7, 25, 0, 0, 0, 2626, 0, 'Scarlet Monk'), + (4540, 1, 2, 'The Light condemns all who harbor evil. Now you will die!', 12, 7, 25, 0, 0, 0, 2627, 0, 'Scarlet Monk'), + (4540, 1, 3, 'The Scarlet Crusade shall smite the wicked and drive evil from these lands!', 12, 7, 25, 0, 0, 0, 2628, 0, 'Scarlet Monk'); + +-- Scarlet Monk SmartAI +UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE (`entry` = 4540); +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 4540); +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 +(4540, 0, 0, 0, 25, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 3417, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Monk - On Reset - Cast Thrash'), +(4540, 0, 1, 0, 4, 0, 20, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Monk - On Aggro - Say Line 1'), +(4540, 0, 2, 0, 13, 0, 100, 0, 7000, 7000, 0, 0, 0, 0, 11, 11978, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Monk - Victim Casting - Cast Kick'), +(4540, 0, 3, 0, 2, 0, 100, 1, 0, 15, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Monk - Between 0-15% Health - Flee For Assist'), +-- AshbringerEvent +(4540, 0, 4, 0, 8, 0, 100, 769, 28441, 0, 0, 0, 0, 0, 80, 429400, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Monk - spellhit_target - AshbringerEvent'); diff --git a/data/sql/updates/db_world/2023_10_22_01.sql b/data/sql/updates/db_world/2023_10_22_01.sql new file mode 100644 index 000000000..e818f16c2 --- /dev/null +++ b/data/sql/updates/db_world/2023_10_22_01.sql @@ -0,0 +1,6 @@ +-- DB update 2023_10_22_00 -> 2023_10_22_01 +-- +DELETE FROM `spell_script_names` WHERE `spell_id` IN (30004, 29946); +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(30004, 'spell_flamewreath'), +(29946, 'spell_flamewreath_aura'); diff --git a/data/sql/updates/db_world/2023_10_22_02.sql b/data/sql/updates/db_world/2023_10_22_02.sql new file mode 100644 index 000000000..66bb1694b --- /dev/null +++ b/data/sql/updates/db_world/2023_10_22_02.sql @@ -0,0 +1,340 @@ +-- DB update 2023_10_22_01 -> 2023_10_22_02 +-- +-- Emotes for Quest "For Love Eternal" +DELETE FROM `quest_details` WHERE `ID`=963; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(963,1,0,0,0,0,0,0,0,0); +UPDATE `quest_request_items` SET `EmoteOnIncomplete`=1 WHERE `ID`=963; +UPDATE `quest_offer_reward` SET `Emote1`=2 WHERE `ID`=963; + +-- Emotes for Quest "Cave Mushrooms" +DELETE FROM `quest_details` WHERE `ID`=947; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(947,1,0,0,0,0,0,0,0,0); +UPDATE `quest_request_items` SET `EmoteOnIncomplete`=6, `EmoteOnComplete`=6 WHERE `ID`=947; +UPDATE `quest_offer_reward` SET `Emote1`=5 WHERE `ID`=947; + +-- Emotes for Quest "Onu" +DELETE FROM `quest_details` WHERE `ID`=948; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(948,1,0,0,0,0,0,0,0,0); + +-- Emotes for Quest "Buzzbox 827" +DELETE FROM `quest_details` WHERE `ID`=983; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(983,5,0,0,0,0,0,0,0,0); + +-- Emotes for Quest "Washed Ashore" +DELETE FROM `quest_details` WHERE `ID`=3524; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(3524,1,0,0,0,0,0,0,0,0); +UPDATE `quest_offer_reward` SET `Emote1`=1 WHERE `ID`=3524; + +-- Emotes for Quest "Washed Ashore (Part 2)" +DELETE FROM `quest_details` WHERE `ID`=4681; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(4681,1,0,0,0,0,0,0,0,0); +UPDATE `quest_request_items` SET `EmoteOnIncomplete`=1 WHERE `ID`=4681; +UPDATE `quest_offer_reward` SET `Emote1`=4 WHERE `ID`=4681; + +-- Emotes for Quest "The Family and the Fishing Pole" +DELETE FROM `quest_details` WHERE `ID`=1141; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(1141,4,0,0,0,0,0,0,0,0); +UPDATE `quest_request_items` SET `EmoteOnIncomplete`=1 WHERE `ID`=1141; +UPDATE `quest_offer_reward` SET `Emote1`=4 WHERE `ID`=1141; + +-- Emotes for Quest "Fruit of the Sea" +DELETE FROM `quest_details` WHERE `ID`=1138; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(1138,1,0,0,0,0,0,0,0,0); +UPDATE `quest_request_items` SET `EmoteOnComplete`=0 WHERE `ID`=1138; +UPDATE `quest_offer_reward` SET `Emote1`=273 WHERE `ID`=1138; + +-- Emotes for Quest "The Red Crystal" +DELETE FROM `quest_details` WHERE `ID`=4811; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(4811,1,0,0,0,0,0,0,0,0); +UPDATE `quest_request_items` SET `EmoteOnIncomplete`=6 WHERE `ID`=4811; +UPDATE `quest_offer_reward` SET `Emote1`=4 WHERE `ID`=4811; + +-- Emotes for Quest "As Water Cascades" +DELETE FROM `quest_details` WHERE `ID`=4812; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(4812,1,0,0,0,0,0,0,0,0); + +-- Emotes for Quest "The Fragments Within" +UPDATE `quest_offer_reward` SET `Emote1`=6, `Emote2`=1 WHERE `ID`=4813; + +-- Emotes for Quest "Tools of the Highborne" +DELETE FROM `quest_details` WHERE `ID`=958; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(958,1,0,0,0,0,0,0,0,0); +UPDATE `quest_request_items` SET `EmoteOnComplete`=0 WHERE `ID`=958; +UPDATE `quest_offer_reward` SET `Emote1`=1 WHERE `ID`=958; + +-- Emotes for Quest "BashalAran" +DELETE FROM `quest_details` WHERE `ID`=954; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(954,1,0,0,0,0,0,0,0,0); +UPDATE `quest_offer_reward` SET `Emote1`=6 WHERE `ID`=954; + +-- Emotes for Quest "BashalAran (Part 2)" +DELETE FROM `quest_details` WHERE `ID`=955; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(955,1,0,0,0,0,0,0,0,0); + +-- Emotes for Quest "BashalAran (Part 3)" +DELETE FROM `quest_details` WHERE `ID`=956; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(956,1,0,0,0,0,0,0,0,0); +UPDATE `quest_request_items` SET `EmoteOnComplete`=0 WHERE `ID`=956; + +-- Emotes for Quest "BashalAran (Part 4)" +DELETE FROM `quest_details` WHERE `ID`=957; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(957,1,0,0,0,0,0,0,0,0); +UPDATE `quest_offer_reward` SET `Emote1`=15 WHERE `ID`=957; + +-- Emotes for Quest "Beached Sea Creature" +UPDATE `quest_request_items` SET `EmoteOnComplete`=3 WHERE `ID`=4723; + +-- Emotes for Quest "Beached Sea Creature" +UPDATE `quest_request_items` SET `EmoteOnComplete`=3 WHERE `ID`=4728; + +-- Emotes for Quest "Beached Sea Creature" +UPDATE `quest_request_items` SET `EmoteOnComplete`=3 WHERE `ID`=4730; + +-- Emotes for Quest "Beached Sea Turtle" +UPDATE `quest_request_items` SET `EmoteOnComplete`=3 WHERE `ID`=4722; +UPDATE `quest_offer_reward` SET `Emote1`=4 WHERE `ID`=4722; + +-- Emotes for Quest "Beached Sea Turtle" +UPDATE `quest_request_items` SET `EmoteOnComplete`=3 WHERE `ID`=4727; + +-- Emotes for Quest "Beached Sea Turtle" +UPDATE `quest_request_items` SET `EmoteOnComplete`=3 WHERE `ID`=4731; + +-- Emotes for Quest "WANTED: Murkdeep!" +UPDATE `quest_request_items` SET `EmoteOnComplete`=1 WHERE `ID`=4740; +UPDATE `quest_offer_reward` SET `Emote1`=4 WHERE `ID`=4740; + +-- Emotes for Quest "Gaffer Jacks" +DELETE FROM `quest_details` WHERE `ID`=1579; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(1579,1,0,0,0,0,0,0,0,0); +UPDATE `quest_request_items` SET `EmoteOnIncomplete`=6, `EmoteOnComplete`=6 WHERE `ID`=1579; +UPDATE `quest_offer_reward` SET `Emote1`=5 WHERE `ID`=1579; + +-- Emotes for Quest "Electropellers" +DELETE FROM `quest_details` WHERE `ID`=1580; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(1580,1,0,0,0,0,0,0,0,0); +UPDATE `quest_request_items` SET `EmoteOnIncomplete`=6, `EmoteOnComplete`=6 WHERE `ID`=1580; +UPDATE `quest_offer_reward` SET `Emote1`=4 WHERE `ID`=1580; + +-- Emotes for Quest "Trouble In Darkshore?" +DELETE FROM `quest_details` WHERE `ID`=730; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(730,1,0,0,0,0,0,0,0,0); +UPDATE `quest_offer_reward` SET `Emote1`=1 WHERE `ID`=730; + +-- Emotes for Quest "The Absent Minded Prospector" +DELETE FROM `quest_details` WHERE `ID`=729; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(729,1,1,20,0,0,0,0,0,0); +UPDATE `quest_offer_reward` SET `Emote1`=6 WHERE `ID`=729; + +-- Emotes for Quest "The Absent Minded Prospector (Part 2)" +DELETE FROM `quest_details` WHERE `ID`=731; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(731,1,0,0,0,0,0,0,0,0); +UPDATE `quest_offer_reward` SET `Emote1`=4 WHERE `ID`=731; + +-- Emotes for Quest "The Absent Minded Prospector (Part 3)" +DELETE FROM `quest_details` WHERE `ID`=741; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(741,6,0,0,0,0,0,0,0,0); +UPDATE `quest_offer_reward` SET `Emote1`=5 WHERE `ID`=741; + +-- Emotes for Quest "The Absent Minded Prospector (Part 4)" +DELETE FROM `quest_details` WHERE `ID`=942; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(942,1,0,0,0,0,0,0,0,0); +UPDATE `quest_offer_reward` SET `Emote1`=6, `Emote2`=5 WHERE `ID`=942; + +-- Emotes for Quest "The Absent Minded Prospector (Part 5)" +DELETE FROM `quest_details` WHERE `ID`=943; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(943,1,0,0,0,0,0,0,0,0); +UPDATE `quest_offer_reward` SET `Emote1`=4 WHERE `ID`=943; + +-- Emotes for Quest "Deep Ocean, Vast Sea" +DELETE FROM `quest_details` WHERE `ID`=982; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(982,1,1,0,0,0,0,0,0,0); +UPDATE `quest_request_items` SET `EmoteOnIncomplete`=1 WHERE `ID`=982; +UPDATE `quest_offer_reward` SET `Emote1`=4 WHERE `ID`=982; + +-- Emotes for Quest "Plagued Lands" +DELETE FROM `quest_details` WHERE `ID`=2118; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(2118,2,1,0,0,0,0,0,0,0); +UPDATE `quest_request_items` SET `EmoteOnIncomplete`=6 WHERE `ID`=2118; +UPDATE `quest_offer_reward` SET `Emote1`=1 WHERE `ID`=2118; + +-- Emotes for Quest "Cleansing of the Infected" +DELETE FROM `quest_details` WHERE `ID`=2138; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(2138,274,0,0,0,0,0,0,0,0); + +-- Emotes for Quest "Tharnariun's Hope" +DELETE FROM `quest_details` WHERE `ID`=2139; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(2139,1,0,0,0,0,0,0,0,0); + +-- Emotes for Quest "How Big a Threat?" +DELETE FROM `quest_details` WHERE `ID`=984; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(984,1,0,0,0,0,0,0,0,0); +UPDATE `quest_offer_reward` SET `Emote1`=18 WHERE `ID`=984; + +-- Emotes for Quest "How Big a Threat? (Part 2)" +DELETE FROM `quest_details` WHERE `ID`=985; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(985,1,0,0,0,0,0,0,0,0); +UPDATE `quest_request_items` SET `EmoteOnIncomplete`=1 WHERE `ID`=985; +UPDATE `quest_offer_reward` SET `Emote1`=2 WHERE `ID`=985; + +-- Emotes for Quest "A Lost Master (Part 2)" +DELETE FROM `quest_details` WHERE `ID`=993; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(993,1,0,0,0,0,0,0,0,0); +UPDATE `quest_request_items` SET `EmoteOnComplete`=0 WHERE `ID`=993; + +-- Emotes for Quest "Escape Through Force" +UPDATE `quest_offer_reward` SET `Emote1`=2 WHERE `ID`=994; + +-- Emotes for Quest "Escape Through Stealth" +UPDATE `quest_offer_reward` SET `Emote1`=2 WHERE `ID`=995; + +-- Emotes for Quest "Thundris Windweaver" +DELETE FROM `quest_details` WHERE `ID`=4761; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(4761,1,0,0,0,0,0,0,0,0); +UPDATE `quest_offer_reward` SET `Emote1`=2 WHERE `ID`=4761; + +-- Emotes for Quest "The Cliffspring River" +DELETE FROM `quest_details` WHERE `ID`=4762; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(4762,1,0,0,0,0,0,0,0,0); +UPDATE `quest_request_items` SET `EmoteOnIncomplete`=1 WHERE `ID`=4762; +UPDATE `quest_offer_reward` SET `Emote1`=5 WHERE `ID`=4762; + +-- Emotes for Quest "The Blackwood Corrupted" +DELETE FROM `quest_details` WHERE `ID`=4763; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(4763,1,0,0,0,0,0,0,0,0); +UPDATE `quest_request_items` SET `EmoteOnComplete`=0 WHERE `ID`=4763; +UPDATE `quest_offer_reward` SET `Emote1`=4 WHERE `ID`=4763; + +-- Emotes for Quest "Easy Strider Living" +DELETE FROM `quest_details` WHERE `ID`=2178; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(2178,273,0,0,0,0,0,0,0,0); +UPDATE `quest_request_items` SET `EmoteOnIncomplete`=5, `EmoteOnComplete`=5 WHERE `ID`=2178; +UPDATE `quest_offer_reward` SET `Emote1`=4 WHERE `ID`=2178; + +-- Emotes for Quest "The Tower of Althalaxx" +DELETE FROM `quest_details` WHERE `ID`=965; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(965,2,1,0,0,0,0,0,0,0); +UPDATE `quest_offer_reward` SET `Emote1`=6 WHERE `ID`=965; + +-- Emotes for Quest "The Tower of Althalaxx (Part 2)" +DELETE FROM `quest_details` WHERE `ID`=966; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(966,1,0,0,0,0,0,0,0,0); +UPDATE `quest_request_items` SET `EmoteOnIncomplete`=6, `EmoteOnComplete`=6 WHERE `ID`=966; +UPDATE `quest_offer_reward` SET `Emote1`=2 WHERE `ID`=966; + +-- Emotes for Quest "The Tower of Althalaxx (Part 3)" +DELETE FROM `quest_details` WHERE `ID`=967; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(967,1,0,0,0,0,0,0,0,0); +UPDATE `quest_request_items` SET `EmoteOnComplete`=6 WHERE `ID`=967; +UPDATE `quest_offer_reward` SET `Emote1`=1 WHERE `ID`=967; + +-- Emotes for Quest "The Tower of Althalaxx (Part 4)" +DELETE FROM `quest_details` WHERE `ID`=970; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(970,1,1,0,0,0,0,0,0,0); +UPDATE `quest_request_items` SET `EmoteOnIncomplete`=6 WHERE `ID`=970; + +-- Emotes for Quest "The Tower of Althalaxx (Part 5)" +DELETE FROM `quest_details` WHERE `ID`=973; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(973,1,0,0,0,0,0,0,0,0); +UPDATE `quest_request_items` SET `EmoteOnIncomplete`=6 WHERE `ID`=973; +UPDATE `quest_offer_reward` SET `Emote1`=4 WHERE `ID`=973; + +-- Emotes for Quest "The Tower of Althalaxx (Part 6)" +DELETE FROM `quest_details` WHERE `ID`=1140; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(1140,1,0,0,0,0,0,0,0,0); +UPDATE `quest_offer_reward` SET `Emote1`=1 WHERE `ID`=1140; + +-- Emotes for Quest "The Tower of Althalaxx (Part 7)" +UPDATE `quest_offer_reward` SET `Emote1`=5 WHERE `ID`=1167; + +-- Emotes for Quest "The Tower of Althalaxx (Part 8)" +DELETE FROM `quest_details` WHERE `ID`=1143; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(1143,273,0,0,0,0,0,0,0,0); +UPDATE `quest_request_items` SET `EmoteOnIncomplete`=1 WHERE `ID`=1143; +UPDATE `quest_offer_reward` SET `Emote1`=4 WHERE `ID`=1143; + +-- Emotes for Quest "The Tower of Althalaxx (Part 9)" +UPDATE `quest_offer_reward` SET `Emote1`=273 WHERE `ID`=981; + +-- Emotes for Quest "Gyromast's Retrieval" +DELETE FROM `quest_details` WHERE `ID`=2098; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(2098,1,0,0,0,0,0,0,0,0); +UPDATE `quest_request_items` SET `EmoteOnComplete`=0 WHERE `ID`=2098; +UPDATE `quest_offer_reward` SET `Emote1`=4 WHERE `ID`=2098; + +-- Emotes for Quest "Gyromast's Revenge" +DELETE FROM `quest_details` WHERE `ID`=2078; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(2078,5,0,0,0,0,0,0,0,0); +UPDATE `quest_offer_reward` SET `Emote1`=397 WHERE `ID`=2078; + +-- Emotes for Quest "The Fall of Ameth'Aran" +DELETE FROM `quest_details` WHERE `ID`=953; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(953,1,0,0,0,0,0,0,0,0); +UPDATE `quest_offer_reward` SET `Emote1`=1, `Emote2`=2 WHERE `ID`=953; + +-- Emotes for Quest "One Shot. One Kill" +UPDATE `quest_offer_reward` SET `Emote1`=2 WHERE `ID`=5713; + +-- Emotes for Quest "The Powers Below" +UPDATE `quest_request_items` SET `EmoteOnComplete`=3 WHERE `ID`=968; +UPDATE `quest_offer_reward` SET `Emote1`=1 WHERE `ID`=968; + +-- Emotes for Quest "The Sleeper Has Awakened" +UPDATE `quest_request_items` SET `EmoteOnComplete`=0 WHERE `ID`=5321; +UPDATE `quest_offer_reward` SET `Emote1`=4 WHERE `ID`=5321; + +-- Emotes for Quest "Onward to Ashenvale" +DELETE FROM `quest_details` WHERE `ID`=10752; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(10752,1,0,0,0,0,0,0,0,0); +UPDATE `quest_offer_reward` SET `Emote1`=6 WHERE `ID`=10752; + +-- Emotes for Quest "Trek to Ashenvale" +DELETE FROM `quest_details` WHERE `ID`=990; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(990,1,0,0,0,0,0,0,0,0); +UPDATE `quest_offer_reward` SET `Emote1`=1 WHERE `ID`=990; diff --git a/data/sql/updates/db_world/2023_10_22_03.sql b/data/sql/updates/db_world/2023_10_22_03.sql new file mode 100644 index 000000000..34cd2ecb3 --- /dev/null +++ b/data/sql/updates/db_world/2023_10_22_03.sql @@ -0,0 +1,19 @@ +-- DB update 2023_10_22_02 -> 2023_10_22_03 +-- AB_Effect_000 28441 spell effect only works on NPCs related to Ashbringers in "Scarlet Monastery" +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceGroup`=1 AND `SourceEntry`=28441 AND `SourceId`=0 AND `ConditionTypeOrReference`=31 AND `ConditionTarget`=0 AND `ConditionValue1`=3 AND `ConditionValue3`=0; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(13, 1, 28441, 0, 0, 31, 0, 3, 3976, 0, 0, 0, 0, '', 'AB_Effect_000 target Scarlet Commander Mograine'), +(13, 1, 28441, 0, 1, 31, 0, 3, 4294, 0, 0, 0, 0, '', 'AB_Effect_000 target Scarlet Sorcerer'), +(13, 1, 28441, 0, 2, 31, 0, 3, 4295, 0, 0, 0, 0, '', 'AB_Effect_000 target Scarlet Myrmidon'), +(13, 1, 28441, 0, 3, 31, 0, 3, 4298, 0, 0, 0, 0, '', 'AB_Effect_000 target Scarlet Defender'), +(13, 1, 28441, 0, 4, 31, 0, 3, 4299, 0, 0, 0, 0, '', 'AB_Effect_000 target Scarlet Chaplain'), +(13, 1, 28441, 0, 5, 31, 0, 3, 4300, 0, 0, 0, 0, '', 'AB_Effect_000 target Scarlet Wizard'), +(13, 1, 28441, 0, 6, 31, 0, 3, 4301, 0, 0, 0, 0, '', 'AB_Effect_000 target Scarlet Centurion'), +(13, 1, 28441, 0, 7, 31, 0, 3, 4302, 0, 0, 0, 0, '', 'AB_Effect_000 target Scarlet Champion'), +(13, 1, 28441, 0, 8, 31, 0, 3, 4303, 0, 0, 0, 0, '', 'AB_Effect_000 target Scarlet Abbot'), +(13, 1, 28441, 0, 9, 31, 0, 3, 4540, 0, 0, 0, 0, '', 'AB_Effect_000 target Scarlet Monk'), +(13, 1, 28441, 0, 10, 31, 0, 3, 4542, 0, 0, 0, 0, '', 'AB_Effect_000 target High Inquisitor Fairbanks'); + +-- Forgiveness 28697 adds comments +UPDATE `conditions` SET `Comment`='Forgiveness target Scarlet Commander Mograine' WHERE `SourceTypeOrReferenceId`=13 AND `SourceGroup`=1 AND `SourceEntry`=28697 AND `SourceId`=0 AND `ElseGroup`=0 AND `ConditionTypeOrReference`=31 AND `ConditionTarget`=0 AND `ConditionValue1`=3 AND `ConditionValue2`=3976 AND `ConditionValue3`=0; + diff --git a/data/sql/updates/db_world/2023_10_22_04.sql b/data/sql/updates/db_world/2023_10_22_04.sql new file mode 100644 index 000000000..8dffed9a7 --- /dev/null +++ b/data/sql/updates/db_world/2023_10_22_04.sql @@ -0,0 +1,6 @@ +-- DB update 2023_10_22_03 -> 2023_10_22_04 +UPDATE `gameobject` SET `position_x` = 634.220, `position_y` = 359.989 WHERE `guid` = 47468 AND `id` = 19569; + +UPDATE `gameobject` SET `position_x` = 634.065, `position_y` = 360.295 WHERE `guid` = 47480 AND `id` = 19570; + +UPDATE `gameobject` SET `position_x` = 633.923, `position_y` = 359.858, `position_z` = 50.713 WHERE `guid` = 47481 AND `id` = 19571; diff --git a/data/sql/updates/db_world/2023_10_22_05.sql b/data/sql/updates/db_world/2023_10_22_05.sql new file mode 100644 index 000000000..bb6519c55 --- /dev/null +++ b/data/sql/updates/db_world/2023_10_22_05.sql @@ -0,0 +1,725 @@ +-- DB update 2023_10_22_04 -> 2023_10_22_05 +-- Use sniffed values for 16781 Midsummer Celebrant spawns +-- updated spawns +DELETE FROM `creature` WHERE `id1` = 16781 AND `guid` IN (202714, 202715, 202716, 202717, 202741, 202742, 202743, 202744, 202746, 202747, 202748, 202749, 202752, 202753, 202754, 202755, 202759, 202760, 202761, 202762, 202764, 202765, 202766, 202767, 94529, 94530, 94532, 94533, 94534, 94535, 94536, 94537, 94538, 94539, 94540, 94541, 94542, 94543, 94544, 94545, 94546, 94548, 94549, 94550, 94551, 94552, 94554, 94556, 94557, 94558, 94559, 94560, 94561, 94562, 94563, 94564, 94565, 94566, 94567, 94568, 94569, 94570, 94571, 94572, 94573, 94574, 94575, 94576, 94577, 94578, 94579, 94580, 94581, 94582, 94583, 94584, 94585, 94587, 94588, 94589, 94590, 94591, 94592, 94593, 94594, 94595, 94596, 94597, 94598, 94599, 94600, 94601, 94602, 94605, 94606, 94607, 94608, 94609, 94610, 94611, 94612, 94613, 94614, 94615, 94616, 94617, 94618, 94619, 94620, 94621, 94622, 94623, 94624, 94625, 94626, 94627, 94628, 94629, 94630, 94631, 94632, 94633, 94636, 94638, 94639, 94640, 94641, 94642, 94643, 94644, 94645, 94646, 94647, 94648, 94650, 94651, 94652, 94653, 94654, 94655, 94656, 94657, 94658, 94659, 94660, 94661, 94662, 94663, 94664, 94665, 94666, 94667, 94668, 94669, 94670, 94671, 94672, 94673, 94674, 94675, 94676, 94677, 94678, 94679, 94680, 94681, 94682, 94683, 94684, 94685, 94686, 94687, 94688, 94689, 94690, 94691, 94692, 94695, 94697, 94698, 94701, 94702, 94703, 94705, 94706, 94707, 94708, 94709, 94712, 94713, 94714, 94718, 94719, 94720, 94721, 94722, 94723, 94725, 94727, 94728, 94729, 94730, 94731, 94732, 94734, 94735, 94736, 94737, 94739, 94740, 94741, 94742, 94743, 94744, 94745, 94746); +INSERT INTO `creature` (`guid`, `id1`, `id2`, `id3`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `ScriptName`, `VerifiedBuild`, `CreateObject`, `Comment`) VALUES +(202714, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 127.0819168090820312, -4722.9560546875, 18.60128211975097656, 5.515240192413330078, 120, 0, 0, 2215, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(202715, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 131.1795806884765625, -4725.8388671875, 17.80640029907226562, 2.705260276794433593, 120, 0, 0, 2784, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(202716, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 131.3594818115234375, -4731.74853515625, 16.76935005187988281, 0.122173048555850982, 120, 0, 0, 1848, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(202717, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 136.675994873046875, -4729.85205078125, 16.67755126953125, 3.543018341064453125, 120, 0, 0, 1919, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(202741, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 9371.484375, -6786.65087890625, 14.43894767761230468, 5.8817596435546875, 120, 0, 0, 1919, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(202742, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 9374.86328125, -6787.50732421875, 14.52208423614501953, 3.019419670104980468, 120, 0, 0, 2784, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(202743, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 9384.71875, -6786.87109375, 14.20661067962646484, 6.0737457275390625, 120, 0, 0, 1990, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(202744, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 9388.751953125, -6787.9951171875, 14.10687828063964843, 2.792526721954345703, 120, 0, 0, 2453, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(202746, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 9793.185546875, -7259.97412109375, 26.3159332275390625, 5.8817596435546875, 120, 0, 0, 2784, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(202747, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 9796.865234375, -7261.2578125, 26.35243606567382812, 3.019419670104980468, 120, 0, 0, 2371, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(202748, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 9797.412109375, -7244.806640625, 26.14875984191894531, 5.480333805084228515, 120, 0, 0, 2614, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(202749, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 9800.8662109375, -7248.796875, 26.21503257751464843, 2.234021425247192382, 120, 0, 0, 1990, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(202752, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 7670.49658203125, -6830.04296875, 78.69478607177734375, 5.8817596435546875, 120, 0, 0, 1716, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(202753, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 7674.27685546875, -6840.67578125, 79.92003631591796875, 6.0737457275390625, 120, 0, 0, 2533, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(202754, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 7674.87841796875, -6831.93115234375, 78.88452911376953125, 3.019419670104980468, 120, 0, 0, 2784, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(202755, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 7678.85498046875, -6843.01416015625, 79.78014373779296875, 2.792526721954345703, 120, 0, 0, 3728, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(202759, 16781, 0, 0, 0, 0, 0, 1, 1, 0, 2278.226318359375, 439.366607666015625, 34.14168548583984375, 4.97418832778930664, 120, 0, 0, 2533, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(202760, 16781, 0, 0, 0, 0, 0, 1, 1, 0, 2279.183837890625, 435.570220947265625, 34.17606353759765625, 1.797689080238342285, 120, 0, 0, 3331, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(202761, 16781, 0, 0, 0, 0, 0, 1, 1, 0, 2289.63525390625, 428.393829345703125, 34.87903594970703125, 1.047197580337524414, 120, 0, 0, 2784, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(202762, 16781, 0, 0, 0, 0, 0, 1, 1, 0, 2291.09521484375, 432.0240478515625, 35.47864532470703125, 4.590215682983398437, 120, 0, 0, 3144, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(202764, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -3790.318603515625, -11510.521484375, -134.645401000976562, 3.281219005584716796, 120, 0, 0, 3052, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(202765, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -3795.79345703125, -11510.4296875, -134.709365844726562, 0.174532920122146606, 120, 0, 0, 2784, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(202766, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -3814.237548828125, -11505.810546875, -138.451461791992187, 4.433136463165283203, 120, 0, 0, 1848, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(202767, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -3815.921875, -11510.287109375, -138.488174438476562, 1.117010712623596191, 120, 0, 0, 1782, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94529, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 8709.51953125, 953.97393798828125, 13.64090156555175781, 4.258603572845458984, 120, 0, 0, 2138, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94530, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 1895.0660400390625, -4344.84912109375, 21.20777511596679687, 5.672319889068603515, 120, 0, 0, 2961, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +-- 94531 not sniffed +(94532, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -3103.629150390625, -2740.179443359375, 35.01421737670898437, 2.914699792861938476, 120, 0, 0, 2533, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94533, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -3107.486328125, -2738.833251953125, 35.2755889892578125, 5.829399585723876953, 120, 0, 0, 1848, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94534, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -3114.165283203125, -2737.15478515625, 34.85781478881835937, 4.293509960174560546, 120, 0, 0, 3624, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94535, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -3116.45751953125, -2741.033935546875, 34.89273452758789062, 0.907571196556091308, 120, 0, 0, 2292, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94536, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 9773.2451171875, 1007.27520751953125, 1299.075439453125, 4.258603572845458984, 120, 0, 0, 3941, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94537, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 6837.92919921875, -4560.8798828125, 710.037353515625, 1.2042771577835083, 120, 0, 0, 2371, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94538, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 6830.61279296875, -4564.916015625, 710.4595947265625, 5.573488235473632812, 120, 0, 0, 3728, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94539, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 6850.12939453125, -4748.908203125, 697.37890625, 6.2657318115234375, 120, 0, 0, 3728, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94540, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -50.4992942810058593, 1243.124755859375, 90.835296630859375, 2.216568231582641601, 120, 0, 0, 2699, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94541, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 2001.78955078125, -2350.227783203125, 90.30035400390625, 3.822271108627319335, 120, 0, 0, 2961, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94542, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 1987.349853515625, -2335.2705078125, 90.3668365478515625, 0.331612557172775268, 120, 0, 0, 2292, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94543, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 6312.31494140625, 527.88427734375, 16.63825225830078125, 5.235987663269042968, 120, 0, 0, 1919, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94544, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 6309.24658203125, 509.717681884765625, 17.81841850280761718, 2.059488534927368164, 120, 0, 0, 3728, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94545, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -1846.579833984375, 3044.63427734375, 1.992398381233215332, 3.543018341064453125, 120, 0, 0, 1919, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94546, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -1842.068603515625, 3054.227783203125, 0.818315327167510986, 2.705260276794433593, 120, 0, 0, 2961, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +-- 94547 not sniffed +(94548, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -9449.1767578125, -2123.471435546875, 69.1136474609375, 1.431169986724853515, 120, 0, 0, 3624, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94549, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -3433.665283203125, -959.2987060546875, 9.565944671630859375, 2.216568231582641601, 120, 0, 0, 1716, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94550, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -14277.845703125, 54.59401702880859375, 0.903981447219848632, 2.879793167114257812, 120, 0, 0, 3624, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94551, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -14289.595703125, 46.96712112426757812, 0.852089285850524902, 6.021385669708251953, 120, 0, 0, 3052, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94552, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -14285.2275390625, 45.27360153198242187, 0.565200328826904296, 2.687807083129882812, 120, 0, 0, 3524, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94554, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -14282.404296875, 55.37071609497070312, 0.4672013521194458, 6.213372230529785156, 120, 0, 0, 3052, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94556, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -1197.2857666015625, -2680.873291015625, 46.3772430419921875, 6.126105785369873046, 120, 0, 0, 3237, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94557, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -1202.4639892578125, -2657.933349609375, 45.80363845825195312, 5.235987663269042968, 120, 0, 0, 2453, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94558, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -10968.0048828125, -3234.336669921875, 41.47556686401367187, 2.216568231582641601, 120, 0, 0, 2871, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94559, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -9375.13671875, 26.34857940673828125, 61.71401596069335937, 4.834561824798583984, 120, 0, 0, 2614, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94560, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -9383.171875, 11.5457916259765625, 61.1361541748046875, 1.448623299598693847, 120, 0, 0, 1524, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94561, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -9373.3623046875, 22.89648056030273437, 62.09075927734375, 2.216568231582641601, 120, 0, 0, 3425, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94562, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -5428.44970703125, -486.615234375, 396.645751953125, 4.258603572845458984, 120, 0, 0, 1919, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94563, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -5250.07177734375, -2891.317626953125, 339.26678466796875, 4.258603572845458984, 120, 0, 0, 1585, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94564, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -6686.6455078125, -2194.682861328125, 248.433074951171875, 2.338741064071655273, 120, 0, 0, 1990, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94565, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -6685.30419921875, -2199.441650390625, 249.0545501708984375, 3.211405754089355468, 120, 0, 0, 1651, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94566, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -474.94091796875, -4528.29833984375, 12.83812427520751953, 4.660028934478759765, 120, 0, 0, 2453, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94567, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -463.081878662109375, -4537.73388671875, 9.435498237609863281, 3.071779489517211914, 120, 0, 0, 1651, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94568, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -468.08880615234375, -4537.65478515625, 10.32885360717773437, 0.03490658476948738, 120, 0, 0, 2138, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94569, 16781, 0, 0, 0, 0, 0, 1, 1, 0, 1792.443603515625, 219.5408477783203125, 60.01215744018554687, 1.570796370506286621, 120, 0, 0, 2699, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94570, 16781, 0, 0, 0, 0, 0, 1, 1, 0, 1793.1646728515625, 224.844451904296875, 59.71418380737304687, 4.468042850494384765, 120, 0, 0, 2453, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94571, 16781, 0, 0, 0, 0, 0, 1, 1, 0, 1816.4825439453125, 217.62310791015625, 59.92689132690429687, 2.042035102844238281, 120, 0, 0, 1716, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94572, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 216.6368560791015625, 7684.775390625, 23.00917816162109375, 0.907571196556091308, 120, 0, 0, 3941, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94573, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 219.3437042236328125, 7688.07666015625, 23.05628585815429687, 4.118977069854736328, 120, 0, 0, 3728, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94574, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 940.41290283203125, 789.0902099609375, 104.0225296020507812, 1.692969322204589843, 120, 0, 0, 2453, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94575, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -6786.50537109375, 544.6658935546875, 1.599180340766906738, 0.366519153118133544, 120, 0, 0, 2533, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94576, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 9773.314453125, 1033.0955810546875, 1299.56298828125, 3.839724302291870117, 120, 0, 0, 1524, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94577, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 9769.7119140625, 1030.63427734375, 1300.171875, 0.453785598278045654, 120, 0, 0, 2215, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94578, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 9772.8662109375, 1004.4332275390625, 1298.8970947265625, 1.448623299598693847, 120, 0, 0, 2371, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94579, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -6774.9521484375, 553.74176025390625, 3.734848260879516601, 4.258603572845458984, 120, 0, 0, 3624, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94580, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -6775.8408203125, 550.70379638671875, 3.138088226318359375, 1.274090290069580078, 120, 0, 0, 1782, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94581, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 6834.138671875, -4568.12451171875, 709.71368408203125, 2.757620096206665039, 120, 0, 0, 2614, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94582, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -7229.51513671875, -3843.727783203125, 12.14379501342773437, 4.258603572845458984, 120, 0, 0, 2138, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94583, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 6854.1123046875, -4749.861328125, 697.02130126953125, 3.001966238021850585, 120, 0, 0, 1848, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94584, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 6845.67724609375, -4757.61181640625, 697.64105224609375, 1.518436431884765625, 120, 0, 0, 2453, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94585, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 6846.1201171875, -4752.99462890625, 697.61151123046875, 4.537856101989746093, 120, 0, 0, 2453, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94587, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 1998.3646240234375, -2352.390380859375, 90.135009765625, 0.506145477294921875, 120, 0, 0, 3237, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94588, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 1990.5501708984375, -2333.865234375, 91.22491455078125, 3.630284786224365234, 120, 0, 0, 1990, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94589, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -62.8863945007324218, 1247.8487548828125, 90.82196044921875, 4.258603572845458984, 120, 0, 0, 2961, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94590, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -63.0911445617675781, 1244.8236083984375, 91.153228759765625, 1.448623299598693847, 120, 0, 0, 2784, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94591, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -52.60400390625, 1246.91796875, 90.813232421875, 5.235987663269042968, 120, 0, 0, 4050, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94592, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -3472.85205078125, -4218.52978515625, 9.612421035766601562, 0.78539818525314331, 120, 0, 0, 1782, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94593, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -1845.1126708984375, 3056.318359375, 0.594067335128784179, 5.515240192413330078, 120, 0, 0, 4050, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94594, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -1851.7235107421875, 3043.050537109375, 2.750925302505493164, 0.122173048555850982, 120, 0, 0, 2614, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94595, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -5511.3203125, -2279.45947265625, -58.929840087890625, 3.612831592559814453, 120, 0, 0, 1848, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94596, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -5514.57470703125, -2283.4931640625, -58.7320175170898437, 1.256637096405029296, 120, 0, 0, 1848, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94597, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 1898.49658203125, -4346.82470703125, 21.24923324584960937, 2.705260276794433593, 120, 0, 0, 3237, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94598, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -10351.283203125, -3292.098876953125, 23.25424385070800781, 4.520402908325195312, 120, 0, 0, 3834, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94599, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -9437.4248046875, -2137.572509765625, 66.7628173828125, 0.471238881349563598, 120, 0, 0, 2453, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94600, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -9434.021484375, -2135.5712890625, 66.296875, 3.752457857131958007, 120, 0, 0, 2371, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94601, 16781, 0, 0, 0, 0, 0, 1, 1, 0, 178.85015869140625, -2118.315673828125, 105.0109481811523437, 2.216568231582641601, 120, 0, 0, 2784, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94602, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -3427.63671875, -949.9451904296875, 9.669668197631835937, 4.258603572845458984, 120, 0, 0, 2215, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94605, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -1201.2806396484375, -2660.020751953125, 45.40309524536132812, 2.216568231582641601, 120, 0, 0, 2614, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94606, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -10936.1943359375, -3219.516357421875, 41.4308319091796875, 1.448623299598693847, 120, 0, 0, 1919, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94607, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -10968.8740234375, -3230.70703125, 41.53336334228515625, 5.235987663269042968, 120, 0, 0, 2062, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94608, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -10935.7001953125, -3215.9775390625, 41.4308319091796875, 4.258603572845458984, 120, 0, 0, 2371, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94609, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -5430.01806640625, -489.223052978515625, 396.78741455078125, 1.448623299598693847, 120, 0, 0, 2961, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94610, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -5243.39599609375, -2868.24951171875, 337.046142578125, 5.235987663269042968, 120, 0, 0, 1651, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94611, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -6688.79443359375, -2191.264892578125, 247.8145599365234375, 5.113814830780029296, 120, 0, 0, 2699, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94612, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -475.42340087890625, -4532.37255859375, 12.32702064514160156, 1.570796370506286621, 120, 0, 0, 2453, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94613, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -1740.6671142578125, 5351.794921875, -12.3448028564453125, 6.0737457275390625, 120, 0, 0, 2062, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94614, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -1735.1473388671875, 5351.087890625, -12.3448066711425781, 2.967059612274169921, 120, 0, 0, 2292, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94615, 16781, 0, 0, 0, 0, 0, 1, 1, 0, 1814.1285400390625, 220.9268646240234375, 59.59687423706054687, 5.218534469604492187, 120, 0, 0, 3624, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94616, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 6313.17822265625, 525.60357666015625, 17.21449089050292968, 2.216568231582641601, 120, 0, 0, 2871, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94617, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 6307.56103515625, 512.287109375, 17.76943397521972656, 5.375614166259765625, 120, 0, 0, 2215, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94618, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -9449.2509765625, -2120.39404296875, 69.13653564453125, 4.572762489318847656, 120, 0, 0, 2062, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94619, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -9382.33203125, 14.481719970703125, 61.61740875244140625, 4.258603572845458984, 120, 0, 0, 2371, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94620, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -5431.736328125, -502.4267578125, 397.757720947265625, 2.216568231582641601, 120, 0, 0, 2533, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94621, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -5433.92822265625, -500.603302001953125, 397.292236328125, 5.235987663269042968, 120, 0, 0, 2699, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94622, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -5242.91943359375, -2871.70458984375, 338.06793212890625, 2.216568231582641601, 120, 0, 0, 1919, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94623, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -5250.7705078125, -2895.20458984375, 338.6141357421875, 1.448623299598693847, 120, 0, 0, 3524, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94624, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 34.11257553100585937, 2604.561767578125, 71.0569000244140625, 5.8817596435546875, 120, 0, 0, 1919, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94625, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 214.86187744140625, 7681.31591796875, 22.78777694702148437, 2.792526721954345703, 120, 0, 0, 2614, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94626, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 209.9723052978515625, 7682.06884765625, 22.66131210327148437, 0.05235987901687622, 120, 0, 0, 3144, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94627, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -1026.5867919921875, 304.890625, 135.8292694091796875, 0.715584993362426757, 120, 0, 0, 2215, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94628, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -1023.05902099609375, 307.598968505859375, 135.807464599609375, 3.88965606689453125, 120, 0, 0, 1524, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94629, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 1918.671875, -4348.6474609375, 20.8673858642578125, 5.026548385620117187, 120, 0, 0, 1585, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94630, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 1919.467041015625, -4353.54541015625, 20.84742355346679687, 1.623156189918518066, 120, 0, 0, 3144, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94631, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -1764.56298828125, 5311.56982421875, -12.3448047637939453, 3.019419670104980468, 120, 0, 0, 3728, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94632, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -1769.8411865234375, 5313.84912109375, -12.3448028564453125, 5.8817596435546875, 120, 0, 0, 3331, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94633, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -515.7862548828125, 2339.665771484375, 37.94459152221679687, 2.216568231582641601, 120, 0, 0, 3941, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94636, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -1195.37109375, -2682.076416015625, 47.0075531005859375, 2.530727386474609375, 120, 0, 0, 3728, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94638, 16781, 0, 0, 0, 0, 0, 1, 1, 0, 186.3649139404296875, -2115.523193359375, 105.463714599609375, 1.448623299598693847, 120, 0, 0, 3144, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94639, 16781, 0, 0, 0, 0, 0, 1, 1, 0, 187.436737060546875, -2112.564697265625, 106.0841522216796875, 4.258603572845458984, 120, 0, 0, 3425, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94640, 16781, 0, 0, 0, 0, 0, 1, 1, 0, 177.1781768798828125, -2115.2431640625, 105.3067855834960937, 5.235987663269042968, 120, 0, 0, 2614, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94641, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -1143.935546875, -3549.910888671875, 52.43030929565429687, 5.235987663269042968, 120, 0, 0, 3237, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94642, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -1142.06201171875, -3553.01171875, 52.26158523559570312, 2.216568231582641601, 120, 0, 0, 2062, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94643, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -1115.127197265625, -3547.663330078125, 50.0686492919921875, 2.530727386474609375, 120, 0, 0, 2961, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94644, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -1117.8231201171875, -3543.859619140625, 50.28672409057617187, 4.547890186309814453, 120, 0, 0, 1919, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94645, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -10684.3466796875, -1148.5767822265625, 25.8847808837890625, 0.01745329238474369, 120, 0, 0, 3425, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94646, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -10682.5556640625, -1168.065673828125, 24.84414100646972656, 1.448623299598693847, 120, 0, 0, 1524, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94647, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -10681.478515625, -1164.2542724609375, 25.25356101989746093, 4.258603572845458984, 120, 0, 0, 2961, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94648, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -10680.306640625, -1147.926513671875, 25.908477783203125, 3.385938644409179687, 120, 0, 0, 3834, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94650, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -10351.9716796875, -3296.738037109375, 23.66120338439941406, 1.48352980613708496, 120, 0, 0, 2292, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94651, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -10350.076171875, -3307.586181640625, 23.21487236022949218, 0.191986218094825744, 120, 0, 0, 3144, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94652, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -10344.3994140625, -3306.411376953125, 23.19609832763671875, 3.368485450744628906, 120, 0, 0, 3524, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94653, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -14371.4580078125, 132.8599700927734375, 1.042927384376525878, 1.780235767364501953, 120, 0, 0, 2453, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94654, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -14388.7724609375, 125.6664810180664062, 1.14530336856842041, 5.567600250244140625, 120, 0, 0, 3524, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94655, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -14385.0595703125, 122.5594100952148437, 1.325597405433654785, 2.408554315567016601, 120, 0, 0, 1585, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94656, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -14374.603515625, 137.5897674560546875, 0.442370355129241943, 5.270894527435302734, 120, 0, 0, 3237, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94657, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -122.378196716308593, -813.28106689453125, 55.64160919189453125, 3.019419670104980468, 120, 0, 0, 1585, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94658, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -125.859756469726562, -811.30780029296875, 55.3297119140625, 5.8817596435546875, 120, 0, 0, 2138, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94659, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -129.013504028320312, -823.60845947265625, 55.25949478149414062, 0.593411922454833984, 120, 0, 0, 2961, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94660, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -125.360298156738281, -821.475830078125, 55.401031494140625, 3.560471534729003906, 120, 0, 0, 3331, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94661, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -4708.4287109375, -1236.9578857421875, 501.74273681640625, 1.117010712623596191, 120, 0, 0, 1585, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94662, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -4692.7177734375, -1218.0670166015625, 501.74267578125, 0.750491559505462646, 120, 0, 0, 3941, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94663, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -4706.34130859375, -1233.2301025390625, 501.74273681640625, 4.258603572845458984, 120, 0, 0, 1782, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94664, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -4688.58056640625, -1213.5035400390625, 501.74267578125, 4.258603572845458984, 120, 0, 0, 1990, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94665, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -1203.7896728515625, 7487.376953125, 22.23898696899414062, 3.543018341064453125, 120, 0, 0, 2215, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94666, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -1207.9310302734375, 7487.22119140625, 22.329345703125, 6.021385669708251953, 120, 0, 0, 2614, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94667, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -1214.888916015625, 7493.080078125, 20.783966064453125, 1.274090290069580078, 120, 0, 0, 2699, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94668, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -1213.771240234375, 7498.375, 20.59492683410644531, 4.555309295654296875, 120, 0, 0, 2138, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94669, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -10646.9736328125, 1072.1695556640625, 34.08964157104492187, 1.518436431884765625, 120, 0, 0, 2062, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94670, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -10640.6201171875, 1080.9749755859375, 34.885528564453125, 2.216568231582641601, 120, 0, 0, 2699, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94671, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -10646.326171875, 1075.0521240234375, 34.66873931884765625, 4.258603572845458984, 120, 0, 0, 3052, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94672, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -10642.1982421875, 1083.531005859375, 35.00516510009765625, 5.235987663269042968, 120, 0, 0, 2292, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94673, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -614.224365234375, -535.79620361328125, 36.18006515502929687, 2.216568231582641601, 120, 0, 0, 2533, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94674, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -615.83917236328125, -532.4276123046875, 35.78181838989257812, 5.235987663269042968, 120, 0, 0, 2614, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94675, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -8840.865234375, 851.16375732421875, 98.97126007080078125, 1.919862151145935058, 120, 0, 0, 1919, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94676, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -8842.8212890625, 856.1844482421875, 98.68222808837890625, 4.991641521453857421, 120, 0, 0, 3834, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94677, 16781, 0, 0, 0, 0, 0, 1, 1, 0, 593.82080078125, 1350.0206298828125, 90.39966583251953125, 5.131268024444580078, 120, 0, 0, 3834, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94678, 16781, 0, 0, 0, 0, 0, 1, 1, 0, 595.3646240234375, 1345.8031005859375, 90.15616607666015625, 1.867502331733703613, 120, 0, 0, 1919, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94679, 16781, 0, 0, 0, 0, 0, 1, 1, 0, 602.08380126953125, 1351.74072265625, 88.17452239990234375, 3.050934076309204101, 120, 0, 0, 2215, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94680, 16781, 0, 0, 0, 0, 0, 1, 1, 0, 600.0303955078125, 1355.1802978515625, 88.827880859375, 5.218534469604492187, 120, 0, 0, 2871, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94681, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -4585.1943359375, 428.713714599609375, 42.22011184692382812, 5.8817596435546875, 120, 0, 0, 2533, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94682, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -4593.39990234375, 421.33831787109375, 43.28391265869140625, 6.0737457275390625, 120, 0, 0, 3524, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94683, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -7603.89404296875, -2066.003662109375, 129.67547607421875, 6.248278617858886718, 120, 0, 0, 3728, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94684, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -7595.41064453125, -2060.6318359375, 131.6774139404296875, 5.131268024444580078, 120, 0, 0, 2371, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94685, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -7592.49462890625, -2065.334228515625, 131.0778045654296875, 2.356194496154785156, 120, 0, 0, 1524, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94686, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -7599.01806640625, -2067.004638671875, 129.61773681640625, 2.844886541366577148, 120, 0, 0, 2784, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94687, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -4589.1201171875, 420.20013427734375, 42.82030868530273437, 2.792526721954345703, 120, 0, 0, 1990, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94688, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -4580.62890625, 427.090667724609375, 41.96175765991210937, 3.019419670104980468, 120, 0, 0, 3425, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94689, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -6988.54638671875, 908.5411376953125, 9.156393051147460937, 5.06145477294921875, 120, 0, 0, 2699, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94690, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -6979.45166015625, 913.84600830078125, 10.17988014221191406, 2.757620096206665039, 120, 0, 0, 1848, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94691, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -6984.421875, 914.66644287109375, 10.25777626037597656, 6.2657318115234375, 120, 0, 0, 1524, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94692, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -6988.51025390625, 905.155517578125, 8.611766815185546875, 1.361356854438781738, 120, 0, 0, 2453, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94695, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -7106.0185546875, -3664.1640625, 10.67626762390136718, 5.567600250244140625, 120, 0, 0, 2614, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94697, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -6783.3271484375, 546.26434326171875, 2.062355279922485351, 3.124139308929443359, 120, 0, 0, 3052, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94698, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -7110.3818359375, -3667.189208984375, 9.933405876159667968, 5.270894527435302734, 120, 0, 0, 3331, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94701, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -7230.20166015625, -3847.15673828125, 12.04393196105957031, 1.274090290069580078, 120, 0, 0, 1585, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94702, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -623.30419921875, -530.146484375, 34.34803009033203125, 4.717217445373535156, 120, 0, 0, 3237, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94703, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -623.67034912109375, -533.0115966796875, 34.46847915649414062, 1.448623299598693847, 120, 0, 0, 3052, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94705, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -3434.67236328125, -956.68206787109375, 9.655954360961914062, 5.235987663269042968, 120, 0, 0, 2699, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94706, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -3428.97119140625, -953.84014892578125, 10.22418594360351562, 1.448623299598693847, 120, 0, 0, 1651, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94707, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 947.502197265625, 793.03857421875, 104.3484954833984375, 4.852015495300292968, 120, 0, 0, 1716, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94708, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 948.3798828125, 787.4296875, 104.1169052124023437, 1.762782573699951171, 120, 0, 0, 1848, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94709, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 939.41058349609375, 794.42889404296875, 104.0962142944335937, 4.956735134124755859, 120, 0, 0, 3834, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94712, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -516.27880859375, 2343.693115234375, 37.8050994873046875, 4.834561824798583984, 120, 0, 0, 3941, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94713, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -508.935272216796875, 2331.935791015625, 38.67222976684570312, 1.082104086875915527, 120, 0, 0, 2533, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94714, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -505.305999755859375, 2335.1953125, 38.78377532958984375, 3.926990747451782226, 120, 0, 0, 1651, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94718, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -2535.738037109375, 4272.06982421875, 16.9969635009765625, 5.8817596435546875, 120, 0, 0, 3331, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94719, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -2532.480224609375, 4270.6025390625, 16.28694725036621093, 3.019419670104980468, 120, 0, 0, 3237, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94720, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 38.45231246948242187, 2603.812255859375, 70.8330841064453125, 3.019419670104980468, 120, 0, 0, 3425, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94721, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 27.40256118774414062, 2596.1513671875, 70.34127044677734375, 3.368485450744628906, 120, 0, 0, 3728, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94722, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 23.92898178100585937, 2595.87548828125, 70.45648193359375, 6.0737457275390625, 120, 0, 0, 2371, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94723, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -7102.43212890625, -3666.719970703125, 11.12041664123535156, 2.757620096206665039, 120, 0, 0, 1651, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94725, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -7109.0185546875, -3670.7197265625, 10.04127311706542968, 1.780235767364501953, 120, 0, 0, 3425, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94727, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 8708.4892578125, 949.18243408203125, 13.74794769287109375, 1.448623299598693847, 120, 0, 0, 3331, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94728, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 8723.4521484375, 968.93621826171875, 11.25754356384277343, 3.490658521652221679, 120, 0, 0, 1990, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94729, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -290.37841796875, -2665.664794921875, 93.42819976806640625, 3.40339207649230957, 120, 0, 0, 2961, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94730, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -294.148712158203125, -2665.89111328125, 93.49237823486328125, 0.575958669185638427, 120, 0, 0, 2871, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94731, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -293.684417724609375, -2659.167236328125, 94.075286865234375, 6.056292533874511718, 120, 0, 0, 3624, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94732, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -288.67620849609375, -2660.697509765625, 93.6977386474609375, 2.740166902542114257, 120, 0, 0, 3052, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94734, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -7234.59375, -3851.161865234375, 11.25800991058349609, 2.687807083129882812, 120, 0, 0, 3237, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94735, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -7237.943359375, -3850.227783203125, 10.85197639465332031, 6.17846536636352539, 120, 0, 0, 3425, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94736, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -2541.39013671875, 4261.50537109375, 16.38279533386230468, 3.368485450744628906, 120, 0, 0, 1919, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94737, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -2545.98828125, 4260.8525390625, 18.70516014099121093, 6.0737457275390625, 120, 0, 0, 3237, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94739, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 8718.390625, 966.43621826171875, 11.33300685882568359, 0.244346097111701965, 120, 0, 0, 3624, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94740, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -3472.674072265625, -4204.02001953125, 11.57154464721679687, 1.518436431884765625, 120, 0, 0, 2784, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94741, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -3471.389892578125, -4198.935546875, 11.40192699432373046, 4.293509960174560546, 120, 0, 0, 2062, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94742, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -3469.436279296875, -4215.04345703125, 9.689471244812011718, 3.944444179534912109, 120, 0, 0, 2292, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94743, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 2554.700439453125, -468.442230224609375, 109.6515350341796875, 2.216568231582641601, 120, 0, 0, 2614, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94744, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 2553.02099609375, -466.177581787109375, 109.6237945556640625, 5.235987663269042968, 120, 0, 0, 2961, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(94745, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 2570.2333984375, -459.8243408203125, 108.06475830078125, 2.530727386474609375, 120, 0, 0, 2062, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(94746, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 2567.436767578125, -458.459625244140625, 108.470672607421875, 6.126105785369873046, 120, 0, 0, 3052, 0, 0, 0, 0, 0, "", 50063, 0, NULL); + +UPDATE `creature` SET `CreateObject` = 1 WHERE `id1` = 16781 AND `guid` IN (202714, 202715, 202716, 202717, 202741, 202742, 202743, 202744, 202746, 202747, 202748, 202749, 202752, 202753, 202754, 202755, 202759, 202760, 202761, 202762, 202764, 202765, 202766, 202767, 94529, 94530, 94532, 94533, 94534, 94535, 94536, 94537, 94538, 94539, 94540, 94541, 94542, 94543, 94544, 94545, 94546, 94548, 94549, 94550, 94551, 94552, 94554, 94556, 94557, 94558, 94559, 94560, 94561, 94562, 94563, 94564, 94565, 94566, 94567, 94568, 94569, 94570, 94571, 94572, 94573, 94574, 94575, 94576, 94577, 94578, 94579, 94580, 94581, 94582, 94583, 94584, 94585, 94587, 94588, 94589, 94590, 94591, 94592, 94593, 94594, 94595, 94596, 94597, 94598, 94599, 94600, 94601, 94602, 94605, 94606, 94607, 94608, 94609, 94610, 94611, 94612, 94613, 94614, 94615, 94616, 94617, 94618, 94619, 94620, 94621, 94622, 94623, 94624, 94625, 94626, 94627, 94628, 94629, 94630, 94631, 94632, 94633, 94636, 94638, 94639, 94640, 94641, 94642, 94643, 94644, 94645, 94646, 94647, 94648, 94650, 94651, 94652, 94653, 94654, 94655, 94656, 94657, 94658, 94659, 94660, 94661, 94662, 94663, 94664, 94665, 94666, 94667, 94668, 94669, 94670, 94671, 94672, 94673, 94674, 94675, 94676, 94677, 94678, 94679, 94680, 94681, 94682, 94683, 94684, 94685, 94686, 94687, 94688, 94689, 94690, 94691, 94692, 94695, 94697, 94698, 94701, 94702, 94703, 94705, 94706, 94707, 94708, 94709, 94712, 94713, 94714, 94718, 94719, 94720, 94721, 94722, 94723, 94725, 94727, 94728, 94729, 94730, 94731, 94732, 94734, 94735, 94736, 94737, 94739, 94740, 94741, 94742, 94743, 94744, 94745, 94746); + +DELETE FROM `game_event_creature` WHERE `eventEntry` = 1 AND `guid` IN (202714, 202715, 202716, 202717, 202741, 202742, 202743, 202744, 202746, 202747, 202748, 202749, 202752, 202753, 202754, 202755, 202759, 202760, 202761, 202762, 202764, 202765, 202766, 202767, 94529, 94530, 94532, 94533, 94534, 94535, 94536, 94537, 94538, 94539, 94540, 94541, 94542, 94543, 94544, 94545, 94546, 94548, 94549, 94550, 94551, 94552, 94554, 94556, 94557, 94558, 94559, 94560, 94561, 94562, 94563, 94564, 94565, 94566, 94567, 94568, 94569, 94570, 94571, 94572, 94573, 94574, 94575, 94576, 94577, 94578, 94579, 94580, 94581, 94582, 94583, 94584, 94585, 94587, 94588, 94589, 94590, 94591, 94592, 94593, 94594, 94595, 94596, 94597, 94598, 94599, 94600, 94601, 94602, 94605, 94606, 94607, 94608, 94609, 94610, 94611, 94612, 94613, 94614, 94615, 94616, 94617, 94618, 94619, 94620, 94621, 94622, 94623, 94624, 94625, 94626, 94627, 94628, 94629, 94630, 94631, 94632, 94633, 94636, 94638, 94639, 94640, 94641, 94642, 94643, 94644, 94645, 94646, 94647, 94648, 94650, 94651, 94652, 94653, 94654, 94655, 94656, 94657, 94658, 94659, 94660, 94661, 94662, 94663, 94664, 94665, 94666, 94667, 94668, 94669, 94670, 94671, 94672, 94673, 94674, 94675, 94676, 94677, 94678, 94679, 94680, 94681, 94682, 94683, 94684, 94685, 94686, 94687, 94688, 94689, 94690, 94691, 94692, 94695, 94697, 94698, 94701, 94702, 94703, 94705, 94706, 94707, 94708, 94709, 94712, 94713, 94714, 94718, 94719, 94720, 94721, 94722, 94723, 94725, 94727, 94728, 94729, 94730, 94731, 94732, 94734, 94735, 94736, 94737, 94739, 94740, 94741, 94742, 94743, 94744, 94745, 94746); +INSERT INTO `game_event_creature` (`eventEntry`,`guid`) VALUES +(1, 202714), +(1, 202715), +(1, 202716), +(1, 202717), +(1, 202741), +(1, 202742), +(1, 202743), +(1, 202744), +(1, 202746), +(1, 202747), +(1, 202748), +(1, 202749), +(1, 202752), +(1, 202753), +(1, 202754), +(1, 202755), +(1, 202759), +(1, 202760), +(1, 202761), +(1, 202762), +(1, 202764), +(1, 202765), +(1, 202766), +(1, 202767), +(1, 94529), +(1, 94530), +(1, 94532), +(1, 94533), +(1, 94534), +(1, 94535), +(1, 94536), +(1, 94537), +(1, 94538), +(1, 94539), +(1, 94540), +(1, 94541), +(1, 94542), +(1, 94543), +(1, 94544), +(1, 94545), +(1, 94546), +(1, 94548), +(1, 94549), +(1, 94550), +(1, 94551), +(1, 94552), +(1, 94554), +(1, 94556), +(1, 94557), +(1, 94558), +(1, 94559), +(1, 94560), +(1, 94561), +(1, 94562), +(1, 94563), +(1, 94564), +(1, 94565), +(1, 94566), +(1, 94567), +(1, 94568), +(1, 94569), +(1, 94570), +(1, 94571), +(1, 94572), +(1, 94573), +(1, 94574), +(1, 94575), +(1, 94576), +(1, 94577), +(1, 94578), +(1, 94579), +(1, 94580), +(1, 94581), +(1, 94582), +(1, 94583), +(1, 94584), +(1, 94585), +(1, 94587), +(1, 94588), +(1, 94589), +(1, 94590), +(1, 94591), +(1, 94592), +(1, 94593), +(1, 94594), +(1, 94595), +(1, 94596), +(1, 94597), +(1, 94598), +(1, 94599), +(1, 94600), +(1, 94601), +(1, 94602), +(1, 94605), +(1, 94606), +(1, 94607), +(1, 94608), +(1, 94609), +(1, 94610), +(1, 94611), +(1, 94612), +(1, 94613), +(1, 94614), +(1, 94615), +(1, 94616), +(1, 94617), +(1, 94618), +(1, 94619), +(1, 94620), +(1, 94621), +(1, 94622), +(1, 94623), +(1, 94624), +(1, 94625), +(1, 94626), +(1, 94627), +(1, 94628), +(1, 94629), +(1, 94630), +(1, 94631), +(1, 94632), +(1, 94633), +(1, 94636), +(1, 94638), +(1, 94639), +(1, 94640), +(1, 94641), +(1, 94642), +(1, 94643), +(1, 94644), +(1, 94645), +(1, 94646), +(1, 94647), +(1, 94648), +(1, 94650), +(1, 94651), +(1, 94652), +(1, 94653), +(1, 94654), +(1, 94655), +(1, 94656), +(1, 94657), +(1, 94658), +(1, 94659), +(1, 94660), +(1, 94661), +(1, 94662), +(1, 94663), +(1, 94664), +(1, 94665), +(1, 94666), +(1, 94667), +(1, 94668), +(1, 94669), +(1, 94670), +(1, 94671), +(1, 94672), +(1, 94673), +(1, 94674), +(1, 94675), +(1, 94676), +(1, 94677), +(1, 94678), +(1, 94679), +(1, 94680), +(1, 94681), +(1, 94682), +(1, 94683), +(1, 94684), +(1, 94685), +(1, 94686), +(1, 94687), +(1, 94688), +(1, 94689), +(1, 94690), +(1, 94691), +(1, 94692), +(1, 94695), +(1, 94697), +(1, 94698), +(1, 94701), +(1, 94702), +(1, 94703), +(1, 94705), +(1, 94706), +(1, 94707), +(1, 94708), +(1, 94709), +(1, 94712), +(1, 94713), +(1, 94714), +(1, 94718), +(1, 94719), +(1, 94720), +(1, 94721), +(1, 94722), +(1, 94723), +(1, 94725), +(1, 94727), +(1, 94728), +(1, 94729), +(1, 94730), +(1, 94731), +(1, 94732), +(1, 94734), +(1, 94735), +(1, 94736), +(1, 94737), +(1, 94739), +(1, 94740), +(1, 94741), +(1, 94742), +(1, 94743), +(1, 94744), +(1, 94745), +(1, 94746); + +-- new spawns +DELETE FROM `creature` WHERE `id1` = 16781 AND `guid` BETWEEN 139127 AND 139262; +INSERT INTO `creature` (`guid`, `id1`, `id2`, `id3`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `ScriptName`, `VerifiedBuild`, `CreateObject`, `Comment`) VALUES +(139127, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -10701.2314453125, -1157.10107421875, 24.87251091003417968, 2.351024627685546875, 120, 0, 0, 2062, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(139128, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -10703.4609375, -1151.9708251953125, 25.09306907653808593, 2.971575021743774414, 120, 0, 0, 1782, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(139129, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -4692.6484375, -1228.8831787109375, 501.659271240234375, 4.224524497985839843, 120, 0, 0, 4050, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(139130, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -4694.72509765625, -1228.233154296875, 501.6593017578125, 5.137562274932861328, 120, 0, 0, 2784, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(139131, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -6689.6044921875, -2199.64013671875, 249.043731689453125, 0.174532920122146606, 120, 0, 0, 3524, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(139132, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -8256.31640625, -2605.284423828125, 133.235626220703125, 4.258603572845458984, 120, 0, 0, 1585, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139133, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -8257.9580078125, -2609.8115234375, 133.249481201171875, 1.448623299598693847, 120, 0, 0, 3052, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139134, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -8264.7490234375, -2641.7578125, 133.6263885498046875, 2.216568231582641601, 120, 0, 0, 3834, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139135, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -8266.9189453125, -2639.165283203125, 134.0574493408203125, 5.235987663269042968, 120, 0, 0, 2961, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139136, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -8821.6669921875, 881.41400146484375, 98.79027557373046875, 3.996803998947143554, 120, 0, 0, 3941, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139137, 16781, 0, 0, 0, 0, 0, 1, 1, 0, -8825.2900390625, 876.76513671875, 98.821807861328125, 1.029744267463684082, 120, 0, 0, 3624, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139138, 16781, 0, 0, 0, 0, 0, 1, 1, 0, 1006.48651123046875, -1442.0902099609375, 62.62816619873046875, 1.448623299598693847, 120, 0, 0, 2215, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139139, 16781, 0, 0, 0, 0, 0, 1, 1, 0, 1007.09637451171875, -1435.5517578125, 63.42873764038085937, 4.642575740814208984, 120, 0, 0, 3524, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139140, 16781, 0, 0, 0, 0, 0, 1, 1, 0, 988.69769287109375, -1444.1343994140625, 63.6132659912109375, 1.29154360294342041, 120, 0, 0, 2062, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139141, 16781, 0, 0, 0, 0, 0, 1, 1, 0, 990.811767578125, -1439.3695068359375, 64.5729827880859375, 4.15388345718383789, 120, 0, 0, 2614, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139142, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -1000.00872802734375, 312.12152099609375, 135.8292694091796875, 3.385938644409179687, 120, 0, 0, 2784, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139143, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -1005.61981201171875, 310.899322509765625, 135.8292694091796875, 0.191986218094825744, 120, 0, 0, 3524, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139144, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -2333.6328125, -606.24383544921875, -8.55437660217285156, 3.543018341064453125, 120, 0, 0, 3331, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139145, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -2337.065185546875, -607.47906494140625, -8.18629264831542968, 0.122173048555850982, 120, 0, 0, 3624, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139146, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -2337.664794921875, -617.125244140625, -7.4183053970336914, 2.705260276794433593, 120, 0, 0, 1651, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139147, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -2341.706298828125, -614.60626220703125, -7.27002334594726562, 5.515240192413330078, 120, 0, 0, 3941, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139148, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -4397.759765625, 3463.2197265625, 11.22617053985595703, 4.834561824798583984, 120, 0, 0, 2215, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139149, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -4398.2509765625, 3458.70947265625, 11.29399967193603515, 2.216568231582641601, 120, 0, 0, 3624, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(139150, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -4412.48974609375, 3464.407470703125, 13.15926170349121093, 4.258603572845458984, 120, 0, 0, 1782, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139151, 16781, 0, 0, 1, 0, 0, 1, 1, 0, -4414.69677734375, 3461.673095703125, 13.22854804992675781, 1.448623299598693847, 120, 0, 0, 3728, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139152, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 6840.31201171875, -4555.98095703125, 710.2003173828125, 4.206243515014648437, 120, 0, 0, 2453, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139153, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 8696.9345703125, 937.32525634765625, 14.55591869354248046, 2.631667137145996093, 120, 0, 0, 2292, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139154, 16781, 0, 0, 1, 0, 0, 1, 1, 0, 8704.1767578125, 944.35198974609375, 13.64527416229248046, 3.877047538757324218, 120, 0, 0, 2292, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139155, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -2222.540283203125, -11890.4208984375, 27.97060394287109375, 4.258603572845458984, 120, 0, 0, 2533, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139156, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -2222.741455078125, -11892.71875, 27.48875808715820312, 1.448623299598693847, 120, 0, 0, 1585, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139157, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -2232.90185546875, -11917.44921875, 26.92511177062988281, 2.216568231582641601, 120, 0, 0, 1524, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139158, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -2235.29931640625, -11914.263671875, 26.05220794677734375, 5.235987663269042968, 120, 0, 0, 1919, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139159, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -2506.72509765625, 7556.00244140625, -1.40493464469909667, 4.834561824798583984, 120, 0, 0, 3052, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139160, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -2507.036865234375, 7551.8447265625, -1.13188362121582031, 1.570796370506286621, 120, 0, 0, 2961, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139161, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -2507.24169921875, 7532.45166015625, 0.469488352537155151, 3.926990747451782226, 120, 0, 0, 1782, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139162, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -2510.171142578125, 7530.70751953125, 0.631805300712585449, 0.693436861038208007, 120, 0, 0, 3052, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139163, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -2989.25244140625, 4142.83447265625, 5.049828529357910156, 1.675516128540039062, 120, 0, 0, 4050, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139164, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -2989.418701171875, 4146.6103515625, 5.539825439453125, 4.694935798645019531, 120, 0, 0, 3524, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139165, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -2997.968017578125, 4144.9990234375, 2.975908279418945312, 3.926990747451782226, 120, 0, 0, 3144, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139166, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -3001.250244140625, 4140.32958984375, 2.030464410781860351, 1.082104086875915527, 120, 0, 0, 4050, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139167, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -3049.09716796875, 2392.4052734375, 61.67646026611328125, 4.555309295654296875, 120, 0, 0, 2784, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139168, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -3050.47119140625, 2388.159423828125, 62.44898223876953125, 1.274090290069580078, 120, 0, 0, 1848, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139169, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -3060.248046875, 2398.67724609375, 61.3582000732421875, 4.625122547149658203, 120, 0, 0, 2699, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139170, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -3060.8466796875, 2395.11376953125, 61.72652053833007812, 1.413716673851013183, 120, 0, 0, 2371, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139171, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -3793.38671875, -11495.5478515625, -134.705001831054687, 2.668026924133300781, 120, 0, 0, 1716, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(139172, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -3961.43408203125, 2055.026611328125, 95.148040771484375, 3.926990747451782226, 120, 0, 0, 2871, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139173, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -3963.264892578125, 2052.794677734375, 95.148040771484375, 1.082104086875915527, 120, 0, 0, 2784, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139174, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -3969.27685546875, 2043.572021484375, 95.1483154296875, 2.216568231582641601, 120, 0, 0, 3941, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(139175, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -3970.262939453125, 2046.131103515625, 95.148162841796875, 4.834561824798583984, 120, 0, 0, 1651, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(139176, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -4210.650390625, -12301.302734375, 1.654789328575134277, 2.216568231582641601, 120, 0, 0, 3524, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139177, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -4211.76025390625, -12330.4970703125, 3.183884143829345703, 4.258603572845458984, 120, 0, 0, 1585, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139178, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -4211.90673828125, -12297.8056640625, 1.91208040714263916, 5.235987663269042968, 120, 0, 0, 3425, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139179, 16781, 0, 0, 530, 0, 0, 1, 1, 0, -4212.716796875, -12333.73828125, 3.594502210617065429, 1.448623299598693847, 120, 0, 0, 2699, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139180, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 190.33062744140625, 5998.0126953125, 24.39078330993652343, 1.082104086875915527, 120, 0, 0, 2292, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139181, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 190.4051971435546875, 6007.1650390625, 24.1693115234375, 4.834561824798583984, 120, 0, 0, 1848, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139182, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 190.8719329833984375, 6004.16748046875, 24.28223800659179687, 2.216568231582641601, 120, 0, 0, 3624, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139183, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 191.632354736328125, 6000.23779296875, 24.4112701416015625, 3.926990747451782226, 120, 0, 0, 2138, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139184, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 2031.359375, 6601.51025390625, 136.8399200439453125, 1.448623299598693847, 120, 0, 0, 1919, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139185, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 2033.853759765625, 6604.1318359375, 137.4528961181640625, 4.258603572845458984, 120, 0, 0, 3425, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(139186, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 2041.9774169921875, 6575.76220703125, 134.592193603515625, 5.235987663269042968, 120, 0, 0, 1990, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139187, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 2044.85546875, 6572.400390625, 134.8233184814453125, 2.216568231582641601, 120, 0, 0, 1990, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139188, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 2263.68310546875, 6136.705078125, 137.2147064208984375, 4.258603572845458984, 120, 0, 0, 3052, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139189, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 2263.91064453125, 6132.2109375, 137.5455780029296875, 1.448623299598693847, 120, 0, 0, 2961, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139190, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 2293.89794921875, 6160.11328125, 135.8495330810546875, 5.235987663269042968, 120, 0, 0, 2453, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139191, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 2296.048828125, 6156.392578125, 135.0826263427734375, 2.216568231582641601, 120, 0, 0, 2871, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139192, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 2922.30517578125, 3666.272216796875, 145.1943511962890625, 1.448623299598693847, 120, 0, 0, 3052, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(139193, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 2923.46435546875, 3669.0126953125, 144.9244384765625, 4.258603572845458984, 120, 0, 0, 1716, 0, 0, 0, 0, 0, "", 50063, 0, NULL), +(139194, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 2926.392333984375, 3701.306396484375, 143.7755584716796875, 5.235987663269042968, 120, 0, 0, 3834, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139195, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 2928.210205078125, 3698.048095703125, 143.8076171875, 2.216568231582641601, 120, 0, 0, 2871, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139196, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 3109.265625, 3720.612060546875, 145.1728515625, 2.216568231582641601, 120, 0, 0, 1651, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139197, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 3109.507080078125, 3725.17578125, 145.2384033203125, 4.834561824798583984, 120, 0, 0, 2784, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139198, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 3125.484375, 3725.59326171875, 142.5902862548828125, 1.082104086875915527, 120, 0, 0, 3524, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139199, 16781, 0, 0, 530, 0, 0, 1, 1, 0, 3126.439453125, 3729.56982421875, 142.483184814453125, 3.926990747451782226, 120, 0, 0, 2961, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139200, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 2457.836669921875, -4903.42529296875, 263.61767578125, 1.082104086875915527, 120, 0, 0, 2784, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139201, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 2459.67724609375, -4900.81787109375, 263.543304443359375, 3.926990747451782226, 120, 0, 0, 3237, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139202, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 2466.2978515625, -4906.74755859375, 264.084075927734375, 4.642575740814208984, 120, 0, 0, 2533, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139203, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 2466.573486328125, -4910.02197265625, 264.16815185546875, 1.754963874816894531, 120, 0, 0, 1585, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139204, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 2590.704345703125, -4352.7197265625, 275.87060546875, 5.672319889068603515, 120, 0, 0, 3728, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139205, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 2593.116455078125, -4354.75927734375, 275.85491943359375, 2.356194496154785156, 120, 0, 0, 3144, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139206, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 2604.65283203125, -4349.236328125, 275.7276611328125, 5.916666030883789062, 120, 0, 0, 2699, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139207, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 2607.03564453125, -4350.83544921875, 275.838623046875, 2.286381244659423828, 120, 0, 0, 2533, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139208, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 3363.32177734375, -2133.1533203125, 123.9278182983398437, 5.619960308074951171, 120, 0, 0, 2871, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139209, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 3366.183837890625, -2135.861083984375, 124.3294448852539062, 2.268928050994873046, 120, 0, 0, 1848, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139210, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 3378.244140625, -2139.7666015625, 124.9742355346679687, 5.026548385620117187, 120, 0, 0, 3834, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139211, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 3378.42333984375, -2144.294677734375, 124.8458480834960937, 1.326450228691101074, 120, 0, 0, 1848, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139212, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 3408.40185546875, -2885.163818359375, 201.1352081298828125, 1.082104086875915527, 120, 0, 0, 1990, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139213, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 3410.669677734375, -2882.25341796875, 201.108062744140625, 3.926990747451782226, 120, 0, 0, 3331, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139214, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 3420.4033203125, -2884.866455078125, 202.0738525390625, 1.780235767364501953, 120, 0, 0, 4050, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139215, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 3420.75830078125, -2881.11767578125, 202.3721466064453125, 4.642575740814208984, 120, 0, 0, 3728, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139216, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 3757.033447265625, 1491.1285400390625, 91.73284912109375, 5.8817596435546875, 120, 0, 0, 2138, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139217, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 3760.4296875, 1507.6015625, 89.87375640869140625, 6.0737457275390625, 120, 0, 0, 3728, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139218, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 3763.28955078125, 1506.70556640625, 89.33295440673828125, 3.368485450744628906, 120, 0, 0, 3728, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139219, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 3939.974853515625, -607.47686767578125, 241.8284759521484375, 4.834561824798583984, 120, 0, 0, 3834, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139220, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 3940.39892578125, -610.2362060546875, 242.02777099609375, 2.216568231582641601, 120, 0, 0, 3237, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139221, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 3946.244873046875, -625.32342529296875, 242.421844482421875, 0.715584993362426757, 120, 0, 0, 4050, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139222, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 3948.481689453125, -623.30615234375, 241.8450164794921875, 3.892084121704101562, 120, 0, 0, 2292, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139223, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 4146.4248046875, 5392.51806640625, 26.23081016540527343, 1.082104086875915527, 120, 0, 0, 3331, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139224, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 4147.98876953125, 5394.76806640625, 26.03989982604980468, 3.926990747451782226, 120, 0, 0, 2699, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139225, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 4152.33544921875, 5403.42138671875, 27.38189315795898437, 4.834561824798583984, 120, 0, 0, 1716, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139226, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 4152.42578125, 5400.58935546875, 26.6825408935546875, 2.216568231582641601, 120, 0, 0, 2699, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139227, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 4466.49462890625, 5615.1318359375, 57.21674728393554687, 5.8817596435546875, 120, 0, 0, 3834, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139228, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 4468.97412109375, 5614.6904296875, 57.5550384521484375, 3.019419670104980468, 120, 0, 0, 1782, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139229, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 4470.0087890625, 5623.4189453125, 58.90815353393554687, 6.0737457275390625, 120, 0, 0, 3524, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139230, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 4472.21435546875, 5622.79443359375, 59.23351287841796875, 3.168313026428222656, 120, 0, 0, 2961, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139231, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 5131.25927734375, -680.6533203125, 171.677764892578125, 4.932596206665039062, 120, 0, 0, 4050, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139232, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 5131.77197265625, -683.32135009765625, 171.4430389404296875, 1.797689080238342285, 120, 0, 0, 2062, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139233, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 5137.96728515625, -695.96380615234375, 172.0256195068359375, 0.663225114345550537, 120, 0, 0, 3052, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139234, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 5139.6884765625, -694.12042236328125, 171.7145843505859375, 3.909537553787231445, 120, 0, 0, 2215, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139235, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 5271.1572265625, -2791.30517578125, 292.501861572265625, 1.535889744758605957, 120, 0, 0, 3425, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139236, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 5272.021484375, -2787.055908203125, 292.501861572265625, 4.328416347503662109, 120, 0, 0, 2614, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139237, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 5285.443359375, -2773.591064453125, 292.501861572265625, 0.506145477294921875, 120, 0, 0, 3144, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139238, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 5288.8515625, -2771.415283203125, 292.501861572265625, 3.592701911926269531, 120, 0, 0, 3941, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139239, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 5353.1650390625, 4852.46630859375, -192.568603515625, 1.082104086875915527, 120, 0, 0, 1585, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139240, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 5353.3818359375, 4867.77978515625, -189.798294067382812, 5.270894527435302734, 120, 0, 0, 1990, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139241, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 5355.0615234375, 4864.12255859375, -190.967422485351562, 1.902408838272094726, 120, 0, 0, 2371, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139242, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 5355.73486328125, 4854.8544921875, -193.244140625, 3.926990747451782226, 120, 0, 0, 2699, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139243, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 5500.1689453125, 4885.63330078125, -198.4190673828125, 6.0737457275390625, 120, 0, 0, 3624, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139244, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 5503.37353515625, 4884.96142578125, -198.343353271484375, 3.368485450744628906, 120, 0, 0, 3941, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139245, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 5506.169921875, 4888.8203125, -197.933181762695312, 5.323254108428955078, 120, 0, 0, 2292, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139246, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 5507.82861328125, 4886.794921875, -197.88641357421875, 2.356194496154785156, 120, 0, 0, 3524, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139247, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 5523.92822265625, -717.83514404296875, 148.5211029052734375, 5.550356864929199218, 120, 0, 0, 2614, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139248, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 5526.07470703125, -721.347412109375, 148.4966278076171875, 2.268928050994873046, 120, 0, 0, 2784, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139249, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 5541.05859375, -729.351806640625, 150.0355682373046875, 4.921828269958496093, 120, 0, 0, 2699, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139250, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 5541.20751953125, -732.760986328125, 149.995849609375, 1.500983119010925292, 120, 0, 0, 3728, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139251, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 5611.73876953125, -2618.024658203125, 292.297149658203125, 1.082104086875915527, 120, 0, 0, 2215, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139252, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 5613.908203125, -2616.232177734375, 292.2694091796875, 3.926990747451782226, 120, 0, 0, 1848, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139253, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 5624.13525390625, -2621.2490234375, 292.501861572265625, 4.642575740814208984, 120, 0, 0, 3941, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139254, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 5624.1552734375, -2624.92578125, 292.501861572265625, 1.780235767364501953, 120, 0, 0, 1990, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139255, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 6074.1826171875, -1115.936279296875, 420.4525146484375, 0.139626339077949523, 120, 0, 0, 1782, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139256, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 6078.80322265625, -1115.361083984375, 420.3092041015625, 3.246312379837036132, 120, 0, 0, 1782, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139257, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 6089.47705078125, -1116.2974853515625, 419.81597900390625, 0.663225114345550537, 120, 0, 0, 3237, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139258, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 6092.06591796875, -1114.0496826171875, 419.058319091796875, 3.909537553787231445, 120, 0, 0, 1848, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139259, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 6151.4912109375, -1032.8651123046875, 409.3367919921875, 4.921828269958496093, 120, 0, 0, 3834, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139260, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 6151.6396484375, -1035.900634765625, 409.4896240234375, 1.500983119010925292, 120, 0, 0, 3237, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139261, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 6157.4091796875, -1023.6146240234375, 408.467071533203125, 5.619960308074951171, 120, 0, 0, 2138, 0, 0, 0, 0, 0, "", 50172, 0, NULL), +(139262, 16781, 0, 0, 571, 0, 0, 1, 1, 0, 6159.4375, -1025.43212890625, 408.73101806640625, 2.268928050994873046, 120, 0, 0, 3941, 0, 0, 0, 0, 0, "", 50172, 0, NULL); + +UPDATE `creature` SET `CreateObject` = 1 WHERE `id1` = 16781 AND `guid` BETWEEN 139127 AND 139262; + +DELETE FROM `game_event_creature` WHERE `eventEntry` = 1 AND `guid` BETWEEN 139127 AND 139262; +INSERT INTO `game_event_creature` (`eventEntry`,`guid`) VALUES +(1, 139127), +(1, 139128), +(1, 139129), +(1, 139130), +(1, 139131), +(1, 139132), +(1, 139133), +(1, 139134), +(1, 139135), +(1, 139136), +(1, 139137), +(1, 139138), +(1, 139139), +(1, 139140), +(1, 139141), +(1, 139142), +(1, 139143), +(1, 139144), +(1, 139145), +(1, 139146), +(1, 139147), +(1, 139148), +(1, 139149), +(1, 139150), +(1, 139151), +(1, 139152), +(1, 139153), +(1, 139154), +(1, 139155), +(1, 139156), +(1, 139157), +(1, 139158), +(1, 139159), +(1, 139160), +(1, 139161), +(1, 139162), +(1, 139163), +(1, 139164), +(1, 139165), +(1, 139166), +(1, 139167), +(1, 139168), +(1, 139169), +(1, 139170), +(1, 139171), +(1, 139172), +(1, 139173), +(1, 139174), +(1, 139175), +(1, 139176), +(1, 139177), +(1, 139178), +(1, 139179), +(1, 139180), +(1, 139181), +(1, 139182), +(1, 139183), +(1, 139184), +(1, 139185), +(1, 139186), +(1, 139187), +(1, 139188), +(1, 139189), +(1, 139190), +(1, 139191), +(1, 139192), +(1, 139193), +(1, 139194), +(1, 139195), +(1, 139196), +(1, 139197), +(1, 139198), +(1, 139199), +(1, 139200), +(1, 139201), +(1, 139202), +(1, 139203), +(1, 139204), +(1, 139205), +(1, 139206), +(1, 139207), +(1, 139208), +(1, 139209), +(1, 139210), +(1, 139211), +(1, 139212), +(1, 139213), +(1, 139214), +(1, 139215), +(1, 139216), +(1, 139217), +(1, 139218), +(1, 139219), +(1, 139220), +(1, 139221), +(1, 139222), +(1, 139223), +(1, 139224), +(1, 139225), +(1, 139226), +(1, 139227), +(1, 139228), +(1, 139229), +(1, 139230), +(1, 139231), +(1, 139232), +(1, 139233), +(1, 139234), +(1, 139235), +(1, 139236), +(1, 139237), +(1, 139238), +(1, 139239), +(1, 139240), +(1, 139241), +(1, 139242), +(1, 139243), +(1, 139244), +(1, 139245), +(1, 139246), +(1, 139247), +(1, 139248), +(1, 139249), +(1, 139250), +(1, 139251), +(1, 139252), +(1, 139253), +(1, 139254), +(1, 139255), +(1, 139256), +(1, 139257), +(1, 139258), +(1, 139259), +(1, 139260), +(1, 139261), +(1, 139262); diff --git a/data/sql/updates/db_world/2023_10_22_06.sql b/data/sql/updates/db_world/2023_10_22_06.sql new file mode 100644 index 000000000..dd428d71f --- /dev/null +++ b/data/sql/updates/db_world/2023_10_22_06.sql @@ -0,0 +1,5 @@ +-- DB update 2023_10_22_05 -> 2023_10_22_06 +-- +DELETE FROM `areatrigger_scripts` WHERE `entry` = 4522; +INSERT INTO `areatrigger_scripts` (`entry`, `ScriptName`) VALUES +(4522, 'at_karazhan_side_entrance'); diff --git a/data/sql/updates/db_world/2023_10_22_07.sql b/data/sql/updates/db_world/2023_10_22_07.sql new file mode 100644 index 000000000..4e32800fc --- /dev/null +++ b/data/sql/updates/db_world/2023_10_22_07.sql @@ -0,0 +1,21 @@ +-- DB update 2023_10_22_06 -> 2023_10_22_07 +UPDATE `transports` SET `name` = 'Grom\'gol Base Camp, Stranglethorn Vale and Undercity, Tirisfal Glades (Zeppelin, Horde ("The Purple Princess"))' WHERE `entry` = 176495; +UPDATE `transports` SET `name` = 'Auberdine, Darkshore and Stormwind Harbor (Boat, Alliance ("The Bravery"))' WHERE `entry` = 176310; +UPDATE `transports` SET `name` = 'Auberdine, Darkshore and Rut\'theran Village, Teldrassil (Boat, Alliance ("The Moonspray"))' WHERE `entry` = 176244; +UPDATE `transports` SET `name` = 'Menethil Harbor, Wetlands and Theramore Isle, Dustwallow Marsh (Boat, Alliance ("The Lady Mehley"))' WHERE `entry` = 176231; +UPDATE `transports` SET `name` = 'Grom\'gol Base Camp, Stranglethorn Vale and Orgrimmar, Durotar (Zeppelin, Horde ("The Iron Eagle"))' WHERE `entry` = 175080; +UPDATE `transports` SET `name` = 'Undercity, Tirisfal Glades and Orgrimmar, Durotar (Zeppelin, Horde ("The Thundercaller"))' WHERE `entry` = 164871; +UPDATE `transports` SET `name` = 'Booty Bay, Stranglethorn Vale and Ratchet, The Barrens (Boat, Neutral ("The Maiden\'s Fancy"))' WHERE `entry` = 20808; +UPDATE `transports` SET `name` = 'The Forgotten Coast, Feralas and Feathermoon Stronghold, Feralas (Boat, Alliance ("Feathermoon Ferry"))' WHERE `entry` = 177233; +UPDATE `transports` SET `name` = 'Auberdine, Darkshore and Valaar\'s Berth, Azuremyst Isle (Boat, Alliance ("Elune\'s Blessing"))' WHERE `entry` = 181646; +UPDATE `transports` SET `name` = 'Menethil Harbor, Wetlands and Valgarde, Howling Fjord (Boat, Alliance ("Northspear"))' WHERE `entry` = 181688; +UPDATE `transports` SET `name` = 'Undercity, Tirisfal Glades and Vengeance Landing, Howling Fjord (Zeppelin, Horde ("Cloudkisser"))' WHERE `entry` = 181689; +UPDATE `transports` SET `name` = 'Orgrimmar, Durotar and Warsong Hold, Borean Tundra (Zeppelin, Horde ("The Mighty Wind"))' WHERE `entry` = 186238; +UPDATE `transports` SET `name` = 'Westguard Keep, Howling Fjord and Shattered Straits, Howling Fjord (Zeppelin, Alliance)' WHERE `entry` = 186371; +UPDATE `transports` SET `name` = 'Garvan\'s Reef (Boat, Neutral ("Sister Mercy"))' WHERE `entry` = 187038; +UPDATE `transports` SET `name` = 'Unu\'pe, Borean Tundra and Moa\'ki Harbor, Dragonblight (Turtle, Neutral ("Walker of Waves"))' WHERE `entry` = 187568; +UPDATE `transports` SET `name` = 'Kamagua, Howling Fjord and Moa\'ki Harbor, Dragonblight (Turtle, Neutral ("Green Island"))' WHERE `entry` = 188511; +UPDATE `transports` SET `name` = 'Valiance Keep, Borean Tundra and Stormwind Harbor (Boat, Alliance ("The Kraken"))' WHERE `entry` = 190536; +UPDATE `transports` SET `name` = 'Icecrown (Gunship, Horde ("Orgrim\'s Hammer"))' WHERE `entry` = 192241; +UPDATE `transports` SET `name` = 'Icecrown (Gunship, Alliance ("The Skybreaker"))' WHERE `entry` = 192242; +UPDATE `transports` SET `name` = 'Orgrimmar, Durotar and Thunder Bluff, Mulgore (Zeppelin, Horde ("The Zephyr"))' WHERE `entry` = 190549; diff --git a/data/sql/updates/db_world/2023_10_22_08.sql b/data/sql/updates/db_world/2023_10_22_08.sql new file mode 100644 index 000000000..ed38edf9f --- /dev/null +++ b/data/sql/updates/db_world/2023_10_22_08.sql @@ -0,0 +1,8 @@ +-- DB update 2023_10_22_07 -> 2023_10_22_08 +ALTER TABLE `reputation_spillover_template` + ADD COLUMN `faction5` SMALLINT UNSIGNED NOT NULL DEFAULT '0', + ADD COLUMN `rate_5` FLOAT NOT NULL DEFAULT '0', + ADD COLUMN `rank_5` TINYINT UNSIGNED NOT NULL DEFAULT '0', + ADD COLUMN `faction6` SMALLINT UNSIGNED NOT NULL DEFAULT '0', + ADD COLUMN `rate_6` FLOAT NOT NULL DEFAULT '0', + ADD COLUMN `rank_6` TINYINT UNSIGNED NOT NULL DEFAULT '0'; diff --git a/data/sql/updates/db_world/2023_10_22_09.sql b/data/sql/updates/db_world/2023_10_22_09.sql new file mode 100644 index 000000000..cc06c442d --- /dev/null +++ b/data/sql/updates/db_world/2023_10_22_09.sql @@ -0,0 +1,9 @@ +-- DB update 2023_10_22_08 -> 2023_10_22_09 +-- You need to kill Skartax +DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 17) AND (`SourceGroup` = 0) AND (`SourceEntry` = 37285) AND (`SourceId` = 0) AND (`ElseGroup` = 0) AND (`ConditionTypeOrReference` = 29) AND (`ConditionTarget` = 0) AND (`ConditionValue1` = 21207) AND (`ConditionValue2` = 30) AND (`ConditionValue3` = 1); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(17, 0, 37285, 0, 0, 29, 0, 21207, 30, 1, 0, 0, 0, '', 'Disrupt the summoning of infernal souls within the summoning chamber of the Deathforge.'); + +DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_disrupt_summoning_ritual'; +INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES +(37285, 'spell_disrupt_summoning_ritual'); diff --git a/docker-compose.yml b/docker-compose.yml index 4624cb2c8..6e6d59cbd 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,57 +1,17 @@ -version: '3.9' - -# extension field: https://docs.docker.com/compose/compose-file/compose-file-v3/#extension-fields -x-networks: &networks - networks: - - ac-network - -x-build-params: &build-params - context: . - dockerfile: ./apps/docker/Dockerfile - args: - USER_ID: ${DOCKER_USER_ID:-1000} - GROUP_ID: ${DOCKER_GROUP_ID:-1000} - DOCKER_USER: ${DOCKER_USER:-acore} - # BUILDKIT_INLINE_CACHE: 1 - cache_from: - - acore/ac-wotlk-authserver:${DOCKER_IMAGE_TAG:-master} - - acore/ac-wotlk-authserver-local:${DOCKER_IMAGE_TAG:-master} - - acore/ac-wotlk-worldserver:${DOCKER_IMAGE_TAG:-master} - - acore/ac-wotlk-worldserver-local:${DOCKER_IMAGE_TAG:-master} - - acore/ac-wotlk-dev-server:${DOCKER_IMAGE_TAG:-master} - - acore/ac-wotlk-tools:${DOCKER_IMAGE_TAG:-master} - # Need to fix reduced space on GH actions first - # - acore/ac-wotlk-client-data:${DOCKER_IMAGE_TAG:-master} - -x-ac-shared-conf: &ac-shared-conf - <<: *networks - working_dir: /azerothcore - environment: - AC_DISABLE_INTERACTIVE: "1" - -x-ac-service-conf: &ac-service-conf - <<: *ac-shared-conf - # List can't be merged. See: https://forums.docker.com/t/how-to-merge-a-list-of-volumes-from-an-extension-field-into-the-service-definition/77454 - # volumes: - # - ${DOCKER_VOL_ETC:-./env/dist/etc}:/azerothcore/env/dist/etc - # # [osxfs optimization]: https://stackoverflow.com/a/63437557/1964544 - # - ${DOCKER_VOL_LOGS:-./env/dist/logs}:/azerothcore/env/dist/logs:delegated - +# docker-compose.yml for AzerothCore. +# +# Start the server with `docker compose up -d --build` +# +# Don't make changes this file! make a `docker-compose.override.yml` and make your +# changes there instead. +version: '3' services: -#======================= -# -# DATABASE -# -#======================= - - ac-database: - <<: *networks + container_name: ac-database image: mysql:8.0 - restart: unless-stopped - cap_add: - - SYS_NICE # CAP_SYS_NICE + networks: + - ac-network ports: - ${DOCKER_DB_EXTERNAL_PORT:-3306}:3306 environment: @@ -60,62 +20,154 @@ services: - type: volume source: ac-database target: /var/lib/mysql + restart: unless-stopped healthcheck: test: "/usr/bin/mysql --user=root --password=$$MYSQL_ROOT_PASSWORD --execute \"SHOW DATABASES;\"" interval: 5s timeout: 10s retries: 40 -#====================== -# -# Dev services -# -#====================== - - # - # Used for the build process to avoid the host binding of the /azerothcore - # and speedup the compilation by avoiding the host-container filesystem conversion issue - # on non-ext filesystems. Reference https://stackoverflow.com/a/63437557/1964544 - # - ac-dev-build: - <<: [ *ac-shared-conf ] # merge with - image: acore/ac-wotlk-dev-server:${DOCKER_IMAGE_TAG:-master} - user: ${DOCKER_USER:-root} - cap_add: - - SYS_NICE # CAP_SYS_NICE + ac-db-import: + container_name: ac-db-import + image: acore/ac-wotlk-db-import:${DOCKER_IMAGE_TAG:-master} + networks: + - ac-network build: - target: dev - <<: *build-params - security_opt: - - seccomp:unconfined - env_file: - ${DOCKER_AC_ENV_FILE:-conf/dist/env.ac} + context: . + target: db-import + dockerfile: apps/docker/Dockerfile + environment: + AC_DATA_DIR: "/azerothcore/env/dist/data" + AC_LOGS_DIR: "/azerothcore/env/dist/logs" + AC_LOGIN_DATABASE_INFO: "ac-database;3306;root;${DOCKER_DB_ROOT_PASSWORD:-password};acore_auth" + AC_WORLD_DATABASE_INFO: "ac-database;3306;root;${DOCKER_DB_ROOT_PASSWORD:-password};acore_world" + AC_CHARACTER_DATABASE_INFO: "ac-database;3306;root;${DOCKER_DB_ROOT_PASSWORD:-password};acore_characters" volumes: - # expose some dist folder outside allowing the host to use them - - ${DOCKER_VOL_CONF:-./conf}:/azerothcore/conf - - ${DOCKER_VOL_BIN:-ac-bin-dev}:/azerothcore/env/dist/bin - ${DOCKER_VOL_ETC:-./env/dist/etc}:/azerothcore/env/dist/etc - - ac-build-dev:/azerothcore/var/build - - ac-ccache-dev:/azerothcore/var/ccache - profiles: [dev-build] + # [osxfs optimization]: https://stackoverflow.com/a/63437557/1964544 + - ${DOCKER_VOL_LOGS:-./env/dist/logs}:/azerothcore/env/dist/logs:delegated + depends_on: + ac-database: + condition: service_healthy - # - # Dev server with the ./azerothcore folder binded from the host - # Please use Linux, WSL2 or any ext-compatible filesystem - # to avoid performance issues - # - ac-dev-server: - <<: [ *ac-shared-conf ] # merge with - tty: true - image: acore/ac-wotlk-dev-server:${DOCKER_IMAGE_TAG:-master} - user: ${DOCKER_USER:-root} - cap_add: - - SYS_NICE # CAP_SYS_NICE + ac-worldserver: + container_name: ac-worldserver + image: acore/ac-wotlk-worldserver:${DOCKER_IMAGE_TAG:-master} build: - target: dev - <<: *build-params - security_opt: - - seccomp:unconfined + context: . + target: worldserver + dockerfile: apps/docker/Dockerfile + networks: + - ac-network + stdin_open: true + tty: true + restart: unless-stopped + env_file: + ${DOCKER_AC_ENV_FILE:-conf/dist/env.ac} + environment: + AC_DATA_DIR: "/azerothcore/env/dist/data" + AC_LOGS_DIR: "/azerothcore/env/dist/logs" + AC_LOGIN_DATABASE_INFO: "ac-database;3306;root;${DOCKER_DB_ROOT_PASSWORD:-password};acore_auth" + AC_WORLD_DATABASE_INFO: "ac-database;3306;root;${DOCKER_DB_ROOT_PASSWORD:-password};acore_world" + AC_CHARACTER_DATABASE_INFO: "ac-database;3306;root;${DOCKER_DB_ROOT_PASSWORD:-password};acore_characters" + ports: + - ${DOCKER_WORLD_EXTERNAL_PORT:-8085}:8085 + - ${DOCKER_SOAP_EXTERNAL_PORT:-7878}:7878 + volumes: + - ${DOCKER_VOL_ETC:-./env/dist/etc}:/azerothcore/env/dist/etc + # [osxfs optimization]: https://stackoverflow.com/a/63437557/1964544 + - ${DOCKER_VOL_LOGS:-./env/dist/logs}:/azerothcore/env/dist/logs:delegated + # client data + - ${DOCKER_VOL_DATA:-ac-client-data}:/azerothcore/env/dist/data/:ro + depends_on: + ac-database: + condition: service_healthy + ac-db-import: + condition: service_completed_successfully + ac-client-data-init: + condition: service_completed_successfully + + ac-authserver: + container_name: ac-authserver + image: acore/ac-wotlk-authserver:${DOCKER_IMAGE_TAG:-master} + build: + context: . + target: authserver + dockerfile: apps/docker/Dockerfile + networks: + - ac-network + tty: true + restart: unless-stopped + env_file: + ${DOCKER_AC_ENV_FILE:-conf/dist/env.ac} + environment: + AC_LOGS_DIR: "/azerothcore/env/dist/logs" + AC_TEMP_DIR: "/azerothcore/env/dist/temp" + AC_LOGIN_DATABASE_INFO: "ac-database;3306;root;${DOCKER_DB_ROOT_PASSWORD:-password};acore_auth" + volumes: + - ${DOCKER_VOL_ETC:-./env/dist/etc}:/azerothcore/env/dist/etc + # [osxfs optimization]: https://stackoverflow.com/a/63437557/1964544 + - ${DOCKER_VOL_LOGS:-./env/dist/logs}:/azerothcore/env/dist/logs:delegated + ports: + - ${DOCKER_AUTH_EXTERNAL_PORT:-3724}:3724 + depends_on: + ac-database: + condition: service_healthy + ac-db-import: + condition: service_completed_successfully + + ac-client-data-init: + container_name: ac-client-data-init + image: acore/ac-wotlk-client-data:${DOCKER_IMAGE_TAG:-master} + user: ${DOCKER_USER:-root} + build: + context: . + target: client-data + dockerfile: apps/docker/Dockerfile + args: + USER_ID: ${DOCKER_USER_ID:-1000} + GROUP_ID: ${DOCKER_GROUP_ID:-1000} + DOCKER_USER: ${DOCKER_USER:-acore} + volumes: + - ${DOCKER_VOL_CLIENT_DATA:-ac-client-data}:/azerothcore/env/dist/data + + # used for extracting maps from files shipped with game client + # Most of the time this shouldn't be needed + ac-tools: + container_name: ac-tools + image: acore/ac-wotlk-tools:${DOCKER_IMAGE_TAG:-master} + user: ${DOCKER_USER:-root} + build: + context: . + target: tools + dockerfile: apps/docker/Dockerfile + working_dir: /azerothcore/env/client/ + volumes: + # this is not the directory of the extracted data! It's the client folder used by the extractors + - ${DOCKER_AC_CLIENT_FOLDER:-./var/client}:/azerothcore/env/dist/bin/Data + # Activate with `docker compose --profile tools ...` + profiles: [tools] + + # Dev server with the ./azerothcore folder binded from the host + # Please use Linux, WSL2 or any ext-compatible filesystem + # to avoid performance issues + # + # This is primarily intended for use with the "devcontainer" project + # + # This is provided primarily for development, though it doesn't receive + # first-class support + ac-dev-server: + tty: true + image: acore/ac-wotlk-dev-server:${DOCKER_IMAGE_TAG:-master} + user: ${DOCKER_USER:-root} + build: + context: . + dockerfile: ./apps/docker/Dockerfile.dev-server + args: + USER_ID: ${DOCKER_USER_ID:-1000} + GROUP_ID: ${DOCKER_GROUP_ID:-1000} + DOCKER_USER: ${DOCKER_USER:-acore} + target: dev env_file: ${DOCKER_AC_ENV_FILE:-conf/dist/env.ac} environment: @@ -124,7 +176,6 @@ services: AC_LOGIN_DATABASE_INFO: "ac-database;3306;root;${DOCKER_DB_ROOT_PASSWORD:-password};acore_auth" AC_WORLD_DATABASE_INFO: "ac-database;3306;root;${DOCKER_DB_ROOT_PASSWORD:-password};acore_world" AC_CHARACTER_DATABASE_INFO: "ac-database;3306;root;${DOCKER_DB_ROOT_PASSWORD:-password};acore_characters" - AC_CLOSE_IDLE_CONNECTIONS: "0" ports: - ${DOCKER_AUTH_EXTERNAL_PORT:-3724}:3724 - ${DOCKER_WORLD_EXTERNAL_PORT:-8085}:8085 @@ -136,285 +187,18 @@ services: - ac-ccache-dev:/azerothcore/var/ccache # this is not the directory of the extracted data! It's the client folder used by the extractors - ${DOCKER_AC_CLIENT_FOLDER:-./var/client}:/azerothcore/env/dist/bin/Data + # Activate with `docker compose --profile dev ...` profiles: [dev] depends_on: ac-database: condition: service_healthy - ac-db-import: - <<: *ac-shared-conf - image: acore/ac-wotlk-worldserver-local:${DOCKER_IMAGE_TAG:-master} # name of the generated image after built locally - command: ./env/dist/bin/dbimport - environment: - AC_DATA_DIR: "/azerothcore/env/dist/data" - AC_LOGS_DIR: "/azerothcore/env/dist/logs" - AC_LOGIN_DATABASE_INFO: "ac-database;3306;root;${DOCKER_DB_ROOT_PASSWORD:-password};acore_auth" - AC_WORLD_DATABASE_INFO: "ac-database;3306;root;${DOCKER_DB_ROOT_PASSWORD:-password};acore_world" - AC_CHARACTER_DATABASE_INFO: "ac-database;3306;root;${DOCKER_DB_ROOT_PASSWORD:-password};acore_characters" - AC_CLOSE_IDLE_CONNECTIONS: "0" - volumes: - # read-only binaries compiled by ac-dev-server - - ${DOCKER_VOL_BIN:-ac-bin-dev}:/azerothcore/env/dist/bin:ro - - ${DOCKER_VOL_ETC:-./env/dist/etc}:/azerothcore/env/dist/etc:ro - # [osxfs optimization]: https://stackoverflow.com/a/63437557/1964544 - - ${DOCKER_VOL_LOGS:-./env/dist/logs}:/azerothcore/env/dist/logs:delegated - profiles: [local, app, db-import-local] - depends_on: - ac-database: - condition: service_healthy - -#======================= -# -# APP Services -# -#======================= - - ac-worldserver: - <<: *ac-service-conf # merge with ac-service-conf - stdin_open: true - tty: true - cap_add: - - SYS_NICE # CAP_SYS_NICE - command: ./acore.sh run-worldserver - image: acore/ac-wotlk-worldserver-local:${DOCKER_IMAGE_TAG:-master} # name of the generated image after built locally - restart: unless-stopped - env_file: - ${DOCKER_AC_ENV_FILE:-conf/dist/env.ac} - environment: - AC_DATA_DIR: "/azerothcore/env/dist/data" - AC_LOGS_DIR: "/azerothcore/env/dist/logs" - AC_LOGIN_DATABASE_INFO: "ac-database;3306;root;${DOCKER_DB_ROOT_PASSWORD:-password};acore_auth" - AC_WORLD_DATABASE_INFO: "ac-database;3306;root;${DOCKER_DB_ROOT_PASSWORD:-password};acore_world" - AC_CHARACTER_DATABASE_INFO: "ac-database;3306;root;${DOCKER_DB_ROOT_PASSWORD:-password};acore_characters" - AC_CLOSE_IDLE_CONNECTIONS: "0" - user: ${DOCKER_USER:-root} - privileged: true - build: - target: worldserver-local - <<: *build-params - ports: - - ${DOCKER_WORLD_EXTERNAL_PORT:-8085}:8085 - - ${DOCKER_SOAP_EXTERNAL_PORT:-7878}:7878 - volumes: - # read-only binaries compiled by ac-dev-server - - ${DOCKER_VOL_BIN:-ac-bin-dev}:/azerothcore/env/dist/bin:ro - - ${DOCKER_VOL_ETC:-./env/dist/etc}:/azerothcore/env/dist/etc:ro - # [osxfs optimization]: https://stackoverflow.com/a/63437557/1964544 - - ${DOCKER_VOL_LOGS:-./env/dist/logs}:/azerothcore/env/dist/logs:delegated - # client data - - ${DOCKER_VOL_DATA:-./env/dist/data/}:/azerothcore/env/dist/data/ - profiles: [local, app, worldserver] - depends_on: - ac-database: - condition: service_healthy - ac-db-import: - condition: service_completed_successfully - - ac-authserver: - <<: *ac-service-conf # merge with ac-service-conf - tty: true - command: ./acore.sh run-authserver - image: acore/ac-wotlk-authserver-local:${DOCKER_IMAGE_TAG:-master} # name of the generated image after built locally - restart: unless-stopped - env_file: - ${DOCKER_AC_ENV_FILE:-conf/dist/env.ac} - environment: - AC_LOGS_DIR: "/azerothcore/env/dist/logs" - AC_TEMP_DIR: "/azerothcore/env/dist/temp" - AC_LOGIN_DATABASE_INFO: "ac-database;3306;root;${DOCKER_DB_ROOT_PASSWORD:-password};acore_auth" - AC_SQLDRIVER_LOG_FILE: "SQLDriver.log" - AC_SQLDRIVER_QUERY_LOGGING: "1" - user: ${DOCKER_USER:-root} - build: - target: authserver-local - <<: *build-params - volumes: - # read-only binaries compiled by ac-dev-server - - ${DOCKER_VOL_BIN:-ac-bin-dev}:/azerothcore/env/dist/bin:ro - - ${DOCKER_VOL_ETC:-./env/dist/etc}:/azerothcore/env/dist/etc - # [osxfs optimization]: https://stackoverflow.com/a/63437557/1964544 - - ${DOCKER_VOL_LOGS:-./env/dist/logs}:/azerothcore/env/dist/logs:delegated - ports: - - ${DOCKER_AUTH_EXTERNAL_PORT:-3724}:3724 - profiles: [local, app, authserver] - depends_on: - ac-database: - condition: service_healthy - ac-db-import: - condition: service_completed_successfully - -#====================== -# -# Production services -# -# The following services are used to test the production images -# Do not use them unless you know what you're doing! -# We do not offer support for them -# -# For a production-ready docker-compose, please check the official repo: https://github.com/azerothcore/acore-docker -# -#====================== - - ac-database-prod: - <<: *networks - image: mysql:8.0 - restart: unless-stopped - cap_add: - - SYS_NICE # CAP_SYS_NICE - ports: - - ${DOCKER_DB_EXTERNAL_PORT:-3306}:3306 - environment: - - MYSQL_ROOT_PASSWORD=${DOCKER_DB_ROOT_PASSWORD:-password} - volumes: - - type: volume - source: ac-database-prod - target: /var/lib/mysql - healthcheck: - test: "/usr/bin/mysql --user=root --password=$$MYSQL_ROOT_PASSWORD --execute \"SHOW DATABASES;\"" - interval: 5s - timeout: 10s - retries: 40 - profiles: [prod] - - ac-worldserver-prod: - <<: *ac-service-conf # merge with ac-service-conf - stdin_open: true - tty: true - cap_add: - - SYS_NICE # CAP_SYS_NICE - command: ./acore.sh run-worldserver - image: acore/ac-wotlk-worldserver:${DOCKER_IMAGE_TAG:-master} # name of the generated image after built locally - restart: unless-stopped - env_file: - ${DOCKER_AC_ENV_FILE:-conf/dist/env.ac} - environment: - AC_DATA_DIR: "/azerothcore/env/dist/data" - AC_LOGS_DIR: "/azerothcore/env/dist/logs" - AC_LOGIN_DATABASE_INFO: "ac-database;3306;root;${DOCKER_DB_ROOT_PASSWORD:-password};acore_auth" - AC_WORLD_DATABASE_INFO: "ac-database;3306;root;${DOCKER_DB_ROOT_PASSWORD:-password};acore_world" - AC_CHARACTER_DATABASE_INFO: "ac-database;3306;root;${DOCKER_DB_ROOT_PASSWORD:-password};acore_characters" - AC_CLOSE_IDLE_CONNECTIONS: "0" - user: ${DOCKER_USER:-root} - privileged: true - build: - target: worldserver - <<: *build-params - ports: - - ${DOCKER_WORLD_EXTERNAL_PORT:-8085}:8085 - - ${DOCKER_SOAP_EXTERNAL_PORT:-7878}:7878 - volumes: - - ${DOCKER_VOL_LOGS:-./env/dist/logs}:/azerothcore/env/dist/logs:delegated - - ${DOCKER_VOL_CLIENT_DATA_PROD:-ac-client-data-prod}:/azerothcore/env/dist/data:ro - profiles: [prod, prod-app, prod-worldserver] - depends_on: - ac-database-prod: - condition: service_healthy - ac-db-import-prod: - condition: service_completed_successfully - ac-client-data-init: - condition: service_started - - ac-authserver-prod: - <<: *ac-service-conf # merge with ac-service-conf - tty: true - command: ./acore.sh run-authserver - image: acore/ac-wotlk-authserver:${DOCKER_IMAGE_TAG:-master} # name of the generated image after built locally - restart: unless-stopped - env_file: - ${DOCKER_AC_ENV_FILE:-conf/dist/env.ac} - environment: - AC_LOGS_DIR: "/azerothcore/env/dist/logs" - AC_TEMP_DIR: "/azerothcore/env/dist/temp" - AC_LOGIN_DATABASE_INFO: "ac-database;3306;root;${DOCKER_DB_ROOT_PASSWORD:-password};acore_auth" - AC_SQLDRIVER_LOG_FILE: "SQLDriver.log" - AC_SQLDRIVER_QUERY_LOGGING: "1" - user: ${DOCKER_USER:-root} - build: - target: authserver - <<: *build-params - volumes: - - ${DOCKER_VOL_LOGS:-./env/dist/logs}:/azerothcore/env/dist/logs:delegated - ports: - - ${DOCKER_AUTH_EXTERNAL_PORT:-3724}:3724 - profiles: [prod, prod-app, prod-authserver] - depends_on: - ac-database-prod: - condition: service_healthy - ac-db-import-prod: - condition: service_completed_successfully - - ac-client-data-init: - image: acore/ac-wotlk-client-data:${DOCKER_IMAGE_TAG:-master} # name of the generated image after built locally - user: ${DOCKER_USER:-root} - build: - target: client-data - <<: *build-params - args: - USER_ID: ${DOCKER_USER_ID:-1000} - GROUP_ID: ${DOCKER_GROUP_ID:-1000} - DOCKER_USER: ${DOCKER_USER:-acore} - # BUILDKIT_INLINE_CACHE: 1 - volumes: - - ${DOCKER_VOL_CLIENT_DATA_PROD:-ac-client-data-prod}:/azerothcore/env/dist/data:ro - profiles: [prod, prod-app, clientdata] - - ac-tools: - image: acore/ac-wotlk-tools:${DOCKER_IMAGE_TAG:-master} # name of the generated image after built locally - user: ${DOCKER_USER:-root} - build: - target: tools - <<: *build-params - working_dir: /azerothcore/env/client/ - volumes: - # this is not the directory of the extracted data! It's the client folder used by the extractors - - ${DOCKER_AC_CLIENT_FOLDER:-./var/client}:/azerothcore/env/dist/bin/Data - profiles: [prod, tools] - - ac-db-import-prod: - <<: *ac-shared-conf - image: acore/ac-wotlk-worldserver:${DOCKER_IMAGE_TAG:-master} # name of the generated image after built locally - command: ./env/dist/bin/dbimport - environment: - AC_DATA_DIR: "/azerothcore/env/dist/data" - AC_LOGS_DIR: "/azerothcore/env/dist/logs" - AC_LOGIN_DATABASE_INFO: "ac-database;3306;root;${DOCKER_DB_ROOT_PASSWORD:-password};acore_auth" - AC_WORLD_DATABASE_INFO: "ac-database;3306;root;${DOCKER_DB_ROOT_PASSWORD:-password};acore_world" - AC_CHARACTER_DATABASE_INFO: "ac-database;3306;root;${DOCKER_DB_ROOT_PASSWORD:-password};acore_characters" - AC_CLOSE_IDLE_CONNECTIONS: "0" - profiles: [prod, prod-app, db-import-prod] - - # - # Only for internal tests - # - ac-build-prod: - <<: *ac-shared-conf - build: - target: build - <<: *build-params - env_file: - ${DOCKER_AC_ENV_FILE:-conf/dist/env.ac} - working_dir: /azerothcore/ - profiles: [prod-build] - volumes: ac-database: - ac-database-prod: - ac-bin-dev: + ac-client-data: + # Used for dev server ac-build-dev: ac-ccache-dev: - ac-proj: - ac-client-data-prod: - # not used, but you can use them by setting - # the DOCKER_VOL_* env variabiles - ac-root: - ac-conf: - ac-etc: - ac-logs: - ac-client-data-cameras: - ac-client-data-dbc: - ac-client-data-maps: - ac-client-data-vmaps: - ac-client-data-mmaps: networks: ac-network: diff --git a/pull_request_template.md b/pull_request_template.md index 7f6c343dc..269f0d8db 100644 --- a/pull_request_template.md +++ b/pull_request_template.md @@ -1,13 +1,12 @@ ## Changes Proposed: + This PR proposes changes to: - [ ] Core (units, players, creatures, game systems). - [ ] Scripts (bosses, spell scripts, creature scripts). - [ ] Database (SAI, creatures, etc). -If your pull request promotes complex changes that require a detailed explanation, please describe them in detail specifying what your solution is and what is it meant to address. - ## Issues Addressed: - Closes diff --git a/src/cmake/compiler/clang/settings.cmake b/src/cmake/compiler/clang/settings.cmake index 93e85762e..92b95cb47 100644 --- a/src/cmake/compiler/clang/settings.cmake +++ b/src/cmake/compiler/clang/settings.cmake @@ -131,7 +131,7 @@ if(BUILD_SHARED_LIBS) -fvisibility=hidden) # --no-undefined to throw errors when there are undefined symbols - # (caused through missing WARHEAD_*_API macros). + # (caused through missing ACORE_*_API macros). set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} --no-undefined") message(STATUS "Clang: Disallow undefined symbols") diff --git a/src/cmake/compiler/gcc/settings.cmake b/src/cmake/compiler/gcc/settings.cmake index a5fe2c33e..8723a6043 100644 --- a/src/cmake/compiler/gcc/settings.cmake +++ b/src/cmake/compiler/gcc/settings.cmake @@ -67,7 +67,7 @@ if(BUILD_SHARED_LIBS) INTERFACE -fvisibility=hidden) - # Should break the build when there are WARHEAD_*_API macros missing + # Should break the build when there are ACORE_*_API macros missing # but it complains about missing references in precompiled headers. # set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wl,--no-undefined") # set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,--no-undefined") diff --git a/src/cmake/macros/ConfigInstall.cmake b/src/cmake/macros/ConfigInstall.cmake index 836ec610c..090e3dba2 100644 --- a/src/cmake/macros/ConfigInstall.cmake +++ b/src/cmake/macros/ConfigInstall.cmake @@ -73,7 +73,7 @@ endfunction() # # Use it like: -# CopyModuleConfig("warhead.conf.dist") +# CopyModuleConfig("acore.conf.dist") # function(CopyModuleConfig configDir) diff --git a/src/common/Cryptography/TOTP.h b/src/common/Cryptography/TOTP.h index 01b2a53bd..ddcaf7573 100644 --- a/src/common/Cryptography/TOTP.h +++ b/src/common/Cryptography/TOTP.h @@ -15,8 +15,8 @@ * with this program. If not, see . */ -#ifndef WARHEAD_TOTP_H -#define WARHEAD_TOTP_H +#ifndef ACORE_TOTP_H +#define ACORE_TOTP_H #include "Define.h" #include diff --git a/src/common/Encoding/Base32.cpp b/src/common/Encoding/Base32.cpp index 1a663a46e..8906e0eaf 100644 --- a/src/common/Encoding/Base32.cpp +++ b/src/common/Encoding/Base32.cpp @@ -1,6 +1,18 @@ /* - * Copyright (C) 2016+ AzerothCore , released under GNU AGPL v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-AGPL3 - * Copyright (C) 2021+ WarheadCore + * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation; either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . */ #include "Base32.h" diff --git a/src/common/Encoding/Base32.h b/src/common/Encoding/Base32.h index 68c8be463..1f15212c1 100644 --- a/src/common/Encoding/Base32.h +++ b/src/common/Encoding/Base32.h @@ -1,10 +1,22 @@ /* - * Copyright (C) 2016+ AzerothCore , released under GNU AGPL v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-AGPL3 - * Copyright (C) 2021+ WarheadCore + * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation; either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . */ -#ifndef WARHEAD_BASE32_H -#define WARHEAD_BASE32_H +#ifndef ACORE_BASE32_H +#define ACORE_BASE32_H #include "Define.h" #include "Optional.h" diff --git a/src/common/Encoding/Base64.cpp b/src/common/Encoding/Base64.cpp index 1e5c1968e..ee37be530 100644 --- a/src/common/Encoding/Base64.cpp +++ b/src/common/Encoding/Base64.cpp @@ -1,6 +1,18 @@ /* - * Copyright (C) 2016+ AzerothCore , released under GNU AGPL v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-AGPL3 - * Copyright (C) 2021+ WarheadCore + * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation; either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . */ #include "Base64.h" diff --git a/src/common/Encoding/Base64.h b/src/common/Encoding/Base64.h index 8fe7cf0d5..b1cb7b18f 100644 --- a/src/common/Encoding/Base64.h +++ b/src/common/Encoding/Base64.h @@ -1,10 +1,22 @@ /* - * Copyright (C) 2016+ AzerothCore , released under GNU AGPL v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-AGPL3 - * Copyright (C) 2021+ WarheadCore + * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation; either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . */ -#ifndef WARHEAD_BASE64_H -#define WARHEAD_BASE64_H +#ifndef ACORE_BASE64_H +#define ACORE_BASE64_H #include "Define.h" #include "Optional.h" diff --git a/src/common/Encoding/BaseEncoding.h b/src/common/Encoding/BaseEncoding.h index 8ae0673d3..ed1ea96ec 100644 --- a/src/common/Encoding/BaseEncoding.h +++ b/src/common/Encoding/BaseEncoding.h @@ -1,10 +1,22 @@ /* - * Copyright (C) 2016+ AzerothCore , released under GNU AGPL v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-AGPL3 - * Copyright (C) 2021+ WarheadCore + * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation; either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . */ -#ifndef WARHEAD_BASE_ENCODING_HPP -#define WARHEAD_BASE_ENCODING_HPP +#ifndef ACORE_BASE_ENCODING_HPP +#define ACORE_BASE_ENCODING_HPP #include "Define.h" #include "Optional.h" diff --git a/src/server/apps/worldserver/Main.cpp b/src/server/apps/worldserver/Main.cpp index e2a7f9a97..9ece65689 100644 --- a/src/server/apps/worldserver/Main.cpp +++ b/src/server/apps/worldserver/Main.cpp @@ -432,7 +432,7 @@ int main(int argc, char** argv) // 0 - normal shutdown // 1 - shutdown at error - // 2 - restart command used, this code can be used by restarter for restart Warheadd + // 2 - restart command used, this code can be used by restarter for restart AzerothCore return World::GetExitCode(); } diff --git a/src/server/apps/worldserver/worldserver.conf.dist b/src/server/apps/worldserver/worldserver.conf.dist index fd9ae704c..b92d0b1a3 100644 --- a/src/server/apps/worldserver/worldserver.conf.dist +++ b/src/server/apps/worldserver/worldserver.conf.dist @@ -939,6 +939,13 @@ ClientCacheVersion = 0 SessionAddDelay = 10000 +# +# GridCleanUpDelay +# Description: Time (in milliseconds) grid clean up delay. +# Default: 300000 - (5 minutes) + +GridCleanUpDelay = 300000 + # # CloseIdleConnections # Description: Automatically close idle connections. @@ -1244,17 +1251,17 @@ Visibility.GroupMode = 1 # Visibility.Distance.Instances # Visibility.Distance.BGArenas # Description: Visibility distance to see other players or gameobjects. -# Visibility on continents on retail ~90 yards. In BG/Arenas ~180. -# For instances default ~120. -# Max limited by active player zone: ~ 333 +# Visibility on continents on retail ~100 yards. In BG/Arenas ~533. +# For instances default ~170. +# Max limited by grid size: 533.33333 # Min limit is max aggro radius (45) * Rate.Creature.Aggro -# Default: 90 - (Visibility.Distance.Continents) -# 120 - (Visibility.Distance.Instances) -# 180 - (Visibility.Distance.BGArenas) +# Default: 100 - (Visibility.Distance.Continents) +# 170 - (Visibility.Distance.Instances) +# 533 - (Visibility.Distance.BGArenas) -Visibility.Distance.Continents = 90 -Visibility.Distance.Instances = 120 -Visibility.Distance.BGArenas = 180 +Visibility.Distance.Continents = 100 +Visibility.Distance.Instances = 170 +Visibility.Distance.BGArenas = 533 # # Visibility.Notify.Period.OnContinents @@ -1365,17 +1372,6 @@ DetectPosCollision = 1 CheckGameObjectLoS = 1 -# -# TargetPosRecalculateRange -# Description: Max distance from movement target point (+moving unit size) and targeted -# object (+size) after that new target movement point calculated. -# Range: 0.5-5.0 -# Default: 1.5 -# 0.5 - (Minimum, Contact Range, More sensitive reaction to target movement) -# 5.0 - (Maximum, Melee attack range, Less CPU usage) - -TargetPosRecalculateRange = 1.5 - # # PreloadAllNonInstancedMapGrids # Description: Preload all grids on all non-instanced maps. This will take a great amount diff --git a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp index fc8212b0c..7369277d5 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp +++ b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp @@ -200,7 +200,6 @@ void npc_escortAI::ReturnToLastPoint() void npc_escortAI::EnterEvadeMode(EvadeReason /*why*/) { - me->RemoveAllAuras(); me->GetThreatMgr().ClearAllThreat(); me->CombatStop(true); me->SetLootRecipient(nullptr); diff --git a/src/server/game/Battlefield/Zones/BattlefieldWG.h b/src/server/game/Battlefield/Zones/BattlefieldWG.h index 89f8848ab..1c4cb586d 100644 --- a/src/server/game/Battlefield/Zones/BattlefieldWG.h +++ b/src/server/game/Battlefield/Zones/BattlefieldWG.h @@ -1041,7 +1041,7 @@ const WintergraspTowerCannonData TowerCannon[WG_MAX_TOWER_CANNON] = 2, { { 4448.138184f, 1974.998779f, 441.995911f, 1.967238f }, - { 4448.713379f, 1955.148682f, 441.995178f, 0.380733f }, + { 4486.3257f, 1954.6545f, 442.0783f, 0.349065840244293212f }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, diff --git a/src/server/game/Battlegrounds/Arena.cpp b/src/server/game/Battlegrounds/Arena.cpp index bfc27f00d..1c4a873d5 100644 --- a/src/server/game/Battlegrounds/Arena.cpp +++ b/src/server/game/Battlegrounds/Arena.cpp @@ -242,6 +242,7 @@ void Arena::EndBattleground(TeamId winnerTeamId) uint8 memberId = 0; for (auto const& [playerGuid, arenaLogEntryData] : ArenaLogEntries) { + auto const& score = PlayerScores.find(playerGuid.GetCounter()); stmt2 = CharacterDatabase.GetPreparedStatement(CHAR_INS_ARENA_LOG_MEMBERSTATS); stmt2->SetData(0, fightId); stmt2->SetData(1, ++memberId); @@ -250,9 +251,18 @@ void Arena::EndBattleground(TeamId winnerTeamId) stmt2->SetData(4, arenaLogEntryData.ArenaTeamId); stmt2->SetData(5, arenaLogEntryData.Acc); stmt2->SetData(6, arenaLogEntryData.IP); - stmt2->SetData(7, arenaLogEntryData.DamageDone); - stmt2->SetData(8, arenaLogEntryData.HealingDone); - stmt2->SetData(9, arenaLogEntryData.KillingBlows); + if (score != PlayerScores.end()) + { + stmt2->SetData(7, score->second->GetDamageDone()); + stmt2->SetData(8, score->second->GetHealingDone()); + stmt2->SetData(9, score->second->GetKillingBlows()); + } + else + { + stmt2->SetData(7, 0); + stmt2->SetData(8, 0); + stmt2->SetData(9, 0); + } trans->Append(stmt2); } diff --git a/src/server/game/Battlegrounds/Arena.h b/src/server/game/Battlegrounds/Arena.h index 0be78b705..fd7460080 100644 --- a/src/server/game/Battlegrounds/Arena.h +++ b/src/server/game/Battlegrounds/Arena.h @@ -63,4 +63,4 @@ private: void EndBattleground(TeamId winnerTeamId) override; }; -#endif // WARHEAD_ARENA_H +#endif // ACORE_ARENA_H diff --git a/src/server/game/Battlegrounds/ArenaScore.h b/src/server/game/Battlegrounds/ArenaScore.h index b51dacf95..d29c1487c 100644 --- a/src/server/game/Battlegrounds/ArenaScore.h +++ b/src/server/game/Battlegrounds/ArenaScore.h @@ -72,4 +72,4 @@ protected: std::string TeamName{}; }; -#endif // WARHEAD_ARENA_SCORE_H +#endif // ACORE_ARENA_SCORE_H diff --git a/src/server/game/Battlegrounds/Battleground.h b/src/server/game/Battlegrounds/Battleground.h index 0a8cc6dc6..0bf7882ff 100644 --- a/src/server/game/Battlegrounds/Battleground.h +++ b/src/server/game/Battlegrounds/Battleground.h @@ -268,9 +268,6 @@ public: uint32 Acc{0}; uint32 ArenaTeamId{0}; std::string IP{}; - uint32 DamageDone{0}; - uint32 HealingDone{0}; - uint32 KillingBlows{0}; }; enum BGHonorMode diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp index 4cc94a60d..0360ea47b 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp @@ -551,6 +551,6 @@ void BattlegroundAB::ApplyPhaseMask() for (auto const& itr : bgPlayerMap) { itr.second->SetPhaseMask(phaseMask, false); - itr.second->UpdateObjectVisibility(true, false); + itr.second->UpdateObjectVisibility(true); } } diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp index d43a96f5b..62751edba 100644 --- a/src/server/game/Conditions/ConditionMgr.cpp +++ b/src/server/game/Conditions/ConditionMgr.cpp @@ -289,8 +289,22 @@ bool Condition::Meets(ConditionSourceInfo& sourceInfo) } case CONDITION_NEAR_GAMEOBJECT: { - condMeets = static_cast(GetClosestGameObjectWithEntry(object, ConditionValue1, static_cast(ConditionValue2))); - break; + if (!ConditionValue3) + { + condMeets = static_cast(GetClosestGameObjectWithEntry(object, ConditionValue1, static_cast(ConditionValue2))); + break; + } + else + { + if (GameObject* go = GetClosestGameObjectWithEntry(object, ConditionValue1, static_cast(ConditionValue2))) + { + if ((go->GetGoState() == GO_STATE_READY && ConditionValue3 == 1) || (go->GetGoState() != GO_STATE_READY && ConditionValue3 == 2)) + condMeets = true; + else + condMeets = false; + } + break; + } } case CONDITION_OBJECT_ENTRY_GUID: { @@ -2124,8 +2138,8 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) LOG_ERROR("sql.sql", "NearGameObject condition has non existing gameobject template entry ({}), skipped", cond->ConditionValue1); return false; } - if (cond->ConditionValue3) - LOG_ERROR("sql.sql", "NearGameObject condition has useless data in value3 ({})!", cond->ConditionValue3); + if (cond->ConditionValue3 > 2) + LOG_ERROR("sql.sql", "NearGameObject condition for gameobject ID ({}) has data over 2 for value3 ({})!", cond->ConditionValue1, cond->ConditionValue3); break; } case CONDITION_OBJECT_ENTRY_GUID: diff --git a/src/server/game/Conditions/ConditionMgr.h b/src/server/game/Conditions/ConditionMgr.h index 185a5e1bd..9f963a96f 100644 --- a/src/server/game/Conditions/ConditionMgr.h +++ b/src/server/game/Conditions/ConditionMgr.h @@ -62,7 +62,7 @@ enum ConditionTypes CONDITION_LEVEL = 27, // level ComparisonType 0 true if unit's level is equal to param1 (param2 can modify the statement) CONDITION_QUEST_COMPLETE = 28, // quest_id 0 0 true if player has quest_id with all objectives complete, but not yet rewarded CONDITION_NEAR_CREATURE = 29, // creature entry distance dead true if there is a creature of entry in range - CONDITION_NEAR_GAMEOBJECT = 30, // gameobject entry distance 0 true if there is a gameobject of entry in range + CONDITION_NEAR_GAMEOBJECT = 30, // gameobject entry distance GoState true if there is a gameobject of entry in range (param3 can check for GoState, 0 = dont't check, 1 = Ready , 2 = Not Ready) CONDITION_OBJECT_ENTRY_GUID = 31, // TypeID entry guid/Attackable true if object is type TypeID and the entry is 0 or matches entry of the object or matches guid of the object CONDITION_TYPE_MASK = 32, // TypeMask 0 0 true if object is type object's TypeMask matches provided TypeMask CONDITION_RELATION_TO = 33, // ConditionTarget RelationType 0 true if object is in given relation with object specified by ConditionTarget diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index 90972cf57..95cec9cfc 100644 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -365,17 +365,15 @@ void Creature::RemoveCorpse(bool setSpawnTime, bool skipVisibility) //SaveRespawnTime(); } - float x, y, z, o; - GetRespawnPosition(x, y, z, &o); - SetHomePosition(x, y, z, o); - SetPosition(x, y, z, o); - - // xinef: relocate notifier - m_last_notify_position.Relocate(-5000.0f, -5000.0f, -5000.0f, 0.0f); - // pussywizard: if corpse was removed during falling then the falling will continue after respawn, so stop falling is such case if (IsFalling()) StopMoving(); + + float x, y, z, o; + GetRespawnPosition(x, y, z, &o); + UpdateAllowedPositionZ(x, y, z); + SetHomePosition(x, y, z, o); + GetMap()->CreatureRelocation(this, x, y, z, o); } /** @@ -537,7 +535,7 @@ bool Creature::UpdateEntry(uint32 Entry, const CreatureData* data, bool changele SetMeleeDamageSchool(SpellSchools(cInfo->dmgschool)); CreatureBaseStats const* stats = sObjectMgr->GetCreatureBaseStats(GetLevel(), cInfo->unit_class); - float armor = (float)stats->GenerateArmor(cInfo); /// @todo: Why is this treated as uint32 when it's a float? + float armor = stats->GenerateArmor(cInfo); SetModifierValue(UNIT_MOD_ARMOR, BASE_VALUE, armor); SetModifierValue(UNIT_MOD_RESISTANCE_HOLY, BASE_VALUE, float(cInfo->resistance[SPELL_SCHOOL_HOLY])); SetModifierValue(UNIT_MOD_RESISTANCE_FIRE, BASE_VALUE, float(cInfo->resistance[SPELL_SCHOOL_FIRE])); @@ -580,13 +578,13 @@ bool Creature::UpdateEntry(uint32 Entry, const CreatureData* data, bool changele ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_ATTACK_ME, true); } - if (GetMovementTemplate().IsRooted()) - { - SetControlled(true, UNIT_STATE_ROOT); - } - SetDetectionDistance(cInfo->detection_range); + // Update movement + if (IsRooted()) + SetControlled(true, UNIT_STATE_ROOT); + UpdateMovementFlags(); + LoadSpellTemplateImmunity(); if (updateAI) @@ -1489,6 +1487,9 @@ void Creature::SelectLevel(bool changelevel) uint8 minlevel = std::min(cInfo->maxlevel, cInfo->minlevel); uint8 maxlevel = std::max(cInfo->maxlevel, cInfo->minlevel); uint8 level = minlevel == maxlevel ? minlevel : urand(minlevel, maxlevel); + + sScriptMgr->OnBeforeCreatureSelectLevel(cInfo, this, level); + if (changelevel) SetLevel(level); @@ -2078,9 +2079,7 @@ void Creature::Respawn(bool force) m_respawnedTime = GameTime::GetGameTime().count(); } m_respawnedTime = GameTime::GetGameTime().count(); - // xinef: relocate notifier, fixes npc appearing in corpse position after forced respawn (instead of spawn) - m_last_notify_position.Relocate(-5000.0f, -5000.0f, -5000.0f, 0.0f); - UpdateObjectVisibility(false); + UpdateObjectVisibility(); } void Creature::ForcedDespawn(uint32 timeMSToDespawn, Seconds forceRespawnTimer) @@ -2753,6 +2752,14 @@ bool Creature::IsSpellProhibited(SpellSchoolMask idSchoolMask) const return false; } +void Creature::ClearProhibitedSpellTimers() +{ + for (uint8 i = SPELL_SCHOOL_NORMAL; i < MAX_SPELL_SCHOOL; ++i) + { + m_ProhibitSchoolTime[i] = 0; + } +} + void Creature::_AddCreatureSpellCooldown(uint32 spell_id, uint16 categoryId, uint32 end_time) { CreatureSpellCooldown spellCooldown; @@ -3110,7 +3117,7 @@ bool Creature::SetDisableGravity(bool disable, bool packetOnly /*= false*/, bool return true; } - if (updateAnimationTier && IsAlive() && !HasUnitState(UNIT_STATE_ROOT) && !GetMovementTemplate().IsRooted()) + if (updateAnimationTier && IsAlive() && !HasUnitState(UNIT_STATE_ROOT) && !IsRooted()) { if (IsLevitating()) SetByteValue(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, UNIT_BYTE1_FLAG_FLY); @@ -3259,7 +3266,7 @@ bool Creature::SetHover(bool enable, bool packetOnly /*= false*/, bool updateAni if (!packetOnly && !Unit::SetHover(enable)) return false; - if (updateAnimationTier && IsAlive() && !HasUnitState(UNIT_STATE_ROOT) && !GetMovementTemplate().IsRooted()) + if (updateAnimationTier && IsAlive() && !HasUnitState(UNIT_STATE_ROOT) && !IsRooted()) { if (IsLevitating()) SetByteValue(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, UNIT_BYTE1_FLAG_FLY); diff --git a/src/server/game/Entities/Creature/Creature.h b/src/server/game/Entities/Creature/Creature.h index d0a6b8b72..ede229ff7 100644 --- a/src/server/game/Entities/Creature/Creature.h +++ b/src/server/game/Entities/Creature/Creature.h @@ -82,6 +82,7 @@ public: [[nodiscard]] bool CanEnterWater() const override; [[nodiscard]] bool CanFly() const override { return GetMovementTemplate().IsFlightAllowed() || IsFlying(); } [[nodiscard]] bool CanHover() const { return GetMovementTemplate().Ground == CreatureGroundMovementType::Hover || IsHovering(); } + [[nodiscard]] bool IsRooted() const { return GetMovementTemplate().IsRooted(); } MovementGeneratorType GetDefaultMovementType() const override { return m_defaultMovementType; } void SetDefaultMovementType(MovementGeneratorType mgt) { m_defaultMovementType = mgt; } @@ -165,6 +166,7 @@ public: [[nodiscard]] uint32 GetSpellCooldown(uint32 spell_id) const; void ProhibitSpellSchool(SpellSchoolMask idSchoolMask, uint32 unTimeMs) override; [[nodiscard]] bool IsSpellProhibited(SpellSchoolMask idSchoolMask) const; + void ClearProhibitedSpellTimers(); [[nodiscard]] bool HasSpell(uint32 spellID) const override; diff --git a/src/server/game/Entities/Creature/CreatureData.h b/src/server/game/Entities/Creature/CreatureData.h index 942c69fee..467e265d7 100644 --- a/src/server/game/Entities/Creature/CreatureData.h +++ b/src/server/game/Entities/Creature/CreatureData.h @@ -292,7 +292,7 @@ struct CreatureBaseStats { uint32 BaseHealth[MAX_EXPANSIONS]; uint32 BaseMana; - uint32 BaseArmor; + float BaseArmor; uint32 AttackPower; uint32 RangedAttackPower; float BaseDamage[MAX_EXPANSIONS]; @@ -313,9 +313,9 @@ struct CreatureBaseStats return uint32(std::ceil(BaseMana * info->ModMana)); } - uint32 GenerateArmor(CreatureTemplate const* info) const + float GenerateArmor(CreatureTemplate const* info) const { - return uint32(std::ceil(BaseArmor * info->ModArmor)); + return std::ceil(BaseArmor * info->ModArmor); } float GenerateBaseDamage(CreatureTemplate const* info) const diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp index 79a87ca50..9feac2876 100644 --- a/src/server/game/Entities/GameObject/GameObject.cpp +++ b/src/server/game/Entities/GameObject/GameObject.cpp @@ -2280,7 +2280,14 @@ void GameObject::ModifyHealth(int32 change, Unit* attackerOrHealer /*= nullptr*/ if (!IsDestructibleBuilding()) return; - if (!m_goValue.Building.MaxHealth || !change) + // if this building doesn't have health, return + if (!m_goValue.Building.MaxHealth) + return; + + sScriptMgr->OnGameObjectModifyHealth(this, attackerOrHealer, change, sSpellMgr->GetSpellInfo(spellId)); + + // if the health isn't being changed, return + if (!change) return; if (!m_allowModifyDestructibleBuilding) diff --git a/src/server/game/Entities/Object/Object.cpp b/src/server/game/Entities/Object/Object.cpp index fef69d6ef..c0584ef00 100644 --- a/src/server/game/Entities/Object/Object.cpp +++ b/src/server/game/Entities/Object/Object.cpp @@ -65,7 +65,7 @@ constexpr float VisibilityDistances[AsUnderlyingType(VisibilityDistanceType::Max VISIBILITY_DISTANCE_SMALL, VISIBILITY_DISTANCE_LARGE, VISIBILITY_DISTANCE_GIGANTIC, - VISIBILITY_DISTANCE_INFINITE + MAX_VISIBILITY_DISTANCE }; Object::Object() : m_PackGUID(sizeof(uint64) + 1) @@ -2922,7 +2922,7 @@ void WorldObject::DestroyForNearbyPlayers() } } -void WorldObject::UpdateObjectVisibility(bool /*forced*/, bool /*fromUpdate*/) +void WorldObject::UpdateObjectVisibility(bool /*forced*/) { //updates object's visibility for nearby players Acore::VisibleChangesNotifier notifier(*this); @@ -2931,28 +2931,7 @@ void WorldObject::UpdateObjectVisibility(bool /*forced*/, bool /*fromUpdate*/) void WorldObject::AddToNotify(uint16 f) { - if (!(m_notifyflags & f)) - if (Unit* u = ToUnit()) - { - if (f & NOTIFY_VISIBILITY_CHANGED) - { - uint32 EVENT_VISIBILITY_DELAY = u->FindMap() ? DynamicVisibilityMgr::GetVisibilityNotifyDelay(u->FindMap()->GetEntry()->map_type) : 1000; - - uint32 diff = getMSTimeDiff(u->m_last_notify_mstime, GameTime::GetGameTimeMS().count()); - if (diff >= EVENT_VISIBILITY_DELAY / 2) - EVENT_VISIBILITY_DELAY /= 2; - else - EVENT_VISIBILITY_DELAY -= diff; - u->m_delayed_unit_relocation_timer = EVENT_VISIBILITY_DELAY; - u->m_last_notify_mstime = GameTime::GetGameTimeMS().count() + EVENT_VISIBILITY_DELAY - 1; - } - else if (f & NOTIFY_AI_RELOCATION) - { - u->m_delayed_unit_ai_notify_timer = u->FindMap() ? DynamicVisibilityMgr::GetAINotifyDelay(u->FindMap()->GetEntry()->map_type) : 500; - } - - m_notifyflags |= f; - } + m_notifyflags |= f; } struct WorldObjectChangeAccumulator diff --git a/src/server/game/Entities/Object/Object.h b/src/server/game/Entities/Object/Object.h index 8a75f3d87..adaf92899 100644 --- a/src/server/game/Entities/Object/Object.h +++ b/src/server/game/Entities/Object/Object.h @@ -379,14 +379,23 @@ class MovableMapObject template friend class RandomMovementGenerator; protected: - MovableMapObject() = default; + MovableMapObject() : _moveState(MAP_OBJECT_CELL_MOVE_NONE) + { + _newPosition.Relocate(0.0f, 0.0f, 0.0f, 0.0f); + } private: + Cell _currentCell; [[nodiscard]] Cell const& GetCurrentCell() const { return _currentCell; } void SetCurrentCell(Cell const& cell) { _currentCell = cell; } - Cell _currentCell; - MapObjectCellMoveState _moveState{MAP_OBJECT_CELL_MOVE_NONE}; + MapObjectCellMoveState _moveState; + Position _newPosition; + void SetNewCellPosition(float x, float y, float z, float o) + { + _moveState = MAP_OBJECT_CELL_MOVE_ACTIVE; + _newPosition.Relocate(x, y, z, o); + } }; class WorldObject : public Object, public WorldLocation @@ -538,7 +547,7 @@ public: void GetDeadCreatureListInGrid(std::list& lList, float maxSearchRange, bool alive = false) const; void DestroyForNearbyPlayers(); - virtual void UpdateObjectVisibility(bool forced = true, bool fromUpdate = false); + virtual void UpdateObjectVisibility(bool forced = true); void BuildUpdate(UpdateDataMapType& data_map, UpdatePlayerSet& player_set) override; void GetCreaturesWithEntryInRange(std::list& creatureList, float radius, uint32 entry); diff --git a/src/server/game/Entities/Object/ObjectDefines.h b/src/server/game/Entities/Object/ObjectDefines.h index 55c482633..5d809c05f 100644 --- a/src/server/game/Entities/Object/ObjectDefines.h +++ b/src/server/game/Entities/Object/ObjectDefines.h @@ -28,16 +28,15 @@ #define VISIBILITY_INC_FOR_GOBJECTS 30.0f // pussywizard #define SPELL_SEARCHER_COMPENSATION 30.0f // increase searchers size in case we have large npc near cell border #define TRADE_DISTANCE 11.11f -#define MAX_VISIBILITY_DISTANCE 250.0f // max distance for visible objects, experimental +#define MAX_VISIBILITY_DISTANCE SIZE_OF_GRIDS // max distance for visible objects, experimental #define SIGHT_RANGE_UNIT 50.0f #define MAX_SEARCHER_DISTANCE 150.0f // pussywizard: replace the use of MAX_VISIBILITY_DISTANCE in searchers, because MAX_VISIBILITY_DISTANCE is quite too big for this purpose -#define VISIBILITY_DISTANCE_INFINITE 533.0f #define VISIBILITY_DISTANCE_GIGANTIC 400.0f #define VISIBILITY_DISTANCE_LARGE 200.0f #define VISIBILITY_DISTANCE_NORMAL 100.0f #define VISIBILITY_DISTANCE_SMALL 50.0f #define VISIBILITY_DISTANCE_TINY 25.0f -#define DEFAULT_VISIBILITY_DISTANCE 100.0f // default visible distance, 100 yards on continents +#define DEFAULT_VISIBILITY_DISTANCE VISIBILITY_DISTANCE_NORMAL // default visible distance, 100 yards on continents #define DEFAULT_VISIBILITY_INSTANCE 170.0f // default visible distance in instances, 170 yards #define VISIBILITY_DIST_WINTERGRASP 175.0f #define DEFAULT_VISIBILITY_BGARENAS 533.0f // default visible distance in BG/Arenas, roughly 533 yards diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 69998d163..be7eabada 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -1294,6 +1294,8 @@ uint8 Player::GetChatTag() const tag |= CHAT_TAG_DND; if (isAFK()) tag |= CHAT_TAG_AFK; + if (IsCommentator()) + tag |= CHAT_TAG_COM; if (IsDeveloper()) tag |= CHAT_TAG_DEV; @@ -4653,7 +4655,7 @@ void Player::DurabilityLossAll(double percent, bool inventory) void Player::DurabilityLoss(Item* item, double percent) { - if(!item) + if(!item || percent == 0.0) return; uint32 pMaxDurability = item ->GetUInt32Value(ITEM_FIELD_MAXDURABILITY); diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h index b0b93baaf..1d8b7d8a0 100644 --- a/src/server/game/Entities/Player/Player.h +++ b/src/server/game/Entities/Player/Player.h @@ -839,7 +839,7 @@ enum PlayerChatTag CHAT_TAG_AFK = 0x01, CHAT_TAG_DND = 0x02, CHAT_TAG_GM = 0x04, - CHAT_TAG_COM = 0x08, // Commentator + CHAT_TAG_COM = 0x08, // Commentator tag. Do not exist in clean client CHAT_TAG_DEV = 0x10, }; @@ -1139,6 +1139,8 @@ public: void SendTaxiNodeStatusMultiple(); // mount_id can be used in scripting calls + [[nodiscard]] bool IsCommentator() const { return HasPlayerFlag(PLAYER_FLAGS_COMMENTATOR2); } + void SetCommentator(bool on) { ApplyModFlag(PLAYER_FLAGS, PLAYER_FLAGS_COMMENTATOR2, on); } [[nodiscard]] bool IsDeveloper() const { return HasPlayerFlag(PLAYER_FLAGS_DEVELOPER); } void SetDeveloper(bool on) { ApplyModFlag(PLAYER_FLAGS, PLAYER_FLAGS_DEVELOPER, on); } [[nodiscard]] bool isAcceptWhispers() const { return m_ExtraFlags & PLAYER_EXTRA_ACCEPT_WHISPERS; } @@ -1553,6 +1555,7 @@ public: void SaveToDB(CharacterDatabaseTransaction trans, bool create, bool logout); void SaveInventoryAndGoldToDB(CharacterDatabaseTransaction trans); // fast save function for item/money cheating preventing void SaveGoldToDB(CharacterDatabaseTransaction trans); + void _SaveSkills(CharacterDatabaseTransaction trans); static void Customize(CharacterCustomizeInfo const* customizeInfo, CharacterDatabaseTransaction trans); static void SavePositionInDB(uint32 mapid, float x, float y, float z, float o, uint32 zone, ObjectGuid guid); @@ -2349,7 +2352,7 @@ public: bool IsVisibleGloballyFor(Player const* player) const; void GetInitialVisiblePackets(Unit* target); - void UpdateObjectVisibility(bool forced = true, bool fromUpdate = false) override; + void UpdateObjectVisibility(bool forced = true) override; void UpdateVisibilityForPlayer(bool mapChange = false); void UpdateVisibilityOf(WorldObject* target); void UpdateTriggerVisibility(); @@ -2696,7 +2699,6 @@ public: void _SaveWeeklyQuestStatus(CharacterDatabaseTransaction trans); void _SaveMonthlyQuestStatus(CharacterDatabaseTransaction trans); void _SaveSeasonalQuestStatus(CharacterDatabaseTransaction trans); - void _SaveSkills(CharacterDatabaseTransaction trans); void _SaveSpells(CharacterDatabaseTransaction trans); void _SaveEquipmentSets(CharacterDatabaseTransaction trans); void _SaveEntryPoint(CharacterDatabaseTransaction trans); diff --git a/src/server/game/Entities/Player/PlayerUpdates.cpp b/src/server/game/Entities/Player/PlayerUpdates.cpp index 0c0eef805..3c02e8fa4 100644 --- a/src/server/game/Entities/Player/PlayerUpdates.cpp +++ b/src/server/game/Entities/Player/PlayerUpdates.cpp @@ -413,14 +413,6 @@ void Player::Update(uint32 p_time) TeleportTo(teleportStore_dest, teleportStore_options); } - if (!IsBeingTeleported() && bRequestForcedVisibilityUpdate) - { - bRequestForcedVisibilityUpdate = false; - UpdateObjectVisibility(true, true); - m_delayed_unit_relocation_timer = 0; - RemoveFromNotify(NOTIFY_VISIBILITY_CHANGED); - } - sScriptMgr->OnAfterPlayerUpdate(this, p_time); } @@ -1552,23 +1544,13 @@ void Player::UpdateVisibilityForPlayer(bool mapChange) m_seer = this; } - Acore::VisibleNotifier notifierNoLarge( - *this, mapChange, - false); // visit only objects which are not large; default distance - Cell::VisitAllObjects(m_seer, notifierNoLarge, - GetSightRange() + VISIBILITY_INC_FOR_GOBJECTS); - notifierNoLarge.SendToSelf(); - - Acore::VisibleNotifier notifierLarge( - *this, mapChange, true); // visit only large objects; maximum distance - Cell::VisitAllObjects(m_seer, notifierLarge, GetSightRange()); - notifierLarge.SendToSelf(); - - if (mapChange) - m_last_notify_position.Relocate(-5000.0f, -5000.0f, -5000.0f, 0.0f); + // updates visibility of all objects around point of view for current player + Acore::VisibleNotifier notifier(*this, mapChange); + Cell::VisitAllObjects(m_seer, notifier, GetSightRange()); + notifier.SendToSelf(); // send gathered data } -void Player::UpdateObjectVisibility(bool forced, bool fromUpdate) +void Player::UpdateObjectVisibility(bool forced) { // Prevent updating visibility if player is not in world (example: LoadFromDB sets drunkstate which updates invisibility while player is not in map) if (!IsInWorld()) @@ -1578,11 +1560,6 @@ void Player::UpdateObjectVisibility(bool forced, bool fromUpdate) AddToNotify(NOTIFY_VISIBILITY_CHANGED); else if (!isBeingLoaded()) { - if (!fromUpdate) // pussywizard: - { - bRequestForcedVisibilityUpdate = true; - return; - } Unit::UpdateObjectVisibility(true); UpdateVisibilityForPlayer(); } diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 3f49ea0e4..6b1f368b0 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -317,12 +317,6 @@ Unit::Unit(bool isWorldObject) : WorldObject(isWorldObject), m_serverSideVisibility.SetValue(SERVERSIDE_VISIBILITY_GHOST, GHOST_VISIBILITY_ALIVE); - m_last_notify_position.Relocate(-5000.0f, -5000.0f, -5000.0f, 0.0f); - m_last_notify_mstime = 0; - m_delayed_unit_relocation_timer = 0; - m_delayed_unit_ai_notify_timer = 0; - bRequestForcedVisibilityUpdate = false; - m_applyResilience = false; _instantCast = false; @@ -411,32 +405,6 @@ void Unit::Update(uint32 p_time) if (!IsInWorld()) return; - // pussywizard: - if (GetTypeId() != TYPEID_PLAYER || (!ToPlayer()->IsBeingTeleported() && !bRequestForcedVisibilityUpdate)) - { - if (m_delayed_unit_relocation_timer) - { - if (m_delayed_unit_relocation_timer <= p_time) - { - m_delayed_unit_relocation_timer = 0; - //ExecuteDelayedUnitRelocationEvent(); - FindMap()->i_objectsForDelayedVisibility.insert(this); - } - else - m_delayed_unit_relocation_timer -= p_time; - } - if (m_delayed_unit_ai_notify_timer) - { - if (m_delayed_unit_ai_notify_timer <= p_time) - { - m_delayed_unit_ai_notify_timer = 0; - ExecuteDelayedUnitAINotifyEvent(); - } - else - m_delayed_unit_ai_notify_timer -= p_time; - } - } - _UpdateSpells( p_time ); if (CanHaveThreatList() && GetThreatMgr().isNeedUpdateToClient(p_time)) @@ -8191,13 +8159,6 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere CastCustomSpell(this, triggered_spell_id, &basepoints0, nullptr, nullptr, true, castItem, triggeredByAura, originalCaster); break; } - // Shaman T8 Elemental 4P Bonus - case 64928: - { - basepoints0 = CalculatePct(int32(damage), triggerAmount); - triggered_spell_id = 64930; // Electrified - break; - } // Shaman T9 Elemental 4P Bonus case 67228: { @@ -17541,13 +17502,17 @@ void Unit::SetContestedPvP(Player* attackedPlayer, bool lookForNearContestedGuar player->AddUnitState(UNIT_STATE_ATTACK_PLAYER); player->SetPlayerFlag(PLAYER_FLAGS_CONTESTED_PVP); // call MoveInLineOfSight for nearby contested guards - AddToNotify(NOTIFY_AI_RELOCATION); + Acore::AIRelocationNotifier notifier(*this); + Cell::VisitWorldObjects(this, notifier, GetVisibilityRange()); } - if (!HasUnitState(UNIT_STATE_ATTACK_PLAYER)) + for (Unit* unit : m_Controlled) { - AddUnitState(UNIT_STATE_ATTACK_PLAYER); - // call MoveInLineOfSight for nearby contested guards - AddToNotify(NOTIFY_AI_RELOCATION); + if (!unit->HasUnitState(UNIT_STATE_ATTACK_PLAYER)) + { + unit->AddUnitState(UNIT_STATE_ATTACK_PLAYER); + Acore::AIRelocationNotifier notifier(*unit); + Cell::VisitWorldObjects(this, notifier, GetVisibilityRange()); + } } } @@ -19408,7 +19373,7 @@ void Unit::SetPhaseMask(uint32 newPhaseMask, bool update) } } -void Unit::UpdateObjectVisibility(bool forced, bool /*fromUpdate*/) +void Unit::UpdateObjectVisibility(bool forced) { if (!forced) AddToNotify(NOTIFY_VISIBILITY_CHANGED); @@ -19416,8 +19381,7 @@ void Unit::UpdateObjectVisibility(bool forced, bool /*fromUpdate*/) { WorldObject::UpdateObjectVisibility(true); Acore::AIRelocationNotifier notifier(*this); - float radius = 60.0f; - Cell::VisitAllObjects(this, notifier, radius); + Cell::VisitAllObjects(this, notifier, GetVisibilityRange()); } } @@ -20774,124 +20738,6 @@ bool ConflagrateAuraStateDelayEvent::Execute(uint64 /*e_time*/, uint32 /*p_time return true; } -void Unit::ExecuteDelayedUnitRelocationEvent() -{ - this->RemoveFromNotify(NOTIFY_VISIBILITY_CHANGED); - if (!this->IsInWorld() || this->IsDuringRemoveFromWorld()) - return; - - if (this->HasSharedVision()) - for (SharedVisionList::const_iterator itr = this->GetSharedVisionList().begin(); itr != this->GetSharedVisionList().end(); ++itr) - if (Player* player = (*itr)) - { - if (player->IsOnVehicle(this) || !player->IsInWorld() || player->IsDuringRemoveFromWorld()) // players on vehicles have their own event executed (due to passenger relocation) - continue; - WorldObject* viewPoint = player; - if (player->m_seer && player->m_seer->IsInWorld()) - viewPoint = player->m_seer; - if (!viewPoint->IsPositionValid() || !player->IsPositionValid()) - continue; - - if (Unit* active = viewPoint->ToUnit()) - { - //if (active->IsVehicle()) // always check original unit here, last notify position is not relocated - // active = player; - - float dx = active->m_last_notify_position.GetPositionX() - active->GetPositionX(); - float dy = active->m_last_notify_position.GetPositionY() - active->GetPositionY(); - float dz = active->m_last_notify_position.GetPositionZ() - active->GetPositionZ(); - float distsq = dx * dx + dy * dy + dz * dz; - float mindistsq = DynamicVisibilityMgr::GetReqMoveDistSq(active->FindMap()->GetEntry()->map_type); - if (distsq < mindistsq) - continue; - - // this will be relocated below sharedvision! - //active->m_last_notify_position.Relocate(active->GetPositionX(), active->GetPositionY(), active->GetPositionZ()); - } - - Acore::PlayerRelocationNotifier relocateNoLarge(*player, false); // visit only objects which are not large; default distance - Cell::VisitAllObjects(viewPoint, relocateNoLarge, player->GetSightRange() + VISIBILITY_INC_FOR_GOBJECTS); - relocateNoLarge.SendToSelf(); - Acore::PlayerRelocationNotifier relocateLarge(*player, true); // visit only large objects; maximum distance - Cell::VisitAllObjects(viewPoint, relocateLarge, MAX_VISIBILITY_DISTANCE); - relocateLarge.SendToSelf(); - } - - if (Player* player = this->ToPlayer()) - { - WorldObject* viewPoint = player; - if (player->m_seer && player->m_seer->IsInWorld()) - viewPoint = player->m_seer; - - if (viewPoint->GetMapId() != player->GetMapId() || !viewPoint->IsPositionValid() || !player->IsPositionValid()) - return; - - if (Unit* active = viewPoint->ToUnit()) - { - if (active->IsVehicle()) - active = player; - - if (!player->GetFarSightDistance()) - { - float dx = active->m_last_notify_position.GetPositionX() - active->GetPositionX(); - float dy = active->m_last_notify_position.GetPositionY() - active->GetPositionY(); - float dz = active->m_last_notify_position.GetPositionZ() - active->GetPositionZ(); - float distsq = dx * dx + dy * dy + dz * dz; - - float mindistsq = DynamicVisibilityMgr::GetReqMoveDistSq(active->FindMap()->GetEntry()->map_type); - if (distsq < mindistsq) - return; - - active->m_last_notify_position.Relocate(active->GetPositionX(), active->GetPositionY(), active->GetPositionZ()); - } - } - - Acore::PlayerRelocationNotifier relocateNoLarge(*player, false); // visit only objects which are not large; default distance - Cell::VisitAllObjects(viewPoint, relocateNoLarge, player->GetSightRange() + VISIBILITY_INC_FOR_GOBJECTS); - relocateNoLarge.SendToSelf(); - - if (!player->GetFarSightDistance()) - { - Acore::PlayerRelocationNotifier relocateLarge(*player, true); // visit only large objects; maximum distance - Cell::VisitAllObjects(viewPoint, relocateLarge, MAX_VISIBILITY_DISTANCE); - relocateLarge.SendToSelf(); - } - - this->AddToNotify(NOTIFY_AI_RELOCATION); - } - else if (Creature* unit = this->ToCreature()) - { - if (!unit->IsPositionValid()) - return; - - float dx = unit->m_last_notify_position.GetPositionX() - unit->GetPositionX(); - float dy = unit->m_last_notify_position.GetPositionY() - unit->GetPositionY(); - float dz = unit->m_last_notify_position.GetPositionZ() - unit->GetPositionZ(); - float distsq = dx * dx + dy * dy + dz * dz; - float mindistsq = DynamicVisibilityMgr::GetReqMoveDistSq(unit->FindMap()->GetEntry()->map_type); - if (distsq < mindistsq) - return; - - unit->m_last_notify_position.Relocate(unit->GetPositionX(), unit->GetPositionY(), unit->GetPositionZ()); - - Acore::CreatureRelocationNotifier relocate(*unit); - Cell::VisitAllObjects(unit, relocate, unit->GetVisibilityRange() + VISIBILITY_COMPENSATION); - - this->AddToNotify(NOTIFY_AI_RELOCATION); - } -} - -void Unit::ExecuteDelayedUnitAINotifyEvent() -{ - this->RemoveFromNotify(NOTIFY_AI_RELOCATION); - if (!this->IsInWorld() || this->IsDuringRemoveFromWorld()) - return; - - Acore::AIRelocationNotifier notifier(*this); - float radius = 60.0f; - Cell::VisitAllObjects(this, notifier, radius); -} - void Unit::SetInFront(WorldObject const* target) { if (!HasUnitState(UNIT_STATE_CANNOT_TURN)) diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h index 2081b013f..d0e101dd3 100644 --- a/src/server/game/Entities/Unit/Unit.h +++ b/src/server/game/Entities/Unit/Unit.h @@ -2145,7 +2145,7 @@ public: // common function for visibility checks for player/creatures with detection code [[nodiscard]] uint32 GetPhaseByAuras() const; void SetPhaseMask(uint32 newPhaseMask, bool update) override;// overwrite WorldObject::SetPhaseMask - void UpdateObjectVisibility(bool forced = true, bool fromUpdate = false) override; + void UpdateObjectVisibility(bool forced = true) override; SpellImmuneList m_spellImmune[MAX_SPELL_IMMUNITY]; uint32 m_lastSanctuaryTime; @@ -2419,14 +2419,6 @@ public: void AddPointedBy(SafeUnitPointer* sup) { SafeUnitPointerSet.insert(sup); } void RemovePointedBy(SafeUnitPointer* sup) { SafeUnitPointerSet.erase(sup); } static void HandleSafeUnitPointersOnDelete(Unit* thisUnit); - // Relocation Nofier optimization - Position m_last_notify_position; - uint32 m_last_notify_mstime; - uint16 m_delayed_unit_relocation_timer; - uint16 m_delayed_unit_ai_notify_timer; - bool bRequestForcedVisibilityUpdate; - void ExecuteDelayedUnitRelocationEvent(); - void ExecuteDelayedUnitAINotifyEvent(); // cooldowns [[nodiscard]] virtual bool HasSpellCooldown(uint32 /*spell_id*/) const { return false; } diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index 80804e9b5..ca07350a2 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -7676,8 +7676,8 @@ void ObjectMgr::LoadReputationSpilloverTemplate() _repSpilloverTemplateStore.clear(); // for reload case - uint32 count = 0; // 0 1 2 3 4 5 6 7 8 9 10 11 12 - QueryResult result = WorldDatabase.Query("SELECT faction, faction1, rate_1, rank_1, faction2, rate_2, rank_2, faction3, rate_3, rank_3, faction4, rate_4, rank_4 FROM reputation_spillover_template"); + uint32 count = 0; // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 + QueryResult result = WorldDatabase.Query("SELECT faction, faction1, rate_1, rank_1, faction2, rate_2, rank_2, faction3, rate_3, rank_3, faction4, rate_4, rank_4, faction5, rate_5, rank_5, faction6, rate_6, rank_6 FROM reputation_spillover_template"); if (!result) { @@ -7706,6 +7706,12 @@ void ObjectMgr::LoadReputationSpilloverTemplate() repTemplate.faction[3] = fields[10].Get(); repTemplate.faction_rate[3] = fields[11].Get(); repTemplate.faction_rank[3] = fields[12].Get(); + repTemplate.faction[4] = fields[13].Get(); + repTemplate.faction_rate[4] = fields[14].Get(); + repTemplate.faction_rank[4] = fields[15].Get(); + repTemplate.faction[5] = fields[16].Get(); + repTemplate.faction_rate[5] = fields[17].Get(); + repTemplate.faction_rank[5] = fields[18].Get(); FactionEntry const* factionEntry = sFactionStore.LookupEntry(factionId); diff --git a/src/server/game/Grids/Grid.h b/src/server/game/Grids/Grid.h index b9cafdbe0..d67b9ca31 100644 --- a/src/server/game/Grids/Grid.h +++ b/src/server/game/Grids/Grid.h @@ -96,6 +96,12 @@ public: visitor.Visit(i_objects); } + template + uint32 GetWorldObjectCountInGrid() const + { + return i_objects.template Count(); + } + /** Inserts a container type object into the grid. */ template void AddGridObject(SPECIFIC_OBJECT* obj) diff --git a/src/server/game/Grids/GridStates.cpp b/src/server/game/Grids/GridStates.cpp new file mode 100644 index 000000000..eb0183b78 --- /dev/null +++ b/src/server/game/Grids/GridStates.cpp @@ -0,0 +1,65 @@ +/* + * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation; either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#include "GridStates.h" +#include "GridNotifiers.h" +#include "Log.h" +#include "Map.h" +#include "ObjectGridLoader.h" + +void InvalidState::Update(Map&, NGridType&, GridInfo&, uint32) const +{ +} + +void ActiveState::Update(Map& map, NGridType& grid, GridInfo& info, uint32 diff) const +{ + // Only check grid activity every (grid_expiry/10) ms, because it's really useless to do it every cycle + info.UpdateTimeTracker(diff); + if (info.getTimeTracker().Passed()) + { + if (!grid.GetWorldObjectCountInNGrid() && !map.ActiveObjectsNearGrid(grid)) + { + ObjectGridStoper worker; + TypeContainerVisitor visitor(worker); + grid.VisitAllGrids(visitor); + grid.SetGridState(GRID_STATE_IDLE); + LOG_DEBUG("maps", "Grid[{}, {}] on map {} moved to IDLE state", grid.getX(), grid.getY(), map.GetId()); + } + else + map.ResetGridExpiry(grid, 0.1f); + } +} + +void IdleState::Update(Map& map, NGridType& grid, GridInfo&, uint32) const +{ + map.ResetGridExpiry(grid); + grid.SetGridState(GRID_STATE_REMOVAL); + LOG_DEBUG("maps", "Grid[{}, {}] on map {} moved to REMOVAL state", grid.getX(), grid.getY(), map.GetId()); +} + +void RemovalState::Update(Map& map, NGridType& grid, GridInfo& info, uint32 diff) const +{ + if (!info.getUnloadLock()) + { + info.UpdateTimeTracker(diff); + if (info.getTimeTracker().Passed() && !map.UnloadGrid(grid, false)) + { + LOG_DEBUG("maps", "Grid[{}, {}] for map {} differed unloading due to players or active objects nearby", grid.getX(), grid.getY(), map.GetId()); + map.ResetGridExpiry(grid); + } + } +} diff --git a/src/server/game/Grids/GridStates.h b/src/server/game/Grids/GridStates.h new file mode 100644 index 000000000..5b0aec3d9 --- /dev/null +++ b/src/server/game/Grids/GridStates.h @@ -0,0 +1,56 @@ +/* + * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation; either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef ACORE_GRIDSTATES_H +#define ACORE_GRIDSTATES_H + +#include "GridDefines.h" +#include "NGrid.h" + +class Map; + +class AC_GAME_API GridState +{ + public: + virtual ~GridState() { }; + virtual void Update(Map &, NGridType&, GridInfo &, uint32 t_diff) const = 0; +}; + +class AC_GAME_API InvalidState : public GridState +{ + public: + void Update(Map &, NGridType &, GridInfo &, uint32 t_diff) const override; +}; + +class AC_GAME_API ActiveState : public GridState +{ + public: + void Update(Map &, NGridType &, GridInfo &, uint32 t_diff) const override; +}; + +class AC_GAME_API IdleState : public GridState +{ + public: + void Update(Map &, NGridType &, GridInfo &, uint32 t_diff) const override; +}; + +class AC_GAME_API RemovalState : public GridState +{ + public: + void Update(Map &, NGridType &, GridInfo &, uint32 t_diff) const override; +}; +#endif diff --git a/src/server/game/Grids/NGrid.cpp b/src/server/game/Grids/NGrid.cpp new file mode 100644 index 000000000..c20bf5558 --- /dev/null +++ b/src/server/game/Grids/NGrid.cpp @@ -0,0 +1,29 @@ +/* + * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation; either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#include "NGrid.h" +#include "Random.h" + +GridInfo::GridInfo() : i_timer(0), vis_Update(0, irand(0, DEFAULT_VISIBILITY_NOTIFY_PERIOD)), +i_unloadActiveLockCount(0), i_unloadExplicitLock(false), i_unloadReferenceLock(false) +{ +} + +GridInfo::GridInfo(std::chrono::seconds expiry, bool unload /*= true */) : i_timer(expiry.count()), vis_Update(0, irand(0, DEFAULT_VISIBILITY_NOTIFY_PERIOD)), +i_unloadActiveLockCount(0), i_unloadExplicitLock(!unload), i_unloadReferenceLock(false) +{ +} diff --git a/src/server/game/Grids/NGrid.h b/src/server/game/Grids/NGrid.h index ff1f1ed81..a49a29919 100644 --- a/src/server/game/Grids/NGrid.h +++ b/src/server/game/Grids/NGrid.h @@ -26,6 +26,42 @@ #include "Timer.h" #include "Util.h" +#define DEFAULT_VISIBILITY_NOTIFY_PERIOD 1000 + +class AC_GAME_API GridInfo +{ +public: + GridInfo(); + GridInfo(std::chrono::seconds expiry, bool unload = true); + TimeTracker const& getTimeTracker() const { return i_timer; } + bool getUnloadLock() const { return i_unloadActiveLockCount || i_unloadExplicitLock || i_unloadReferenceLock; } + void setUnloadExplicitLock(bool on) { i_unloadExplicitLock = on; } + void setUnloadReferenceLock(bool on) { i_unloadReferenceLock = on; } + void incUnloadActiveLock() { ++i_unloadActiveLockCount; } + void decUnloadActiveLock() { if (i_unloadActiveLockCount) --i_unloadActiveLockCount; } + + void setTimer(TimeTracker const& pTimer) { i_timer = pTimer; } + void ResetTimeTracker(time_t interval) { i_timer.Reset(interval); } + void UpdateTimeTracker(time_t diff) { i_timer.Update(diff); } + PeriodicTimer& getRelocationTimer() { return vis_Update; } +private: + TimeTracker i_timer; + PeriodicTimer vis_Update; + + uint16 i_unloadActiveLockCount : 16; // lock from active object spawn points (prevent clone loading) + bool i_unloadExplicitLock : 1; // explicit manual lock or config setting + bool i_unloadReferenceLock : 1; // lock from instance map copy +}; + +typedef enum +{ + GRID_STATE_INVALID = 0, + GRID_STATE_ACTIVE = 1, + GRID_STATE_IDLE = 2, + GRID_STATE_REMOVAL = 3, + MAX_GRID_STATE = 4 +} grid_state_t; + template < uint32 N, @@ -37,10 +73,10 @@ class NGrid { public: typedef Grid GridType; - NGrid(uint32 id, int32 x, int32 y) - : i_gridId(id), i_x(x), i_y(y), i_GridObjectDataLoaded(false) - { - } + NGrid(uint32 id, int32 x, int32 y, std::chrono::seconds expiry, bool unload = true) : + i_gridId(id), i_GridInfo(GridInfo(expiry, unload)), i_x(x), i_y(y), + i_cellstate(GRID_STATE_INVALID), i_GridObjectDataLoaded(false) + { } GridType& GetGridType(const uint32 x, const uint32 y) { @@ -55,6 +91,9 @@ public: } [[nodiscard]] uint32 GetGridId() const { return i_gridId; } + void SetGridId(uint32 id) { i_gridId = id; } + [[nodiscard]] grid_state_t GetGridState() const { return i_cellstate; } + void SetGridState(grid_state_t s) { i_cellstate = s; } [[nodiscard]] int32 getX() const { return i_x; } [[nodiscard]] int32 getY() const { return i_y; } @@ -65,6 +104,16 @@ public: [[nodiscard]] bool isGridObjectDataLoaded() const { return i_GridObjectDataLoaded; } void setGridObjectDataLoaded(bool pLoaded) { i_GridObjectDataLoaded = pLoaded; } + GridInfo* getGridInfoRef() { return &i_GridInfo; } + TimeTracker const& getTimeTracker() const { return i_GridInfo.getTimeTracker(); } + bool getUnloadLock() const { return i_GridInfo.getUnloadLock(); } + void setUnloadExplicitLock(bool on) { i_GridInfo.setUnloadExplicitLock(on); } + void setUnloadReferenceLock(bool on) { i_GridInfo.setUnloadReferenceLock(on); } + void incUnloadActiveLock() { i_GridInfo.incUnloadActiveLock(); } + void decUnloadActiveLock() { i_GridInfo.decUnloadActiveLock(); } + void ResetTimeTracker(std::chrono::seconds interval) { i_GridInfo.ResetTimeTracker(interval.count()); } + void UpdateTimeTracker(std::chrono::seconds diff) { i_GridInfo.UpdateTimeTracker(diff.count()); } + /* template void AddWorldObject(const uint32 x, const uint32 y, SPECIFIC_OBJECT *obj) { @@ -103,11 +152,23 @@ public: GetGridType(x, y).Visit(visitor); } + template + uint32 GetWorldObjectCountInNGrid() const + { + uint32 count = 0; + for (uint32 x = 0; x < N; ++x) + for (uint32 y = 0; y < N; ++y) + count += i_cells[x][y].template GetWorldObjectCountInGrid(); + return count; + } + private: uint32 i_gridId; + GridInfo i_GridInfo; GridReference > i_Reference; int32 i_x; int32 i_y; + grid_state_t i_cellstate; GridType i_cells[N][N]; bool i_GridObjectDataLoaded; }; diff --git a/src/server/game/Grids/Notifiers/GridNotifiers.cpp b/src/server/game/Grids/Notifiers/GridNotifiers.cpp index 7b25ab1bd..c9e9bd735 100644 --- a/src/server/game/Grids/Notifiers/GridNotifiers.cpp +++ b/src/server/game/Grids/Notifiers/GridNotifiers.cpp @@ -16,6 +16,7 @@ */ #include "GridNotifiers.h" +#include "GridNotifiersImpl.h" #include "Map.h" #include "ObjectAccessor.h" #include "SpellInfo.h" @@ -23,22 +24,10 @@ #include "Transport.h" #include "UpdateData.h" #include "WorldPacket.h" +#include "CellImpl.h" using namespace Acore; -void VisibleNotifier::Visit(GameObjectMapType& m) -{ - for (GameObjectMapType::iterator iter = m.begin(); iter != m.end(); ++iter) - { - GameObject* go = iter->GetSource(); - if (i_largeOnly != go->IsVisibilityOverridden()) - continue; - - vis_guids.erase(go->GetGUID()); - i_player.UpdateVisibilityOf(go, i_data, i_visibleNow); - } -} - void VisibleNotifier::SendToSelf() { // at this moment i_clientGUIDs have guids that not iterate at grid level checks @@ -46,9 +35,6 @@ void VisibleNotifier::SendToSelf() if (Transport* transport = i_player.GetTransport()) for (Transport::PassengerSet::const_iterator itr = transport->GetPassengers().begin(); itr != transport->GetPassengers().end(); ++itr) { - if (i_largeOnly != (*itr)->IsVisibilityOverridden()) - continue; - if (vis_guids.find((*itr)->GetGUID()) != vis_guids.end()) { vis_guids.erase((*itr)->GetGUID()); @@ -65,6 +51,9 @@ void VisibleNotifier::SendToSelf() case TYPEID_UNIT: i_player.UpdateVisibilityOf((*itr)->ToCreature(), i_data, i_visibleNow); break; + case TYPEID_DYNAMICOBJECT: + i_player.UpdateVisibilityOf((*itr)->ToDynObject(), i_data, i_visibleNow); + break; default: break; } @@ -73,12 +62,6 @@ void VisibleNotifier::SendToSelf() for (GuidUnorderedSet::const_iterator it = vis_guids.begin(); it != vis_guids.end(); ++it) { - if (WorldObject* obj = ObjectAccessor::GetWorldObject(i_player, *it)) - { - if (i_largeOnly != obj->IsVisibilityOverridden()) - continue; - } - // pussywizard: static transports are removed only in RemovePlayerFromMap and here if can no longer detect (eg. phase changed) if ((*it).IsTransport()) if (GameObject* staticTrans = i_player.GetMap()->GetGameObject(*it)) @@ -105,9 +88,6 @@ void VisibleNotifier::SendToSelf() for (std::vector::const_iterator it = i_visibleNow.begin(); it != i_visibleNow.end(); ++it) { - if (i_largeOnly != (*it)->IsVisibilityOverridden()) - continue; - i_player.GetInitialVisiblePackets(*it); } } @@ -178,6 +158,23 @@ void PlayerRelocationNotifier::Visit(PlayerMapType& m) } } +void PlayerRelocationNotifier::Visit(CreatureMapType& m) +{ + bool relocated_for_ai = (&i_player == i_player.m_seer); + + for (CreatureMapType::iterator iter = m.begin(); iter != m.end(); ++iter) + { + Creature* c = iter->GetSource(); + + vis_guids.erase(c->GetGUID()); + + i_player.UpdateVisibilityOf(c, i_data, i_visibleNow); + + if (relocated_for_ai && !c->isNeedNotify(NOTIFY_VISIBILITY_CHANGED)) + CreatureUnitRelocationWorker(c, &i_player); + } +} + void CreatureRelocationNotifier::Visit(PlayerMapType& m) { for (PlayerMapType::iterator iter = m.begin(); iter != m.end(); ++iter) @@ -194,6 +191,58 @@ void CreatureRelocationNotifier::Visit(PlayerMapType& m) } } +void CreatureRelocationNotifier::Visit(CreatureMapType& m) +{ + if (!i_creature.IsAlive()) + return; + + for (CreatureMapType::iterator iter = m.begin(); iter != m.end(); ++iter) + { + Creature* c = iter->GetSource(); + CreatureUnitRelocationWorker(&i_creature, c); + + if (!c->isNeedNotify(NOTIFY_VISIBILITY_CHANGED)) + CreatureUnitRelocationWorker(c, &i_creature); + } +} + +void DelayedUnitRelocation::Visit(CreatureMapType& m) +{ + for (CreatureMapType::iterator iter = m.begin(); iter != m.end(); ++iter) + { + Creature* unit = iter->GetSource(); + if (!unit->isNeedNotify(NOTIFY_VISIBILITY_CHANGED)) + continue; + + CreatureRelocationNotifier relocate(*unit); + + TypeContainerVisitor c2world_relocation(relocate); + TypeContainerVisitor c2grid_relocation(relocate); + + cell.Visit(p, c2world_relocation, i_map, *unit, i_radius); + cell.Visit(p, c2grid_relocation, i_map, *unit, i_radius); + } +} + +void DelayedUnitRelocation::Visit(PlayerMapType& m) +{ + for (PlayerMapType::iterator iter = m.begin(); iter != m.end(); ++iter) + { + Player* player = iter->GetSource(); + WorldObject const* viewPoint = player->m_seer; + + if (!viewPoint->isNeedNotify(NOTIFY_VISIBILITY_CHANGED)) + continue; + + if (player != viewPoint && !viewPoint->IsPositionValid()) + continue; + + PlayerRelocationNotifier relocate(*player); + Cell::VisitAllObjects(viewPoint, relocate, i_radius, false); + relocate.SendToSelf(); + } +} + void AIRelocationNotifier::Visit(CreatureMapType& m) { bool self = isCreature && !((Creature*)(&i_unit))->IsMoveInLineOfSightStrictlyDisabled(); @@ -341,14 +390,9 @@ void MessageDistDelivererToHostile::Visit(DynamicObjectMapType& m) template void ObjectUpdater::Visit(GridRefMgr& m) { - T* obj; - for (typename GridRefMgr::iterator iter = m.begin(); iter != m.end(); ) - { - obj = iter->GetSource(); - ++iter; - if (obj->IsInWorld() && (i_largeOnly == obj->IsVisibilityOverridden())) - obj->Update(i_timeDiff); - } + for (typename GridRefMgr::iterator iter = m.begin(); iter != m.end(); ++iter) + if (iter->GetSource()->IsInWorld()) + iter->GetSource()->Update(i_timeDiff); } bool AnyDeadUnitObjectInRangeCheck::operator()(Player* u) diff --git a/src/server/game/Grids/Notifiers/GridNotifiers.h b/src/server/game/Grids/Notifiers/GridNotifiers.h index e06b9091f..c634fe9e3 100644 --- a/src/server/game/Grids/Notifiers/GridNotifiers.h +++ b/src/server/game/Grids/Notifiers/GridNotifiers.h @@ -44,16 +44,14 @@ namespace Acore GuidUnorderedSet vis_guids; std::vector& i_visibleNow; bool i_gobjOnly; - bool i_largeOnly; UpdateData i_data; - VisibleNotifier(Player& player, bool gobjOnly, bool largeOnly) : - i_player(player), vis_guids(player.m_clientGUIDs), i_visibleNow(player.m_newVisible), i_gobjOnly(gobjOnly), i_largeOnly(largeOnly) + VisibleNotifier(Player& player, bool gobjOnly) : + i_player(player), vis_guids(player.m_clientGUIDs), i_visibleNow(player.m_newVisible), i_gobjOnly(gobjOnly) { i_visibleNow.clear(); } - void Visit(GameObjectMapType&); template void Visit(GridRefMgr& m); void SendToSelf(void); }; @@ -71,9 +69,10 @@ namespace Acore struct PlayerRelocationNotifier : public VisibleNotifier { - PlayerRelocationNotifier(Player& player, bool largeOnly): VisibleNotifier(player, false, largeOnly) { } + PlayerRelocationNotifier(Player& player) : VisibleNotifier(player, false) { } template void Visit(GridRefMgr& m) { VisibleNotifier::Visit(m); } + void Visit(CreatureMapType&); void Visit(PlayerMapType&); }; @@ -82,6 +81,20 @@ namespace Acore Creature& i_creature; CreatureRelocationNotifier(Creature& c) : i_creature(c) {} template void Visit(GridRefMgr&) {} + void Visit(CreatureMapType&); + void Visit(PlayerMapType&); + }; + + struct DelayedUnitRelocation + { + Map& i_map; + Cell& cell; + CellCoord& p; + const float i_radius; + DelayedUnitRelocation(Cell& c, CellCoord& pair, Map& map, float radius) : + i_map(map), cell(c), p(pair), i_radius(radius) { } + template void Visit(GridRefMgr&) { } + void Visit(CreatureMapType&); void Visit(PlayerMapType&); }; @@ -94,6 +107,25 @@ namespace Acore void Visit(CreatureMapType&); }; + struct GridUpdater + { + GridType& i_grid; + uint32 i_timeDiff; + GridUpdater(GridType& grid, uint32 diff) : i_grid(grid), i_timeDiff(diff) { } + + template void updateObjects(GridRefMgr& m) + { + for (typename GridRefMgr::iterator iter = m.begin(); iter != m.end(); ++iter) + iter->GetSource()->Update(i_timeDiff); + } + + void Visit(PlayerMapType& m) { updateObjects(m); } + void Visit(CreatureMapType& m) { updateObjects(m); } + void Visit(GameObjectMapType& m) { updateObjects(m); } + void Visit(DynamicObjectMapType& m) { updateObjects(m); } + void Visit(CorpseMapType& m) { updateObjects(m); } + }; + struct MessageDistDeliverer { WorldObject const* i_source; @@ -154,8 +186,7 @@ namespace Acore struct ObjectUpdater { uint32 i_timeDiff; - bool i_largeOnly; - explicit ObjectUpdater(const uint32 diff, bool largeOnly) : i_timeDiff(diff), i_largeOnly(largeOnly) {} + explicit ObjectUpdater(const uint32 diff) : i_timeDiff(diff) {} template void Visit(GridRefMgr& m); void Visit(PlayerMapType&) {} void Visit(CorpseMapType&) {} diff --git a/src/server/game/Grids/Notifiers/GridNotifiersImpl.h b/src/server/game/Grids/Notifiers/GridNotifiersImpl.h index 3cd1b77dc..00d967880 100644 --- a/src/server/game/Grids/Notifiers/GridNotifiersImpl.h +++ b/src/server/game/Grids/Notifiers/GridNotifiersImpl.h @@ -38,9 +38,6 @@ inline void Acore::VisibleNotifier::Visit(GridRefMgr& m) for (typename GridRefMgr::iterator iter = m.begin(); iter != m.end(); ++iter) { - if (i_largeOnly != iter->GetSource()->IsVisibilityOverridden()) - continue; - vis_guids.erase(iter->GetSource()->GetGUID()); i_player.UpdateVisibilityOf(iter->GetSource(), i_data, i_visibleNow); } diff --git a/src/server/game/Grids/ObjectGridLoader.cpp b/src/server/game/Grids/ObjectGridLoader.cpp index 628189ae4..c0d9e78c0 100644 --- a/src/server/game/Grids/ObjectGridLoader.cpp +++ b/src/server/game/Grids/ObjectGridLoader.cpp @@ -26,6 +26,35 @@ #include "Transport.h" #include "Vehicle.h" +void ObjectGridEvacuator::Visit(CreatureMapType& m) +{ + // creature in unloading grid can have respawn point in another grid + // if it will be unloaded then it will not respawn in original grid until unload/load original grid + // move to respawn point to prevent this case. For player view in respawn grid this will be normal respawn. + for (CreatureMapType::iterator iter = m.begin(); iter != m.end();) + { + Creature* c = iter->GetSource(); + ++iter; + + ASSERT(!c->IsPet() && "ObjectGridRespawnMover must not be called for pets"); + c->GetMap()->CreatureRespawnRelocation(c, true); + } +} + +void ObjectGridEvacuator::Visit(GameObjectMapType& m) +{ + // gameobject in unloading grid can have respawn point in another grid + // if it will be unloaded then it will not respawn in original grid until unload/load original grid + // move to respawn point to prevent this case. For player view in respawn grid this will be normal respawn. + for (GameObjectMapType::iterator iter = m.begin(); iter != m.end();) + { + GameObject* go = iter->GetSource(); + ++iter; + + go->GetMap()->GameObjectRespawnRelocation(go, true); + } +} + // for loading world object at grid loading (Corpses) //TODO: to implement npc on transport, also need to load npcs at grid loading class ObjectWorldLoader @@ -229,6 +258,17 @@ void ObjectGridUnloader::Visit(GridRefMgr& m) } } +void ObjectGridStoper::Visit(CreatureMapType& m) +{ + // stop any fights at grid de-activation and remove dynobjects created at cast by creatures + for (CreatureMapType::iterator iter = m.begin(); iter != m.end(); ++iter) + { + iter->GetSource()->RemoveAllDynObjects(); + if (iter->GetSource()->IsInCombat()) + iter->GetSource()->CombatStop(); + } +} + template void ObjectGridCleaner::Visit(GridRefMgr& m) { diff --git a/src/server/game/Grids/ObjectGridLoader.h b/src/server/game/Grids/ObjectGridLoader.h index 863e5f15f..d16c3c5bc 100644 --- a/src/server/game/Grids/ObjectGridLoader.h +++ b/src/server/game/Grids/ObjectGridLoader.h @@ -53,6 +53,23 @@ private: uint32 i_corpses; }; +//Stop the creatures before unloading the NGrid +class AC_GAME_API ObjectGridStoper +{ +public: + void Visit(CreatureMapType& m); + template void Visit(GridRefMgr&) { } +}; + +//Move the foreign creatures back to respawn positions before unloading the NGrid +class AC_GAME_API ObjectGridEvacuator +{ +public: + void Visit(CreatureMapType& m); + void Visit(GameObjectMapType& m); + template void Visit(GridRefMgr&) { } +}; + //Clean up and remove from world class ObjectGridCleaner { diff --git a/src/server/game/Handlers/ChatHandler.cpp b/src/server/game/Handlers/ChatHandler.cpp index f6a573d8e..ffd54a76b 100644 --- a/src/server/game/Handlers/ChatHandler.cpp +++ b/src/server/game/Handlers/ChatHandler.cpp @@ -225,9 +225,9 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData) break; } } - // but overwrite it by SPELL_AURA_MOD_LANGUAGE auras (only single case used) + // Overwritten by SPELL_AURA_MOD_LANGUAGE auras (Affects only Say and Yell) Unit::AuraEffectList const& ModLangAuras = sender->GetAuraEffectsByType(SPELL_AURA_MOD_LANGUAGE); - if (!ModLangAuras.empty()) + if (!ModLangAuras.empty() && (type == CHAT_MSG_SAY || type == CHAT_MSG_YELL)) lang = ModLangAuras.front()->GetMiscValue(); } diff --git a/src/server/game/Instances/InstanceSaveMgr.cpp b/src/server/game/Instances/InstanceSaveMgr.cpp index ec6854ede..66927f642 100644 --- a/src/server/game/Instances/InstanceSaveMgr.cpp +++ b/src/server/game/Instances/InstanceSaveMgr.cpp @@ -20,6 +20,7 @@ #include "Config.h" #include "GameTime.h" #include "GridNotifiers.h" +#include "GridStates.h" #include "Group.h" #include "InstanceScript.h" #include "Log.h" diff --git a/src/server/game/Loot/LootMgr.cpp b/src/server/game/Loot/LootMgr.cpp index 68ef554d4..540167486 100644 --- a/src/server/game/Loot/LootMgr.cpp +++ b/src/server/game/Loot/LootMgr.cpp @@ -1738,7 +1738,9 @@ void LootTemplate::Process(Loot& loot, LootStore const& store, uint16 lootMode, // Rate.Drop.Item.GroupAmount is only in effect for the top loot template level if (isTopLevel) { - group->Process(loot, player, store, lootMode, sWorld->getRate(RATE_DROP_ITEM_GROUP_AMOUNT)); + uint32 groupAmount = sWorld->getRate(RATE_DROP_ITEM_GROUP_AMOUNT); + sScriptMgr->OnAfterCalculateLootGroupAmount(player, loot, lootMode, groupAmount, store); + group->Process(loot, player, store, lootMode, groupAmount); } else { diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index daa7d1b05..2826f5709 100644 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -24,6 +24,8 @@ #include "GameTime.h" #include "Geometry.h" #include "GridNotifiers.h" +#include "GridNotifiersImpl.h" +#include "GridStates.h" #include "Group.h" #include "InstanceScript.h" #include "LFGMgr.h" @@ -56,6 +58,8 @@ u_map_magic MapLiquidMagic = { {'M', 'L', 'I', 'Q'} }; static uint16 const holetab_h[4] = { 0x1111, 0x2222, 0x4444, 0x8888 }; static uint16 const holetab_v[4] = { 0x000F, 0x00F0, 0x0F00, 0xF000 }; +GridState* si_GridStates[MAX_GRID_STATE]; + ZoneDynamicInfo::ZoneDynamicInfo() : MusicId(0), WeatherId(WEATHER_STATE_FINE), WeatherGrade(0.0f), OverrideLightId(0), LightFadeInTime(0) { } @@ -188,6 +192,7 @@ void Map::LoadMap(int gx, int gy, bool reload) // load grid map for base map m_parentMap->EnsureGridCreated(GridCoord(63 - gx, 63 - gy)); + ((MapInstanced*)(m_parentMap))->AddGridMapReference(GridCoord(gx, gy)); GridMaps[gx][gy] = m_parentMap->GridMaps[gx][gy]; return; } @@ -232,11 +237,14 @@ void Map::LoadMapAndVMap(int gx, int gy) } } -Map::Map(uint32 id, uint32 InstanceId, uint8 SpawnMode, Map* _parent) : +Map::Map(uint32 id, std::chrono::seconds expiry, uint32 InstanceId, uint8 SpawnMode, Map* _parent) : + _creatureToMoveLock(false), _gameObjectsToMoveLock(false), _dynamicObjectsToMoveLock(false), i_mapEntry(sMapStore.LookupEntry(id)), i_spawnMode(SpawnMode), i_InstanceId(InstanceId), - m_unloadTimer(0), m_VisibleDistance(DEFAULT_VISIBILITY_DISTANCE), - _instanceResetPeriod(0), m_activeNonPlayersIter(m_activeNonPlayers.end()), - _transportsUpdateIter(_transports.end()), i_scriptLock(false), _defaultLight(GetDefaultMapLight(id)) + m_unloadTimer(0), m_VisibleDistance(DEFAULT_VISIBILITY_DISTANCE), _instanceResetPeriod(0), + m_VisibilityNotifyPeriod(DEFAULT_VISIBILITY_NOTIFY_PERIOD), + m_activeNonPlayersIter(m_activeNonPlayers.end()), _transportsUpdateIter(_transports.end()), + i_gridExpiry(expiry), + i_scriptLock(false), _defaultLight(GetDefaultMapLight(id)) { m_parentMap = (_parent ? _parent : this); for (unsigned int idx = 0; idx < MAX_NUMBER_OF_GRIDS; ++idx) @@ -259,6 +267,7 @@ void Map::InitVisibilityDistance() { //init visibility for continents m_VisibleDistance = World::GetMaxVisibleDistanceOnContinents(); + m_VisibilityNotifyPeriod = World::GetVisibilityNotifyPeriodOnContinents(); switch (GetId()) { @@ -431,8 +440,6 @@ void Map::DeleteFromWorld(Player* player) void Map::EnsureGridCreated(const GridCoord& p) { - if (getNGrid(p.x_coord, p.y_coord)) // pussywizard - return; std::lock_guard guard(GridLock); EnsureGridCreated_i(p); } @@ -443,11 +450,14 @@ void Map::EnsureGridCreated_i(const GridCoord& p) { if (!getNGrid(p.x_coord, p.y_coord)) { - // pussywizard: moved setNGrid to the end of the function - NGridType* ngt = new NGridType(p.x_coord * MAX_NUMBER_OF_GRIDS + p.y_coord, p.x_coord, p.y_coord); + LOG_DEBUG("maps", "Creating grid[{}, {}] for map {} instance {}", p.x_coord, p.y_coord, GetId(), i_InstanceId); + + setNGrid(new NGridType(p.x_coord * MAX_NUMBER_OF_GRIDS + p.y_coord, p.x_coord, p.y_coord, i_gridExpiry), p.x_coord, p.y_coord); // build a linkage between this map and NGridType - buildNGridLinkage(ngt); // pussywizard: getNGrid(x, y) changed to: ngt + buildNGridLinkage(getNGrid(p.x_coord, p.y_coord)); + + getNGrid(p.x_coord, p.y_coord)->SetGridState(GRID_STATE_IDLE); //z coord int gx = (MAX_NUMBER_OF_GRIDS - 1) - p.x_coord; @@ -457,9 +467,22 @@ void Map::EnsureGridCreated_i(const GridCoord& p) { LoadMapAndVMap(gx, gy); } + } +} - // pussywizard: moved here - setNGrid(ngt, p.x_coord, p.y_coord); +//Load NGrid and make it active +void Map::EnsureGridLoadedForActiveObject(const Cell& cell, WorldObject* object) +{ + EnsureGridLoaded(cell); + NGridType* grid = getNGrid(cell.GridX(), cell.GridY()); + ASSERT(grid != nullptr); + + // refresh grid state & timer + if (grid->GetGridState() != GRID_STATE_ACTIVE) + { + LOG_DEBUG("maps", "Active object {} triggers loading of grid [{}, {}] on map {}", object->GetGUID().ToString().c_str(), cell.GridX(), cell.GridY(), GetId()); + ResetGridExpiry(*grid, 0.1f); + grid->SetGridState(GRID_STATE_ACTIVE); } } @@ -489,6 +512,29 @@ bool Map::EnsureGridLoaded(const Cell& cell) return false; } +void Map::GridMarkNoUnload(uint32 x, uint32 y) +{ + // First make sure this grid is loaded + float gX = ((float(x) - 0.5f - CENTER_GRID_ID) * SIZE_OF_GRIDS) + (CENTER_GRID_OFFSET * 2); + float gY = ((float(y) - 0.5f - CENTER_GRID_ID) * SIZE_OF_GRIDS) + (CENTER_GRID_OFFSET * 2); + Cell cell = Cell(gX, gY); + EnsureGridLoaded(cell); + + // Mark as don't unload + NGridType* grid = getNGrid(x, y); + grid->setUnloadExplicitLock(true); +} + +void Map::GridUnmarkNoUnload(uint32 x, uint32 y) +{ + // If grid is loaded, clear unload lock + if (IsGridLoaded(GridCoord(x, y))) + { + NGridType* grid = getNGrid(x, y); + grid->setUnloadExplicitLock(false); + } +} + void Map::LoadGrid(float x, float y) { EnsureGridLoaded(Cell(x, y)); @@ -501,6 +547,22 @@ void Map::LoadAllCells() LoadGrid((cellX + 0.5f - CENTER_GRID_CELL_ID) * SIZE_OF_GRID_CELL, (cellY + 0.5f - CENTER_GRID_CELL_ID) * SIZE_OF_GRID_CELL); } +void Map::InitStateMachine() +{ + si_GridStates[GRID_STATE_INVALID] = new InvalidState(); + si_GridStates[GRID_STATE_ACTIVE] = new ActiveState(); + si_GridStates[GRID_STATE_IDLE] = new IdleState(); + si_GridStates[GRID_STATE_REMOVAL] = new RemovalState(); +} + +void Map::DeleteStateMachine() +{ + delete si_GridStates[GRID_STATE_INVALID]; + delete si_GridStates[GRID_STATE_ACTIVE]; + delete si_GridStates[GRID_STATE_IDLE]; + delete si_GridStates[GRID_STATE_REMOVAL]; +} + bool Map::AddPlayerToMap(Player* player) { CellCoord cellCoord = Acore::ComputeCellCoord(player->GetPositionX(), player->GetPositionY()); @@ -512,7 +574,7 @@ bool Map::AddPlayerToMap(Player* player) } Cell cell(cellCoord); - EnsureGridLoaded(cell); + EnsureGridLoadedForActiveObject(cell, player); AddToGrid(player, cell); // Check if we are adding to correct map @@ -540,15 +602,15 @@ void Map::InitializeObject(T* /*obj*/) } template<> -void Map::InitializeObject(Creature* /*obj*/) +void Map::InitializeObject(Creature* obj) { - //obj->_moveState = MAP_OBJECT_CELL_MOVE_NONE; + obj->_moveState = MAP_OBJECT_CELL_MOVE_NONE; } template<> -void Map::InitializeObject(GameObject* /*obj*/) +void Map::InitializeObject(GameObject* obj) { - //obj->_moveState = MAP_OBJECT_CELL_MOVE_NONE; + obj->_moveState = MAP_OBJECT_CELL_MOVE_NONE; } template @@ -576,7 +638,7 @@ bool Map::AddToMap(T* obj, bool checkTransport) Cell cell(cellCoord); if (obj->isActiveObject()) - EnsureGridLoaded(cell); + EnsureGridLoadedForActiveObject(cell, obj); else EnsureGridCreated(GridCoord(cell.GridX(), cell.GridY())); @@ -658,45 +720,8 @@ bool Map::IsGridLoaded(const GridCoord& p) const return (getNGrid(p.x_coord, p.y_coord) && isGridObjectDataLoaded(p.x_coord, p.y_coord)); } -void Map::VisitNearbyCellsOfPlayer(Player* player, TypeContainerVisitor& gridVisitor, - TypeContainerVisitor& worldVisitor, - TypeContainerVisitor& largeGridVisitor, - TypeContainerVisitor& largeWorldVisitor) -{ - // check for valid position - if (!player->IsPositionValid()) - return; - - // check normal grid activation range of the player - VisitNearbyCellsOf(player, gridVisitor, worldVisitor, largeGridVisitor, largeWorldVisitor); - - // check maximum visibility distance for large creatures - CellArea area = Cell::CalculateCellArea(player->GetPositionX(), player->GetPositionY(), MAX_VISIBILITY_DISTANCE); - - for (uint32 x = area.low_bound.x_coord; x <= area.high_bound.x_coord; ++x) - { - for (uint32 y = area.low_bound.y_coord; y <= area.high_bound.y_coord; ++y) - { - // marked cells are those that have been visited - // don't visit the same cell twice - uint32 cell_id = (y * TOTAL_NUMBER_OF_CELLS_PER_MAP) + x; - if (isCellMarkedLarge(cell_id)) - continue; - - markCellLarge(cell_id); - CellCoord pair(x, y); - Cell cell(pair); - - Visit(cell, largeGridVisitor); - Visit(cell, largeWorldVisitor); - } - } -} - void Map::VisitNearbyCellsOf(WorldObject* obj, TypeContainerVisitor& gridVisitor, - TypeContainerVisitor& worldVisitor, - TypeContainerVisitor& largeGridVisitor, - TypeContainerVisitor& largeWorldVisitor) + TypeContainerVisitor& worldVisitor) { // Check for valid position if (!obj->IsPositionValid()) @@ -725,13 +750,6 @@ void Map::VisitNearbyCellsOf(WorldObject* obj, TypeContainerVisitorGetSource(); - - if (!player || !player->IsInWorld()) - continue; - - // update players at tick - player->Update(s_diff); - } - - HandleDelayedVisibility(); - return; - } - /// update active cells around players and active objects resetMarkedCells(); - resetMarkedCellsLarge(); - Acore::ObjectUpdater updater(t_diff, false); + Acore::ObjectUpdater updater(t_diff); // for creature TypeContainerVisitor grid_object_update(updater); // for pets TypeContainerVisitor world_object_update(updater); - // for large creatures - Acore::ObjectUpdater largeObjectUpdater(t_diff, true); - TypeContainerVisitor grid_large_object_update(largeObjectUpdater); - TypeContainerVisitor world_large_object_update(largeObjectUpdater); - // pussywizard: container for far creatures in combat with players std::vector updateList; updateList.reserve(10); @@ -800,7 +795,7 @@ void Map::Update(const uint32 t_diff, const uint32 s_diff, bool /*thread*/) if (!obj || !obj->IsInWorld()) continue; - VisitNearbyCellsOf(obj, grid_object_update, world_object_update, grid_large_object_update, world_large_object_update); + VisitNearbyCellsOf(obj, grid_object_update, world_object_update); } // the player iterator is stored in the map object @@ -815,20 +810,11 @@ void Map::Update(const uint32 t_diff, const uint32 s_diff, bool /*thread*/) // update players at tick player->Update(s_diff); - VisitNearbyCellsOfPlayer(player, grid_object_update, world_object_update, grid_large_object_update, world_large_object_update); + VisitNearbyCellsOf(player, grid_object_update, world_object_update); // If player is using far sight, visit that object too if (WorldObject* viewPoint = player->GetViewpoint()) - { - if (Creature* viewCreature = viewPoint->ToCreature()) - { - VisitNearbyCellsOf(viewCreature, grid_object_update, world_object_update, grid_large_object_update, world_large_object_update); - } - else if (DynamicObject* viewObject = viewPoint->ToDynObject()) - { - VisitNearbyCellsOf(viewObject, grid_object_update, world_object_update, grid_large_object_update, world_large_object_update); - } - } + VisitNearbyCellsOf(viewPoint, grid_object_update, world_object_update); // handle updates for creatures in combat with player and are more than X yards away if (player->IsInCombat()) @@ -846,7 +832,7 @@ void Map::Update(const uint32 t_diff, const uint32 s_diff, bool /*thread*/) ref = ref->next(); } for (std::vector::const_iterator itr = updateList.begin(); itr != updateList.end(); ++itr) - VisitNearbyCellsOf(*itr, grid_object_update, world_object_update, grid_large_object_update, world_large_object_update); + VisitNearbyCellsOf(*itr, grid_object_update, world_object_update); } } @@ -875,7 +861,8 @@ void Map::Update(const uint32 t_diff, const uint32 s_diff, bool /*thread*/) MoveAllGameObjectsInMoveList(); MoveAllDynamicObjectsInMoveList(); - HandleDelayedVisibility(); + if (!m_mapRefMgr.IsEmpty() || !m_activeNonPlayers.empty()) + ProcessRelocationNotifies(t_diff); sScriptMgr->OnMapUpdate(this, t_diff); @@ -888,15 +875,6 @@ void Map::Update(const uint32 t_diff, const uint32 s_diff, bool /*thread*/) METRIC_TAG("map_instanceid", std::to_string(GetInstanceId()))); } -void Map::HandleDelayedVisibility() -{ - if (i_objectsForDelayedVisibility.empty()) - return; - for (std::unordered_set::iterator itr = i_objectsForDelayedVisibility.begin(); itr != i_objectsForDelayedVisibility.end(); ++itr) - (*itr)->ExecuteDelayedUnitRelocationEvent(); - i_objectsForDelayedVisibility.clear(); -} - struct ResetNotifier { templateinline void resetNotify(GridRefMgr& m) @@ -909,6 +887,83 @@ struct ResetNotifier void Visit(PlayerMapType& m) { resetNotify(m);} }; +void Map::ProcessRelocationNotifies(uint32 diff) +{ + for (GridRefMgr::iterator i = GridRefMgr::begin(); i != GridRefMgr::end(); ++i) + { + NGridType* grid = i->GetSource(); + + if (grid->GetGridState() != GRID_STATE_ACTIVE) + continue; + + grid->getGridInfoRef()->getRelocationTimer().TUpdate(diff); + if (!grid->getGridInfoRef()->getRelocationTimer().TPassed()) + continue; + + uint32 gx = grid->getX(), gy = grid->getY(); + + CellCoord cell_min(gx * MAX_NUMBER_OF_CELLS, gy * MAX_NUMBER_OF_CELLS); + CellCoord cell_max(cell_min.x_coord + MAX_NUMBER_OF_CELLS, cell_min.y_coord + MAX_NUMBER_OF_CELLS); + + for (uint32 x = cell_min.x_coord; x < cell_max.x_coord; ++x) + { + for (uint32 y = cell_min.y_coord; y < cell_max.y_coord; ++y) + { + uint32 cell_id = (y * TOTAL_NUMBER_OF_CELLS_PER_MAP) + x; + if (!isCellMarked(cell_id)) + continue; + + CellCoord pair(x, y); + Cell cell(pair); + cell.SetNoCreate(); + + Acore::DelayedUnitRelocation cell_relocation(cell, pair, *this, MAX_VISIBILITY_DISTANCE); + TypeContainerVisitor grid_object_relocation(cell_relocation); + TypeContainerVisitor world_object_relocation(cell_relocation); + Visit(cell, grid_object_relocation); + Visit(cell, world_object_relocation); + } + } + } + + ResetNotifier reset; + TypeContainerVisitor grid_notifier(reset); + TypeContainerVisitor world_notifier(reset); + for (GridRefMgr::iterator i = GridRefMgr::begin(); i != GridRefMgr::end(); ++i) + { + NGridType* grid = i->GetSource(); + + if (grid->GetGridState() != GRID_STATE_ACTIVE) + continue; + + if (!grid->getGridInfoRef()->getRelocationTimer().TPassed()) + continue; + + grid->getGridInfoRef()->getRelocationTimer().TReset(diff, m_VisibilityNotifyPeriod); + + uint32 gx = grid->getX(), gy = grid->getY(); + + CellCoord cell_min(gx * MAX_NUMBER_OF_CELLS, gy * MAX_NUMBER_OF_CELLS); + CellCoord cell_max(cell_min.x_coord + MAX_NUMBER_OF_CELLS, cell_min.y_coord + MAX_NUMBER_OF_CELLS); + + for (uint32 x = cell_min.x_coord; x < cell_max.x_coord; ++x) + { + for (uint32 y = cell_min.y_coord; y < cell_max.y_coord; ++y) + { + uint32 cell_id = (y * TOTAL_NUMBER_OF_CELLS_PER_MAP) + x; + if (!isCellMarked(cell_id)) + continue; + + CellCoord pair(x, y); + Cell cell(pair); + cell.SetNoCreate(); + Visit(cell, grid_notifier); + Visit(cell, world_notifier); + } + } + } +} + void Map::RemovePlayerFromMap(Player* player, bool remove) { player->getHostileRefMgr().deleteReferences(true); // pussywizard: multithreading crashfix @@ -1000,15 +1055,19 @@ void Map::RemoveFromMap(MotionTransport* obj, bool remove) void Map::PlayerRelocation(Player* player, float x, float y, float z, float o) { + ASSERT(player); + Cell old_cell(player->GetPositionX(), player->GetPositionY()); Cell new_cell(x, y); if (old_cell.DiffGrid(new_cell) || old_cell.DiffCell(new_cell)) { + LOG_DEBUG("maps", "Player {} relocation grid[{}, {}]cell[{}, {}]->grid[{}, {}]cell[{}, {}]", player->GetName().c_str(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY()); + player->RemoveFromGrid(); if (old_cell.DiffGrid(new_cell)) - EnsureGridLoaded(new_cell); + EnsureGridLoadedForActiveObject(new_cell, player); AddToGrid(player, new_cell); } @@ -1030,10 +1089,15 @@ void Map::CreatureRelocation(Creature* creature, float x, float y, float z, floa if (old_cell.DiffGrid(new_cell)) EnsureGridLoaded(new_cell); - AddCreatureToMoveList(creature); + #ifdef ACORE_DEBUG + LOG_DEBUG("maps", "Creature {} added to moving list from grid[{}, {}]cell[{}, {}] to grid[{}, {}]cell[{}, {}].", creature->GetGUID().ToString().c_str(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY()); + #endif + AddCreatureToMoveList(creature, x, y, z, o); } else + { RemoveCreatureFromMoveList(creature); + } creature->Relocate(x, y, z, o); if (creature->IsVehicle()) @@ -1052,10 +1116,15 @@ void Map::GameObjectRelocation(GameObject* go, float x, float y, float z, float if (old_cell.DiffGrid(new_cell)) EnsureGridLoaded(new_cell); - AddGameObjectToMoveList(go); + #ifdef ACORE_DEBUG + LOG_DEBUG("maps", "GameObject {} added to moving list from grid[{}, {}]cell[{}, {}] to grid[{}, {}]cell[{}, {}].", go->GetGUID().ToString().c_str(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY()); + #endif + AddGameObjectToMoveList(go, x, y, z, o); } else + { RemoveGameObjectFromMoveList(go); + } go->Relocate(x, y, z, o); go->UpdateModelPosition(); @@ -1073,61 +1142,85 @@ void Map::DynamicObjectRelocation(DynamicObject* dynObj, float x, float y, float if (old_cell.DiffGrid(new_cell)) EnsureGridLoaded(new_cell); - AddDynamicObjectToMoveList(dynObj); + #ifdef ACORE_DEBUG + LOG_DEBUG("maps", "GameObject {} added to moving list from grid[{}, {}]cell[{}, {}] to grid[{}, {}]cell[{}, {}].", dynObj->GetGUID().ToString().c_str(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY()); + #endif + AddDynamicObjectToMoveList(dynObj, x, y, z, o); } else + { RemoveDynamicObjectFromMoveList(dynObj); + } dynObj->Relocate(x, y, z, o); dynObj->SetPositionDataUpdate(); dynObj->UpdateObjectVisibility(false); } -void Map::AddCreatureToMoveList(Creature* c) +void Map::AddCreatureToMoveList(Creature* c, float x, float y, float z, float ang) { + if (_creatureToMoveLock) //can this happen? + return; + if (c->_moveState == MAP_OBJECT_CELL_MOVE_NONE) _creaturesToMove.push_back(c); - c->_moveState = MAP_OBJECT_CELL_MOVE_ACTIVE; + c->SetNewCellPosition(x, y, z, ang); } void Map::RemoveCreatureFromMoveList(Creature* c) { + if (_creatureToMoveLock) //can this happen? + return; + if (c->_moveState == MAP_OBJECT_CELL_MOVE_ACTIVE) c->_moveState = MAP_OBJECT_CELL_MOVE_INACTIVE; } -void Map::AddGameObjectToMoveList(GameObject* go) +void Map::AddGameObjectToMoveList(GameObject* go, float x, float y, float z, float ang) { + if (_gameObjectsToMoveLock) //can this happen? + return; + if (go->_moveState == MAP_OBJECT_CELL_MOVE_NONE) _gameObjectsToMove.push_back(go); - go->_moveState = MAP_OBJECT_CELL_MOVE_ACTIVE; + go->SetNewCellPosition(x, y, z, ang); } void Map::RemoveGameObjectFromMoveList(GameObject* go) { + if (_gameObjectsToMoveLock) //can this happen? + return; + if (go->_moveState == MAP_OBJECT_CELL_MOVE_ACTIVE) go->_moveState = MAP_OBJECT_CELL_MOVE_INACTIVE; } -void Map::AddDynamicObjectToMoveList(DynamicObject* dynObj) +void Map::AddDynamicObjectToMoveList(DynamicObject* dynObj, float x, float y, float z, float ang) { + if (_dynamicObjectsToMoveLock) //can this happen? + return; + if (dynObj->_moveState == MAP_OBJECT_CELL_MOVE_NONE) _dynamicObjectsToMove.push_back(dynObj); - dynObj->_moveState = MAP_OBJECT_CELL_MOVE_ACTIVE; + dynObj->SetNewCellPosition(x, y, z, ang); } void Map::RemoveDynamicObjectFromMoveList(DynamicObject* dynObj) { + if (_dynamicObjectsToMoveLock) //can this happen? + return; + if (dynObj->_moveState == MAP_OBJECT_CELL_MOVE_ACTIVE) dynObj->_moveState = MAP_OBJECT_CELL_MOVE_INACTIVE; } void Map::MoveAllCreaturesInMoveList() { + _creatureToMoveLock = true; for (std::vector::iterator itr = _creaturesToMove.begin(); itr != _creaturesToMove.end(); ++itr) { Creature* c = *itr; - if (c->FindMap() != this) + if (c->FindMap() != this) //pet is teleported to another map continue; if (c->_moveState != MAP_OBJECT_CELL_MOVE_ACTIVE) @@ -1140,23 +1233,51 @@ void Map::MoveAllCreaturesInMoveList() if (!c->IsInWorld()) continue; - Cell const& old_cell = c->GetCurrentCell(); - Cell new_cell(c->GetPositionX(), c->GetPositionY()); - - c->RemoveFromGrid(); - if (old_cell.DiffGrid(new_cell)) - EnsureGridLoaded(new_cell); - AddToGrid(c, new_cell); + // do move or do move to respawn or remove creature if previous all fail + if (CreatureCellRelocation(c, Cell(c->_newPosition.m_positionX, c->_newPosition.m_positionY))) + { + // update pos + c->Relocate(c->_newPosition); + if (c->IsVehicle()) + c->GetVehicleKit()->RelocatePassengers(); + //CreatureRelocationNotify(c, new_cell, new_cell.cellCoord()); + c->UpdatePositionData(); + c->UpdateObjectVisibility(false); + } + else + { + // if creature can't be move in new cell/grid (not loaded) move it to repawn cell/grid + // creature coordinates will be updated and notifiers send + if (!CreatureRespawnRelocation(c, false)) + { + // ... or unload (if respawn grid also not loaded) +#ifdef ACORE_DEBUG + LOG_DEBUG("maps", "Creature {} cannot be move to unloaded respawn grid.", c->GetGUID().ToString().c_str()); +#endif + //AddObjectToRemoveList(Pet*) should only be called in Pet::Remove + //This may happen when a player just logs in and a pet moves to a nearby unloaded cell + //To avoid this, we can load nearby cells when player log in + //But this check is always needed to ensure safety + /// @todo pets will disappear if this is outside CreatureRespawnRelocation + //need to check why pet is frequently relocated to an unloaded cell + if (c->IsPet()) + ((Pet*)c)->Remove(PET_SAVE_NOT_IN_SLOT, true); + else + AddObjectToRemoveList(c); + } + } } _creaturesToMove.clear(); + _creatureToMoveLock = false; } void Map::MoveAllGameObjectsInMoveList() { + _gameObjectsToMoveLock = true; for (std::vector::iterator itr = _gameObjectsToMove.begin(); itr != _gameObjectsToMove.end(); ++itr) { GameObject* go = *itr; - if (go->FindMap() != this) + if (go->FindMap() != this) //transport is teleported to another map continue; if (go->_moveState != MAP_OBJECT_CELL_MOVE_ACTIVE) @@ -1169,23 +1290,40 @@ void Map::MoveAllGameObjectsInMoveList() if (!go->IsInWorld()) continue; - Cell const& old_cell = go->GetCurrentCell(); - Cell new_cell(go->GetPositionX(), go->GetPositionY()); - - go->RemoveFromGrid(); - if (old_cell.DiffGrid(new_cell)) - EnsureGridLoaded(new_cell); - AddToGrid(go, new_cell); + // do move or do move to respawn or remove creature if previous all fail + if (GameObjectCellRelocation(go, Cell(go->_newPosition.m_positionX, go->_newPosition.m_positionY))) + { + // update pos + go->Relocate(go->_newPosition); + go->UpdateModelPosition(); + go->UpdatePositionData(); + go->UpdateObjectVisibility(false); + } + else + { + // if GameObject can't be move in new cell/grid (not loaded) move it to repawn cell/grid + // GameObject coordinates will be updated and notifiers send + if (!GameObjectRespawnRelocation(go, false)) + { + // ... or unload (if respawn grid also not loaded) +#ifdef ACORE_DEBUG + LOG_DEBUG("maps", "GameObject {} cannot be move to unloaded respawn grid.", go->GetGUID().ToString().c_str()); +#endif + AddObjectToRemoveList(go); + } + } } _gameObjectsToMove.clear(); + _gameObjectsToMoveLock = false; } void Map::MoveAllDynamicObjectsInMoveList() { + _dynamicObjectsToMoveLock = true; for (std::vector::iterator itr = _dynamicObjectsToMove.begin(); itr != _dynamicObjectsToMove.end(); ++itr) { DynamicObject* dynObj = *itr; - if (dynObj->FindMap() != this) + if (dynObj->FindMap() != this) //transport is teleported to another map continue; if (dynObj->_moveState != MAP_OBJECT_CELL_MOVE_ACTIVE) @@ -1198,60 +1336,344 @@ void Map::MoveAllDynamicObjectsInMoveList() if (!dynObj->IsInWorld()) continue; - Cell const& old_cell = dynObj->GetCurrentCell(); - Cell new_cell(dynObj->GetPositionX(), dynObj->GetPositionY()); - - dynObj->RemoveFromGrid(); - if (old_cell.DiffGrid(new_cell)) - EnsureGridLoaded(new_cell); - AddToGrid(dynObj, new_cell); + // do move or do move to respawn or remove creature if previous all fail + if (DynamicObjectCellRelocation(dynObj, Cell(dynObj->_newPosition.m_positionX, dynObj->_newPosition.m_positionY))) + { + // update pos + dynObj->Relocate(dynObj->_newPosition); + dynObj->UpdatePositionData(); + dynObj->UpdateObjectVisibility(false); + } + else + { +#ifdef ACORE_DEBUG + LOG_DEBUG("maps", "DynamicObject {} cannot be moved to unloaded grid.", dynObj->GetGUID().ToString().c_str()); +#endif + } } + _dynamicObjectsToMove.clear(); + _dynamicObjectsToMoveLock = false; } -bool Map::UnloadGrid(NGridType& ngrid) +bool Map::CreatureCellRelocation(Creature* c, Cell new_cell) { - // pussywizard: UnloadGrid only done when whole map is unloaded, no need to worry about moving npcs between grids, etc. + Cell const& old_cell = c->GetCurrentCell(); + if (!old_cell.DiffGrid(new_cell)) // in same grid + { + // if in same cell then none do + if (old_cell.DiffCell(new_cell)) + { +#ifdef ACORE_DEBUG + LOG_DEBUG("maps", "Creature {} moved in grid[{}, {}] from cell[{}, {}] to cell[{}, {}].", c->GetGUID().ToString().c_str(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.CellX(), new_cell.CellY()); +#endif + c->RemoveFromGrid(); + AddToGrid(c, new_cell); + } + else + { +#ifdef ACORE_DEBUG + LOG_DEBUG("maps", "Creature {} moved in same grid[{}, {}]cell[{}, {}].", c->GetGUID().ToString().c_str(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY()); +#endif + } + + return true; + } + + // in diff. grids but active creature + if (c->isActiveObject()) + { + EnsureGridLoadedForActiveObject(new_cell, c); + +#ifdef ACORE_DEBUG + LOG_DEBUG("maps", "Active creature {} moved from grid[{}, {}]cell[{}, {}] to grid[{}, {}]cell[{}, {}].", c->GetGUID().ToString().c_str(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY()); +#endif + + c->RemoveFromGrid(); + AddToGrid(c, new_cell); + + return true; + } + + if (c->GetCharmerOrOwnerGUID().IsPlayer()) + EnsureGridLoaded(new_cell); + + // in diff. loaded grid normal creature + if (IsGridLoaded(GridCoord(new_cell.GridX(), new_cell.GridY()))) + { +#ifdef ACORE_DEBUG + LOG_DEBUG("maps", "Creature {} moved from grid[{}, {}]cell[{}, {}] to grid[{}, {}]cell[{}, {}].", c->GetGUID().ToString().c_str(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY()); +#endif + + c->RemoveFromGrid(); + EnsureGridCreated(GridCoord(new_cell.GridX(), new_cell.GridY())); + AddToGrid(c, new_cell); + + return true; + } + + // fail to move: normal creature attempt move to unloaded grid +#ifdef ACORE_DEBUG + LOG_DEBUG("maps", "Creature {} attempted to move from grid[{}, {}]cell[{}, {}] to unloaded grid[{}, {}]cell[{}, {}].", c->GetGUID().ToString().c_str(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY()); +#endif + return false; +} + +bool Map::GameObjectCellRelocation(GameObject* go, Cell new_cell) +{ + Cell const& old_cell = go->GetCurrentCell(); + if (!old_cell.DiffGrid(new_cell)) // in same grid + { + // if in same cell then none do + if (old_cell.DiffCell(new_cell)) + { +#ifdef ACORE_DEBUG + LOG_DEBUG("maps", "GameObject {} moved in grid[{}, {}] from cell[{}, {}] to cell[{}, {}].", go->GetGUID().ToString().c_str(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.CellX(), new_cell.CellY()); +#endif + + go->RemoveFromGrid(); + AddToGrid(go, new_cell); + } + else + { +#ifdef ACORE_DEBUG + LOG_DEBUG("maps", "GameObject {} moved in same grid[{}, {}]cell[{}, {}].", go->GetGUID().ToString().c_str(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY()); +#endif + } + + return true; + } + + // in diff. grids but active GameObject + if (go->isActiveObject()) + { + EnsureGridLoadedForActiveObject(new_cell, go); + +#ifdef ACORE_DEBUG + LOG_DEBUG("maps", "Active GameObject {} moved from grid[{}, {}]cell[{}, {}] to grid[{}, {}]cell[{}, {}].", go->GetGUID().ToString().c_str(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY()); +#endif + + go->RemoveFromGrid(); + AddToGrid(go, new_cell); + + return true; + } + + // in diff. loaded grid normal GameObject + if (IsGridLoaded(GridCoord(new_cell.GridX(), new_cell.GridY()))) + { +#ifdef ACORE_DEBUG + LOG_DEBUG("maps", "GameObject {} moved from grid[{}, {}]cell[{}, {}] to grid[{}, {}]cell[{}, {}].", go->GetGUID().ToString().c_str(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY()); +#endif + + go->RemoveFromGrid(); + EnsureGridCreated(GridCoord(new_cell.GridX(), new_cell.GridY())); + AddToGrid(go, new_cell); + + return true; + } + + // fail to move: normal GameObject attempt move to unloaded grid +#ifdef ACORE_DEBUG + LOG_DEBUG("maps", "GameObject {} attempted to move from grid[{}, {}]cell[{}, {}] to unloaded grid[{}, {}]cell[{}, {}].", go->GetGUID().ToString().c_str(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY()); +#endif + return false; +} + +bool Map::DynamicObjectCellRelocation(DynamicObject* go, Cell new_cell) +{ + Cell const& old_cell = go->GetCurrentCell(); + if (!old_cell.DiffGrid(new_cell)) // in same grid + { + // if in same cell then none do + if (old_cell.DiffCell(new_cell)) + { +#ifdef ACORE_DEBUG + LOG_DEBUG("maps", "DynamicObject {} moved in grid[{}, {}] from cell[{}, {}] to cell[{}, {}].", go->GetGUID().ToString().c_str(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.CellX(), new_cell.CellY()); +#endif + + go->RemoveFromGrid(); + AddToGrid(go, new_cell); + } + else + { +#ifdef ACORE_DEBUG + LOG_DEBUG("maps", "DynamicObject {} moved in same grid[{}, {}]cell[{}, {}].", go->GetGUID().ToString().c_str(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY()); +#endif + } + + return true; + } + + // in diff. grids but active GameObject + if (go->isActiveObject()) + { + EnsureGridLoadedForActiveObject(new_cell, go); + +#ifdef ACORE_DEBUG + LOG_DEBUG("maps", "Active DynamicObject {} moved from grid[{}, {}]cell[{}, {}] to grid[{}, {}]cell[{}, {}].", go->GetGUID().ToString().c_str(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY()); +#endif + + go->RemoveFromGrid(); + AddToGrid(go, new_cell); + + return true; + } + + // in diff. loaded grid normal GameObject + if (IsGridLoaded(GridCoord(new_cell.GridX(), new_cell.GridY()))) + { +#ifdef ACORE_DEBUG + LOG_DEBUG("maps", "DynamicObject {} moved from grid[{}, {}]cell[{}, {}] to grid[{}, {}]cell[{}, {}].", go->GetGUID().ToString().c_str(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY()); +#endif + + go->RemoveFromGrid(); + EnsureGridCreated(GridCoord(new_cell.GridX(), new_cell.GridY())); + AddToGrid(go, new_cell); + + return true; + } + + // fail to move: normal GameObject attempt move to unloaded grid +#ifdef ACORE_DEBUG + LOG_DEBUG("maps", "DynamicObject {} attempted to move from grid[{}, {}]cell[{}, {}] to unloaded grid[{}, {}]cell[{}, {}].", go->GetGUID().ToString().c_str(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY()); +#endif + return false; +} + +bool Map::CreatureRespawnRelocation(Creature* c, bool diffGridOnly) +{ + float resp_x, resp_y, resp_z, resp_o; + c->GetRespawnPosition(resp_x, resp_y, resp_z, &resp_o); + Cell resp_cell(resp_x, resp_y); + + //creature will be unloaded with grid + if (diffGridOnly && !c->GetCurrentCell().DiffGrid(resp_cell)) + return true; + + c->CombatStop(); + c->GetMotionMaster()->Clear(); + +#ifdef ACORE_DEBUG + LOG_DEBUG("maps", "Creature {} moved from grid[{}, {}]cell[{}, {}] to respawn grid[{}, {}]cell[{}, {}].", c->GetGUID().ToString().c_str(), c->GetCurrentCell().GridX(), c->GetCurrentCell().GridY(), c->GetCurrentCell().CellX(), c->GetCurrentCell().CellY(), resp_cell.GridX(), resp_cell.GridY(), resp_cell.CellX(), resp_cell.CellY()); +#endif + + // teleport it to respawn point (like normal respawn if player see) + if (CreatureCellRelocation(c, resp_cell)) + { + c->Relocate(resp_x, resp_y, resp_z, resp_o); + c->GetMotionMaster()->Initialize(); // prevent possible problems with default move generators + //CreatureRelocationNotify(c, resp_cell, resp_cell.GetCellCoord()); + c->UpdatePositionData(); + c->UpdateObjectVisibility(false); + return true; + } + + return false; +} + +bool Map::GameObjectRespawnRelocation(GameObject* go, bool diffGridOnly) +{ + float resp_x, resp_y, resp_z, resp_o; + go->GetRespawnPosition(resp_x, resp_y, resp_z, &resp_o); + Cell resp_cell(resp_x, resp_y); + + //GameObject will be unloaded with grid + if (diffGridOnly && !go->GetCurrentCell().DiffGrid(resp_cell)) + return true; + +#ifdef ACORE_DEBUG + LOG_DEBUG("maps", "GameObject {} moved from grid[{}, {}]cell[{}, {}] to respawn grid[{}, {}]cell[{}, {}].", go->GetGUID().ToString().c_str(), go->GetCurrentCell().GridX(), go->GetCurrentCell().GridY(), go->GetCurrentCell().CellX(), go->GetCurrentCell().CellY(), resp_cell.GridX(), resp_cell.GridY(), resp_cell.CellX(), resp_cell.CellY()); +#endif + + // teleport it to respawn point (like normal respawn if player see) + if (GameObjectCellRelocation(go, resp_cell)) + { + go->Relocate(resp_x, resp_y, resp_z, resp_o); + go->UpdatePositionData(); + go->UpdateObjectVisibility(false); + return true; + } + + return false; +} + +bool Map::UnloadGrid(NGridType& ngrid, bool unloadAll) +{ const uint32 x = ngrid.getX(); const uint32 y = ngrid.getY(); { - ObjectGridCleaner worker; - TypeContainerVisitor visitor(worker); - ngrid.VisitAllGrids(visitor); + if (!unloadAll) + { + //pets, possessed creatures (must be active), transport passengers + if (ngrid.GetWorldObjectCountInNGrid()) + return false; + + if (ActiveObjectsNearGrid(ngrid)) + return false; + } + + LOG_DEBUG("maps", "Unloading grid[{}, {}] for map {}", x, y, GetId()); + + if (!unloadAll) + { + // Finish creature moves, remove and delete all creatures with delayed remove before moving to respawn grids + // Must know real mob position before move + MoveAllCreaturesInMoveList(); + MoveAllGameObjectsInMoveList(); + + // move creatures to respawn grids if this is diff.grid or to remove list + ObjectGridEvacuator worker; + TypeContainerVisitor visitor(worker); + ngrid.VisitAllGrids(visitor); + + // Finish creature moves, remove and delete all creatures with delayed remove before unload + MoveAllCreaturesInMoveList(); + MoveAllGameObjectsInMoveList(); + } + + { + ObjectGridCleaner worker; + TypeContainerVisitor visitor(worker); + ngrid.VisitAllGrids(visitor); + } + + RemoveAllObjectsInRemoveList(); + + { + ObjectGridUnloader worker; + TypeContainerVisitor visitor(worker); + ngrid.VisitAllGrids(visitor); + } + + ASSERT(i_objectsToRemove.empty()); + + delete& ngrid; + setNGrid(nullptr, x, y); } - - RemoveAllObjectsInRemoveList(); - - { - ObjectGridUnloader worker; - TypeContainerVisitor visitor(worker); - ngrid.VisitAllGrids(visitor); - } - - ASSERT(i_objectsToRemove.empty()); - - delete &ngrid; - setNGrid(nullptr, x, y); - int gx = (MAX_NUMBER_OF_GRIDS - 1) - x; int gy = (MAX_NUMBER_OF_GRIDS - 1) - y; - if (i_InstanceId == 0) + // delete grid map, but don't delete if it is from parent map (and thus only reference) + //+++if (GridMaps[gx][gy]) don't check for GridMaps[gx][gy], we might have to unload vmaps { - if (GridMaps[gx][gy]) + if (i_InstanceId == 0) { - GridMaps[gx][gy]->unloadData(); - delete GridMaps[gx][gy]; + if (GridMaps[gx][gy]) + { + GridMaps[gx][gy]->unloadData(); + delete GridMaps[gx][gy]; + } + VMAP::VMapFactory::createOrGetVMapMgr()->unloadMap(GetId(), gx, gy); + MMAP::MMapFactory::createOrGetMMapMgr()->unloadMap(GetId(), gx, gy); } - // x and y are swapped - VMAP::VMapFactory::createOrGetVMapMgr()->unloadMap(GetId(), gx, gy); - MMAP::MMapFactory::createOrGetMMapMgr()->unloadMap(GetId(), gx, gy); + else + ((MapInstanced*)m_parentMap)->RemoveGridMapReference(GridCoord(gx, gy)); + + GridMaps[gx][gy] = nullptr; } - - GridMaps[gx][gy] = nullptr; - LOG_DEBUG("maps", "Unloading grid[{}, {}] for map {} finished", x, y, GetId()); return true; } @@ -1283,7 +1705,7 @@ void Map::UnloadAll() { NGridType& grid(*i->GetSource()); ++i; - UnloadGrid(grid); // deletes the grid and removes it from the GridRefMgr + UnloadGrid(grid, true); // deletes the grid and removes it from the GridRefMgr } // pussywizard: crashfix, some npc can be left on transport (not a default passenger) @@ -2645,6 +3067,20 @@ void Map::DelayedUpdate(const uint32 t_diff) } RemoveAllObjectsInRemoveList(); + + // Don't unload grids if it's battleground, since we may have manually added GOs, creatures, those doesn't load from DB at grid re-load ! + // This isn't really bother us, since as soon as we have instanced BG-s, the whole map unloads as the BG gets ended + if (!IsBattlegroundOrArena()) + { + for (GridRefMgr::iterator i = GridRefMgr::begin(); i != GridRefMgr::end();) + { + NGridType* grid = i->GetSource(); + GridInfo* info = i->GetSource()->getGridInfoRef(); + ++i; // The update might delete the map and we need the next map before the iterator gets invalid + ASSERT(grid->GetGridState() >= 0 && grid->GetGridState() < MAX_GRID_STATE); + si_GridStates[grid->GetGridState()]->Update(*this, *grid, *info, t_diff); + } + } } void Map::AddObjectToRemoveList(WorldObject* obj) @@ -2704,7 +3140,6 @@ void Map::RemoveAllObjectsInRemoveList() { std::unordered_set::iterator itr = i_objectsToRemove.begin(); WorldObject* obj = *itr; - i_objectsToRemove.erase(itr); switch (obj->GetTypeId()) { @@ -2736,6 +3171,8 @@ void Map::RemoveAllObjectsInRemoveList() LOG_ERROR("maps", "Non-grid object (TypeId: {}) is in grid object remove list, ignored.", obj->GetTypeId()); break; } + + i_objectsToRemove.erase(itr); } //LOG_DEBUG("maps", "Object remover 2 check."); @@ -2756,6 +3193,43 @@ void Map::SendToPlayers(WorldPacket const* data) const itr->GetSource()->GetSession()->SendPacket(data); } +bool Map::ActiveObjectsNearGrid(NGridType const& ngrid) const +{ + CellCoord cell_min(ngrid.getX() * MAX_NUMBER_OF_CELLS, ngrid.getY() * MAX_NUMBER_OF_CELLS); + CellCoord cell_max(cell_min.x_coord + MAX_NUMBER_OF_CELLS, cell_min.y_coord + MAX_NUMBER_OF_CELLS); + + //we must find visible range in cells so we unload only non-visible cells... + float viewDist = GetVisibilityRange(); + int cell_range = (int)ceilf(viewDist / SIZE_OF_GRID_CELL) + 1; + + cell_min.dec_x(cell_range); + cell_min.dec_y(cell_range); + cell_max.inc_x(cell_range); + cell_max.inc_y(cell_range); + + for (MapRefMgr::const_iterator iter = m_mapRefMgr.begin(); iter != m_mapRefMgr.end(); ++iter) + { + Player* player = iter->GetSource(); + + CellCoord p = Acore::ComputeCellCoord(player->GetPositionX(), player->GetPositionY()); + if ((cell_min.x_coord <= p.x_coord && p.x_coord <= cell_max.x_coord) && + (cell_min.y_coord <= p.y_coord && p.y_coord <= cell_max.y_coord)) + return true; + } + + for (ActiveNonPlayers::const_iterator iter = m_activeNonPlayers.begin(); iter != m_activeNonPlayers.end(); ++iter) + { + WorldObject* obj = *iter; + + CellCoord p = Acore::ComputeCellCoord(obj->GetPositionX(), obj->GetPositionY()); + if ((cell_min.x_coord <= p.x_coord && p.x_coord <= cell_max.x_coord) && + (cell_min.y_coord <= p.y_coord && p.y_coord <= cell_max.y_coord)) + return true; + } + + return false; +} + template void Map::AddToActive(T* obj) { @@ -2766,6 +3240,22 @@ template <> void Map::AddToActive(Creature* c) { AddToActiveHelper(c); + + // also not allow unloading spawn grid to prevent creating creature clone at load + if (!c->IsPet() && c->GetSpawnId()) + { + float x, y, z; + c->GetRespawnPosition(x, y, z); + GridCoord p = Acore::ComputeGridCoord(x, y); + if (getNGrid(p.x_coord, p.y_coord)) + getNGrid(p.x_coord, p.y_coord)->incUnloadActiveLock(); + else + { + GridCoord p2 = Acore::ComputeGridCoord(c->GetPositionX(), c->GetPositionY()); + LOG_ERROR("maps", "Active creature {} added to grid[{}, {}] but spawn grid[{}, {}] was not loaded.", + c->GetGUID().ToString().c_str(), p.x_coord, p.y_coord, p2.x_coord, p2.y_coord); + } + } } template<> @@ -2790,6 +3280,22 @@ template <> void Map::RemoveFromActive(Creature* c) { RemoveFromActiveHelper(c); + + // also allow unloading spawn grid + if (!c->IsPet() && c->GetSpawnId()) + { + float x, y, z; + c->GetRespawnPosition(x, y, z); + GridCoord p = Acore::ComputeGridCoord(x, y); + if (getNGrid(p.x_coord, p.y_coord)) + getNGrid(p.x_coord, p.y_coord)->decUnloadActiveLock(); + else + { + GridCoord p2 = Acore::ComputeGridCoord(c->GetPositionX(), c->GetPositionY()); + LOG_ERROR("maps", "Active creature {} removed from grid[{}, {}] but spawn grid[{}, {}] was not loaded.", + c->GetGUID().ToString().c_str(), p.x_coord, p.y_coord, p2.x_coord, p2.y_coord); + } + } } template<> @@ -2816,8 +3322,8 @@ template void Map::RemoveFromMap(DynamicObject*, bool); /* ******* Dungeon Instance Maps ******* */ -InstanceMap::InstanceMap(uint32 id, uint32 InstanceId, uint8 SpawnMode, Map* _parent) - : Map(id, InstanceId, SpawnMode, _parent), +InstanceMap::InstanceMap(uint32 id, std::chrono::seconds expiry, uint32 InstanceId, uint8 SpawnMode, Map* _parent) + : Map(id, expiry, InstanceId, SpawnMode, _parent), m_resetAfterUnload(false), m_unloadWhenEmpty(false), instance_data(nullptr), i_script_id(0) { @@ -2846,6 +3352,7 @@ void InstanceMap::InitVisibilityDistance() { //init visibility distance for instances m_VisibleDistance = World::GetMaxVisibleDistanceInInstances(); + m_VisibilityNotifyPeriod = World::GetVisibilityNotifyPeriodInInstances(); // pussywizard: this CAN NOT exceed MAX_VISIBILITY_DISTANCE switch (GetId()) @@ -3225,8 +3732,8 @@ uint32 InstanceMap::GetMaxResetDelay() const /* ******* Battleground Instance Maps ******* */ -BattlegroundMap::BattlegroundMap(uint32 id, uint32 InstanceId, Map* _parent, uint8 spawnMode) - : Map(id, InstanceId, spawnMode, _parent), m_bg(nullptr) +BattlegroundMap::BattlegroundMap(uint32 id, std::chrono::seconds expiry, uint32 InstanceId, Map* _parent, uint8 spawnMode) + : Map(id, expiry, InstanceId, spawnMode, _parent), m_bg(nullptr) { //lets initialize visibility distance for BG/Arenas BattlegroundMap::InitVisibilityDistance(); @@ -3246,6 +3753,7 @@ void BattlegroundMap::InitVisibilityDistance() { //init visibility distance for BG/Arenas m_VisibleDistance = World::GetMaxVisibleDistanceInBGArenas(); + m_VisibilityNotifyPeriod = World::GetVisibilityNotifyPeriodInBGArenas(); if (IsBattleArena()) // pussywizard: start with 30yd visibility range on arenas to ensure players can't get informations about the opponents in any way m_VisibleDistance = 30.0f; diff --git a/src/server/game/Maps/Map.h b/src/server/game/Maps/Map.h index 0bf6b9c18..9b607a1af 100644 --- a/src/server/game/Maps/Map.h +++ b/src/server/game/Maps/Map.h @@ -71,7 +71,6 @@ namespace VMAP namespace Acore { struct ObjectUpdater; - struct LargeObjectUpdater; } struct ScriptAction @@ -312,7 +311,7 @@ class Map : public GridRefMgr { friend class MapReference; public: - Map(uint32 id, uint32 InstanceId, uint8 SpawnMode, Map* _parent = nullptr); + Map(uint32 id, std::chrono::seconds, uint32 InstanceId, uint8 SpawnMode, Map* _parent = nullptr); ~Map() override; [[nodiscard]] MapEntry const* GetEntry() const { return i_mapEntry; } @@ -337,13 +336,7 @@ public: template void RemoveFromMap(T*, bool); void VisitNearbyCellsOf(WorldObject* obj, TypeContainerVisitor& gridVisitor, - TypeContainerVisitor& worldVisitor, - TypeContainerVisitor& largeGridVisitor, - TypeContainerVisitor& largeWorldVisitor); - void VisitNearbyCellsOfPlayer(Player* player, TypeContainerVisitor& gridVisitor, - TypeContainerVisitor& worldVisitor, - TypeContainerVisitor& largeGridVisitor, - TypeContainerVisitor& largeWorldVisitor); + TypeContainerVisitor& worldVisitor); virtual void Update(const uint32, const uint32, bool thread = true); @@ -362,7 +355,7 @@ public: [[nodiscard]] bool IsRemovalGrid(float x, float y) const { GridCoord p = Acore::ComputeGridCoord(x, y); - return !getNGrid(p.x_coord, p.y_coord); + return !getNGrid(p.x_coord, p.y_coord) || getNGrid(p.x_coord, p.y_coord)->GetGridState() == GRID_STATE_REMOVAL; } [[nodiscard]] bool IsGridLoaded(float x, float y) const @@ -370,13 +363,26 @@ public: return IsGridLoaded(Acore::ComputeGridCoord(x, y)); } + bool GetUnloadLock(GridCoord const& p) const { return getNGrid(p.x_coord, p.y_coord)->getUnloadLock(); } + void SetUnloadLock(GridCoord const& p, bool on) { getNGrid(p.x_coord, p.y_coord)->setUnloadExplicitLock(on); } void LoadGrid(float x, float y); void LoadAllCells(); - bool UnloadGrid(NGridType& ngrid); + bool UnloadGrid(NGridType& ngrid, bool pForce); + void GridMarkNoUnload(uint32 x, uint32 y); + void GridUnmarkNoUnload(uint32 x, uint32 y); virtual void UnloadAll(); + void ResetGridExpiry(NGridType& grid, float factor = 1) const + { + grid.ResetTimeTracker(std::chrono::duration_cast(i_gridExpiry * factor)); + } + + [[nodiscard]] std::chrono::seconds GetGridExpiry(void) const { return i_gridExpiry; } [[nodiscard]] uint32 GetId() const { return i_mapEntry->MapID; } + static void InitStateMachine(); + static void DeleteStateMachine(); + static bool ExistMap(uint32 mapid, int gx, int gy); static bool ExistVMap(uint32 mapid, int gx, int gy); @@ -415,6 +421,10 @@ public: void RemoveAllObjectsInRemoveList(); virtual void RemoveAllPlayers(); + // used only in MoveAllCreaturesInMoveList and ObjectGridUnloader + bool CreatureRespawnRelocation(Creature* c, bool diffGridOnly); + bool GameObjectRespawnRelocation(GameObject* go, bool diffGridOnly); + [[nodiscard]] uint32 GetInstanceId() const { return i_InstanceId; } [[nodiscard]] uint8 GetSpawnMode() const { return (i_spawnMode); } @@ -468,12 +478,10 @@ public: void resetMarkedCells() { marked_cells.reset(); } bool isCellMarked(uint32 pCellId) { return marked_cells.test(pCellId); } void markCell(uint32 pCellId) { marked_cells.set(pCellId); } - void resetMarkedCellsLarge() { marked_cells_large.reset(); } - bool isCellMarkedLarge(uint32 pCellId) { return marked_cells_large.test(pCellId); } - void markCellLarge(uint32 pCellId) { marked_cells_large.set(pCellId); } [[nodiscard]] bool HavePlayers() const { return !m_mapRefMgr.IsEmpty(); } [[nodiscard]] uint32 GetPlayersCountExceptGMs() const; + [[nodiscard]] bool ActiveObjectsNearGrid(NGridType const& ngrid) const; void AddWorldObject(WorldObject* obj) { i_worldObjects.insert(obj); } void RemoveWorldObject(WorldObject* obj) { i_worldObjects.erase(obj); } @@ -660,20 +668,30 @@ private: // Load MMap Data void LoadMMap(int gx, int gy); + bool CreatureCellRelocation(Creature* creature, Cell new_cell); + bool GameObjectCellRelocation(GameObject* go, Cell new_cell); + bool DynamicObjectCellRelocation(DynamicObject* go, Cell new_cell); + template void InitializeObject(T* obj); - void AddCreatureToMoveList(Creature* c); + void AddCreatureToMoveList(Creature* c, float x, float y, float z, float ang); void RemoveCreatureFromMoveList(Creature* c); - void AddGameObjectToMoveList(GameObject* go); + void AddGameObjectToMoveList(GameObject* go, float x, float y, float z, float ang); void RemoveGameObjectFromMoveList(GameObject* go); - void AddDynamicObjectToMoveList(DynamicObject* go); + void AddDynamicObjectToMoveList(DynamicObject* go, float x, float y, float z, float ang); void RemoveDynamicObjectFromMoveList(DynamicObject* go); + bool _creatureToMoveLock; std::vector _creaturesToMove; + + bool _gameObjectsToMoveLock; std::vector _gameObjectsToMove; + + bool _dynamicObjectsToMoveLock; std::vector _dynamicObjectsToMove; [[nodiscard]] bool IsGridLoaded(const GridCoord&) const; void EnsureGridCreated_i(const GridCoord&); + void EnsureGridLoadedForActiveObject(Cell const&, WorldObject* object); void buildNGridLinkage(NGridType* pNGridType) { pNGridType->link(this); } @@ -695,6 +713,8 @@ private: void SendObjectUpdates(); protected: + void SetUnloadReferenceLock(GridCoord const& p, bool on) { getNGrid(p.x_coord, p.y_coord)->setUnloadReferenceLock(on); } + std::mutex Lock; std::mutex GridLock; std::shared_mutex MMapLock; @@ -710,6 +730,8 @@ protected: MapRefMgr m_mapRefMgr; MapRefMgr::iterator m_mapRefIter; + int32 m_VisibilityNotifyPeriod; + typedef std::set ActiveNonPlayers; ActiveNonPlayers m_activeNonPlayers; ActiveNonPlayers::iterator m_activeNonPlayersIter; @@ -728,6 +750,8 @@ private: void _ScriptProcessDoor(Object* source, Object* target, const ScriptInfo* scriptInfo) const; GameObject* _FindGameObject(WorldObject* pWorldObject, ObjectGuid::LowType guid) const; + std::chrono::seconds i_gridExpiry; + //used for fast base_map (e.g. MapInstanced class object) search for //InstanceMaps and BattlegroundMaps... Map* m_parentMap; @@ -735,7 +759,10 @@ private: NGridType* i_grids[MAX_NUMBER_OF_GRIDS][MAX_NUMBER_OF_GRIDS]; GridMap* GridMaps[MAX_NUMBER_OF_GRIDS][MAX_NUMBER_OF_GRIDS]; std::bitset marked_cells; - std::bitset marked_cells_large; + + //these functions used to process player/mob aggro reactions and + //visibility calculations. Highly optimized for massive calculations + void ProcessRelocationNotifies(uint32 diff); bool i_scriptLock; std::unordered_set i_objectsToRemove; @@ -812,7 +839,7 @@ enum InstanceResetMethod class InstanceMap : public Map { public: - InstanceMap(uint32 id, uint32 InstanceId, uint8 SpawnMode, Map* _parent); + InstanceMap(uint32 id, std::chrono::seconds, uint32 InstanceId, uint8 SpawnMode, Map* _parent); ~InstanceMap() override; bool AddPlayerToMap(Player*) override; void RemovePlayerFromMap(Player*, bool) override; @@ -846,7 +873,7 @@ private: class BattlegroundMap : public Map { public: - BattlegroundMap(uint32 id, uint32 InstanceId, Map* _parent, uint8 spawnMode); + BattlegroundMap(uint32 id, std::chrono::seconds, uint32 InstanceId, Map* _parent, uint8 spawnMode); ~BattlegroundMap() override; bool AddPlayerToMap(Player*) override; diff --git a/src/server/game/Maps/MapInstanced.cpp b/src/server/game/Maps/MapInstanced.cpp index 12c6acf6b..2ce5bbfbc 100644 --- a/src/server/game/Maps/MapInstanced.cpp +++ b/src/server/game/Maps/MapInstanced.cpp @@ -26,10 +26,10 @@ #include "ScriptMgr.h" #include "VMapFactory.h" -MapInstanced::MapInstanced(uint32 id) : Map(id, 0, DUNGEON_DIFFICULTY_NORMAL) +MapInstanced::MapInstanced(uint32 id, std::chrono::seconds expiry) : Map(id, expiry, 0, DUNGEON_DIFFICULTY_NORMAL) { - // initialize instanced maps list - m_InstancedMaps.clear(); + // fill with zero + memset(&GridMapReference, 0, MAX_NUMBER_OF_GRIDS * MAX_NUMBER_OF_GRIDS * sizeof(uint16)); } void MapInstanced::InitVisibilityDistance() @@ -203,7 +203,7 @@ InstanceMap* MapInstanced::CreateInstance(uint32 InstanceId, InstanceSave* save, LOG_DEBUG("maps", "MapInstanced::CreateInstance: {} map instance {} for {} created with difficulty {}", save ? "" : "new ", InstanceId, GetId(), difficulty ? "heroic" : "normal"); - InstanceMap* map = new InstanceMap(GetId(), InstanceId, difficulty, this); + InstanceMap* map = new InstanceMap(GetId(), GetGridExpiry(), InstanceId, difficulty, this); ASSERT(map->IsDungeon()); map->LoadRespawnTimes(); @@ -237,7 +237,7 @@ BattlegroundMap* MapInstanced::CreateBattleground(uint32 InstanceId, Battlegroun else spawnMode = REGULAR_DIFFICULTY; - BattlegroundMap* map = new BattlegroundMap(GetId(), InstanceId, this, spawnMode); + BattlegroundMap* map = new BattlegroundMap(GetId(), GetGridExpiry(), InstanceId, this, spawnMode); ASSERT(map->IsBattlegroundOrArena()); map->SetBG(bg); bg->SetBgMap(map); diff --git a/src/server/game/Maps/MapInstanced.h b/src/server/game/Maps/MapInstanced.h index f08c5687a..fd86b8fa6 100644 --- a/src/server/game/Maps/MapInstanced.h +++ b/src/server/game/Maps/MapInstanced.h @@ -28,7 +28,7 @@ class MapInstanced : public Map public: using InstancedMaps = std::unordered_map; - MapInstanced(uint32 id); + MapInstanced(uint32 id, std::chrono::seconds expiry); ~MapInstanced() override {} // functions overwrite Map versions @@ -46,6 +46,19 @@ public: } bool DestroyInstance(InstancedMaps::iterator& itr); + void AddGridMapReference(GridCoord const& p) + { + ++GridMapReference[p.x_coord][p.y_coord]; + SetUnloadReferenceLock(GridCoord((MAX_NUMBER_OF_GRIDS - 1) - p.x_coord, (MAX_NUMBER_OF_GRIDS - 1) - p.y_coord), true); + } + + void RemoveGridMapReference(GridCoord const& p) + { + --GridMapReference[p.x_coord][p.y_coord]; + if (!GridMapReference[p.x_coord][p.y_coord]) + SetUnloadReferenceLock(GridCoord((MAX_NUMBER_OF_GRIDS - 1) - p.x_coord, (MAX_NUMBER_OF_GRIDS - 1) - p.y_coord), false); + } + InstancedMaps& GetInstancedMaps() { return m_InstancedMaps; } void InitVisibilityDistance() override; @@ -54,5 +67,7 @@ private: BattlegroundMap* CreateBattleground(uint32 InstanceId, Battleground* bg); InstancedMaps m_InstancedMaps; + + uint16 GridMapReference[MAX_NUMBER_OF_GRIDS][MAX_NUMBER_OF_GRIDS]; }; #endif diff --git a/src/server/game/Maps/MapMgr.cpp b/src/server/game/Maps/MapMgr.cpp index 9e89d64e2..980b7898f 100644 --- a/src/server/game/Maps/MapMgr.cpp +++ b/src/server/game/Maps/MapMgr.cpp @@ -36,6 +36,7 @@ MapMgr::MapMgr() { + i_gridCleanUpDelay = sWorld->getIntConfig(CONFIG_INTERVAL_GRIDCLEAN); i_timer[3].SetInterval(sWorld->getIntConfig(CONFIG_INTERVAL_MAPUPDATE)); mapUpdateStep = 0; _nextInstanceId = 0; @@ -53,6 +54,8 @@ MapMgr* MapMgr::instance() void MapMgr::Initialize() { + Map::InitStateMachine(); + int num_threads(sWorld->getIntConfig(CONFIG_NUMTHREADS)); // Start mtmaps if needed @@ -81,10 +84,10 @@ Map* MapMgr::CreateBaseMap(uint32 id) ASSERT(entry); if (entry->Instanceable()) - map = new MapInstanced(id); + map = new MapInstanced(id, std::chrono::seconds(i_gridCleanUpDelay)); else { - map = new Map(id, 0, REGULAR_DIFFICULTY); + map = new Map(id, std::chrono::seconds(i_gridCleanUpDelay), 0, REGULAR_DIFFICULTY); map->LoadRespawnTimes(); map->LoadCorpseData(); } @@ -333,6 +336,8 @@ void MapMgr::UnloadAll() if (m_updater.activated()) m_updater.deactivate(); + + Map::DeleteStateMachine(); } void MapMgr::GetNumInstances(uint32& dungeons, uint32& battlegrounds, uint32& arenas) diff --git a/src/server/game/Maps/MapMgr.h b/src/server/game/Maps/MapMgr.h index 828fe548e..f8f86e78e 100644 --- a/src/server/game/Maps/MapMgr.h +++ b/src/server/game/Maps/MapMgr.h @@ -24,6 +24,7 @@ #include "MapInstanced.h" #include "MapUpdater.h" #include "Object.h" +#include "GridStates.h" #include @@ -73,6 +74,14 @@ public: void Initialize(void); void Update(uint32); + void SetGridCleanUpDelay(uint32 t) + { + if (t < MIN_GRID_DELAY) + i_gridCleanUpDelay = MIN_GRID_DELAY; + else + i_gridCleanUpDelay = t; + } + void SetMapUpdateInterval(uint32 t) { if (t < MIN_MAP_UPDATE_DELAY) @@ -170,6 +179,7 @@ private: MapMgr& operator=(const MapMgr&); std::mutex Lock; + uint32 i_gridCleanUpDelay; MapMapType i_maps; IntervalTimer i_timer[4]; // continents, bgs/arenas, instances, total from the beginning uint8 mapUpdateStep; diff --git a/src/server/game/Quests/QuestDef.cpp b/src/server/game/Quests/QuestDef.cpp index d14ddb3c3..aba9f1509 100644 --- a/src/server/game/Quests/QuestDef.cpp +++ b/src/server/game/Quests/QuestDef.cpp @@ -38,7 +38,7 @@ Quest::Quest(Field* questRecord) Type = questRecord[5].Get(); SuggestedPlayers = questRecord[6].Get(); TimeAllowed = questRecord[7].Get(); - AllowableRaces = questRecord[8].Get(); + AllowableRaces = questRecord[8].Get(); RequiredFactionId1 = questRecord[9].Get(); RequiredFactionId2 = questRecord[10].Get(); RequiredFactionValue1 = questRecord[11].Get(); diff --git a/src/server/game/Scripting/ScriptDefines/AllCreatureScript.cpp b/src/server/game/Scripting/ScriptDefines/AllCreatureScript.cpp index 896191242..ab588dcdd 100644 --- a/src/server/game/Scripting/ScriptDefines/AllCreatureScript.cpp +++ b/src/server/game/Scripting/ScriptDefines/AllCreatureScript.cpp @@ -48,6 +48,15 @@ void ScriptMgr::OnCreatureSaveToDB(Creature* creature) }); } +void ScriptMgr::OnBeforeCreatureSelectLevel(const CreatureTemplate* cinfo, Creature* creature, uint8& level) +{ + ExecuteScript([&](AllCreatureScript* script) + { + script->OnBeforeCreatureSelectLevel(cinfo, creature, level); + }); + +} + void ScriptMgr::Creature_SelectLevel(const CreatureTemplate* cinfo, Creature* creature) { ExecuteScript([&](AllCreatureScript* script) diff --git a/src/server/game/Scripting/ScriptDefines/GameObjectScript.cpp b/src/server/game/Scripting/ScriptDefines/GameObjectScript.cpp index 07b614f9c..54dc08228 100644 --- a/src/server/game/Scripting/ScriptDefines/GameObjectScript.cpp +++ b/src/server/game/Scripting/ScriptDefines/GameObjectScript.cpp @@ -160,6 +160,21 @@ void ScriptMgr::OnGameObjectDamaged(GameObject* go, Player* player) } } +void ScriptMgr::OnGameObjectModifyHealth(GameObject* go, Unit* attackerOrHealer, int32& change, SpellInfo const* spellInfo) +{ + ASSERT(go); + + ExecuteScript([&](AllGameObjectScript* script) + { + script->OnGameObjectModifyHealth(go, attackerOrHealer, change, spellInfo); + }); + + if (auto tempScript = ScriptRegistry::GetScriptById(go->GetScriptId())) + { + tempScript->OnModifyHealth(go, attackerOrHealer, change, spellInfo); + } +} + void ScriptMgr::OnGameObjectLootStateChanged(GameObject* go, uint32 state, Unit* unit) { ASSERT(go); diff --git a/src/server/game/Scripting/ScriptDefines/GlobalScript.cpp b/src/server/game/Scripting/ScriptDefines/GlobalScript.cpp index 74b1ddbe4..4206c0618 100644 --- a/src/server/game/Scripting/ScriptDefines/GlobalScript.cpp +++ b/src/server/game/Scripting/ScriptDefines/GlobalScript.cpp @@ -55,6 +55,14 @@ void ScriptMgr::OnAfterRefCount(Player const* player, Loot& loot, bool canRate, }); } +void ScriptMgr::OnAfterCalculateLootGroupAmount(Player const* player, Loot& loot, uint16 lootMode, uint32& groupAmount, LootStore const& store) +{ + ExecuteScript([&](GlobalScript* script) + { + script->OnAfterCalculateLootGroupAmount(player, loot, lootMode, groupAmount, store); + }); +} + void ScriptMgr::OnBeforeDropAddItem(Player const* player, Loot& loot, bool canRate, uint16 lootMode, LootStoreItem* LootStoreItem, LootStore const& store) { ExecuteScript([&](GlobalScript* script) diff --git a/src/server/game/Scripting/ScriptMgr.h b/src/server/game/Scripting/ScriptMgr.h index fb0d4e11c..fe5154723 100644 --- a/src/server/game/Scripting/ScriptMgr.h +++ b/src/server/game/Scripting/ScriptMgr.h @@ -556,6 +556,9 @@ public: // Called from End of Creature Update. virtual void OnAllCreatureUpdate(Creature* /*creature*/, uint32 /*diff*/) { } + // Called just before the level of the creature is set. + virtual void OnBeforeCreatureSelectLevel(const CreatureTemplate* /*cinfo*/, Creature* /*creature*/, uint8& /*level*/) { } + // Called from End of Creature SelectLevel. virtual void Creature_SelectLevel(const CreatureTemplate* /*cinfo*/, Creature* /*creature*/) { } @@ -706,6 +709,9 @@ public: // Called when the game object is damaged (destructible buildings only). virtual void OnGameObjectDamaged(GameObject* /*go*/, Player* /*player*/) { } + // Called when the health of a game object is modified (destructible buildings only). + virtual void OnGameObjectModifyHealth(GameObject* /*go*/, Unit* /*attackerOrHealer*/, int32& /*change*/, SpellInfo const* /*spellInfo*/) { } + // Called when the game object loot state is changed. virtual void OnGameObjectLootStateChanged(GameObject* /*go*/, uint32 /*state*/, Unit* /*unit*/) { } @@ -788,6 +794,9 @@ public: // Called when the game object is damaged (destructible buildings only). virtual void OnDamaged(GameObject* /*go*/, Player* /*player*/) { } + // Called when the health of a game object is modified (destructible buildings only). + virtual void OnModifyHealth(GameObject* /*go*/, Unit* /*attackerOrHealer*/, int32& /*change*/, SpellInfo const* /*spellInfo*/) { } + // Called when the game object loot state is changed. virtual void OnLootStateChanged(GameObject* /*go*/, uint32 /*state*/, Unit* /*unit*/) { } @@ -1634,6 +1643,7 @@ public: // loot virtual void OnAfterRefCount(Player const* /*player*/, LootStoreItem* /*LootStoreItem*/, Loot& /*loot*/, bool /*canRate*/, uint16 /*lootMode*/, uint32& /*maxcount*/, LootStore const& /*store*/) { } + virtual void OnAfterCalculateLootGroupAmount(Player const* /*player*/, Loot& /*loot*/, uint16 /*lootMode*/, uint32& /*groupAmount*/, LootStore const& /*store*/) { } virtual void OnBeforeDropAddItem(Player const* /*player*/, Loot& /*loot*/, bool /*canRate*/, uint16 /*lootMode*/, LootStoreItem* /*LootStoreItem*/, LootStore const& /*store*/) { } virtual bool OnItemRoll(Player const* /*player*/, LootStoreItem const* /*LootStoreItem*/, float& /*chance*/, Loot& /*loot*/, LootStore const& /*store*/) { return true; }; virtual bool OnBeforeLootEqualChanced(Player const* /*player*/, LootStoreItemList /*EqualChanced*/, Loot& /*loot*/, LootStore const& /*store*/) { return true; } @@ -2268,6 +2278,7 @@ public: /* GameObjectScript */ uint32 GetDialogStatus(Player* player, GameObject* go); void OnGameObjectDestroyed(GameObject* go, Player* player); void OnGameObjectDamaged(GameObject* go, Player* player); + void OnGameObjectModifyHealth(GameObject* go, Unit* attackerOrHealer, int32& change, SpellInfo const* spellInfo); void OnGameObjectLootStateChanged(GameObject* go, uint32 state, Unit* unit); void OnGameObjectStateChanged(GameObject* go, uint32 state); void OnGameObjectUpdate(GameObject* go, uint32 diff); @@ -2538,6 +2549,7 @@ public: /* GlobalScript */ void OnGlobalMirrorImageDisplayItem(Item const* item, uint32& display); void OnBeforeUpdateArenaPoints(ArenaTeam* at, std::map& ap); void OnAfterRefCount(Player const* player, Loot& loot, bool canRate, uint16 lootMode, LootStoreItem* LootStoreItem, uint32& maxcount, LootStore const& store); + void OnAfterCalculateLootGroupAmount(Player const* player, Loot& loot, uint16 lootMode, uint32& groupAmount, LootStore const& store); void OnBeforeDropAddItem(Player const* player, Loot& loot, bool canRate, uint16 lootMode, LootStoreItem* LootStoreItem, LootStore const& store); bool OnItemRoll(Player const* player, LootStoreItem const* LootStoreItem, float& chance, Loot& loot, LootStore const& store); bool OnBeforeLootEqualChanced(Player const* player, LootStoreItemList EqualChanced, Loot& loot, LootStore const& store); @@ -2589,6 +2601,7 @@ public: /* MovementHandlerScript */ public: /* AllCreatureScript */ //listener function (OnAllCreatureUpdate) is called by OnCreatureUpdate //void OnAllCreatureUpdate(Creature* creature, uint32 diff); + void OnBeforeCreatureSelectLevel(const CreatureTemplate* cinfo, Creature* creature, uint8& level); void Creature_SelectLevel(const CreatureTemplate* cinfo, Creature* creature); void OnCreatureSaveToDB(Creature* creature); diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index 27a3b8971..431897eeb 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -381,8 +381,8 @@ pAuraEffectHandler AuraEffectHandler[TOTAL_AURAS] = AuraEffect::AuraEffect(Aura* base, uint8 effIndex, int32* baseAmount, Unit* caster): m_base(base), m_spellInfo(base->GetSpellInfo()), - m_baseAmount(baseAmount ? * baseAmount : m_spellInfo->Effects[effIndex].BasePoints), m_critChance(0), - m_oldAmount(0), m_isAuraEnabled(true), m_channelData(nullptr), m_spellmod(nullptr), m_periodicTimer(0), m_tickNumber(0), m_effIndex(effIndex), + m_baseAmount(baseAmount ? * baseAmount : m_spellInfo->Effects[effIndex].BasePoints), m_dieSides(m_spellInfo->Effects[effIndex].DieSides), + m_critChance(0), m_oldAmount(0), m_isAuraEnabled(true), m_channelData(nullptr), m_spellmod(nullptr), m_periodicTimer(0), m_tickNumber(0), m_effIndex(effIndex), m_canBeRecalculated(true), m_isPeriodic(false) { CalculatePeriodic(caster, true, false); @@ -1602,8 +1602,8 @@ void AuraEffect::HandleModInvisibility(AuraApplication const* aurApp, uint8 mode target->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_IMMUNE_OR_LOST_SELECTION); } - target->UpdateObjectVisibility(target->GetTypeId() == TYPEID_PLAYER || target->GetOwnerGUID().IsPlayer() || target->GetMap()->Instanceable(), true); - target->bRequestForcedVisibilityUpdate = false; + if (target->IsInWorld()) + target->UpdateObjectVisibility(); } void AuraEffect::HandleModStealthDetect(AuraApplication const* aurApp, uint8 mode, bool apply) const @@ -1676,8 +1676,8 @@ void AuraEffect::HandleModStealth(AuraApplication const* aurApp, uint8 mode, boo target->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_IMMUNE_OR_LOST_SELECTION); } - target->UpdateObjectVisibility(target->GetTypeId() == TYPEID_PLAYER || target->GetOwnerGUID().IsPlayer() || target->GetMap()->Instanceable(), true); - target->bRequestForcedVisibilityUpdate = false; + if (target->IsInWorld()) + target->UpdateObjectVisibility(); } void AuraEffect::HandleModStealthLevel(AuraApplication const* aurApp, uint8 mode, bool apply) const @@ -1841,7 +1841,6 @@ void AuraEffect::HandlePhase(AuraApplication const* aurApp, uint8 mode, bool app if (!target->GetMap()->Instanceable()) { target->UpdateObjectVisibility(false); - target->m_last_notify_position.Relocate(-5000.0f, -5000.0f, -5000.0f); } else target->UpdateObjectVisibility(); @@ -6299,6 +6298,13 @@ void AuraEffect::HandlePeriodicDamageAurasTick(Unit* target, Unit* caster) const // ignore non positive values (can be result apply spellmods to aura damage uint32 damage = std::max(GetAmount(), 0); + // If the damage is percent-max-health based, calculate damage before the Modify hook + if (GetAuraType() == SPELL_AURA_PERIODIC_DAMAGE_PERCENT) + { + // xinef: ceil obtained value, it may happen that 10 ticks for 10% damage may not kill owner + damage = uint32(std::ceil(CalculatePct(target->GetMaxHealth(), damage))); + } + // Script Hook For HandlePeriodicDamageAurasTick -- Allow scripts to change the Damage pre class mitigation calculations sScriptMgr->ModifyPeriodicDamageAurasTick(target, caster, damage, GetSpellInfo()); @@ -6330,8 +6336,6 @@ void AuraEffect::HandlePeriodicDamageAurasTick(Unit* target, Unit* caster) const // 5..8 ticks have normal tick damage } } - else // xinef: ceil obtained value, it may happen that 10 ticks for 10% damage may not kill owner - damage = uint32(std::ceil(CalculatePct(target->GetMaxHealth(), damage))); // calculate crit chance bool crit = false; diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.h b/src/server/game/Spells/Auras/SpellAuraEffects.h index b85984341..6f0c05a27 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.h +++ b/src/server/game/Spells/Auras/SpellAuraEffects.h @@ -55,6 +55,7 @@ public: uint32 GetId() const; uint32 GetEffIndex() const { return m_effIndex; } int32 GetBaseAmount() const { return m_baseAmount; } + int32 GetDieSides() const { return m_dieSides; } int32 GetAmplitude() const { return m_amplitude; } int32 GetMiscValueB() const; @@ -121,6 +122,7 @@ private: SpellInfo const* const m_spellInfo; int32 const m_baseAmount; + int32 const m_dieSides; bool m_applyResilience; uint8 m_casterLevel; diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 721785870..a43504029 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -6637,8 +6637,8 @@ SpellCastResult Spell::CheckCast(bool strict) } case SPELL_AURA_MOUNTED: { - // Xinef: disallow casting in water for mounts not increasing water movement Speed - if (m_caster->IsInWater() && !m_spellInfo->HasAura(SPELL_AURA_MOD_INCREASE_SWIM_SPEED)) + // Disallow casting flying mounts in water + if (m_caster->IsInWater() && m_spellInfo->HasAura(SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED)) return SPELL_FAILED_ONLY_ABOVEWATER; // Ignore map check if spell have AreaId. AreaId already checked and this prevent special mount spells diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index ea793ce8a..7080b5c8f 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -6057,8 +6057,11 @@ void Spell::SummonGuardian(uint32 i, uint32 entry, SummonPropertiesEntry const* Position pos; // xinef: do not use precalculated position for effect summon pet in this function - // it means it was cast by NPC and should have its position overridden - if (totalNumGuardians == 1 && GetSpellInfo()->Effects[i].Effect != SPELL_EFFECT_SUMMON_PET) + // it means it was cast by NPC and should have its position overridden unless the + // target position is specified in the DB AND the effect has no or zero radius + if ((totalNumGuardians == 1 && GetSpellInfo()->Effects[i].Effect != SPELL_EFFECT_SUMMON_PET) || + (GetSpellInfo()->Effects[i].TargetA.GetTarget() == TARGET_DEST_DB && + (!GetSpellInfo()->Effects[i].HasRadius() || GetSpellInfo()->Effects[i].RadiusEntry->RadiusMax == 0))) { pos = *destTarget; } diff --git a/src/server/game/Spells/SpellInfoCorrections.cpp b/src/server/game/Spells/SpellInfoCorrections.cpp index c3ca283d2..d290ef9e2 100644 --- a/src/server/game/Spells/SpellInfoCorrections.cpp +++ b/src/server/game/Spells/SpellInfoCorrections.cpp @@ -416,7 +416,7 @@ void SpellMgr::LoadSpellInfoCorrections() // Marked for Death ApplySpellFix({ 53241, 53243, 53244, 53245, 53246 }, [](SpellInfo* spellInfo) { - spellInfo->Effects[EFFECT_0].SpellClassMask = flag96(423937, 276955137, 2049); + spellInfo->Effects[EFFECT_0].SpellClassMask = flag96(399361, 276955137, 1); }); ApplySpellFix({ @@ -4572,6 +4572,18 @@ void SpellMgr::LoadSpellInfoCorrections() spellInfo->RangeEntry = sSpellRangeStore.LookupEntry(13); // 50000yd }); + // Instill Lord Valthalak's Spirit DND + ApplySpellFix({ 27360 }, [](SpellInfo* spellInfo) + { + spellInfo->ChannelInterruptFlags |= AURA_INTERRUPT_FLAG_MOVE; + }); + + // Holiday - Midsummer, Ribbon Pole Periodic Visual + ApplySpellFix({ 45406 }, [](SpellInfo* spellInfo) + { + spellInfo->AuraInterruptFlags |= ( AURA_INTERRUPT_FLAG_MOUNT | AURA_INTERRUPT_FLAG_CAST ); + }); + for (uint32 i = 0; i < GetSpellInfoStoreSize(); ++i) { SpellInfo* spellInfo = mSpellInfoMap[i]; diff --git a/src/server/game/World/IWorld.h b/src/server/game/World/IWorld.h index 25c0e0a88..c9c67690b 100644 --- a/src/server/game/World/IWorld.h +++ b/src/server/game/World/IWorld.h @@ -208,6 +208,7 @@ enum WorldFloatConfigs enum WorldIntConfigs { CONFIG_COMPRESSION = 0, + CONFIG_INTERVAL_GRIDCLEAN, CONFIG_INTERVAL_MAPUPDATE, CONFIG_INTERVAL_CHANGEWEATHER, CONFIG_INTERVAL_DISCONNECT_TOLERANCE, @@ -505,7 +506,6 @@ enum Rates RATE_TALENT, RATE_CORPSE_DECAY_LOOTED, RATE_INSTANCE_RESET_TIME, - RATE_TARGET_POS_RECALCULATION_RANGE, RATE_DURABILITY_LOSS_ON_DEATH, RATE_DURABILITY_LOSS_DAMAGE, RATE_DURABILITY_LOSS_PARRY, diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp index 78b988bf6..ee41b2c7d 100644 --- a/src/server/game/World/World.cpp +++ b/src/server/game/World/World.cpp @@ -110,6 +110,10 @@ float World::_maxVisibleDistanceOnContinents = DEFAULT_VISIBILITY_DISTANCE; float World::_maxVisibleDistanceInInstances = DEFAULT_VISIBILITY_INSTANCE; float World::_maxVisibleDistanceInBGArenas = DEFAULT_VISIBILITY_BGARENAS; +int32 World::m_visibility_notify_periodOnContinents = DEFAULT_VISIBILITY_NOTIFY_PERIOD; +int32 World::m_visibility_notify_periodInInstances = DEFAULT_VISIBILITY_NOTIFY_PERIOD; +int32 World::m_visibility_notify_periodInBGArenas = DEFAULT_VISIBILITY_NOTIFY_PERIOD; + Realm realm; /// World constructor @@ -583,18 +587,6 @@ void World::LoadConfigSettings(bool reload) for (uint8 i = 0; i < MAX_MOVE_TYPE; ++i) playerBaseMoveSpeed[i] = baseMoveSpeed[i] * _rate_values[RATE_MOVESPEED]; _rate_values[RATE_CORPSE_DECAY_LOOTED] = sConfigMgr->GetOption("Rate.Corpse.Decay.Looted", 0.5f); - _rate_values[RATE_TARGET_POS_RECALCULATION_RANGE] = sConfigMgr->GetOption("TargetPosRecalculateRange", 1.5f); - if (_rate_values[RATE_TARGET_POS_RECALCULATION_RANGE] < CONTACT_DISTANCE) - { - LOG_ERROR("server.loading", "TargetPosRecalculateRange ({}) must be >= {}. Using {} instead.", _rate_values[RATE_TARGET_POS_RECALCULATION_RANGE], CONTACT_DISTANCE, CONTACT_DISTANCE); - _rate_values[RATE_TARGET_POS_RECALCULATION_RANGE] = CONTACT_DISTANCE; - } - else if (_rate_values[RATE_TARGET_POS_RECALCULATION_RANGE] > NOMINAL_MELEE_RANGE) - { - LOG_ERROR("server.loading", "TargetPosRecalculateRange ({}) must be <= {}. Using {} instead.", _rate_values[RATE_TARGET_POS_RECALCULATION_RANGE], NOMINAL_MELEE_RANGE, NOMINAL_MELEE_RANGE); - _rate_values[RATE_TARGET_POS_RECALCULATION_RANGE] = NOMINAL_MELEE_RANGE; - } - _rate_values[RATE_DURABILITY_LOSS_ON_DEATH] = sConfigMgr->GetOption("DurabilityLoss.OnDeath", 10.0f); if (_rate_values[RATE_DURABILITY_LOSS_ON_DEATH] < 0.0f) { @@ -667,6 +659,14 @@ void World::LoadConfigSettings(bool reload) LOG_ERROR("server.loading", "PlayerSave.Stats.MinLevel ({}) must be in range 0..80. Using default, do not save character stats (0).", _int_configs[CONFIG_MIN_LEVEL_STAT_SAVE]); _int_configs[CONFIG_MIN_LEVEL_STAT_SAVE] = 0; } + _int_configs[CONFIG_INTERVAL_GRIDCLEAN] = sConfigMgr->GetOption("GridCleanUpDelay", 5 * MINUTE * IN_MILLISECONDS); + if (_int_configs[CONFIG_INTERVAL_GRIDCLEAN] < MIN_GRID_DELAY) + { + LOG_ERROR("server.loading", "GridCleanUpDelay ({}) must be greater {}. Use this minimal value.", _int_configs[CONFIG_INTERVAL_GRIDCLEAN], MIN_GRID_DELAY); + _int_configs[CONFIG_INTERVAL_GRIDCLEAN] = MIN_GRID_DELAY; + } + if (reload) + sMapMgr->SetGridCleanUpDelay(_int_configs[CONFIG_INTERVAL_GRIDCLEAN]); _int_configs[CONFIG_INTERVAL_MAPUPDATE] = sConfigMgr->GetOption("MapUpdateInterval", 10); if (_int_configs[CONFIG_INTERVAL_MAPUPDATE] < MIN_MAP_UPDATE_DELAY) @@ -1261,6 +1261,10 @@ void World::LoadConfigSettings(bool reload) _maxVisibleDistanceInBGArenas = MAX_VISIBILITY_DISTANCE; } + m_visibility_notify_periodOnContinents = sConfigMgr->GetOption("Visibility.Notify.Period.OnContinents", DEFAULT_VISIBILITY_NOTIFY_PERIOD); + m_visibility_notify_periodInInstances = sConfigMgr->GetOption("Visibility.Notify.Period.InInstances", DEFAULT_VISIBILITY_NOTIFY_PERIOD); + m_visibility_notify_periodInBGArenas = sConfigMgr->GetOption("Visibility.Notify.Period.InBGArenas", DEFAULT_VISIBILITY_NOTIFY_PERIOD); + ///- Load the CharDelete related config options _int_configs[CONFIG_CHARDELETE_METHOD] = sConfigMgr->GetOption("CharDelete.Method", 0); _int_configs[CONFIG_CHARDELETE_MIN_LEVEL] = sConfigMgr->GetOption("CharDelete.MinLevel", 0); diff --git a/src/server/game/World/World.h b/src/server/game/World/World.h index bd156bc99..d8ad3255a 100644 --- a/src/server/game/World/World.h +++ b/src/server/game/World/World.h @@ -322,6 +322,10 @@ public: static float GetMaxVisibleDistanceInInstances() { return _maxVisibleDistanceInInstances; } static float GetMaxVisibleDistanceInBGArenas() { return _maxVisibleDistanceInBGArenas; } + static int32 GetVisibilityNotifyPeriodOnContinents() { return m_visibility_notify_periodOnContinents; } + static int32 GetVisibilityNotifyPeriodInInstances() { return m_visibility_notify_periodInInstances; } + static int32 GetVisibilityNotifyPeriodInBGArenas() { return m_visibility_notify_periodInBGArenas; } + // our: needed for arena spectator subscriptions uint32 GetNextWhoListUpdateDelaySecs() override; @@ -415,6 +419,10 @@ private: static float _maxVisibleDistanceInInstances; static float _maxVisibleDistanceInBGArenas; + static int32 m_visibility_notify_periodOnContinents; + static int32 m_visibility_notify_periodInInstances; + static int32 m_visibility_notify_periodInBGArenas; + std::string _realmName; // CLI command holder to be thread safe diff --git a/src/server/scripts/Commands/cs_guild.cpp b/src/server/scripts/Commands/cs_guild.cpp index b5f40ba10..0eb15e7d1 100644 --- a/src/server/scripts/Commands/cs_guild.cpp +++ b/src/server/scripts/Commands/cs_guild.cpp @@ -25,13 +25,8 @@ EndScriptData */ #include "Chat.h" #include "Guild.h" #include "GuildMgr.h" -#include "Language.h" #include "ScriptMgr.h" -#if AC_COMPILER == AC_COMPILER_GNU -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" -#endif - using namespace Acore::ChatCommands; class guild_commandscript : public CommandScript @@ -43,50 +38,38 @@ public: { static ChatCommandTable guildCommandTable = { - { "create", SEC_GAMEMASTER, true, &HandleGuildCreateCommand, "" }, - { "delete", SEC_GAMEMASTER, true, &HandleGuildDeleteCommand, "" }, - { "invite", SEC_GAMEMASTER, true, &HandleGuildInviteCommand, "" }, - { "uninvite", SEC_GAMEMASTER, true, &HandleGuildUninviteCommand, "" }, - { "rank", SEC_GAMEMASTER, true, &HandleGuildRankCommand, "" }, - { "rename", SEC_GAMEMASTER, true, &HandleGuildRenameCommand, "" }, - { "info", SEC_GAMEMASTER, true, &HandleGuildInfoCommand, "" } + { "create", HandleGuildCreateCommand, SEC_GAMEMASTER, Console::Yes }, + { "delete", HandleGuildDeleteCommand, SEC_GAMEMASTER, Console::Yes }, + { "invite", HandleGuildInviteCommand, SEC_GAMEMASTER, Console::Yes }, + { "uninvite", HandleGuildUninviteCommand, SEC_GAMEMASTER, Console::Yes }, + { "rank", HandleGuildRankCommand, SEC_GAMEMASTER, Console::Yes }, + { "rename", HandleGuildRenameCommand, SEC_GAMEMASTER, Console::Yes }, + { "info", HandleGuildInfoCommand, SEC_GAMEMASTER, Console::Yes } }; static ChatCommandTable commandTable = { - { "guild", SEC_GAMEMASTER, true, nullptr, "", guildCommandTable } + { "guild", guildCommandTable } }; return commandTable; } - /** \brief GM command level 3 - Create a guild. - * - * This command allows a GM (level 3) to create a guild. - * - * The "args" parameter contains the name of the guild leader - * and then the name of the guild. - * - */ - static bool HandleGuildCreateCommand(ChatHandler* handler, char const* args) + static bool HandleGuildCreateCommand(ChatHandler* handler, Optional target, std::string_view guildName) { - if (!*args) + if (!target) + { + target = PlayerIdentifier::FromTargetOrSelf(handler); + } + + if (!target || !target->IsConnected()) + { + handler->SendSysMessage(LANG_PLAYER_NOT_FOUND); + handler->SetSentErrorMessage(true); return false; + } - // if not guild name only (in "") then player name - Player* target; - if (!handler->extractPlayerTarget(*args != '"' ? (char*)args : nullptr, &target)) - return false; + Player* playerTarget = target->GetConnectedPlayer(); - char* tailStr = *args != '"' ? strtok(nullptr, "") : (char*)args; - if (!tailStr) - return false; - - char* guildStr = handler->extractQuotedArg(tailStr); - if (!guildStr) - return false; - - std::string guildName = guildStr; - - if (target->GetGuildId()) + if (playerTarget->GetGuildId()) { handler->SendSysMessage(LANG_PLAYER_IN_GUILD); handler->SetSentErrorMessage(true); @@ -108,7 +91,7 @@ public: } Guild* guild = new Guild; - if (!guild->Create(target, guildName)) + if (!guild->Create(playerTarget, guildName)) { delete guild; handler->SendSysMessage(LANG_GUILD_NOT_CREATED); @@ -121,16 +104,12 @@ public: return true; } - static bool HandleGuildDeleteCommand(ChatHandler* handler, char const* args) + static bool HandleGuildDeleteCommand(ChatHandler*, std::string_view guildName) { - if (!*args) + if (guildName.empty()) + { return false; - - char* guildStr = handler->extractQuotedArg((char*)args); - if (!guildStr) - return false; - - std::string guildName = guildStr; + } Guild* targetGuild = sGuildMgr->GetGuildByName(guildName); if (!targetGuild) @@ -142,41 +121,41 @@ public: return true; } - static bool HandleGuildInviteCommand(ChatHandler* handler, char const* args) + static bool HandleGuildInviteCommand(ChatHandler* handler, Optional target, std::string_view guildName) { - if (!*args) - return false; + if (!target) + { + target = PlayerIdentifier::FromTargetOrSelf(handler); + } - // if not guild name only (in "") then player name - ObjectGuid targetGuid; - if (!handler->extractPlayerTarget(*args != '"' ? (char*)args : nullptr, nullptr, &targetGuid)) + if (!target) + { return false; + } - char* tailStr = *args != '"' ? strtok(nullptr, "") : (char*)args; - if (!tailStr) - return false; - - char* guildStr = handler->extractQuotedArg(tailStr); - if (!guildStr) - return false; - - std::string guildName = guildStr; Guild* targetGuild = sGuildMgr->GetGuildByName(guildName); if (!targetGuild) return false; // player's guild membership checked in AddMember before add - return targetGuild->AddMember(targetGuid); + return targetGuild->AddMember(target->GetGUID()); } - static bool HandleGuildUninviteCommand(ChatHandler* handler, char const* args) + static bool HandleGuildUninviteCommand(ChatHandler* handler, Optional target) { - Player* target; - ObjectGuid targetGuid; - if (!handler->extractPlayerTarget((char*)args, &target, &targetGuid)) - return false; + if (!target) + { + target = PlayerIdentifier::FromTargetOrSelf(handler); + } - uint32 guildId = target ? target->GetGuildId() : sCharacterCache->GetCharacterGuildIdByGuid(targetGuid); + if (!target) + { + return false; + } + + Player* playerTarget = target->GetConnectedPlayer(); + + uint32 guildId = playerTarget ? playerTarget->GetGuildId() : sCharacterCache->GetCharacterGuildIdByGuid(target->GetGUID()); if (!guildId) return false; @@ -184,7 +163,7 @@ public: if (!targetGuild) return false; - targetGuild->DeleteMember(targetGuid, false, true, true); + targetGuild->DeleteMember(target->GetGUID(), false, true, true); return true; } @@ -207,26 +186,15 @@ public: return targetGuild->ChangeMemberRank(player->GetGUID(), rank); } - static bool HandleGuildRenameCommand(ChatHandler* handler, char const* _args) + static bool HandleGuildRenameCommand(ChatHandler* handler, std::string_view oldGuildStr, std::string_view newGuildStr) { - if (!*_args) - return false; - - char *args = (char *)_args; - - char const* oldGuildStr = handler->extractQuotedArg(args); - if (!oldGuildStr) + if (!oldGuildStr.empty()) { - handler->SendSysMessage(LANG_BAD_VALUE); - handler->SetSentErrorMessage(true); return false; } - char const* newGuildStr = handler->extractQuotedArg(strtok(nullptr, "")); - if (!newGuildStr) + if (newGuildStr.empty()) { - handler->SendSysMessage(LANG_INSERT_GUILD_NAME); - handler->SetSentErrorMessage(true); return false; } @@ -256,35 +224,40 @@ public: return true; } - static bool HandleGuildInfoCommand(ChatHandler* handler, char const* args) + static bool HandleGuildInfoCommand(ChatHandler* handler, Optional> const& guildIdentifier) { Guild* guild = nullptr; - if (args && args[0] != '\0') + if (guildIdentifier) { - if (isNumeric(args)) - guild = sGuildMgr->GetGuildById(strtoull(args, nullptr, 10)); + if (ObjectGuid::LowType const* guid = std::get_if(&*guildIdentifier)) + guild = sGuildMgr->GetGuildById(*guid); else - guild = sGuildMgr->GetGuildByName(args); + guild = sGuildMgr->GetGuildByName(guildIdentifier->get()); } - else if (Player* target = handler->getSelectedPlayerOrSelf()) - guild = target->GetGuild(); + else if (Optional target = PlayerIdentifier::FromTargetOrSelf(handler); target && target->IsConnected()) + guild = target->GetConnectedPlayer()->GetGuild(); if (!guild) return false; // Display Guild Information handler->PSendSysMessage(LANG_GUILD_INFO_NAME, guild->GetName().c_str(), guild->GetId()); // Guild Id + Name + std::string guildMasterName; if (sCharacterCache->GetCharacterNameByGuid(guild->GetLeaderGUID(), guildMasterName)) - { handler->PSendSysMessage(LANG_GUILD_INFO_GUILD_MASTER, guildMasterName.c_str(), guild->GetLeaderGUID().GetCounter()); // Guild Master - } - handler->PSendSysMessage(LANG_GUILD_INFO_CREATION_DATE, Acore::Time::TimeToHumanReadable(Seconds(guild->GetCreatedDate())).c_str()); // Creation Date + // Format creation date + char createdDateStr[20]; + time_t createdDate = guild->GetCreatedDate(); + tm localTm; + strftime(createdDateStr, 20, "%Y-%m-%d %H:%M:%S", localtime_r(&createdDate, &localTm)); + + handler->PSendSysMessage(LANG_GUILD_INFO_CREATION_DATE, createdDateStr); // Creation Date handler->PSendSysMessage(LANG_GUILD_INFO_MEMBER_COUNT, guild->GetMemberCount()); // Number of Members handler->PSendSysMessage(LANG_GUILD_INFO_BANK_GOLD, guild->GetTotalBankMoney() / 100 / 100); // Bank Gold (in gold coins) - handler->PSendSysMessage(LANG_GUILD_INFO_MOTD, guild->GetMOTD().c_str()); // Message of the day + handler->PSendSysMessage(LANG_GUILD_INFO_MOTD, guild->GetMOTD().c_str()); // Message of the Day handler->PSendSysMessage(LANG_GUILD_INFO_EXTRA_INFO, guild->GetInfo().c_str()); // Extra Information return true; } diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp index a5555d266..f5361eedd 100644 --- a/src/server/scripts/Commands/cs_misc.cpp +++ b/src/server/scripts/Commands/cs_misc.cpp @@ -88,6 +88,7 @@ public: { static ChatCommandTable commandTable = { + { "commentator", HandleCommentatorCommand, SEC_MODERATOR, Console::No }, { "dev", HandleDevCommand, SEC_ADMINISTRATOR, Console::No }, { "gps", HandleGPSCommand, SEC_MODERATOR, Console::No }, { "aura", HandleAuraCommand, SEC_GAMEMASTER, Console::No }, @@ -451,6 +452,51 @@ public: return true; } + static bool HandleCommentatorCommand(ChatHandler* handler, Optional enableArg) + { + WorldSession* session = handler->GetSession(); + + if (!session) + { + return false; + } + + auto SetCommentatorMod = [&](bool enable) + { + session->SendNotification(enable ? "Commentator mode on" : "Commentator mode off"); + session->GetPlayer()->SetCommentator(enable); + }; + + if (!enableArg) + { + if (!AccountMgr::IsPlayerAccount(session->GetSecurity()) && session->GetPlayer()->IsCommentator()) + { + SetCommentatorMod(true); + } + else + { + SetCommentatorMod(false); + } + + return true; + } + + if (*enableArg) + { + SetCommentatorMod(true); + return true; + } + else + { + SetCommentatorMod(false); + return true; + } + + handler->SendSysMessage(LANG_USE_BOL); + handler->SetSentErrorMessage(true); + return false; + } + static bool HandleDevCommand(ChatHandler* handler, Optional enableArg) { WorldSession* session = handler->GetSession(); @@ -467,32 +513,29 @@ public: sScriptMgr->OnHandleDevCommand(handler->GetSession()->GetPlayer(), enable); }; - if (WorldSession* session = handler->GetSession()) + if (!enableArg) { - if (!enableArg) - { - if (!AccountMgr::IsPlayerAccount(session->GetSecurity()) && session->GetPlayer()->IsDeveloper()) - { - SetDevMod(true); - } - else - { - SetDevMod(false); - } - - return true; - } - - if (*enableArg) + if (!AccountMgr::IsPlayerAccount(session->GetSecurity()) && session->GetPlayer()->IsDeveloper()) { SetDevMod(true); - return true; } else { SetDevMod(false); - return true; } + + return true; + } + + if (*enableArg) + { + SetDevMod(true); + return true; + } + else + { + SetDevMod(false); + return true; } handler->SendSysMessage(LANG_USE_BOL); diff --git a/src/server/scripts/Commands/cs_reset.cpp b/src/server/scripts/Commands/cs_reset.cpp index fc2f78ddc..1f6373158 100644 --- a/src/server/scripts/Commands/cs_reset.cpp +++ b/src/server/scripts/Commands/cs_reset.cpp @@ -30,10 +30,6 @@ EndScriptData */ #include "Player.h" #include "ScriptMgr.h" -#if AC_COMPILER == AC_COMPILER_GNU -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" -#endif - using namespace Acore::ChatCommands; class reset_commandscript : public CommandScript @@ -45,48 +41,53 @@ public: { static ChatCommandTable resetCommandTable = { - { "achievements", SEC_CONSOLE, true, &HandleResetAchievementsCommand, "" }, - { "honor", SEC_ADMINISTRATOR, true, &HandleResetHonorCommand, "" }, - { "level", SEC_ADMINISTRATOR, true, &HandleResetLevelCommand, "" }, - { "spells", SEC_ADMINISTRATOR, true, &HandleResetSpellsCommand, "" }, - { "stats", SEC_ADMINISTRATOR, true, &HandleResetStatsCommand, "" }, - { "talents", SEC_ADMINISTRATOR, true, &HandleResetTalentsCommand, "" }, - { "all", SEC_CONSOLE, true, &HandleResetAllCommand, "" } + { "achievements", HandleResetAchievementsCommand, SEC_CONSOLE, Console::Yes }, + { "honor", HandleResetHonorCommand, SEC_ADMINISTRATOR, Console::Yes }, + { "level", HandleResetLevelCommand, SEC_ADMINISTRATOR, Console::Yes }, + { "spells", HandleResetSpellsCommand, SEC_ADMINISTRATOR, Console::Yes }, + { "stats", HandleResetStatsCommand, SEC_ADMINISTRATOR, Console::Yes }, + { "talents", HandleResetTalentsCommand, SEC_ADMINISTRATOR, Console::Yes }, + { "all", HandleResetAllCommand, SEC_CONSOLE, Console::Yes } }; static ChatCommandTable commandTable = { - { "reset", SEC_ADMINISTRATOR, true, nullptr, "", resetCommandTable } + { "reset", resetCommandTable } }; return commandTable; } - static bool HandleResetAchievementsCommand(ChatHandler* handler, char const* args) + static bool HandleResetAchievementsCommand(ChatHandler*, Optional target) { - Player* target; - ObjectGuid targetGuid; - if (!handler->extractPlayerTarget((char*)args, &target, &targetGuid)) + if (!target) + { return false; + } - if (target) - target->ResetAchievements(); + Player* playerTarget = target->GetConnectedPlayer(); + + if (playerTarget) + playerTarget->ResetAchievements(); else - AchievementMgr::DeleteFromDB(targetGuid.GetCounter()); + AchievementMgr::DeleteFromDB(target->GetGUID().GetCounter()); return true; } - static bool HandleResetHonorCommand(ChatHandler* handler, char const* args) + static bool HandleResetHonorCommand(ChatHandler*, Optional target) { - Player* target; - if (!handler->extractPlayerTarget((char*)args, &target)) + if (!target) + { return false; + } - target->SetHonorPoints(0); - target->SetUInt32Value(PLAYER_FIELD_KILLS, 0); - target->SetUInt32Value(PLAYER_FIELD_LIFETIME_HONORABLE_KILLS, 0); - target->SetUInt32Value(PLAYER_FIELD_TODAY_CONTRIBUTION, 0); - target->SetUInt32Value(PLAYER_FIELD_YESTERDAY_CONTRIBUTION, 0); - target->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_EARN_HONORABLE_KILL); + Player* playerTarget = target->GetConnectedPlayer(); + + playerTarget->SetHonorPoints(0); + playerTarget->SetUInt32Value(PLAYER_FIELD_KILLS, 0); + playerTarget->SetUInt32Value(PLAYER_FIELD_LIFETIME_HONORABLE_KILLS, 0); + playerTarget->SetUInt32Value(PLAYER_FIELD_TODAY_CONTRIBUTION, 0); + playerTarget->SetUInt32Value(PLAYER_FIELD_YESTERDAY_CONTRIBUTION, 0); + playerTarget->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_EARN_HONORABLE_KILL); return true; } @@ -123,156 +124,145 @@ public: return true; } - static bool HandleResetLevelCommand(ChatHandler* handler, char const* args) + static bool HandleResetLevelCommand(ChatHandler*, Optional target) { - Player* target; - if (!handler->extractPlayerTarget((char*)args, &target)) + if (!target) + { + return false; + } + + Player* playerTarget = target->GetConnectedPlayer(); + + if (!HandleResetStatsOrLevelHelper(playerTarget)) return false; - if (!HandleResetStatsOrLevelHelper(target)) - return false; - - uint8 oldLevel = target->GetLevel(); + uint8 oldLevel = playerTarget->GetLevel(); // set starting level - uint32 startLevel = target->getClass() != CLASS_DEATH_KNIGHT + uint32 startLevel = playerTarget->getClass() != CLASS_DEATH_KNIGHT ? sWorld->getIntConfig(CONFIG_START_PLAYER_LEVEL) : sWorld->getIntConfig(CONFIG_START_HEROIC_PLAYER_LEVEL); - target->_ApplyAllLevelScaleItemMods(false); - target->SetLevel(startLevel); - target->InitRunes(); - target->InitStatsForLevel(true); - target->InitTaxiNodesForLevel(); - target->InitGlyphsForLevel(); - target->InitTalentForLevel(); - target->SetUInt32Value(PLAYER_XP, 0); + playerTarget->_ApplyAllLevelScaleItemMods(false); + playerTarget->SetLevel(startLevel); + playerTarget->InitRunes(); + playerTarget->InitStatsForLevel(true); + playerTarget->InitTaxiNodesForLevel(); + playerTarget->InitGlyphsForLevel(); + playerTarget->InitTalentForLevel(); + playerTarget->SetUInt32Value(PLAYER_XP, 0); - target->_ApplyAllLevelScaleItemMods(true); + playerTarget->_ApplyAllLevelScaleItemMods(true); // reset level for pet - if (Pet* pet = target->GetPet()) + if (Pet* pet = playerTarget->GetPet()) pet->SynchronizeLevelWithOwner(); - sScriptMgr->OnPlayerLevelChanged(target, oldLevel); + sScriptMgr->OnPlayerLevelChanged(playerTarget, oldLevel); return true; } - static bool HandleResetSpellsCommand(ChatHandler* handler, char const* args) + static bool HandleResetSpellsCommand(ChatHandler* handler, Optional target) { - Player* target; - ObjectGuid targetGuid; - std::string targetName; - if (!handler->extractPlayerTarget((char*)args, &target, &targetGuid, &targetName)) + if (!target) + { + target = PlayerIdentifier::FromTargetOrSelf(handler); + } + + if (!target) + { return false; + } + + Player* playerTarget = target->GetConnectedPlayer(); if (target) { - target->resetSpells(/* bool myClassOnly */); + playerTarget->resetSpells(/* bool myClassOnly */); - ChatHandler(target->GetSession()).SendSysMessage(LANG_RESET_SPELLS); - if (!handler->GetSession() || handler->GetSession()->GetPlayer() != target) - handler->PSendSysMessage(LANG_RESET_SPELLS_ONLINE, handler->GetNameLink(target).c_str()); + ChatHandler(playerTarget->GetSession()).SendSysMessage(LANG_RESET_SPELLS); + if (!handler->GetSession() || handler->GetSession()->GetPlayer() != playerTarget) + handler->PSendSysMessage(LANG_RESET_SPELLS_ONLINE, handler->GetNameLink(playerTarget).c_str()); } else { CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_ADD_AT_LOGIN_FLAG); stmt->SetData(0, uint16(AT_LOGIN_RESET_SPELLS)); - stmt->SetData(1, targetGuid.GetCounter()); + stmt->SetData(1, playerTarget->GetGUID().GetCounter()); CharacterDatabase.Execute(stmt); - handler->PSendSysMessage(LANG_RESET_SPELLS_OFFLINE, targetName.c_str()); + handler->PSendSysMessage(LANG_RESET_SPELLS_OFFLINE, target->GetName()); } return true; } - static bool HandleResetStatsCommand(ChatHandler* handler, char const* args) + static bool HandleResetStatsCommand(ChatHandler*, Optional target) { - Player* target; - if (!handler->extractPlayerTarget((char*)args, &target)) + if (!target) + { + return false; + } + + Player* playerTarget = target->GetConnectedPlayer(); + + if (!HandleResetStatsOrLevelHelper(playerTarget)) return false; - if (!HandleResetStatsOrLevelHelper(target)) - return false; - - target->InitRunes(); - target->InitStatsForLevel(true); - target->InitTaxiNodesForLevel(); - target->InitGlyphsForLevel(); - target->InitTalentForLevel(); + playerTarget->InitRunes(); + playerTarget->InitStatsForLevel(true); + playerTarget->InitTaxiNodesForLevel(); + playerTarget->InitGlyphsForLevel(); + playerTarget->InitTalentForLevel(); return true; } - static bool HandleResetTalentsCommand(ChatHandler* handler, char const* args) + static bool HandleResetTalentsCommand(ChatHandler* handler, Optional target) { - Player* target; - ObjectGuid targetGuid; - std::string targetName; - if (!handler->extractPlayerTarget((char*)args, &target, &targetGuid, &targetName)) + Player* targetPlayer = nullptr; + + if (target) + { + targetPlayer = target->GetConnectedPlayer(); + } + else { - // Try reset talents as Hunter Pet - Creature* creature = handler->getSelectedCreature(); - if (!*args && creature && creature->IsPet()) - { - Unit* owner = creature->GetOwner(); - if (owner && owner->GetTypeId() == TYPEID_PLAYER && creature->ToPet()->IsPermanentPetFor(owner->ToPlayer())) - { - creature->ToPet()->resetTalents(); - owner->ToPlayer()->SendTalentsInfoData(true); - - ChatHandler(owner->ToPlayer()->GetSession()).SendSysMessage(LANG_RESET_PET_TALENTS); - if (!handler->GetSession() || handler->GetSession()->GetPlayer() != owner->ToPlayer()) - handler->PSendSysMessage(LANG_RESET_PET_TALENTS_ONLINE, handler->GetNameLink(owner->ToPlayer()).c_str()); - } - return true; - } - handler->SendSysMessage(LANG_NO_CHAR_SELECTED); handler->SetSentErrorMessage(true); return false; } - if (target) + if (targetPlayer) { - target->resetTalents(true); - target->SendTalentsInfoData(false); - ChatHandler(target->GetSession()).SendSysMessage(LANG_RESET_TALENTS); - if (!handler->GetSession() || handler->GetSession()->GetPlayer() != target) - handler->PSendSysMessage(LANG_RESET_TALENTS_ONLINE, handler->GetNameLink(target).c_str()); + targetPlayer->resetTalents(true); + targetPlayer->SendTalentsInfoData(false); + ChatHandler(targetPlayer->GetSession()).SendSysMessage(LANG_RESET_TALENTS); + if (!handler->GetSession() || handler->GetSession()->GetPlayer() != targetPlayer) + handler->PSendSysMessage(LANG_RESET_TALENTS_ONLINE, handler->GetNameLink(targetPlayer).c_str()); - Pet* pet = target->GetPet(); - Pet::resetTalentsForAllPetsOf(target, pet); + Pet* pet = targetPlayer->GetPet(); + Pet::resetTalentsForAllPetsOf(targetPlayer, pet); if (pet) - target->SendTalentsInfoData(true); + targetPlayer->SendTalentsInfoData(true); return true; } - else if (targetGuid) + else { CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_ADD_AT_LOGIN_FLAG); stmt->SetData(0, uint16(AT_LOGIN_RESET_TALENTS | AT_LOGIN_RESET_PET_TALENTS)); - stmt->SetData(1, targetGuid.GetCounter()); + stmt->SetData(1, target->GetGUID().GetCounter()); CharacterDatabase.Execute(stmt); - std::string nameLink = handler->playerLink(targetName); + std::string nameLink = handler->playerLink(target->GetName()); handler->PSendSysMessage(LANG_RESET_TALENTS_OFFLINE, nameLink.c_str()); return true; } - - handler->SendSysMessage(LANG_NO_CHAR_SELECTED); - handler->SetSentErrorMessage(true); - return false; } - static bool HandleResetAllCommand(ChatHandler* handler, char const* args) + static bool HandleResetAllCommand(ChatHandler* handler, std::string_view caseName) { - if (!*args) - return false; - - std::string caseName = args; - AtLoginFlags atLogin; // Command specially created as single command to prevent using short case names @@ -292,7 +282,7 @@ public: } else { - handler->PSendSysMessage(LANG_RESETALL_UNKNOWN_CASE, args); + handler->PSendSysMessage(LANG_RESETALL_UNKNOWN_CASE, caseName); handler->SetSentErrorMessage(true); return false; } @@ -303,7 +293,7 @@ public: std::shared_lock lock(*HashMapHolder::GetLock()); HashMapHolder::MapType const& plist = ObjectAccessor::GetPlayers(); - for (HashMapHolder::MapType::const_iterator itr = plist.begin(); itr != plist.end(); ++itr) + for (auto itr = plist.begin(); itr != plist.end(); ++itr) itr->second->SetAtLoginFlag(atLogin); return true; diff --git a/src/server/scripts/Commands/cs_ticket.cpp b/src/server/scripts/Commands/cs_ticket.cpp index 39b7c3780..8e29933bc 100644 --- a/src/server/scripts/Commands/cs_ticket.cpp +++ b/src/server/scripts/Commands/cs_ticket.cpp @@ -24,7 +24,6 @@ EndScriptData */ #include "AccountMgr.h" #include "Chat.h" -#include "Language.h" #include "ObjectMgr.h" #include "Opcodes.h" #include "Player.h" @@ -32,10 +31,6 @@ EndScriptData */ #include "ScriptMgr.h" #include "TicketMgr.h" -#if AC_COMPILER == AC_COMPILER_GNU -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" -#endif - using namespace Acore::ChatCommands; class ticket_commandscript : public CommandScript @@ -47,48 +42,38 @@ public: { static ChatCommandTable ticketResponseCommandTable = { - { "append", SEC_GAMEMASTER, true, &HandleGMTicketResponseAppendCommand, "" }, - { "appendln", SEC_GAMEMASTER, true, &HandleGMTicketResponseAppendLnCommand, "" } + { "append", HandleGMTicketResponseAppendCommand, SEC_GAMEMASTER, Console::Yes }, + { "appendln", HandleGMTicketResponseAppendLnCommand, SEC_GAMEMASTER, Console::Yes } }; static ChatCommandTable ticketCommandTable = { - { "assign", SEC_GAMEMASTER, true, &HandleGMTicketAssignToCommand, "" }, - { "close", SEC_GAMEMASTER, true, &HandleGMTicketCloseByIdCommand, "" }, - { "closedlist", SEC_GAMEMASTER, true, &HandleGMTicketListClosedCommand, "" }, - { "comment", SEC_GAMEMASTER, true, &HandleGMTicketCommentCommand, "" }, - { "complete", SEC_GAMEMASTER, true, &HandleGMTicketCompleteCommand, "" }, - { "delete", SEC_ADMINISTRATOR, true, &HandleGMTicketDeleteByIdCommand, "" }, - { "escalate", SEC_GAMEMASTER, true, &HandleGMTicketEscalateCommand, "" }, - { "escalatedlist", SEC_GAMEMASTER, true, &HandleGMTicketListEscalatedCommand, "" }, - { "list", SEC_GAMEMASTER, true, &HandleGMTicketListCommand, "" }, - { "onlinelist", SEC_GAMEMASTER, true, &HandleGMTicketListOnlineCommand, "" }, - { "reset", SEC_CONSOLE, true, &HandleGMTicketResetCommand, "" }, - { "response", SEC_GAMEMASTER, true, nullptr, "", ticketResponseCommandTable }, - { "togglesystem", SEC_ADMINISTRATOR, true, &HandleToggleGMTicketSystem, "" }, - { "unassign", SEC_GAMEMASTER, true, &HandleGMTicketUnAssignCommand, "" }, - { "viewid", SEC_GAMEMASTER, true, &HandleGMTicketGetByIdCommand, "" }, - { "viewname", SEC_GAMEMASTER, true, &HandleGMTicketGetByNameCommand, "" } + { "assign", HandleGMTicketAssignToCommand, SEC_GAMEMASTER, Console::Yes }, + { "close", HandleGMTicketCloseByIdCommand, SEC_GAMEMASTER, Console::Yes }, + { "closedlist", HandleGMTicketListClosedCommand, SEC_GAMEMASTER, Console::Yes }, + { "comment", HandleGMTicketCommentCommand, SEC_GAMEMASTER, Console::Yes }, + { "complete", HandleGMTicketCompleteCommand, SEC_GAMEMASTER, Console::Yes }, + { "delete", HandleGMTicketDeleteByIdCommand, SEC_ADMINISTRATOR, Console::Yes }, + { "escalate", HandleGMTicketEscalateCommand, SEC_GAMEMASTER, Console::Yes }, + { "escalatedlist", HandleGMTicketListEscalatedCommand, SEC_GAMEMASTER, Console::Yes }, + { "list", HandleGMTicketListCommand, SEC_GAMEMASTER, Console::Yes }, + { "onlinelist", HandleGMTicketListOnlineCommand, SEC_GAMEMASTER, Console::Yes }, + { "reset", HandleGMTicketResetCommand, SEC_CONSOLE, Console::Yes }, + + { "response", ticketResponseCommandTable }, + { "togglesystem", HandleToggleGMTicketSystem, SEC_ADMINISTRATOR, Console::Yes }, + { "unassign", HandleGMTicketUnAssignCommand, SEC_GAMEMASTER, Console::Yes }, + { "viewid", HandleGMTicketGetByIdCommand, SEC_GAMEMASTER, Console::Yes }, + { "viewname", HandleGMTicketGetByNameCommand, SEC_GAMEMASTER, Console::Yes } }; static ChatCommandTable commandTable = { - { "ticket", SEC_GAMEMASTER, false, nullptr, "", ticketCommandTable } + { "ticket", ticketCommandTable } }; return commandTable; } - static bool HandleGMTicketAssignToCommand(ChatHandler* handler, char const* args) + static bool HandleGMTicketAssignToCommand(ChatHandler* handler, uint32 ticketId, std::string target) { - if (!*args) - return false; - - char* ticketIdStr = strtok((char*)args, " "); - uint32 ticketId = atoi(ticketIdStr); - - char* targetStr = strtok(nullptr, " "); - if (!targetStr) - return false; - - std::string target(targetStr); if (!normalizePlayerName(target)) return false; @@ -138,12 +123,8 @@ public: return true; } - static bool HandleGMTicketCloseByIdCommand(ChatHandler* handler, char const* args) + static bool HandleGMTicketCloseByIdCommand(ChatHandler* handler, uint32 ticketId) { - if (!*args) - return false; - - uint32 ticketId = atoi(args); GmTicket* ticket = sTicketMgr->GetTicket(ticketId); if (!ticket || ticket->IsClosed() || ticket->IsCompleted()) { @@ -177,14 +158,8 @@ public: return true; } - static bool HandleGMTicketCommentCommand(ChatHandler* handler, char const* args) + static bool HandleGMTicketCommentCommand(ChatHandler* handler, uint32 ticketId) { - if (!*args) - return false; - - char* ticketIdStr = strtok((char*)args, " "); - uint32 ticketId = atoi(ticketIdStr); - char* comment = strtok(nullptr, "\n"); if (!comment) return false; @@ -218,20 +193,14 @@ public: return true; } - static bool HandleGMTicketListClosedCommand(ChatHandler* handler, char const* /*args*/) + static bool HandleGMTicketListClosedCommand(ChatHandler* handler) { sTicketMgr->ShowClosedList(*handler); return true; } - static bool HandleGMTicketCompleteCommand(ChatHandler* handler, char const* args) + static bool HandleGMTicketCompleteCommand(ChatHandler* handler, uint32 ticketId) { - if (!*args) - return false; - - char* ticketIdStr = strtok((char*)args, " "); - uint32 ticketId = atoi(ticketIdStr); - GmTicket* ticket = sTicketMgr->GetTicket(ticketId); if (!ticket || ticket->IsClosed() || ticket->IsCompleted()) { @@ -272,12 +241,8 @@ public: return true; } - static bool HandleGMTicketDeleteByIdCommand(ChatHandler* handler, char const* args) + static bool HandleGMTicketDeleteByIdCommand(ChatHandler* handler, uint32 ticketId) { - if (!*args) - return false; - - uint32 ticketId = atoi(args); GmTicket* ticket = sTicketMgr->GetTicket(ticketId); if (!ticket) { @@ -308,12 +273,8 @@ public: return true; } - static bool HandleGMTicketEscalateCommand(ChatHandler* handler, char const* args) + static bool HandleGMTicketEscalateCommand(ChatHandler* handler, uint32 ticketId) { - if (!*args) - return false; - - uint32 ticketId = atoi(args); GmTicket* ticket = sTicketMgr->GetTicket(ticketId); if (!ticket || ticket->IsClosed() || ticket->IsCompleted() || ticket->GetEscalatedStatus() != TICKET_UNASSIGNED) { @@ -330,25 +291,25 @@ public: return true; } - static bool HandleGMTicketListEscalatedCommand(ChatHandler* handler, char const* /*args*/) + static bool HandleGMTicketListEscalatedCommand(ChatHandler* handler) { sTicketMgr->ShowEscalatedList(*handler); return true; } - static bool HandleGMTicketListCommand(ChatHandler* handler, char const* /*args*/) + static bool HandleGMTicketListCommand(ChatHandler* handler) { sTicketMgr->ShowList(*handler, false); return true; } - static bool HandleGMTicketListOnlineCommand(ChatHandler* handler, char const* /*args*/) + static bool HandleGMTicketListOnlineCommand(ChatHandler* handler) { sTicketMgr->ShowList(*handler, true); return true; } - static bool HandleGMTicketResetCommand(ChatHandler* handler, char const* /*args*/) + static bool HandleGMTicketResetCommand(ChatHandler* handler) { if (sTicketMgr->GetOpenTicketCount()) { @@ -364,7 +325,7 @@ public: return true; } - static bool HandleToggleGMTicketSystem(ChatHandler* handler, char const* /*args*/) + static bool HandleToggleGMTicketSystem(ChatHandler* handler) { bool status = !sTicketMgr->GetStatus(); sTicketMgr->SetStatus(status); @@ -372,12 +333,8 @@ public: return true; } - static bool HandleGMTicketUnAssignCommand(ChatHandler* handler, char const* args) + static bool HandleGMTicketUnAssignCommand(ChatHandler* handler, uint32 ticketId) { - if (!*args) - return false; - - uint32 ticketId = atoi(args); GmTicket* ticket = sTicketMgr->GetTicket(ticketId); if (!ticket || ticket->IsClosed()) { @@ -425,12 +382,8 @@ public: return true; } - static bool HandleGMTicketGetByIdCommand(ChatHandler* handler, char const* args) + static bool HandleGMTicketGetByIdCommand(ChatHandler* handler, uint32 ticketId) { - if (!*args) - return false; - - uint32 ticketId = atoi(args); GmTicket* ticket = sTicketMgr->GetTicket(ticketId); if (!ticket || ticket->IsClosed() || ticket->IsCompleted()) { @@ -442,16 +395,12 @@ public: ticket->SetViewed(); ticket->SaveToDB(trans); - handler->SendSysMessage(ticket->FormatMessageString(*handler, true).c_str()); + handler->SendSysMessage(ticket->FormatMessageString(*handler, true)); return true; } - static bool HandleGMTicketGetByNameCommand(ChatHandler* handler, char const* args) + static bool HandleGMTicketGetByNameCommand(ChatHandler* handler, std::string name) { - if (!*args) - return false; - - std::string name(args); if (!normalizePlayerName(name)) return false; @@ -485,18 +434,12 @@ public: ticket->SetViewed(); ticket->SaveToDB(trans); - handler->SendSysMessage(ticket->FormatMessageString(*handler, true).c_str()); + handler->SendSysMessage(ticket->FormatMessageString(*handler, true)); return true; } - static bool _HandleGMTicketResponseAppendCommand(char const* args, bool newLine, ChatHandler* handler) + static bool _HandleGMTicketResponseAppendCommand(uint32 ticketId, bool newLine, ChatHandler* handler) { - if (!*args) - return false; - - char* ticketIdStr = strtok((char*)args, " "); - uint32 ticketId = atoi(ticketIdStr); - char* response = strtok(nullptr, "\n"); if (!response) return false; @@ -526,14 +469,14 @@ public: return true; } - static bool HandleGMTicketResponseAppendCommand(ChatHandler* handler, char const* args) + static bool HandleGMTicketResponseAppendCommand(ChatHandler* handler, uint32 ticketId) { - return _HandleGMTicketResponseAppendCommand(args, false, handler); + return _HandleGMTicketResponseAppendCommand(ticketId, false, handler); } - static bool HandleGMTicketResponseAppendLnCommand(ChatHandler* handler, char const* args) + static bool HandleGMTicketResponseAppendLnCommand(ChatHandler* handler, uint32 ticketId) { - return _HandleGMTicketResponseAppendCommand(args, true, handler); + return _HandleGMTicketResponseAppendCommand(ticketId, true, handler); } }; diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp index 88da4576c..c48253a90 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp @@ -44,12 +44,18 @@ enum Spells struct boss_curator : public BossAI { - boss_curator(Creature* creature) : BossAI(creature, DATA_CURATOR) { } + boss_curator(Creature* creature) : BossAI(creature, DATA_CURATOR) + { + scheduler.SetValidator([this] + { + return !me->HasUnitState(UNIT_STATE_CASTING); + }); + } void Reset() override { BossAI::Reset(); - me->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_ARCANE, true); + me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_ARCANE, true); me->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_PERIODIC_MANA_LEECH, true); me->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_POWER_BURN, true); me->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_POWER_BURN, true); @@ -132,18 +138,6 @@ struct boss_curator : public BossAI } summon->SetInCombatWithZone(); } - - void UpdateAI(uint32 diff) override - { - if (!UpdateVictim()) - return; - - scheduler.Update(diff); - if (me->HasUnitState(UNIT_STATE_CASTING)) - return; - - DoMeleeAttackIfReady(); - } }; void AddSC_boss_curator() diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp index 0adb88ffb..80f09e547 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp @@ -101,6 +101,7 @@ struct boss_netherspite : public BossAI BossAI::Reset(); berserk = false; HandleDoors(true); + DestroyPortals(); } void SummonPortals() @@ -219,6 +220,24 @@ struct boss_netherspite : public BossAI }); } + void DestroyPortals() + { + for (int i = 0; i < 3; ++i) + { + if (Creature* portal = ObjectAccessor::GetCreature(*me, PortalGUID[i])) + { + portal->DisappearAndDie(); + } + if (Creature* portal = ObjectAccessor::GetCreature(*me, BeamerGUID[i])) + { + portal->DisappearAndDie(); + } + + PortalGUID[i].Clear(); + BeamTarget[i].Clear(); + } + } + void SwitchToBanishPhase() { Talk(EMOTE_PHASE_BANISH); @@ -228,10 +247,7 @@ struct boss_netherspite : public BossAI DoCastSelf(SPELL_BANISH_VISUAL, true); DoCastSelf(SPELL_BANISH_ROOT, true); - for (uint32 id : PortalID) - { - summons.DespawnEntry(id); - } + DestroyPortals(); scheduler.Schedule(30s, [this](TaskContext) { diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp index fcb698653..72ef3e5dd 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp @@ -87,9 +87,19 @@ struct boss_nightbane : public BossAI { BossAI::Reset(); _skeletonscheduler.CancelAll(); - Phase = 1; - MovePhase = 0; - me->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE); + if (!_intro) + { + //when boss is reset and we're past the intro + //cannot despawn, but have to move to a location where he normally is + //me->SetHomePosition(IntroWay[7][0], IntroWay[7][1], IntroWay[7][2], 0); + Position preSpawnPosis = me->GetHomePosition(); + EnterEvadeMode(); + me->NearTeleportTo(preSpawnPosis); + me->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE); + _intro = true; + Phase = 1; + MovePhase = 0; + } me->SetSpeed(MOVE_RUN, 2.0f); me->SetDisableGravity(_intro); @@ -109,19 +119,6 @@ struct boss_nightbane : public BossAI _flying = false; _movement = false; - if (!_intro) - { - //when boss is reset and we're past the intro - //cannot despawn, but have to move to a location where he normally is - //me->SetHomePosition(IntroWay[7][0], IntroWay[7][1], IntroWay[7][2], 0); - Position preSpawnPosis = me->GetHomePosition(); - me->NearTeleportTo(preSpawnPosis); - instance->SetData(DATA_NIGHTBANE, NOT_STARTED); - _intro = true; - Phase = 1; - MovePhase = 0; - } - ScheduleHealthCheckEvent({ 75, 50, 25 }, [&]{ TakeOff(); }); @@ -136,11 +133,10 @@ struct boss_nightbane : public BossAI } } - void JustEngagedWith(Unit* /*who*/) override + void JustEngagedWith(Unit* who) override { - _JustEngagedWith(); - if (instance) - instance->SetData(DATA_NIGHTBANE, IN_PROGRESS); + BossAI::JustEngagedWith(who); + _intro = false; HandleTerraceDoors(false); Talk(YELL_AGGRO); @@ -238,7 +234,6 @@ struct boss_nightbane : public BossAI { if (id >= 8) { - _intro = false; //me->SetHomePosition(IntroWay[7][0], IntroWay[7][1], IntroWay[7][2], 0); //doesn't need home position because we have to "despawn" boss on reset me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE); diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp index df45f50f1..b8ca05175 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp @@ -18,51 +18,58 @@ #include "GameObject.h" #include "ScriptMgr.h" #include "ScriptedCreature.h" +#include "SpellAuras.h" #include "SpellInfo.h" +#include "SpellScript.h" #include "karazhan.h" #include "TaskScheduler.h" enum Texts { - SAY_AGGRO = 0, - SAY_FLAMEWREATH = 1, - SAY_BLIZZARD = 2, - SAY_EXPLOSION = 3, - SAY_DRINK = 4, - SAY_ELEMENTALS = 5, - SAY_KILL = 6, - SAY_TIMEOVER = 7, - SAY_DEATH = 8 + SAY_AGGRO = 0, + SAY_FLAMEWREATH = 1, + SAY_BLIZZARD = 2, + SAY_EXPLOSION = 3, + SAY_DRINK = 4, + SAY_ELEMENTALS = 5, + SAY_KILL = 6, + SAY_TIMEOVER = 7, + SAY_DEATH = 8, + SAY_ATIESH = 9, + EMOTE_ARCANE_EXPLOSION = 10 }; enum Spells { //Spells - SPELL_FROSTBOLT = 29954, - SPELL_FIREBALL = 29953, - SPELL_ARCMISSLE = 29955, - SPELL_CHAINSOFICE = 29991, - SPELL_DRAGONSBREATH = 29964, - SPELL_MASSSLOW = 30035, - SPELL_FLAME_WREATH = 29946, - SPELL_AOE_CS = 29961, - SPELL_PLAYERPULL = 32265, - SPELL_AEXPLOSION = 29973, - SPELL_MASS_POLY = 29963, - SPELL_BLINK_CENTER = 29967, - SPELL_CONJURE = 29975, - SPELL_DRINK = 30024, - SPELL_POTION = 32453, - SPELL_AOE_PYROBLAST = 29978, + SPELL_FROSTBOLT = 29954, + SPELL_FIREBALL = 29953, + SPELL_ARCMISSLE = 29955, + SPELL_CHAINSOFICE = 29991, + SPELL_DRAGONSBREATH = 29964, + SPELL_MASSSLOW = 30035, + SPELL_FLAME_WREATH = 30004, + SPELL_FLAME_WREATH_RING = 29946, + SPELL_FLAME_WREATH_RAN_THRU = 29947, // You ran through the flames! + SPELL_FLAME_WREATH_EXPLOSION = 29949, + SPELL_AOE_CS = 29961, + SPELL_PLAYERPULL = 32265, + SPELL_AEXPLOSION = 29973, + SPELL_MASS_POLY = 29963, + SPELL_BLINK_CENTER = 29967, + SPELL_CONJURE = 29975, + SPELL_DRINK = 30024, + SPELL_POTION = 32453, + SPELL_AOE_PYROBLAST = 29978, - SPELL_SUMMON_WELEMENTAL_1 = 29962, - SPELL_SUMMON_WELEMENTAL_2 = 37051, - SPELL_SUMMON_WELEMENTAL_3 = 37052, - SPELL_SUMMON_WELEMENTAL_4 = 37053, + SPELL_SUMMON_WELEMENTAL_1 = 29962, + SPELL_SUMMON_WELEMENTAL_2 = 37051, + SPELL_SUMMON_WELEMENTAL_3 = 37052, + SPELL_SUMMON_WELEMENTAL_4 = 37053, - SPELL_SUMMON_BLIZZARD = 29969, // Activates the Blizzard NPC + SPELL_SUMMON_BLIZZARD = 29969, // Activates the Blizzard NPC - SPELL_SHADOW_PYRO = 29978 + SPELL_SHADOW_PYRO = 29978 }; enum Creatures @@ -79,20 +86,11 @@ enum SuperSpell enum Groups { - GROUP_FLAMEWREATH = 0, - GROUP_DRINKING = 1 + GROUP_DRINKING = 0 }; Position const roomCenter = {-11158.f, -1920.f}; -Position const elementalPos[4] = -{ - {-11168.1f, -1939.29f, 232.092f, 1.46f}, - {-11138.2f, -1915.38f, 232.092f, 3.00f}, - {-11161.7f, -1885.36f, 232.092f, 4.59f}, - {-11192.4f, -1909.36f, 232.092f, 6.19f} -}; - struct boss_shade_of_aran : public BossAI { boss_shade_of_aran(Creature* creature) : BossAI(creature, DATA_ARAN) @@ -103,22 +101,11 @@ struct boss_shade_of_aran : public BossAI }); } - uint8 LastSuperSpell; - - ObjectGuid FlameWreathTarget[3]; - float FWTargPosX[3]; - float FWTargPosY[3]; - - uint32 CurrentNormalSpell; - void Reset() override { BossAI::Reset(); _drinkScheduler.CancelAll(); - LastSuperSpell = rand() % 3; - - for (uint8 i = 0; i < 3; ++i) - FlameWreathTarget[i].Clear(); + _lastSuperSpell = rand() % 3; CurrentNormalSpell = 0; @@ -127,9 +114,7 @@ struct boss_shade_of_aran : public BossAI _frostCooledDown = true; _drinking = false; - - // Not in progress - instance->SetData(DATA_ARAN, NOT_STARTED); + _hasDrunk = false; if (GameObject* libraryDoor = instance->instance->GetGameObject(instance->GetGuidData(DATA_GO_LIBRARY_DOOR))) { @@ -198,8 +183,7 @@ struct boss_shade_of_aran : public BossAI void JustDied(Unit* /*killer*/) override { Talk(SAY_DEATH); - - instance->SetData(DATA_ARAN, DONE); + _JustDied(); if (GameObject* libraryDoor = instance->instance->GetGameObject(instance->GetGuidData(DATA_GO_LIBRARY_DOOR))) { @@ -208,14 +192,30 @@ struct boss_shade_of_aran : public BossAI } } + void DamageTaken(Unit* doneBy, uint32& damage, DamageEffectType damagetype, SpellSchoolMask damageSchoolMask) override + { + BossAI::DamageTaken(doneBy, damage, damagetype, damageSchoolMask); + + if ((damagetype == DIRECT_DAMAGE || damagetype == SPELL_DIRECT_DAMAGE) && _drinking && me->GetReactState() == REACT_PASSIVE) + { + me->RemoveAurasDueToSpell(SPELL_DRINK); + me->SetStandState(UNIT_STAND_STATE_STAND); + me->SetReactState(REACT_AGGRESSIVE); + me->SetPower(POWER_MANA, me->GetMaxPower(POWER_MANA) - 32000); + _drinkScheduler.CancelGroup(GROUP_DRINKING); + _drinkScheduler.Schedule(1s, [this](TaskContext) + { + DoCastSelf(SPELL_AOE_PYROBLAST, false); + _drinking = false; + }); + } + } + void JustEngagedWith(Unit* /*who*/) override { + _JustEngagedWith(); Talk(SAY_AGGRO); - instance->SetData(DATA_ARAN, IN_PROGRESS); - - DoZoneInCombat(); - //handle timed closing door scheduler.Schedule(15s, [this](TaskContext) { @@ -226,11 +226,14 @@ struct boss_shade_of_aran : public BossAI } }).Schedule(1s, [this](TaskContext context) { - if (!me->IsNonMeleeSpellCast(false) && !_drinking) + context.Repeat(2s); + + if (!_drinking) { - Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100, true); - if (!target) + if (me->IsNonMeleeSpellCast(false)) + { return; + } uint32 Spells[3]; uint8 AvailableSpells = 0; @@ -252,49 +255,87 @@ struct boss_shade_of_aran : public BossAI ++AvailableSpells; } + // Should drink at 10%, need 10% mana for mass polymorph + if (!_hasDrunk && me->GetMaxPower(POWER_MANA) && (me->GetPower(POWER_MANA) * 100 / me->GetMaxPower(POWER_MANA)) < 13) + { + _drinking = true; + _hasDrunk = true; + me->InterruptNonMeleeSpells(true); + Talk(SAY_DRINK); + DoCastAOE(SPELL_MASS_POLY); + me->SetReactState(REACT_PASSIVE); + + // Start drinking after conjuring drinks + _drinkScheduler.Schedule(2s, GROUP_DRINKING, [this](TaskContext) + { + DoCastSelf(SPELL_CONJURE); + }).Schedule(4s, GROUP_DRINKING, [this](TaskContext) + { + me->SetStandState(UNIT_STAND_STATE_SIT); + DoCastSelf(SPELL_DRINK); + }); + + _drinkScheduler.Schedule(10s, GROUP_DRINKING, [this](TaskContext) + { + me->SetStandState(UNIT_STAND_STATE_STAND); + me->SetReactState(REACT_AGGRESSIVE); + me->SetPower(POWER_MANA, me->GetMaxPower(POWER_MANA) - 32000); + DoCastSelf(SPELL_AOE_PYROBLAST); + _drinkScheduler.CancelGroup(GROUP_DRINKING); + _drinking = false; + }); + + return; + } + //If no available spells wait 1 second and try again if (AvailableSpells) { CurrentNormalSpell = Spells[rand() % AvailableSpells]; - if (!me->CanCastSpell(CurrentNormalSpell)) + if (SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(CurrentNormalSpell)) { - me->SetWalk(false); - me->ResumeChasingVictim(); - } - else - { - DoCast(target, CurrentNormalSpell); - if (me->GetVictim()) + if (int32(me->GetPower(POWER_MANA)) < spellInfo->CalcPowerCost(me, (SpellSchoolMask)spellInfo->SchoolMask)) { - me->GetMotionMaster()->MoveChase(me->GetVictim(), 45.0f); + DoCastSelf(SPELL_POTION); + } + else + { + if (!me->CanCastSpell(CurrentNormalSpell)) + { + me->SetWalk(false); + me->ResumeChasingVictim(); + } + else + { + DoCastRandomTarget(CurrentNormalSpell, 0, 100.0f); + if (me->GetVictim()) + { + me->GetMotionMaster()->MoveChase(me->GetVictim(), 45.0f); + } + } } } } } - context.Repeat(2s); }).Schedule(5s, [this](TaskContext context) { if (!_drinking) { - switch (urand(0, 1)) - { - case 0: - DoCastSelf(SPELL_AOE_CS); - break; - case 1: - DoCastRandomTarget(SPELL_CHAINSOFICE); - break; - } + urand(0, 1) ? DoCastSelf(SPELL_AOE_CS) : DoCastRandomTarget(SPELL_CHAINSOFICE); } context.Repeat(5s, 20s); - }).Schedule(35s, [this](TaskContext context) + }).Schedule(6s, [this](TaskContext context) { if (!_drinking) { + me->ClearProhibitedSpellTimers(); + + DoCastSelf(SPELL_BLINK_CENTER, true); + uint8 Available[2]; - switch (LastSuperSpell) + switch (_lastSuperSpell) { case SUPER_AE: Available[0] = SUPER_FLAME; @@ -310,49 +351,21 @@ struct boss_shade_of_aran : public BossAI break; } - LastSuperSpell = Available[urand(0, 1)]; + _lastSuperSpell = Available[urand(0, 1)]; - switch (LastSuperSpell) + switch (_lastSuperSpell) { case SUPER_AE: Talk(SAY_EXPLOSION); - - DoCastSelf(SPELL_BLINK_CENTER, true); + Talk(EMOTE_ARCANE_EXPLOSION); DoCastSelf(SPELL_PLAYERPULL, true); DoCastSelf(SPELL_MASSSLOW, true); DoCastSelf(SPELL_AEXPLOSION, false); break; - case SUPER_FLAME: Talk(SAY_FLAMEWREATH); - - scheduler.Schedule(20s, GROUP_FLAMEWREATH, [this](TaskContext) - { - scheduler.CancelGroup(GROUP_FLAMEWREATH); - }).Schedule(500ms, GROUP_FLAMEWREATH, [this](TaskContext context) - { - for (uint8 i = 0; i < 3; ++i) - { - if (!FlameWreathTarget[i]) - continue; - - Unit* unit = ObjectAccessor::GetUnit(*me, FlameWreathTarget[i]); - if (unit && !unit->IsWithinDist2d(FWTargPosX[i], FWTargPosY[i], 3)) - { - unit->CastSpell(unit, 20476, true, 0, 0, me->GetGUID()); - FlameWreathTarget[i].Clear(); - } - } - context.Repeat(500ms); - }); - - FlameWreathTarget[0].Clear(); - FlameWreathTarget[1].Clear(); - FlameWreathTarget[2].Clear(); - - FlameWreathEffect(); + DoCastAOE(SPELL_FLAME_WREATH); break; - case SUPER_BLIZZARD: Talk(SAY_BLIZZARD); DoCastAOE(SPELL_SUMMON_BLIZZARD); @@ -360,51 +373,6 @@ struct boss_shade_of_aran : public BossAI } } context.Repeat(35s, 40s); - }).Schedule(1s, [this](TaskContext context){ - if (me->GetMaxPower(POWER_MANA) && (me->GetPower(POWER_MANA) * 100 / me->GetMaxPower(POWER_MANA)) < 20) - { - _drinking = true; - me->InterruptNonMeleeSpells(true); - Talk(SAY_DRINK); - DoCastSelf(SPELL_MASS_POLY, true); - DoCastSelf(SPELL_CONJURE, false); - me->SetReactState(REACT_PASSIVE); - me->SetStandState(UNIT_STAND_STATE_SIT); - DoCastSelf(SPELL_DRINK, true); - _currentHealth = me->GetHealth(); - _drinkScheduler.Schedule(500ms, GROUP_DRINKING, [this](TaskContext context) - { - //check for damage to interrupt - if (me->GetHealth() < _currentHealth) - { - me->RemoveAurasDueToSpell(SPELL_DRINK); - me->SetStandState(UNIT_STAND_STATE_STAND); - me->SetReactState(REACT_AGGRESSIVE); - me->SetPower(POWER_MANA, me->GetMaxPower(POWER_MANA) - 32000); - DoCastSelf(SPELL_POTION, false); - DoCastSelf(SPELL_AOE_PYROBLAST, false); - _drinkScheduler.CancelGroup(GROUP_DRINKING); - _drinking = false; - } else - { - context.Repeat(500ms); - } - }).Schedule(10s, GROUP_DRINKING, [this](TaskContext) - { - me->SetStandState(UNIT_STAND_STATE_STAND); - me->SetReactState(REACT_AGGRESSIVE); - me->SetPower(POWER_MANA, me->GetMaxPower(POWER_MANA) - 32000); - DoCastSelf(SPELL_POTION, true); - DoCastSelf(SPELL_AOE_PYROBLAST, false); - _drinkScheduler.CancelGroup(GROUP_DRINKING); - _drinking = false; - }); - context.Repeat(12s); //semi-arbitrary duration to envelop drinking duration - } - else - { - context.Repeat(1s); - } }).Schedule(12min, [this](TaskContext context) { for (uint32 i = 0; i < 5; ++i) @@ -422,41 +390,6 @@ struct boss_shade_of_aran : public BossAI }); } - void FlameWreathEffect() - { - std::vector targets; - ThreatContainer::StorageType const& t_list = me->GetThreatMgr().GetThreatList(); - - if (t_list.empty()) - return; - - //store the threat list in a different container - for (ThreatContainer::StorageType::const_iterator itr = t_list.begin(); itr != t_list.end(); ++itr) - { - Unit* target = ObjectAccessor::GetUnit(*me, (*itr)->getUnitGuid()); - //only on alive players - if (target && target->IsAlive() && target->GetTypeId() == TYPEID_PLAYER) - targets.push_back(target); - } - - //cut down to size if we have more than 3 targets - while (targets.size() > 3) - targets.erase(targets.begin() + rand() % targets.size()); - - uint32 i = 0; - for (std::vector::const_iterator itr = targets.begin(); itr != targets.end(); ++itr) - { - if (*itr) - { - FlameWreathTarget[i] = (*itr)->GetGUID(); - FWTargPosX[i] = (*itr)->GetPositionX(); - FWTargPosY[i] = (*itr)->GetPositionY(); - DoCast((*itr), SPELL_FLAME_WREATH, true); - ++i; - } - } - } - void UpdateAI(uint32 diff) override { scheduler.Update(diff); @@ -483,9 +416,6 @@ struct boss_shade_of_aran : public BossAI Spell->Effects[2].Effect != SPELL_EFFECT_INTERRUPT_CAST) || !me->IsNonMeleeSpellCast(false)) return; - //Interrupt effect - me->InterruptNonMeleeSpells(false); - //Normally we would set the cooldown equal to the spell duration //but we do not have access to the DurationStore @@ -505,14 +435,95 @@ struct boss_shade_of_aran : public BossAI private: TaskScheduler _drinkScheduler; + uint32 _lastSuperSpell; + + uint32 CurrentNormalSpell; + bool _arcaneCooledDown; bool _fireCooledDown; bool _frostCooledDown; bool _drinking; - uint32 _currentHealth; + bool _hasDrunk; +}; + +// 30004 - Flame Wreath +class spell_flamewreath : public SpellScript +{ + PrepareSpellScript(spell_flamewreath); + + bool Validate(SpellInfo const* /*spell*/) override + { + return ValidateSpellInfo({ SPELL_FLAME_WREATH_RING }); + } + + void FilterTargets(std::list& targets) + { + uint8 maxSize = 3; + + if (targets.size() > maxSize) + { + Acore::Containers::RandomResize(targets, maxSize); + } + + _targets = targets; + } + + void HandleFinish() + { + for (auto const& target : _targets) + { + if (Unit* targetUnit = target->ToUnit()) + { + GetCaster()->CastSpell(targetUnit, SPELL_FLAME_WREATH_RING, true); + } + } + } + +private: + std::list _targets; + + void Register() override + { + OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_flamewreath::FilterTargets, EFFECT_ALL, TARGET_UNIT_SRC_AREA_ENEMY); + AfterCast += SpellCastFn(spell_flamewreath::HandleFinish); + } +}; + +// 29946 - Flame Wreath (visual effect) +class spell_flamewreath_aura : public AuraScript +{ + PrepareAuraScript(spell_flamewreath_aura); + + bool Validate(SpellInfo const* /*spell*/) override + { + return ValidateSpellInfo({ SPELL_FLAME_WREATH_RAN_THRU, SPELL_FLAME_WREATH_EXPLOSION }); + } + + void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) + { + if (GetTargetApplication()->GetRemoveMode() == AURA_REMOVE_BY_DEFAULT && GetDuration()) + { + if (Unit* target = GetTarget()) + { + target->CastSpell(target, SPELL_FLAME_WREATH_RAN_THRU, true); + + target->m_Events.AddEventAtOffset([target] { + target->RemoveAurasDueToSpell(SPELL_FLAME_WREATH_RAN_THRU); + target->CastSpell(target, SPELL_FLAME_WREATH_EXPLOSION, true); + }, 1s); + } + } + } + + void Register() override + { + OnEffectRemove += AuraEffectRemoveFn(spell_flamewreath_aura::OnRemove, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL); + } }; void AddSC_boss_shade_of_aran() { RegisterKarazhanCreatureAI(boss_shade_of_aran); + RegisterSpellScript(spell_flamewreath); + RegisterSpellScript(spell_flamewreath_aura); } diff --git a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp index 1c037f381..59a348e61 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp @@ -231,20 +231,12 @@ struct boss_dorothee : public ScriptedAI me->DespawnOrUnsummon(); } - void AttackStart(Unit* who) override + void SummonedCreatureDies(Creature* creature, Unit* /*killer*/) override { - if (me->HasUnitFlag(UNIT_FLAG_NON_ATTACKABLE)) - return; - - ScriptedAI::AttackStart(who); - } - - void MoveInLineOfSight(Unit* who) override - { - if (me->HasUnitFlag(UNIT_FLAG_NON_ATTACKABLE)) - return; - - ScriptedAI::MoveInLineOfSight(who); + if (creature->GetEntry() == NPC_TITO) + { + Talk(SAY_DOROTHEE_TITO_DEATH); + } } void EnterEvadeMode(EvadeReason reason) override @@ -288,8 +280,6 @@ struct npc_tito : public ScriptedAI InstanceScript* instance; - void Reset() override { } - void JustEngagedWith(Unit* /*who*/) override { _scheduler.Schedule(10s, [this](TaskContext context) @@ -299,18 +289,6 @@ struct npc_tito : public ScriptedAI }); } - void JustDied(Unit* /*killer*/) override - { - if (Creature* Dorothee = instance->GetCreature(DATA_DOROTHEE)) - { - if (Dorothee->IsAlive()) - { - Talk(SAY_DOROTHEE_TITO_DEATH, Dorothee); - } - } - me->DespawnOrUnsummon(); - } - void UpdateAI(uint32 diff) override { if (!UpdateVictim()) @@ -351,17 +329,6 @@ struct boss_roar : public ScriptedAI } } - void Reset() override { } - - void MoveInLineOfSight(Unit* who) override - - { - if (me->HasUnitFlag(UNIT_FLAG_NON_ATTACKABLE)) - return; - - ScriptedAI::MoveInLineOfSight(who); - } - void EnterEvadeMode(EvadeReason reason) override { ScriptedAI::EnterEvadeMode(reason); @@ -373,14 +340,6 @@ struct boss_roar : public ScriptedAI } } - void AttackStart(Unit* who) override - { - if (me->HasUnitFlag(UNIT_FLAG_NON_ATTACKABLE)) - return; - - ScriptedAI::AttackStart(who); - } - void JustEngagedWith(Unit* /*who*/) override { Talk(SAY_ROAR_AGGRO); @@ -458,24 +417,6 @@ struct boss_strawman : public ScriptedAI } } - void Reset() override { } - - void AttackStart(Unit* who) override - { - if (me->HasUnitFlag(UNIT_FLAG_NON_ATTACKABLE)) - return; - - ScriptedAI::AttackStart(who); - } - - void MoveInLineOfSight(Unit* who) override - { - if (me->HasUnitFlag(UNIT_FLAG_NON_ATTACKABLE)) - return; - - ScriptedAI::MoveInLineOfSight(who); - } - void EnterEvadeMode(EvadeReason reason) override { ScriptedAI::EnterEvadeMode(reason); @@ -601,22 +542,6 @@ struct boss_tinhead : public ScriptedAI me->DespawnOrUnsummon(); } - void AttackStart(Unit* who) override - { - if (me->HasUnitFlag(UNIT_FLAG_NON_ATTACKABLE)) - return; - - ScriptedAI::AttackStart(who); - } - - void MoveInLineOfSight(Unit* who) override - { - if (me->HasUnitFlag(UNIT_FLAG_NON_ATTACKABLE)) - return; - - ScriptedAI::MoveInLineOfSight(who); - } - void EnterEvadeMode(EvadeReason reason) override { ScriptedAI::EnterEvadeMode(reason); @@ -763,6 +688,7 @@ enum RedRidingHood SPELL_LITTLE_RED_RIDING_HOOD = 30768, SPELL_TERRIFYING_HOWL = 30752, SPELL_WIDE_SWIPE = 30761, + SPELL_PICNIC_BASKET_SMELL = 30755, CREATURE_BIG_BAD_WOLF = 17521, @@ -826,16 +752,6 @@ struct boss_bigbadwolf : public ScriptedAI InstanceScript* instance; - ObjectGuid HoodGUID; - - void Reset() override - { - HoodGUID.Clear(); - _tempThreat = 0; - - _isChasing = false; - } - void JustEngagedWith(Unit* /*who*/) override { instance->DoUseDoorOrButton(instance->GetGuidData(DATA_GO_STAGEDOORLEFT)); @@ -844,40 +760,14 @@ struct boss_bigbadwolf : public ScriptedAI _scheduler.Schedule(30s, [this](TaskContext context) { - if (!_isChasing) + if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100, true)) { - if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100, true)) - { - Talk(SAY_WOLF_HOOD); - DoCast(target, SPELL_LITTLE_RED_RIDING_HOOD, true); - _tempThreat = DoGetThreat(target); - if (_tempThreat) - { - DoModifyThreatByPercent(target, -100); - } - HoodGUID = target->GetGUID(); - me->AddThreat(target, 1000000.0f); - _isChasing = true; - context.Repeat(20s); - } + Talk(SAY_WOLF_HOOD); + DoCast(target, SPELL_LITTLE_RED_RIDING_HOOD, true); + target->CastSpell(me, SPELL_PICNIC_BASKET_SMELL, true); } - else - { - _isChasing = false; - if (Unit* target = ObjectAccessor::GetUnit(*me, HoodGUID)) - { - HoodGUID.Clear(); - if (DoGetThreat(target)) - { - DoModifyThreatByPercent(target, -100); - } - me->AddThreat(target, _tempThreat); - _tempThreat = 0; - } - - context.Repeat(40s); - } + context.Repeat(40s); }).Schedule(25s, 35s, [this](TaskContext context) { DoCastAOE(SPELL_TERRIFYING_HOWL); @@ -920,15 +810,10 @@ struct boss_bigbadwolf : public ScriptedAI DoMeleeAttackIfReady(); - if (_isChasing) - return; - _scheduler.Update(diff); } private: TaskScheduler _scheduler; - bool _isChasing; - float _tempThreat; }; /**********************************************/ diff --git a/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp b/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp index 0fe84199b..5e595c568 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp @@ -48,6 +48,12 @@ ObjectData const creatureData[] = { 0, 0 } }; +ObjectData const gameObjectData[] = +{ + { GO_SIDE_ENTRANCE_DOOR, DATA_GO_SIDE_ENTRANCE_DOOR }, + { 0, 0 } +}; + class instance_karazhan : public InstanceMapScript { public: @@ -64,7 +70,7 @@ public: { SetHeaders(DataHeader); SetBossNumber(EncounterCount); - LoadObjectData(creatureData, nullptr); + LoadObjectData(creatureData, gameObjectData); // 1 - OZ, 2 - HOOD, 3 - RAJ, this never gets altered. OperaEvent = urand(EVENT_OZ, EVENT_RAJ); @@ -300,13 +306,11 @@ public: { HandleGameObject(m_uiStageDoorLeftGUID, true); HandleGameObject(m_uiStageDoorRightGUID, true); - if (GameObject* sideEntrance = instance->GetGameObject(m_uiSideEntranceDoor)) - sideEntrance->RemoveGameObjectFlag(GO_FLAG_LOCKED); instance->UpdateEncounterState(ENCOUNTER_CREDIT_KILL_CREATURE, 16812, nullptr); } else if (state == FAIL) { - HandleGameObject(m_uiStageDoorLeftGUID, false); + HandleGameObject(m_uiStageDoorLeftGUID, true); HandleGameObject(m_uiStageDoorRightGUID, false); HandleGameObject(m_uiCurtainGUID, false); DoRespawnCreature(_barnesGUID, true); @@ -372,11 +376,10 @@ public: MastersTerraceDoor[1] = go->GetGUID(); break; case GO_SIDE_ENTRANCE_DOOR: - m_uiSideEntranceDoor = go->GetGUID(); if (GetBossState(DATA_OPERA_PERFORMANCE) == DONE) - go->SetGameObjectFlag(GO_FLAG_LOCKED); - else go->RemoveGameObjectFlag(GO_FLAG_LOCKED); + else + go->SetGameObjectFlag(GO_FLAG_LOCKED); break; case GO_DUST_COVERED_CHEST: DustCoveredChest = go->GetGUID(); @@ -477,8 +480,6 @@ public: return m_uiLibraryDoor; case DATA_GO_MASSIVE_DOOR: return m_uiMassiveDoor; - case DATA_GO_SIDE_ENTRANCE_DOOR: - return m_uiSideEntranceDoor; case DATA_GO_GAME_DOOR: return m_uiGamesmansDoor; case DATA_GO_GAME_EXIT_DOOR: @@ -519,7 +520,6 @@ public: ObjectGuid m_uiNightBaneGUID; ObjectGuid m_uiLibraryDoor; // Door at Shade of Aran ObjectGuid m_uiMassiveDoor; // Door at Netherspite - ObjectGuid m_uiSideEntranceDoor; // Side Entrance ObjectGuid m_uiGamesmansDoor; // Door before Chess ObjectGuid m_uiGamesmansExitDoor; // Door after Chess ObjectGuid m_uiNetherspaceDoor; // Door at Malchezaar diff --git a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp index cbe5a9998..d818a42c0 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp @@ -135,7 +135,6 @@ public: { npc_barnesAI(Creature* creature) : npc_escortAI(creature) { - RaidWiped = false; m_uiEventId = 0; instance = creature->GetInstanceScript(); } @@ -146,11 +145,9 @@ public: uint32 TalkCount; uint32 TalkTimer; - uint32 WipeTimer; uint32 m_uiEventId; bool PerformanceReady; - bool RaidWiped; void Reset() override { @@ -158,7 +155,6 @@ public: TalkCount = 0; TalkTimer = 2000; - WipeTimer = 5000; PerformanceReady = false; @@ -183,8 +179,8 @@ public: switch (waypointId) { case 0: - DoCast(me, SPELL_TUXEDO, false); - instance->DoUseDoorOrButton(instance->GetGuidData(DATA_GO_STAGEDOORLEFT)); + DoCastSelf(SPELL_TUXEDO); + instance->HandleGameObject(instance->GetGuidData(DATA_GO_STAGEDOORLEFT), true); break; case 4: TalkCount = 0; @@ -276,8 +272,6 @@ public: creature->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE); } - RaidWiped = false; - instance->SetData(DATA_SPAWN_OPERA_DECORATIONS, m_uiEventId); } @@ -303,43 +297,6 @@ public: } else TalkTimer -= diff; } - - if (PerformanceReady) - { - if (!RaidWiped) - { - if (WipeTimer <= diff) - { - Map* map = me->GetMap(); - if (!map->IsDungeon()) - return; - - Map::PlayerList const& PlayerList = map->GetPlayers(); - if (PlayerList.IsEmpty()) - return; - - RaidWiped = true; - for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) - { - if (i->GetSource()->IsAlive() && !i->GetSource()->IsGameMaster()) - { - RaidWiped = false; - break; - } - } - - if (RaidWiped) - { - RaidWiped = true; - EnterEvadeMode(); - return; - } - - WipeTimer = 15000; - } - else WipeTimer -= diff; - } - } } }; @@ -391,15 +348,16 @@ public: AddGossipItemFor(player, GOSSIP_ICON_DOT, OZ_GM_GOSSIP3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); } - if (npc_barnesAI* pBarnesAI = CAST_AI(npc_barnes::npc_barnesAI, creature->AI())) + if (instance->GetBossState(DATA_OPERA_PERFORMANCE) != FAIL) { - if (!pBarnesAI->RaidWiped) - SendGossipMenuFor(player, BARNES_TEXT_IS_READY, creature->GetGUID()); - else - SendGossipMenuFor(player, BARNES_TEXT_WIPED, creature->GetGUID()); - - return true; + SendGossipMenuFor(player, BARNES_TEXT_IS_READY, creature->GetGUID()); } + else + { + SendGossipMenuFor(player, BARNES_TEXT_WIPED, creature->GetGUID()); + } + + return true; } } @@ -604,8 +562,32 @@ public: }; }; +class at_karazhan_side_entrance : public OnlyOnceAreaTriggerScript +{ +public: + at_karazhan_side_entrance() : OnlyOnceAreaTriggerScript("at_karazhan_side_entrance") { } + + bool _OnTrigger(Player* player, AreaTrigger const* /*at*/) override + { + if (InstanceScript* instance = player->GetInstanceScript()) + { + if (instance->GetBossState(DATA_OPERA_PERFORMANCE) == DONE) + { + if (GameObject* door = instance->GetGameObject(DATA_GO_SIDE_ENTRANCE_DOOR)) + { + instance->HandleGameObject(ObjectGuid::Empty, true, door); + door->RemoveGameObjectFlag(GO_FLAG_LOCKED); + } + } + } + + return false; + } +}; + void AddSC_karazhan() { new npc_barnes(); new npc_image_of_medivh(); + new at_karazhan_side_entrance(); } diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp index 65b8c64f1..edfa3fb6e 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp @@ -203,52 +203,6 @@ enum ScarletMonasteryTrashMisc SPELL_FORGIVENESS = 28697, }; -class npc_scarlet_guard : public CreatureScript -{ -public: - npc_scarlet_guard() : CreatureScript("npc_scarlet_guard") { } - - struct npc_scarlet_guardAI : public SmartAI - { - npc_scarlet_guardAI(Creature* creature) : SmartAI(creature) { } - - void Reset() override - { - SayAshbringer = false; - } - - void MoveInLineOfSight(Unit* who) override - { - if (who && who->GetDistance2d(me) < 12.0f) - { - if (Player* player = who->ToPlayer()) - { - if (player->HasAura(AURA_ASHBRINGER) && !SayAshbringer) - { - Talk(SAY_WELCOME); - me->SetFaction(FACTION_FRIENDLY); - me->SetSheath(SHEATH_STATE_UNARMED); - me->SetFacingToObject(player); - me->SetStandState(UNIT_STAND_STATE_KNEEL); - me->AddAura(SPELL_AURA_MOD_ROOT, me); - me->CastSpell(me, SPELL_AURA_MOD_ROOT, true); - SayAshbringer = true; - } - } - } - - SmartAI::MoveInLineOfSight(who); - } - private: - bool SayAshbringer = false; - }; - - CreatureAI* GetAI(Creature* creature) const override - { - return GetScarletMonasteryAI(creature); - } -}; - enum MograineEvents { EVENT_SPELL_CRUSADER_STRIKE = 1, @@ -733,7 +687,6 @@ public: void AddSC_instance_scarlet_monastery() { new instance_scarlet_monastery(); - new npc_scarlet_guard(); new npc_fairbanks(); new npc_mograine(); new boss_high_inquisitor_whitemane(); diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp index 12ebadca6..af90c050c 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp @@ -289,9 +289,6 @@ public: ResetTimer = 5000; SpawnAdds(); - - me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID, 46916); - me->SetByteValue(UNIT_FIELD_BYTES_2, 0, SHEATH_STATE_MELEE); } void JustEngagedWith(Unit* /*who*/) override diff --git a/src/server/scripts/Events/brewfest.cpp b/src/server/scripts/Events/brewfest.cpp index b202673cd..53c5ddded 100644 --- a/src/server/scripts/Events/brewfest.cpp +++ b/src/server/scripts/Events/brewfest.cpp @@ -1367,13 +1367,15 @@ enum BrewfestRevelerEnum FACTION_ALLIANCE = 1934, FACTION_HORDE = 1935, - SPELL_BREWFEST_REVELER_TRANSFORM_GOBLIN_MALE = 44003, - SPELL_BREWFEST_REVELER_TRANSFORM_GOBLIN_FEMALE = 44004, - SPELL_BREWFEST_REVELER_TRANSFORM_BE = 43907, - SPELL_BREWFEST_REVELER_TRANSFORM_ORC = 43914, - SPELL_BREWFEST_REVELER_TRANSFORM_TAUREN = 43915, - SPELL_BREWFEST_REVELER_TRANSFORM_TROLL = 43916, - SPELL_BREWFEST_REVELER_TRANSFORM_UNDEAD = 43917 + SPELL_BREWFEST_REVELER_TRANSFORM_GOBLIN_MALE = 44003, + SPELL_BREWFEST_REVELER_TRANSFORM_GOBLIN_FEMALE = 44004, + SPELL_BREWFEST_REVELER_TRANSFORM_BE = 43907, + SPELL_BREWFEST_REVELER_TRANSFORM_ORC = 43914, + SPELL_BREWFEST_REVELER_TRANSFORM_TAUREN = 43915, + SPELL_BREWFEST_REVELER_TRANSFORM_TROLL = 43916, + SPELL_BREWFEST_REVELER_TRANSFORM_UNDEAD = 43917, + + SPELL_DRUNKEN_BREWFEST_REVELER_TRANSFORM_GOBLIN_MALE = 44096 }; class spell_brewfest_reveler_transform : public AuraScript @@ -1394,6 +1396,7 @@ class spell_brewfest_reveler_transform : public AuraScript break; case SPELL_BREWFEST_REVELER_TRANSFORM_GOBLIN_MALE: case SPELL_BREWFEST_REVELER_TRANSFORM_GOBLIN_FEMALE: + case SPELL_DRUNKEN_BREWFEST_REVELER_TRANSFORM_GOBLIN_MALE: factionId = FACTION_FRIENDLY; break; default: diff --git a/src/server/scripts/Events/midsummer.cpp b/src/server/scripts/Events/midsummer.cpp index 8c9b251bb..d82b54d99 100644 --- a/src/server/scripts/Events/midsummer.cpp +++ b/src/server/scripts/Events/midsummer.cpp @@ -23,6 +23,7 @@ #include "Spell.h" #include "SpellAuras.h" #include "SpellScript.h" +#include enum eBonfire { @@ -46,6 +47,19 @@ public: } }; +enum torchToss +{ + GO_TORCH_TARGET_BRAZIER = 187708, + NPC_TORCH_TOSS_TARGET_BUNNY = 25535, + + SPELL_TARGET_INDICATOR_RANK_1 = 43313, + SPELL_TORCH_TOSS_LAND = 46054, + SPELL_BRAZIERS_HIT_VISUAL = 45724, + SPELL_TORCH_TOSS_SUCCESS_A = 45719, + SPELL_TORCH_TOSS_SUCCESS_H = 46651, + SPELL_TORCH_TOSS_TRAINING = 45716, +}; + struct npc_midsummer_torch_target : public ScriptedAI { npc_midsummer_torch_target(Creature* creature) : ScriptedAI(creature) @@ -54,7 +68,7 @@ struct npc_midsummer_torch_target : public ScriptedAI startTimer = 1; posVec.clear(); playerGUID.Clear(); - me->CastSpell(me, 43313, true); + me->CastSpell(me, SPELL_TARGET_INDICATOR_RANK_1, true); counter = 0; maxCount = 0; } @@ -82,12 +96,12 @@ struct npc_midsummer_torch_target : public ScriptedAI if (posVec.empty()) return; // Triggered spell from torch - if (spellInfo->Id == 46054 && caster->GetTypeId() == TYPEID_PLAYER) + if (spellInfo->Id == SPELL_TORCH_TOSS_LAND && caster->GetTypeId() == TYPEID_PLAYER) { - me->CastSpell(me, 45724, true); // hit visual anim + me->CastSpell(me, SPELL_BRAZIERS_HIT_VISUAL, true); // hit visual anim if (++counter >= maxCount) { - caster->CastSpell(caster, (caster->ToPlayer()->GetTeamId() ? 46651 : 45719), true); // quest complete spell + caster->CastSpell(caster, (caster->ToPlayer()->GetTeamId() ? SPELL_TORCH_TOSS_SUCCESS_H : SPELL_TORCH_TOSS_SUCCESS_A), true); // quest complete spell me->DespawnOrUnsummon(1); return; } @@ -129,7 +143,7 @@ struct npc_midsummer_torch_target : public ScriptedAI void FillPositions() { std::list gobjList; - me->GetGameObjectListWithEntryInGrid(gobjList, 187708 /*TORCH_GO*/, 30.0f); + me->GetGameObjectListWithEntryInGrid(gobjList, GO_TORCH_TARGET_BRAZIER, 30.0f); for (std::list::const_iterator itr = gobjList.begin(); itr != gobjList.end(); ++itr) { Position pos; @@ -145,8 +159,6 @@ struct npc_midsummer_torch_target : public ScriptedAI int8 num = urand(0, posVec.size() - 1); Position pos; pos.Relocate(posVec.at(num)); - me->m_last_notify_position.Relocate(0.0f, 0.0f, 0.0f); - me->m_last_notify_mstime = GameTime::GetGameTimeMS().count() + 10000; me->NearTeleportTo(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation()); } @@ -169,7 +181,7 @@ class spell_gen_crab_disguise : public AuraScript bool Validate(SpellInfo const* /*spell*/) override { - return ValidateSpellInfo({ SPELL_CRAB_DISGUISE }); + return ValidateSpellInfo({ SPELL_APPLY_DIGUISE, SPELL_FADE_DIGUISE }); } void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) @@ -199,17 +211,293 @@ class spell_gen_crab_disguise : public AuraScript enum RibbonPole { + GO_RIBBON_POLE = 181605, + SPELL_RIBBON_POLE_CHANNEL_VISUAL = 29172, + SPELL_RIBBON_POLE_CHANNEL_VISUAL_2 = 29531, + SPELL_TEST_RIBBON_POLE_CHANNEL_BLUE = 29705, + SPELL_TEST_RIBBON_POLE_CHANNEL_RED = 29726, + SPELL_TEST_RIBBON_POLE_CHANNEL_PINK = 29727, + // player spinning/rorating around himself + SPELL_RIBBON_POLE_PERIODIC_VISUAL = 45406, + // spew lava trails + SPELL_RIBBON_POLE_FIRE_SPIRAL_VISUAL= 45421, + // blue fire ring, duration 5s + SPELL_FLAME_RING = 46842, + // red fire ring, duration 5s + SPELL_FLAME_PATCH = 46836, + // single firework explosion + SPELL_RIBBON_POLE_FIREWORK = 46847, + SPELL_RIBBON_POLE_GROUND_FLOWER = 46969, SPELL_RIBBON_POLE_XP = 29175, - SPELL_RIBBON_POLE_FIREWORKS = 46971, NPC_RIBBON_POLE_DEBUG_TARGET = 17066, + NPC_GROUND_FLOWER = 25518, + NPC_BIG_DANCING_FLAMES = 26267, + NPC_RIBBON_POLE_FIRE_SPIRAL_BUNNY = 25303, + + // dancing players count + THRESHOLD_FLAME_CIRCLE = 1, + THRESHOLD_FIREWORK = 2, + THRESHOLD_FIREWORK_3 = 3, + THRESHOLD_FIREWORK_5 = 5, + THRESHOLD_GROUND_FLOWERS = 3, + THRESHOLD_SPEW_LAVA = 6, + THRESHOLD_DANCING_FLAMES = 7, + + MAX_COUNT_GROUND_FLOWERS = 3, + MAX_COUNT_SPEW_LAVA_TARGETS = 2, + MAX_COUNT_DANCING_FLAMES = 4, +}; + +struct npc_midsummer_ribbon_pole_target : public ScriptedAI +{ + npc_midsummer_ribbon_pole_target(Creature* creature) : ScriptedAI(creature) + { + // ribbonPole trap also spawns this NPC (currently unwanted) + if (me->ToTempSummon()) + me->DespawnOrUnsummon(); + + _ribbonPole = nullptr; + _bunny = nullptr; + _dancerList.clear(); + + LocateRibbonPole(); + SpawnFireSpiralBunny(); + + _scheduler.Schedule(1s, [this](TaskContext context) + { + DoCleanupChecks(); + context.Repeat(); + }) + .Schedule(5s, [this](TaskContext context) + { + DoFlameCircleChecks(); + context.Repeat(); + }) + .Schedule(15s, [this](TaskContext context) + { + DoFireworkChecks(); + context.Repeat(); + }) + .Schedule(10s, [this](TaskContext context) + { + DoGroundFlowerChecks(); + context.Repeat(); + }) + .Schedule(10s, [this](TaskContext context) + { + DoSpewLavaChecks(); + context.Repeat(); + }) + .Schedule(15s, [this](TaskContext context) + { + DoDancingFLameChecks(); + context.Repeat(); + }); + } + + void SpellHit(Unit* caster, SpellInfo const* spell) override + { + Player* dancer = caster->ToPlayer(); + if (!dancer) + return; + + switch (spell->Id) + { + case SPELL_TEST_RIBBON_POLE_CHANNEL_BLUE: + case SPELL_TEST_RIBBON_POLE_CHANNEL_RED: + case SPELL_TEST_RIBBON_POLE_CHANNEL_PINK: + break; + default: + return; + } + + // prevent duplicates + if (std::find(_dancerList.begin(), _dancerList.end(), dancer) != _dancerList.end()) + return; + + _dancerList.push_back(dancer); + } + + void LocateRibbonPole() + { + _scheduler.Schedule(420ms, [this](TaskContext context) + { + _ribbonPole = me->FindNearestGameObject(GO_RIBBON_POLE, 10.0f); + + if (!_ribbonPole) + context.Repeat(420ms); + }); + } + + void SpawnFireSpiralBunny() + { + _bunny = me->FindNearestCreature(NPC_RIBBON_POLE_FIRE_SPIRAL_BUNNY, 10.0f); + + if (!_bunny) + _bunny = DoSpawnCreature(NPC_RIBBON_POLE_FIRE_SPIRAL_BUNNY, 0, 0, 0, 0, TEMPSUMMON_MANUAL_DESPAWN, 0); + } + + void DoCleanupChecks() + { + if (_dancerList.empty()) + return; + + // remove non-dancing players from list + std::erase_if(_dancerList, [](Player* dancer) + { + return !dancer->HasAura(SPELL_RIBBON_POLE_PERIODIC_VISUAL); + }); + } + + void DoFlameCircleChecks() + { + if (!_ribbonPole) + return; + if (_dancerList.size() >= THRESHOLD_FLAME_CIRCLE) + { + // random blue / red circle + if (urand(0, 1)) + _ribbonPole->CastSpell(me, SPELL_FLAME_RING); + else + _ribbonPole->CastSpell(me, SPELL_FLAME_PATCH); + } + } + + void DoFireworkChecks() + { + if (!_bunny) + return; + + if (_dancerList.size() >= THRESHOLD_FIREWORK) + { + _bunny->CastSpell(nullptr, SPELL_RIBBON_POLE_FIREWORK); + } + if (_dancerList.size() >= THRESHOLD_FIREWORK_3) + { + _scheduler.Schedule(500ms, [this](TaskContext /*context*/) + { + _bunny->CastSpell(nullptr, SPELL_RIBBON_POLE_FIREWORK); + }) + .Schedule(1s, [this](TaskContext /*context*/) + { + _bunny->CastSpell(nullptr, SPELL_RIBBON_POLE_FIREWORK); + }); + } + if (_dancerList.size() >= THRESHOLD_FIREWORK_5) + { + _scheduler.Schedule(1500ms, [this](TaskContext /*context*/) + { + _bunny->CastSpell(nullptr, SPELL_RIBBON_POLE_FIREWORK); + }) + .Schedule(2s, [this](TaskContext /*context*/) + { + _bunny->CastSpell(nullptr, SPELL_RIBBON_POLE_FIREWORK); + }); + } + } + + void DoGroundFlowerChecks() + { + if (!_bunny) + return; + + if (_dancerList.size() >= THRESHOLD_GROUND_FLOWERS) + { + std::list crList; + me->GetCreaturesWithEntryInRange(crList, 20.0f, NPC_GROUND_FLOWER); + + if (crList.size() < MAX_COUNT_GROUND_FLOWERS) + _bunny->CastSpell(nullptr, SPELL_RIBBON_POLE_GROUND_FLOWER); + } + } + + void DoSpewLavaChecks() + { + if (!_bunny) + return; + + if (_dancerList.size() >= THRESHOLD_SPEW_LAVA) + { + if (!_dancerList.empty()) + { + Acore::Containers::RandomShuffle(_dancerList); + + for (uint8 i = 0; (i < MAX_COUNT_SPEW_LAVA_TARGETS) && (i < _dancerList.size()); i++) + { + Player* dancerTarget = _dancerList[i]; + + if (dancerTarget) + { + Creature* fireSpiralBunny = dancerTarget->SummonCreature(NPC_RIBBON_POLE_FIRE_SPIRAL_BUNNY, dancerTarget->GetPositionX(), dancerTarget->GetPositionY(), dancerTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 10000); + if (fireSpiralBunny) + fireSpiralBunny->CastSpell(_bunny, SPELL_RIBBON_POLE_FIRE_SPIRAL_VISUAL, true); + } + } + } + } + } + + void DoDancingFLameChecks() + { + if (_dancerList.size() >= THRESHOLD_DANCING_FLAMES) + { + std::list crList; + me->GetCreaturesWithEntryInRange(crList, 20.0f, NPC_BIG_DANCING_FLAMES); + + if (crList.size() < MAX_COUNT_DANCING_FLAMES) + { + float spawnDist = 12.0f; + float angle = rand_norm() * 2 * M_PI; + DoSpawnCreature(NPC_BIG_DANCING_FLAMES, spawnDist * cos(angle), spawnDist * std::sin(angle), 0, angle + M_PI, TEMPSUMMON_TIMED_DESPAWN, 60000); + } + } + } + + void UpdateAI(uint32 diff) override + { + _scheduler.Update(diff); + } + +private: + TaskScheduler _scheduler; + std::vector _dancerList; + GameObject* _ribbonPole; + Creature* _bunny; +}; + +class spell_midsummer_ribbon_pole_firework : public SpellScript +{ + PrepareSpellScript(spell_midsummer_ribbon_pole_firework) + + void ModDestHeight(SpellDestination& dest) + { + Position const offset = { 0.0f, 0.0f, 20.0f , 0.0f }; + dest.RelocateOffset(offset); + } + + void Register() override + { + OnDestinationTargetSelect += SpellDestinationTargetSelectFn(spell_midsummer_ribbon_pole_firework::ModDestHeight, EFFECT_0, TARGET_DEST_CASTER_RANDOM); + } }; class spell_midsummer_ribbon_pole : public AuraScript { PrepareAuraScript(spell_midsummer_ribbon_pole) + bool Validate(SpellInfo const* /*spell*/) override + { + return ValidateSpellInfo( + { + SPELL_RIBBON_POLE_XP, + SPELL_TEST_RIBBON_POLE_CHANNEL_BLUE, + SPELL_TEST_RIBBON_POLE_CHANNEL_RED, + SPELL_TEST_RIBBON_POLE_CHANNEL_PINK + }); + } + void HandleEffectPeriodic(AuraEffect const* /*aurEff*/) { PreventDefaultAction(); @@ -218,7 +506,9 @@ class spell_midsummer_ribbon_pole : public AuraScript Creature* cr = target->FindNearestCreature(NPC_RIBBON_POLE_DEBUG_TARGET, 10.0f); if (!cr) { - target->RemoveAura(SPELL_RIBBON_POLE_CHANNEL_VISUAL); + target->RemoveAura(SPELL_TEST_RIBBON_POLE_CHANNEL_BLUE); + target->RemoveAura(SPELL_TEST_RIBBON_POLE_CHANNEL_RED); + target->RemoveAura(SPELL_TEST_RIBBON_POLE_CHANNEL_PINK); SetDuration(1); return; } @@ -243,7 +533,19 @@ class spell_midsummer_ribbon_pole : public AuraScript void HandleEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) { Unit* ar = GetTarget(); - ar->CastSpell(ar, SPELL_RIBBON_POLE_CHANNEL_VISUAL, true); + switch (urand(0, 2)) + { + case 0: + ar->CastSpell(ar, SPELL_TEST_RIBBON_POLE_CHANNEL_BLUE, true); + break; + case 1: + ar->CastSpell(ar, SPELL_TEST_RIBBON_POLE_CHANNEL_RED, true); + break; + case 2: + default: + ar->CastSpell(ar, SPELL_TEST_RIBBON_POLE_CHANNEL_PINK, true); + break; + } } void Register() override @@ -301,10 +603,10 @@ class spell_midsummer_torch_quest : public AuraScript void HandleEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) { Unit* ar = GetTarget(); - if (Creature* cr = ar->SummonCreature(25535, ar->GetPositionX(), ar->GetPositionY(), ar->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN, 90000)) + if (Creature* cr = ar->SummonCreature(NPC_TORCH_TOSS_TARGET_BUNNY, ar->GetPositionX(), ar->GetPositionY(), ar->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN, 90000)) { torchGUID = cr->GetGUID(); - CAST_AI(npc_midsummer_torch_target, cr->AI())->SetPlayerGUID(ar->GetGUID(), (GetId() == 45716 ? 8 : 20)); + CAST_AI(npc_midsummer_torch_target, cr->AI())->SetPlayerGUID(ar->GetGUID(), (GetId() == SPELL_TORCH_TOSS_TRAINING ? 8 : 20)); } } @@ -329,13 +631,32 @@ enum flingTorch SPELL_FLING_TORCH_DUMMY = 46747, SPELL_MISSED_TORCH = 45676, SPELL_TORCH_COUNTER = 45693, - SPELL_TORCH_SHADOW = 46105 + SPELL_TORCH_SHADOW = 46105, + SPELL_TORCH_CATCH_SUCCESS_A = 46081, + SPELL_TORCH_CATCH_SUCCESS_H = 46654, + SPELL_JUGGLE_TORCH = 45671, + + QUEST_MORE_TORCH_TOSS_A = 11924, + QUEST_MORE_TORCH_TOSS_H = 11925, }; class spell_midsummer_fling_torch : public SpellScript { PrepareSpellScript(spell_midsummer_fling_torch); + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo( + { + SPELL_FLING_TORCH, + SPELL_TORCH_SHADOW, + SPELL_MISSED_TORCH, + SPELL_TORCH_CATCH_SUCCESS_A, + SPELL_TORCH_CATCH_SUCCESS_H, + SPELL_TORCH_COUNTER + }); + } + bool handled; bool Load() override { handled = false; return true; } @@ -412,13 +733,13 @@ class spell_midsummer_fling_torch : public SpellScript { aur->ModStackAmount(1); uint8 count = 4; - if (target->GetQuestStatus(target->GetTeamId() ? 11925 : 11924) == QUEST_STATUS_INCOMPLETE) // More Torch Catching quests + if (target->GetQuestStatus(target->GetTeamId() ? QUEST_MORE_TORCH_TOSS_H : QUEST_MORE_TORCH_TOSS_A) == QUEST_STATUS_INCOMPLETE) // More Torch Catching quests count = 10; if (aur->GetStackAmount() >= count) { //target->CastSpell(target, 46711, true); // Set Flag: all torch returning quests are complete - target->CastSpell(target, (target->GetTeamId() ? 46654 : 46081), true); // Quest completion + target->CastSpell(target, (target->GetTeamId() ? SPELL_TORCH_CATCH_SUCCESS_H : SPELL_TORCH_CATCH_SUCCESS_A), true); // Quest completion aur->SetDuration(1); return; } @@ -433,7 +754,7 @@ class spell_midsummer_fling_torch : public SpellScript void Register() override { AfterCast += SpellCastFn(spell_midsummer_fling_torch::HandleFinish); - if (m_scriptSpellId == 45671) + if (m_scriptSpellId == SPELL_JUGGLE_TORCH) { OnCheckCast += SpellCheckCastFn(spell_midsummer_fling_torch::CheckCast); OnEffectHitTarget += SpellEffectFn(spell_midsummer_fling_torch::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); @@ -466,6 +787,21 @@ class spell_midsummer_juggling_torch : public SpellScript { PrepareSpellScript(spell_midsummer_juggling_torch); + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo( + { + SPELL_JUGGLE_SELF, + SPELL_JUGGLE_SLOW, + SPELL_JUGGLE_MED, + SPELL_JUGGLE_FAST, + SPELL_TORCH_SHADOW_SELF, + SPELL_TORCH_SHADOW_SLOW, + SPELL_TORCH_SHADOW_MED, + SPELL_TORCH_SHADOW_FAST + }); + } + void HandleFinish() { Unit* caster = GetCaster(); @@ -543,9 +879,11 @@ void AddSC_event_midsummer_scripts() // NPCs new go_midsummer_bonfire(); RegisterCreatureAI(npc_midsummer_torch_target); + RegisterCreatureAI(npc_midsummer_ribbon_pole_target); // Spells RegisterSpellScript(spell_gen_crab_disguise); + RegisterSpellScript(spell_midsummer_ribbon_pole_firework); RegisterSpellScript(spell_midsummer_ribbon_pole); RegisterSpellScript(spell_midsummer_ribbon_pole_visual); RegisterSpellScript(spell_midsummer_torch_quest); diff --git a/src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp b/src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp index c722ce824..79ba973bd 100644 --- a/src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp +++ b/src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp @@ -15,99 +15,12 @@ * with this program. If not, see . */ -/* ScriptData -SDName: Dustwallow_Marsh -SD%Complete: 95 -SDComment: Quest support: 11180, 11126, 11174 -SDCategory: Dustwallow Marsh -EndScriptData */ - -/* ContentData -npc_cassa_crimsonwing - handled by npc_taxi -EndContentData */ - #include "Player.h" #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "SpellScript.h" -/*###### -## npc_zelfrax -######*/ - -Position const MovePosition = {-2967.030f, -3872.1799f, 35.620f, 0.0f}; - -enum Zelfrax -{ - SAY_ZELFRAX1 = 0, - SAY_ZELFRAX2 = 1 -}; - -class npc_zelfrax : public CreatureScript -{ -public: - npc_zelfrax() : CreatureScript("npc_zelfrax") { } - - CreatureAI* GetAI(Creature* creature) const override - { - return new npc_zelfraxAI(creature); - } - - struct npc_zelfraxAI : public ScriptedAI - { - npc_zelfraxAI(Creature* creature) : ScriptedAI(creature) - { - MoveToDock(); - } - - void AttackStart(Unit* who) override - { - if (!who) - return; - - if (me->Attack(who, true)) - { - me->SetInCombatWith(who); - who->SetInCombatWith(me); - - if (IsCombatMovementAllowed()) - me->GetMotionMaster()->MoveChase(who); - } - } - - void MovementInform(uint32 Type, uint32 /*Id*/) override - { - if (Type != POINT_MOTION_TYPE) - return; - - me->SetHomePosition(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation()); - me->SetImmuneToPC(false); - SetCombatMovement(true); - - if (me->IsInCombat()) - if (Unit* unit = me->GetVictim()) - me->GetMotionMaster()->MoveChase(unit); - } - - void MoveToDock() - { - SetCombatMovement(false); - me->GetMotionMaster()->MovePoint(0, MovePosition); - Talk(SAY_ZELFRAX1); - Talk(SAY_ZELFRAX2); - } - - void UpdateAI(uint32 /*Diff*/) override - { - if (!UpdateVictim()) - return; - - DoMeleeAttackIfReady(); - } - }; -}; - enum SpellScripts { SPELL_OOZE_ZAP = 42489, @@ -243,7 +156,6 @@ public: void AddSC_dustwallow_marsh() { - new npc_zelfrax(); new spell_ooze_zap(); new spell_ooze_zap_channel_end(); new spell_energize_aoe(); diff --git a/src/server/scripts/Kalimdor/zone_orgrimmar.cpp b/src/server/scripts/Kalimdor/zone_orgrimmar.cpp index 0f9f3dbd7..d4ecb8cad 100644 --- a/src/server/scripts/Kalimdor/zone_orgrimmar.cpp +++ b/src/server/scripts/Kalimdor/zone_orgrimmar.cpp @@ -157,7 +157,6 @@ enum ThrallWarchief : uint32 QUEST_WHAT_THE_WIND_CARRIES = 6566, GOSSIP_MENU_THRALL = 3664, GOSSIP_RESPONSE_THRALL_FIRST = 5733, - GOSSIP_OPTION_DEFAULT = 0 }; const Position heraldOfThrallPos = { -462.404f, -2637.68f, 96.0656f, 5.8606f }; @@ -179,7 +178,7 @@ public: uint32 NextAction = GOSSIP_ACTION_INFO_DEF + DiscussionOrder + 1; uint32 GossipResponse = GOSSIP_RESPONSE_THRALL_FIRST + DiscussionOrder - 1; - AddGossipItemFor(player, GOSSIP_MENU_THRALL + DiscussionOrder, GOSSIP_OPTION_DEFAULT, GOSSIP_SENDER_MAIN, NextAction); + AddGossipItemFor(player, GOSSIP_MENU_THRALL + DiscussionOrder, 0, GOSSIP_SENDER_MAIN, NextAction); SendGossipMenuFor(player, GossipResponse, creature->GetGUID()); } else if (DiscussionOrder == 7) @@ -200,7 +199,7 @@ public: if (player->GetQuestStatus(QUEST_WHAT_THE_WIND_CARRIES) == QUEST_STATUS_INCOMPLETE) { - AddGossipItemFor(player, GOSSIP_MENU_THRALL, GOSSIP_OPTION_DEFAULT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + AddGossipItemFor(player, GOSSIP_MENU_THRALL, 0, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); } SendGossipMenuFor(player, player->GetGossipTextId(creature), creature->GetGUID()); diff --git a/src/server/scripts/Northrend/zone_grizzly_hills.cpp b/src/server/scripts/Northrend/zone_grizzly_hills.cpp index e5cd77c38..255c4a4d5 100644 --- a/src/server/scripts/Northrend/zone_grizzly_hills.cpp +++ b/src/server/scripts/Northrend/zone_grizzly_hills.cpp @@ -918,7 +918,8 @@ public: player->AddAura(SPELL_WARTS, player); else { - DoCast(player, SPELL_FROG_KISS); // Removes SPELL_WARTSBGONE_LIP_BALM + // Removes SPELL_WARTSBGONE_LIP_BALM + player->CastSpell(player, SPELL_FROG_KISS, true); if (me->GetEntry() == NPC_LAKE_FROG) { @@ -1298,6 +1299,30 @@ public: } }; +// 62536 - Frog Kiss +class spell_frog_kiss : public SpellScript +{ + PrepareSpellScript(spell_frog_kiss); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo({ SPELL_WARTSBGONE_LIP_BALM }); + } + + void HandleScript(SpellEffIndex /*effIndex*/) + { + if (Player* target = GetHitPlayer()) + { + target->RemoveAurasDueToSpell(SPELL_WARTSBGONE_LIP_BALM); + } + } + + void Register() override + { + OnEffectHitTarget += SpellEffectFn(spell_frog_kiss::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); + } +}; + void AddSC_grizzly_hills() { // Theirs @@ -1319,4 +1344,5 @@ void AddSC_grizzly_hills() new spell_warhead_fuse(); RegisterSpellScript(spell_q12227_outhouse_groans); RegisterSpellScript(spell_q12227_camera_shake); + RegisterSpellScript(spell_frog_kiss); } diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp index 832a11dcf..edd836dd4 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp @@ -65,16 +65,13 @@ enum Spells enum Misc { - MAX_ADVISORS = 3, + MAX_ADVISORS = 2, NPC_SEER_OLUM = 22820, GO_CAGE = 185952, }; -const Position advisorsPosition[MAX_ADVISORS + 2] = +const Position advisorsPosition[MAX_ADVISORS] = { - {459.61f, -534.81f, -7.54f, 3.82f}, - {463.83f, -540.23f, -7.54f, 3.15f}, - {459.94f, -547.28f, -7.54f, 2.42f}, {448.37f, -544.71f, -7.54f, 0.00f}, {457.37f, -544.71f, -7.54f, 0.00f} }; @@ -94,21 +91,13 @@ struct boss_fathomlord_karathress : public BossAI BossAI::Reset(); _recentlySpoken = false; - me->SummonCreature(NPC_FATHOM_GUARD_TIDALVESS, advisorsPosition[0], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 600000); - me->SummonCreature(NPC_FATHOM_GUARD_SHARKKIS, advisorsPosition[1], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 600000); - me->SummonCreature(NPC_FATHOM_GUARD_CARIBDIS, advisorsPosition[2], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 600000); - ScheduleHealthCheckEvent(75, [&]{ - for (SummonList::const_iterator itr = summons.begin(); itr != summons.end(); ++itr) - { - if (Creature* summon = ObjectAccessor::GetCreature(*me, *itr)) + instance->DoForAllMinions(DATA_FATHOM_LORD_KARATHRESS, [&](Creature* fathomguard) { + if (fathomguard->IsAlive()) { - if (summon->GetMaxHealth() > 500000) - { - summon->CastSpell(me, SPELL_BLESSING_OF_THE_TIDES, true); - } + fathomguard->CastSpell(me, SPELL_BLESSING_OF_THE_TIDES, true); } - } + }); if (me->HasAura(SPELL_BLESSING_OF_THE_TIDES)) { Talk(SAY_GAIN_BLESSING); @@ -122,19 +111,22 @@ struct boss_fathomlord_karathress : public BossAI if (summon->GetEntry() == NPC_SEER_OLUM) { summon->SetWalk(true); - summon->GetMotionMaster()->MovePoint(0, advisorsPosition[MAX_ADVISORS + 1], false); + summon->GetMotionMaster()->MovePoint(0, advisorsPosition[MAX_ADVISORS - 1], false); } } void SummonedCreatureDies(Creature* summon, Unit*) override { - summons.Despawn(summon); if (summon->GetEntry() == NPC_FATHOM_GUARD_TIDALVESS) Talk(SAY_GAIN_ABILITY1); if (summon->GetEntry() == NPC_FATHOM_GUARD_SHARKKIS) Talk(SAY_GAIN_ABILITY2); if (summon->GetEntry() == NPC_FATHOM_GUARD_CARIBDIS) Talk(SAY_GAIN_ABILITY3); + scheduler.Schedule(1s, [this, summon](TaskContext) + { + summons.Despawn(summon); + }); } void KilledUnit(Unit* /*victim*/) override @@ -154,7 +146,7 @@ struct boss_fathomlord_karathress : public BossAI { Talk(SAY_DEATH); BossAI::JustDied(killer); - me->SummonCreature(NPC_SEER_OLUM, advisorsPosition[MAX_ADVISORS], TEMPSUMMON_TIMED_DESPAWN, 3600000); + me->SummonCreature(NPC_SEER_OLUM, advisorsPosition[MAX_ADVISORS-2], TEMPSUMMON_TIMED_DESPAWN, 3600000); if (GameObject* gobject = me->FindNearestGameObject(GO_CAGE, 100.0f)) { gobject->SetGoState(GO_STATE_ACTIVE); @@ -207,8 +199,6 @@ struct boss_fathomguard_sharkkis : public ScriptedAI { boss_fathomguard_sharkkis(Creature* creature) : ScriptedAI(creature), summons(creature) { - summons.clear(); - _instance = creature->GetInstanceScript(); _scheduler.SetValidator([this] @@ -224,6 +214,7 @@ struct boss_fathomguard_sharkkis : public ScriptedAI _scheduler.CancelAll(); summons.DespawnAll(); + summons.clear(); } void JustSummoned(Creature* summon) override @@ -232,8 +223,12 @@ struct boss_fathomguard_sharkkis : public ScriptedAI summons.Summon(summon); } - void JustEngagedWith(Unit* /*who*/) override + void JustEngagedWith(Unit* who) override { + if (Creature* karathress = _instance->GetCreature(DATA_FATHOM_LORD_KARATHRESS)) + { + karathress->Attack(who, false); + } _scheduler.Schedule(2500ms, [this](TaskContext context) { DoCastRandomTarget(SPELL_HURL_TRIDENT); @@ -268,7 +263,7 @@ struct boss_fathomguard_sharkkis : public ScriptedAI { if (Creature* karathress = _instance->GetCreature(DATA_FATHOM_LORD_KARATHRESS)) { - me->CastSpell(karathress, SPELL_POWER_OF_SHARKKIS); + me->CastSpell(karathress, SPELL_POWER_OF_SHARKKIS, true); } } @@ -416,8 +411,12 @@ struct boss_fathomguard_tidalvess : public ScriptedAI } } - void JustEngagedWith(Unit* /*who*/) override + void JustEngagedWith(Unit* who) override { + if (Creature* karathress = _instance->GetCreature(DATA_FATHOM_LORD_KARATHRESS)) + { + karathress->Attack(who, false); + } _scheduler.Schedule(10900ms, [this](TaskContext context) { DoCastVictim(SPELL_FROST_SHOCK); @@ -439,7 +438,7 @@ struct boss_fathomguard_tidalvess : public ScriptedAI { if (Creature* karathress = _instance->GetCreature(DATA_FATHOM_LORD_KARATHRESS)) { - me->CastSpell(karathress, SPELL_POWER_OF_TIDALVESS); + me->CastSpell(karathress, SPELL_POWER_OF_TIDALVESS, true); } } @@ -489,8 +488,12 @@ struct boss_fathomguard_caribdis : public ScriptedAI summons.Summon(summon); } - void JustEngagedWith(Unit* /*who*/) override + void JustEngagedWith(Unit* who) override { + if (Creature* karathress = _instance->GetCreature(DATA_FATHOM_LORD_KARATHRESS)) + { + karathress->Attack(who, false); + } _scheduler.Schedule(27900ms, [this](TaskContext context) { DoCastSelf(SPELL_WATER_BOLT_VOLLEY); @@ -517,7 +520,7 @@ struct boss_fathomguard_caribdis : public ScriptedAI { if (Creature* karathress = _instance->GetCreature(DATA_FATHOM_LORD_KARATHRESS)) { - me->CastSpell(karathress, SPELL_POWER_OF_CARIBDIS); + me->CastSpell(karathress, SPELL_POWER_OF_CARIBDIS, true); } } diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp index 79bd3180d..1c14da53f 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp @@ -19,6 +19,7 @@ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "serpent_shrine.h" +#include "TaskScheduler.h" enum Talk { @@ -59,18 +60,12 @@ enum Misc NPC_GREYHEART_SPELLBINDER = 21806, NPC_SHADOW_OF_LEOTHERAS = 21875, +}; - EVENT_SPELL_BERSERK = 1, - EVENT_HEALTH_CHECK = 2, - EVENT_SWITCH_TO_DEMON = 3, - EVENT_SPELL_WHIRLWIND = 4, - EVENT_KILL_TALK = 5, - EVENT_SWITCH_TO_ELF = 6, - EVENT_SPELL_INSIDIOUS_WHISPER = 7, - EVENT_SUMMON_DEMON = 8, - EVENT_RESTORE_FIGHT = 9, - - EVENT_SPELL_SHADOW_BOLT = 20 +enum Groups +{ + GROUP_COMBAT = 1, + GROUP_DEMON = 2 }; const Position channelersPos[MAX_CHANNELERS] = @@ -80,267 +75,231 @@ const Position channelersPos[MAX_CHANNELERS] = {362.11f, -437.48f, 29.52f, 0.9f} }; -class boss_leotheras_the_blind : public CreatureScript +struct boss_leotheras_the_blind : public BossAI { -public: - boss_leotheras_the_blind() : CreatureScript("boss_leotheras_the_blind") { } - - CreatureAI* GetAI(Creature* creature) const override + boss_leotheras_the_blind(Creature* creature) : BossAI(creature, DATA_LEOTHERAS_THE_BLIND) { - return GetSerpentShrineAI(creature); + scheduler.SetValidator([this] + { + return !me->HasUnitState(UNIT_STATE_CASTING); + }); } - struct boss_leotheras_the_blindAI : public BossAI + void Reset() override { - boss_leotheras_the_blindAI(Creature* creature) : BossAI(creature, DATA_LEOTHERAS_THE_BLIND) - { - } + BossAI::Reset(); + DoCastSelf(SPELL_CLEAR_CONSUMING_MADNESS, true); + DoCastSelf(SPELL_DUAL_WIELD, true); + me->SetStandState(UNIT_STAND_STATE_KNEEL); + me->LoadEquipment(0, true); + me->SetReactState(REACT_PASSIVE); + _recentlySpoken = false; + SummonChannelers(); + + ScheduleHealthCheckEvent(15, [&]{ + if (me->GetDisplayId() != me->GetNativeDisplayId()) + { + //is currently in metamorphosis + DoResetThreatList(); + me->LoadEquipment(); + me->RemoveAurasDueToSpell(SPELL_METAMORPHOSIS); + + scheduler.RescheduleGroup(GROUP_COMBAT, 10s); + } + scheduler.CancelGroup(GROUP_DEMON); + scheduler.DelayAll(10s); - void Reset() override - { - BossAI::Reset(); - me->CastSpell(me, SPELL_CLEAR_CONSUMING_MADNESS, true); - me->CastSpell(me, SPELL_DUAL_WIELD, true); me->SetStandState(UNIT_STAND_STATE_KNEEL); - me->LoadEquipment(0, true); me->SetReactState(REACT_PASSIVE); - } + me->GetMotionMaster()->Clear(); + me->StopMoving(); + Talk(SAY_FINAL_FORM); - void InitializeAI() override - { - BossAI::InitializeAI(); - SummonChannelers(); - } - - void JustReachedHome() override - { - BossAI::JustReachedHome(); - SummonChannelers(); - } - - void SummonChannelers() - { - me->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_BANISH, false); - me->CastSpell(me, SPELL_BANISH, true); - me->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_BANISH, true); - - summons.DespawnAll(); - for (uint8 i = 0; i < MAX_CHANNELERS; ++i) - me->SummonCreature(NPC_GREYHEART_SPELLBINDER, channelersPos[i], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 5000); - } - - void MoveInLineOfSight(Unit* /*who*/) override { } - - void JustSummoned(Creature* summon) override - { - summons.Summon(summon); - } - - void SummonedCreatureDies(Creature* summon, Unit*) override - { - me->SetInCombatWithZone(); - summons.Despawn(summon); - if (summon->GetEntry() == NPC_GREYHEART_SPELLBINDER) - if (!summons.HasEntry(NPC_GREYHEART_SPELLBINDER)) - { - me->RemoveAllAuras(); - me->LoadEquipment(); - me->SetReactState(REACT_AGGRESSIVE); - me->SetStandState(UNIT_STAND_STATE_STAND); - Talk(SAY_AGGRO); - - events.ScheduleEvent(EVENT_SPELL_BERSERK, 600000); - events.ScheduleEvent(EVENT_HEALTH_CHECK, 1000); - events.ScheduleEvent(EVENT_SWITCH_TO_DEMON, 55000); - events.ScheduleEvent(EVENT_SPELL_WHIRLWIND, 10000); - } - } - - void KilledUnit(Unit* /*victim*/) override - { - if (events.GetNextEventTime(EVENT_KILL_TALK) == 0) + scheduler.Schedule(4s, [this](TaskContext) { - Talk(me->GetDisplayId() != me->GetNativeDisplayId() ? SAY_DEMON_SLAY : SAY_NIGHTELF_SLAY); - events.ScheduleEvent(EVENT_KILL_TALK, 6000); - } - } - - void JustDied(Unit* killer) override - { - me->CastSpell(me, SPELL_CLEAR_CONSUMING_MADNESS, true); - Talk(SAY_DEATH); - BossAI::JustDied(killer); - } - - void JustEngagedWith(Unit* who) override - { - BossAI::JustEngagedWith(who); - me->SetStandState(UNIT_STAND_STATE_KNEEL); - } - - void AttackStart(Unit* who) override - { - if (who && me->Attack(who, true)) - me->GetMotionMaster()->MoveChase(who, me->GetDisplayId() == me->GetNativeDisplayId() ? 0.0f : 25.0f); - } - - void UpdateAI(uint32 diff) override - { - if (!UpdateVictim()) - return; - - events.Update(diff); - if (me->HasUnitState(UNIT_STATE_CASTING)) - return; - - switch (events.ExecuteEvent()) + DoCastSelf(SPELL_SUMMON_SHADOW_OF_LEOTHERAS); + }).Schedule(6s, [this](TaskContext) { - case EVENT_SPELL_BERSERK: - me->CastSpell(me, SPELL_BERSERK, true); - break; - case EVENT_HEALTH_CHECK: - if (me->HealthBelowPct(15)) - { - if (me->GetDisplayId() != me->GetNativeDisplayId()) - { - DoResetThreatList(); - me->LoadEquipment(); - me->RemoveAurasDueToSpell(SPELL_METAMORPHOSIS); - events.ScheduleEvent(EVENT_SPELL_WHIRLWIND, 10000); - } - events.CancelEvent(EVENT_SWITCH_TO_DEMON); - events.CancelEvent(EVENT_SPELL_INSIDIOUS_WHISPER); - events.DelayEvents(10000); - events.ScheduleEvent(EVENT_SUMMON_DEMON, 4000); - events.ScheduleEvent(EVENT_RESTORE_FIGHT, 6000); - me->SetStandState(UNIT_STAND_STATE_KNEEL); - me->SetReactState(REACT_PASSIVE); - me->GetMotionMaster()->Clear(); - me->StopMoving(); - Talk(SAY_FINAL_FORM); - break; - } - events.ScheduleEvent(EVENT_HEALTH_CHECK, 1000); - break; - case EVENT_SWITCH_TO_DEMON: - DoResetThreatList(); - Talk(SAY_SWITCH_TO_DEMON); - me->LoadEquipment(0, true); - me->GetMotionMaster()->MoveChase(me->GetVictim(), 25.0f); - me->CastSpell(me, SPELL_METAMORPHOSIS, true); - - events.CancelEvent(EVENT_SPELL_WHIRLWIND); - events.ScheduleEvent(EVENT_SPELL_INSIDIOUS_WHISPER, 25000); - events.ScheduleEvent(EVENT_SWITCH_TO_ELF, 60000); - break; - case EVENT_SWITCH_TO_ELF: - DoResetThreatList(); - me->LoadEquipment(); - me->GetMotionMaster()->MoveChase(me->GetVictim(), 0.0f); - me->RemoveAurasDueToSpell(SPELL_METAMORPHOSIS); - events.ScheduleEvent(EVENT_SWITCH_TO_DEMON, 55000); - events.ScheduleEvent(EVENT_SPELL_WHIRLWIND, 10000); - break; - case EVENT_SPELL_WHIRLWIND: - me->CastSpell(me, SPELL_WHIRLWIND, false); - events.ScheduleEvent(EVENT_SPELL_WHIRLWIND, 27000); - break; - case EVENT_SPELL_INSIDIOUS_WHISPER: - Talk(SAY_INNER_DEMONS); - me->CastCustomSpell(SPELL_INSIDIOUS_WHISPER, SPELLVALUE_MAX_TARGETS, 5, me, false); - break; - case EVENT_SUMMON_DEMON: - me->CastSpell(me, SPELL_SUMMON_SHADOW_OF_LEOTHERAS, true); - break; - case EVENT_RESTORE_FIGHT: - me->SetStandState(UNIT_STAND_STATE_STAND); - me->SetReactState(REACT_AGGRESSIVE); - me->GetMotionMaster()->MoveChase(me->GetVictim()); - break; - } - - if (me->GetDisplayId() == me->GetNativeDisplayId()) - DoMeleeAttackIfReady(); - else if (me->isAttackReady(BASE_ATTACK)) - { - me->CastSpell(me->GetVictim(), SPELL_CHAOS_BLAST, false); - me->setAttackTimer(BASE_ATTACK, 2000); - } - } - }; -}; - -class npc_inner_demon : public CreatureScript -{ -public: - npc_inner_demon() : CreatureScript("npc_inner_demon") { } - - CreatureAI* GetAI(Creature* creature) const override - { - return GetSerpentShrineAI(creature); + me->SetStandState(UNIT_STAND_STATE_STAND); + me->SetReactState(REACT_AGGRESSIVE); + me->GetMotionMaster()->MoveChase(me->GetVictim()); + }); + }); } - struct npc_inner_demonAI : public ScriptedAI + void SummonChannelers() { - npc_inner_demonAI(Creature* creature) : ScriptedAI(creature) + me->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_BANISH, false); + DoCastSelf(SPELL_BANISH); + me->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_BANISH, true); + + //probably needs a spell instead + summons.DespawnAll(); + for (uint8 i = 0; i < MAX_CHANNELERS; ++i) { + me->SummonCreature(NPC_GREYHEART_SPELLBINDER, channelersPos[i], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 5000); } + } - ObjectGuid ownerGUID; - EventMap events; + void JustSummoned(Creature* summon) override + { + summons.Summon(summon); + } - void EnterEvadeMode(EvadeReason /*why*/) override + void SummonedCreatureDies(Creature* summon, Unit*) override + { + me->SetInCombatWithZone(); + summons.Despawn(summon); + if (summon->GetEntry() == NPC_GREYHEART_SPELLBINDER) { - me->DespawnOrUnsummon(1); - } - - void IsSummonedBy(WorldObject* summoner) override - { - if (!summoner) - return; - - ownerGUID = summoner->GetGUID(); - events.Reset(); - events.ScheduleEvent(EVENT_SPELL_SHADOW_BOLT, 4000); - } - - void JustDied(Unit* /*killer*/) override - { - if (Unit* unit = ObjectAccessor::GetUnit(*me, ownerGUID)) - unit->RemoveAurasDueToSpell(SPELL_INSIDIOUS_WHISPER); - } - - void DamageTaken(Unit* who, uint32& damage, DamageEffectType, SpellSchoolMask) override - { - if (!who || who->GetGUID() != ownerGUID) - damage = 0; - } - - bool CanAIAttack(Unit const* who) const override - { - return who->GetGUID() == ownerGUID; - } - - void UpdateAI(uint32 diff) override - { - if (!UpdateVictim()) - return; - - events.Update(diff); - if (me->HasUnitState(UNIT_STATE_CASTING)) - return; - - switch (events.ExecuteEvent()) + if (!summons.HasEntry(NPC_GREYHEART_SPELLBINDER)) { - case EVENT_SPELL_SHADOW_BOLT: - me->CastSpell(me->GetVictim(), SPELL_SHADOW_BOLT, false); - events.ScheduleEvent(EVENT_SPELL_SHADOW_BOLT, 6000); - break; - } + me->RemoveAllAuras(); + me->LoadEquipment(); + me->SetReactState(REACT_AGGRESSIVE); + me->SetStandState(UNIT_STAND_STATE_STAND); + Talk(SAY_AGGRO); + scheduler.Schedule(10min, [this](TaskContext) + { + DoCastSelf(SPELL_BERSERK); + }); + + ElfTime(); + } + } + } + + void ElfTime() + { + scheduler.Schedule(25050ms, 32550ms, GROUP_COMBAT, [this](TaskContext context) + { + DoCastSelf(SPELL_WHIRLWIND); + context.Repeat(30250ms, 34900ms); + }).Schedule(60350ms, GROUP_DEMON, [this](TaskContext) + { + DoResetThreatList(); + Talk(SAY_SWITCH_TO_DEMON); + DemonTime(); + }); + } + + void DemonTime() + { + me->LoadEquipment(0, true); + me->GetMotionMaster()->MoveChase(me->GetVictim(), 25.0f); + DoCastSelf(SPELL_METAMORPHOSIS, true); + + scheduler.CancelGroup(GROUP_COMBAT); + scheduler.Schedule(24250ms, GROUP_DEMON, [this](TaskContext) + { + Talk(SAY_INNER_DEMONS); + me->CastCustomSpell(SPELL_INSIDIOUS_WHISPER, SPELLVALUE_MAX_TARGETS, 5, me, false); + }).Schedule(60s, [this](TaskContext) + { + DoResetThreatList(); + me->LoadEquipment(); + me->GetMotionMaster()->MoveChase(me->GetVictim(), 0.0f); + me->RemoveAurasDueToSpell(SPELL_METAMORPHOSIS); + ElfTime(); + }); + } + + void UpdateAI(uint32 diff) override + { + if (!UpdateVictim()) + return; + + scheduler.Update(diff); + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; + + if (me->GetDisplayId() == me->GetNativeDisplayId()) + { DoMeleeAttackIfReady(); } - }; + else if (me->isAttackReady(BASE_ATTACK)) + { + me->CastSpell(me->GetVictim(), SPELL_CHAOS_BLAST, false); + me->setAttackTimer(BASE_ATTACK, 2000); + } + } +private: + bool _recentlySpoken; +}; + +struct npc_inner_demon : public ScriptedAI +{ + npc_inner_demon(Creature* creature) : ScriptedAI(creature) + { + _scheduler.SetValidator([this] + { + return !me->HasUnitState(UNIT_STATE_CASTING); + }); + + _instance = creature->GetInstanceScript(); + } + + void EnterEvadeMode(EvadeReason /*why*/) override + { + me->DespawnOrUnsummon(1); + } + + void IsSummonedBy(WorldObject* summoner) override + { + if (!summoner) + return; + + _scheduler.CancelAll(); + _scheduler.Schedule(4s, [this](TaskContext context) + { + DoCastVictim(SPELL_SHADOW_BOLT); + context.Repeat(6s); + }); + } + + void JustDied(Unit* /*killer*/) override + { + if (Creature* leotheras = _instance->GetCreature(DATA_LEOTHERAS_THE_BLIND)) + { + leotheras->RemoveAurasDueToSpell(SPELL_INSIDIOUS_WHISPER); + } + } + + void DamageTaken(Unit* who, uint32& damage, DamageEffectType, SpellSchoolMask) override + { + if (Creature* leotheras = _instance->GetCreature(DATA_LEOTHERAS_THE_BLIND)) + { + if (!who || who->GetGUID() != leotheras->GetGUID()) + { + damage = 0; + } + } + } + + bool CanAIAttack(Unit const* who) const override + { + if (Creature* leotheras = _instance->GetCreature(DATA_LEOTHERAS_THE_BLIND)) + { + return who->GetGUID() == leotheras->GetGUID(); + } + return false; + } + + void UpdateAI(uint32 diff) override + { + if (!UpdateVictim()) + { + return; + } + + _scheduler.Update(diff); + + DoMeleeAttackIfReady(); + } +private: + TaskScheduler _scheduler; + InstanceScript* _instance; }; class spell_leotheras_whirlwind : public SpellScriptLoader @@ -516,8 +475,8 @@ public: void AddSC_boss_leotheras_the_blind() { - new boss_leotheras_the_blind(); - new npc_inner_demon(); + RegisterSerpentShrineAI(boss_leotheras_the_blind); + RegisterSerpentShrineAI(npc_inner_demon); new spell_leotheras_whirlwind(); new spell_leotheras_chaos_blast(); new spell_leotheras_insidious_whisper(); diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp index 34349e80a..c2287f8ba 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp @@ -26,7 +26,10 @@ enum Spells SPELL_GEYSER = 37478, SPELL_SPOUT_VISUAL = 37431, SPELL_SPOUT_PERIODIC = 37430, - SPELL_LURKER_SPAWN_TRIGGER = 54587 // Needed for achievement + SPELL_LURKER_SPAWN_TRIGGER = 54587, // Needed for achievement + + SPELL_CLEAR_ALL_DEBUFFS = 34098, + SPELL_SUBMERGE_VISUAL = 28819, }; enum Misc @@ -37,13 +40,12 @@ enum Misc NPC_COILFANG_GUARDIAN = 21873, NPC_COILFANG_AMBUSHER = 21865, +}; - EVENT_PHASE_1 = 1, - EVENT_PHASE_2 = 2, - EVENT_SPELL_WHIRL = 3, - EVENT_SPELL_SPOUT = 4, - EVENT_SPELL_GEYSER = 5, - EVENT_SPELL_SPOUT_PERIODIC = 6 +enum Groups +{ + GROUP_WHIRL = 1, + GROUP_GEYSER = 2 }; const Position positions[MAX_SUMMONS] = @@ -59,152 +61,149 @@ const Position positions[MAX_SUMMONS] = {42.471519f, -445.115295f, -19.769423f, 0.0f} }; -class boss_the_lurker_below : public CreatureScript +struct boss_the_lurker_below : public BossAI { -public: - boss_the_lurker_below() : CreatureScript("boss_the_lurker_below") { } - - CreatureAI* GetAI(Creature* creature) const override + boss_the_lurker_below(Creature* creature) : BossAI(creature, DATA_THE_LURKER_BELOW) { - return GetSerpentShrineAI(creature); + scheduler.SetValidator([this] + { + return !me->HasUnitState(UNIT_STATE_CASTING); + }); } - struct boss_the_lurker_belowAI : public BossAI + void Reset() override { - boss_the_lurker_belowAI(Creature* creature) : BossAI(creature, DATA_THE_LURKER_BELOW) { } + BossAI::Reset(); + me->SetReactState(REACT_PASSIVE); + me->SetStandState(UNIT_STAND_STATE_SUBMERGED); + me->SetVisible(false); + me->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE); + } - void Reset() override + void DoAction(int32 action) override + { + if (action == ACTION_START_EVENT) { - BossAI::Reset(); + me->SetReactState(REACT_AGGRESSIVE); + me->setAttackTimer(BASE_ATTACK, 6000); + me->SetVisible(true); + me->UpdateObjectVisibility(true); + me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE); + me->SetStandState(UNIT_STAND_STATE_STAND); + me->SetInCombatWithZone(); + } + } + + void AttackStart(Unit* who) override + { + if (who && me->GetReactState() == REACT_AGGRESSIVE) + { + me->Attack(who, true); + } + } + + void JustEngagedWith(Unit* who) override + { + BossAI::JustEngagedWith(who); + + SchedulerPhaseOne(38800ms, 91000ms); + } + + void SchedulerPhaseOne(std::chrono::milliseconds spoutTimer, std::chrono::milliseconds p2Timer) + { + scheduler.Schedule(10900ms, GROUP_GEYSER, [this](TaskContext context) + { + DoCastRandomTarget(SPELL_GEYSER); + context.Repeat(10200ms, 54900ms); + }).Schedule(18150ms, GROUP_WHIRL, [this](TaskContext context) + { + DoCastSelf(SPELL_WHIRL); + context.Repeat(34150ms, 68550ms); + }).Schedule(spoutTimer, [this](TaskContext context) + { + Talk(EMOTE_TAKE_BREATH); + me->CastSpell(me, SPELL_SPOUT_VISUAL, TRIGGERED_IGNORE_SET_FACING); me->SetReactState(REACT_PASSIVE); + me->SetFacingToObject(me->GetVictim()); + me->SetTarget(); + scheduler.RescheduleGroup(GROUP_GEYSER, 25s); + scheduler.RescheduleGroup(GROUP_WHIRL, 18s); + scheduler.Schedule(3s, [this](TaskContext) + { + me->InterruptNonMeleeSpells(false); + DoCastSelf(SPELL_SPOUT_PERIODIC, true); + }); + context.Repeat(60s); + }).Schedule(p2Timer, [this](TaskContext) + { + //phase2 + scheduler.CancelAll(); + DoCastSelf(SPELL_SUBMERGE_VISUAL, true); + DoCastSelf(SPELL_CLEAR_ALL_DEBUFFS, true); me->SetStandState(UNIT_STAND_STATE_SUBMERGED); - me->SetVisible(false); me->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE); - - // Reset summons - summons.DespawnAll(); - } - - void JustSummoned(Creature* summon) override - { - summon->SetInCombatWithZone(); - summons.Summon(summon); - } - - void DoAction(int32 param) override - { - if (param == ACTION_START_EVENT) + for (uint8 i = 0; i < MAX_SUMMONS; ++i) { - me->SetReactState(REACT_AGGRESSIVE); - me->setAttackTimer(BASE_ATTACK, 6000); - me->SetVisible(true); - me->UpdateObjectVisibility(true); - me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE); - me->SetStandState(UNIT_STAND_STATE_STAND); - me->SetInCombatWithZone(); + //needs sniffed spell probably + me->SummonCreature(i < 6 ? NPC_COILFANG_AMBUSHER : NPC_COILFANG_GUARDIAN, positions[i].GetPositionX(), positions[i].GetPositionY(), positions[i].GetPositionZ(), positions[i].GetAngle(me), TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); + } + SchedulerPhaseTwo(); + }); + } + + void SchedulerPhaseTwo() + { + scheduler.Schedule(60s, [this](TaskContext) + { + me->setAttackTimer(BASE_ATTACK, 6000); + me->SetStandState(UNIT_STAND_STATE_STAND); + me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE); + + scheduler.CancelAll(); + SchedulerPhaseOne(10000ms, 90750ms); + }); + } + + void UpdateAI(uint32 diff) override + { + if (!UpdateVictim()) + return; + + scheduler.Update(diff); + + if (me->getStandState() != UNIT_STAND_STATE_STAND || !me->isAttackReady() || me->GetReactState() != REACT_AGGRESSIVE) + return; + + Unit* target = nullptr; + if (me->IsWithinMeleeRange(me->GetVictim())) + { + target = me->GetVictim(); + } + else + { + ThreatContainer::StorageType const& t_list = me->GetThreatMgr().GetThreatList(); + for (ThreatReference const* ref : t_list) + { + if (Unit* threatTarget = ObjectAccessor::GetUnit(*me, ref->getUnitGuid())) + { + if (me->IsWithinMeleeRange(threatTarget)) + { + target = threatTarget; + break; + } + } } } - - void JustDied(Unit* killer) override + if (target) { - BossAI::JustDied(killer); + me->AttackerStateUpdate(target); } - - void AttackStart(Unit* who) override + else if ((target = SelectTarget(SelectTargetMethod::Random, 0))) { - if (who && me->GetReactState() == REACT_AGGRESSIVE) - me->Attack(who, true); + me->CastSpell(target, SPELL_WATER_BOLT, false); } - - void JustEngagedWith(Unit* /*who*/) override - { - events.ScheduleEvent(EVENT_SPELL_WHIRL, 18000); - events.ScheduleEvent(EVENT_SPELL_SPOUT, 45000); - events.ScheduleEvent(EVENT_SPELL_GEYSER, 10000); - events.ScheduleEvent(EVENT_PHASE_2, 125000); - } - - void UpdateAI(uint32 diff) override - { - if (!UpdateVictim()) - return; - - if (me->HasUnitState(UNIT_STATE_CASTING)) - return; - - events.Update(diff); - - switch (events.ExecuteEvent()) - { - case EVENT_SPELL_WHIRL: - me->CastSpell(me, SPELL_WHIRL, false); - events.ScheduleEvent(EVENT_SPELL_WHIRL, 18000); - break; - case EVENT_SPELL_GEYSER: - if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0)) - me->CastSpell(target, SPELL_GEYSER, false); - events.ScheduleEvent(EVENT_SPELL_GEYSER, 10000); - break; - case EVENT_SPELL_SPOUT: - Talk(EMOTE_TAKE_BREATH); - me->CastSpell(me, SPELL_SPOUT_VISUAL, TRIGGERED_IGNORE_SET_FACING); - me->SetReactState(REACT_PASSIVE); - me->SetFacingToObject(me->GetVictim()); - me->SetTarget(); - events.ScheduleEvent(EVENT_SPELL_SPOUT, 60000); - events.RescheduleEvent(EVENT_SPELL_WHIRL, 18000); - events.RescheduleEvent(EVENT_SPELL_GEYSER, 25000); - events.ScheduleEvent(EVENT_SPELL_SPOUT_PERIODIC, 3000); - break; - case EVENT_SPELL_SPOUT_PERIODIC: - me->InterruptNonMeleeSpells(false); - me->CastSpell(me, SPELL_SPOUT_PERIODIC, true); - break; - case EVENT_PHASE_2: - events.Reset(); - events.ScheduleEvent(EVENT_PHASE_1, 60000); - me->SetStandState(UNIT_STAND_STATE_SUBMERGED); - me->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE); - for (uint8 i = 0; i < MAX_SUMMONS; ++i) - me->SummonCreature(i < 6 ? NPC_COILFANG_AMBUSHER : NPC_COILFANG_GUARDIAN, positions[i].GetPositionX(), positions[i].GetPositionY(), positions[i].GetPositionZ(), positions[i].GetAngle(me), TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); - break; - case EVENT_PHASE_1: - me->setAttackTimer(BASE_ATTACK, 6000); - me->SetStandState(UNIT_STAND_STATE_STAND); - me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE); - - events.Reset(); - events.ScheduleEvent(EVENT_SPELL_SPOUT, 10000); - events.ScheduleEvent(EVENT_PHASE_2, 120000); - break; - } - - if (me->getStandState() != UNIT_STAND_STATE_STAND || !me->isAttackReady() || me->GetReactState() != REACT_AGGRESSIVE) - return; - - Unit* target = nullptr; - if (me->IsWithinMeleeRange(me->GetVictim())) - target = me->GetVictim(); - else - { - ThreatContainer::StorageType const& t_list = me->GetThreatMgr().GetThreatList(); - for (ThreatContainer::StorageType::const_iterator itr = t_list.begin(); itr != t_list.end(); ++itr) - if (Unit* threatTarget = ObjectAccessor::GetUnit(*me, (*itr)->getUnitGuid())) - if (me->IsWithinMeleeRange(threatTarget)) - { - target = threatTarget; - break; - } - } - - if (target) - me->AttackerStateUpdate(target); - else if ((target = SelectTarget(SelectTargetMethod::Random, 0))) - me->CastSpell(target, SPELL_WATER_BOLT, false); - - me->resetAttackTimer(); - } - }; + me->resetAttackTimer(); + } }; class go_strange_pool : public GameObjectScript @@ -315,7 +314,7 @@ public: void AddSC_boss_the_lurker_below() { - new boss_the_lurker_below(); + RegisterSerpentShrineAI(boss_the_lurker_below); new go_strange_pool(); new spell_lurker_below_spout(); new spell_lurker_below_spout_cone(); diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp index 34411df6a..e16d84e75 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp @@ -112,7 +112,7 @@ struct boss_morogrim_tidewalker : public BossAI else { Talk(EMOTE_WATERY_GLOBULES); - for (uint8 waterGlobuleId : waterGlobuleIds) + for (uint32 waterGlobuleId : waterGlobuleIds) { DoCastSelf(waterGlobuleId, true); } diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp index 90d4c5e6c..fdedecd3f 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp @@ -138,7 +138,10 @@ public: if (Creature* vashj = instance->GetCreature(LadyVashjGUID)) vashj->AI()->JustSummoned(creature); break; + default: + break; } + InstanceScript::OnCreatureCreate(creature); } ObjectGuid GetGuidData(uint32 identifier) const override diff --git a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp index c9602b38b..baee42732 100644 --- a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp @@ -166,7 +166,7 @@ struct boss_magtheridon : public BossAI { me->CastCustomSpell(SPELL_BLAZE, SPELLVALUE_MAX_TARGETS, 1); context.Repeat(11s, 39s); - }).Schedule(40s, [this](TaskContext context) + }).Schedule(28300ms, [this](TaskContext context) { DoCastSelf(SPELL_QUAKE); _castingQuake = true; @@ -175,29 +175,33 @@ struct boss_magtheridon : public BossAI me->SetOrientation(me->GetAngle(me->GetVictim())); me->SetTarget(ObjectGuid::Empty); scheduler.DelayAll(6999ms); - scheduler.Schedule(7s, [this](TaskContext /*context*/) + scheduler.Schedule(7s, [this](TaskContext) { _castingQuake = false; me->SetReactState(REACT_AGGRESSIVE); me->GetMotionMaster()->MoveChase(me->GetVictim()); - DoCastSelf(SPELL_BLAST_NOVA); - - _interruptScheduler.Schedule(50ms, GROUP_INTERRUPT_CHECK, [this](TaskContext context) - { - if (me->GetAuraCount(SPELL_SHADOW_GRASP_VISUAL) == 5) - { - Talk(SAY_BANISH); - me->InterruptNonMeleeSpells(true); - scheduler.CancelGroup(GROUP_INTERRUPT_CHECK); - } - else - context.Repeat(50ms); - }).Schedule(12s, GROUP_INTERRUPT_CHECK, [this](TaskContext /*context*/) - { - _interruptScheduler.CancelGroup(GROUP_INTERRUPT_CHECK); - }); }); - context.Repeat(53s, 56s); + context.Repeat(56300ms, 64300ms); + }).Schedule(55650ms, [this](TaskContext context) + { + DoCastSelf(SPELL_BLAST_NOVA); + scheduler.DelayAll(10s); + + _interruptScheduler.Schedule(50ms, GROUP_INTERRUPT_CHECK, [this](TaskContext context) + { + if (me->GetAuraCount(SPELL_SHADOW_GRASP_VISUAL) == 5) + { + Talk(SAY_BANISH); + me->InterruptNonMeleeSpells(true); + scheduler.CancelGroup(GROUP_INTERRUPT_CHECK); + } + else + context.Repeat(50ms); + }).Schedule(12s, GROUP_INTERRUPT_CHECK, [this](TaskContext /*context*/) + { + _interruptScheduler.CancelGroup(GROUP_INTERRUPT_CHECK); + }); + context.Repeat(54350ms, 55400ms); }).Schedule(22min, [this](TaskContext /*context*/) { DoCastSelf(SPELL_BERSERK, true); diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp index 726e2523b..4817b8d86 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp @@ -443,8 +443,6 @@ public: GetUnitOwner()->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE); GetUnitOwner()->SetStandState(UNIT_STAND_STATE_DEAD); - GetUnitOwner()->m_last_notify_position.Relocate(0.0f, 0.0f, 0.0f); - GetUnitOwner()->m_delayed_unit_relocation_timer = 1000; } void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp index 79568a64b..d83619f0c 100644 --- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp +++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp @@ -208,7 +208,11 @@ class spell_capacitus_polarity_shift : public SpellScript void HandleDummy(SpellEffIndex /*effIndex*/) { if (Unit* target = GetHitUnit()) + { + target->RemoveAurasDueToSpell(SPELL_POSITIVE_CHARGE_STACK); + target->RemoveAurasDueToSpell(SPELL_NEGATIVE_CHARGE_STACK); target->CastSpell(target, roll_chance_i(50) ? SPELL_POSITIVE_POLARITY : SPELL_NEGATIVE_POLARITY, true, nullptr, nullptr, GetCaster()->GetGUID()); + } } void Register() override diff --git a/src/server/scripts/Outland/zone_shadowmoon_valley.cpp b/src/server/scripts/Outland/zone_shadowmoon_valley.cpp index 021600e94..6f77224f4 100644 --- a/src/server/scripts/Outland/zone_shadowmoon_valley.cpp +++ b/src/server/scripts/Outland/zone_shadowmoon_valley.cpp @@ -731,8 +731,19 @@ public: ## npc_flanis_swiftwing_and_kagrosh ######*/ -#define GOSSIP_HSK1 "Take Flanis's Pack" -#define GOSSIP_HSK2 "Take Kagrosh's Pack" +enum Flanis : uint32 +{ + QUEST_THE_FATE_OF_FLANIS = 10583, + ITEM_FLAUNISS_PACK = 30658, + GOSSIP_MENU_FLANIS = 8356, +}; + +enum Kagrosh : uint32 +{ + QUEST_THE_FATE_OF_KAGROSH = 10601, + ITEM_KAGROSHS_PACK = 30659, + GOSSIP_MENU_KAGROSH = 8371, +}; class npcs_flanis_swiftwing_and_kagrosh : public CreatureScript { @@ -745,32 +756,33 @@ public: if (action == GOSSIP_ACTION_INFO_DEF + 1) { ItemPosCountVec dest; - uint8 msg = player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, 30658, 1, nullptr); + uint8 msg = player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_FLAUNISS_PACK, 1, nullptr); if (msg == EQUIP_ERR_OK) { - player->StoreNewItem(dest, 30658, true); - ClearGossipMenuFor(player); + player->StoreNewItem(dest, ITEM_FLAUNISS_PACK, true); } } if (action == GOSSIP_ACTION_INFO_DEF + 2) { ItemPosCountVec dest; - uint8 msg = player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, 30659, 1, nullptr); + uint8 msg = player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_KAGROSHS_PACK, 1, nullptr); if (msg == EQUIP_ERR_OK) { - player->StoreNewItem(dest, 30659, true); - ClearGossipMenuFor(player); + player->StoreNewItem(dest, ITEM_KAGROSHS_PACK, true); } } + + CloseGossipMenuFor(player); + return true; } bool OnGossipHello(Player* player, Creature* creature) override { - if (player->GetQuestStatus(10583) == QUEST_STATUS_INCOMPLETE && !player->HasItemCount(30658, 1, true)) - AddGossipItemFor(player, 0, GOSSIP_HSK1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - if (player->GetQuestStatus(10601) == QUEST_STATUS_INCOMPLETE && !player->HasItemCount(30659, 1, true)) - AddGossipItemFor(player, 0, GOSSIP_HSK2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + if (player->GetQuestStatus(QUEST_THE_FATE_OF_FLANIS) == QUEST_STATUS_INCOMPLETE && !player->HasItemCount(ITEM_FLAUNISS_PACK, 1, true)) + AddGossipItemFor(player, GOSSIP_MENU_FLANIS, 0, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + if (player->GetQuestStatus(QUEST_THE_FATE_OF_KAGROSH) == QUEST_STATUS_INCOMPLETE && !player->HasItemCount(ITEM_KAGROSHS_PACK, 1, true)) + AddGossipItemFor(player, GOSSIP_MENU_KAGROSH, 0, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); SendGossipMenuFor(player, player->GetGossipTextId(creature), creature->GetGUID()); @@ -1734,6 +1746,97 @@ public: } }; +enum KorWild +{ + SAY_LAND = 0, + POINT_LAND = 1 +}; + +class npc_korkron_or_wildhammer : public ScriptedAI +{ +public: + npc_korkron_or_wildhammer(Creature* creature) : ScriptedAI(creature) + { + creature->SetDisableGravity(true); + creature->SetHover(true); + } + + void Reset() override + { + me->SetReactState(REACT_PASSIVE); + me->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE); + } + + void JustDied(Unit* /*killer*/) override + { + me->DespawnOrUnsummon(3s, 0s); + } + + void IsSummonedBy(WorldObject* summoner) override + { + _playerGUID = summoner->GetGUID(); + me->SetFacingToObject(summoner); + Position pos = summoner->GetPosition(); + me->GetMotionMaster()->MovePoint(POINT_LAND, pos); + } + + void MovementInform(uint32 type, uint32 id) override + { + if (type == POINT_MOTION_TYPE && id == POINT_LAND) + { + if (Player* player = ObjectAccessor::GetPlayer(*me, _playerGUID)) + Talk(SAY_LAND, player); + + me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE); + } + } +private: + ObjectGuid _playerGUID; +}; + +class spell_calling_korkron_or_wildhammer : public SpellScript +{ + PrepareSpellScript(spell_calling_korkron_or_wildhammer); + + void SetDest(SpellDestination& dest) + { + // Adjust effect summon position + Position const offset = { -14.0f, -14.0f, 16.0f, 0.0f }; + dest.RelocateOffset(offset); + } + + void Register() override + { + OnDestinationTargetSelect += SpellDestinationTargetSelectFn(spell_calling_korkron_or_wildhammer::SetDest, EFFECT_0, TARGET_DEST_CASTER); + } +}; + +enum InfernalOversoul +{ + NPC_INFERNAL_OVERSOUL = 21735, + SPELL_DISRUPT_SUMMONING_RITUAL = 37285 +}; + +class spell_disrupt_summoning_ritual : public SpellScript +{ +public: + PrepareSpellScript(spell_disrupt_summoning_ritual); + + SpellCastResult CheckRequirement() + { + if (Unit* caster = GetCaster()) + if (Creature* infernal = caster->FindNearestCreature(NPC_INFERNAL_OVERSOUL, 100.0f)) + if (!infernal->HasAura(SPELL_DISRUPT_SUMMONING_RITUAL)) + return SPELL_FAILED_CASTER_AURASTATE; + return SPELL_CAST_OK; + } + + void Register() override + { + OnCheckCast += SpellCheckCastFn(spell_disrupt_summoning_ritual::CheckRequirement); + } +}; + void AddSC_shadowmoon_valley() { // Ours @@ -1755,4 +1858,7 @@ void AddSC_shadowmoon_valley() new npc_torloth_the_magnificent(); new npc_enraged_spirit(); new npc_shadowmoon_tuber_node(); + RegisterCreatureAI(npc_korkron_or_wildhammer); + RegisterSpellScript(spell_calling_korkron_or_wildhammer); + RegisterSpellScript(spell_disrupt_summoning_ritual); } diff --git a/src/server/scripts/Outland/zone_shattrath_city.cpp b/src/server/scripts/Outland/zone_shattrath_city.cpp index aacd828c1..8aaaf8580 100644 --- a/src/server/scripts/Outland/zone_shattrath_city.cpp +++ b/src/server/scripts/Outland/zone_shattrath_city.cpp @@ -85,7 +85,11 @@ public: # npc_zephyr ######*/ -#define GOSSIP_HZ "Take me to the Caverns of Time." +enum Zephyr : int32 +{ + GOSSIP_MENU_ZEPHYR = 9205, + SPELL_TELEPORT_CAVERNS_OF_TIME = 37778, +}; class npc_zephyr : public CreatureScript { @@ -96,7 +100,7 @@ public: { ClearGossipMenuFor(player); if (action == GOSSIP_ACTION_INFO_DEF + 1) - player->CastSpell(player, 37778, false); + player->CastSpell(player, SPELL_TELEPORT_CAVERNS_OF_TIME, false); return true; } @@ -104,7 +108,7 @@ public: bool OnGossipHello(Player* player, Creature* creature) override { if (player->GetReputationRank(989) >= REP_REVERED) - AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_HZ, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + AddGossipItemFor(player, GOSSIP_MENU_ZEPHYR, 0, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); SendGossipMenuFor(player, player->GetGossipTextId(creature), creature->GetGUID()); diff --git a/src/server/scripts/Outland/zone_terokkar_forest.cpp b/src/server/scripts/Outland/zone_terokkar_forest.cpp index e584f8cbe..b71a018b8 100644 --- a/src/server/scripts/Outland/zone_terokkar_forest.cpp +++ b/src/server/scripts/Outland/zone_terokkar_forest.cpp @@ -575,10 +575,25 @@ public: /*###### ## go_skull_pile ######*/ -#define GOSSIP_S_DARKSCREECHER_AKKARAI "Summon Darkscreecher Akkarai" -#define GOSSIP_S_KARROG "Summon Karrog" -#define GOSSIP_S_GEZZARAK_THE_HUNTRESS "Summon Gezzarak the Huntress" -#define GOSSIP_S_VAKKIZ_THE_WINDRAGER "Summon Vakkiz the Windrager" + +enum SkullPile : uint32 +{ + QUEST_ADVERSARIAL_BLOOD = 11885, + + GOSSIP_MENU_SKULL_PILE = 8660, + GOSSIP_MENU_TEXT_SKULL_PILE = 10888, + GOSSIP_MENU_TEXT_SKULL_PILE_QUEST = 11057, + + GOSSIP_OPTION_SUMMON_GEZZARAK_THE_HUNTRESS = 0, + GOSSIP_OPTION_SUMMON_DARKSCREECHER_AKKARAI = 1, + GOSSIP_OPTION_SUMMON_KARROG = 2, + GOSSIP_OPTION_SUMMON_VAKKIZ_THE_WINDRAGER = 3, + + SPELL_SUMMON_GEZZARAK_THE_HUNTRESS = 40632, + SPELL_SUMMON_DARKSCREECHER_AKKARAI = 40642, + SPELL_SUMMON_KARROG = 40640, + SPELL_SUMMON_VAKKIZ_THE_WINDRAGER = 40644, +}; class go_skull_pile : public GameObjectScript { @@ -588,26 +603,29 @@ public: bool OnGossipSelect(Player* player, GameObject* go, uint32 sender, uint32 action) override { ClearGossipMenuFor(player); - switch (sender) + + if (sender == GOSSIP_SENDER_MAIN) { - case GOSSIP_SENDER_MAIN: - SendActionMenu(player, go, action); - break; + SendActionMenu(player, go, action); + CloseGossipMenuFor(player); } return true; } bool OnGossipHello(Player* player, GameObject* go) override { - if ((player->GetQuestStatus(11885) == QUEST_STATUS_INCOMPLETE) || player->GetQuestRewardStatus(11885)) + if ((player->GetQuestStatus(QUEST_ADVERSARIAL_BLOOD) == QUEST_STATUS_INCOMPLETE) || player->GetQuestRewardStatus(QUEST_ADVERSARIAL_BLOOD)) { - AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_S_DARKSCREECHER_AKKARAI, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_S_KARROG, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_S_GEZZARAK_THE_HUNTRESS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); - AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_S_VAKKIZ_THE_WINDRAGER, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); - } + AddGossipItemFor(player, GOSSIP_MENU_SKULL_PILE, GOSSIP_OPTION_SUMMON_GEZZARAK_THE_HUNTRESS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + AddGossipItemFor(player, GOSSIP_MENU_SKULL_PILE, GOSSIP_OPTION_SUMMON_DARKSCREECHER_AKKARAI, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + AddGossipItemFor(player, GOSSIP_MENU_SKULL_PILE, GOSSIP_OPTION_SUMMON_KARROG, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); + AddGossipItemFor(player, GOSSIP_MENU_SKULL_PILE, GOSSIP_OPTION_SUMMON_VAKKIZ_THE_WINDRAGER, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); + + SendGossipMenuFor(player, GOSSIP_MENU_TEXT_SKULL_PILE_QUEST, go->GetGUID()); + } + else + SendGossipMenuFor(player, GOSSIP_MENU_TEXT_SKULL_PILE, go->GetGUID()); - SendGossipMenuFor(player, go->GetGOInfo()->questgiver.gossipID, go->GetGUID()); return true; } @@ -616,16 +634,16 @@ public: switch (action) { case GOSSIP_ACTION_INFO_DEF + 1: - player->CastSpell(player, 40642, false); + player->CastSpell(player, SPELL_SUMMON_GEZZARAK_THE_HUNTRESS, false); break; case GOSSIP_ACTION_INFO_DEF + 2: - player->CastSpell(player, 40640, false); + player->CastSpell(player, SPELL_SUMMON_DARKSCREECHER_AKKARAI, false); break; case GOSSIP_ACTION_INFO_DEF + 3: - player->CastSpell(player, 40632, false); + player->CastSpell(player, SPELL_SUMMON_KARROG, false); break; case GOSSIP_ACTION_INFO_DEF + 4: - player->CastSpell(player, 40644, false); + player->CastSpell(player, SPELL_SUMMON_VAKKIZ_THE_WINDRAGER, false); break; } } diff --git a/src/server/scripts/Spells/spell_druid.cpp b/src/server/scripts/Spells/spell_druid.cpp index 27f3cdece..fafeb286a 100644 --- a/src/server/scripts/Spells/spell_druid.cpp +++ b/src/server/scripts/Spells/spell_druid.cpp @@ -410,6 +410,26 @@ class spell_dru_dash : public SpellScript } }; +// -1850 - Dash +class spell_dru_dash_aura : public AuraScript +{ + PrepareAuraScript(spell_dru_dash_aura); + + void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/) + { + // do not set speed if not in cat form + if (GetUnitOwner()->GetShapeshiftForm() != FORM_CAT) + { + amount = 0; + } + } + + void Register() override + { + DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_dru_dash_aura::CalculateAmount, EFFECT_0, SPELL_AURA_MOD_INCREASE_SPEED); + } +}; + // 5229 - Enrage class spell_dru_enrage : public AuraScript { @@ -1185,7 +1205,7 @@ void AddSC_druid_spell_scripts() RegisterSpellScript(spell_dru_barkskin); RegisterSpellScript(spell_dru_treant_scaling); RegisterSpellScript(spell_dru_berserk); - RegisterSpellScript(spell_dru_dash); + RegisterSpellAndAuraScriptPair(spell_dru_dash, spell_dru_dash_aura); RegisterSpellScript(spell_dru_enrage); RegisterSpellScript(spell_dru_glyph_of_starfire); RegisterSpellScript(spell_dru_idol_lifebloom); diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp index 299e993b5..bfd937f03 100644 --- a/src/server/scripts/Spells/spell_generic.cpp +++ b/src/server/scripts/Spells/spell_generic.cpp @@ -4997,6 +4997,111 @@ class spell_gen_spirit_of_competition_winner : public SpellScript } }; +// 27360 - Lord Valthalak's Amulet +enum Valthalak +{ + SPELL_INSTILL_LORD_VALTHALAK_SPIRIT = 27360, + NPC_LORD_VALTHALAK = 16042 +}; + +class spell_gen_valthalak_amulet : public SpellScript +{ + PrepareSpellScript(spell_gen_valthalak_amulet) + + SpellCastResult CheckCast() + { + if (Unit* target = GetExplTargetUnit()) + if (target->GetEntry() == NPC_LORD_VALTHALAK && target->isDead()) + return SPELL_CAST_OK; + + return SPELL_FAILED_BAD_TARGETS; + } + + void Register() override + { + OnCheckCast += SpellCheckCastFn(spell_gen_valthalak_amulet::CheckCast); + } +}; + +enum ScourgeBanner +{ + GO_COMMAND_TENT = 176210, +}; + +class spell_gen_planting_scourge_banner : public SpellScript +{ + PrepareSpellScript(spell_gen_planting_scourge_banner) + + SpellCastResult CheckCast() + { + if (GameObject* tent = GetCaster()->FindNearestGameObject(GO_COMMAND_TENT, 20.0f)) + if (tent->GetGoState() != GO_STATE_READY) // If tent is burned down + return SPELL_CAST_OK; + + return SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW; + } + + void Register() override + { + OnCheckCast += SpellCheckCastFn(spell_gen_planting_scourge_banner::CheckCast); + } +}; + +enum Jubling +{ + SPELL_JUBLING_COOLDOWN_1_WEEK = 23852 +}; + +// 23853 - Jubling Cooldown +class spell_gen_jubling_cooldown : public SpellScript +{ + PrepareSpellScript(spell_gen_jubling_cooldown); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo({ SPELL_JUBLING_COOLDOWN_1_WEEK }); + } + + void HandleScript(SpellEffIndex /*effIndex*/) + { + if (Player* target = GetHitPlayer()) + { + target->CastSpell(target, SPELL_JUBLING_COOLDOWN_1_WEEK); // 1 week + } + } + + void Register() override + { + OnEffectHitTarget += SpellEffectFn(spell_gen_jubling_cooldown::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); + } +}; + +// 12699 - Yeh'kinya's Bramble +enum YehkinyaBramble +{ + NPC_VALE_SCREECHER = 5307, + NPC_ROGUE_VALE_SCREECHER = 5308 +}; + +class spell_gen_yehkinya_bramble : public SpellScript +{ + PrepareSpellScript(spell_gen_yehkinya_bramble) + + SpellCastResult CheckCast() + { + if (Unit* target = GetExplTargetUnit()) + if ((target->GetEntry() == NPC_VALE_SCREECHER || target->GetEntry() == NPC_ROGUE_VALE_SCREECHER) && target->isDead()) + return SPELL_CAST_OK; + + return SPELL_FAILED_BAD_TARGETS; + } + + void Register() override + { + OnCheckCast += SpellCheckCastFn(spell_gen_yehkinya_bramble::CheckCast); + } +}; + void AddSC_generic_spell_scripts() { RegisterSpellScript(spell_silithyst); @@ -5145,4 +5250,8 @@ void AddSC_generic_spell_scripts() RegisterSpellScript(spell_gen_curse_of_pain); RegisterSpellScript(spell_gen_spirit_of_competition_participant); RegisterSpellScript(spell_gen_spirit_of_competition_winner); + RegisterSpellScript(spell_gen_valthalak_amulet); + RegisterSpellScript(spell_gen_planting_scourge_banner); + RegisterSpellScript(spell_gen_jubling_cooldown); + RegisterSpellScript(spell_gen_yehkinya_bramble); } diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp index 4bbb80310..fafe6bfd2 100644 --- a/src/server/scripts/Spells/spell_hunter.cpp +++ b/src/server/scripts/Spells/spell_hunter.cpp @@ -69,7 +69,8 @@ enum HunterSpells SPELL_DRAENEI_GIFT_OF_THE_NAARU = 59543, SPELL_HUNTER_GLYPH_OF_ARCANE_SHOT = 61389, SPELL_LOCK_AND_LOAD_TRIGGER = 56453, - SPELL_LOCK_AND_LOAD_MARKER = 67544 + SPELL_LOCK_AND_LOAD_MARKER = 67544, + SPELL_HUNTER_PET_LEGGINGS_OF_BEAST_MASTERY = 38297, // Leggings of Beast Mastery }; class spell_hun_check_pet_los : public SpellScript @@ -165,6 +166,10 @@ class spell_hun_generic_scaling : public AuraScript SpellSchoolMask schoolMask = SpellSchoolMask(aurEff->GetSpellInfo()->Effects[aurEff->GetEffIndex()].MiscValue); int32 modifier = schoolMask == SPELL_SCHOOL_MASK_NORMAL ? 35 : 40; amount = CalculatePct(std::max(0, owner->GetResistance(schoolMask)), modifier); + if (owner->HasAura(SPELL_HUNTER_PET_LEGGINGS_OF_BEAST_MASTERY) && schoolMask == SPELL_SCHOOL_MASK_NORMAL) + { + amount += 490; + } } } @@ -180,6 +185,10 @@ class spell_hun_generic_scaling : public AuraScript AddPct(modifier, wildHuntEff->GetAmount()); amount = CalculatePct(std::max(0, owner->GetStat(Stats(aurEff->GetSpellInfo()->Effects[aurEff->GetEffIndex()].MiscValue))), modifier); + if (owner->HasAura(SPELL_HUNTER_PET_LEGGINGS_OF_BEAST_MASTERY)) + { + amount += 52; + } } } @@ -201,6 +210,10 @@ class spell_hun_generic_scaling : public AuraScript ownerAP += CalculatePct(owner->GetStat(STAT_STAMINA), HvWEff->GetAmount()); amount = CalculatePct(std::max(0, ownerAP), modifier); + if (owner->HasAura(SPELL_HUNTER_PET_LEGGINGS_OF_BEAST_MASTERY)) + { + amount += 70; + } } } @@ -1308,9 +1321,11 @@ class spell_hun_bestial_wrath : public SpellScript } }; -class spell_hun_furious_howl : public SpellScript +// -24604 - Furious Howl +// 53434 - Call of the Wild +class spell_hun_target_self_and_pet : public SpellScript { - PrepareSpellScript(spell_hun_furious_howl); + PrepareSpellScript(spell_hun_target_self_and_pet); bool Load() override { @@ -1327,7 +1342,7 @@ class spell_hun_furious_howl : public SpellScript void Register() override { - OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_hun_furious_howl::FilterTargets, EFFECT_ALL, TARGET_UNIT_CASTER_AREA_PARTY); + OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_hun_target_self_and_pet::FilterTargets, EFFECT_ALL, TARGET_UNIT_CASTER_AREA_PARTY); } }; @@ -1361,5 +1376,5 @@ void AddSC_hunter_spell_scripts() RegisterSpellScript(spell_hun_lock_and_load); RegisterSpellScript(spell_hun_intimidation); RegisterSpellScript(spell_hun_bestial_wrath); - RegisterSpellScript(spell_hun_furious_howl); + RegisterSpellScript(spell_hun_target_self_and_pet); } diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp index 17d9156e9..584e389bb 100644 --- a/src/server/scripts/Spells/spell_item.cpp +++ b/src/server/scripts/Spells/spell_item.cpp @@ -3883,6 +3883,64 @@ class spell_item_worn_troll_dice : public SpellScript } }; +enum VenomhideHatchling +{ + NPC_VENOMHIDE_HATCHLING = 34320 +}; + +class spell_item_venomhide_feed : public SpellScript +{ + PrepareSpellScript(spell_item_venomhide_feed) + + SpellCastResult CheckCast() + { + if (Player* player = GetCaster()->ToPlayer()) + { + std::list hatchling; + player->GetAllMinionsByEntry(hatchling, NPC_VENOMHIDE_HATCHLING); + if (!hatchling.empty()) + { + return SPELL_CAST_OK; + } + } + + return SPELL_FAILED_BAD_TARGETS; + } + + void UpdateTarget(WorldObject*& target) + { + if (!target) + { + return; + } + + if (Player* player = GetCaster()->ToPlayer()) + { + std::list hatchling; + player->GetAllMinionsByEntry(hatchling, NPC_VENOMHIDE_HATCHLING); + if (hatchling.empty()) + { + return; + } + + for (Creature* creature : hatchling) + { + if (creature) + { + target = creature; + return; + } + } + } + } + + void Register() override + { + OnCheckCast += SpellCheckCastFn(spell_item_venomhide_feed::CheckCast); + OnObjectTargetSelect += SpellObjectTargetSelectFn(spell_item_venomhide_feed::UpdateTarget, EFFECT_0, TARGET_UNIT_NEARBY_ENTRY); + } +}; + void AddSC_item_spell_scripts() { RegisterSpellScript(spell_item_massive_seaforium_charge); @@ -4003,4 +4061,5 @@ void AddSC_item_spell_scripts() RegisterSpellScript(spell_item_green_whelp_armor); RegisterSpellScript(spell_item_elixir_of_shadows); RegisterSpellScript(spell_item_worn_troll_dice); + RegisterSpellScript(spell_item_venomhide_feed); } diff --git a/src/server/scripts/Spells/spell_paladin.cpp b/src/server/scripts/Spells/spell_paladin.cpp index 55945914e..9b745e24d 100644 --- a/src/server/scripts/Spells/spell_paladin.cpp +++ b/src/server/scripts/Spells/spell_paladin.cpp @@ -80,6 +80,12 @@ enum PaladinSpells SPELL_PALADIN_SANCTIFIED_RETRIBUTION_AURA = 63531, SPELL_PALADIN_AURA_MASTERY_IMMUNE = 64364, + SPELL_JUDGEMENTS_OF_THE_JUST = 68055, + SPELL_JUDGEMENT_OF_VENGEANCE_EFFECT = 31804, + SPELL_HOLY_VENGEANCE = 31803, + SPELL_JUDGEMENT_OF_CORRUPTION_EFFECT = 53733, + SPELL_BLOOD_CORRUPTION = 53742, + SPELL_GENERIC_ARENA_DAMPENING = 74410, SPELL_GENERIC_BATTLEGROUND_DAMPENING = 74411 }; @@ -874,7 +880,26 @@ public: // Judgement of the Just if (GetCaster()->GetAuraEffect(SPELL_AURA_ADD_FLAT_MODIFIER, SPELLFAMILY_PALADIN, 3015, 0)) - GetCaster()->CastSpell(GetHitUnit(), 68055, true); + { + if (GetCaster()->CastSpell(GetHitUnit(), SPELL_JUDGEMENTS_OF_THE_JUST, true) && (spellId2 == SPELL_JUDGEMENT_OF_VENGEANCE_EFFECT || spellId2 == SPELL_JUDGEMENT_OF_CORRUPTION_EFFECT)) + { + //hidden effect only cast when spellcast of judgements of the just is succesful + GetCaster()->CastSpell(GetHitUnit(), SealApplication(spellId2), true); //add hidden seal apply effect for vengeance and corruption + } + } + } + + uint32 SealApplication(uint32 correspondingSpellId) + { + switch (correspondingSpellId) + { + case SPELL_JUDGEMENT_OF_VENGEANCE_EFFECT: + return SPELL_HOLY_VENGEANCE; + case SPELL_JUDGEMENT_OF_CORRUPTION_EFFECT: + return SPELL_BLOOD_CORRUPTION; + default: + return 0; + } } void Register() override diff --git a/src/server/scripts/Spells/spell_priest.cpp b/src/server/scripts/Spells/spell_priest.cpp index c5dc9dd0c..14deba616 100644 --- a/src/server/scripts/Spells/spell_priest.cpp +++ b/src/server/scripts/Spells/spell_priest.cpp @@ -48,6 +48,7 @@ enum PriestSpells SPELL_PRIEST_SHADOW_WORD_DEATH = 32409, SPELL_PRIEST_T9_HEALING_2P = 67201, SPELL_PRIEST_VAMPIRIC_TOUCH_DISPEL = 64085, + SPELL_PRIEST_T4_4P_FLEXIBILITY = 37565, SPELL_GENERIC_ARENA_DAMPENING = 74410, SPELL_GENERIC_BATTLEGROUND_DAMPENING = 74411, @@ -926,6 +927,28 @@ class spell_pri_mind_control : public AuraScript } }; +// 37565 - Flexibility | Item - Priest T4 Holy/Discipline 4P Bonus +class spell_pri_t4_4p_bonus : public AuraScript +{ + PrepareAuraScript(spell_pri_t4_4p_bonus); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo({ SPELL_PRIEST_T4_4P_FLEXIBILITY }); + } + + void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo& /*eventInfo*/) + { + PreventDefaultAction(); + GetTarget()->RemoveAurasDueToSpell(SPELL_PRIEST_T4_4P_FLEXIBILITY); + } + + void Register() override + { + OnEffectProc += AuraEffectProcFn(spell_pri_t4_4p_bonus::HandleProc, EFFECT_ALL, SPELL_AURA_OVERRIDE_CLASS_SCRIPTS); + } +}; + void AddSC_priest_spell_scripts() { RegisterSpellScript(spell_pri_shadowfiend_scaling); @@ -949,4 +972,5 @@ void AddSC_priest_spell_scripts() RegisterSpellScript(spell_pri_shadow_word_death); RegisterSpellScript(spell_pri_vampiric_touch); RegisterSpellScript(spell_pri_mind_control); + RegisterSpellScript(spell_pri_t4_4p_bonus); } diff --git a/src/server/scripts/Spells/spell_shaman.cpp b/src/server/scripts/Spells/spell_shaman.cpp index 6977a0824..d0045cb4b 100644 --- a/src/server/scripts/Spells/spell_shaman.cpp +++ b/src/server/scripts/Spells/spell_shaman.cpp @@ -37,6 +37,7 @@ enum ShamanSpells SPELL_SHAMAN_CLEANSING_TOTEM_EFFECT = 52025, SPELL_SHAMAN_EARTH_SHIELD_HEAL = 379, SPELL_SHAMAN_ELEMENTAL_MASTERY = 16166, + SPELL_SHAMAN_ELECTRIFIED = 64930, SPELL_SHAMAN_EXHAUSTION = 57723, SPELL_SHAMAN_FIRE_NOVA_R1 = 1535, SPELL_SHAMAN_FIRE_NOVA_TRIGGERED_R1 = 8349, @@ -59,7 +60,8 @@ enum ShamanSpells SPELL_SHAMAN_TOTEM_HEALING_STREAM_HEAL = 52042, SPELL_SHAMAN_BLESSING_OF_THE_ETERNALS_R1 = 51554, SPELL_SHAMAN_STORMSTRIKE = 17364, - SPELL_SHAMAN_LAVA_LASH = 60103 + SPELL_SHAMAN_LAVA_LASH = 60103, + SPELL_SHAMAN_LIGHTNING_BOLT_OVERLOAD = 45284, }; enum ShamanSpellIcons @@ -1104,6 +1106,45 @@ class spell_sha_flurry_proc : public AuraScript } }; +// 64928 - Item - Shaman T8 Elemental 4P Bonus +class spell_sha_t8_electrified : public AuraScript +{ + PrepareAuraScript(spell_sha_t8_electrified); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo({ SPELL_SHAMAN_ELECTRIFIED }); + } + + void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo) + { + PreventDefaultAction(); + + DamageInfo* damageInfo = eventInfo.GetDamageInfo(); + if (!damageInfo || !damageInfo->GetDamage()) + return; + + // Do not proc from Lightning Overload (patch 3.1~) + if (SpellInfo const* spellInfo = eventInfo.GetSpellInfo()) + { + if (spellInfo->Id == SPELL_SHAMAN_LIGHTNING_BOLT_OVERLOAD) + { + return; + } + } + + SpellInfo const* electrifiedDot = sSpellMgr->AssertSpellInfo(SPELL_SHAMAN_ELECTRIFIED); + int32 amount = int32(CalculatePct(eventInfo.GetDamageInfo()->GetDamage(), aurEff->GetAmount()) / electrifiedDot->GetMaxTicks()); + + eventInfo.GetProcTarget()->CastDelayedSpellWithPeriodicAmount(eventInfo.GetActor(), SPELL_SHAMAN_ELECTRIFIED, SPELL_AURA_PERIODIC_DAMAGE, amount); + } + + void Register() override + { + OnEffectProc += AuraEffectProcFn(spell_sha_t8_electrified::HandleProc, EFFECT_0, SPELL_AURA_DUMMY); + } +}; + void AddSC_shaman_spell_scripts() { RegisterSpellScript(spell_sha_totem_of_wrath); @@ -1135,4 +1176,5 @@ void AddSC_shaman_spell_scripts() RegisterSpellScript(spell_sha_sentry_totem); RegisterSpellScript(spell_sha_thunderstorm); RegisterSpellScript(spell_sha_flurry_proc); + RegisterSpellScript(spell_sha_t8_electrified); } diff --git a/src/server/scripts/Spells/spell_warlock.cpp b/src/server/scripts/Spells/spell_warlock.cpp index e8efd5d51..b32ddc360 100644 --- a/src/server/scripts/Spells/spell_warlock.cpp +++ b/src/server/scripts/Spells/spell_warlock.cpp @@ -63,7 +63,8 @@ enum WarlockSpells SPELL_WARLOCK_UNSTABLE_AFFLICTION_DISPEL = 31117, SPELL_WARLOCK_IMPROVED_DRAIN_SOUL_R1 = 18213, SPELL_WARLOCK_IMPROVED_DRAIN_SOUL_PROC = 18371, - SPELL_WARLOCK_EYE_OF_KILROGG_FLY = 58083 + SPELL_WARLOCK_EYE_OF_KILROGG_FLY = 58083, + SPELL_WARLOCK_PET_VOID_STAR_TALISMAN = 37386, // Void Star Talisman }; enum WarlockSpellIcons @@ -242,6 +243,7 @@ class spell_warl_demonic_aegis : public AuraScript } }; +// -35696 - Demonic Knowledge class spell_warl_demonic_knowledge : public AuraScript { PrepareAuraScript(spell_warl_demonic_knowledge); @@ -249,7 +251,10 @@ class spell_warl_demonic_knowledge : public AuraScript void CalculateAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/) { if (Unit* caster = GetCaster()) - amount = CalculatePct(caster->GetStat(STAT_STAMINA) + caster->GetStat(STAT_INTELLECT), aurEff->GetBaseAmount()); + { + uint8 pct = aurEff->GetBaseAmount() + aurEff->GetDieSides(); + amount = CalculatePct(caster->GetStat(STAT_STAMINA) + caster->GetStat(STAT_INTELLECT), pct); + } } void CalcPeriodic(AuraEffect const* /*aurEff*/, bool& isPeriodic, int32& amplitude) @@ -284,6 +289,11 @@ class spell_warl_generic_scaling : public AuraScript SpellSchoolMask schoolMask = SpellSchoolMask(aurEff->GetSpellInfo()->Effects[aurEff->GetEffIndex()].MiscValue); int32 modifier = schoolMask == SPELL_SCHOOL_MASK_NORMAL ? 35 : 40; amount = CalculatePct(std::max(0, owner->GetResistance(schoolMask)), modifier); + if (owner->HasAura(SPELL_WARLOCK_PET_VOID_STAR_TALISMAN) && schoolMask != SPELL_SCHOOL_MASK_NORMAL) + { + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(SPELL_WARLOCK_PET_VOID_STAR_TALISMAN); + amount += spellInfo->Effects[EFFECT_0].CalcValue(); // 130 + } } } @@ -390,6 +400,11 @@ class spell_warl_infernal_scaling : public AuraScript SpellSchoolMask schoolMask = SpellSchoolMask(aurEff->GetSpellInfo()->Effects[aurEff->GetEffIndex()].MiscValue); int32 modifier = schoolMask == SPELL_SCHOOL_MASK_NORMAL ? 35 : 40; amount = CalculatePct(std::max(0, owner->GetResistance(schoolMask)), modifier); + if (owner->HasAura(SPELL_WARLOCK_PET_VOID_STAR_TALISMAN) && schoolMask != SPELL_SCHOOL_MASK_NORMAL) + { + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(SPELL_WARLOCK_PET_VOID_STAR_TALISMAN); + amount += spellInfo->Effects[EFFECT_0].CalcValue(); // 130 + } } } diff --git a/src/server/scripts/World/go_scripts.cpp b/src/server/scripts/World/go_scripts.cpp index 65f7cbaf8..7c173713d 100644 --- a/src/server/scripts/World/go_scripts.cpp +++ b/src/server/scripts/World/go_scripts.cpp @@ -15,34 +15,8 @@ * with this program. If not, see . */ -/* ContentData -go_cat_figurine (the "trap" version of GO, two different exist) -go_barov_journal -go_ethereum_prison -go_ethereum_stasis -go_sacred_fire_of_life -go_shrine_of_the_birds -go_southfury_moonstone -go_resonite_cask -go_tablet_of_the_seven -go_tele_to_dalaran_crystal -go_tele_to_violet_stand -go_scourge_cage -go_jotunheim_cage -go_table_theka -go_soulwell -go_bashir_crystalforge -go_soulwell -go_dragonflayer_cage -go_tadpole_cage -go_amberpine_outhouse -go_hive_pod -go_veil_skith_cage -EndContentData */ - #include "CellImpl.h" #include "GameObjectAI.h" -#include "GameTime.h" #include "GridNotifiersImpl.h" #include "Player.h" #include "ScriptMgr.h" @@ -1385,41 +1359,6 @@ public: } }; -/*###### -## go_inconspicuous_landmark -######*/ - -enum InconspicuousLandmark -{ - SPELL_SUMMON_PIRATES_TREASURE_AND_TRIGGER_MOB = 11462, - ITEM_CUERGOS_KEY = 9275, -}; - -class go_inconspicuous_landmark : public GameObjectScript -{ -public: - go_inconspicuous_landmark() : GameObjectScript("go_inconspicuous_landmark") - { - _lastUsedTime = GameTime::GetGameTime().count(); - } - - bool OnGossipHello(Player* player, GameObject* /*go*/) override - { - if (player->HasItemCount(ITEM_CUERGOS_KEY)) - return true; - - if (_lastUsedTime > GameTime::GetGameTime().count()) - return true; - - _lastUsedTime = GameTime::GetGameTime().count() + MINUTE; - player->CastSpell(player, SPELL_SUMMON_PIRATES_TREASURE_AND_TRIGGER_MOB, true); - return true; - } - -private: - uint32 _lastUsedTime; -}; - /*###### ## go_soulwell ######*/ @@ -1989,7 +1928,6 @@ void AddSC_go_scripts() new go_arcane_prison(); new go_jotunheim_cage(); new go_table_theka(); - new go_inconspicuous_landmark(); new go_soulwell(); new go_dragonflayer_cage(); new go_amberpine_outhouse(); diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp index 309230325..7a13b6881 100644 --- a/src/server/scripts/World/npcs_special.cpp +++ b/src/server/scripts/World/npcs_special.cpp @@ -2506,9 +2506,9 @@ enum VenomhideHatchlingMisc ITEM_VENOMHIDE_BABY_TOOTH = 47196, MODEL_BABY_RAPTOR = 29251, - MODEL_BABY_RAPTOR_REPTILE_EYES = 29809, - MODEL_ADOLESCENT_RAPTOR = 29103, - MODEL_FULL_RAPTOR = 5291, + MODEL_BABY_RAPTOR_REPTILE_EYES = 29274, + MODEL_ADOLESCENT_RAPTOR = 29275, + MODEL_FULL_RAPTOR = 29276, }; enum VenomhideHatchlingTexts diff --git a/src/server/shared/Secrets/SecretMgr.h b/src/server/shared/Secrets/SecretMgr.h index 9dad19921..8e891aa02 100644 --- a/src/server/shared/Secrets/SecretMgr.h +++ b/src/server/shared/Secrets/SecretMgr.h @@ -15,8 +15,8 @@ * with this program. If not, see . */ -#ifndef __WARHEAD_SECRETMGR_H__ -#define __WARHEAD_SECRETMGR_H__ +#ifndef __ACORE_SECRETMGR_H__ +#define __ACORE_SECRETMGR_H__ #include "BigNumber.h" #include "Common.h" diff --git a/src/server/shared/SharedDefines.h b/src/server/shared/SharedDefines.h index e323e9eb7..1bfd297d6 100644 --- a/src/server/shared/SharedDefines.h +++ b/src/server/shared/SharedDefines.h @@ -216,7 +216,7 @@ enum FactionTemplates #define MIN_REPUTATION_RANK (REP_HATED) #define MAX_REPUTATION_RANK 8 -#define MAX_SPILLOVER_FACTIONS 4 +#define MAX_SPILLOVER_FACTIONS 6 enum MoneyConstants {