Merge branch 'azerothcore:master' into Playerbot

This commit is contained in:
ZhengPeiRu21
2022-10-22 17:44:53 -06:00
committed by GitHub
29 changed files with 575 additions and 152 deletions

View File

@@ -24,22 +24,41 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Configure OS
shell: bash
env:
CONTINUOUS_INTEGRATION: true
run: |
choco install --no-progress openssl
choco install --no-progress boost-msvc-14.3 --version=1.79.0
./acore.sh install-deps
- name: Process pending sql
shell: bash
run: bash bin/acore-db-pendings
- name: Build
shell: bash
run: |
mkdir -p build && cd build
cmake .. -DTOOLS_BUILD=all
cmake --build . --config Release --parallel 4
export CTOOLS_BUILD=all
./acore.sh compiler build
- name: Dry run authserver
shell: bash
run: |
source ./apps/ci/ci-gen-server-conf-files.sh "authserver" "configs" "."
cd env/dist
./authserver -dry-run
- name: Dry run worldserver
shell: bash
run: |
source ./apps/ci/ci-gen-server-conf-files.sh "worldserver" "configs" "."
cd env/dist
./worldserver -dry-run
- name: Stop MySQL
run: net stop mysql
- name: Copy dll files
shell: bash
run: |
cp "/c/mysql/lib/libmysql.dll" "build/bin/Release/"
cp "/c/Program Files/OpenSSL-Win64/bin/libcrypto-1_1-x64.dll" "build/bin/Release/"
cp "/c/Program Files/OpenSSL-Win64/bin/libssl-1_1-x64.dll" "build/bin/Release/"
rm -rf env/dist/data
cp "/c/tools/mysql/current/lib/libmysql.dll" "env/dist"
cp "/c/Program Files/OpenSSL-Win64/bin/libcrypto-1_1-x64.dll" "env/dist"
cp "/c/Program Files/OpenSSL-Win64/bin/libssl-1_1-x64.dll" "env/dist"
- uses: actions/upload-artifact@v2
with:
name: windows-2022-MSVC17-release
path: build/bin/Release
path: env/dist

View File

@@ -113,7 +113,8 @@
"xtr1common": "cpp",
"xtree": "cpp",
"xutility": "cpp",
"*.ipp": "cpp"
"*.ipp": "cpp",
"resumable": "cpp"
},
"deno.enable": true,
"deno.path": "deps/deno/bin/deno",

View File

@@ -2,25 +2,12 @@
set -e
CURRENT_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# Start mysql
sudo systemctl start mysql
APP_NAME=$1
echo "LoginDatabaseInfo = \"localhost;3306;root;root;acore_auth\"" >> ./env/dist/etc/$APP_NAME.conf
if [[ $APP_NAME != "authserver" ]]; then
{
echo "WorldDatabaseInfo = \"localhost;3306;root;root;acore_world\""
echo "CharacterDatabaseInfo = \"localhost;3306;root;root;acore_characters\""
} >> ./env/dist/etc/$APP_NAME.conf
fi
if [[ $APP_NAME == "worldserver" ]]; then
echo "DataDir = \"../data/\"" >> ./env/dist/etc/$APP_NAME.conf
git clone --depth=1 --branch=master --single-branch https://github.com/ac-data/ac-data.git ./env/dist/data
fi
source "$CURRENT_PATH/ci-gen-server-conf-files.sh" $1 "etc" "bin" "root"
(cd ./env/dist/bin/ && timeout 5m ./$APP_NAME -dry-run)

View File

@@ -0,0 +1,21 @@
APP_NAME=$1
CONFIG_FOLDER=${2:-"etc"}
BIN_FOLDER=${3-"bin"}
MYSQL_ROOT_PASSWORD=${4:-""}
echo "LoginDatabaseInfo = \"localhost;3306;root;$MYSQL_ROOT_PASSWORD;acore_auth\"" >> ./env/dist/$CONFIG_FOLDER/$APP_NAME.conf
# worldserver or dbimport
if [[ $APP_NAME != "authserver" ]]; then
{
echo "WorldDatabaseInfo = \"localhost;3306;root;$MYSQL_ROOT_PASSWORD;acore_world\""
echo "CharacterDatabaseInfo = \"localhost;3306;root;$MYSQL_ROOT_PASSWORD;acore_characters\""
} >> ./env/dist/$CONFIG_FOLDER/$APP_NAME.conf
fi
if [[ $APP_NAME == "worldserver" ]]; then
echo "DataDir = \"./data/\"" >> ./env/dist/$CONFIG_FOLDER/$APP_NAME.conf
git clone --depth=1 --branch=master --single-branch https://github.com/ac-data/ac-data.git ./env/dist/$BIN_FOLDER/data
fi

View File

@@ -21,7 +21,7 @@ CONFIG_SH
time sudo apt-get update -y
# time sudo apt-get upgrade -y
time sudo apt-get install -y git lsb-release sudo ccache
time sudo apt-get install -y git lsb-release sudo
time ./acore.sh install-deps
case $COMPILER in

View File

@@ -19,12 +19,7 @@ function comp_ccacheEnable() {
export CCACHE_COMPRESSLEVEL=${CCACHE_COMPRESSLEVEL:-9}
#export CCACHE_NODIRECT=true
unamestr=$(uname)
if [[ "$unamestr" == 'Darwin' ]]; then
export CCUSTOMOPTIONS="$CCUSTOMOPTIONS -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DMYSQL_ADD_INCLUDE_PATH=/usr/local/include -DMYSQL_LIBRARY=/usr/local/lib/libmysqlclient.dylib -DREADLINE_INCLUDE_DIR=/usr/local/opt/readline/include -DREADLINE_LIBRARY=/usr/local/opt/readline/lib/libreadline.dylib -DOPENSSL_INCLUDE_DIR=/usr/local/opt/openssl@1.1/include -DOPENSSL_SSL_LIBRARIES=/usr/local/opt/openssl@1.1/lib/libssl.dylib -DOPENSSL_CRYPTO_LIBRARIES=/usr/local/opt/openssl@1.1/lib/libcrypto.dylib"
else
export CCUSTOMOPTIONS="$CCUSTOMOPTIONS -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache"
fi
export CCUSTOMOPTIONS="$CCUSTOMOPTIONS -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache"
}
function comp_ccacheClean() {
@@ -70,6 +65,19 @@ function comp_configure() {
comp_ccacheEnable
OSOPTIONS=""
echo "Platform: $OSTYPE"
case "$OSTYPE" in
darwin*)
OSOPTIONS=" -DMYSQL_ADD_INCLUDE_PATH=/usr/local/include -DMYSQL_LIBRARY=/usr/local/lib/libmysqlclient.dylib -DREADLINE_INCLUDE_DIR=/usr/local/opt/readline/include -DREADLINE_LIBRARY=/usr/local/opt/readline/lib/libreadline.dylib -DOPENSSL_INCLUDE_DIR=/usr/local/opt/openssl@1.1/include -DOPENSSL_SSL_LIBRARIES=/usr/local/opt/openssl@1.1/lib/libssl.dylib -DOPENSSL_CRYPTO_LIBRARIES=/usr/local/opt/openssl@1.1/lib/libcrypto.dylib "
;;
msys*)
OSOPTIONS=" -DMYSQL_INCLUDE_DIR=C:\tools\mysql\current\include -DMYSQL_LIBRARY=C:\tools\mysql\current\lib\mysqlclient.lib "
;;
esac
cmake $SRCPATH -DCMAKE_INSTALL_PREFIX=$BINPATH $DCONF \
-DAPPS_BUILD=$CAPPS_BUILD \
-DTOOLS_BUILD=$CTOOLS_BUILD \
@@ -82,7 +90,7 @@ function comp_configure() {
-DWITH_WARNINGS=$CWARNINGS \
-DCMAKE_C_COMPILER=$CCOMPILERC \
-DCMAKE_CXX_COMPILER=$CCOMPILERCXX \
$CBUILD_APPS_LIST $CBUILD_TOOLS_LIST $CCUSTOMOPTIONS
$CBUILD_APPS_LIST $CBUILD_TOOLS_LIST $OSOPTIONS $CCUSTOMOPTIONS
cd $CWD
@@ -100,25 +108,50 @@ function comp_compile() {
comp_ccacheResetStats
time make -j $MTHREADS
make -j $MTHREADS install
time cmake --build . --config $CTYPE -j $MTHREADS
comp_ccacheShowStats
cd $CWD
echo "Platform: $OSTYPE"
case "$OSTYPE" in
msys*)
cmake --install . --config $CTYPE
if [[ $DOCKER = 1 ]]; then
echo "Generating confs..."
cp -n "env/dist/etc/worldserver.conf.dockerdist" "env/dist/etc/worldserver.conf"
cp -n "env/dist/etc/authserver.conf.dockerdist" "env/dist/etc/authserver.conf"
cp -n "env/dist/etc/dbimport.conf.dockerdist" "env/dist/etc/dbimport.conf"
fi
cd $CWD
echo "Done"
;;
linux*|darwin*)
local confDir=${CONFDIR:-"$AC_BINPATH_FULL/../etc"}
# create the folders before installing to
# set the current user and permissions
echo "Creating $AC_BINPATH_FULL..."
mkdir -p "$AC_BINPATH_FULL"
echo "Creating $confDir..."
mkdir -p "$confDir"
echo "Cmake install..."
sudo cmake --install . --config $CTYPE
cd $CWD
if [[ $DOCKER = 1 ]]; then
echo "Generating confs..."
cp -n "env/dist/etc/worldserver.conf.dockerdist" "${confDir}/worldserver.conf"
cp -n "env/dist/etc/authserver.conf.dockerdist" "${confDir}/authserver.conf"
cp -n "env/dist/etc/dbimport.conf.dockerdist" "${confDir}/dbimport.conf"
fi
# set all aplications SUID bit
echo "Setting permissions on binary files"
find "$AC_BINPATH_FULL" -type f -exec sudo chown root:root -- {} +
find "$AC_BINPATH_FULL" -type f -exec sudo chmod u+s -- {} +
echo "Done"
;;
esac
runHooks "ON_AFTER_BUILD"
# set all aplications SUID bit
sudo chown -R root:root "$AC_BINPATH_FULL"
sudo chmod -R u+s "$AC_BINPATH_FULL"
}
function comp_build() {

View File

@@ -47,6 +47,7 @@ RUN addgroup --gid $GROUP_ID acore && \
RUN mkdir -p /azerothcore/env/dist/bin
RUN mkdir -p /azerothcore/env/dist/data
RUN mkdir -p /azerothcore/env/dist/logs
RUN mkdir -p /azerothcore/env/dist/temp
RUN mkdir -p /azerothcore/env/dist/etc
RUN mkdir -p /azerothcore/var/build/obj

View File

@@ -1,6 +1,3 @@
echo "WARNING: Installer Script for Windows is not fully supported yet. Work in progress.."
echo "!!README!!: Please install openssl and mysql libraries manually following our wiki"
# install chocolatey before
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
@@ -9,9 +6,24 @@ echo "!!README!!: Please install openssl and mysql libraries manually following
# cmake
# git
# microsoft-build-tools
# mysql 5.6
# mysql
choco install -y --skip-checksums cmake git git.install microsoft-build-tools ccache
choco install -y --skip-checksums mysql --version 5.6.12
INSTALL_ARGS=""
if [[ $CONTINUOUS_INTEGRATION ]]; then
INSTALL_ARGS=" --no-progress "
else
{ # try
choco uninstall -y -n cmake.install cmake # needed to make sure that following install set the env properly
} || { # catch
echo "nothing to do"
}
choco install -y --skip-checksums $INSTALL_ARGS git visualstudio2022community
fi
choco install -y --skip-checksums $INSTALL_ARGS cmake.install -y --installargs 'ADD_CMAKE_TO_PATH=System'
choco install -y --skip-checksums $INSTALL_ARGS visualstudio2022-workload-nativedesktop openssl
choco install -y --skip-checksums $INSTALL_ARGS boost-msvc-14.3 --version=1.79.0
choco install -y --skip-checksums $INSTALL_ARGS mysql --version 8.0.31
echo "!!README!!: Please remember to install openssl and mysql libraries manually following our wiki"

View File

@@ -0,0 +1,8 @@
-- DB update 2022_10_13_00 -> 2022_10_20_00
-- Insert world states (for conditions)
DELETE FROM `worldstates` WHERE `entry` IN (197,198,199,200);
INSERT INTO `worldstates` (`entry`, `value`, `comment`) values
(197,0,'Fishing Extravaganza - STV_FISHING_PREV_WIN_TIME'),
(198,0,'Fishing Extravaganza - STV_FISHING_HAS_WINNER'),
(199,0,'Fishing Extravaganza - STV_FISHING_ANNOUNCE_EVENT_BEGIN'),
(200,0,'Fishing Extravaganza - STV_FISHING_ANNOUNCE_POOLS_DESPAN');

View File

@@ -0,0 +1,185 @@
-- DB update 2022_10_19_00 -> 2022_10_20_00
--
-- Durotar 106318 Gameobjects that need removed before Durotar can be rebuilt
DELETE FROM `gameobject` WHERE `guid` IN (12499, 12500, 12503, 12504, 12546, 12547, 12548, 12552, 12600, 12603, 12611, 12637, 85739, 85740, 85741, 85742, 85743, 85744, 85748, 85749, 85750, 85753, 85754, 85755, 85757, 85758, 85760, 85768, 85769, 85815, 85829, 85881);
-- This includes the pools, but there are none
SET @OGUID :=47713;
DELETE FROM `gameobject` WHERE `guid` BETWEEN @OGUID+0 AND @OGUID+51;
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
-- West Razormane Grounds
(@OGUID+0, 106318, 1, 14, 0, 1, 1, 19.87717056274414062, -4274.1025390625, 72.57794952392578125, 1.5882487297058, 0, 0, 0.71325016021728515, 0.7009095549583435, 300, 255, 1, 0), -- 106318 (Area: 0 - Difficulty: 0)
(@OGUID+1, 106318, 1, 14, 0, 1, 1, 32.99446487426757812, -4298.71533203125, 69.40044403076171875, 1.588248729705810546, 0, 0, 0.713250160217285156, 0.700909554958343505, 300, 255, 1, 0), -- 106318 (Area: 0 - Difficulty: 0)
(@OGUID+2, 106318, 1, 14, 0, 1, 1, 51.33137893676757812, -4452.3037109375, 48.4894256591796875, 0.331610709428787231, 0, 0, 0.16504669189453125, 0.986285746097564697, 300, 255, 1, 0), -- 106318 (Area: 0 - Difficulty: 0)
(@OGUID+3, 106318, 1, 14, 0, 1, 1, 51.57964324951171875, -4479.0810546875, 50.4658203125, 1.570795774459838867, 0, 0, 0.707106590270996093, 0.707106947898864746, 300, 255, 1, 0), -- 106318 (Area: 0 - Difficulty: 0)
-- East Razormane Grounds
(@OGUID+4, 106318, 1, 14, 0, 1, 1, 116.4299087524414062, -4557.84521484375, 59.7942657470703125, 3.420850038528442382, 0, 0, -0.99026775360107421, 0.139175355434417724, 300, 255, 1, 0), -- 106318 (Area: 0 - Difficulty: 0)
(@OGUID+5, 106318, 1, 14, 0, 1, 1, 95.244140625, -4554.32275390625, 55.16711044311523437, 4.258606910705566406, 0, 0, -0.84804725646972656, 0.529920578002929687, 300, 255, 1, 0), -- 106318 (Area: 0 - Difficulty: 0)
-- Scuttle Coast South
(@OGUID+6, 106318, 1, 14, 0, 1, 1, -194.7197265625, -5306.0048828125, -6.54705381393432617, 5.166176319122314453, 0, 0, -0.52991867065429687, 0.84804844856262207, 300, 255, 1, 0), -- 106318 (Area: 0 - Difficulty: 0)
(@OGUID+7, 106318, 1, 14, 0, 1, 1, -63.7776679992675781, -5372.091796875, -17.813446044921875, 3.892086982727050781, 0, 0, -0.93041706085205078, 0.366502493619918823, 300, 255, 1, 0), -- 106318 (Area: 0 - Difficulty: 0)
(@OGUID+8, 106318, 1, 14, 0, 1, 1, -327.538848876953125, -5266.5263671875, -8.39003658294677734, 0.750490784645080566, 0, 0, 0.3665008544921875, 0.93041771650314331, 300, 255, 1, 0), -- 106318 (Area: 0 - Difficulty: 0)
(@OGUID+9, 106318, 1, 14, 0, 1, 1, -159.580184936523437, -5246.65185546875, -4.27100181579589843, 4.049167633056640625, 0, 0, -0.89879322052001953, 0.438372820615768432, 300, 255, 1, 0), -- 106318 (Area: 0 - Difficulty: 0)
-- Echo Isles
(@OGUID+10, 106318, 1, 14, 0, 1, 1, -1121.7718505859375, -5429.0693359375, 11.67700672149658203, 1.884953022003173828, 0, 0, 0.809016227722167968, 0.587786316871643066, 420, 255, 1, 0), -- 106318 (Area: 0 - Difficulty: 0)
(@OGUID+11, 106318, 1, 14, 0, 1, 1, -709.20294189453125, -5577.171875, 26.84698677062988281, 1.867502212524414062, 0, 0, 0.803856849670410156, 0.594822824001312255, 420, 255, 1, 0), -- 106318 (Area: 0 - Difficulty: 0)
(@OGUID+12, 106318, 1, 14, 0, 1, 1, -1190.529296875, -5575.8447265625, 9.280595779418945312, 0.174532130360603332, 0, 0, 0.087155342102050781, 0.996194720268249511, 420, 255, 1, 0), -- 106318 (Area: 0 - Difficulty: 0)
(@OGUID+13, 106318, 1, 14, 0, 1, 1, -1246.558837890625, -5511.21728515625, 5.819656848907470703, 2.44346022605895996, 0, 0, 0.939692497253417968, 0.34202045202255249, 420, 255, 1, 0), -- 106318 (Area: 0 - Difficulty: 0)
(@OGUID+14, 106318, 1, 14, 0, 1, 1, -1128.2391357421875, -5508.416015625, 6.319083213806152343, 1.570795774459838867, 0, 0, 0.707106590270996093, 0.707106947898864746, 300, 255, 1, 0), -- 106318 (Area: 0 - Difficulty: 0)
-- Outer Harpy Area
(@OGUID+15, 106318, 1, 14, 0, 1, 1, 952.36871337890625, -4586.19970703125, 19.61324691772460937, 4.869470596313476562, 0, 0, -0.64944744110107421, 0.760406434535980224, 300, 255, 1, 0), -- 106318 (Area: 0 - Difficulty: 0)
(@OGUID+16, 106318, 1, 14, 0, 1, 1, 716.516845703125, -4468.95068359375, 15.68846607208251953, 5.323255538940429687, 0, 0, -0.46174812316894531, 0.887011110782623291, 300, 255, 1, 0), -- 106318 (Area: 0 - Difficulty: 0)
(@OGUID+17, 106318, 1, 14, 0, 1, 1, 633.84722900390625, -4487.70068359375, 11.84936237335205078, 0.680676698684692382, 0, 0, 0.333806037902832031, 0.942641794681549072, 300, 255, 1, 0), -- 106318 (Area: 0 - Difficulty: 0)
(@OGUID+18, 106318, 1, 14, 0, 1, 1, 896.12188720703125, -4646.70263671875, 18.36391639709472656, 2.199114561080932617, 0, 0, 0.8910064697265625, 0.453990638256072998, 300, 255, 1, 0), -- 106318 (Area: 0 - Difficulty: 0)
-- Scuttle Coast North Lost One
(@OGUID+19, 106318, 1, 14, 0, 1, 1, 6.732748031616210937, -5228.02099609375, -13.3655195236206054, 1.308995485305786132, 0, 0, 0.608760833740234375, 0.793353796005249023, 300, 255, 1, 0), -- 106318 (Area: 0 - Difficulty: 0)
(@OGUID+20, 106318, 1, 14, 0, 1, 1, 28.78168487548828125, -5349.08056640625, -14.7248620986938476, 3.94444584846496582, 0, 0, -0.92050457000732421, 0.3907318115234375, 300, 255, 1, 0), -- 106318 (Area: 0 - Difficulty: 0)
(@OGUID+21, 106318, 1, 14, 0, 1, 1, 208.7660064697265625, -5234.958984375, -8.56636810302734375, 5.969027042388916015, 0, 0, -0.1564340591430664, 0.987688362598419189, 300, 255, 1, 0), -- 106318 (Area: 0 - Difficulty: 0)
-- Kolkar Crag
(@OGUID+22, 106318, 1, 14, 0, 1, 1, -973.9110107421875, -4427.43603515625, 30.01559829711914062, 4.642575740814208984, 0, 0, -0.731353759765625, 0.681998312473297119, 300, 255, 1, 0), -- 106318 (Area: 0 - Difficulty: 0)
(@OGUID+23, 106318, 1, 14, 0, 1, 1, -910.26239013671875, -4487.80859375, 29.70616722106933593, 4.171337604522705078, 0, 0, -0.87035560607910156, 0.492423713207244873, 300, 255, 1, 0), -- 106318 (Area: 0 - Difficulty: 0)
(@OGUID+24, 106318, 1, 14, 0, 1, 1, -1039.701416015625, -4589.80859375, 25.82188606262207031, 0.209439441561698913, 0, 0, 0.104528427124023437, 0.994521915912628173, 300, 255, 1, 0), -- 106318 (Area: 0 - Difficulty: 0)
-- Razormane Grounds North
(@OGUID+25, 106318, 1, 14, 0, 1, 1, 555.00738525390625, -4266.4765625, 16.51405715942382812, 4.241150379180908203, 0, 0, -0.85264015197753906, 0.522498607635498046, 300, 255, 1, 0), -- 106318 (Area: 0 - Difficulty: 0)
(@OGUID+26, 106318, 1, 14, 0, 1, 1, 440.374786376953125, -4213.46337890625, 25.21331214904785156, 4.537858963012695312, 0, 0, -0.76604366302490234, 0.642788589000701904, 300, 255, 1, 0), -- 106318 (Area: 0 - Difficulty: 0)
(@OGUID+27, 106318, 1, 14, 0, 1, 1, 421.900299072265625, -4252.3330078125, 26.80411911010742187, 2.513273954391479492, 0, 0, 0.951056480407714843, 0.309017121791839599, 300, 255, 1, 0), -- 106318 (Area: 0 - Difficulty: 0)
(@OGUID+28, 106318, 1, 14, 0, 1, 1, 426.05328369140625, -4280.52587890625, 29.42941665649414062, 5.201082706451416015, 0, 0, -0.51503753662109375, 0.857167601585388183, 300, 255, 1, 0), -- 106318 (Area: 0 - Difficulty: 0)
-- Tiragarde Keep
(@OGUID+29, 106318, 1, 14, 0, 1, 1, -264.111328125, -5131.67236328125, 24.34155082702636718, 2.321286916732788085, 0, 0, 0.917059898376464843, 0.398749500513076782, 300, 255, 1, 0), -- 106318 (Area: 0 - Difficulty: 0)
(@OGUID+30, 106318, 1, 14, 0, 1, 1, -173.708114624023437, -5116.1181640625, 22.11680030822753906, 0.837757468223571777, 0, 0, 0.406736373901367187, 0.913545548915863037, 300, 255, 1, 0), -- 106318 (Area: 0 - Difficulty: 0)
(@OGUID+31, 106318, 1, 14, 0, 1, 1, -262.4288330078125, -5019.60595703125, 22.11684036254882812, 4.258606910705566406, 0, 0, -0.84804725646972656, 0.529920578002929687, 300, 255, 1, 0), -- 106318 (Area: 0 - Difficulty: 0)
(@OGUID+32, 106318, 1, 14, 0, 1, 1, -238.197052001953125, -5109.99609375, 41.3467559814453125, 2.949595451354980468, 0, 0, 0.995395660400390625, 0.095851235091686248, 300, 255, 1, 0), -- 106318 (Area: 0 - Difficulty: 0)
-- Drygulch Ravine (2x)
(@OGUID+33, 106318, 1, 14, 0, 1, 1, 960.04644775390625, -4777.72705078125, 22.26800155639648437, 2.024578809738159179, 0, 0, 0.848047256469726562, 0.529920578002929687, 300, 255, 1, 0), -- 106318 (Area: 0 - Difficulty: 0)
(@OGUID+34, 106318, 1, 14, 0, 1, 1, 1027.068603515625, -4821.189453125, 15.20469379425048828, 2.478367090225219726, 0, 0, 0.94551849365234375, 0.325568377971649169, 300, 255, 1, 0), -- 106318 (Area: 0 - Difficulty: 0)
(@OGUID+35, 106318, 1, 14, 0, 1, 1, 811.54296875, -4806.70947265625, 11.03552532196044921, 0.733038187026977539, 0, 0, 0.358367919921875, 0.933580458164215087, 300, 255, 1, 0), -- 106318 (Area: 0 - Difficulty: 0)
(@OGUID+36, 106318, 1, 14, 0, 1, 1, 975.26019287109375, -4667.09228515625, 27.34987449645996093, 0.907570242881774902, 0, 0, 0.438370704650878906, 0.898794233798980712, 300, 255, 1, 0), -- 106318 (Area: 0 - Difficulty: 0)
(@OGUID+37, 106318, 1, 14, 0, 1, 1, 1106.89013671875, -4706.90478515625, 17.55274772644042968, 6.03883981704711914, 0, 0, -0.12186908721923828, 0.9925462007522583, 300, 255, 1, 0), -- 106318 (Area: 0 - Difficulty: 0)
(@OGUID+38, 106318, 1, 14, 0, 1, 1, 931.1590576171875, -4766.0048828125, 23.70423316955566406, 6.178466320037841796, 0, 0, -0.05233573913574218, 0.998629570007324218, 300, 255, 1, 0), -- 106318 (Area: 0 - Difficulty: 0)
(@OGUID+39, 106318, 1, 14, 0, 1, 1, 1141.5926513671875, -4667.72509765625, 17.882110595703125, 0.523597896099090576, 0, 0, 0.258818626403808593, 0.965925931930541992, 300, 255, 1, 0), -- 106318 (Area: 0 - Difficulty: 0)
-- Skull Rock
(@OGUID+40, 106318, 1, 14, 0, 1, 1, 1546.701416015625, -4750.49853515625, 14.49754810333251953, 2.356194972991943359, 0, 0, 0.923879623413085937, 0.382683247327804565, 300, 255, 1, 0), -- 106318 (Area: 0 - Difficulty: 0)
(@OGUID+41, 106318, 1, 14, 0, 1, 1, 1458.2921142578125, -4683.80029296875, 6.255218982696533203, 6.021387100219726562, 0, 0, -0.13052558898925781, 0.991444945335388183, 300, 255, 1, 0), -- 106318 (Area: 0 - Difficulty: 0)
(@OGUID+42, 106318, 1, 14, 0, 1, 1, 1488.4793701171875, -4752.35791015625, 21.02687454223632812, 1.343901276588439941, 0, 0, 0.622513771057128906, 0.78260880708694458, 300, 255, 1, 0), -- 106318 (Area: 0 - Difficulty: 0)
(@OGUID+43, 106318, 1, 14, 0, 1, 1, 1476.1156005859375, -4745.69384765625, 12.19133853912353515, 4.433136463165283203, 0, 0, -0.79863548278808593, 0.60181504487991333, 300, 255, 1, 0), -- 106318 (Area: 0 - Difficulty: 0)
(@OGUID+44, 106318, 1, 14, 0, 1, 1, 1428.388916015625, -4682.04931640625, -0.56650900840759277, 0.418878614902496337, 0, 0, 0.207911491394042968, 0.978147625923156738, 300, 255, 1, 0), -- 106318 (Area: 0 - Difficulty: 0)
-- Dustwind Cave
(@OGUID+45, 106318, 1, 14, 0, 1, 1, 908.54669189453125, -4754.279296875, 18.70039176940917968, 2.321286916732788085, 0, 0, 0.917059898376464843, 0.398749500513076782, 300, 255, 1, 0), -- 106318 (Area: 0 - Difficulty: 0)
(@OGUID+46, 106318, 1, 14, 0, 1, 1, 861.81011962890625, -4777.552734375, 38.2888031005859375, 5.759587764739990234, 0, 0, -0.25881862640380859, 0.965925931930541992, 300, 255, 1, 0), -- 106318 (Area: 0 - Difficulty: 0)
(@OGUID+47, 106318, 1, 14, 0, 1, 1, 877.26470947265625, -4738.90380859375, 30.01175689697265625, 4.101525306701660156, 0, 0, -0.88701057434082031, 0.461749136447906494, 300, 255, 1, 0), -- 106318 (Area: 0 - Difficulty: 0)
-- Thunder Ridge
(@OGUID+48, 106318, 1, 14, 0, 1, 1, 962.8856201171875, -4295.4208984375, -6.32940196990966796, 1.431168079376220703, 0, 0, 0.656058311462402343, 0.754710197448730468, 300, 255, 1, 0), -- 106318 (Area: 0 - Difficulty: 0)
(@OGUID+49, 106318, 1, 14, 0, 1, 1, 734.21051025390625, -4121.8203125, -9.89963245391845703, 3.298687219619750976, 0, 0, -0.99691677093505859, 0.078466430306434631, 300, 255, 1, 0), -- 106318 (Area: 0 - Difficulty: 0)
(@OGUID+50, 106318, 1, 14, 0, 1, 1, 856.53399658203125, -4209.93408203125, -11.350996971130371, 5.305802345275878906, 0, 0, -0.46947097778320312, 0.882947921752929687, 300, 255, 1, 0), -- 106318 (Area: 0 - Difficulty: 0)
(@OGUID+51, 106318, 1, 14, 0, 1, 1, 852.07354736328125, -4187.01806640625, -10.9082317352294921, 6.12610626220703125, 0, 0, -0.07845878601074218, 0.996917366981506347, 300, 255, 1, 0); -- 106318 (Area: 0 - Difficulty: 0)
-- 14 up zone-wide total in Durotar
SET @OBJECTPOOLS :=534;
DELETE FROM `pool_gameobject` WHERE `guid` BETWEEN @OGUID+0 AND @OGUID+51;
DELETE FROM `pool_template` WHERE `entry` BETWEEN @OBJECTPOOLS+0 AND @OBJECTPOOLS+13;
INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES
(@OBJECTPOOLS+0, 1, 'Battered Chest 106318 West Razormane Grounds');
INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES
(@OGUID+0, @OBJECTPOOLS+0, 25, 'West Razormane Grounds Battered Chest 1/4'),
(@OGUID+1, @OBJECTPOOLS+0, 25, 'West Razormane Grounds Battered Chest 2/4'),
(@OGUID+2, @OBJECTPOOLS+0, 25, 'West Razormane Grounds Battered Chest 3/4'),
(@OGUID+3, @OBJECTPOOLS+0, 25, 'West Razormane Grounds Battered Chest 4/4');
INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES
(@OBJECTPOOLS+1, 1, 'Battered Chest 106318 East Razormane Grounds');
INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES
(@OGUID+4, @OBJECTPOOLS+1, 50, 'West Razormane Grounds Battered Chest 1/2'),
(@OGUID+5, @OBJECTPOOLS+1, 50, 'West Razormane Grounds Battered Chest 2/2');
INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES
(@OBJECTPOOLS+2, 1, 'Battered Chest 106318 Scuttle Coast South');
INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES
(@OGUID+6, @OBJECTPOOLS+2, 25, 'Scuttle Coast South Battered Chest 1/4'),
(@OGUID+7, @OBJECTPOOLS+2, 25, 'Scuttle Coast South Battered Chest 2/4'),
(@OGUID+8, @OBJECTPOOLS+2, 25, 'Scuttle Coast South Battered Chest 3/4'),
(@OGUID+9, @OBJECTPOOLS+2, 25, 'Scuttle Coast South Battered Chest 4/4');
INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES
(@OBJECTPOOLS+3, 1, 'Battered Chest 106318 Echo Isles');
INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES
(@OGUID+10, @OBJECTPOOLS+3, 20, 'Echo Isles Battered Chest 1/5'),
(@OGUID+11, @OBJECTPOOLS+3, 20, 'Echo Isles Battered Chest 2/5'),
(@OGUID+12, @OBJECTPOOLS+3, 20, 'Echo Isles Battered Chest 3/5'),
(@OGUID+13, @OBJECTPOOLS+3, 20, 'Echo Isles Battered Chest 4/5'),
(@OGUID+14, @OBJECTPOOLS+3, 20, 'Echo Isles Battered Chest 5/5');
INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES
(@OBJECTPOOLS+4, 1, 'Battered Chest 106318 Outer Harpy Area');
INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES
(@OGUID+15, @OBJECTPOOLS+4, 25, 'Outer Harpy Area Battered Chest 1/4'),
(@OGUID+16, @OBJECTPOOLS+4, 25, 'Outer Harpy Area Battered Chest 2/4'),
(@OGUID+17, @OBJECTPOOLS+4, 25, 'Outer Harpy Area Battered Chest 3/4'),
(@OGUID+18, @OBJECTPOOLS+4, 25, 'Outer Harpy Area Battered Chest 4/4');
INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES
(@OBJECTPOOLS+5, 1, 'Battered Chest 106318 Scuttle Coast North Missing One Spawn');
INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES
(@OGUID+19, @OBJECTPOOLS+5, 33, 'Scuttle Coast North Battered Chest 1/4'),
(@OGUID+20, @OBJECTPOOLS+5, 33, 'Scuttle Coast North Battered Chest 2/4'),
(@OGUID+21, @OBJECTPOOLS+5, 34, 'Scuttle Coast North Battered Chest 3/4');
INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES
(@OBJECTPOOLS+6, 1, 'Battered Chest 106318 Kolkar Crag');
INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES
(@OGUID+22, @OBJECTPOOLS+6, 34, 'Kolkar Crag Battered Chest 1/3'),
(@OGUID+23, @OBJECTPOOLS+6, 33, 'Kolkar Crag Battered Chest 2/3'),
(@OGUID+24, @OBJECTPOOLS+6, 33, 'Kolkar Crag Battered Chest 3/3');
INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES
(@OBJECTPOOLS+7, 1, 'Battered Chest 106318 Razormane Grounds North');
INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES
(@OGUID+25, @OBJECTPOOLS+7, 25, 'Razormane Grounds North Battered Chest 1/4'),
(@OGUID+26, @OBJECTPOOLS+7, 25, 'Razormane Grounds North Battered Chest 2/4'),
(@OGUID+27, @OBJECTPOOLS+7, 25, 'Razormane Grounds North Battered Chest 3/4'),
(@OGUID+28, @OBJECTPOOLS+7, 25, 'Razormane Grounds North Battered Chest 4/4');
INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES
(@OBJECTPOOLS+8, 1, 'Battered Chest 106318 Tiragarde Keep');
INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES
(@OGUID+29, @OBJECTPOOLS+8, 25, 'Tiragarde Keep Battered Chest 1/4'),
(@OGUID+30, @OBJECTPOOLS+8, 25, 'Tiragarde Keep Battered Chest 2/4'),
(@OGUID+31, @OBJECTPOOLS+8, 25, 'Tiragarde Keep Battered Chest 3/4'),
(@OGUID+32, @OBJECTPOOLS+8, 25, 'Tiragarde Keep Battered Chest 4/4');
INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES
(@OBJECTPOOLS+9, 2, 'Battered Chest 106318 Drygulch Ravine 2x');
INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES
(@OGUID+33, @OBJECTPOOLS+9, 15, 'Drygulch Ravine Battered Chest 1/7'),
(@OGUID+34, @OBJECTPOOLS+9, 15, 'Drygulch Ravine Battered Chest 2/7'),
(@OGUID+35, @OBJECTPOOLS+9, 14, 'Drygulch Ravine Battered Chest 3/7'),
(@OGUID+36, @OBJECTPOOLS+9, 14, 'Drygulch Ravine Battered Chest 4/7'),
(@OGUID+37, @OBJECTPOOLS+9, 14, 'Drygulch Ravine Battered Chest 5/7'),
(@OGUID+38, @OBJECTPOOLS+9, 14, 'Drygulch Ravine Battered Chest 6/7'),
(@OGUID+39, @OBJECTPOOLS+9, 14, 'Drygulch Ravine Battered Chest 7/7');
INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES
(@OBJECTPOOLS+10, 1, 'Battered Chest 106318 Skull Rock');
INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES
(@OGUID+40, @OBJECTPOOLS+10, 20, 'Skull Rock Battered Chest 1/5'),
(@OGUID+41, @OBJECTPOOLS+10, 20, 'Skull Rock Battered Chest 2/5'),
(@OGUID+42, @OBJECTPOOLS+10, 20, 'Skull Rock Battered Chest 3/5'),
(@OGUID+43, @OBJECTPOOLS+10, 20, 'Skull Rock Battered Chest 4/5'),
(@OGUID+44, @OBJECTPOOLS+10, 20, 'Skull Rock Battered Chest 5/5');
INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES
(@OBJECTPOOLS+11, 1, 'Battered Chest 106318 Dustwind Cave');
INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES
(@OGUID+45, @OBJECTPOOLS+11, 33, 'Dustwind Cave Battered Chest 1/3'),
(@OGUID+46, @OBJECTPOOLS+11, 34, 'Dustwind Cave Battered Chest 2/3'),
(@OGUID+47, @OBJECTPOOLS+11, 33, 'Dustwind Cave Battered Chest 3/3');
INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES
(@OBJECTPOOLS+12, 1, 'Battered Chest 106318 Thunder Ridge');
INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES
(@OGUID+48, @OBJECTPOOLS+12, 25, 'Thunder Ridge Battered Chest 1/4'),
(@OGUID+49, @OBJECTPOOLS+12, 25, 'Thunder Ridge Battered Chest 2/4'),
(@OGUID+50, @OBJECTPOOLS+12, 25, 'Thunder Ridge Battered Chest 3/4'),
(@OGUID+51, @OBJECTPOOLS+12, 25, 'Thunder Ridge Battered Chest 4/4');

View File

@@ -0,0 +1,43 @@
-- DB update 2022_10_20_00 -> 2022_10_20_01
-- Spawns npc's from 13:00 - 17:00
UPDATE `game_event` SET `start_time`= '2016-10-30 13:00:00', `length` = 240, `description`= 'Stranglethorn Fishing Extravaganza - The Crew' WHERE `eventEntry` = 62;
-- Quests can be turned in 14:00 - 17:00
DELETE FROM `game_event` WHERE `eventEntry` = 90;
INSERT INTO `game_event` (`eventEntry`, `start_time`, `end_time`, `occurence`, `length`, `holiday`, `holidayStage`, `description`, `world_event`, `announce`) VALUES
(90,'2016-10-30 14:00:00','2030-12-31 07:00:00',10080,180,0,0,'Stranglethorn Fishing Extravaganza - Turn-ins',0,2);
-- Minimum fishing skill for Stranglethorn Vale Fishing Extravaganza quests is 150, also [Could I get a Fishing Flier?]
DELETE FROM `quest_template_addon` WHERE `ID` IN (8194, 8193, 8225, 8224, 8221, 8228, 8229);
INSERT INTO `quest_template_addon` (`ID`, `MaxLevel`, `AllowableClasses`, `SourceSpellID`, `PrevQuestID`, `NextQuestID`, `ExclusiveGroup`, `RewardMailTemplateID`, `RewardMailDelay`, `RequiredSkillID`, `RequiredSkillPoints`, `RequiredMinRepFaction`, `RequiredMaxRepFaction`, `RequiredMinRepValue`, `RequiredMaxRepValue`, `ProvidedItemCount`, `SpecialFlags`) VALUES
(8194,0,0,0,0,0,0,0,0,356,150,0,0,0,0,0,1),
(8193,0,0,0,0,0,0,0,0,356,150,0,0,0,0,0,1),
(8225,0,0,0,0,0,0,0,0,356,150,0,0,0,0,0,1),
(8224,0,0,0,0,0,0,0,0,356,150,0,0,0,0,0,1),
(8221,0,0,0,0,0,0,0,0,356,150,0,0,0,0,0,1),
(8228,0,0,0,0,0,0,0,0,356,150,0,0,0,0,0,1),
(8229,0,0,0,0,0,0,0,0,356,150,0,0,0,0,0,1);
-- Box on which Riggle Bassbait stands: linked to event 62 (The Crew)
UPDATE `game_event_gameobject` SET `eventEntry`= 62 WHERE `guid`= 164445;
-- Riggle Bassbait: use broadcast texts
UPDATE `creature_text` SET `BroadcastTextId` = 10608, `Text`='Let the Fishing Tournament BEGIN!' WHERE `CreatureID` = 15077 AND `GroupID` = 0;
UPDATE `creature_text` SET `BroadcastTextId` = 10609, `Text`='And the Tastyfish have gone for the week! I will remain for another hour to allow you to turn in your fish!' WHERE `CreatureID` = 15077 AND `GroupID` = 1;
UPDATE `creature_text` SET `BroadcastTextId` = 10610, `Text`='We have a winner! $n has won FIRST PLACE in the tournament!' WHERE `CreatureID` = 15077 AND `GroupID` = 2;
-- Fishbot 5000 quests: only available when event 90 (Turn-ins) is active
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`= 19 AND `SourceEntry` IN (8225,8224,8221);
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
(19,0,8225,0,0,12,0,90,0,0,0,0,0,'','Fishing Extravaganza - Turn-ins active'),
(19,0,8224,0,0,12,0,90,0,0,0,0,0,'','Fishing Extravaganza - Turn-ins active'),
(19,0,8221,0,0,12,0,90,0,0,0,0,0,'','Fishing Extravaganza - Turn-ins active');
-- Jang quest: event 90 (Turn-ins) is active and event has a winner (world state id 198)
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`= 19 AND `SourceEntry`= 8194;
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
(19,0,8194,0,0,12,0,90,0,0,0,0,0,'','Fishing Extravaganza - Turn-ins active'),
(19,0,8194,0,0,11,0,198,1,0,0,0,0,'','Fishing Extravaganza - fishing event has a winner');
-- Riggle texts: zone wide announcement
UPDATE `creature_text` SET `TextRange` = 2 WHERE `CreatureID` = 15077 AND `GroupID` IN (0,1,2);

View File

@@ -0,0 +1,15 @@
-- DB update 2022_10_20_01 -> 2022_10_21_00
--
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` IN (15740, 15741, 15742);
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 15742) AND (`source_type` = 0) AND (`id` IN (0));
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(15742, 0, 0, 0, 0, 0, 100, 0, 5000, 5000, 5000, 10000, 0, 11, 26167, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Colossus of Ashi - In Combat - Cast \'Colossal Smash\'');
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 15741) AND (`source_type` = 0) AND (`id` IN (0));
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(15741, 0, 0, 0, 0, 0, 100, 0, 5000, 5000, 5000, 10000, 0, 11, 26167, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Colossus of Regal - In Combat - Cast \'Colossal Smash\'');
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 15740) AND (`source_type` = 0) AND (`id` IN (0));
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(15740, 0, 0, 0, 0, 0, 100, 0, 5000, 5000, 5000, 10000, 0, 11, 26167, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Colossus of Zora - In Combat - Cast \'Colossal Smash\'');

View File

@@ -0,0 +1,8 @@
-- DB update 2022_10_21_00 -> 2022_10_21_01
-- https://github.com/azerothcore/azerothcore-wotlk/issues/13391
-- corrects alliance respawn in wrong zone
UPDATE `graveyard_zone` SET `ID`='1471' WHERE `ID`=101 AND `GhostZone`=135;
-- we add a new ghost zone due to the second you revive in Iceflow Lake you go to another grave yard on resurrection
DELETE FROM `graveyard_zone` WHERE `ID`=1471 AND `GhostZone`=211;
INSERT INTO `graveyard_zone` (`ID`, `GhostZone`, `Faction`, `Comment`) VALUES (1471, 211, 469, 'Dun Morogh, Iceflow Lake - Dun Morogh');

View File

@@ -0,0 +1,8 @@
-- DB update 2022_10_21_01 -> 2022_10_22_00
--
DELETE FROM `smart_scripts` WHERE `entryorguid`=6740 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`, `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
(6740,0,0,1,62,0,100,0,342,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,'Innkeeper Allison - On Gossip Option 0 Selected - Close Gossip'),
(6740,0,1,0,61,0,100,0,0,0,0,0,0,85,24751,0,0,0,0,0,7,0,0,0,0,0,0,0,0,'Innkeeper Allison - On Gossip Option 0 Selected - Invoker Cast Trick or Treat'),
(6740,0,2,3,22,0,100,0,41,0,0,0,0,33,6740,0,0,0,0,0,7,0,0,0,0,0,0,0,0,'Innkeeper Allison - Received Emote 41 - Quest Credit Flexing for Nougat'),
(6740,0,3,0,61,0,100,0,0,0,0,0,0,1,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,'Innkeeper Allison - Received Emote 41 - Talk 0');

View File

@@ -6,6 +6,8 @@
# Do not change this
# Files in LogsDir will reflect on your host directory: docker/authserver/logs
LogsDir = "/azerothcore/env/dist/logs"
# Files in TempDir will reflect on your host directory: docker/authserver/temp
TempDir = "/azerothcore/env/dist/temp"
# Change this configuration accordingly with your docker setup
# The format is "hostname;port;username;password;database":

View File

@@ -1,6 +1,8 @@
# Do NOT change those Dir configs
# Files in LogsDir will reflect on your host directory: docker/worldserver/logs
LogsDir = "/azerothcore/env/dist/logs"
# Files in TempDir will reflect on your host directory: docker/authserver/temp
TempDir = "/azerothcore/env/dist/temp"
DataDir = "/azerothcore/env/dist/data"
# Change this configuration accordingly with your docker setup

View File

@@ -6,6 +6,8 @@
# Do NOT change those Dir configs
# Files in LogsDir will reflect on your host directory: docker/worldserver/logs
LogsDir = "/azerothcore/env/dist/logs"
# Files in TempDir will reflect on your host directory: docker/authserver/temp
TempDir = "/azerothcore/env/dist/temp"
DataDir = "/azerothcore/env/dist/data"
# Change this configuration accordingly with your docker setup

View File

@@ -170,6 +170,7 @@ find_path(MYSQL_INCLUDE_DIR
/usr/local/include
/usr/local/include/mysql
/usr/local/mysql/include
"C:/tools/mysql/current/include" # chocolatey package
"C:/Program Files/MySQL/MySQL Server 8.0/include"
"C:/Program Files/MySQL/MySQL Server 5.7/include"
"C:/Program Files/MySQL/include"
@@ -209,6 +210,7 @@ if( WIN32 )
libmysql
PATHS
${MYSQL_ADD_LIBRARIES_PATH}
"C:/tools/mysql/current/lib" # chocolatey package
"C:/Program Files/MySQL/MySQL Server 8.0/lib"
"C:/Program Files/MySQL/MySQL Server 8.0/lib/opt"
"C:/Program Files/MySQL/MySQL Server 5.7/lib/opt"
@@ -261,6 +263,7 @@ endif( UNIX )
if( WIN32 )
find_program(MYSQL_EXECUTABLE mysql
PATHS
"C:/tools/mysql/current/bin" # chocolatey package
"${PROGRAM_FILES_64}/MySQL/MySQL Server 8.0/bin"
"${PROGRAM_FILES_64}/MySQL/MySQL Server 5.7/bin"
"${PROGRAM_FILES_64}/MySQL/MySQL Server 8.0/bin/opt"

View File

@@ -70,7 +70,7 @@ namespace Acore
static int CreateChildProcess(T waiter, std::string const& executable,
std::vector<std::string> const& argsVector,
std::string const& logger, std::string const& input,
bool secure, boost::process::environment envVariables = boost::this_process::environment())
bool secure)
{
ipstream outStream;
ipstream errStream;
@@ -97,7 +97,7 @@ namespace Acore
return child{
exe = std::filesystem::absolute(executable).string(),
args = argsVector,
env = environment(envVariables),
env = environment(boost::this_process::environment()),
std_in = inputFile.get(),
std_out = outStream,
std_err = errStream
@@ -109,7 +109,7 @@ namespace Acore
return child{
exe = std::filesystem::absolute(executable).string(),
args = argsVector,
env = environment(envVariables),
env = environment(boost::this_process::environment()),
std_in = boost::process::close,
std_out = outStream,
std_err = errStream
@@ -144,7 +144,7 @@ namespace Acore
}
int StartProcess(std::string const& executable, std::vector<std::string> const& args,
std::string const& logger, std::string input_file, bool secure, boost::process::environment env)
std::string const& logger, std::string input_file, bool secure)
{
return CreateChildProcess([](child& c) -> int
{
@@ -157,7 +157,7 @@ namespace Acore
{
return EXIT_FAILURE;
}
}, executable, args, logger, input_file, secure, env);
}, executable, args, logger, input_file, secure);
}
class AsyncProcessResultImplementation
@@ -168,7 +168,6 @@ namespace Acore
std::string const logger;
std::string const input_file;
bool const is_secure;
boost::process::environment envVariables;
std::atomic<bool> was_terminated;
@@ -178,10 +177,10 @@ namespace Acore
public:
explicit AsyncProcessResultImplementation(std::string executable_, std::vector<std::string> args_,
std::string logger_, std::string input_file_,
bool secure, boost::process::environment env)
bool secure)
: executable(std::move(executable_)), args(std::move(args_)),
logger(std::move(logger_)), input_file(input_file_),
is_secure(secure), envVariables(env), was_terminated(false) { }
is_secure(secure), was_terminated(false) { }
AsyncProcessResultImplementation(AsyncProcessResultImplementation const&) = delete;
AsyncProcessResultImplementation& operator= (AsyncProcessResultImplementation const&) = delete;
@@ -210,7 +209,7 @@ namespace Acore
my_child.reset();
return was_terminated ? EXIT_FAILURE : exitCode;
}, executable, args, logger, input_file, is_secure, envVariables);
}, executable, args, logger, input_file, is_secure);
}
void SetFuture(std::future<int> result_)
@@ -246,10 +245,10 @@ namespace Acore
std::shared_ptr<AsyncProcessResult>
StartAsyncProcess(std::string executable, std::vector<std::string> args,
std::string logger, std::string input_file, bool secure, boost::process::native_environment env)
std::string logger, std::string input_file, bool secure)
{
auto handle = std::make_shared<AsyncProcessResultImplementation>(
std::move(executable), std::move(args), std::move(logger), std::move(input_file), secure, env);
std::move(executable), std::move(args), std::move(logger), std::move(input_file), secure);
handle->SetFuture(std::async(std::launch::async, [handle] { return handle->StartProcess(); }));
return handle;

View File

@@ -23,7 +23,6 @@
#include <memory>
#include <string>
#include <vector>
#include <boost/process/environment.hpp>
namespace Acore
{
@@ -35,7 +34,7 @@ namespace Acore
/// Note that most executables expect it's name as the first argument.
AC_COMMON_API int StartProcess(std::string const& executable, std::vector<std::string> const& args,
std::string const& logger, std::string input_file = "",
bool secure = false, boost::process::environment env = boost::this_process::environment());
bool secure = false);
/// Platform and library independent representation
/// of asynchronous process results
@@ -59,7 +58,7 @@ namespace Acore
/// Note that most executables expect it's name as the first argument.
AC_COMMON_API std::shared_ptr<AsyncProcessResult> StartAsyncProcess(std::string executable, std::vector<std::string> args,
std::string logger, std::string input_file = "",
bool secure = false, boost::process::environment env = boost::this_process::environment());
bool secure = false);
/// Searches for the given executable in the PATH variable
/// and returns a non-empty string when it was found.

View File

@@ -64,5 +64,19 @@ std::string Acore::String::TrimRightInPlace(std::string& str)
return str;
}
/**
* @brief Util function to add a suffix char. Can be used to add a slash at the end of a path
*
* @param str String where to apply the suffix
* @param suffix Character to add at the end of the str
* @return std::string Suffixed string
*/
std::string Acore::String::AddSuffixIfNotExists(std::string str, const char suffix) {
if (str.empty() || (str.at(str.length() - 1) != suffix))
str.push_back(suffix);
return str;
}
// Template Trim
template AC_COMMON_API std::string Acore::String::Trim<std::string>(const std::string& s, const std::locale& loc /*= std::locale()*/);

View File

@@ -72,6 +72,8 @@ namespace Acore::String
AC_COMMON_API Str Trim(const Str& s, const std::locale& loc = std::locale());
AC_COMMON_API std::string TrimRightInPlace(std::string& str);
AC_COMMON_API std::string AddSuffixIfNotExists(std::string str, const char suffix);
}
#endif

View File

@@ -167,7 +167,7 @@ SourceDirectory = ""
# Description: The path to your MySQL CLI binary.
# If the path is left empty, built-in path from cmake is used.
# Example: "C:/Program Files/MariaDB 10.5/bin/mysql.exe"
# "C:/Program Files/MySQL/MySQL Server 5.6/bin/mysql.exe"
# "C:/Program Files/MySQL/MySQL Server 8.0/bin/mysql.exe"
# "mysql.exe"
# "/usr/bin/mysql"
# Default: ""
@@ -175,6 +175,16 @@ SourceDirectory = ""
MySQLExecutable = ""
#
# TempDir
# Description: Temp directory setting.
# Important: TempDir needs to be quoted, as the string might contain space characters.
# TempDir directory must exists, or the server can't work properly
# Example: "/home/youruser/azerothcore/temp"
# Default: "" - (Temp files will be stored in the current path)
TempDir = ""
#
# IPLocationFile
# Description: The path to your IP2Location database CSV file.

View File

@@ -81,6 +81,16 @@ DataDir = "."
LogsDir = ""
#
# TempDir
# Description: Temp directory setting.
# Important: TempDir needs to be quoted, as the string might contain space characters.
# TempDir directory must exists, or the server can't work properly
# Example: "/home/youruser/azerothcore/temp"
# Default: "" - (Temp files will be stored in the current path)
TempDir = ""
#
# LoginDatabaseInfo
# WorldDatabaseInfo
@@ -193,7 +203,7 @@ SourceDirectory = ""
# MySQLExecutable
# Description: The path to your MySQL CLI binary.
# If the path is left empty, built-in path from cmake is used.
# Example: "C:/Program Files/MySQL/MySQL Server 5.7/bin/mysql.exe"
# Example: "C:/Program Files/MySQL/MySQL Server 8.0/bin/mysql.exe"
# "mysql.exe"
# "/usr/bin/mysql"
# Default: ""

View File

@@ -230,9 +230,9 @@ bool DBUpdater<T>::Create(DatabaseWorkerPool<T>& pool)
{
LOG_WARN("sql.updates", "Database \"{}\" does not exist", pool.GetConnectionInfo()->database);
const char* interactiveOpt = std::getenv("AC_DISABLE_INTERACTIVE");
const char* disableInteractive = std::getenv("AC_DISABLE_INTERACTIVE");
if (!sConfigMgr->isDryRun() && std::strcmp(interactiveOpt, "1") != 0)
if (!sConfigMgr->isDryRun() && (disableInteractive == nullptr || std::strcmp(disableInteractive, "1") != 0))
{
std::cout << "Do you want to create it? [yes (default) / no]:" << std::endl;
std::string answer;
@@ -500,16 +500,29 @@ template<class T>
void DBUpdater<T>::ApplyFile(DatabaseWorkerPool<T>& pool, std::string const& host, std::string const& user,
std::string const& password, std::string const& port_or_socket, std::string const& database, std::string const& ssl, Path const& path)
{
std::string configTempDir = sConfigMgr->GetOption<std::string>("TempDir", "");
auto tempDir = configTempDir.empty() ? std::filesystem::temp_directory_path().string() : configTempDir;
tempDir = Acore::String::AddSuffixIfNotExists(tempDir, std::filesystem::path::preferred_separator);
std::string confFileName = "mysql_ac.conf";
std::ofstream outfile (tempDir + confFileName);
outfile << "[client]\npassword = \"" << password << '"' << std::endl;
outfile.close();
std::vector<std::string> args;
args.reserve(9);
args.emplace_back("--defaults-extra-file="+tempDir + confFileName+"");
// CLI Client connection info
args.emplace_back("-h" + host);
args.emplace_back("-u" + user);
if (!password.empty())
args.emplace_back("-p" + password);
// Check if we want to connect through ip or socket (Unix only)
#ifdef _WIN32
@@ -559,11 +572,9 @@ void DBUpdater<T>::ApplyFile(DatabaseWorkerPool<T>& pool, std::string const& hos
if (!database.empty())
args.emplace_back(database);
auto env = boost::process::environment();
// Invokes a mysql process which doesn't leak credentials to logs
int const ret = Acore::StartProcess(DBUpdaterUtil::GetCorrectedMySQLExecutable(), args,
"sql.updates", "", true, env);
"sql.updates", "", true);
if (ret != EXIT_SUCCESS)
{

View File

@@ -2302,11 +2302,6 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
break;
case CONDITION_WORLD_STATE:
{
if (!sWorld->getWorldState(cond->ConditionValue1))
{
LOG_ERROR("sql.sql", "World state condition has non existing world state in value1 ({}), skipped", cond->ConditionValue1);
return false;
}
if (cond->ConditionValue3)
LOG_ERROR("sql.sql", "World state condition has useless data in value3 ({})!", cond->ConditionValue3);
break;

View File

@@ -190,7 +190,7 @@ struct boss_eye_of_cthun : public BossAI
void EnterCombat(Unit* who) override
{
ScheduleTasks();
ScheduleTasks(true);
BossAI::EnterCombat(who);
_beamTarget = who->GetGUID();
}
@@ -231,12 +231,12 @@ struct boss_eye_of_cthun : public BossAI
}
}
void ScheduleTasks()
void ScheduleTasks(bool onEngage = false)
{
_scheduler.
Schedule(3s, [this](TaskContext task)
Schedule(3s, [this, onEngage](TaskContext task)
{
if (task.GetRepeatCounter() < 3)
if (task.GetRepeatCounter() < 3 && onEngage)
{
if (Unit* target = ObjectAccessor::GetUnit(*me, _beamTarget))
{

View File

@@ -207,19 +207,30 @@ public:
}
};
enum riggleBassbait
/*
* Stranglethorn Vale Fishing Extravaganza World States
*/
enum FishingExtravaganzaWorldStates
{
EVENT_RIGGLE_ANNOUNCE = 1,
STV_FISHING_PREV_WIN_TIME = 197,
STV_FISHING_HAS_WINNER = 198,
STV_FISHING_ANNOUNCE_EVENT_BEGIN = 199,
STV_FISHING_ANNOUNCE_POOLS_DESPAN = 200
};
RIGGLE_SAY_START = 0,
RIGGLE_SAY_WINNER = 1,
RIGGLE_SAY_END = 2,
enum RiggleBassbait
{
RIGGLE_SAY_START = 0,
RIGGLE_SAY_POOLS_END = 1,
RIGGLE_SAY_WINNER = 2,
QUEST_MASTER_ANGLER = 8193,
QUEST_MASTER_ANGLER = 8193,
DATA_ANGLER_FINISHED = 1,
EVENT_FISHING_TURN_INS = 90,
EVENT_FISHING_POOLS = 15,
GAME_EVENT_FISHING = 62
GOSSIP_EVENT_ACTIVE = 7614,
GOSSIP_EVENT_OVER = 7714
};
class npc_riggle_bassbait : public CreatureScript
@@ -231,84 +242,95 @@ public:
{
npc_riggle_bassbaitAI(Creature* c) : ScriptedAI(c)
{
events.Reset();
events.ScheduleEvent(EVENT_RIGGLE_ANNOUNCE, 1000, 1, 0);
finished = sWorld->getWorldState(GAME_EVENT_FISHING) == 1;
startWarning = false;
finishWarning = false;
}
EventMap events;
bool finished;
bool startWarning;
bool finishWarning;
uint32 GetData(uint32 type) const override
{
if (type == DATA_ANGLER_FINISHED)
return (uint32)finished;
return 0;
}
void DoAction(int32 param) override
{
if (param == DATA_ANGLER_FINISHED)
m_uiTimer = 0;
auto prevWinTime = sWorld->getWorldState(STV_FISHING_PREV_WIN_TIME);
if (GameTime::GetGameTime().count() - prevWinTime > DAY)
{
finished = true;
sWorld->setWorldState(GAME_EVENT_FISHING, 1);
// reset all after 1 day
sWorld->setWorldState(STV_FISHING_ANNOUNCE_EVENT_BEGIN, 1);
sWorld->setWorldState(STV_FISHING_ANNOUNCE_POOLS_DESPAN, 0);
sWorld->setWorldState(STV_FISHING_HAS_WINNER, 0);
}
}
uint32 m_uiTimer;
void CheckTournamentState() const
{
if (sGameEventMgr->IsActiveEvent(EVENT_FISHING_TURN_INS) && !sWorld->getWorldState(STV_FISHING_HAS_WINNER))
{
if (!me->IsQuestGiver())
{
me->SetNpcFlag(UNIT_NPC_FLAG_QUESTGIVER);
}
if (sWorld->getWorldState(STV_FISHING_ANNOUNCE_EVENT_BEGIN))
{
me->Yell(RIGGLE_SAY_START);
sWorld->setWorldState(STV_FISHING_ANNOUNCE_EVENT_BEGIN, 0);
}
}
else
{
if (me->IsQuestGiver())
{
me->RemoveNpcFlag(UNIT_NPC_FLAG_QUESTGIVER);
}
}
if (sGameEventMgr->IsActiveEvent(EVENT_FISHING_POOLS))
{
// enable announcement: when pools despawn
sWorld->setWorldState(STV_FISHING_ANNOUNCE_POOLS_DESPAN, 1);
}
else
{
if (sWorld->getWorldState(STV_FISHING_ANNOUNCE_POOLS_DESPAN))
{
me->Yell(RIGGLE_SAY_POOLS_END);
sWorld->setWorldState(STV_FISHING_ANNOUNCE_POOLS_DESPAN, 0);
}
}
}
void UpdateAI(uint32 diff) override
{
events.Update(diff);
switch (events.ExecuteEvent())
if (m_uiTimer < diff)
{
case EVENT_RIGGLE_ANNOUNCE:
{
tm strdate = Acore::Time::TimeBreakdown();
if (!startWarning && strdate.tm_hour == 14 && strdate.tm_min == 0)
{
sCreatureTextMgr->SendChat(me, RIGGLE_SAY_START, 0, CHAT_MSG_MONSTER_YELL, LANG_UNIVERSAL, TEXT_RANGE_ZONE);
startWarning = true;
}
if (!finishWarning && strdate.tm_hour == 16 && strdate.tm_min == 0)
{
sCreatureTextMgr->SendChat(me, RIGGLE_SAY_END, 0, CHAT_MSG_MONSTER_YELL, LANG_UNIVERSAL, TEXT_RANGE_ZONE);
finishWarning = true;
// no one won - despawn
if (!finished)
{
me->DespawnOrUnsummon();
break;
}
}
events.RepeatEvent(1000);
break;
}
CheckTournamentState();
m_uiTimer = 1000;
}
else
{
m_uiTimer -= diff;
}
}
};
bool OnGossipHello(Player* player, Creature* creature) override
{
if (!creature->AI()->GetData(DATA_ANGLER_FINISHED))
if (creature->IsQuestGiver())
{
player->PrepareQuestMenu(creature->GetGUID());
}
SendGossipMenuFor(player, player->GetGossipTextId(creature), creature->GetGUID());
if (sWorld->getWorldState(STV_FISHING_HAS_WINNER))
{
SendGossipMenuFor(player, GOSSIP_EVENT_OVER, creature->GetGUID());
}
else
{
SendGossipMenuFor(player, GOSSIP_EVENT_ACTIVE, creature->GetGUID());
}
return true;
}
bool OnQuestReward(Player* player, Creature* creature, Quest const* quest, uint32 /*opt*/) override
{
if (!creature->AI()->GetData(DATA_ANGLER_FINISHED) && quest->GetQuestId() == QUEST_MASTER_ANGLER)
if (quest->GetQuestId() == QUEST_MASTER_ANGLER)
{
creature->AI()->DoAction(DATA_ANGLER_FINISHED);
sCreatureTextMgr->SendChat(creature, RIGGLE_SAY_WINNER, player, CHAT_MSG_MONSTER_YELL, LANG_UNIVERSAL, TEXT_RANGE_ZONE);
creature->RemoveNpcFlag(UNIT_NPC_FLAG_QUESTGIVER);
creature->Yell(RIGGLE_SAY_WINNER, player);
sWorld->setWorldState(STV_FISHING_PREV_WIN_TIME, GameTime::GetGameTime().count());
sWorld->setWorldState(STV_FISHING_HAS_WINNER, 1);
}
return true;
}

View File

@@ -61,6 +61,17 @@ SourceDirectory = ""
#
MySQLExecutable = ""
#
# TempDir
# Description: Temp directory setting.
# Important: TempDir needs to be quoted, as the string might contain space characters.
# TempDir directory must exists, or the server can't work properly
# Example: "/home/youruser/azerothcore/temp"
# Default: "" - (Temp files will be stored in the current path)
TempDir = ""
###################################################################################################
###################################################################################################