diff options
167 files changed, 4739 insertions, 2935 deletions
diff --git a/README.md b/README.md index 540ce485dca..71c78873b03 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,9 @@ [](https://scan.coverity.com/projects/435) [](https://www.bountysource.com/trackers/1310-trinity-core?utm_source=1310&utm_medium=shield&utm_campaign=TRACKER_BADGE) -`3.3.5`: [](https://travis-ci.org/TrinityCore/TrinityCore) +`6.x`: [](https://travis-ci.org/TrinityCore/TrinityCore) `4.3.4`: [](https://travis-ci.org/TrinityCore/TrinityCore) +`3.3.5`: [](https://travis-ci.org/TrinityCore/TrinityCore) ## Introduction diff --git a/cmake/macros/FindBoost.cmake b/cmake/macros/FindBoost.cmake index ebd1c29598a..d90a9c12c16 100644 --- a/cmake/macros/FindBoost.cmake +++ b/cmake/macros/FindBoost.cmake @@ -341,9 +341,9 @@ endfunction() # Guesses Boost's compiler prefix used in built library names
# Returns the guess by setting the variable pointed to by _ret
function(_Boost_GUESS_COMPILER_PREFIX _ret)
- if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel"
- OR "${CMAKE_CXX_COMPILER}" MATCHES "icl"
- OR "${CMAKE_CXX_COMPILER}" MATCHES "icpc")
+ if(${CMAKE_CXX_COMPILER_ID} STREQUAL "Intel"
+ OR ${CMAKE_CXX_COMPILER} MATCHES "icl"
+ OR ${CMAKE_CXX_COMPILER} MATCHES "icpc")
if(WIN32)
set (_boost_COMPILER "-iw")
else()
diff --git a/dep/PackageList.txt b/dep/PackageList.txt index 158eb415013..4412df6ffa6 100644 --- a/dep/PackageList.txt +++ b/dep/PackageList.txt @@ -30,7 +30,7 @@ utf8-cpp (UTF-8 with C++ in a Portable Way) zlib (A Massively Spiffy Yet Delicately Unobtrusive Compression Library) http://www.zlib.net/ - Version: 1.2.7 + Version: 1.2.8 gSOAP (a portable development toolkit for C and C++ XML Web services and XML data bindings) http://gsoap2.sourceforge.net/ diff --git a/dep/zlib/CMakeLists.txt b/dep/zlib/CMakeLists.txt index fa3bde43e9f..013917fbea7 100644 --- a/dep/zlib/CMakeLists.txt +++ b/dep/zlib/CMakeLists.txt @@ -13,7 +13,6 @@ SET(zlib_STAT_SRCS compress.c crc32.c deflate.c - example.c infback.c inffast.c inflate.c diff --git a/dep/zlib/compress.c b/dep/zlib/compress.c index ea4dfbe9d7b..6e9762676a0 100644 --- a/dep/zlib/compress.c +++ b/dep/zlib/compress.c @@ -29,7 +29,7 @@ int ZEXPORT compress2 (dest, destLen, source, sourceLen, level) z_stream stream; int err; - stream.next_in = (Bytef*)source; + stream.next_in = (z_const Bytef *)source; stream.avail_in = (uInt)sourceLen; #ifdef MAXSEG_64K /* Check for source > 64K on 16-bit machine: */ diff --git a/dep/zlib/deflate.c b/dep/zlib/deflate.c index 9e4c2cbc8af..696957705b7 100644 --- a/dep/zlib/deflate.c +++ b/dep/zlib/deflate.c @@ -1,5 +1,5 @@ /* deflate.c -- compress data using the deflation algorithm - * Copyright (C) 1995-2012 Jean-loup Gailly and Mark Adler + * Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -52,7 +52,7 @@ #include "deflate.h" const char deflate_copyright[] = - " deflate 1.2.7 Copyright 1995-2012 Jean-loup Gailly and Mark Adler "; + " deflate 1.2.8 Copyright 1995-2013 Jean-loup Gailly and Mark Adler "; /* If you use the zlib library in a product, an acknowledgment is welcome in the documentation of your product. If for some reason you cannot @@ -305,7 +305,7 @@ int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy, if (s->window == Z_NULL || s->prev == Z_NULL || s->head == Z_NULL || s->pending_buf == Z_NULL) { s->status = FINISH_STATE; - strm->msg = (char*)ERR_MSG(Z_MEM_ERROR); + strm->msg = ERR_MSG(Z_MEM_ERROR); deflateEnd (strm); return Z_MEM_ERROR; } @@ -329,7 +329,7 @@ int ZEXPORT deflateSetDictionary (strm, dictionary, dictLength) uInt str, n; int wrap; unsigned avail; - unsigned char *next; + z_const unsigned char *next; if (strm == Z_NULL || strm->state == Z_NULL || dictionary == Z_NULL) return Z_STREAM_ERROR; @@ -359,7 +359,7 @@ int ZEXPORT deflateSetDictionary (strm, dictionary, dictLength) avail = strm->avail_in; next = strm->next_in; strm->avail_in = dictLength; - strm->next_in = (Bytef *)dictionary; + strm->next_in = (z_const Bytef *)dictionary; fill_window(s); while (s->lookahead >= MIN_MATCH) { str = s->strstart; @@ -513,6 +513,8 @@ int ZEXPORT deflateParams(strm, level, strategy) strm->total_in != 0) { /* Flush the last buffer: */ err = deflate(strm, Z_BLOCK); + if (err == Z_BUF_ERROR && s->pending == 0) + err = Z_OK; } if (s->level != level) { s->level = level; diff --git a/dep/zlib/deflate.h b/dep/zlib/deflate.h index fbac44d908e..ce0299edd19 100644 --- a/dep/zlib/deflate.h +++ b/dep/zlib/deflate.h @@ -104,7 +104,7 @@ typedef struct internal_state { int wrap; /* bit 0 true for zlib, bit 1 true for gzip */ gz_headerp gzhead; /* gzip header information to write */ uInt gzindex; /* where in extra, name, or comment */ - Byte method; /* STORED (for zip only) or DEFLATED */ + Byte method; /* can only be DEFLATED */ int last_flush; /* value of flush param for previous deflate call */ /* used by deflate.c: */ diff --git a/dep/zlib/example.c b/dep/zlib/example.c deleted file mode 100644 index 604736f15f6..00000000000 --- a/dep/zlib/example.c +++ /dev/null @@ -1,565 +0,0 @@ -/* example.c -- usage example of the zlib compression library - * Copyright (C) 1995-2006 Jean-loup Gailly. - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* @(#) $Id$ */ - -#include "zlib.h" -#include <stdio.h> - -#ifdef STDC -# include <string.h> -# include <stdlib.h> -#endif - -#if defined(VMS) || defined(RISCOS) -# define TESTFILE "foo-gz" -#else -# define TESTFILE "foo.gz" -#endif - -#define CHECK_ERR(err, msg) { \ - if (err != Z_OK) { \ - fprintf(stderr, "%s error: %d\n", msg, err); \ - exit(1); \ - } \ -} - -const char hello[] = "hello, hello!"; -/* "hello world" would be more standard, but the repeated "hello" - * stresses the compression code better, sorry... - */ - -const char dictionary[] = "hello"; -uLong dictId; /* Adler32 value of the dictionary */ - -void test_compress OF((Byte *compr, uLong comprLen, - Byte *uncompr, uLong uncomprLen)); -void test_gzio OF((const char *fname, - Byte *uncompr, uLong uncomprLen)); -void test_deflate OF((Byte *compr, uLong comprLen)); -void test_inflate OF((Byte *compr, uLong comprLen, - Byte *uncompr, uLong uncomprLen)); -void test_large_deflate OF((Byte *compr, uLong comprLen, - Byte *uncompr, uLong uncomprLen)); -void test_large_inflate OF((Byte *compr, uLong comprLen, - Byte *uncompr, uLong uncomprLen)); -void test_flush OF((Byte *compr, uLong *comprLen)); -void test_sync OF((Byte *compr, uLong comprLen, - Byte *uncompr, uLong uncomprLen)); -void test_dict_deflate OF((Byte *compr, uLong comprLen)); -void test_dict_inflate OF((Byte *compr, uLong comprLen, - Byte *uncompr, uLong uncomprLen)); -int main OF((int argc, char *argv[])); - -/* =========================================================================== - * Test compress() and uncompress() - */ -void test_compress(compr, comprLen, uncompr, uncomprLen) - Byte *compr, *uncompr; - uLong comprLen, uncomprLen; -{ - int err; - uLong len = (uLong)strlen(hello)+1; - - err = compress(compr, &comprLen, (const Bytef*)hello, len); - CHECK_ERR(err, "compress"); - - strcpy((char*)uncompr, "garbage"); - - err = uncompress(uncompr, &uncomprLen, compr, comprLen); - CHECK_ERR(err, "uncompress"); - - if (strcmp((char*)uncompr, hello)) { - fprintf(stderr, "bad uncompress\n"); - exit(1); - } else { - printf("uncompress(): %s\n", (char *)uncompr); - } -} - -/* =========================================================================== - * Test read/write of .gz files - */ -void test_gzio(fname, uncompr, uncomprLen) - const char *fname; /* compressed file name */ - Byte *uncompr; - uLong uncomprLen; -{ -#ifdef NO_GZCOMPRESS - fprintf(stderr, "NO_GZCOMPRESS -- gz* functions cannot compress\n"); -#else - int err; - int len = (int)strlen(hello)+1; - gzFile file; - z_off_t pos; - - file = gzopen(fname, "wb"); - if (file == NULL) { - fprintf(stderr, "gzopen error\n"); - exit(1); - } - gzputc(file, 'h'); - if (gzputs(file, "ello") != 4) { - fprintf(stderr, "gzputs err: %s\n", gzerror(file, &err)); - exit(1); - } - if (gzprintf(file, ", %s!", "hello") != 8) { - fprintf(stderr, "gzprintf err: %s\n", gzerror(file, &err)); - exit(1); - } - gzseek(file, 1L, SEEK_CUR); /* add one zero byte */ - gzclose(file); - - file = gzopen(fname, "rb"); - if (file == NULL) { - fprintf(stderr, "gzopen error\n"); - exit(1); - } - strcpy((char*)uncompr, "garbage"); - - if (gzread(file, uncompr, (unsigned)uncomprLen) != len) { - fprintf(stderr, "gzread err: %s\n", gzerror(file, &err)); - exit(1); - } - if (strcmp((char*)uncompr, hello)) { - fprintf(stderr, "bad gzread: %s\n", (char*)uncompr); - exit(1); - } else { - printf("gzread(): %s\n", (char*)uncompr); - } - - pos = gzseek(file, -8L, SEEK_CUR); - if (pos != 6 || gztell(file) != pos) { - fprintf(stderr, "gzseek error, pos=%ld, gztell=%ld\n", - (long)pos, (long)gztell(file)); - exit(1); - } - - if (gzgetc(file) != ' ') { - fprintf(stderr, "gzgetc error\n"); - exit(1); - } - - if (gzungetc(' ', file) != ' ') { - fprintf(stderr, "gzungetc error\n"); - exit(1); - } - - gzgets(file, (char*)uncompr, (int)uncomprLen); - if (strlen((char*)uncompr) != 7) { /* " hello!" */ - fprintf(stderr, "gzgets err after gzseek: %s\n", gzerror(file, &err)); - exit(1); - } - if (strcmp((char*)uncompr, hello + 6)) { - fprintf(stderr, "bad gzgets after gzseek\n"); - exit(1); - } else { - printf("gzgets() after gzseek: %s\n", (char*)uncompr); - } - - gzclose(file); -#endif -} - -/* =========================================================================== - * Test deflate() with small buffers - */ -void test_deflate(compr, comprLen) - Byte *compr; - uLong comprLen; -{ - z_stream c_stream; /* compression stream */ - int err; - uLong len = (uLong)strlen(hello)+1; - - c_stream.zalloc = (alloc_func)0; - c_stream.zfree = (free_func)0; - c_stream.opaque = (voidpf)0; - - err = deflateInit(&c_stream, Z_DEFAULT_COMPRESSION); - CHECK_ERR(err, "deflateInit"); - - c_stream.next_in = (Bytef*)hello; - c_stream.next_out = compr; - - while (c_stream.total_in != len && c_stream.total_out < comprLen) { - c_stream.avail_in = c_stream.avail_out = 1; /* force small buffers */ - err = deflate(&c_stream, Z_NO_FLUSH); - CHECK_ERR(err, "deflate"); - } - /* Finish the stream, still forcing small buffers: */ - for (;;) { - c_stream.avail_out = 1; - err = deflate(&c_stream, Z_FINISH); - if (err == Z_STREAM_END) break; - CHECK_ERR(err, "deflate"); - } - - err = deflateEnd(&c_stream); - CHECK_ERR(err, "deflateEnd"); -} - -/* =========================================================================== - * Test inflate() with small buffers - */ -void test_inflate(compr, comprLen, uncompr, uncomprLen) - Byte *compr, *uncompr; - uLong comprLen, uncomprLen; -{ - int err; - z_stream d_stream; /* decompression stream */ - - strcpy((char*)uncompr, "garbage"); - - d_stream.zalloc = (alloc_func)0; - d_stream.zfree = (free_func)0; - d_stream.opaque = (voidpf)0; - - d_stream.next_in = compr; - d_stream.avail_in = 0; - d_stream.next_out = uncompr; - - err = inflateInit(&d_stream); - CHECK_ERR(err, "inflateInit"); - - while (d_stream.total_out < uncomprLen && d_stream.total_in < comprLen) { - d_stream.avail_in = d_stream.avail_out = 1; /* force small buffers */ - err = inflate(&d_stream, Z_NO_FLUSH); - if (err == Z_STREAM_END) break; - CHECK_ERR(err, "inflate"); - } - - err = inflateEnd(&d_stream); - CHECK_ERR(err, "inflateEnd"); - - if (strcmp((char*)uncompr, hello)) { - fprintf(stderr, "bad inflate\n"); - exit(1); - } else { - printf("inflate(): %s\n", (char *)uncompr); - } -} - -/* =========================================================================== - * Test deflate() with large buffers and dynamic change of compression level - */ -void test_large_deflate(compr, comprLen, uncompr, uncomprLen) - Byte *compr, *uncompr; - uLong comprLen, uncomprLen; -{ - z_stream c_stream; /* compression stream */ - int err; - - c_stream.zalloc = (alloc_func)0; - c_stream.zfree = (free_func)0; - c_stream.opaque = (voidpf)0; - - err = deflateInit(&c_stream, Z_BEST_SPEED); - CHECK_ERR(err, "deflateInit"); - - c_stream.next_out = compr; - c_stream.avail_out = (uInt)comprLen; - - /* At this point, uncompr is still mostly zeroes, so it should compress - * very well: - */ - c_stream.next_in = uncompr; - c_stream.avail_in = (uInt)uncomprLen; - err = deflate(&c_stream, Z_NO_FLUSH); - CHECK_ERR(err, "deflate"); - if (c_stream.avail_in != 0) { - fprintf(stderr, "deflate not greedy\n"); - exit(1); - } - - /* Feed in already compressed data and switch to no compression: */ - deflateParams(&c_stream, Z_NO_COMPRESSION, Z_DEFAULT_STRATEGY); - c_stream.next_in = compr; - c_stream.avail_in = (uInt)comprLen/2; - err = deflate(&c_stream, Z_NO_FLUSH); - CHECK_ERR(err, "deflate"); - - /* Switch back to compressing mode: */ - deflateParams(&c_stream, Z_BEST_COMPRESSION, Z_FILTERED); - c_stream.next_in = uncompr; - c_stream.avail_in = (uInt)uncomprLen; - err = deflate(&c_stream, Z_NO_FLUSH); - CHECK_ERR(err, "deflate"); - - err = deflate(&c_stream, Z_FINISH); - if (err != Z_STREAM_END) { - fprintf(stderr, "deflate should report Z_STREAM_END\n"); - exit(1); - } - err = deflateEnd(&c_stream); - CHECK_ERR(err, "deflateEnd"); -} - -/* =========================================================================== - * Test inflate() with large buffers - */ -void test_large_inflate(compr, comprLen, uncompr, uncomprLen) - Byte *compr, *uncompr; - uLong comprLen, uncomprLen; -{ - int err; - z_stream d_stream; /* decompression stream */ - - strcpy((char*)uncompr, "garbage"); - - d_stream.zalloc = (alloc_func)0; - d_stream.zfree = (free_func)0; - d_stream.opaque = (voidpf)0; - - d_stream.next_in = compr; - d_stream.avail_in = (uInt)comprLen; - - err = inflateInit(&d_stream); - CHECK_ERR(err, "inflateInit"); - - for (;;) { - d_stream.next_out = uncompr; /* discard the output */ - d_stream.avail_out = (uInt)uncomprLen; - err = inflate(&d_stream, Z_NO_FLUSH); - if (err == Z_STREAM_END) break; - CHECK_ERR(err, "large inflate"); - } - - err = inflateEnd(&d_stream); - CHECK_ERR(err, "inflateEnd"); - - if (d_stream.total_out != 2*uncomprLen + comprLen/2) { - fprintf(stderr, "bad large inflate: %ld\n", d_stream.total_out); - exit(1); - } else { - printf("large_inflate(): OK\n"); - } -} - -/* =========================================================================== - * Test deflate() with full flush - */ -void test_flush(compr, comprLen) - Byte *compr; - uLong *comprLen; -{ - z_stream c_stream; /* compression stream */ - int err; - uInt len = (uInt)strlen(hello)+1; - - c_stream.zalloc = (alloc_func)0; - c_stream.zfree = (free_func)0; - c_stream.opaque = (voidpf)0; - - err = deflateInit(&c_stream, Z_DEFAULT_COMPRESSION); - CHECK_ERR(err, "deflateInit"); - - c_stream.next_in = (Bytef*)hello; - c_stream.next_out = compr; - c_stream.avail_in = 3; - c_stream.avail_out = (uInt)*comprLen; - err = deflate(&c_stream, Z_FULL_FLUSH); - CHECK_ERR(err, "deflate"); - - compr[3]++; /* force an error in first compressed block */ - c_stream.avail_in = len - 3; - - err = deflate(&c_stream, Z_FINISH); - if (err != Z_STREAM_END) { - CHECK_ERR(err, "deflate"); - } - err = deflateEnd(&c_stream); - CHECK_ERR(err, "deflateEnd"); - - *comprLen = c_stream.total_out; -} - -/* =========================================================================== - * Test inflateSync() - */ -void test_sync(compr, comprLen, uncompr, uncomprLen) - Byte *compr, *uncompr; - uLong comprLen, uncomprLen; -{ - int err; - z_stream d_stream; /* decompression stream */ - - strcpy((char*)uncompr, "garbage"); - - d_stream.zalloc = (alloc_func)0; - d_stream.zfree = (free_func)0; - d_stream.opaque = (voidpf)0; - - d_stream.next_in = compr; - d_stream.avail_in = 2; /* just read the zlib header */ - - err = inflateInit(&d_stream); - CHECK_ERR(err, "inflateInit"); - - d_stream.next_out = uncompr; - d_stream.avail_out = (uInt)uncomprLen; - - inflate(&d_stream, Z_NO_FLUSH); - CHECK_ERR(err, "inflate"); - - d_stream.avail_in = (uInt)comprLen-2; /* read all compressed data */ - err = inflateSync(&d_stream); /* but skip the damaged part */ - CHECK_ERR(err, "inflateSync"); - - err = inflate(&d_stream, Z_FINISH); - if (err != Z_DATA_ERROR) { - fprintf(stderr, "inflate should report DATA_ERROR\n"); - /* Because of incorrect adler32 */ - exit(1); - } - err = inflateEnd(&d_stream); - CHECK_ERR(err, "inflateEnd"); - - printf("after inflateSync(): hel%s\n", (char *)uncompr); -} - -/* =========================================================================== - * Test deflate() with preset dictionary - */ -void test_dict_deflate(compr, comprLen) - Byte *compr; - uLong comprLen; -{ - z_stream c_stream; /* compression stream */ - int err; - - c_stream.zalloc = (alloc_func)0; - c_stream.zfree = (free_func)0; - c_stream.opaque = (voidpf)0; - - err = deflateInit(&c_stream, Z_BEST_COMPRESSION); - CHECK_ERR(err, "deflateInit"); - - err = deflateSetDictionary(&c_stream, - (const Bytef*)dictionary, sizeof(dictionary)); - CHECK_ERR(err, "deflateSetDictionary"); - - dictId = c_stream.adler; - c_stream.next_out = compr; - c_stream.avail_out = (uInt)comprLen; - - c_stream.next_in = (Bytef*)hello; - c_stream.avail_in = (uInt)strlen(hello)+1; - - err = deflate(&c_stream, Z_FINISH); - if (err != Z_STREAM_END) { - fprintf(stderr, "deflate should report Z_STREAM_END\n"); - exit(1); - } - err = deflateEnd(&c_stream); - CHECK_ERR(err, "deflateEnd"); -} - -/* =========================================================================== - * Test inflate() with a preset dictionary - */ -void test_dict_inflate(compr, comprLen, uncompr, uncomprLen) - Byte *compr, *uncompr; - uLong comprLen, uncomprLen; -{ - int err; - z_stream d_stream; /* decompression stream */ - - strcpy((char*)uncompr, "garbage"); - - d_stream.zalloc = (alloc_func)0; - d_stream.zfree = (free_func)0; - d_stream.opaque = (voidpf)0; - - d_stream.next_in = compr; - d_stream.avail_in = (uInt)comprLen; - - err = inflateInit(&d_stream); - CHECK_ERR(err, "inflateInit"); - - d_stream.next_out = uncompr; - d_stream.avail_out = (uInt)uncomprLen; - - for (;;) { - err = inflate(&d_stream, Z_NO_FLUSH); - if (err == Z_STREAM_END) break; - if (err == Z_NEED_DICT) { - if (d_stream.adler != dictId) { - fprintf(stderr, "unexpected dictionary"); - exit(1); - } - err = inflateSetDictionary(&d_stream, (const Bytef*)dictionary, - sizeof(dictionary)); - } - CHECK_ERR(err, "inflate with dict"); - } - - err = inflateEnd(&d_stream); - CHECK_ERR(err, "inflateEnd"); - - if (strcmp((char*)uncompr, hello)) { - fprintf(stderr, "bad inflate with dict\n"); - exit(1); - } else { - printf("inflate with dictionary: %s\n", (char *)uncompr); - } -} - -/* =========================================================================== - * Usage: example [output.gz [input.gz]] - */ - -int main(argc, argv) - int argc; - char *argv[]; -{ - Byte *compr, *uncompr; - uLong comprLen = 10000*sizeof(int); /* don't overflow on MSDOS */ - uLong uncomprLen = comprLen; - static const char* myVersion = ZLIB_VERSION; - - if (zlibVersion()[0] != myVersion[0]) { - fprintf(stderr, "incompatible zlib version\n"); - exit(1); - - } else if (strcmp(zlibVersion(), ZLIB_VERSION) != 0) { - fprintf(stderr, "warning: different zlib version\n"); - } - - printf("zlib version %s = 0x%04x, compile flags = 0x%lx\n", - ZLIB_VERSION, ZLIB_VERNUM, zlibCompileFlags()); - - compr = (Byte*)calloc((uInt)comprLen, 1); - uncompr = (Byte*)calloc((uInt)uncomprLen, 1); - /* compr and uncompr are cleared to avoid reading uninitialized - * data and to ensure that uncompr compresses well. - */ - if (compr == Z_NULL || uncompr == Z_NULL) { - printf("out of memory\n"); - exit(1); - } - test_compress(compr, comprLen, uncompr, uncomprLen); - - test_gzio((argc > 1 ? argv[1] : TESTFILE), - uncompr, uncomprLen); - - test_deflate(compr, comprLen); - test_inflate(compr, comprLen, uncompr, uncomprLen); - - test_large_deflate(compr, comprLen, uncompr, uncomprLen); - test_large_inflate(compr, comprLen, uncompr, uncomprLen); - - test_flush(compr, &comprLen); - test_sync(compr, comprLen, uncompr, uncomprLen); - comprLen = uncomprLen; - - test_dict_deflate(compr, comprLen); - test_dict_inflate(compr, comprLen, uncompr, uncomprLen); - - free(compr); - free(uncompr); - - return 0; -} diff --git a/dep/zlib/gzguts.h b/dep/zlib/gzguts.h index ee3f281aa57..d87659d0319 100644 --- a/dep/zlib/gzguts.h +++ b/dep/zlib/gzguts.h @@ -1,5 +1,5 @@ /* gzguts.h -- zlib internal header definitions for gz* operations - * Copyright (C) 2004, 2005, 2010, 2011, 2012 Mark Adler + * Copyright (C) 2004, 2005, 2010, 2011, 2012, 2013 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -35,6 +35,13 @@ # include <io.h> #endif +#ifdef WINAPI_FAMILY +# define open _open +# define read _read +# define write _write +# define close _close +#endif + #ifdef NO_DEFLATE /* for compatibility with old definition */ # define NO_GZCOMPRESS #endif @@ -60,7 +67,7 @@ #ifndef HAVE_VSNPRINTF # ifdef MSDOS /* vsnprintf may exist on some MS-DOS compilers (DJGPP?), - but for now we just assume it doesn't. */ + but for now we just assume it doesn't. */ # define NO_vsnprintf # endif # ifdef __TURBOC__ @@ -88,6 +95,14 @@ # endif #endif +/* unlike snprintf (which is required in C99, yet still not supported by + Microsoft more than a decade later!), _snprintf does not guarantee null + termination of the result -- however this is only used in gzlib.c where + the result is assured to fit in the space provided */ +#ifdef _MSC_VER +# define snprintf _snprintf +#endif + #ifndef local # define local static #endif @@ -127,7 +142,8 @@ # define DEF_MEM_LEVEL MAX_MEM_LEVEL #endif -/* default i/o buffer size -- double this for output when reading */ +/* default i/o buffer size -- double this for output when reading (this and + twice this must be able to fit in an unsigned type) */ #define GZBUFSIZE 8192 /* gzip modes, also provide a little integrity check on the passed structure */ diff --git a/dep/zlib/gzlib.c b/dep/zlib/gzlib.c index ca55c6ea926..fae202ef890 100644 --- a/dep/zlib/gzlib.c +++ b/dep/zlib/gzlib.c @@ -1,5 +1,5 @@ /* gzlib.c -- zlib functions common to reading and writing gzip files - * Copyright (C) 2004, 2010, 2011, 2012 Mark Adler + * Copyright (C) 2004, 2010, 2011, 2012, 2013 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -108,7 +108,7 @@ local gzFile gz_open(path, fd, mode) return NULL; /* allocate gzFile structure to return */ - state = malloc(sizeof(gz_state)); + state = (gz_statep)malloc(sizeof(gz_state)); if (state == NULL) return NULL; state->size = 0; /* no buffers allocated yet */ @@ -162,8 +162,10 @@ local gzFile gz_open(path, fd, mode) break; case 'F': state->strategy = Z_FIXED; + break; case 'T': state->direct = 1; + break; default: /* could consider as an error, but just ignore */ ; } @@ -194,8 +196,8 @@ local gzFile gz_open(path, fd, mode) } else #endif - len = strlen(path); - state->path = malloc(len + 1); + len = strlen((const char *)path); + state->path = (char *)malloc(len + 1); if (state->path == NULL) { free(state); return NULL; @@ -208,7 +210,11 @@ local gzFile gz_open(path, fd, mode) *(state->path) = 0; else #endif +#if !defined(NO_snprintf) && !defined(NO_vsnprintf) + snprintf(state->path, len + 1, "%s", (const char *)path); +#else strcpy(state->path, path); +#endif /* compute the flags for open() */ oflag = @@ -236,7 +242,7 @@ local gzFile gz_open(path, fd, mode) #ifdef _WIN32 fd == -2 ? _wopen(path, oflag, 0666) : #endif - open(path, oflag, 0666)); + open((const char *)path, oflag, 0666)); if (state->fd == -1) { free(state->path); free(state); @@ -282,9 +288,13 @@ gzFile ZEXPORT gzdopen(fd, mode) char *path; /* identifier for error messages */ gzFile gz; - if (fd == -1 || (path = malloc(7 + 3 * sizeof(int))) == NULL) + if (fd == -1 || (path = (char *)malloc(7 + 3 * sizeof(int))) == NULL) return NULL; +#if !defined(NO_snprintf) && !defined(NO_vsnprintf) + snprintf(path, 7 + 3 * sizeof(int), "<fd:%d>", fd); /* for debugging */ +#else sprintf(path, "<fd:%d>", fd); /* for debugging */ +#endif gz = gz_open(path, fd, mode); free(path); return gz; @@ -531,7 +541,8 @@ const char * ZEXPORT gzerror(file, errnum) /* return error information */ if (errnum != NULL) *errnum = state->err; - return state->msg == NULL ? "" : state->msg; + return state->err == Z_MEM_ERROR ? "out of memory" : + (state->msg == NULL ? "" : state->msg); } /* -- see zlib.h -- */ @@ -582,21 +593,24 @@ void ZLIB_INTERNAL gz_error(state, err, msg) if (msg == NULL) return; - /* for an out of memory error, save as static string */ - if (err == Z_MEM_ERROR) { - state->msg = (char *)msg; + /* for an out of memory error, return literal string when requested */ + if (err == Z_MEM_ERROR) return; - } /* construct error message with path */ - if ((state->msg = malloc(strlen(state->path) + strlen(msg) + 3)) == NULL) { + if ((state->msg = (char *)malloc(strlen(state->path) + strlen(msg) + 3)) == + NULL) { state->err = Z_MEM_ERROR; - state->msg = (char *)"out of memory"; return; } +#if !defined(NO_snprintf) && !defined(NO_vsnprintf) + snprintf(state->msg, strlen(state->path) + strlen(msg) + 3, + "%s%s%s", state->path, ": ", msg); +#else strcpy(state->msg, state->path); strcat(state->msg, ": "); strcat(state->msg, msg); +#endif return; } diff --git a/dep/zlib/gzread.c b/dep/zlib/gzread.c index 3493d34d4ea..bf4538eb274 100644 --- a/dep/zlib/gzread.c +++ b/dep/zlib/gzread.c @@ -1,5 +1,5 @@ /* gzread.c -- zlib functions for reading gzip files - * Copyright (C) 2004, 2005, 2010, 2011, 2012 Mark Adler + * Copyright (C) 2004, 2005, 2010, 2011, 2012, 2013 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -58,7 +58,8 @@ local int gz_avail(state) return -1; if (state->eof == 0) { if (strm->avail_in) { /* copy what's there to the start */ - unsigned char *p = state->in, *q = strm->next_in; + unsigned char *p = state->in; + unsigned const char *q = strm->next_in; unsigned n = strm->avail_in; do { *p++ = *q++; @@ -90,8 +91,8 @@ local int gz_look(state) /* allocate read buffers and inflate memory */ if (state->size == 0) { /* allocate buffers */ - state->in = malloc(state->want); - state->out = malloc(state->want << 1); + state->in = (unsigned char *)malloc(state->want); + state->out = (unsigned char *)malloc(state->want << 1); if (state->in == NULL || state->out == NULL) { if (state->out != NULL) free(state->out); @@ -352,14 +353,14 @@ int ZEXPORT gzread(file, buf, len) /* large len -- read directly into user buffer */ else if (state->how == COPY) { /* read directly */ - if (gz_load(state, buf, len, &n) == -1) + if (gz_load(state, (unsigned char *)buf, len, &n) == -1) return -1; } /* large len -- decompress directly into user buffer */ else { /* state->how == GZIP */ strm->avail_out = len; - strm->next_out = buf; + strm->next_out = (unsigned char *)buf; if (gz_decomp(state) == -1) return -1; n = state->x.have; @@ -378,7 +379,11 @@ int ZEXPORT gzread(file, buf, len) } /* -- see zlib.h -- */ -#undef gzgetc +#ifdef Z_PREFIX_SET +# undef z_gzgetc +#else +# undef gzgetc +#endif int ZEXPORT gzgetc(file) gzFile file; { @@ -518,7 +523,7 @@ char * ZEXPORT gzgets(file, buf, len) /* look for end-of-line in current output buffer */ n = state->x.have > left ? left : state->x.have; - eol = memchr(state->x.next, '\n', n); + eol = (unsigned char *)memchr(state->x.next, '\n', n); if (eol != NULL) n = (unsigned)(eol - state->x.next) + 1; diff --git a/dep/zlib/gzwrite.c b/dep/zlib/gzwrite.c index 27cb3428e32..aa767fbf63e 100644 --- a/dep/zlib/gzwrite.c +++ b/dep/zlib/gzwrite.c @@ -1,5 +1,5 @@ /* gzwrite.c -- zlib functions for writing gzip files - * Copyright (C) 2004, 2005, 2010, 2011, 2012 Mark Adler + * Copyright (C) 2004, 2005, 2010, 2011, 2012, 2013 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -19,7 +19,7 @@ local int gz_init(state) z_streamp strm = &(state->strm); /* allocate input buffer */ - state->in = malloc(state->want); + state->in = (unsigned char *)malloc(state->want); if (state->in == NULL) { gz_error(state, Z_MEM_ERROR, "out of memory"); return -1; @@ -28,7 +28,7 @@ local int gz_init(state) /* only need output buffer and deflate state if compressing */ if (!state->direct) { /* allocate output buffer */ - state->out = malloc(state->want); + state->out = (unsigned char *)malloc(state->want); if (state->out == NULL) { free(state->in); gz_error(state, Z_MEM_ERROR, "out of memory"); @@ -168,7 +168,6 @@ int ZEXPORT gzwrite(file, buf, len) unsigned len; { unsigned put = len; - unsigned n; gz_statep state; z_streamp strm; @@ -208,16 +207,19 @@ int ZEXPORT gzwrite(file, buf, len) if (len < state->size) { /* copy to input buffer, compress when full */ do { + unsigned have, copy; + if (strm->avail_in == 0) strm->next_in = state->in; - n = state->size - strm->avail_in; - if (n > len) - n = len; - memcpy(strm->next_in + strm->avail_in, buf, n); - strm->avail_in += n; - state->x.pos += n; - buf = (char *)buf + n; - len -= n; + have = (unsigned)((strm->next_in + strm->avail_in) - state->in); + copy = state->size - have; + if (copy > len) + copy = len; + memcpy(state->in + have, buf, copy); + strm->avail_in += copy; + state->x.pos += copy; + buf = (const char *)buf + copy; + len -= copy; if (len && gz_comp(state, Z_NO_FLUSH) == -1) return 0; } while (len); @@ -229,7 +231,7 @@ int ZEXPORT gzwrite(file, buf, len) /* directly compress user buffer to file */ strm->avail_in = len; - strm->next_in = (voidp)buf; + strm->next_in = (z_const Bytef *)buf; state->x.pos += len; if (gz_comp(state, Z_NO_FLUSH) == -1) return 0; @@ -244,6 +246,7 @@ int ZEXPORT gzputc(file, c) gzFile file; int c; { + unsigned have; unsigned char buf[1]; gz_statep state; z_streamp strm; @@ -267,12 +270,16 @@ int ZEXPORT gzputc(file, c) /* try writing to input buffer for speed (state->size == 0 if buffer not initialized) */ - if (strm->avail_in < state->size) { + if (state->size) { if (strm->avail_in == 0) strm->next_in = state->in; - strm->next_in[strm->avail_in++] = c; - state->x.pos++; - return c & 0xff; + have = (unsigned)((strm->next_in + strm->avail_in) - state->in); + if (have < state->size) { + state->in[have] = c; + strm->avail_in++; + state->x.pos++; + return c & 0xff; + } } /* no room in buffer or not initialized, use gz_write() */ @@ -300,12 +307,11 @@ int ZEXPORT gzputs(file, str) #include <stdarg.h> /* -- see zlib.h -- */ -int ZEXPORTVA gzprintf (gzFile file, const char *format, ...) +int ZEXPORTVA gzvprintf(gzFile file, const char *format, va_list va) { int size, len; gz_statep state; z_streamp strm; - va_list va; /* get internal structure */ if (file == NULL) @@ -335,25 +341,20 @@ int ZEXPORTVA gzprintf (gzFile file, const char *format, ...) /* do the printf() into the input buffer, put length in len */ size = (int)(state->size); state->in[size - 1] = 0; - va_start(va, format); #ifdef NO_vsnprintf # ifdef HAS_vsprintf_void (void)vsprintf((char *)(state->in), format, va); - va_end(va); for (len = 0; len < size; len++) if (state->in[len] == 0) break; # else len = vsprintf((char *)(state->in), format, va); - va_end(va); # endif #else # ifdef HAS_vsnprintf_void (void)vsnprintf((char *)(state->in), size, format, va); - va_end(va); len = strlen((char *)(state->in)); # else len = vsnprintf((char *)(state->in), size, format, va); - va_end(va); # endif #endif @@ -368,6 +369,17 @@ int ZEXPORTVA gzprintf (gzFile file, const char *format, ...) return len; } +int ZEXPORTVA gzprintf(gzFile file, const char *format, ...) +{ + va_list va; + int ret; + + va_start(va, format); + ret = gzvprintf(file, format, va); + va_end(va); + return ret; +} + #else /* !STDC && !Z_HAVE_STDARG_H */ /* -- see zlib.h -- */ @@ -547,9 +559,9 @@ int ZEXPORT gzclose_w(file) } /* flush, free memory, and close file */ + if (gz_comp(state, Z_FINISH) == -1) + ret = state->err; if (state->size) { - if (gz_comp(state, Z_FINISH) == -1) - ret = state->err; if (!state->direct) { (void)deflateEnd(&(state->strm)); free(state->out); diff --git a/dep/zlib/infback.c b/dep/zlib/infback.c index 981aff17c2d..f3833c2e434 100644 --- a/dep/zlib/infback.c +++ b/dep/zlib/infback.c @@ -255,7 +255,7 @@ out_func out; void FAR *out_desc; { struct inflate_state FAR *state; - unsigned char FAR *next; /* next input */ + z_const unsigned char FAR *next; /* next input */ unsigned char FAR *put; /* next output */ unsigned have, left; /* available input and output */ unsigned long hold; /* bit buffer */ diff --git a/dep/zlib/inffast.c b/dep/zlib/inffast.c index 2f1d60b43b8..bda59ceb6a1 100644 --- a/dep/zlib/inffast.c +++ b/dep/zlib/inffast.c @@ -1,5 +1,5 @@ /* inffast.c -- fast decoding - * Copyright (C) 1995-2008, 2010 Mark Adler + * Copyright (C) 1995-2008, 2010, 2013 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -69,8 +69,8 @@ z_streamp strm; unsigned start; /* inflate()'s starting value for strm->avail_out */ { struct inflate_state FAR *state; - unsigned char FAR *in; /* local strm->next_in */ - unsigned char FAR *last; /* while in < last, enough input available */ + z_const unsigned char FAR *in; /* local strm->next_in */ + z_const unsigned char FAR *last; /* have enough input while in < last */ unsigned char FAR *out; /* local strm->next_out */ unsigned char FAR *beg; /* inflate()'s initial strm->next_out */ unsigned char FAR *end; /* while out < end, enough space available */ diff --git a/dep/zlib/inflate.c b/dep/zlib/inflate.c index 47418a1e1e1..870f89bb4d3 100644 --- a/dep/zlib/inflate.c +++ b/dep/zlib/inflate.c @@ -93,11 +93,12 @@ /* function prototypes */ local void fixedtables OF((struct inflate_state FAR *state)); -local int updatewindow OF((z_streamp strm, unsigned out)); +local int updatewindow OF((z_streamp strm, const unsigned char FAR *end, + unsigned copy)); #ifdef BUILDFIXED void makefixed OF((void)); #endif -local unsigned syncsearch OF((unsigned FAR *have, unsigned char FAR *buf, +local unsigned syncsearch OF((unsigned FAR *have, const unsigned char FAR *buf, unsigned len)); int ZEXPORT inflateResetKeep(strm) @@ -375,12 +376,13 @@ void makefixed() output will fall in the output data, making match copies simpler and faster. The advantage may be dependent on the size of the processor's data caches. */ -local int updatewindow(strm, out) +local int updatewindow(strm, end, copy) z_streamp strm; -unsigned out; +const Bytef *end; +unsigned copy; { struct inflate_state FAR *state; - unsigned copy, dist; + unsigned dist; state = (struct inflate_state FAR *)strm->state; @@ -400,19 +402,18 @@ unsigned out; } /* copy state->wsize or less output bytes into the circular window */ - copy = out - strm->avail_out; if (copy >= state->wsize) { - zmemcpy(state->window, strm->next_out - state->wsize, state->wsize); + zmemcpy(state->window, end - state->wsize, state->wsize); state->wnext = 0; state->whave = state->wsize; } else { dist = state->wsize - state->wnext; if (dist > copy) dist = copy; - zmemcpy(state->window + state->wnext, strm->next_out - copy, dist); + zmemcpy(state->window + state->wnext, end - copy, dist); copy -= dist; if (copy) { - zmemcpy(state->window, strm->next_out - copy, copy); + zmemcpy(state->window, end - copy, copy); state->wnext = copy; state->whave = state->wsize; } @@ -606,7 +607,7 @@ z_streamp strm; int flush; { struct inflate_state FAR *state; - unsigned char FAR *next; /* next input */ + z_const unsigned char FAR *next; /* next input */ unsigned char FAR *put; /* next output */ unsigned have, left; /* available input and output */ unsigned long hold; /* bit buffer */ @@ -920,7 +921,7 @@ int flush; while (state->have < 19) state->lens[order[state->have++]] = 0; state->next = state->codes; - state->lencode = (code const FAR *)(state->next); + state->lencode = (const code FAR *)(state->next); state->lenbits = 7; ret = inflate_table(CODES, state->lens, 19, &(state->next), &(state->lenbits), state->work); @@ -994,7 +995,7 @@ int flush; values here (9 and 6) without reading the comments in inftrees.h concerning the ENOUGH constants, which depend on those values */ state->next = state->codes; - state->lencode = (code const FAR *)(state->next); + state->lencode = (const code FAR *)(state->next); state->lenbits = 9; ret = inflate_table(LENS, state->lens, state->nlen, &(state->next), &(state->lenbits), state->work); @@ -1003,7 +1004,7 @@ int flush; state->mode = BAD; break; } - state->distcode = (code const FAR *)(state->next); + state->distcode = (const code FAR *)(state->next); state->distbits = 6; ret = inflate_table(DISTS, state->lens + state->nlen, state->ndist, &(state->next), &(state->distbits), state->work); @@ -1230,7 +1231,7 @@ int flush; RESTORE(); if (state->wsize || (out != strm->avail_out && state->mode < BAD && (state->mode < CHECK || flush != Z_FINISH))) - if (updatewindow(strm, out)) { + if (updatewindow(strm, strm->next_out, out - strm->avail_out)) { state->mode = MEM; return Z_MEM_ERROR; } @@ -1264,6 +1265,29 @@ z_streamp strm; return Z_OK; } +int ZEXPORT inflateGetDictionary(strm, dictionary, dictLength) +z_streamp strm; +Bytef *dictionary; +uInt *dictLength; +{ + struct inflate_state FAR *state; + + /* check state */ + if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; + state = (struct inflate_state FAR *)strm->state; + + /* copy dictionary */ + if (state->whave && dictionary != Z_NULL) { + zmemcpy(dictionary, state->window + state->wnext, + state->whave - state->wnext); + zmemcpy(dictionary + state->whave - state->wnext, + state->window, state->wnext); + } + if (dictLength != Z_NULL) + *dictLength = state->whave; + return Z_OK; +} + int ZEXPORT inflateSetDictionary(strm, dictionary, dictLength) z_streamp strm; const Bytef *dictionary; @@ -1271,8 +1295,6 @@ uInt dictLength; { struct inflate_state FAR *state; unsigned long dictid; - unsigned char *next; - unsigned avail; int ret; /* check state */ @@ -1291,13 +1313,7 @@ uInt dictLength; /* copy dictionary to window using updatewindow(), which will amend the existing dictionary if appropriate */ - next = strm->next_out; - avail = strm->avail_out; - strm->next_out = (Bytef *)dictionary + dictLength; - strm->avail_out = 0; - ret = updatewindow(strm, dictLength); - strm->avail_out = avail; - strm->next_out = next; + ret = updatewindow(strm, dictionary + dictLength, dictLength); if (ret) { state->mode = MEM; return Z_MEM_ERROR; @@ -1337,7 +1353,7 @@ gz_headerp head; */ local unsigned syncsearch(have, buf, len) unsigned FAR *have; -unsigned char FAR *buf; +const unsigned char FAR *buf; unsigned len; { unsigned got; diff --git a/dep/zlib/inftrees.c b/dep/zlib/inftrees.c index abcd7c45ed3..44d89cf24e1 100644 --- a/dep/zlib/inftrees.c +++ b/dep/zlib/inftrees.c @@ -1,5 +1,5 @@ /* inftrees.c -- generate Huffman trees for efficient decoding - * Copyright (C) 1995-2012 Mark Adler + * Copyright (C) 1995-2013 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -9,7 +9,7 @@ #define MAXBITS 15 const char inflate_copyright[] = - " inflate 1.2.7 Copyright 1995-2012 Mark Adler "; + " inflate 1.2.8 Copyright 1995-2013 Mark Adler "; /* If you use the zlib library in a product, an acknowledgment is welcome in the documentation of your product. If for some reason you cannot @@ -62,7 +62,7 @@ unsigned short FAR *work; 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0}; static const unsigned short lext[31] = { /* Length codes 257..285 extra */ 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, - 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 78, 68}; + 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78}; static const unsigned short dbase[32] = { /* Distance codes 0..29 base */ 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, @@ -208,8 +208,8 @@ unsigned short FAR *work; mask = used - 1; /* mask for comparing low */ /* check available table space */ - if ((type == LENS && used >= ENOUGH_LENS) || - (type == DISTS && used >= ENOUGH_DISTS)) + if ((type == LENS && used > ENOUGH_LENS) || + (type == DISTS && used > ENOUGH_DISTS)) return 1; /* process all codes and make table entries */ @@ -277,8 +277,8 @@ unsigned short FAR *work; /* check for enough space */ used += 1U << curr; - if ((type == LENS && used >= ENOUGH_LENS) || - (type == DISTS && used >= ENOUGH_DISTS)) + if ((type == LENS && used > ENOUGH_LENS) || + (type == DISTS && used > ENOUGH_DISTS)) return 1; /* point entry in root table to sub-table */ diff --git a/dep/zlib/minigzip.c b/dep/zlib/minigzip.c deleted file mode 100644 index 9825ccc3a71..00000000000 --- a/dep/zlib/minigzip.c +++ /dev/null @@ -1,440 +0,0 @@ -/* minigzip.c -- simulate gzip using the zlib compression library - * Copyright (C) 1995-2006, 2010 Jean-loup Gailly. - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* - * minigzip is a minimal implementation of the gzip utility. This is - * only an example of using zlib and isn't meant to replace the - * full-featured gzip. No attempt is made to deal with file systems - * limiting names to 14 or 8+3 characters, etc... Error checking is - * very limited. So use minigzip only for testing; use gzip for the - * real thing. On MSDOS, use only on file names without extension - * or in pipe mode. - */ - -/* @(#) $Id$ */ - -#include "zlib.h" -#include <stdio.h> - -#ifdef STDC -# include <string.h> -# include <stdlib.h> -#endif - -#ifdef USE_MMAP -# include <sys/types.h> -# include <sys/mman.h> -# include <sys/stat.h> -#endif - -#if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(__CYGWIN__) -# include <fcntl.h> -# include <io.h> -# ifdef UNDER_CE -# include <stdlib.h> -# endif -# define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY) -#else -# define SET_BINARY_MODE(file) -#endif - -#ifdef VMS -# define unlink delete -# define GZ_SUFFIX "-gz" -#endif -#ifdef RISCOS -# define unlink remove -# define GZ_SUFFIX "-gz" -# define fileno(file) file->__file -#endif -#if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os -# include <unix.h> /* for fileno */ -#endif - -#if !defined(Z_HAVE_UNISTD_H) && !defined(_LARGEFILE64_SOURCE) -#ifndef WIN32 /* unlink already in stdio.h for WIN32 */ - extern int unlink OF((const char *)); -#endif -#endif - -#if defined(UNDER_CE) -# include <windows.h> -# define perror(s) pwinerror(s) - -/* Map the Windows error number in ERROR to a locale-dependent error - message string and return a pointer to it. Typically, the values - for ERROR come from GetLastError. - - The string pointed to shall not be modified by the application, - but may be overwritten by a subsequent call to strwinerror - - The strwinerror function does not change the current setting - of GetLastError. */ - -static char *strwinerror (error) - DWORD error; -{ - static char buf[1024]; - - wchar_t *msgbuf; - DWORD lasterr = GetLastError(); - DWORD chars = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM - | FORMAT_MESSAGE_ALLOCATE_BUFFER, - NULL, - error, - 0, /* Default language */ - (LPVOID)&msgbuf, - 0, - NULL); - if (chars != 0) { - /* If there is an \r\n appended, zap it. */ - if (chars >= 2 - && msgbuf[chars - 2] == '\r' && msgbuf[chars - 1] == '\n') { - chars -= 2; - msgbuf[chars] = 0; - } - - if (chars > sizeof (buf) - 1) { - chars = sizeof (buf) - 1; - msgbuf[chars] = 0; - } - - wcstombs(buf, msgbuf, chars + 1); - LocalFree(msgbuf); - } - else { - sprintf(buf, "unknown win32 error (%ld)", error); - } - - SetLastError(lasterr); - return buf; -} - -static void pwinerror (s) - const char *s; -{ - if (s && *s) - fprintf(stderr, "%s: %s\n", s, strwinerror(GetLastError ())); - else - fprintf(stderr, "%s\n", strwinerror(GetLastError ())); -} - -#endif /* UNDER_CE */ - -#ifndef GZ_SUFFIX -# define GZ_SUFFIX ".gz" -#endif -#define SUFFIX_LEN (sizeof(GZ_SUFFIX)-1) - -#define BUFLEN 16384 -#define MAX_NAME_LEN 1024 - -#ifdef MAXSEG_64K -# define local static - /* Needed for systems with limitation on stack size. */ -#else -# define local -#endif - -char *prog; - -void error OF((const char *msg)); -void gz_compress OF((FILE *in, gzFile out)); -#ifdef USE_MMAP -int gz_compress_mmap OF((FILE *in, gzFile out)); -#endif -void gz_uncompress OF((gzFile in, FILE *out)); -void file_compress OF((char *file, char *mode)); -void file_uncompress OF((char *file)); -int main OF((int argc, char *argv[])); - -/* =========================================================================== - * Display error message and exit - */ -void error(msg) - const char *msg; -{ - fprintf(stderr, "%s: %s\n", prog, msg); - exit(1); -} - -/* =========================================================================== - * Compress input to output then close both files. - */ - -void gz_compress(in, out) - FILE *in; - gzFile out; -{ - local char buf[BUFLEN]; - int len; - int err; - -#ifdef USE_MMAP - /* Try first compressing with mmap. If mmap fails (minigzip used in a - * pipe), use the normal fread loop. - */ - if (gz_compress_mmap(in, out) == Z_OK) return; -#endif - for (;;) { - len = (int)fread(buf, 1, sizeof(buf), in); - if (ferror(in)) { - perror("fread"); - exit(1); - } - if (len == 0) break; - - if (gzwrite(out, buf, (unsigned)len) != len) error(gzerror(out, &err)); - } - fclose(in); - if (gzclose(out) != Z_OK) error("failed gzclose"); -} - -#ifdef USE_MMAP /* MMAP version, Miguel Albrecht <malbrech@eso.org> */ - -/* Try compressing the input file at once using mmap. Return Z_OK if - * if success, Z_ERRNO otherwise. - */ -int gz_compress_mmap(in, out) - FILE *in; - gzFile out; -{ - int len; - int err; - int ifd = fileno(in); - caddr_t buf; /* mmap'ed buffer for the entire input file */ - off_t buf_len; /* length of the input file */ - struct stat sb; - - /* Determine the size of the file, needed for mmap: */ - if (fstat(ifd, &sb) < 0) return Z_ERRNO; - buf_len = sb.st_size; - if (buf_len <= 0) return Z_ERRNO; - - /* Now do the actual mmap: */ - buf = mmap((caddr_t) 0, buf_len, PROT_READ, MAP_SHARED, ifd, (off_t)0); - if (buf == (caddr_t)(-1)) return Z_ERRNO; - - /* Compress the whole file at once: */ - len = gzwrite(out, (char *)buf, (unsigned)buf_len); - - if (len != (int)buf_len) error(gzerror(out, &err)); - - munmap(buf, buf_len); - fclose(in); - if (gzclose(out) != Z_OK) error("failed gzclose"); - return Z_OK; -} -#endif /* USE_MMAP */ - -/* =========================================================================== - * Uncompress input to output then close both files. - */ -void gz_uncompress(in, out) - gzFile in; - FILE *out; -{ - local char buf[BUFLEN]; - int len; - int err; - - for (;;) { - len = gzread(in, buf, sizeof(buf)); - if (len < 0) error (gzerror(in, &err)); - if (len == 0) break; - - if ((int)fwrite(buf, 1, (unsigned)len, out) != len) { - error("failed fwrite"); - } - } - if (fclose(out)) error("failed fclose"); - - if (gzclose(in) != Z_OK) error("failed gzclose"); -} - - -/* =========================================================================== - * Compress the given file: create a corresponding .gz file and remove the - * original. - */ -void file_compress(file, mode) - char *file; - char *mode; -{ - local char outfile[MAX_NAME_LEN]; - FILE *in; - gzFile out; - - if (strlen(file) + strlen(GZ_SUFFIX) >= sizeof(outfile)) { - fprintf(stderr, "%s: filename too long\n", prog); - exit(1); - } - - strcpy(outfile, file); - strcat(outfile, GZ_SUFFIX); - - in = fopen(file, "rb"); - if (in == NULL) { - perror(file); - exit(1); - } - out = gzopen(outfile, mode); - if (out == NULL) { - fprintf(stderr, "%s: can't gzopen %s\n", prog, outfile); - exit(1); - } - gz_compress(in, out); - - unlink(file); -} - - -/* =========================================================================== - * Uncompress the given file and remove the original. - */ -void file_uncompress(file) - char *file; -{ - local char buf[MAX_NAME_LEN]; - char *infile, *outfile; - FILE *out; - gzFile in; - size_t len = strlen(file); - - if (len + strlen(GZ_SUFFIX) >= sizeof(buf)) { - fprintf(stderr, "%s: filename too long\n", prog); - exit(1); - } - - strcpy(buf, file); - - if (len > SUFFIX_LEN && strcmp(file+len-SUFFIX_LEN, GZ_SUFFIX) == 0) { - infile = file; - outfile = buf; - outfile[len-3] = '\0'; - } else { - outfile = file; - infile = buf; - strcat(infile, GZ_SUFFIX); - } - in = gzopen(infile, "rb"); - if (in == NULL) { - fprintf(stderr, "%s: can't gzopen %s\n", prog, infile); - exit(1); - } - out = fopen(outfile, "wb"); - if (out == NULL) { - perror(file); - exit(1); - } - - gz_uncompress(in, out); - - unlink(infile); -} - - -/* =========================================================================== - * Usage: minigzip [-c] [-d] [-f] [-h] [-r] [-1 to -9] [files...] - * -c : write to standard output - * -d : decompress - * -f : compress with Z_FILTERED - * -h : compress with Z_HUFFMAN_ONLY - * -r : compress with Z_RLE - * -1 to -9 : compression level - */ - -int main(argc, argv) - int argc; - char *argv[]; -{ - int copyout = 0; - int uncompr = 0; - gzFile file; - char *bname, outmode[20]; - - strcpy(outmode, "wb6 "); - - prog = argv[0]; - bname = strrchr(argv[0], '/'); - if (bname) - bname++; - else - bname = argv[0]; - argc--, argv++; - - if (!strcmp(bname, "gunzip")) - uncompr = 1; - else if (!strcmp(bname, "zcat")) - copyout = uncompr = 1; - - while (argc > 0) { - if (strcmp(*argv, "-c") == 0) - copyout = 1; - else if (strcmp(*argv, "-d") == 0) - uncompr = 1; - else if (strcmp(*argv, "-f") == 0) - outmode[3] = 'f'; - else if (strcmp(*argv, "-h") == 0) - outmode[3] = 'h'; - else if (strcmp(*argv, "-r") == 0) - outmode[3] = 'R'; - else if ((*argv)[0] == '-' && (*argv)[1] >= '1' && (*argv)[1] <= '9' && - (*argv)[2] == 0) - outmode[2] = (*argv)[1]; - else - break; - argc--, argv++; - } - if (outmode[3] == ' ') - outmode[3] = 0; - if (argc == 0) { - SET_BINARY_MODE(stdin); - SET_BINARY_MODE(stdout); - if (uncompr) { - file = gzdopen(fileno(stdin), "rb"); - if (file == NULL) error("can't gzdopen stdin"); - gz_uncompress(file, stdout); - } else { - file = gzdopen(fileno(stdout), outmode); - if (file == NULL) error("can't gzdopen stdout"); - gz_compress(stdin, file); - } - } else { - if (copyout) { - SET_BINARY_MODE(stdout); - } - do { - if (uncompr) { - if (copyout) { - file = gzopen(*argv, "rb"); - if (file == NULL) - fprintf(stderr, "%s: can't gzopen %s\n", prog, *argv); - else - gz_uncompress(file, stdout); - } else { - file_uncompress(*argv); - } - } else { - if (copyout) { - FILE * in = fopen(*argv, "rb"); - - if (in == NULL) { - perror(*argv); - } else { - file = gzdopen(fileno(stdout), outmode); - if (file == NULL) error("can't gzdopen stdout"); - - gz_compress(in, file); - } - - } else { - file_compress(*argv, outmode); - } - } - } while (argv++, --argc); - } - return 0; -} diff --git a/dep/zlib/trees.c b/dep/zlib/trees.c index 8c32b214b1d..1fd7759ef00 100644 --- a/dep/zlib/trees.c +++ b/dep/zlib/trees.c @@ -146,8 +146,8 @@ local void send_tree OF((deflate_state *s, ct_data *tree, int max_code)); local int build_bl_tree OF((deflate_state *s)); local void send_all_trees OF((deflate_state *s, int lcodes, int dcodes, int blcodes)); -local void compress_block OF((deflate_state *s, ct_data *ltree, - ct_data *dtree)); +local void compress_block OF((deflate_state *s, const ct_data *ltree, + const ct_data *dtree)); local int detect_data_type OF((deflate_state *s)); local unsigned bi_reverse OF((unsigned value, int length)); local void bi_windup OF((deflate_state *s)); @@ -972,7 +972,8 @@ void ZLIB_INTERNAL _tr_flush_block(s, buf, stored_len, last) } else if (s->strategy == Z_FIXED || static_lenb == opt_lenb) { #endif send_bits(s, (STATIC_TREES<<1)+last, 3); - compress_block(s, (ct_data *)static_ltree, (ct_data *)static_dtree); + compress_block(s, (const ct_data *)static_ltree, + (const ct_data *)static_dtree); #ifdef DEBUG s->compressed_len += 3 + s->static_len; #endif @@ -980,7 +981,8 @@ void ZLIB_INTERNAL _tr_flush_block(s, buf, stored_len, last) send_bits(s, (DYN_TREES<<1)+last, 3); send_all_trees(s, s->l_desc.max_code+1, s->d_desc.max_code+1, max_blindex+1); - compress_block(s, (ct_data *)s->dyn_ltree, (ct_data *)s->dyn_dtree); + compress_block(s, (const ct_data *)s->dyn_ltree, + (const ct_data *)s->dyn_dtree); #ifdef DEBUG s->compressed_len += 3 + s->opt_len; #endif @@ -1057,8 +1059,8 @@ int ZLIB_INTERNAL _tr_tally (s, dist, lc) */ local void compress_block(s, ltree, dtree) deflate_state *s; - ct_data *ltree; /* literal tree */ - ct_data *dtree; /* distance tree */ + const ct_data *ltree; /* literal tree */ + const ct_data *dtree; /* distance tree */ { unsigned dist; /* distance of matched string */ int lc; /* match length or unmatched char (if dist == 0) */ diff --git a/dep/zlib/uncompr.c b/dep/zlib/uncompr.c index ad98be3a5d8..242e9493dff 100644 --- a/dep/zlib/uncompr.c +++ b/dep/zlib/uncompr.c @@ -30,7 +30,7 @@ int ZEXPORT uncompress (dest, destLen, source, sourceLen) z_stream stream; int err; - stream.next_in = (Bytef*)source; + stream.next_in = (z_const Bytef *)source; stream.avail_in = (uInt)sourceLen; /* Check for source > 64K on 16-bit machine: */ if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR; diff --git a/dep/zlib/zconf.h b/dep/zlib/zconf.h index 8a46a58b30c..9987a775530 100644 --- a/dep/zlib/zconf.h +++ b/dep/zlib/zconf.h @@ -1,5 +1,5 @@ /* zconf.h -- configuration of the zlib compression library - * Copyright (C) 1995-2012 Jean-loup Gailly. + * Copyright (C) 1995-2013 Jean-loup Gailly. * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -21,6 +21,7 @@ # define _dist_code z__dist_code # define _length_code z__length_code # define _tr_align z__tr_align +# define _tr_flush_bits z__tr_flush_bits # define _tr_flush_block z__tr_flush_block # define _tr_init z__tr_init # define _tr_stored_block z__tr_stored_block @@ -77,6 +78,7 @@ # define gzopen_w z_gzopen_w # endif # define gzprintf z_gzprintf +# define gzvprintf z_gzvprintf # define gzputc z_gzputc # define gzputs z_gzputs # define gzread z_gzread @@ -103,6 +105,7 @@ # define inflateReset z_inflateReset # define inflateReset2 z_inflateReset2 # define inflateSetDictionary z_inflateSetDictionary +# define inflateGetDictionary z_inflateGetDictionary # define inflateSync z_inflateSync # define inflateSyncPoint z_inflateSyncPoint # define inflateUndermine z_inflateUndermine @@ -388,20 +391,14 @@ typedef uLong FAR uLongf; typedef Byte *voidp; #endif -/* ./configure may #define Z_U4 here */ - #if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC) # include <limits.h> # if (UINT_MAX == 0xffffffffUL) # define Z_U4 unsigned -# else -# if (ULONG_MAX == 0xffffffffUL) -# define Z_U4 unsigned long -# else -# if (USHRT_MAX == 0xffffffffUL) -# define Z_U4 unsigned short -# endif -# endif +# elif (ULONG_MAX == 0xffffffffUL) +# define Z_U4 unsigned long +# elif (USHRT_MAX == 0xffffffffUL) +# define Z_U4 unsigned short # endif #endif @@ -425,8 +422,16 @@ typedef uLong FAR uLongf; # endif #endif +#if defined(STDC) || defined(Z_HAVE_STDARG_H) +# ifndef Z_SOLO +# include <stdarg.h> /* for va_list */ +# endif +#endif + #ifdef _WIN32 -# include <stddef.h> /* for wchar_t */ +# ifndef Z_SOLO +# include <stddef.h> /* for wchar_t */ +# endif #endif /* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and @@ -435,7 +440,7 @@ typedef uLong FAR uLongf; * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as * equivalently requesting no 64-bit operations */ -#if defined(LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1 +#if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1 # undef _LARGEFILE64_SOURCE #endif @@ -443,7 +448,7 @@ typedef uLong FAR uLongf; # define Z_HAVE_UNISTD_H #endif #ifndef Z_SOLO -# if defined(Z_HAVE_UNISTD_H) || defined(LARGEFILE64_SOURCE) +# if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE) # include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */ # ifdef VMS # include <unixio.h> /* for off_t */ diff --git a/dep/zlib/zlib.h b/dep/zlib/zlib.h index 3edf3acdb57..3e0c7672ac5 100644 --- a/dep/zlib/zlib.h +++ b/dep/zlib/zlib.h @@ -1,7 +1,7 @@ /* zlib.h -- interface of the 'zlib' general purpose compression library - version 1.2.7, May 2nd, 2012 + version 1.2.8, April 28th, 2013 - Copyright (C) 1995-2012 Jean-loup Gailly and Mark Adler + Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -37,11 +37,11 @@ extern "C" { #endif -#define ZLIB_VERSION "1.2.7" -#define ZLIB_VERNUM 0x1270 +#define ZLIB_VERSION "1.2.8" +#define ZLIB_VERNUM 0x1280 #define ZLIB_VER_MAJOR 1 #define ZLIB_VER_MINOR 2 -#define ZLIB_VER_REVISION 7 +#define ZLIB_VER_REVISION 8 #define ZLIB_VER_SUBREVISION 0 /* @@ -839,6 +839,21 @@ ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm, inflate(). */ +ZEXTERN int ZEXPORT inflateGetDictionary OF((z_streamp strm, + Bytef *dictionary, + uInt *dictLength)); +/* + Returns the sliding dictionary being maintained by inflate. dictLength is + set to the number of bytes in the dictionary, and that many bytes are copied + to dictionary. dictionary must have enough space, where 32768 bytes is + always enough. If inflateGetDictionary() is called with dictionary equal to + Z_NULL, then only the dictionary length is returned, and nothing is copied. + Similary, if dictLength is Z_NULL, then it is not set. + + inflateGetDictionary returns Z_OK on success, or Z_STREAM_ERROR if the + stream state is inconsistent. +*/ + ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm)); /* Skips invalid compressed data until a possible full flush point (see above @@ -846,7 +861,7 @@ ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm)); available input is skipped. No output is provided. inflateSync searches for a 00 00 FF FF pattern in the compressed data. - All full flush points have this pattern, but not all occurences of this + All full flush points have this pattern, but not all occurrences of this pattern are full flush points. inflateSync returns Z_OK if a possible full flush point has been found, @@ -1007,7 +1022,8 @@ ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits, the version of the header file. */ -typedef unsigned (*in_func) OF((void FAR *, unsigned char FAR * FAR *)); +typedef unsigned (*in_func) OF((void FAR *, + z_const unsigned char FAR * FAR *)); typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned)); ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm, @@ -1015,11 +1031,12 @@ ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm, out_func out, void FAR *out_desc)); /* inflateBack() does a raw inflate with a single call using a call-back - interface for input and output. This is more efficient than inflate() for - file i/o applications in that it avoids copying between the output and the - sliding window by simply making the window itself the output buffer. This - function trusts the application to not change the output buffer passed by - the output function, at least until inflateBack() returns. + interface for input and output. This is potentially more efficient than + inflate() for file i/o applications, in that it avoids copying between the + output and the sliding window by simply making the window itself the output + buffer. inflate() can be faster on modern CPUs when used with large + buffers. inflateBack() trusts the application to not change the output + buffer passed by the output function, at least until inflateBack() returns. inflateBackInit() must be called first to allocate the internal state and to initialize the state with the user-provided window buffer. @@ -1736,6 +1753,13 @@ ZEXTERN int ZEXPORT deflateResetKeep OF((z_streamp)); ZEXTERN gzFile ZEXPORT gzopen_w OF((const wchar_t *path, const char *mode)); #endif +#if defined(STDC) || defined(Z_HAVE_STDARG_H) +# ifndef Z_SOLO +ZEXTERN int ZEXPORTVA gzvprintf Z_ARG((gzFile file, + const char *format, + va_list va)); +# endif +#endif #ifdef __cplusplus } diff --git a/dep/zlib/zutil.c b/dep/zlib/zutil.c index 65e0d3b72b0..23d2ebef008 100644 --- a/dep/zlib/zutil.c +++ b/dep/zlib/zutil.c @@ -14,7 +14,7 @@ struct internal_state {int dummy;}; /* for buggy compilers */ #endif -const char * const z_errmsg[10] = { +z_const char * const z_errmsg[10] = { "need dictionary", /* Z_NEED_DICT 2 */ "stream end", /* Z_STREAM_END 1 */ "", /* Z_OK 0 */ diff --git a/dep/zlib/zutil.h b/dep/zlib/zutil.h index 4e3dcc6ae9f..24ab06b1cf6 100644 --- a/dep/zlib/zutil.h +++ b/dep/zlib/zutil.h @@ -1,5 +1,5 @@ /* zutil.h -- internal interface and configuration of the compression library - * Copyright (C) 1995-2012 Jean-loup Gailly. + * Copyright (C) 1995-2013 Jean-loup Gailly. * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -44,13 +44,13 @@ typedef unsigned short ush; typedef ush FAR ushf; typedef unsigned long ulg; -extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ +extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ /* (size given to avoid silly warnings with Visual C++) */ #define ERR_MSG(err) z_errmsg[Z_NEED_DICT-(err)] #define ERR_RETURN(strm,err) \ - return (strm->msg = (char*)ERR_MSG(err), (err)) + return (strm->msg = ERR_MSG(err), (err)) /* To be used only when the state is known to be valid */ /* common constants */ @@ -168,7 +168,8 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ #endif /* provide prototypes for these when building zlib without LFS */ -#if !defined(_WIN32) && (!defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0) +#if !defined(_WIN32) && \ + (!defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0) ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t)); ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t)); #endif diff --git a/sql/base/auth_database.sql b/sql/base/auth_database.sql index 095669b2d12..706404f0029 100644 --- a/sql/base/auth_database.sql +++ b/sql/base/auth_database.sql @@ -1,8 +1,8 @@ --- MySQL dump 10.15 Distrib 10.0.13-MariaDB, for Win64 (x86) +-- MySQL dump 10.15 Distrib 10.0.15-MariaDB, for Win64 (x86) -- -- Host: localhost Database: auth -- ------------------------------------------------------ --- Server version 10.0.13-MariaDB +-- Server version 10.0.15-MariaDB /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -334,7 +334,8 @@ DROP TABLE IF EXISTS `rbac_default_permissions`; CREATE TABLE `rbac_default_permissions` ( `secId` int(10) unsigned NOT NULL COMMENT 'Security Level id', `permissionId` int(10) unsigned NOT NULL COMMENT 'permission id', - PRIMARY KEY (`secId`,`permissionId`), + `realmId` int(11) NOT NULL DEFAULT '-1' COMMENT 'Realm Id, -1 means all', + PRIMARY KEY (`secId`,`permissionId`,`realmId`), KEY `fk__rbac_default_permissions__rbac_permissions` (`permissionId`), CONSTRAINT `fk__rbac_default_permissions__rbac_permissions` FOREIGN KEY (`permissionId`) REFERENCES `rbac_permissions` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Default permission to assign to different account security levels'; @@ -346,7 +347,7 @@ CREATE TABLE `rbac_default_permissions` ( LOCK TABLES `rbac_default_permissions` WRITE; /*!40000 ALTER TABLE `rbac_default_permissions` DISABLE KEYS */; -INSERT INTO `rbac_default_permissions` VALUES (3,192),(2,193),(1,194),(0,195); +INSERT INTO `rbac_default_permissions` VALUES (0,195,-1),(1,194,-1),(2,193,-1),(3,192,-1); /*!40000 ALTER TABLE `rbac_default_permissions` ENABLE KEYS */; UNLOCK TABLES; @@ -374,7 +375,7 @@ CREATE TABLE `rbac_linked_permissions` ( LOCK TABLES `rbac_linked_permissions` WRITE; /*!40000 ALTER TABLE `rbac_linked_permissions` DISABLE KEYS */; -INSERT INTO `rbac_linked_permissions` VALUES (192,21),(192,42),(192,43),(192,193),(192,196),(192,778),(192,779),(192,780),(192,781),(192,782),(192,783),(192,784),(192,785),(192,786),(192,787),(192,788),(192,789),(192,790),(192,791),(192,792),(192,793),(192,794),(192,795),(192,796),(193,48),(193,194),(193,197),(194,1),(194,2),(194,11),(194,13),(194,14),(194,15),(194,16),(194,17),(194,18),(194,19),(194,20),(194,22),(194,23),(194,25),(194,26),(194,27),(194,28),(194,29),(194,30),(194,31),(194,32),(194,33),(194,34),(194,35),(194,36),(194,37),(194,38),(194,39),(194,40),(194,41),(194,44),(194,46),(194,47),(194,195),(194,198),(194,632),(194,798),(195,3),(195,4),(195,5),(195,6),(195,24),(195,49),(195,199),(196,200),(196,201),(196,226),(196,227),(196,230),(196,231),(196,233),(196,234),(196,235),(196,238),(196,239),(196,240),(196,241),(196,242),(196,243),(196,244),(196,245),(196,246),(196,247),(196,248),(196,249),(196,250),(196,251),(196,252),(196,253),(196,254),(196,255),(196,256),(196,257),(196,258),(196,259),(196,260),(196,261),(196,262),(196,264),(196,265),(196,266),(196,267),(196,268),(196,269),(196,270),(196,271),(196,272),(196,279),(196,280),(196,283),(196,287),(196,288),(196,289),(196,290),(196,291),(196,292),(196,293),(196,294),(196,295),(196,296),(196,297),(196,298),(196,299),(196,302),(196,303),(196,304),(196,305),(196,306),(196,307),(196,308),(196,309),(196,310),(196,313),(196,314),(196,319),(196,320),(196,321),(196,322),(196,323),(196,324),(196,325),(196,326),(196,327),(196,328),(196,329),(196,330),(196,331),(196,332),(196,333),(196,334),(196,335),(196,336),(196,337),(196,338),(196,339),(196,340),(196,341),(196,342),(196,343),(196,344),(196,345),(196,346),(196,347),(196,348),(196,349),(196,350),(196,351),(196,352),(196,353),(196,354),(196,355),(196,356),(196,357),(196,358),(196,359),(196,360),(196,361),(196,362),(196,363),(196,364),(196,365),(196,366),(196,373),(196,375),(196,400),(196,401),(196,402),(196,403),(196,404),(196,405),(196,406),(196,407),(196,417),(196,418),(196,419),(196,420),(196,421),(196,422),(196,423),(196,424),(196,425),(196,426),(196,427),(196,428),(196,429),(196,434),(196,435),(196,436),(196,437),(196,438),(196,439),(196,440),(196,441),(196,442),(196,443),(196,444),(196,445),(196,446),(196,447),(196,448),(196,449),(196,450),(196,451),(196,452),(196,453),(196,454),(196,455),(196,456),(196,457),(196,458),(196,459),(196,461),(196,463),(196,464),(196,465),(196,472),(196,473),(196,474),(196,475),(196,476),(196,477),(196,478),(196,488),(196,489),(196,491),(196,492),(196,493),(196,495),(196,497),(196,498),(196,499),(196,500),(196,502),(196,503),(196,505),(196,508),(196,511),(196,513),(196,514),(196,516),(196,519),(196,522),(196,523),(196,526),(196,527),(196,529),(196,530),(196,533),(196,535),(196,536),(196,537),(196,538),(196,539),(196,540),(196,541),(196,556),(196,581),(196,582),(196,592),(196,593),(196,596),(196,602),(196,603),(196,604),(196,605),(196,606),(196,607),(196,608),(196,609),(196,610),(196,611),(196,612),(196,613),(196,614),(196,615),(196,616),(196,617),(196,618),(196,619),(196,620),(196,621),(196,622),(196,623),(196,624),(196,625),(196,626),(196,627),(196,628),(196,629),(196,630),(196,631),(196,633),(196,634),(196,635),(196,636),(196,637),(196,638),(196,639),(196,640),(196,641),(196,642),(196,643),(196,644),(196,645),(196,646),(196,647),(196,648),(196,649),(196,650),(196,651),(196,652),(196,653),(196,654),(196,655),(196,656),(196,657),(196,658),(196,659),(196,660),(196,661),(196,662),(196,663),(196,664),(196,665),(196,666),(196,667),(196,668),(196,669),(196,670),(196,671),(196,672),(196,673),(196,674),(196,675),(196,676),(196,677),(196,678),(196,679),(196,680),(196,681),(196,682),(196,683),(196,684),(196,685),(196,686),(196,687),(196,688),(196,689),(196,690),(196,691),(196,692),(196,693),(196,694),(196,695),(196,696),(196,697),(196,698),(196,699),(196,700),(196,701),(196,702),(196,703),(196,704),(196,705),(196,706),(196,707),(196,708),(196,709),(196,710),(196,711),(196,712),(196,713),(196,714),(196,715),(196,716),(196,717),(196,718),(196,719),(196,721),(196,722),(196,723),(196,724),(196,725),(196,726),(196,727),(196,728),(196,729),(196,730),(196,733),(196,734),(196,735),(196,736),(196,738),(196,739),(196,748),(196,753),(196,757),(196,773),(196,777),(197,232),(197,236),(197,237),(197,273),(197,274),(197,275),(197,276),(197,277),(197,284),(197,285),(197,286),(197,301),(197,311),(197,387),(197,388),(197,389),(197,390),(197,391),(197,392),(197,393),(197,394),(197,395),(197,396),(197,397),(197,398),(197,399),(197,479),(197,480),(197,481),(197,482),(197,485),(197,486),(197,487),(197,494),(197,506),(197,509),(197,510),(197,517),(197,518),(197,521),(197,542),(197,543),(197,550),(197,558),(197,568),(197,571),(197,572),(197,573),(197,574),(197,575),(197,576),(197,577),(197,578),(197,579),(197,580),(197,583),(197,584),(197,585),(197,586),(197,587),(197,588),(197,589),(197,590),(197,591),(197,594),(197,595),(197,601),(197,743),(197,750),(197,758),(197,761),(197,762),(197,763),(197,764),(197,765),(197,766),(197,767),(197,768),(197,769),(197,770),(197,771),(197,772),(197,774),(198,218),(198,300),(198,312),(198,315),(198,316),(198,317),(198,318),(198,367),(198,368),(198,369),(198,370),(198,371),(198,372),(198,374),(198,376),(198,377),(198,378),(198,379),(198,380),(198,381),(198,382),(198,383),(198,384),(198,385),(198,386),(198,408),(198,409),(198,410),(198,411),(198,412),(198,413),(198,414),(198,415),(198,416),(198,430),(198,431),(198,432),(198,433),(198,462),(198,466),(198,467),(198,468),(198,469),(198,470),(198,471),(198,483),(198,484),(198,490),(198,504),(198,512),(198,515),(198,520),(198,524),(198,528),(198,531),(198,532),(198,544),(198,545),(198,546),(198,547),(198,548),(198,549),(198,551),(198,552),(198,553),(198,554),(198,555),(198,557),(198,559),(198,560),(198,561),(198,562),(198,563),(198,564),(198,565),(198,566),(198,567),(198,569),(198,570),(198,597),(198,598),(198,599),(198,600),(198,737),(198,740),(198,741),(198,742),(198,744),(198,745),(198,746),(198,747),(198,749),(198,751),(198,752),(198,754),(198,755),(198,756),(198,759),(198,760),(199,217),(199,221),(199,222),(199,223),(199,225),(199,263),(199,496),(199,501),(199,507),(199,525),(199,534),(199,797); +INSERT INTO `rbac_linked_permissions` VALUES (192,21),(192,42),(192,43),(192,193),(192,196),(192,778),(192,779),(192,780),(192,781),(192,782),(192,783),(192,784),(192,785),(192,786),(192,787),(192,788),(192,789),(192,790),(192,791),(192,792),(192,793),(192,794),(192,795),(192,796),(193,48),(193,194),(193,197),(194,1),(194,2),(194,11),(194,13),(194,14),(194,15),(194,16),(194,17),(194,18),(194,19),(194,20),(194,22),(194,23),(194,25),(194,26),(194,27),(194,28),(194,29),(194,30),(194,31),(194,32),(194,33),(194,34),(194,35),(194,36),(194,37),(194,38),(194,39),(194,40),(194,41),(194,44),(194,46),(194,47),(194,51),(194,195),(194,198),(194,632),(194,798),(195,3),(195,4),(195,5),(195,6),(195,24),(195,49),(195,199),(196,200),(196,201),(196,226),(196,227),(196,230),(196,231),(196,233),(196,234),(196,235),(196,238),(196,239),(196,240),(196,241),(196,242),(196,243),(196,244),(196,245),(196,246),(196,247),(196,248),(196,249),(196,250),(196,251),(196,252),(196,253),(196,254),(196,255),(196,256),(196,257),(196,258),(196,259),(196,260),(196,261),(196,262),(196,264),(196,265),(196,266),(196,267),(196,268),(196,269),(196,270),(196,271),(196,272),(196,279),(196,280),(196,283),(196,287),(196,288),(196,289),(196,290),(196,291),(196,292),(196,293),(196,294),(196,295),(196,296),(196,297),(196,298),(196,299),(196,302),(196,303),(196,304),(196,305),(196,306),(196,307),(196,308),(196,309),(196,310),(196,313),(196,314),(196,319),(196,320),(196,321),(196,322),(196,323),(196,324),(196,325),(196,326),(196,327),(196,328),(196,329),(196,330),(196,331),(196,332),(196,333),(196,334),(196,335),(196,336),(196,337),(196,338),(196,339),(196,340),(196,341),(196,342),(196,343),(196,344),(196,345),(196,346),(196,347),(196,348),(196,349),(196,350),(196,351),(196,352),(196,353),(196,354),(196,355),(196,356),(196,357),(196,358),(196,359),(196,360),(196,361),(196,362),(196,363),(196,364),(196,365),(196,366),(196,373),(196,375),(196,400),(196,401),(196,402),(196,403),(196,404),(196,405),(196,406),(196,407),(196,417),(196,418),(196,419),(196,420),(196,421),(196,422),(196,423),(196,424),(196,425),(196,426),(196,427),(196,428),(196,429),(196,434),(196,435),(196,436),(196,437),(196,438),(196,439),(196,440),(196,441),(196,442),(196,443),(196,444),(196,445),(196,446),(196,447),(196,448),(196,449),(196,450),(196,451),(196,452),(196,453),(196,454),(196,455),(196,456),(196,457),(196,458),(196,459),(196,461),(196,463),(196,464),(196,465),(196,472),(196,473),(196,474),(196,475),(196,476),(196,477),(196,478),(196,488),(196,489),(196,491),(196,492),(196,493),(196,495),(196,497),(196,498),(196,499),(196,500),(196,502),(196,503),(196,505),(196,508),(196,511),(196,513),(196,514),(196,516),(196,519),(196,522),(196,523),(196,526),(196,527),(196,529),(196,530),(196,533),(196,535),(196,536),(196,537),(196,538),(196,539),(196,540),(196,541),(196,556),(196,581),(196,582),(196,592),(196,593),(196,596),(196,602),(196,603),(196,604),(196,605),(196,606),(196,607),(196,608),(196,609),(196,610),(196,611),(196,612),(196,613),(196,614),(196,615),(196,616),(196,617),(196,618),(196,619),(196,620),(196,621),(196,622),(196,623),(196,624),(196,625),(196,626),(196,627),(196,628),(196,629),(196,630),(196,631),(196,633),(196,634),(196,635),(196,636),(196,637),(196,638),(196,639),(196,640),(196,641),(196,642),(196,643),(196,644),(196,645),(196,646),(196,647),(196,648),(196,649),(196,650),(196,651),(196,652),(196,653),(196,654),(196,655),(196,656),(196,657),(196,658),(196,659),(196,660),(196,661),(196,662),(196,663),(196,664),(196,665),(196,666),(196,667),(196,668),(196,669),(196,670),(196,671),(196,672),(196,673),(196,674),(196,675),(196,676),(196,677),(196,678),(196,679),(196,680),(196,681),(196,682),(196,683),(196,684),(196,685),(196,686),(196,687),(196,688),(196,689),(196,690),(196,691),(196,692),(196,693),(196,694),(196,695),(196,696),(196,697),(196,698),(196,699),(196,700),(196,701),(196,702),(196,703),(196,704),(196,705),(196,706),(196,707),(196,708),(196,709),(196,710),(196,711),(196,712),(196,713),(196,714),(196,715),(196,716),(196,717),(196,718),(196,719),(196,721),(196,722),(196,723),(196,724),(196,725),(196,726),(196,727),(196,728),(196,729),(196,730),(196,733),(196,734),(196,735),(196,736),(196,738),(196,739),(196,748),(196,753),(196,757),(196,773),(196,777),(197,232),(197,236),(197,237),(197,273),(197,274),(197,275),(197,276),(197,277),(197,284),(197,285),(197,286),(197,301),(197,311),(197,387),(197,388),(197,389),(197,390),(197,391),(197,392),(197,393),(197,394),(197,395),(197,396),(197,397),(197,398),(197,399),(197,479),(197,480),(197,481),(197,482),(197,485),(197,486),(197,487),(197,494),(197,506),(197,509),(197,510),(197,517),(197,518),(197,521),(197,542),(197,543),(197,550),(197,558),(197,568),(197,571),(197,572),(197,573),(197,574),(197,575),(197,576),(197,577),(197,578),(197,579),(197,580),(197,583),(197,584),(197,585),(197,586),(197,587),(197,588),(197,589),(197,590),(197,591),(197,594),(197,595),(197,601),(197,743),(197,750),(197,758),(197,761),(197,762),(197,763),(197,764),(197,765),(197,766),(197,767),(197,768),(197,769),(197,770),(197,771),(197,772),(197,774),(198,218),(198,300),(198,312),(198,315),(198,316),(198,317),(198,318),(198,367),(198,368),(198,369),(198,370),(198,371),(198,372),(198,374),(198,376),(198,377),(198,378),(198,379),(198,380),(198,381),(198,382),(198,383),(198,384),(198,385),(198,386),(198,408),(198,409),(198,410),(198,411),(198,412),(198,413),(198,414),(198,415),(198,416),(198,430),(198,431),(198,432),(198,433),(198,462),(198,466),(198,467),(198,468),(198,469),(198,470),(198,471),(198,483),(198,484),(198,490),(198,504),(198,512),(198,515),(198,520),(198,524),(198,528),(198,531),(198,532),(198,544),(198,545),(198,546),(198,547),(198,548),(198,549),(198,551),(198,552),(198,553),(198,554),(198,555),(198,557),(198,559),(198,560),(198,561),(198,562),(198,563),(198,564),(198,565),(198,566),(198,567),(198,569),(198,570),(198,597),(198,598),(198,599),(198,600),(198,737),(198,740),(198,741),(198,742),(198,744),(198,745),(198,746),(198,747),(198,749),(198,751),(198,752),(198,754),(198,755),(198,756),(198,759),(198,760),(199,217),(199,221),(199,222),(199,223),(199,225),(199,263),(199,496),(199,501),(199,507),(199,525),(199,534),(199,797); /*!40000 ALTER TABLE `rbac_linked_permissions` ENABLE KEYS */; UNLOCK TABLES; @@ -398,7 +399,7 @@ CREATE TABLE `rbac_permissions` ( LOCK TABLES `rbac_permissions` WRITE; /*!40000 ALTER TABLE `rbac_permissions` DISABLE KEYS */; -INSERT INTO `rbac_permissions` VALUES (1,'Instant logout'),(2,'Skip Queue'),(3,'Join Normal Battleground'),(4,'Join Random Battleground'),(5,'Join Arenas'),(6,'Join Dungeon Finder'),(11,'Log GM trades'),(13,'Skip Instance required bosses check'),(14,'Skip character creation team mask check'),(15,'Skip character creation class mask check'),(16,'Skip character creation race mask check'),(17,'Skip character creation reserved name check'),(18,'Skip character creation heroic min level check'),(19,'Skip needed requirements to use channel check'),(20,'Skip disable map check'),(21,'Skip reset talents when used more than allowed check'),(22,'Skip spam chat check'),(23,'Skip over-speed ping check'),(24,'Two side faction characters on the same account'),(25,'Allow say chat between factions'),(26,'Allow channel chat between factions'),(27,'Two side mail interaction'),(28,'See two side who list'),(29,'Add friends of other faction'),(30,'Save character without delay with .save command'),(31,'Use params with .unstuck command'),(32,'Can be assigned tickets with .assign ticket command'),(33,'Notify if a command was not found'),(34,'Check if should appear in list using .gm ingame command'),(35,'See all security levels with who command'),(36,'Filter whispers'),(37,'Use staff badge in chat'),(38,'Resurrect with full Health Points'),(39,'Restore saved gm setting states'),(40,'Allows to add a gm to friend list'),(41,'Use Config option START_GM_LEVEL to assign new character level'),(42,'Allows to use CMSG_WORLD_TELEPORT opcode'),(43,'Allows to use CMSG_WHOIS opcode'),(44,'Receive global GM messages/texts'),(45,'Join channels without announce'),(46,'Change channel settings without being channel moderator'),(47,'Enables lower security than target check'),(48,'Enable IP, Last Login and EMail output in pinfo'),(49,'Forces to enter the email for confirmation on password change'),(50,'Allow user to check his own email with .account'),(192,'Role: Sec Level Administrator'),(193,'Role: Sec Level Gamemaster'),(194,'Role: Sec Level Moderator'),(195,'Role: Sec Level Player'),(196,'Role: Administrator Commands'),(197,'Role: Gamemaster Commands'),(198,'Role: Moderator Commands'),(199,'Role: Player Commands'),(200,'Command: rbac'),(201,'Command: rbac account'),(202,'Command: rbac account list'),(203,'Command: rbac account grant'),(204,'Command: rbac account deny'),(205,'Command: rbac account revoke'),(206,'Command: rbac list'),(217,'Command: account'),(218,'Command: account addon'),(219,'Command: account create'),(220,'Command: account delete'),(221,'Command: account lock'),(222,'Command: account lock country'),(223,'Command: account lock ip'),(224,'Command: account onlinelist'),(225,'Command: account password'),(226,'Command: account set'),(227,'Command: account set addon'),(228,'Command: account set gmlevel'),(229,'Command: account set password'),(230,'Command: achievement'),(231,'Command: achievement add'),(232,'Command: arena'),(233,'Command: arena captain'),(234,'Command: arena create'),(235,'Command: arena disband'),(236,'Command: arena info'),(237,'Command: arena lookup'),(238,'Command: arena rename'),(239,'Command: ban'),(240,'Command: ban account'),(241,'Command: ban character'),(242,'Command: ban ip'),(243,'Command: ban playeraccount'),(244,'Command: baninfo'),(245,'Command: baninfo account'),(246,'Command: baninfo character'),(247,'Command: baninfo ip'),(248,'Command: banlist'),(249,'Command: banlist account'),(250,'Command: banlist character'),(251,'Command: banlist ip'),(252,'Command: unban'),(253,'Command: unban account'),(254,'Command: unban character'),(255,'Command: unban ip'),(256,'Command: unban playeraccount'),(257,'Command: bf'),(258,'Command: bf start'),(259,'Command: bf stop'),(260,'Command: bf switch'),(261,'Command: bf timer'),(262,'Command: bf enable'),(263,'Command: account email'),(264,'Command: account set sec'),(265,'Command: account set sec email'),(266,'Command: account set sec regmail'),(267,'Command: cast'),(268,'Command: cast back'),(269,'Command: cast dist'),(270,'Command: cast self'),(271,'Command: cast target'),(272,'Command: cast dest'),(273,'Command: character'),(274,'Command: character customize'),(275,'Command: character changefaction'),(276,'Command: character changerace'),(277,'Command: character deleted'),(279,'Command: character deleted list'),(280,'Command: character deleted restore'),(283,'Command: character level'),(284,'Command: character rename'),(285,'Command: character reputation'),(286,'Command: character titles'),(287,'Command: levelup'),(288,'Command: pdump'),(289,'Command: pdump load'),(290,'Command: pdump write'),(291,'Command: cheat'),(292,'Command: cheat casttime'),(293,'Command: cheat cooldown'),(294,'Command: cheat explore'),(295,'Command: cheat god'),(296,'Command: cheat power'),(297,'Command: cheat status'),(298,'Command: cheat taxi'),(299,'Command: cheat waterwalk'),(300,'Command: debug'),(301,'Command: debug anim'),(302,'Command: debug areatriggers'),(303,'Command: debug arena'),(304,'Command: debug bg'),(305,'Command: debug entervehicle'),(306,'Command: debug getitemstate'),(307,'Command: debug getitemvalue'),(308,'Command: debug getvalue'),(309,'Command: debug hostil'),(310,'Command: debug itemexpire'),(311,'Command: debug lootrecipient'),(312,'Command: debug los'),(313,'Command: debug mod32value'),(314,'Command: debug moveflags'),(315,'Command: debug play'),(316,'Command: debug play cinematics'),(317,'Command: debug play movie'),(318,'Command: debug play sound'),(319,'Command: debug send'),(320,'Command: debug send buyerror'),(321,'Command: debug send channelnotify'),(322,'Command: debug send chatmessage'),(323,'Command: debug send equiperror'),(324,'Command: debug send largepacket'),(325,'Command: debug send opcode'),(326,'Command: debug send qinvalidmsg'),(327,'Command: debug send qpartymsg'),(328,'Command: debug send sellerror'),(329,'Command: debug send setphaseshift'),(330,'Command: debug send spellfail'),(331,'Command: debug setaurastate'),(332,'Command: debug setbit'),(333,'Command: debug setitemvalue'),(334,'Command: debug setvalue'),(335,'Command: debug setvid'),(336,'Command: debug spawnvehicle'),(337,'Command: debug threat'),(338,'Command: debug update'),(339,'Command: debug uws'),(340,'Command: wpgps'),(341,'Command: deserter'),(342,'Command: deserter bg'),(343,'Command: deserter bg add'),(344,'Command: deserter bg remove'),(345,'Command: deserter instance'),(346,'Command: deserter instance add'),(347,'Command: deserter instance remove'),(348,'Command: disable'),(349,'Command: disable add'),(350,'Command: disable add achievement_criteria'),(351,'Command: disable add battleground'),(352,'Command: disable add map'),(353,'Command: disable add mmap'),(354,'Command: disable add outdoorpvp'),(355,'Command: disable add quest'),(356,'Command: disable add spell'),(357,'Command: disable add vmap'),(358,'Command: disable remove'),(359,'Command: disable remove achievement_criteria'),(360,'Command: disable remove battleground'),(361,'Command: disable remove map'),(362,'Command: disable remove mmap'),(363,'Command: disable remove outdoorpvp'),(364,'Command: disable remove quest'),(365,'Command: disable remove spell'),(366,'Command: disable remove vmap'),(367,'Command: event'),(368,'Command: event activelist'),(369,'Command: event start'),(370,'Command: event stop'),(371,'Command: gm'),(372,'Command: gm chat'),(373,'Command: gm fly'),(374,'Command: gm ingame'),(375,'Command: gm list'),(376,'Command: gm visible'),(377,'Command: go'),(378,'Command: go creature'),(379,'Command: go graveyard'),(380,'Command: go grid'),(381,'Command: go object'),(382,'Command: go taxinode'),(383,'Command: go ticket'),(384,'Command: go trigger'),(385,'Command: go xyz'),(386,'Command: go zonexy'),(387,'Command: gobject'),(388,'Command: gobject activate'),(389,'Command: gobject add'),(390,'Command: gobject add temp'),(391,'Command: gobject delete'),(392,'Command: gobject info'),(393,'Command: gobject move'),(394,'Command: gobject near'),(395,'Command: gobject set'),(396,'Command: gobject set phase'),(397,'Command: gobject set state'),(398,'Command: gobject target'),(399,'Command: gobject turn'),(400,'debug transport'),(401,'Command: guild'),(402,'Command: guild create'),(403,'Command: guild delete'),(404,'Command: guild invite'),(405,'Command: guild uninvite'),(406,'Command: guild rank'),(407,'Command: guild rename'),(408,'Command: honor'),(409,'Command: honor add'),(410,'Command: honor add kill'),(411,'Command: honor update'),(412,'Command: instance'),(413,'Command: instance listbinds'),(414,'Command: instance unbind'),(415,'Command: instance stats'),(416,'Command: instance savedata'),(417,'Command: learn'),(418,'Command: learn all'),(419,'Command: learn all my'),(420,'Command: learn all my class'),(421,'Command: learn all my pettalents'),(422,'Command: learn all my spells'),(423,'Command: learn all my talents'),(424,'Command: learn all gm'),(425,'Command: learn all crafts'),(426,'Command: learn all default'),(427,'Command: learn all lang'),(428,'Command: learn all recipes'),(429,'Command: unlearn'),(430,'Command: lfg'),(431,'Command: lfg player'),(432,'Command: lfg group'),(433,'Command: lfg queue'),(434,'Command: lfg clean'),(435,'Command: lfg options'),(436,'Command: list'),(437,'Command: list creature'),(438,'Command: list item'),(439,'Command: list object'),(440,'Command: list auras'),(441,'Command: list mail'),(442,'Command: lookup'),(443,'Command: lookup area'),(444,'Command: lookup creature'),(445,'Command: lookup event'),(446,'Command: lookup faction'),(447,'Command: lookup item'),(448,'Command: lookup itemset'),(449,'Command: lookup object'),(450,'Command: lookup quest'),(451,'Command: lookup player'),(452,'Command: lookup player ip'),(453,'Command: lookup player account'),(454,'Command: lookup player email'),(455,'Command: lookup skill'),(456,'Command: lookup spell'),(457,'Command: lookup spell id'),(458,'Command: lookup taxinode'),(459,'Command: lookup tele'),(460,'Command: lookup title'),(461,'Command: lookup map'),(462,'Command: announce'),(463,'Command: channel'),(464,'Command: channel set'),(465,'Command: channel set ownership'),(466,'Command: gmannounce'),(467,'Command: gmnameannounce'),(468,'Command: gmnotify'),(469,'Command: nameannounce'),(470,'Command: notify'),(471,'Command: whispers'),(472,'Command: group'),(473,'Command: group leader'),(474,'Command: group disband'),(475,'Command: group remove'),(476,'Command: group join'),(477,'Command: group list'),(478,'Command: group summon'),(479,'Command: pet'),(480,'Command: pet create'),(481,'Command: pet learn'),(482,'Command: pet unlearn'),(483,'Command: send'),(484,'Command: send items'),(485,'Command: send mail'),(486,'Command: send message'),(487,'Command: send money'),(488,'Command: additem'),(489,'Command: additemset'),(490,'Command: appear'),(491,'Command: aura'),(492,'Command: bank'),(493,'Command: bindsight'),(494,'Command: combatstop'),(495,'Command: cometome'),(496,'Command: commands'),(497,'Command: cooldown'),(498,'Command: damage'),(499,'Command: dev'),(500,'Command: die'),(501,'Command: dismount'),(502,'Command: distance'),(503,'Command: flusharenapoints'),(504,'Command: freeze'),(505,'Command: gps'),(506,'Command: guid'),(507,'Command: help'),(508,'Command: hidearea'),(509,'Command: itemmove'),(510,'Command: kick'),(511,'Command: linkgrave'),(512,'Command: listfreeze'),(513,'Command: maxskill'),(514,'Command: movegens'),(515,'Command: mute'),(516,'Command: neargrave'),(517,'Command: pinfo'),(518,'Command: playall'),(519,'Command: possess'),(520,'Command: recall'),(521,'Command: repairitems'),(522,'Command: respawn'),(523,'Command: revive'),(524,'Command: saveall'),(525,'Command: save'),(526,'Command: setskill'),(527,'Command: showarea'),(528,'Command: summon'),(529,'Command: unaura'),(530,'Command: unbindsight'),(531,'Command: unfreeze'),(532,'Command: unmute'),(533,'Command: unpossess'),(534,'Command: unstuck'),(535,'Command: wchange'),(536,'Command: mmap'),(537,'Command: mmap loadedtiles'),(538,'Command: mmap loc'),(539,'Command: mmap path'),(540,'Command: mmap stats'),(541,'Command: mmap testarea'),(542,'Command: morph'),(543,'Command: demorph'),(544,'Command: modify'),(545,'Command: modify arenapoints'),(546,'Command: modify bit'),(547,'Command: modify drunk'),(548,'Command: modify energy'),(549,'Command: modify faction'),(550,'Command: modify gender'),(551,'Command: modify honor'),(552,'Command: modify hp'),(553,'Command: modify mana'),(554,'Command: modify money'),(555,'Command: modify mount'),(556,'Command: modify phase'),(557,'Command: modify rage'),(558,'Command: modify reputation'),(559,'Command: modify runicpower'),(560,'Command: modify scale'),(561,'Command: modify speed'),(562,'Command: modify speed all'),(563,'Command: modify speed backwalk'),(564,'Command: modify speed fly'),(565,'Command: modify speed walk'),(566,'Command: modify speed swim'),(567,'Command: modify spell'),(568,'Command: modify standstate'),(569,'Command: modify talentpoints'),(570,'Command: npc'),(571,'Command: npc add'),(572,'Command: npc add formation'),(573,'Command: npc add item'),(574,'Command: npc add move'),(575,'Command: npc add temp'),(576,'Command: npc add delete'),(577,'Command: npc add delete item'),(578,'Command: npc add follow'),(579,'Command: npc add follow stop'),(580,'Command: npc set'),(581,'Command: npc set allowmove'),(582,'Command: npc set entry'),(583,'Command: npc set factionid'),(584,'Command: npc set flag'),(585,'Command: npc set level'),(586,'Command: npc set link'),(587,'Command: npc set model'),(588,'Command: npc set movetype'),(589,'Command: npc set phase'),(590,'Command: npc set spawndist'),(591,'Command: npc set spawntime'),(592,'Command: npc set data'),(593,'Command: npc info'),(594,'Command: npc near'),(595,'Command: npc move'),(596,'Command: npc playemote'),(597,'Command: npc say'),(598,'Command: npc textemote'),(599,'Command: npc whisper'),(600,'Command: npc yell'),(601,'Command: npc tame'),(602,'Command: quest'),(603,'Command: quest add'),(604,'Command: quest complete'),(605,'Command: quest remove'),(606,'Command: quest reward'),(607,'Command: reload'),(608,'Command: reload access_requirement'),(609,'Command: reload achievement_criteria_data'),(610,'Command: reload achievement_reward'),(611,'Command: reload all'),(612,'Command: reload all achievement'),(613,'Command: reload all area'),(614,'Command: broadcast_text'),(615,'Command: reload all gossips'),(616,'Command: reload all item'),(617,'Command: reload all locales'),(618,'Command: reload all loot'),(619,'Command: reload all npc'),(620,'Command: reload all quest'),(621,'Command: reload all scripts'),(622,'Command: reload all spell'),(623,'Command: reload areatrigger_involvedrelation'),(624,'Command: reload areatrigger_tavern'),(625,'Command: reload areatrigger_teleport'),(626,'Command: reload auctions'),(627,'Command: reload autobroadcast'),(628,'Command: reload command'),(629,'Command: reload conditions'),(630,'Command: reload config'),(631,'Command: reload battleground_template'),(632,'Command: .mutehistory'),(633,'Command: reload creature_linked_respawn'),(634,'Command: reload creature_loot_template'),(635,'Command: reload creature_onkill_reputation'),(636,'Command: reload creature_questender'),(637,'Command: reload creature_queststarter'),(638,'Command: reload creature_summon_groups'),(639,'Command: reload creature_template'),(640,'Command: reload creature_text'),(641,'Command: reload disables'),(642,'Command: reload disenchant_loot_template'),(643,'Command: reload event_scripts'),(644,'Command: reload fishing_loot_template'),(645,'Command: reload game_graveyard_zone'),(646,'Command: reload game_tele'),(647,'Command: reload gameobject_questender'),(648,'Command: reload gameobject_loot_template'),(649,'Command: reload gameobject_queststarter'),(650,'Command: reload gm_tickets'),(651,'Command: reload gossip_menu'),(652,'Command: reload gossip_menu_option'),(653,'Command: reload item_enchantment_template'),(654,'Command: reload item_loot_template'),(655,'Command: reload item_set_names'),(656,'Command: reload lfg_dungeon_rewards'),(657,'Command: reload locales_achievement_reward'),(658,'Command: reload locales_creature'),(659,'Command: reload locales_creature_text'),(660,'Command: reload locales_gameobject'),(661,'Command: reload locales_gossip_menu_option'),(662,'Command: reload locales_item'),(663,'Command: reload locales_item_set_name'),(664,'Command: reload locales_npc_text'),(665,'Command: reload locales_page_text'),(666,'Command: reload locales_points_of_interest'),(667,'Command: reload locales_quest'),(668,'Command: reload mail_level_reward'),(669,'Command: reload mail_loot_template'),(670,'Command: reload milling_loot_template'),(671,'Command: reload npc_spellclick_spells'),(672,'Command: reload npc_trainer'),(673,'Command: reload npc_vendor'),(674,'Command: reload page_text'),(675,'Command: reload pickpocketing_loot_template'),(676,'Command: reload points_of_interest'),(677,'Command: reload prospecting_loot_template'),(678,'Command: reload quest_poi'),(679,'Command: reload quest_template'),(680,'Command: reload rbac'),(681,'Command: reload reference_loot_template'),(682,'Command: reload reserved_name'),(683,'Command: reload reputation_reward_rate'),(684,'Command: reload reputation_spillover_template'),(685,'Command: reload skill_discovery_template'),(686,'Command: reload skill_extra_item_template'),(687,'Command: reload skill_fishing_base_level'),(688,'Command: reload skinning_loot_template'),(689,'Command: reload smart_scripts'),(690,'Command: reload spell_required'),(691,'Command: reload spell_area'),(692,'Command: reload spell_bonus_data'),(693,'Command: reload spell_group'),(694,'Command: reload spell_learn_spell'),(695,'Command: reload spell_loot_template'),(696,'Command: reload spell_linked_spell'),(697,'Command: reload spell_pet_auras'),(698,'Command: reload spell_proc_event'),(699,'Command: reload spell_proc'),(700,'Command: reload spell_scripts'),(701,'Command: reload spell_target_position'),(702,'Command: reload spell_threats'),(703,'Command: reload spell_group_stack_rules'),(704,'Command: reload trinity_string'),(705,'Command: reload warden_action'),(706,'Command: reload waypoint_scripts'),(707,'Command: reload waypoint_data'),(708,'Command: reload vehicle_accessory'),(709,'Command: reload vehicle_template_accessory'),(710,'Command: reset'),(711,'Command: reset achievements'),(712,'Command: reset honor'),(713,'Command: reset level'),(714,'Command: reset spells'),(715,'Command: reset stats'),(716,'Command: reset talents'),(717,'Command: reset all'),(718,'Command: server'),(719,'Command: server corpses'),(720,'Command: server exit'),(721,'Command: server idlerestart'),(722,'Command: server idlerestart cancel'),(723,'Command: server idleshutdown'),(724,'Command: server idleshutdown cancel'),(725,'Command: server info'),(726,'Command: server plimit'),(727,'Command: server restart'),(728,'Command: server restart cancel'),(729,'Command: server set'),(730,'Command: server set closed'),(731,'Command: server set difftime'),(732,'Command: server set loglevel'),(733,'Command: server set motd'),(734,'Command: server shutdown'),(735,'Command: server shutdown cancel'),(736,'Command: server motd'),(737,'Command: tele'),(738,'Command: tele add'),(739,'Command: tele del'),(740,'Command: tele name'),(741,'Command: tele group'),(742,'Command: ticket'),(743,'Command: ticket assign'),(744,'Command: ticket close'),(745,'Command: ticket closedlist'),(746,'Command: ticket comment'),(747,'Command: ticket complete'),(748,'Command: ticket delete'),(749,'Command: ticket escalate'),(750,'Command: ticket escalatedlist'),(751,'Command: ticket list'),(752,'Command: ticket onlinelist'),(753,'Command: ticket reset'),(754,'Command: ticket response'),(755,'Command: ticket response append'),(756,'Command: ticket response appendln'),(757,'Command: ticket togglesystem'),(758,'Command: ticket unassign'),(759,'Command: ticket viewid'),(760,'Command: ticket viewname'),(761,'Command: titles'),(762,'Command: titles add'),(763,'Command: titles current'),(764,'Command: titles remove'),(765,'Command: titles set'),(766,'Command: titles set mask'),(767,'Command: wp'),(768,'Command: wp add'),(769,'Command: wp event'),(770,'Command: wp load'),(771,'Command: wp modify'),(772,'Command: wp unload'),(773,'Command: wp reload'),(774,'Command: wp show'),(777,'Command: mailbox'),(778,'Command: ahbot'),(779,'Command: ahbot items'),(780,'Command: ahbot items gray'),(781,'Command: ahbot items white'),(782,'Command: ahbot items green'),(783,'Command: ahbot items blue'),(784,'Command: ahbot items purple'),(785,'Command: ahbot items orange'),(786,'Command: ahbot items yellow'),(787,'Command: ahbot ratio'),(788,'Command: ahbot ratio alliance'),(789,'Command: ahbot ratio horde'),(790,'Command: ahbot ratio neutral'),(791,'Command: ahbot rebuild'),(792,'Command: ahbot reload'),(793,'Command: ahbot status'),(794,'Command: .guild info'),(795,'Command: .instance setbossstate'),(796,'Command: instance getbossstate'),(797,'Command: pvpstats'),(798,'Command: .mod xp'); +INSERT INTO `rbac_permissions` VALUES (1,'Instant logout'),(2,'Skip Queue'),(3,'Join Normal Battleground'),(4,'Join Random Battleground'),(5,'Join Arenas'),(6,'Join Dungeon Finder'),(11,'Log GM trades'),(13,'Skip Instance required bosses check'),(14,'Skip character creation team mask check'),(15,'Skip character creation class mask check'),(16,'Skip character creation race mask check'),(17,'Skip character creation reserved name check'),(18,'Skip character creation heroic min level check'),(19,'Skip needed requirements to use channel check'),(20,'Skip disable map check'),(21,'Skip reset talents when used more than allowed check'),(22,'Skip spam chat check'),(23,'Skip over-speed ping check'),(24,'Two side faction characters on the same account'),(25,'Allow say chat between factions'),(26,'Allow channel chat between factions'),(27,'Two side mail interaction'),(28,'See two side who list'),(29,'Add friends of other faction'),(30,'Save character without delay with .save command'),(31,'Use params with .unstuck command'),(32,'Can be assigned tickets with .assign ticket command'),(33,'Notify if a command was not found'),(34,'Check if should appear in list using .gm ingame command'),(35,'See all security levels with who command'),(36,'Filter whispers'),(37,'Use staff badge in chat'),(38,'Resurrect with full Health Points'),(39,'Restore saved gm setting states'),(40,'Allows to add a gm to friend list'),(41,'Use Config option START_GM_LEVEL to assign new character level'),(42,'Allows to use CMSG_WORLD_TELEPORT opcode'),(43,'Allows to use CMSG_WHOIS opcode'),(44,'Receive global GM messages/texts'),(45,'Join channels without announce'),(46,'Change channel settings without being channel moderator'),(47,'Enables lower security than target check'),(48,'Enable IP, Last Login and EMail output in pinfo'),(49,'Forces to enter the email for confirmation on password change'),(50,'Allow user to check his own email with .account'),(51,'Allow trading between factions'),(192,'Role: Sec Level Administrator'),(193,'Role: Sec Level Gamemaster'),(194,'Role: Sec Level Moderator'),(195,'Role: Sec Level Player'),(196,'Role: Administrator Commands'),(197,'Role: Gamemaster Commands'),(198,'Role: Moderator Commands'),(199,'Role: Player Commands'),(200,'Command: rbac'),(201,'Command: rbac account'),(202,'Command: rbac account list'),(203,'Command: rbac account grant'),(204,'Command: rbac account deny'),(205,'Command: rbac account revoke'),(206,'Command: rbac list'),(217,'Command: account'),(218,'Command: account addon'),(219,'Command: account create'),(220,'Command: account delete'),(221,'Command: account lock'),(222,'Command: account lock country'),(223,'Command: account lock ip'),(224,'Command: account onlinelist'),(225,'Command: account password'),(226,'Command: account set'),(227,'Command: account set addon'),(228,'Command: account set gmlevel'),(229,'Command: account set password'),(230,'Command: achievement'),(231,'Command: achievement add'),(232,'Command: arena'),(233,'Command: arena captain'),(234,'Command: arena create'),(235,'Command: arena disband'),(236,'Command: arena info'),(237,'Command: arena lookup'),(238,'Command: arena rename'),(239,'Command: ban'),(240,'Command: ban account'),(241,'Command: ban character'),(242,'Command: ban ip'),(243,'Command: ban playeraccount'),(244,'Command: baninfo'),(245,'Command: baninfo account'),(246,'Command: baninfo character'),(247,'Command: baninfo ip'),(248,'Command: banlist'),(249,'Command: banlist account'),(250,'Command: banlist character'),(251,'Command: banlist ip'),(252,'Command: unban'),(253,'Command: unban account'),(254,'Command: unban character'),(255,'Command: unban ip'),(256,'Command: unban playeraccount'),(257,'Command: bf'),(258,'Command: bf start'),(259,'Command: bf stop'),(260,'Command: bf switch'),(261,'Command: bf timer'),(262,'Command: bf enable'),(263,'Command: account email'),(264,'Command: account set sec'),(265,'Command: account set sec email'),(266,'Command: account set sec regmail'),(267,'Command: cast'),(268,'Command: cast back'),(269,'Command: cast dist'),(270,'Command: cast self'),(271,'Command: cast target'),(272,'Command: cast dest'),(273,'Command: character'),(274,'Command: character customize'),(275,'Command: character changefaction'),(276,'Command: character changerace'),(277,'Command: character deleted'),(279,'Command: character deleted list'),(280,'Command: character deleted restore'),(283,'Command: character level'),(284,'Command: character rename'),(285,'Command: character reputation'),(286,'Command: character titles'),(287,'Command: levelup'),(288,'Command: pdump'),(289,'Command: pdump load'),(290,'Command: pdump write'),(291,'Command: cheat'),(292,'Command: cheat casttime'),(293,'Command: cheat cooldown'),(294,'Command: cheat explore'),(295,'Command: cheat god'),(296,'Command: cheat power'),(297,'Command: cheat status'),(298,'Command: cheat taxi'),(299,'Command: cheat waterwalk'),(300,'Command: debug'),(301,'Command: debug anim'),(302,'Command: debug areatriggers'),(303,'Command: debug arena'),(304,'Command: debug bg'),(305,'Command: debug entervehicle'),(306,'Command: debug getitemstate'),(307,'Command: debug getitemvalue'),(308,'Command: debug getvalue'),(309,'Command: debug hostil'),(310,'Command: debug itemexpire'),(311,'Command: debug lootrecipient'),(312,'Command: debug los'),(313,'Command: debug mod32value'),(314,'Command: debug moveflags'),(315,'Command: debug play'),(316,'Command: debug play cinematics'),(317,'Command: debug play movie'),(318,'Command: debug play sound'),(319,'Command: debug send'),(320,'Command: debug send buyerror'),(321,'Command: debug send channelnotify'),(322,'Command: debug send chatmessage'),(323,'Command: debug send equiperror'),(324,'Command: debug send largepacket'),(325,'Command: debug send opcode'),(326,'Command: debug send qinvalidmsg'),(327,'Command: debug send qpartymsg'),(328,'Command: debug send sellerror'),(329,'Command: debug send setphaseshift'),(330,'Command: debug send spellfail'),(331,'Command: debug setaurastate'),(332,'Command: debug setbit'),(333,'Command: debug setitemvalue'),(334,'Command: debug setvalue'),(335,'Command: debug setvid'),(336,'Command: debug spawnvehicle'),(337,'Command: debug threat'),(338,'Command: debug update'),(339,'Command: debug uws'),(340,'Command: wpgps'),(341,'Command: deserter'),(342,'Command: deserter bg'),(343,'Command: deserter bg add'),(344,'Command: deserter bg remove'),(345,'Command: deserter instance'),(346,'Command: deserter instance add'),(347,'Command: deserter instance remove'),(348,'Command: disable'),(349,'Command: disable add'),(350,'Command: disable add achievement_criteria'),(351,'Command: disable add battleground'),(352,'Command: disable add map'),(353,'Command: disable add mmap'),(354,'Command: disable add outdoorpvp'),(355,'Command: disable add quest'),(356,'Command: disable add spell'),(357,'Command: disable add vmap'),(358,'Command: disable remove'),(359,'Command: disable remove achievement_criteria'),(360,'Command: disable remove battleground'),(361,'Command: disable remove map'),(362,'Command: disable remove mmap'),(363,'Command: disable remove outdoorpvp'),(364,'Command: disable remove quest'),(365,'Command: disable remove spell'),(366,'Command: disable remove vmap'),(367,'Command: event'),(368,'Command: event activelist'),(369,'Command: event start'),(370,'Command: event stop'),(371,'Command: gm'),(372,'Command: gm chat'),(373,'Command: gm fly'),(374,'Command: gm ingame'),(375,'Command: gm list'),(376,'Command: gm visible'),(377,'Command: go'),(378,'Command: go creature'),(379,'Command: go graveyard'),(380,'Command: go grid'),(381,'Command: go object'),(382,'Command: go taxinode'),(383,'Command: go ticket'),(384,'Command: go trigger'),(385,'Command: go xyz'),(386,'Command: go zonexy'),(387,'Command: gobject'),(388,'Command: gobject activate'),(389,'Command: gobject add'),(390,'Command: gobject add temp'),(391,'Command: gobject delete'),(392,'Command: gobject info'),(393,'Command: gobject move'),(394,'Command: gobject near'),(395,'Command: gobject set'),(396,'Command: gobject set phase'),(397,'Command: gobject set state'),(398,'Command: gobject target'),(399,'Command: gobject turn'),(400,'debug transport'),(401,'Command: guild'),(402,'Command: guild create'),(403,'Command: guild delete'),(404,'Command: guild invite'),(405,'Command: guild uninvite'),(406,'Command: guild rank'),(407,'Command: guild rename'),(408,'Command: honor'),(409,'Command: honor add'),(410,'Command: honor add kill'),(411,'Command: honor update'),(412,'Command: instance'),(413,'Command: instance listbinds'),(414,'Command: instance unbind'),(415,'Command: instance stats'),(416,'Command: instance savedata'),(417,'Command: learn'),(418,'Command: learn all'),(419,'Command: learn all my'),(420,'Command: learn all my class'),(421,'Command: learn all my pettalents'),(422,'Command: learn all my spells'),(423,'Command: learn all my talents'),(424,'Command: learn all gm'),(425,'Command: learn all crafts'),(426,'Command: learn all default'),(427,'Command: learn all lang'),(428,'Command: learn all recipes'),(429,'Command: unlearn'),(430,'Command: lfg'),(431,'Command: lfg player'),(432,'Command: lfg group'),(433,'Command: lfg queue'),(434,'Command: lfg clean'),(435,'Command: lfg options'),(436,'Command: list'),(437,'Command: list creature'),(438,'Command: list item'),(439,'Command: list object'),(440,'Command: list auras'),(441,'Command: list mail'),(442,'Command: lookup'),(443,'Command: lookup area'),(444,'Command: lookup creature'),(445,'Command: lookup event'),(446,'Command: lookup faction'),(447,'Command: lookup item'),(448,'Command: lookup itemset'),(449,'Command: lookup object'),(450,'Command: lookup quest'),(451,'Command: lookup player'),(452,'Command: lookup player ip'),(453,'Command: lookup player account'),(454,'Command: lookup player email'),(455,'Command: lookup skill'),(456,'Command: lookup spell'),(457,'Command: lookup spell id'),(458,'Command: lookup taxinode'),(459,'Command: lookup tele'),(460,'Command: lookup title'),(461,'Command: lookup map'),(462,'Command: announce'),(463,'Command: channel'),(464,'Command: channel set'),(465,'Command: channel set ownership'),(466,'Command: gmannounce'),(467,'Command: gmnameannounce'),(468,'Command: gmnotify'),(469,'Command: nameannounce'),(470,'Command: notify'),(471,'Command: whispers'),(472,'Command: group'),(473,'Command: group leader'),(474,'Command: group disband'),(475,'Command: group remove'),(476,'Command: group join'),(477,'Command: group list'),(478,'Command: group summon'),(479,'Command: pet'),(480,'Command: pet create'),(481,'Command: pet learn'),(482,'Command: pet unlearn'),(483,'Command: send'),(484,'Command: send items'),(485,'Command: send mail'),(486,'Command: send message'),(487,'Command: send money'),(488,'Command: additem'),(489,'Command: additemset'),(490,'Command: appear'),(491,'Command: aura'),(492,'Command: bank'),(493,'Command: bindsight'),(494,'Command: combatstop'),(495,'Command: cometome'),(496,'Command: commands'),(497,'Command: cooldown'),(498,'Command: damage'),(499,'Command: dev'),(500,'Command: die'),(501,'Command: dismount'),(502,'Command: distance'),(503,'Command: flusharenapoints'),(504,'Command: freeze'),(505,'Command: gps'),(506,'Command: guid'),(507,'Command: help'),(508,'Command: hidearea'),(509,'Command: itemmove'),(510,'Command: kick'),(511,'Command: linkgrave'),(512,'Command: listfreeze'),(513,'Command: maxskill'),(514,'Command: movegens'),(515,'Command: mute'),(516,'Command: neargrave'),(517,'Command: pinfo'),(518,'Command: playall'),(519,'Command: possess'),(520,'Command: recall'),(521,'Command: repairitems'),(522,'Command: respawn'),(523,'Command: revive'),(524,'Command: saveall'),(525,'Command: save'),(526,'Command: setskill'),(527,'Command: showarea'),(528,'Command: summon'),(529,'Command: unaura'),(530,'Command: unbindsight'),(531,'Command: unfreeze'),(532,'Command: unmute'),(533,'Command: unpossess'),(534,'Command: unstuck'),(535,'Command: wchange'),(536,'Command: mmap'),(537,'Command: mmap loadedtiles'),(538,'Command: mmap loc'),(539,'Command: mmap path'),(540,'Command: mmap stats'),(541,'Command: mmap testarea'),(542,'Command: morph'),(543,'Command: demorph'),(544,'Command: modify'),(545,'Command: modify arenapoints'),(546,'Command: modify bit'),(547,'Command: modify drunk'),(548,'Command: modify energy'),(549,'Command: modify faction'),(550,'Command: modify gender'),(551,'Command: modify honor'),(552,'Command: modify hp'),(553,'Command: modify mana'),(554,'Command: modify money'),(555,'Command: modify mount'),(556,'Command: modify phase'),(557,'Command: modify rage'),(558,'Command: modify reputation'),(559,'Command: modify runicpower'),(560,'Command: modify scale'),(561,'Command: modify speed'),(562,'Command: modify speed all'),(563,'Command: modify speed backwalk'),(564,'Command: modify speed fly'),(565,'Command: modify speed walk'),(566,'Command: modify speed swim'),(567,'Command: modify spell'),(568,'Command: modify standstate'),(569,'Command: modify talentpoints'),(570,'Command: npc'),(571,'Command: npc add'),(572,'Command: npc add formation'),(573,'Command: npc add item'),(574,'Command: npc add move'),(575,'Command: npc add temp'),(576,'Command: npc add delete'),(577,'Command: npc add delete item'),(578,'Command: npc add follow'),(579,'Command: npc add follow stop'),(580,'Command: npc set'),(581,'Command: npc set allowmove'),(582,'Command: npc set entry'),(583,'Command: npc set factionid'),(584,'Command: npc set flag'),(585,'Command: npc set level'),(586,'Command: npc set link'),(587,'Command: npc set model'),(588,'Command: npc set movetype'),(589,'Command: npc set phase'),(590,'Command: npc set spawndist'),(591,'Command: npc set spawntime'),(592,'Command: npc set data'),(593,'Command: npc info'),(594,'Command: npc near'),(595,'Command: npc move'),(596,'Command: npc playemote'),(597,'Command: npc say'),(598,'Command: npc textemote'),(599,'Command: npc whisper'),(600,'Command: npc yell'),(601,'Command: npc tame'),(602,'Command: quest'),(603,'Command: quest add'),(604,'Command: quest complete'),(605,'Command: quest remove'),(606,'Command: quest reward'),(607,'Command: reload'),(608,'Command: reload access_requirement'),(609,'Command: reload achievement_criteria_data'),(610,'Command: reload achievement_reward'),(611,'Command: reload all'),(612,'Command: reload all achievement'),(613,'Command: reload all area'),(614,'Command: broadcast_text'),(615,'Command: reload all gossips'),(616,'Command: reload all item'),(617,'Command: reload all locales'),(618,'Command: reload all loot'),(619,'Command: reload all npc'),(620,'Command: reload all quest'),(621,'Command: reload all scripts'),(622,'Command: reload all spell'),(623,'Command: reload areatrigger_involvedrelation'),(624,'Command: reload areatrigger_tavern'),(625,'Command: reload areatrigger_teleport'),(626,'Command: reload auctions'),(627,'Command: reload autobroadcast'),(628,'Command: reload command'),(629,'Command: reload conditions'),(630,'Command: reload config'),(631,'Command: reload battleground_template'),(632,'Command: .mutehistory'),(633,'Command: reload creature_linked_respawn'),(634,'Command: reload creature_loot_template'),(635,'Command: reload creature_onkill_reputation'),(636,'Command: reload creature_questender'),(637,'Command: reload creature_queststarter'),(638,'Command: reload creature_summon_groups'),(639,'Command: reload creature_template'),(640,'Command: reload creature_text'),(641,'Command: reload disables'),(642,'Command: reload disenchant_loot_template'),(643,'Command: reload event_scripts'),(644,'Command: reload fishing_loot_template'),(645,'Command: reload game_graveyard_zone'),(646,'Command: reload game_tele'),(647,'Command: reload gameobject_questender'),(648,'Command: reload gameobject_loot_template'),(649,'Command: reload gameobject_queststarter'),(650,'Command: reload gm_tickets'),(651,'Command: reload gossip_menu'),(652,'Command: reload gossip_menu_option'),(653,'Command: reload item_enchantment_template'),(654,'Command: reload item_loot_template'),(655,'Command: reload item_set_names'),(656,'Command: reload lfg_dungeon_rewards'),(657,'Command: reload locales_achievement_reward'),(658,'Command: reload locales_creature'),(659,'Command: reload locales_creature_text'),(660,'Command: reload locales_gameobject'),(661,'Command: reload locales_gossip_menu_option'),(662,'Command: reload locales_item'),(663,'Command: reload locales_item_set_name'),(664,'Command: reload locales_npc_text'),(665,'Command: reload locales_page_text'),(666,'Command: reload locales_points_of_interest'),(667,'Command: reload locales_quest'),(668,'Command: reload mail_level_reward'),(669,'Command: reload mail_loot_template'),(670,'Command: reload milling_loot_template'),(671,'Command: reload npc_spellclick_spells'),(672,'Command: reload npc_trainer'),(673,'Command: reload npc_vendor'),(674,'Command: reload page_text'),(675,'Command: reload pickpocketing_loot_template'),(676,'Command: reload points_of_interest'),(677,'Command: reload prospecting_loot_template'),(678,'Command: reload quest_poi'),(679,'Command: reload quest_template'),(680,'Command: reload rbac'),(681,'Command: reload reference_loot_template'),(682,'Command: reload reserved_name'),(683,'Command: reload reputation_reward_rate'),(684,'Command: reload reputation_spillover_template'),(685,'Command: reload skill_discovery_template'),(686,'Command: reload skill_extra_item_template'),(687,'Command: reload skill_fishing_base_level'),(688,'Command: reload skinning_loot_template'),(689,'Command: reload smart_scripts'),(690,'Command: reload spell_required'),(691,'Command: reload spell_area'),(692,'Command: reload spell_bonus_data'),(693,'Command: reload spell_group'),(694,'Command: reload spell_learn_spell'),(695,'Command: reload spell_loot_template'),(696,'Command: reload spell_linked_spell'),(697,'Command: reload spell_pet_auras'),(698,'Command: reload spell_proc_event'),(699,'Command: reload spell_proc'),(700,'Command: reload spell_scripts'),(701,'Command: reload spell_target_position'),(702,'Command: reload spell_threats'),(703,'Command: reload spell_group_stack_rules'),(704,'Command: reload trinity_string'),(705,'Command: reload warden_action'),(706,'Command: reload waypoint_scripts'),(707,'Command: reload waypoint_data'),(708,'Command: reload vehicle_accessory'),(709,'Command: reload vehicle_template_accessory'),(710,'Command: reset'),(711,'Command: reset achievements'),(712,'Command: reset honor'),(713,'Command: reset level'),(714,'Command: reset spells'),(715,'Command: reset stats'),(716,'Command: reset talents'),(717,'Command: reset all'),(718,'Command: server'),(719,'Command: server corpses'),(720,'Command: server exit'),(721,'Command: server idlerestart'),(722,'Command: server idlerestart cancel'),(723,'Command: server idleshutdown'),(724,'Command: server idleshutdown cancel'),(725,'Command: server info'),(726,'Command: server plimit'),(727,'Command: server restart'),(728,'Command: server restart cancel'),(729,'Command: server set'),(730,'Command: server set closed'),(731,'Command: server set difftime'),(732,'Command: server set loglevel'),(733,'Command: server set motd'),(734,'Command: server shutdown'),(735,'Command: server shutdown cancel'),(736,'Command: server motd'),(737,'Command: tele'),(738,'Command: tele add'),(739,'Command: tele del'),(740,'Command: tele name'),(741,'Command: tele group'),(742,'Command: ticket'),(743,'Command: ticket assign'),(744,'Command: ticket close'),(745,'Command: ticket closedlist'),(746,'Command: ticket comment'),(747,'Command: ticket complete'),(748,'Command: ticket delete'),(749,'Command: ticket escalate'),(750,'Command: ticket escalatedlist'),(751,'Command: ticket list'),(752,'Command: ticket onlinelist'),(753,'Command: ticket reset'),(754,'Command: ticket response'),(755,'Command: ticket response append'),(756,'Command: ticket response appendln'),(757,'Command: ticket togglesystem'),(758,'Command: ticket unassign'),(759,'Command: ticket viewid'),(760,'Command: ticket viewname'),(761,'Command: titles'),(762,'Command: titles add'),(763,'Command: titles current'),(764,'Command: titles remove'),(765,'Command: titles set'),(766,'Command: titles set mask'),(767,'Command: wp'),(768,'Command: wp add'),(769,'Command: wp event'),(770,'Command: wp load'),(771,'Command: wp modify'),(772,'Command: wp unload'),(773,'Command: wp reload'),(774,'Command: wp show'),(777,'Command: mailbox'),(778,'Command: ahbot'),(779,'Command: ahbot items'),(780,'Command: ahbot items gray'),(781,'Command: ahbot items white'),(782,'Command: ahbot items green'),(783,'Command: ahbot items blue'),(784,'Command: ahbot items purple'),(785,'Command: ahbot items orange'),(786,'Command: ahbot items yellow'),(787,'Command: ahbot ratio'),(788,'Command: ahbot ratio alliance'),(789,'Command: ahbot ratio horde'),(790,'Command: ahbot ratio neutral'),(791,'Command: ahbot rebuild'),(792,'Command: ahbot reload'),(793,'Command: ahbot status'),(794,'Command: .guild info'),(795,'Command: .instance setbossstate'),(796,'Command: instance getbossstate'),(797,'Command: pvpstats'),(798,'Command: .mod xp'); /*!40000 ALTER TABLE `rbac_permissions` ENABLE KEYS */; UNLOCK TABLES; @@ -497,4 +498,4 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2014-11-11 0:38:41 +-- Dump completed on 2014-12-21 20:42:33 diff --git a/sql/updates/auth/2014_12_10_00_auth.sql b/sql/updates/auth/2014_12_10_00_auth.sql new file mode 100644 index 00000000000..8068fd3c459 --- /dev/null +++ b/sql/updates/auth/2014_12_10_00_auth.sql @@ -0,0 +1,3 @@ +ALTER TABLE `rbac_default_permissions` +ADD COLUMN `realmId` INT(11) NOT NULL DEFAULT '-1' COMMENT 'Realm Id, -1 means all', +DROP PRIMARY KEY, ADD PRIMARY KEY (`secId`, `permissionId`, `realmId`); diff --git a/sql/updates/auth/2014_12_21_00_auth.sql b/sql/updates/auth/2014_12_21_00_auth.sql new file mode 100644 index 00000000000..ddea3d335ff --- /dev/null +++ b/sql/updates/auth/2014_12_21_00_auth.sql @@ -0,0 +1,9 @@ +-- Add rbac_permissions +DELETE FROM `rbac_permissions` WHERE `id` = 51; +INSERT INTO `rbac_permissions` (`id`,`name`) VALUES +(51, 'Allow trading between factions'); + +-- Add rbac_linked_permissions +DELETE FROM `rbac_linked_permissions` WHERE `linkedId` = 51; +INSERT INTO `rbac_linked_permissions` (`id`,`linkedId`) VALUES +(194, 51); diff --git a/sql/updates/world/2014_11_13_00_world.sql b/sql/updates/world/2014_11_13_00_world.sql new file mode 100644 index 00000000000..baa87a86e7e --- /dev/null +++ b/sql/updates/world/2014_11_13_00_world.sql @@ -0,0 +1,100 @@ +SET @CGUID=75031; + +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN(27315,27336); +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`IN(27315,27336); +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(27315,0,0,1,8,0,100,0,48363,0,0,0,28,49774,0,0,0,0,0,1,0,0,0,0,0,0,0,'Helpless Wintergarde Villager - on spellhit - Remove Aura'), +(27315,0,1,2,61,0,100,0,0,0,0,0,11,43671,0,0,0,0,0,7,0,0,0,0,0,0,0,'Helpless Wintergarde Villager - on spellhit - mount to invoker'), +(27315,0,2,0,61,0,100,0,0,0,0,0,22,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Helpless Wintergarde Villager - on spellhit - set phasemask to 2'), +(27315,0,3,0,1,2,100,1,5000,5000,5000,5000,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Helpless Wintergarde Villager - OOC (Phase 2) - Say text 0'), +(27315,0,4,5,23,2,100,1,43671,0,1000,1000,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Helpless Wintergarde Villager - On Aura Missing - say text'), +(27315,0,5,0,61,2,100,0,0,0,0,0,41,5000,0,0,0,0,0,1,0,0,0,0,0,0,0,'Helpless Wintergarde Villager - On Aura Missing - despawn after 2 secs'), +(27336,0,0,1,8,0,100,0,48363,0,0,0,28,49774,0,0,0,0,0,1,0,0,0,0,0,0,0,'Helpless Wintergarde Villager - on spellhit - Remove Aura'), +(27336,0,1,2,61,0,100,0,0,0,0,0,11,43671,0,0,0,0,0,7,0,0,0,0,0,0,0,'Helpless Wintergarde Villager - on spellhit - mount to invoker'), +(27336,0,2,0,61,0,100,0,0,0,0,0,22,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Helpless Wintergarde Villager - on spellhit - set phasemask to 2'), +(27336,0,3,0,1,2,100,1,5000,5000,5000,5000,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Helpless Wintergarde Villager - OOC (Phase 2) - Say text 0'), +(27336,0,4,5,23,2,100,1,43671,0,1000,1000,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Helpless Wintergarde Villager - On Aura Missing - say text'), +(27336,0,5,0,61,2,100,0,0,0,0,0,41,5000,0,0,0,0,0,1,0,0,0,0,0,0,0,'Helpless Wintergarde Villager - On Aura Missing - despawn after 2 secs'); + +/* aura for mount */ +DELETE FROM `creature_template_addon` WHERE `entry`=27258; +INSERT INTO `creature_template_addon` (`entry`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `auras`) VALUES +(27258, 0, 0, 33554432, 0, 0, '34873'); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`IN(13,17) AND `SourceEntry` IN(48397,48363); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(17, 0, 48397, 0, 0, 29, 0, 27315, 5, 1, 0, 0, 0, '', 'Required NPC to cast Spell'), +(17, 0, 48397, 0, 1, 29, 0, 27336, 5, 1, 0, 0, 0, '', 'Required NPC to cast Spell'), +(17, 0, 48397, 0, 0, 30, 0, 300199, 15, 0, 0, 0, 0, '', 'Spell focus for Drop Off Helpless Wintergarde Villager'), +(13, 2, 48397, 0, 0, 31, 0, 4, 0, 0, 0, 0, 0, '', 'Drop Off Villager Effect #2 Targets Player'), +(13, 1, 48363, 0, 0, 31, 0, 3, 27315, 0, 0, 0, 0, '', 'Grab targets Helpless Wintergarde Villager'), +(17, 0, 48363, 0, 0, 29, 0, 27315, 5, 1, 0, 0, 0, '', 'Required NPC to cast Spell'), +(13, 1, 48363, 0, 1, 31, 0, 3, 27336, 0, 0, 0, 0, '', 'Grab targets Helpless Wintergarde Villager'), +(17, 0, 48363, 0, 1, 29, 0, 27336, 5, 1, 0, 0, 0, '', 'Required NPC to cast Spell'); + +UPDATE `creature_template` SET `faction`=35 WHERE `entry`=27258; +UPDATE `creature_template` SET `exp`=2, `speed_walk`=1, `speed_run`=1.142857,`faction`=35 WHERE `entry`=27258; + +DELETE FROM `spell_linked_spell` WHERE `spell_trigger`=48397; +INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES +(48397, -43671, 0, 'remove npc'); + +UPDATE `creature_template` SET `minlevel`=62, `maxlevel`=68, `unit_flags`=33536 WHERE `entry`=27336; +UPDATE `creature_template` SET `minlevel`=60, `maxlevel`=70, `unit_flags`=33536 WHERE `entry`=27315; + +DELETE FROM `creature_text` WHERE `entry` IN(27315,27336); +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`,`BroadcastTextID`) VALUES +(27315, 0, 0, 'Are you sure you know how to fly this thing? Feels a little wobbly.', 12, 0, 100, 0, 0, 0, 'Helpless Wintergarde Villager',26359), +(27315, 0, 1, 'I don\'t mean to sound ungrateful, but could you fly a little closer to the ground? I hate heights!', 12, 0, 100, 0, 0, 0, 'Helpless Wintergarde Villager',26360), +(27315, 0, 2, 'I picked a bad day to stop drinking!', 12, 0, 100, 0, 0, 0, 'Helpless Wintergarde Villager',26345), +(27315, 0, 3, 'I\'m gettin\' a little woozy... Oooooof...', 12, 0, 100, 0, 0, 0, 'Helpless Wintergarde Villager',26364), +(27315, 0, 4, 'You saved my life! Thanks!', 12, 0, 100, 0, 0, 0, 'Helpless Wintergarde Villager',26358), +(27315, 0, 5, 'You are my guardian angel! Like a white knight you flew in from the heavens and lifted me from the pit of damnation!', 12, 0, 100, 0, 0, 0, 'Helpless Wintergarde Villager',26362), +(27315, 1, 0, 'How can I ever repay you for this, friend?', 12, 0, 100, 0, 0, 0, 'Helpless Wintergarde Villager',26363), +(27315, 1, 1, 'HURRAY!', 12, 0, 100, 0, 0, 0, 'Helpless Wintergarde Villager',26382), +(27315, 1, 2, 'Kindness is not lost with this one, Urik. Thank you, hero!', 12, 0, 100, 0, 0, 0, 'Helpless Wintergarde Villager',26383), +(27315, 1, 3, 'My shop\'s doors will always be open to you, friend.', 12, 0, 100, 0, 0, 0, 'Helpless Wintergarde Villager',26385), +(27315, 1, 4, 'Safe at last! Thank you, stranger!', 12, 0, 100, 0, 0, 0, 'Helpless Wintergarde Villager',26381), +(27315, 1, 5, 'Thanks for your help, hero!', 12, 0, 100, 0, 0, 0, 'Helpless Wintergarde Villager',26357), +(27315, 1, 6, 'We made it! We actually made it!', 12, 0, 100, 0, 0, 0, 'Helpless Wintergarde Villager',26384), +(27336, 0, 0, 'Are you sure you know how to fly this thing? Feels a little wobbly.', 12, 0, 100, 0, 0, 0, 'Helpless Wintergarde Villager',26359), +(27336, 0, 1, 'I don\'t mean to sound ungrateful, but could you fly a little closer to the ground? I hate heights!', 12, 0, 100, 0, 0, 0, 'Helpless Wintergarde Villager',26360), +(27336, 0, 2, 'I picked a bad day to stop drinking!', 12, 0, 100, 0, 0, 0, 'Helpless Wintergarde Villager',26345), +(27336, 0, 3, 'I\'m gettin\' a little woozy... Oooooof...', 12, 0, 100, 0, 0, 0, 'Helpless Wintergarde Villager',26364), +(27336, 0, 4, 'You saved my life! Thanks!', 12, 0, 100, 0, 0, 0, 'Helpless Wintergarde Villager',26358), +(27336, 0, 5, 'You are my guardian angel! Like a white knight you flew in from the heavens and lifted me from the pit of damnation!', 12, 0, 100, 0, 0, 0, 'Helpless Wintergarde Villager',26362), +(27336, 1, 0, 'How can I ever repay you for this, friend?', 12, 0, 100, 0, 0, 0, 'Helpless Wintergarde Villager',26363), +(27336, 1, 1, 'HURRAY!', 12, 0, 100, 0, 0, 0, 'Helpless Wintergarde Villager',26382), +(27336, 1, 2, 'Kindness is not lost with this one, Urik. Thank you, hero!', 12, 0, 100, 0, 0, 0, 'Helpless Wintergarde Villager',26383), +(27336, 1, 3, 'My shop\'s doors will always be open to you, friend.', 12, 0, 100, 0, 0, 0, 'Helpless Wintergarde Villager',26385), +(27336, 1, 4, 'Safe at last! Thank you, stranger!', 12, 0, 100, 0, 0, 0, 'Helpless Wintergarde Villager',26381), +(27336, 1, 5, 'Thanks for your help, hero!', 12, 0, 100, 0, 0, 0, 'Helpless Wintergarde Villager',26357), +(27336, 1, 6, 'We made it! We actually made it!', 12, 0, 100, 0, 0, 0, 'Helpless Wintergarde Villager',26384); + +DELETE FROM `creature` WHERE `id` IN(27336,27315); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `MovementType`) VALUES +(@CGUID+0, 27336, 571, 1, 1, 3846.755, -929.0404, 112.8907, 4.708376, 120, 5, 1), -- 27336 (Area: 4177) (possible waypoints or random movement) +(@CGUID+1, 27336, 571, 1, 1, 3889.424, -935.4798, 115.6459, 1.28458, 120, 5, 1), -- 27336 (Area: 4177) (possible waypoints or random movement) +(@CGUID+2, 27336, 571, 1, 1, 3878.463, -985.8888, 116.4584, 5.028894, 120, 5, 1), -- 27336 (Area: 4177) (possible waypoints or random movement) +(@CGUID+3, 27336, 571, 1, 1, 3823.805, -1083.309, 119.5392, 1.963927, 120, 5, 1), -- 27336 (Area: 4177) (possible waypoints or random movement) +(@CGUID+4, 27336, 571, 1, 1, 3817.068, -1048.894, 119.9088, 1.822633, 120, 5, 1), -- 27336 (Area: 4177) (possible waypoints or random movement) +(@CGUID+5, 27336, 571, 1, 1, 3771.587, -1131.885, 121.5405, 5.288348, 120, 5, 1), -- 27336 (Area: 4188) (possible waypoints or random movement) +(@CGUID+6, 27336, 571, 1, 1, 3583.055, -1331.913, 109.3448, 6.212783, 120, 5, 1), -- 27336 (Area: 4188) (possible waypoints or random movement) +(@CGUID+7, 27315, 571, 1, 1, 3822.955, -1128.766, 120.1993, 5.973483, 120, 5, 1), -- 27315 (Area: 4188) (possible waypoints or random movement) +(@CGUID+8, 27315, 571, 1, 1, 3664.299, -1270.015, 112.583, 5.268541, 120, 5, 1), -- 27315 (Area: 4188) (possible waypoints or random movement) +(@CGUID+9, 27315, 571, 1, 1, 3625.333, -1260.047, 112.6119, 6.237288, 120, 5, 1), -- 27315 (Area: 4188) (possible waypoints or random movement) +(@CGUID+10, 27315, 571, 1, 1, 3721.795, -1345.791, 133.6774, 0.2871537, 120, 5, 1), -- 27315 (Area: 4188) (possible waypoints or random movement) +(@CGUID+11, 27315, 571, 1, 1, 3718.502, -1323.397, 125.0354, 1.818619, 120, 5, 1), -- 27315 (Area: 4234) (possible waypoints or random movement) +(@CGUID+12, 27315, 571, 1, 1, 3768.525, -1289.776, 133.6532, 4.827796, 120, 5, 1), -- 27315 (Area: 4234) (possible waypoints or random movement) +(@CGUID+13, 27336, 571, 1, 1, 3707.695, -1138.643, 120.2261, 4.974188, 120, 0, 0); -- 27336 (Area: 4188) + +DELETE FROM `creature_template_addon` WHERE `entry` IN(27336,27315); +INSERT INTO `creature_template_addon` (`entry`, `mount`, `bytes1`, `bytes2`, `auras`) VALUES +(27336, 0, 0x0, 0x1, '48361 49774'), -- 27336 - 48361, 49774 +(27315, 0, 0x10000, 0x1, '48361 49774'); -- 27315 - 48361, 49774 + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=16 AND `SourceEntry`=27258; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(16, 0, 27258, 0, 0, 23, 0, 4188, 0, 0, 0, 0, 0, '', 'Dismount player when not in intended zone'), +(16, 0, 27258, 0, 1, 23, 0, 4177, 0, 0, 0, 0, 0, '', 'Dismount player when not in intended zone'), +(16, 0, 27258, 0, 2, 23, 0, 4178, 0, 0, 0, 0, 0, '', 'Dismount player when not in intended zone'); diff --git a/sql/updates/world/2014_11_16_00_world.sql b/sql/updates/world/2014_11_16_00_world.sql new file mode 100644 index 00000000000..939c43f7056 --- /dev/null +++ b/sql/updates/world/2014_11_16_00_world.sql @@ -0,0 +1 @@ +UPDATE `smart_scripts` SET `target_type`=5, `target_param1`=0 WHERE `entryorguid`=37662 AND `source_type`=0 AND `id`=0; diff --git a/sql/updates/world/2014_11_17_00_world.sql b/sql/updates/world/2014_11_17_00_world.sql new file mode 100644 index 00000000000..f96248d0f64 --- /dev/null +++ b/sql/updates/world/2014_11_17_00_world.sql @@ -0,0 +1,7 @@ +UPDATE `conditions` SET `ConditionValue1`=188679 WHERE `ConditionValue1`=300199; +DELETE FROM `creature_queststarter` WHERE `quest`=14351; +INSERT INTO `creature_queststarter` (`id`, `quest`) VALUES +(2215, 14351); +UPDATE `quest_template` SET `NextQuestIdChain`=14351 WHERE `Id`=541; +UPDATE `quest_template` SET `PrevQuestId`=541 WHERE `Id`=14351; +UPDATE `spell_area` SET `quest_start_status`=74 WHERE `spell`=57745 AND `area`=4591 AND `quest_start`=13068 AND `aura_spell`=0 AND `racemask`=0 AND `gender`=2; diff --git a/sql/updates/world/2014_11_19_00_world.sql b/sql/updates/world/2014_11_19_00_world.sql new file mode 100644 index 00000000000..d2b188cbf69 --- /dev/null +++ b/sql/updates/world/2014_11_19_00_world.sql @@ -0,0 +1,6 @@ +-- +DELETE FROM `command` WHERE `name`='pvpstats'; +INSERT INTO `command` (`name`, `permission`, `help`) VALUES +('pvpstats', 797, 'Shows number of battleground victories in the last 7 days'); + +UPDATE `command` SET `permission`=798 WHERE `name`='modify xp'; diff --git a/sql/updates/world/2014_11_19_01_world.sql b/sql/updates/world/2014_11_19_01_world.sql new file mode 100644 index 00000000000..d034a50789f --- /dev/null +++ b/sql/updates/world/2014_11_19_01_world.sql @@ -0,0 +1,59 @@ + UPDATE `creature_template` SET `AIName`= 'SmartAI',`ScriptName`='' WHERE `entry`=24035; + UPDATE `gameobject_template` SET `AIName`='SmartGameObjectAI', `ScriptName`='' WHERE `entry`IN(186491,186492,186493,186494,186498,186499,186500,186501,186502,186503,186504,186505,186508,186509,186512,186513,186514,186515,186516,186883,186895,186907,186908,186910,186911,186923,186924,186495,186496,186497,186507,186510,186511,186517,186518,186798,186909,186929,186930,186490); + DELETE FROM `smart_scripts` WHERE `entryorguid` IN (24035,186491,186492,18649100,186493,186494,186498,186499,186500,186501,186502,186503,186504,186505,186508,186509,186512,186513,186514,186515,186516,186883,186895,186907,186908,186910,186911,186923,186924,186495,186496,186497,186507,186510,186511,186517,186518,186798,186909,186929,186930,186490,18649000); + INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES + (186491, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), + (186492, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), + (186493, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), + (186494, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), + (186495, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), + (186496, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), + (186497, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), + (186498, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), + (186499, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), + (186500, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), + (186501, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), + (186502, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), + (186503, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), + (186504, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), + (186505, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), + (186507, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), + (186508, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), + (186509, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), + (186510, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), + (186511, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), + (186512, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), + (186513, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), + (186514, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), + (186515, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), + (186516, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), + (186517, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), + (186518, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), + (186798, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), + (186883, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), + (186895, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), + (186907, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), + (186908, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), + (186909, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), + (186910, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), + (186911, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), + (186923, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), + (186924, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), + (186929, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), + (186930, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), + (186490, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649000,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Large Gjalerbron Cage - On State Changed - Run Script'), + (24035, 0, 0 ,1,38, 0, 100, 0, 1, 1, 0,0,1,0,0,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Prisoner - On Data Set - Say'), + (24035, 0, 1 ,0,61, 0, 100, 0, 1, 1, 0,0,41,2000,0,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Prisoner - Linked with Previous Event - Despawn after 2 seconds'), + (18649100, 9, 0 ,0, 0, 0, 100, 0, 0, 0, 0,0,45,1,1,0,0,0,0,9,24035,0,5,0, 0, 0, 0, 'Gjalerbron Cage - Script - Set Data'), + (18649100, 9, 1 ,0, 0, 0, 100, 0, 0, 0, 0,0,33,24035,0,0,0,0,0,7,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - Script - Kill Credit'), + (18649100, 9, 2 ,0, 0, 0, 100, 0, 300000, 300000, 0,0,32,0,0,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - Script - Reset Go'), + (18649000, 9, 0 ,0, 0, 0, 100, 0, 0, 0, 0,0,45,1,1,0,0,0,0,9,24035,0,5,0, 0, 0, 0, 'Large Gjalerbron Cage - Script - Set Data'), + (18649000, 9, 1 ,0, 0, 0, 100, 0, 0, 0, 0,0,33,24035,0,0,0,0,0,7,0,0,0,0, 0, 0, 0, 'Large Gjalerbron Cage - Script - Kill Credit'), + (18649000, 9, 2 ,0, 0, 0, 100, 0, 0, 0, 0,0,33,24035,0,0,0,0,0,7,0,0,0,0, 0, 0, 0, 'Large Gjalerbron Cage - Script - Kill Credit'), + (18649000, 9, 3 ,0, 0, 0, 100, 0, 0, 0, 0,0,33,24035,0,0,0,0,0,7,0,0,0,0, 0, 0, 0, 'Large Gjalerbron Cage- Script - Kill Credit'), + (18649000, 9, 4 ,0, 0, 0, 100, 0, 0, 0, 0,0,33,24035,0,0,0,0,0,7,0,0,0,0, 0, 0, 0, 'Large Gjalerbron Cage - Script - Kill Credit'), + (18649000, 9, 5 ,0, 0, 0, 100, 0, 0, 0, 0,0,33,24035,0,0,0,0,0,7,0,0,0,0, 0, 0, 0, 'Large Gjalerbron Cage - Script - Kill Credit'), + (18649000, 9, 6 ,0, 0, 0, 100, 0, 300000, 300000, 0,0,32,0,0,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Large Gjalerbron Cage - Script - Reset Go'); + DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceEntry`=24035; + INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES + (22, 1, 24035, 0, 0, 36, 1, 0, 0, 0, 0, 0, '','Only execute SAI if Gjalerbron Prisoner alive'); diff --git a/sql/updates/world/2014_11_19_02_world.sql b/sql/updates/world/2014_11_19_02_world.sql new file mode 100644 index 00000000000..635c31be96c --- /dev/null +++ b/sql/updates/world/2014_11_19_02_world.sql @@ -0,0 +1,8 @@ +UPDATE `quest_template` SET `PrevQuestId`=0 WHERE `Id`=12933; + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN(19,20) AND `SourceEntry`=12933; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(19, 0, 12933, 0, 0, 8, 0, 12932, 0, 0, 0, 0, 0, '', 'The Amphitheater of Anguish: Magnataur! after The Amphitheater of Anguish: Yggdras!'), +(20, 0, 12933, 0, 0, 8, 0, 12932, 0, 0, 0, 0, 0, '', 'The Amphitheater of Anguish: Magnataur! after The Amphitheater of Anguish: Yggdras!'), +(19, 0, 12933, 0, 1, 8, 0, 12954, 0, 0, 0, 0, 0, '', 'The Amphitheater of Anguish: Magnataur! after The Amphitheater of Anguish: Yggdras!'), +(20, 0, 12933, 0, 1, 8, 0, 12954, 0, 0, 0, 0, 0, '', 'The Amphitheater of Anguish: Magnataur! after The Amphitheater of Anguish: Yggdras!'); diff --git a/sql/updates/world/2014_11_20_00_world.sql b/sql/updates/world/2014_11_20_00_world.sql new file mode 100644 index 00000000000..5425c1acad0 --- /dev/null +++ b/sql/updates/world/2014_11_20_00_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `smart_scripts` SET `link`=0 WHERE `entryorguid` IN (4857,4858,4860) AND `source_type`=2; diff --git a/sql/updates/world/2014_11_20_01_world.sql b/sql/updates/world/2014_11_20_01_world.sql new file mode 100644 index 00000000000..75474e72596 --- /dev/null +++ b/sql/updates/world/2014_11_20_01_world.sql @@ -0,0 +1,3 @@ +DELETE FROM `gameobject` WHERE `id`=187372; +INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `VerifiedBuild`) VALUES +(44719, 187372, 556, 3, 1, 65.88321, 286.6981, 25.04024, 0, 0, 0, 0, 1, 86400, 255, 1, 12340); diff --git a/sql/updates/world/2014_11_20_02_world.sql b/sql/updates/world/2014_11_20_02_world.sql new file mode 100644 index 00000000000..c96d6dd9100 --- /dev/null +++ b/sql/updates/world/2014_11_20_02_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `game_tele` SET `name`='FarstriderRetreat' WHERE `id`=367; diff --git a/sql/updates/world/2014_11_20_03_world.sql b/sql/updates/world/2014_11_20_03_world.sql new file mode 100644 index 00000000000..eab63880696 --- /dev/null +++ b/sql/updates/world/2014_11_20_03_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `command` SET `help`='Syntax: .titles current #title\r\nSet title #title (id or shift-link) as current selected title for selected player. If title is not in known title list for player then it will be added to list.' WHERE `name`='titles current'; diff --git a/sql/updates/world/2014_11_20_04_world.sql b/sql/updates/world/2014_11_20_04_world.sql new file mode 100644 index 00000000000..aa5b1641320 --- /dev/null +++ b/sql/updates/world/2014_11_20_04_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature_template` SET `mechanic_immune_mask` = `mechanic_immune_mask` |33554432, `flags_extra` = `flags_extra` &~256 WHERE entry IN (10184, 36538); diff --git a/sql/updates/world/2014_11_20_05_world.sql b/sql/updates/world/2014_11_20_05_world.sql new file mode 100644 index 00000000000..1a8ac671e94 --- /dev/null +++ b/sql/updates/world/2014_11_20_05_world.sql @@ -0,0 +1 @@ +UPDATE `smart_scripts` SET `event_type`=0 WHERE `entryorguid`=3636 AND `source_type`=0 AND `id`=0 AND `link`=0; diff --git a/sql/updates/world/2014_11_21_00_world.sql b/sql/updates/world/2014_11_21_00_world.sql new file mode 100644 index 00000000000..f8b1962bf1d --- /dev/null +++ b/sql/updates/world/2014_11_21_00_world.sql @@ -0,0 +1,13 @@ + +DELETE FROM `spell_linked_spell` WHERE `spell_trigger`IN(-53017); +INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES +(-53017, 48330, 0,'On Indisposed Expiring - Cast Create Amberseeds'); +UPDATE `smart_scripts` SET `target_type`=12, `target_param1`=1 WHERE `entryorguid`=28747 AND `source_type`=0 AND `id`=6 AND `link`=0;UPDATE `smart_scripts` SET `target_type`=12, `target_param1`=1 WHERE `entryorguid`=28748 AND `source_type`=0 AND `id`=5 AND `link`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid`=28747 AND `source_type`=0 AND `id`=7;DELETE FROM `smart_scripts` WHERE `entryorguid`=28748 AND `source_type`=0 AND `id`=6; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(28747, 0, 7, 0, 4, 0, 100, 0, 0, 0, 0, 0, 64, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Quetz\'lun Worshipper - On Agro - Store Targetlist'), +(28748, 0, 6, 0, 4, 0, 100, 0, 0, 0, 0, 0, 64, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Serpent-Touched Berserker - On Agro - Store Targetlist'); +DELETE FROM `spell_linked_spell` WHERE `spell_trigger` = 26560 AND `spell_effect`=18280; +INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comment`) +VALUES (26560, 18280, 0, 'Summon Lord-Commander Arete'); +UPDATE `smart_scripts` SET `event_param1`=12 WHERE `entryorguid`=31279 AND `source_type`=0 AND `id`=18 AND `link`=0; diff --git a/sql/updates/world/2014_11_21_01_world.sql b/sql/updates/world/2014_11_21_01_world.sql new file mode 100644 index 00000000000..ad93939dd52 --- /dev/null +++ b/sql/updates/world/2014_11_21_01_world.sql @@ -0,0 +1,18 @@ +UPDATE `smart_scripts` SET `event_flags`=0 WHERE `entryorguid` IN(24874,24875,24876,24877) AND `source_type`=0 AND `id`=0 AND `link`=1; +DELETE FROM `disables` WHERE `sourceType`=0 AND `entry`=45323; +INSERT INTO `disables` (`sourceType`, `entry`, `flags`, `params_0`, `params_1`, `comment`) VALUES(0, 45323, 64, '', '', 'Ignore LOS for Returning Vrykul Artifact'); +UPDATE `creature_template` SET `unit_flags`=768 WHERE `entry`=24889; +UPDATE `spell_area` SET `quest_start_status`=74 WHERE `spell`=57745 AND `area`=4591 AND `quest_start`=13068 AND `aura_spell`=0 AND `racemask`=0 AND `gender`=2; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=1 AND `SourceGroup`=24018 AND `SourceEntry` IN(34090,34091); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(1, 24018, 34090, 0, 0, 8, 0, 11236, 0, 0, 0, 0, 0, '', 'Mezhens Writings drops if player is rewarded for Necro Overlord Mezhen'), +(1, 24018, 34091, 0, 0, 8, 0, 11264, 0, 0, 0, 0, 0, '', 'Mezhens Writings drops if player is rewarded for Necro Overlord Mezhen'), +(1, 24018, 34090, 0, 1, 9, 0, 11236, 0, 0, 0, 0, 0, '', 'Mezhens Writings drops if player has taken Necro Overlord Mezhen'), +(1, 24018, 34091, 0, 1, 9, 0, 11264, 0, 0, 0, 0, 0, '', 'Mezhens Writings drops if player has taken Necro Overlord Mezhen'), +(1, 24018, 34090, 0, 2,28, 0, 11236, 0, 0, 0, 0, 0, '', 'Mezhens Writings drops if player has completed Necro Overlord Mezhen'), +(1, 24018, 34091, 0, 2,28, 0, 11264, 0, 0, 0, 0, 0, '', 'Mezhens Writings drops if player has completed Necro Overlord Mezhen'); +UPDATE `smart_scripts` SET `action_param4`=1 WHERE `entryorguid`=21352 AND `source_type`=0 AND `id`=2 AND `link`=0; +UPDATE `smart_scripts` SET `action_param4`=1 WHERE `entryorguid`=21498 AND `source_type`=0 AND `id`=1 AND `link`=0; +UPDATE `smart_scripts` SET `action_param4`=1 WHERE `entryorguid`=21498 AND `source_type`=0 AND `id`=0 AND `link`=0; +UPDATE `gameobject_loot_template` SET `maxcount`=4 WHERE `entry`=1502 AND `item`=2770; +UPDATE `creature_template` SET `npcflag`=1 WHERE `entry`=32239; diff --git a/sql/updates/world/2014_11_21_02_world.sql b/sql/updates/world/2014_11_21_02_world.sql new file mode 100644 index 00000000000..52a6ddc10f2 --- /dev/null +++ b/sql/updates/world/2014_11_21_02_world.sql @@ -0,0 +1,55 @@ +SET @VARIDUS := 25618; +SET @GETRY := 25729; +SET @NECROLORD := 25730; +SET @SAURFANG := 25751; + +UPDATE `creature_template` SET `ainame`='SmartAI' WHERE `entry`=@SAURFANG; + +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@GETRY,@NECROLORD,@SAURFANG) AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@VARIDUS*100 AND `source_type`=9; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(@NECROLORD,0,0,0,11,0,100,0,0,0,0,0,53,0,@NECROLORD,0,0,0,0,1,0,0,0,0,0,0,0, 'En''kilah Necrolord - On spawn - Start WP movement'), +(@NECROLORD,0,1,2,40,0,100,0,2,@NECROLORD,0,0,101,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'En''kilah Necrolord - On reached WP1 - Set home position'), +(@NECROLORD,0,2,0,61,0,100,0,0,0,0,0,45,0,4,0,0,0,0,19,@VARIDUS,10,0,0,0,0,0, 'En''kilah Necrolord - On reached WP1 - Set data 0 4 Varidus the Flenser'), +(@NECROLORD,0,3,4,38,0,100,0,5,1,0,0,66,0,0,0,0,0,0,19,@VARIDUS,10,0,0,0,0,0, 'En''kilah Necrolord - On data 0 1 set - Turn to'), +(@NECROLORD,0,4,5,61,0,100,0,0,0,0,0,12,@SAURFANG,1,300000,0,0,0,1,0,0,0,0,0,0,0, 'En''kilah Necrolord - On data 0 1 set - Change entry to High Overlord Saurfang'), +(@NECROLORD,0,5,6,61,0,100,0,0,0,0,0,100,1,0,0,0,0,0,19,@SAURFANG,0,0,0,0,0,0, 'En''kilah Necrolord - On data 0 1 set - Change entry to High Overlord Saurfang'), +(@NECROLORD,0,6,0,61,0,100,0,0,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'En''kilah Necrolord - On data 0 1 set - Change entry to High Overlord Saurfang'), +(@SAURFANG,0,0,0,38,0,100,0,5,2,0,0,1,0,2500,0,0,0,0,12,1,0,0,0,0,0,0, 'High Overlord Saurfang - On data 0 2 set - Say line'), +(@SAURFANG,0,1,0,52,0,100,0,0,@SAURFANG,0,0,66,0,0,0,0,0,0,12,1,0,0,0,0,0,0, 'High Overlord Saurfang - On text 0 over - Turn to'), +(@SAURFANG,0,2,0,38,0,100,0,5,3,0,0,1,1,4000,0,0,0,0,12,1,0,0,0,0,0,0, 'High Overlord Saurfang - On data 0 3 set - Say line'), +(@SAURFANG,0,3,0,52,0,100,0,1,@SAURFANG,0,0,66,0,0,0,0,0,0,19,@VARIDUS,10,0,0,0,0,0, 'High Overlord Saurfang - On text 1 over - Turn to'), +(@SAURFANG,0,4,0,38,0,100,0,5,4,0,0,1,2,5000,0,0,0,0,1,0,0,0,0,0,0,0, 'High Overlord Saurfang - On data 0 4 set - Say line'), +(@SAURFANG,0,5,0,52,0,100,0,2,@SAURFANG,0,0,1,3,12000,0,0,0,0,1,0,0,0,0,0,0,0, 'High Overlord Saurfang - On text 2 over - Say line'), +(@SAURFANG,0,6,0,52,0,100,0,3,@SAURFANG,0,0,1,4,0,0,0,0,0,1,0,0,0,0,0,0,0, 'High Overlord Saurfang - On text 3 over - Say line'), +(@SAURFANG,0,7,8,38,0,100,0,1,1,0,0,19,256,0,0,0,0,0,1,0,0,0,0,0,0,0, 'High Overlord Saurfang - On data 1 1 set - Remove unit_flags IMMUNE_TO_NPC'), +(@SAURFANG,0,8,9,61,0,100,0,0,0,0,0,11,45950,0,0,0,0,0,1,0,0,0,0,0,0,0, 'High Overlord Saurfang - On data 1 1 set - Spellcast Saurfang''s Rage'), +(@SAURFANG,0,9,0,61,0,100,0,0,0,0,0,1,5,1000,0,0,0,0,1,0,0,0,0,0,0,0, 'High Overlord Saurfang - On data 1 1 set - Say line'), +(@SAURFANG,0,10,0,52,0,100,0,5,@SAURFANG,0,0,1,6,1000,0,0,0,0,1,0,0,0,0,0,0,0, 'High Overlord Saurfang - On text 5 over - Say line'), +(@SAURFANG,0,11,0,61,0,100,0,0,0,0,0,41,3000,0,0,0,0,0,1,0,0,0,0,0,0,0, 'High Overlord Saurfang - On text 7 over - Despawn after 3 seconds'), +(@SAURFANG,0,12,0,9,0,100,0,0,5,20000,25000,11,41097,0,0,0,0,0,1,0,0,0,0,0,0,0, 'High Overlord Saurfang - On target within 5y - Spellcast Whirlwind'), +(@SAURFANG,0,13,0,0,0,100,0,3000,7000,3000,8000,11,16044,0,0,0,0,0,1,0,0,0,0,0,0,0, 'High Overlord Saurfang - On update IC - Spellcast Cleave'), +(@SAURFANG,0,14,0,0,0,100,0,2000,7000,5000,7000,11,24573,0,0,0,0,0,2,0,0,0,0,0,0,0, 'High Overlord Saurfang - On update IC - Spellcast Mortal Strike'), +(@SAURFANG,0,15,0,9,0,100,0,8,25,5000,5000,11,15749,0,0,0,0,0,2,0,0,0,0,0,0,0, 'High Overlord Saurfang - On target within 8-25y - Spellcast Shield Charge'), +(@SAURFANG,0,16,0,38,0,100,0,5,5,0,0,66,0,0,0,0,0,0,12,1,0,0,0,0,0,0, 'High Overlord Saurfang - On data 0 5 set - Turn to'), +(@SAURFANG,0,17,0,38,0,100,0,1,2,0,0,1,7,3000,0,0,0,0,1,0,0,0,0,0,0,0, 'High Overlord Saurfang - On data 1 2 set - Say line'), +(@SAURFANG,0,18,11,52,0,100,0,7,@SAURFANG,0,0,45,1,4,0,0,0,0,19,@GETRY,20,0,0,0,0,0, 'High Overlord Saurfang - On text 7 over - Set data 1 4 Shadowstalker Getry'), +(@SAURFANG,0,19,0,38,0,100,0,2,2,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'High Overlord Saurfang - On data 2 2 set - Despawn'), +(@VARIDUS*100,9,0,0,0,0,100,0,0,0,0,0,45,5,5,0,0,0,0,19,@NECROLORD,10,0,0,0,0,0, 'Varidus the Flenser script - Set data 0 5 En''kilah Necrolord'), +(@VARIDUS*100,9,1,0,0,0,100,0,0,0,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Varidus the Flenser script - Say line'), +(@VARIDUS*100,9,2,0,0,0,100,0,5000,5000,0,0,1,3,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Varidus the Flenser script - Say line'), +(@VARIDUS*100,9,3,0,0,0,100,0,3000,3000,0,0,1,4,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Varidus the Flenser script - Say line'), +(@VARIDUS*100,9,4,0,0,0,100,0,4000,4000,0,0,1,5,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Varidus the Flenser script - Say line'), +(@VARIDUS*100,9,5,0,0,0,100,0,6000,6000,0,0,66,0,0,0,0,0,0,19,@NECROLORD,10,0,0,0,0,0, 'Varidus the Flenser script - Turn to'), +(@VARIDUS*100,9,6,0,0,0,100,0,1000,1000,0,0,1,6,0,0,0,0,0,12,1,0,0,0,0,0,0, 'Varidus the Flenser script - Say line'), +(@VARIDUS*100,9,7,0,0,0,100,0,6000,6000,0,0,45,5,1,0,0,0,0,19,@NECROLORD,10,0,0,0,0,0, 'Varidus the Flenser script - Set data 0 1 En''kilah Necrolord'), +(@VARIDUS*100,9,8,0,0,0,100,0,1000,1000,0,0,45,5,2,0,0,0,0,19,@SAURFANG,10,0,0,0,0,0, 'Varidus the Flenser script - Set data 0 2 High Overlord Saurfang'), +(@VARIDUS*100,9,9,0,0,0,100,0,1500,1500,0,0,1,7,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Varidus the Flenser script - Say line'), +(@VARIDUS*100,9,10,0,0,0,100,0,2000,2000,0,0,45,5,3,0,0,0,0,19,@SAURFANG,10,0,0,0,0,0, 'Varidus the Flenser script - Set data 0 3 High Overlord Saurfang'), +(@VARIDUS*100,9,11,0,0,0,100,0,5000,5000,0,0,45,5,4,0,0,0,0,19,@SAURFANG,10,0,0,0,0,0, 'Varidus the Flenser script - Set data 0 4 High Overlord Saurfang'), +(@VARIDUS*100,9,12,0,0,0,100,0,13000,13000,0,0,1,8,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Varidus the Flenser script - Say line'), +(@VARIDUS*100,9,13,0,0,0,100,0,10000,10000,0,0,1,9,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Varidus the Flenser script - Say line'), +(@VARIDUS*100,9,14,0,0,0,100,0,2000,2000,0,0,1,10,2000,0,0,0,0,1,0,0,0,0,0,0,0, 'Varidus the Flenser - On text 9 over - Say line'), +(@VARIDUS*100,9,15,0,0,0,100,0,0,0,0,0,11,45949,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Varidus the Flenser script - Spellcast Release Aberration'), +(@VARIDUS*100,9,16,0,0,0,100,0,0,0,0,0,45,1,1,0,0,0,0,19,@GETRY,20,0,0,0,0,0, 'Varidus the Flenser script - Set data 1 1 Shadowstalker Getry'), +(@VARIDUS*100,9,17,0,0,0,100,0,0,0,0,0,45,1,1,0,0,0,0,19,@SAURFANG,20,0,0,0,0,0, 'Varidus the Flenser script - Set data 1 1 Saurfang'); diff --git a/sql/updates/world/2014_11_22_00_world.sql b/sql/updates/world/2014_11_22_00_world.sql new file mode 100644 index 00000000000..0fa71070aef --- /dev/null +++ b/sql/updates/world/2014_11_22_00_world.sql @@ -0,0 +1,42 @@ +SET @QUEST := 11705; +SET @VARIDUS := 25618; +SET @GETRY := 25729; +SET @NECROLORD := 25730; +SET @SAURFANG := 25751; + +DELETE FROM `smart_scripts` WHERE `entryorguid` =@GETRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(@GETRY,0,0,1,19,0,100,0,@QUEST,0,0,0,64,1,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Shadowstalker Getry - On quest accept - Store targetlist'), +(@GETRY,0,1,2,61,0,100,0,0,0,0,0,81,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Shadowstalker Getry - On quest accept - Remove npcflag questgiver'), +(@GETRY,0,2,3,61,0,100,0,0,0,0,0,1,0,3000,0,0,0,0,1,0,0,0,0,0,0,0, 'Shadowstalker Getry - On quest accept - Say line'), +(@GETRY,0,3,4,61,0,100,0,0,0,0,0,11,45924,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Shadowstalker Getry - On quest accept - Spellcast On Getry''s Quest'), +(@GETRY,0,4,5,61,0,100,0,0,0,0,0,11,45924,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Shadowstalker Getry - On quest accept - Spellcast On Getry''s Quest'), +(@GETRY,0,5,0,61,0,100,0,0,0,0,0,45,0,1,0,0,0,0,19,@VARIDUS,50,0,0,0,0,0, 'Shadowstalker Getry - On quest accept - Set data 0 1 Varidus the Flenser'), +(@GETRY,0,6,7,52,0,100,0,0,@GETRY,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Shadowstalker Getry - On text 0 over - Say line'), +(@GETRY,0,7,0,61,0,100,0,0,0,0,0,53,0,@GETRY,0,0,0,0,1,0,0,0,0,0,0,0, 'Shadowstalker Getry - On text 0 over - Start WP'), +(@GETRY,0,8,0,11,0,100,0,0,0,0,0,81,2,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Shadowstalker Getry - On spawn - Set npcflag questgiver'), +(@GETRY,0,9,0,40,0,100,0,8,@GETRY,0,0,11,34189,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Shadowstalker Getry - On WP8 reached - Spellcast Stealth'), +(@GETRY,0,10,11,40,0,100,0,9,@GETRY,0,0,45,0,2,0,0,0,0,19,@VARIDUS,30,0,0,0,0,0, 'Shadowstalker Getry - On WP 9 reached - Set data 0 2 Varidus the Flenser'), +(@GETRY,0,11,0,61,0,100,0,0,0,0,0,100,1,0,0,0,0,0,19,@VARIDUS,30,0,0,0,0,0, 'Shadowstalker Getry - On WP10 reached - Send targetlist to Varidus the Flenser'), +(@GETRY,0,12,13,40,0,100,0,10,@GETRY,0,0,66,0,0,0,0,0,0,19,@VARIDUS,20,0,0,0,0,0, 'Shadowstalker Getry - On WP10 reached - Turn to'), +(@GETRY,0,13,14,61,0,100,0,0,0,0,0,101,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Shadowstalker Getry - On WP10 reached - Set home position'), +(@GETRY,0,14,15,61,0,100,0,0,0,0,0,28,34189,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Shadowstalker Getry - On WP10 reached - Remove aura Stealth'), +(@GETRY,0,15,16,61,0,100,0,0,0,0,0,11,45922,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Shadowstalker Getry - On WP10 reached - Spellcast Shadow Prison'), +(@GETRY,0,16,17,61,0,100,0,0,0,0,0,86,45922,0,12,1,0,0,12,1,0,0,0,0,0,0, 'Shadowstalker Getry - On WP10 reached - Crosscast Shadow Prison'), +(@GETRY,0,17,0,61,0,100,0,0,0,0,0,45,0,3,0,0,0,0,19,@VARIDUS,20,0,0,0,0,0, 'Shadowstalker Getry - On WP10 reached - Set Data 0 3 Varidus the Flenser'), +(@GETRY,0,18,19,38,0,100,0,1,1,0,0,19,768,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Shadowstalker Getry - On data 1 1 set - Remove unit_flags IMMUNE_TO_PC, IMMUNE_TO_NPC'), +(@GETRY,0,19,0,61,0,100,0,0,0,0,0,49,0,0,0,0,0,0,19,@VARIDUS,20,0,0,0,0,0, 'Shadowstalker Getry - On data 1 1 set - Start attack'), +(@GETRY,0,20,21,38,0,100,0,1,3,0,0,15,@QUEST,0,0,0,0,0,12,1,0,0,0,0,0,0, 'Shadowstalker Getry - On data 1 3 set - Quest credit'), +(@GETRY,0,21,0,61,0,100,0,0,0,0,0,1,2,5000,0,0,0,0,1,0,0,0,0,0,0,0, 'Shadowstalker Getry - On data 1 3 set - Say line'), +(@GETRY,0,22,0,52,0,100,0,2,@GETRY,0,0,1,3,5000,0,0,0,0,1,0,0,0,0,0,0,0, 'Shadowstalker Getry - On text 2 over - Say line'), +(@GETRY,0,23,0,52,0,100,0,3,@GETRY,0,0,45,1,2,0,0,0,0,19,@SAURFANG,20,0,0,0,0,0, 'Shadowstalker Getry - On text 3 over - Set data 1 2 High Overlord Saurfang'), +(@GETRY,0,24,0,38,0,100,0,1,4,0,0,53,0,@GETRY*100,0,0,0,0,1,0,0,0,0,0,0,0, 'Shadowstalker Getry - On data 1 4 set - Start WP movement'), +(@GETRY,0,26,27,40,0,100,0,10,@GETRY*100,0,0,81,2,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Shadowstalker Getry - On WP10 reached (Return) - Set npcflag questgiver'), +(@GETRY,0,27,28,61,0,100,0,0,0,0,0,18,768,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Shadowstalker Getry - On WP10 reached (Return) - Set unit_flags IMMUNE_TO_PC, IMMUNE_TO_NPC'), +(@GETRY,0,28,0,61,0,100,0,0,0,0,0,101,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Shadowstalker Getry - On WP10 reached (Return) - Set homeposition'), +(@GETRY,0,29,30,8,0,100,0,45950,0,0,0,28,45922,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Shadowstalker Getry - On spellhit Saurfangs Rage - Remove aura Shadow Prison'), +(@GETRY,0,30,0,61,0,100,0,0,0,0,0,28,45922,0,0,0,0,0,12,1,0,0,0,0,0,0, 'Shadowstalker Getry - On spellhit Saurfangs Rage - Remove aura Shadow Prison'), +(@GETRY,0,31,32,6,0,100,0,0,0,0,0,6,@QUEST,0,0,0,0,0,12,1,0,0,0,0,0,0, 'Shadowstalker Getry - On Death - Fail Quest'), +(@GETRY,0,32,33,61,0,100,0,0,0,0,0,45,2,2,0,0,0,0,19,@VARIDUS,0,0,0,0,0,0, 'Shadowstalker Getry - On Death - Set Data 2 2 Varidus'), +(@GETRY,0,33,34,61,0,100,0,0,0,0,0,45,2,2,0,0,0,0,19,@NECROLORD,0,0,0,0,0,0, 'Shadowstalker Getry - On Death - Set Data 2 2 Varidus'), +(@GETRY,0,34,0,61,0,100,0,0,0,0,0,45,2,2,0,0,0,0,19,@SAURFANG,0,0,0,0,0,0, 'Shadowstalker Getry - On Death - Set Data 2 2 Varidus'); diff --git a/sql/updates/world/2014_11_23_00_world.sql b/sql/updates/world/2014_11_23_00_world.sql new file mode 100644 index 00000000000..3e1d466583f --- /dev/null +++ b/sql/updates/world/2014_11_23_00_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature_template` SET `unit_class`=4,`speed_walk`=8,`speed_run`=2.85714 WHERE `entry` IN (30161,31752); -- Wyrmrest Skytalon diff --git a/sql/updates/world/2014_11_23_01_world.sql b/sql/updates/world/2014_11_23_01_world.sql new file mode 100644 index 00000000000..193795acf99 --- /dev/null +++ b/sql/updates/world/2014_11_23_01_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE creature_template SET Unit_class = 4 WHERE entry = 30645; diff --git a/sql/updates/world/2014_11_23_02_world.sql b/sql/updates/world/2014_11_23_02_world.sql new file mode 100644 index 00000000000..d5263274bdc --- /dev/null +++ b/sql/updates/world/2014_11_23_02_world.sql @@ -0,0 +1,66 @@ +UPDATE `creature_template` SET `faction`=35,`unit_flags`=0 WHERE `entry` IN +(33562,33559,33558,33564,33561,33382,33383,33384,33306,33285,33739,33738,33747,33743,33740,33746,33748,33744,33745,33749); + +-- Darnassus Champion +UPDATE `creature_template` SET `gossip_menu_id`=10453 WHERE `entry`=33738; +-- Exodar Champion +UPDATE `creature_template` SET `gossip_menu_id`=10454 WHERE `entry`=33739; +-- Gnomeregan Champion +UPDATE `creature_template` SET `gossip_menu_id`=10455 WHERE `entry`=33740; +-- Ironforge Champion +UPDATE `creature_template` SET `gossip_menu_id`=10456 WHERE `entry`=33743; +-- Orgrimmar Champion +UPDATE `creature_template` SET `gossip_menu_id`=10457 WHERE `entry`=33744; +-- Sen'jin Champion +UPDATE `creature_template` SET `gossip_menu_id`=10458 WHERE `entry`=33745; +-- Silvermoon Champion +UPDATE `creature_template` SET `gossip_menu_id`=10459 WHERE `entry`=33746; +-- Stormwind Champion +UPDATE `creature_template` SET `gossip_menu_id`=10460 WHERE `entry`=33747; +-- Thunder Bluff Champion +UPDATE `creature_template` SET `gossip_menu_id`=10461 WHERE `entry`=33748; +-- Undercity Champion +UPDATE `creature_template` SET `gossip_menu_id`=10462 WHERE `entry`=33749; +-- Darnassus Valiant +UPDATE `creature_template` SET `gossip_menu_id`=10464 WHERE `entry`=33559; +-- Exodar Valiant +UPDATE `creature_template` SET `gossip_menu_id`=10465 WHERE `entry`=33562; +-- Gnomeregan Valiant +UPDATE `creature_template` SET `gossip_menu_id`=10466 WHERE `entry`=33558; +-- Ironforge Valiant +UPDATE `creature_template` SET `gossip_menu_id`=10467 WHERE `entry`=33564; +-- Orgrimmar Valiant +UPDATE `creature_template` SET `gossip_menu_id`=10468 WHERE `entry`=33306; +-- Sen'jin Valiant +UPDATE `creature_template` SET `gossip_menu_id`=10469 WHERE `entry`=33285; +-- Silvermoon Valiant +UPDATE `creature_template` SET `gossip_menu_id`=10470 WHERE `entry`=33382; +-- Stormwind Valiant +UPDATE `creature_template` SET `gossip_menu_id`=10471 WHERE `entry`=33561; +-- Thunder Bluff Valiant +UPDATE `creature_template` SET `gossip_menu_id`=10472 WHERE `entry`=33383; +-- Undercity Valiant +UPDATE `creature_template` SET `gossip_menu_id`=10473 WHERE `entry`=33384; + +DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (10453,10454,10455,10456,10457,10458,10459,10460,10461,10462,10464,10465,10466,10467,10468,10469,10470,10471,10472,10473); +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`OptionBroadcastTextID`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`,`BoxBroadcastTextID`) VALUES +(10469, 0, 0, 'I am ready to fight!', 33430, 1, 1, 0, 0, 0, 0, '', 0), +(10468, 0, 0, 'I am ready to fight!', 33430, 1, 1, 0, 0, 0, 0, '', 0), +(10470, 0, 0, 'I am ready to fight!', 33430, 1, 1, 0, 0, 0, 0, '', 0), +(10472, 0, 0, 'I am ready to fight!', 33430, 1, 1, 0, 0, 0, 0, '', 0), +(10473, 0, 0, 'I am ready to fight!', 33430, 1, 1, 0, 0, 0, 0, '', 0), +(10466, 0, 0, 'I am ready to fight!', 33430, 1, 1, 0, 0, 0, 0, '', 0), +(10464, 0, 0, 'I am ready to fight!', 33430, 1, 1, 0, 0, 0, 0, '', 0), +(10471, 0, 0, 'I am ready to fight!', 33430, 1, 1, 0, 0, 0, 0, '', 0), +(10465, 0, 0, 'I am ready to fight!', 33430, 1, 1, 0, 0, 0, 0, '', 0), +(10467, 0, 0, 'I am ready to fight!', 33430, 1, 1, 0, 0, 0, 0, '', 0), +(10453, 0, 0, 'I am ready to fight!', 33430, 1, 1, 0, 0, 0, 0, '', 0), +(10454, 0, 0, 'I am ready to fight!', 33430, 1, 1, 0, 0, 0, 0, '', 0), +(10455, 0, 0, 'I am ready to fight!', 33430, 1, 1, 0, 0, 0, 0, '', 0), +(10456, 0, 0, 'I am ready to fight!', 33430, 1, 1, 0, 0, 0, 0, '', 0), +(10457, 0, 0, 'I am ready to fight!', 33430, 1, 1, 0, 0, 0, 0, '', 0), +(10458, 0, 0, 'I am ready to fight!', 33430, 1, 1, 0, 0, 0, 0, '', 0), +(10459, 0, 0, 'I am ready to fight!', 33430, 1, 1, 0, 0, 0, 0, '', 0), +(10460, 0, 0, 'I am ready to fight!', 33430, 1, 1, 0, 0, 0, 0, '', 0), +(10461, 0, 0, 'I am ready to fight!', 33430, 1, 1, 0, 0, 0, 0, '', 0), +(10462, 0, 0, 'I am ready to fight!', 33430, 1, 1, 0, 0, 0, 0, '', 0); diff --git a/sql/updates/world/2014_11_23_03_world.sql b/sql/updates/world/2014_11_23_03_world.sql new file mode 100644 index 00000000000..f8dbb95dbf7 --- /dev/null +++ b/sql/updates/world/2014_11_23_03_world.sql @@ -0,0 +1,175 @@ +-- Champions +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup` IN (10453,10454,10455,10456,10457,10458,10459,10460,10461,10462); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorType`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(15, 10453, 0, 0, 0, 2, 0, 45500, 4, 1, 1, 0, 0, '', 'Darnassus Champion - Show gossip option only if player does not have 4 Mark of the Champion'), +(15, 10453, 0, 0, 0, 9, 0, 13793, 0, 0, 0, 0, 0, '', 'Darnassus Champion - Show gossip option only if player has taken quest Among the Champions'), +(15, 10453, 0, 0, 0, 1, 0, 63034, 0, 0, 0, 0, 0, '', 'Darnassus Champion - Show gossip option only if player has aura Player On Tournament Mount'), +(15, 10453, 0, 0, 1, 2, 0, 45500, 4, 1, 1, 0, 0, '', 'Darnassus Champion - Show gossip option only if player does not have 4 Mark of the Champion'), +(15, 10453, 0, 0, 1, 9, 0, 13790, 0, 0, 0, 0, 0, '', 'Darnassus Champion - Show gossip option only if player has taken quest Among the Champions'), +(15, 10453, 0, 0, 1, 1, 0, 63034, 0, 0, 0, 0, 0, '', 'Darnassus Champion - Show gossip option only if player has aura Player On Tournament Mount'), +(15, 10453, 0, 0, 2, 2, 0, 45500, 4, 1, 1, 0, 0, '', 'Darnassus Champion - Show gossip option only if player does not have 4 Mark of the Champion'), +(15, 10453, 0, 0, 2, 9, 0, 13814, 0, 0, 0, 0, 0, '', 'Darnassus Champion - Show gossip option only if player has taken quest Among the Champions'), +(15, 10453, 0, 0, 2, 1, 0, 63034, 0, 0, 0, 0, 0, '', 'Darnassus Champion - Show gossip option only if player has aura Player On Tournament Mount'), +(15, 10453, 0, 0, 3, 2, 0, 45500, 4, 1, 1, 0, 0, '', 'Darnassus Champion - Show gossip option only if player does not have 4 Mark of the Champion'), +(15, 10453, 0, 0, 3, 9, 0, 13811, 0, 0, 0, 0, 0, '', 'Darnassus Champion - Show gossip option only if player has taken quest Among the Champions'), +(15, 10453, 0, 0, 3, 1, 0, 63034, 0, 0, 0, 0, 0, '', 'Darnassus Champion - Show gossip option only if player has aura Player On Tournament Mount'), +-- +(15, 10454, 0, 0, 0, 2, 0, 45500, 4, 1, 1, 0, 0, '', 'Exodar Champion - Show gossip option only if player does not have 4 Mark of the Champion'), +(15, 10454, 0, 0, 0, 9, 0, 13793, 0, 0, 0, 0, 0, '', 'Exodar Champion - Show gossip option only if player has taken quest Among the Champions'), +(15, 10454, 0, 0, 0, 1, 0, 63034, 0, 0, 0, 0, 0, '', 'Exodar Champion - Show gossip option only if player has aura Player On Tournament Mount'), +(15, 10454, 0, 0, 1, 2, 0, 45500, 4, 1, 1, 0, 0, '', 'Exodar Champion - Show gossip option only if player does not have 4 Mark of the Champion'), +(15, 10454, 0, 0, 1, 9, 0, 13790, 0, 0, 0, 0, 0, '', 'Exodar Champion - Show gossip option only if player has taken quest Among the Champions'), +(15, 10454, 0, 0, 1, 1, 0, 63034, 0, 0, 0, 0, 0, '', 'Exodar Champion - Show gossip option only if player has aura Player On Tournament Mount'), +(15, 10454, 0, 0, 2, 2, 0, 45500, 4, 1, 1, 0, 0, '', 'Exodar Champion - Show gossip option only if player does not have 4 Mark of the Champion'), +(15, 10454, 0, 0, 2, 9, 0, 13814, 0, 0, 0, 0, 0, '', 'Exodar Champion - Show gossip option only if player has taken quest Among the Champions'), +(15, 10454, 0, 0, 2, 1, 0, 63034, 0, 0, 0, 0, 0, '', 'Exodar Champion - Show gossip option only if player has aura Player On Tournament Mount'), +(15, 10454, 0, 0, 3, 2, 0, 45500, 4, 1, 1, 0, 0, '', 'Exodar Champion - Show gossip option only if player does not have 4 Mark of the Champion'), +(15, 10454, 0, 0, 3, 9, 0, 13811, 0, 0, 0, 0, 0, '', 'Exodar Champion - Show gossip option only if player has taken quest Among the Champions'), +(15, 10454, 0, 0, 3, 1, 0, 63034, 0, 0, 0, 0, 0, '', 'Exodar Champion - Show gossip option only if player has aura Player On Tournament Mount'), +-- +(15, 10455, 0, 0, 0, 2, 0, 45500, 4, 1, 1, 0, 0, '', 'Gnomeregan Champion - Show gossip option only if player does not have 4 Mark of the Champion'), +(15, 10455, 0, 0, 0, 9, 0, 13793, 0, 0, 0, 0, 0, '', 'Gnomeregan Champion - Show gossip option only if player has taken quest Among the Champions'), +(15, 10455, 0, 0, 0, 1, 0, 63034, 0, 0, 0, 0, 0, '', 'Gnomeregan Champion - Show gossip option only if player has aura Player On Tournament Mount'), +(15, 10455, 0, 0, 1, 2, 0, 45500, 4, 1, 1, 0, 0, '', 'Gnomeregan Champion - Show gossip option only if player does not have 4 Mark of the Champion'), +(15, 10455, 0, 0, 1, 9, 0, 13790, 0, 0, 0, 0, 0, '', 'Gnomeregan Champion - Show gossip option only if player has taken quest Among the Champions'), +(15, 10455, 0, 0, 1, 1, 0, 63034, 0, 0, 0, 0, 0, '', 'Gnomeregan Champion - Show gossip option only if player has aura Player On Tournament Mount'), +(15, 10455, 0, 0, 2, 2, 0, 45500, 4, 1, 1, 0, 0, '', 'Gnomeregan Champion - Show gossip option only if player does not have 4 Mark of the Champion'), +(15, 10455, 0, 0, 2, 9, 0, 13814, 0, 0, 0, 0, 0, '', 'Gnomeregan Champion - Show gossip option only if player has taken quest Among the Champions'), +(15, 10455, 0, 0, 2, 1, 0, 63034, 0, 0, 0, 0, 0, '', 'Gnomeregan Champion - Show gossip option only if player has aura Player On Tournament Mount'), +(15, 10455, 0, 0, 3, 2, 0, 45500, 4, 1, 1, 0, 0, '', 'Gnomeregan Champion - Show gossip option only if player does not have 4 Mark of the Champion'), +(15, 10455, 0, 0, 3, 9, 0, 13811, 0, 0, 0, 0, 0, '', 'Gnomeregan Champion - Show gossip option only if player has taken quest Among the Champions'), +(15, 10455, 0, 0, 3, 1, 0, 63034, 0, 0, 0, 0, 0, '', 'Gnomeregan Champion - Show gossip option only if player has aura Player On Tournament Mount'), +-- +(15, 10456, 0, 0, 0, 2, 0, 45500, 4, 1, 1, 0, 0, '', 'Ironforge Champion - Show gossip option only if player does not have 4 Mark of the Champion'), +(15, 10456, 0, 0, 0, 9, 0, 13793, 0, 0, 0, 0, 0, '', 'Ironforge Champion - Show gossip option only if player has taken quest Among the Champions'), +(15, 10456, 0, 0, 0, 1, 0, 63034, 0, 0, 0, 0, 0, '', 'Ironforge Champion - Show gossip option only if player has aura Player On Tournament Mount'), +(15, 10456, 0, 0, 1, 2, 0, 45500, 4, 1, 1, 0, 0, '', 'Ironforge Champion - Show gossip option only if player does not have 4 Mark of the Champion'), +(15, 10456, 0, 0, 1, 9, 0, 13790, 0, 0, 0, 0, 0, '', 'Ironforge Champion - Show gossip option only if player has taken quest Among the Champions'), +(15, 10456, 0, 0, 1, 1, 0, 63034, 0, 0, 0, 0, 0, '', 'Ironforge Champion - Show gossip option only if player has aura Player On Tournament Mount'), +(15, 10456, 0, 0, 2, 2, 0, 45500, 4, 1, 1, 0, 0, '', 'Ironforge Champion - Show gossip option only if player does not have 4 Mark of the Champion'), +(15, 10456, 0, 0, 2, 9, 0, 13814, 0, 0, 0, 0, 0, '', 'Ironforge Champion - Show gossip option only if player has taken quest Among the Champions'), +(15, 10456, 0, 0, 2, 1, 0, 63034, 0, 0, 0, 0, 0, '', 'Ironforge Champion - Show gossip option only if player has aura Player On Tournament Mount'), +(15, 10456, 0, 0, 3, 2, 0, 45500, 4, 1, 1, 0, 0, '', 'Ironforge Champion - Show gossip option only if player does not have 4 Mark of the Champion'), +(15, 10456, 0, 0, 3, 9, 0, 13811, 0, 0, 0, 0, 0, '', 'Ironforge Champion - Show gossip option only if player has taken quest Among the Champions'), +(15, 10456, 0, 0, 3, 1, 0, 63034, 0, 0, 0, 0, 0, '', 'Ironforge Champion - Show gossip option only if player has aura Player On Tournament Mount'), +-- +(15, 10457, 0, 0, 0, 2, 0, 45500, 4, 1, 1, 0, 0, '', 'Orgrimmar Champion - Show gossip option only if player does not have 4 Mark of the Champion'), +(15, 10457, 0, 0, 0, 9, 0, 13793, 0, 0, 0, 0, 0, '', 'Orgrimmar Champion - Show gossip option only if player has taken quest Among the Champions'), +(15, 10457, 0, 0, 0, 1, 0, 63034, 0, 0, 0, 0, 0, '', 'Orgrimmar Champion - Show gossip option only if player has aura Player On Tournament Mount'), +(15, 10457, 0, 0, 1, 2, 0, 45500, 4, 1, 1, 0, 0, '', 'Orgrimmar Champion - Show gossip option only if player does not have 4 Mark of the Champion'), +(15, 10457, 0, 0, 1, 9, 0, 13790, 0, 0, 0, 0, 0, '', 'Orgrimmar Champion - Show gossip option only if player has taken quest Among the Champions'), +(15, 10457, 0, 0, 1, 1, 0, 63034, 0, 0, 0, 0, 0, '', 'Orgrimmar Champion - Show gossip option only if player has aura Player On Tournament Mount'), +(15, 10457, 0, 0, 2, 2, 0, 45500, 4, 1, 1, 0, 0, '', 'Orgrimmar Champion - Show gossip option only if player does not have 4 Mark of the Champion'), +(15, 10457, 0, 0, 2, 9, 0, 13814, 0, 0, 0, 0, 0, '', 'Orgrimmar Champion - Show gossip option only if player has taken quest Among the Champions'), +(15, 10457, 0, 0, 2, 1, 0, 63034, 0, 0, 0, 0, 0, '', 'Orgrimmar Champion - Show gossip option only if player has aura Player On Tournament Mount'), +(15, 10457, 0, 0, 3, 2, 0, 45500, 4, 1, 1, 0, 0, '', 'Orgrimmar Champion - Show gossip option only if player does not have 4 Mark of the Champion'), +(15, 10457, 0, 0, 3, 9, 0, 13811, 0, 0, 0, 0, 0, '', 'Orgrimmar Champion - Show gossip option only if player has taken quest Among the Champions'), +(15, 10457, 0, 0, 3, 1, 0, 63034, 0, 0, 0, 0, 0, '', 'Orgrimmar Champion - Show gossip option only if player has aura Player On Tournament Mount'), +-- +(15, 10458, 0, 0, 0, 2, 0, 45500, 4, 1, 1, 0, 0, '', 'Sen''jin Champion - Show gossip option only if player does not have 4 Mark of the Champion'), +(15, 10458, 0, 0, 0, 9, 0, 13793, 0, 0, 0, 0, 0, '', 'Sen''jin Champion - Show gossip option only if player has taken quest Among the Champions'), +(15, 10458, 0, 0, 0, 1, 0, 63034, 0, 0, 0, 0, 0, '', 'Sen''jin Champion - Show gossip option only if player has aura Player On Tournament Mount'), +(15, 10458, 0, 0, 1, 2, 0, 45500, 4, 1, 1, 0, 0, '', 'Sen''jin Champion - Show gossip option only if player does not have 4 Mark of the Champion'), +(15, 10458, 0, 0, 1, 9, 0, 13790, 0, 0, 0, 0, 0, '', 'Sen''jin Champion - Show gossip option only if player has taken quest Among the Champions'), +(15, 10458, 0, 0, 1, 1, 0, 63034, 0, 0, 0, 0, 0, '', 'Sen''jin Champion - Show gossip option only if player has aura Player On Tournament Mount'), +(15, 10458, 0, 0, 2, 2, 0, 45500, 4, 1, 1, 0, 0, '', 'Sen''jin Champion - Show gossip option only if player does not have 4 Mark of the Champion'), +(15, 10458, 0, 0, 2, 9, 0, 13814, 0, 0, 0, 0, 0, '', 'Sen''jin Champion - Show gossip option only if player has taken quest Among the Champions'), +(15, 10458, 0, 0, 2, 1, 0, 63034, 0, 0, 0, 0, 0, '', 'Sen''jin Champion - Show gossip option only if player has aura Player On Tournament Mount'), +(15, 10458, 0, 0, 3, 2, 0, 45500, 4, 1, 1, 0, 0, '', 'Sen''jin Champion - Show gossip option only if player does not have 4 Mark of the Champion'), +(15, 10458, 0, 0, 3, 9, 0, 13811, 0, 0, 0, 0, 0, '', 'Sen''jin Champion - Show gossip option only if player has taken quest Among the Champions'), +(15, 10458, 0, 0, 3, 1, 0, 63034, 0, 0, 0, 0, 0, '', 'Sen''jin Champion - Show gossip option only if player has aura Player On Tournament Mount'), +-- +(15, 10459, 0, 0, 0, 2, 0, 45500, 4, 1, 1, 0, 0, '', 'Silvermoon Champion - Show gossip option only if player does not have 4 Mark of the Champion'), +(15, 10459, 0, 0, 0, 9, 0, 13793, 0, 0, 0, 0, 0, '', 'Silvermoon Champion - Show gossip option only if player has taken quest Among the Champions'), +(15, 10459, 0, 0, 0, 1, 0, 63034, 0, 0, 0, 0, 0, '', 'Silvermoon Champion - Show gossip option only if player has aura Player On Tournament Mount'), +(15, 10459, 0, 0, 1, 2, 0, 45500, 4, 1, 1, 0, 0, '', 'Silvermoon Champion - Show gossip option only if player does not have 4 Mark of the Champion'), +(15, 10459, 0, 0, 1, 9, 0, 13790, 0, 0, 0, 0, 0, '', 'Silvermoon Champion - Show gossip option only if player has taken quest Among the Champions'), +(15, 10459, 0, 0, 1, 1, 0, 63034, 0, 0, 0, 0, 0, '', 'Silvermoon Champion - Show gossip option only if player has aura Player On Tournament Mount'), +(15, 10459, 0, 0, 2, 2, 0, 45500, 4, 1, 1, 0, 0, '', 'Silvermoon Champion - Show gossip option only if player does not have 4 Mark of the Champion'), +(15, 10459, 0, 0, 2, 9, 0, 13814, 0, 0, 0, 0, 0, '', 'Silvermoon Champion - Show gossip option only if player has taken quest Among the Champions'), +(15, 10459, 0, 0, 2, 1, 0, 63034, 0, 0, 0, 0, 0, '', 'Silvermoon Champion - Show gossip option only if player has aura Player On Tournament Mount'), +(15, 10459, 0, 0, 3, 2, 0, 45500, 4, 1, 1, 0, 0, '', 'Silvermoon Champion - Show gossip option only if player does not have 4 Mark of the Champion'), +(15, 10459, 0, 0, 3, 9, 0, 13811, 0, 0, 0, 0, 0, '', 'Silvermoon Champion - Show gossip option only if player has taken quest Among the Champions'), +(15, 10459, 0, 0, 3, 1, 0, 63034, 0, 0, 0, 0, 0, '', 'Silvermoon Champion - Show gossip option only if player has aura Player On Tournament Mount'), +-- +(15, 10460, 0, 0, 0, 2, 0, 45500, 4, 1, 1, 0, 0, '', 'Stormwind Champion - Show gossip option only if player does not have 4 Mark of the Champion'), +(15, 10460, 0, 0, 0, 9, 0, 13793, 0, 0, 0, 0, 0, '', 'Stormwind Champion - Show gossip option only if player has taken quest Among the Champions'), +(15, 10460, 0, 0, 0, 1, 0, 63034, 0, 0, 0, 0, 0, '', 'Stormwind Champion - Show gossip option only if player has aura Player On Tournament Mount'), +(15, 10460, 0, 0, 1, 2, 0, 45500, 4, 1, 1, 0, 0, '', 'Stormwind Champion - Show gossip option only if player does not have 4 Mark of the Champion'), +(15, 10460, 0, 0, 1, 9, 0, 13790, 0, 0, 0, 0, 0, '', 'Stormwind Champion - Show gossip option only if player has taken quest Among the Champions'), +(15, 10460, 0, 0, 1, 1, 0, 63034, 0, 0, 0, 0, 0, '', 'Stormwind Champion - Show gossip option only if player has aura Player On Tournament Mount'), +(15, 10460, 0, 0, 2, 2, 0, 45500, 4, 1, 1, 0, 0, '', 'Stormwind Champion - Show gossip option only if player does not have 4 Mark of the Champion'), +(15, 10460, 0, 0, 2, 9, 0, 13814, 0, 0, 0, 0, 0, '', 'Stormwind Champion - Show gossip option only if player has taken quest Among the Champions'), +(15, 10460, 0, 0, 2, 1, 0, 63034, 0, 0, 0, 0, 0, '', 'Stormwind Champion - Show gossip option only if player has aura Player On Tournament Mount'), +(15, 10460, 0, 0, 3, 2, 0, 45500, 4, 1, 1, 0, 0, '', 'Stormwind Champion - Show gossip option only if player does not have 4 Mark of the Champion'), +(15, 10460, 0, 0, 3, 9, 0, 13811, 0, 0, 0, 0, 0, '', 'Stormwind Champion - Show gossip option only if player has taken quest Among the Champions'), +(15, 10460, 0, 0, 3, 1, 0, 63034, 0, 0, 0, 0, 0, '', 'Stormwind Champion - Show gossip option only if player has aura Player On Tournament Mount'), +-- +(15, 10461, 0, 0, 0, 2, 0, 45500, 4, 1, 1, 0, 0, '', 'Thunder Bluff Champion - Show gossip option only if player does not have 4 Mark of the Champion'), +(15, 10461, 0, 0, 0, 9, 0, 13793, 0, 0, 0, 0, 0, '', 'Thunder Bluff Champion - Show gossip option only if player has taken quest Among the Champions'), +(15, 10461, 0, 0, 0, 1, 0, 63034, 0, 0, 0, 0, 0, '', 'Thunder Bluff Champion - Show gossip option only if player has aura Player On Tournament Mount'), +(15, 10461, 0, 0, 1, 2, 0, 45500, 4, 1, 1, 0, 0, '', 'Thunder Bluff Champion - Show gossip option only if player does not have 4 Mark of the Champion'), +(15, 10461, 0, 0, 1, 9, 0, 13790, 0, 0, 0, 0, 0, '', 'Thunder Bluff Champion - Show gossip option only if player has taken quest Among the Champions'), +(15, 10461, 0, 0, 1, 1, 0, 63034, 0, 0, 0, 0, 0, '', 'Thunder Bluff Champion - Show gossip option only if player has aura Player On Tournament Mount'), +(15, 10461, 0, 0, 2, 2, 0, 45500, 4, 1, 1, 0, 0, '', 'Thunder Bluff Champion - Show gossip option only if player does not have 4 Mark of the Champion'), +(15, 10461, 0, 0, 2, 9, 0, 13814, 0, 0, 0, 0, 0, '', 'Thunder Bluff Champion - Show gossip option only if player has taken quest Among the Champions'), +(15, 10461, 0, 0, 2, 1, 0, 63034, 0, 0, 0, 0, 0, '', 'Thunder Bluff Champion - Show gossip option only if player has aura Player On Tournament Mount'), +(15, 10461, 0, 0, 3, 2, 0, 45500, 4, 1, 1, 0, 0, '', 'Thunder Bluff Champion - Show gossip option only if player does not have 4 Mark of the Champion'), +(15, 10461, 0, 0, 3, 9, 0, 13811, 0, 0, 0, 0, 0, '', 'Thunder Bluff Champion - Show gossip option only if player has taken quest Among the Champions'), +(15, 10461, 0, 0, 3, 1, 0, 63034, 0, 0, 0, 0, 0, '', 'Thunder Bluff Champion - Show gossip option only if player has aura Player On Tournament Mount'), +-- +(15, 10462, 0, 0, 0, 2, 0, 45500, 4, 1, 1, 0, 0, '', 'Undercity Champion - Show gossip option only if player does not have 4 Mark of the Champion'), +(15, 10462, 0, 0, 0, 9, 0, 13793, 0, 0, 0, 0, 0, '', 'Undercity Champion - Show gossip option only if player has taken quest Among the Champions'), +(15, 10462, 0, 0, 0, 1, 0, 63034, 0, 0, 0, 0, 0, '', 'Undercity Champion - Show gossip option only if player has aura Player On Tournament Mount'), +(15, 10462, 0, 0, 1, 2, 0, 45500, 4, 1, 1, 0, 0, '', 'Undercity Champion - Show gossip option only if player does not have 4 Mark of the Champion'), +(15, 10462, 0, 0, 1, 9, 0, 13790, 0, 0, 0, 0, 0, '', 'Undercity Champion - Show gossip option only if player has taken quest Among the Champions'), +(15, 10462, 0, 0, 1, 1, 0, 63034, 0, 0, 0, 0, 0, '', 'Undercity Champion - Show gossip option only if player has aura Player On Tournament Mount'), +(15, 10462, 0, 0, 2, 2, 0, 45500, 4, 1, 1, 0, 0, '', 'Undercity Champion - Show gossip option only if player does not have 4 Mark of the Champion'), +(15, 10462, 0, 0, 2, 9, 0, 13814, 0, 0, 0, 0, 0, '', 'Undercity Champion - Show gossip option only if player has taken quest Among the Champions'), +(15, 10462, 0, 0, 2, 1, 0, 63034, 0, 0, 0, 0, 0, '', 'Undercity Champion - Show gossip option only if player has aura Player On Tournament Mount'), +(15, 10462, 0, 0, 3, 2, 0, 45500, 4, 1, 1, 0, 0, '', 'Undercity Champion - Show gossip option only if player does not have 4 Mark of the Champion'), +(15, 10462, 0, 0, 3, 9, 0, 13811, 0, 0, 0, 0, 0, '', 'Undercity Champion - Show gossip option only if player has taken quest Among the Champions'), +(15, 10462, 0, 0, 3, 1, 0, 63034, 0, 0, 0, 0, 0, '', 'Undercity Champion - Show gossip option only if player has aura Player On Tournament Mount'); + +-- Valiants +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup` IN (10464,10465,10466,10467,10468,10469,10470,10471,10472,10473); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorType`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(15, 10464, 0, 0, 0, 2, 0, 45127, 3, 1, 1, 0, 0, '', 'Darnassus Valiant - Show gossip option only if player does not have 4 Mark of the Valiant'), +(15, 10464, 0, 0, 0, 9, 0, 13761, 0, 0, 0, 0, 0, '', 'Darnassus Valiant - Show gossip option only if player has taken quest The Grand Melee'), +(15, 10464, 0, 0, 0, 1, 0, 63034, 0, 0, 0, 0, 0, '', 'Darnassus Valiant - Show gossip option only if player has aura Player On Tournament Mount'), +-- +(15, 10465, 0, 0, 0, 2, 0, 45127, 3, 1, 1, 0, 0, '', 'Exodar Valiant - Show gossip option only if player does not have 4 Mark of the Valiant'), +(15, 10465, 0, 0, 0, 9, 0, 13756, 0, 0, 0, 0, 0, '', 'Exodar Valiant - Show gossip option only if player has taken quest The Grand Melee'), +(15, 10465, 0, 0, 0, 1, 0, 63034, 0, 0, 0, 0, 0, '', 'Exodar Valiant - Show gossip option only if player has aura Player On Tournament Mount'), +-- +(15, 10466, 0, 0, 0, 2, 0, 45127, 3, 1, 1, 0, 0, '', 'Gnomeregan Valiant - Show gossip option only if player does not have 4 Mark of the Valiant'), +(15, 10466, 0, 0, 0, 9, 0, 13750, 0, 0, 0, 0, 0, '', 'Gnomeregan Valiant - Show gossip option only if player has taken quest The Grand Melee'), +(15, 10466, 0, 0, 0, 1, 0, 63034, 0, 0, 0, 0, 0, '', 'Gnomeregan Valiant - Show gossip option only if player has aura Player On Tournament Mount'), +-- +(15, 10467, 0, 0, 0, 2, 0, 45127, 3, 1, 1, 0, 0, '', 'Ironforge Valiant - Show gossip option only if player does not have 4 Mark of the Valiant'), +(15, 10467, 0, 0, 0, 9, 0, 13745, 0, 0, 0, 0, 0, '', 'Ironforge Valiant - Show gossip option only if player has taken quest The Grand Melee'), +(15, 10467, 0, 0, 0, 1, 0, 63034, 0, 0, 0, 0, 0, '', 'Ironforge Valiant - Show gossip option only if player has aura Player On Tournament Mount'), +-- +(15, 10468, 0, 0, 0, 2, 0, 45127, 3, 1, 1, 0, 0, '', 'Orgrimmar Valiant - Show gossip option only if player does not have 4 Mark of the Valiant'), +(15, 10468, 0, 0, 0, 9, 0, 13767, 0, 0, 0, 0, 0, '', 'Orgrimmar Valiant - Show gossip option only if player has taken quest The Grand Melee'), +(15, 10468, 0, 0, 0, 1, 0, 63034, 0, 0, 0, 0, 0, '', 'Orgrimmar Valiant - Show gossip option only if player has aura Player On Tournament Mount'), +-- +(15, 10469, 0, 0, 0, 2, 0, 45127, 3, 1, 1, 0, 0, '', 'Sen''jin Valiant - Show gossip option only if player does not have 4 Mark of the Valiant'), +(15, 10469, 0, 0, 0, 9, 0, 13772, 0, 0, 0, 0, 0, '', 'Sen''jin Valiant - Show gossip option only if player has taken quest The Grand Melee'), +(15, 10469, 0, 0, 0, 1, 0, 63034, 0, 0, 0, 0, 0, '', 'Sen''jin Valiant - Show gossip option only if player has aura Player On Tournament Mount'), +-- +(15, 10470, 0, 0, 0, 2, 0, 45127, 3, 1, 1, 0, 0, '', 'Silvermoon Valiant - Show gossip option only if player does not have 4 Mark of the Valiant'), +(15, 10470, 0, 0, 0, 9, 0, 13787, 0, 0, 0, 0, 0, '', 'Silvermoon Valiant - Show gossip option only if player has taken quest The Grand Melee'), +(15, 10470, 0, 0, 0, 1, 0, 63034, 0, 0, 0, 0, 0, '', 'Silvermoon Valiant - Show gossip option only if player has aura Player On Tournament Mount'), +-- +(15, 10471, 0, 0, 0, 2, 0, 45127, 3, 1, 1, 0, 0, '', 'Stormwind Valiant - Show gossip option only if player does not have 4 Mark of the Valiant'), +(15, 10471, 0, 0, 0, 9, 0, 13665, 0, 0, 0, 0, 0, '', 'Stormwind Valiant - Show gossip option only if player has taken quest The Grand Melee'), +(15, 10471, 0, 0, 0, 1, 0, 63034, 0, 0, 0, 0, 0, '', 'Stormwind Valiant - Show gossip option only if player has aura Player On Tournament Mount'), +-- +(15, 10472, 0, 0, 0, 2, 0, 45127, 3, 1, 1, 0, 0, '', 'Thunder Bluff Valiant - Show gossip option only if player does not have 4 Mark of the Valiant'), +(15, 10472, 0, 0, 0, 9, 0, 13777, 0, 0, 0, 0, 0, '', 'Thunder Bluff Valiant - Show gossip option only if player has taken quest The Grand Melee'), +(15, 10472, 0, 0, 0, 1, 0, 63034, 0, 0, 0, 0, 0, '', 'Thunder Bluff Valiant - Show gossip option only if player has aura Player On Tournament Mount'), +-- +(15, 10473, 0, 0, 0, 2, 0, 45127, 3, 1, 1, 0, 0, '', 'Undercity Valiant - Show gossip option only if player does not have 4 Mark of the Valiant'), +(15, 10473, 0, 0, 0, 9, 0, 13782, 0, 0, 0, 0, 0, '', 'Undercity Valiant - Show gossip option only if player has taken quest The Grand Melee'), +(15, 10473, 0, 0, 0, 1, 0, 63034, 0, 0, 0, 0, 0, '', 'Undercity Valiant - Show gossip option only if player has aura Player On Tournament Mount'); diff --git a/sql/updates/world/2014_11_23_04_world.sql b/sql/updates/world/2014_11_23_04_world.sql new file mode 100644 index 00000000000..6dc657b39e9 --- /dev/null +++ b/sql/updates/world/2014_11_23_04_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `conditions` SET `conditionValue1` = 11 WHERE `SourceGroup` = 10389 AND `SourceEntry` = 15 AND `SourceTypeOrReferenceId` = 15; diff --git a/sql/updates/world/2014_11_24_00_world.sql b/sql/updates/world/2014_11_24_00_world.sql new file mode 100644 index 00000000000..0c6d5735165 --- /dev/null +++ b/sql/updates/world/2014_11_24_00_world.sql @@ -0,0 +1,15 @@ +-- Achievement: Now Were Cookin +DELETE FROM `achievement_criteria_data` WHERE `criteria_id` IN (11118,11119,11120,11121,11122,11123,11124,11125,11126,11127); +INSERT INTO `achievement_criteria_data` (`criteria_id`, `type`, `value1`, `value2`) VALUES +-- Alliance +(11118, 16, 404, 0), -- Now Were Cookin / Cranberry Chutney +(11119, 16, 404, 0), -- Now Were Cookin / Candied Sweet Potato +(11120, 16, 404, 0), -- Now Were Cookin / Pumpkin Pie +(11121, 16, 404, 0), -- Now Were Cookin / Slow-Roasted Turkey +(11122, 16, 404, 0), -- Now Were Cookin / Spice Bread Stuffing +-- Horde +(11123, 16, 404, 0), -- Now Were Cookin / Candied Sweet Potato +(11124, 16, 404, 0), -- Now Were Cookin / Cranberry Chutney +(11125, 16, 404, 0), -- Now Were Cookin / Pumpkin Pie +(11126, 16, 404, 0), -- Now Were Cookin / Slow-Roasted Turkey +(11127, 16, 404, 0); -- Now Were Cookin / Spice Bread Stuffing diff --git a/sql/updates/world/2014_11_24_01_world.sql b/sql/updates/world/2014_11_24_01_world.sql new file mode 100644 index 00000000000..77f8ca71f5e --- /dev/null +++ b/sql/updates/world/2014_11_24_01_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature_template` SET `InhabitType`=4 WHERE `entry`=20899; diff --git a/sql/updates/world/2014_11_24_02_world.sql b/sql/updates/world/2014_11_24_02_world.sql new file mode 100644 index 00000000000..97e5a9abaa4 --- /dev/null +++ b/sql/updates/world/2014_11_24_02_world.sql @@ -0,0 +1,113 @@ +SET @CGUID := 74539; + +UPDATE `creature_template` SET `ainame`='SmartAI' WHERE `entry`IN(25335,25336,25338,25359); + +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (25335,25336,25338,25359) AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (2533500,2533501,2533600) AND `source_type`=9; + +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(25335,0,0,1,19,0,100,0,11592,0,0,0,64,1,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Longrunner Proudhoof - On Quest Accept (We Strike!) - Store Targetlist'), +(25335,0,1,0,61,0,100,0,0,0,0,0,80,2533500,2,0,0,0,0,1,0,0,0,0,0,0,0, 'Longrunner Proudhoof - On Quest Accept (We Strike!) - Run Script'), +(25335,0,2,3,6,0,100,0,0,0,0,0,6,11592,0,0,0,0,0,12,1,0,0,0,0,0,0, 'Longrunner Proudhoof - On Death - Fail Quest (We Strike)'), +(25335,0,3,4,61,0,100,0,0,0,0,0,45,3,3,0,0,0,0,19,25336,0,0,0,0,0,0, 'Longrunner Proudhoof - On Death - Set Data to Grunt Ragefist'), +(25335,0,4,0,61,0,100,0,0,0,0,0,45,3,3,0,0,0,0,9,25338,0,200,0,0,0,0, 'Longrunner Proudhoof - On Death - Set Data to Warsong Caravan Guard'), +(25335,0,5,0,40,0,100,0,0,0,0,0,101,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Longrunner Proudhoof - On Reached WP - Set Home Position'), +(25335,0,6,7,61,0,100,0,0,0,0,0,45,4,4,0,0,0,0,19,25336,0,0,0,0,0,0, 'Longrunner Proudhoof - On Reached WP - Set Data to Grunt Ragefist'), +(25335,0,7,0,61,0,100,0,0,0,0,0,45,4,4,0,0,0,0,9,25338,0,200,0,0,0,0, 'Longrunner Proudhoof - On Reached WP - Set Data to Warsong Caravan Guard'), +(25335,0,8,9,40,0,100,1,9,0,0,0,54,5000,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Longrunner Proudhoof - On Reached WP9 - Pause WP for 5 Seconds'), +(25335,0,9,0,61,0,100,0,0,0,0,0,1,2,0,0,0,0,0,12,1,0,0,0,0,0,0, 'Longrunner Proudhoof - On Reached WP9 - Say Line 2'), +(25335,0,10,0,61,0,100,0,9,0,0,0,107,1,1,0,0,0,0,1,0,0,0,0,0,0,0, 'Longrunner Proudhoof - On Reached WP9 - Summon Group 1'), +(25335,0,11,0,40,0,100,1,10,0,0,0,1,3,0,0,0,0,0,12,1,0,0,0,0,0,0, 'Longrunner Proudhoof - On Reached WP10 - Say Line 3'), +(25335,0,12,13,40,0,100,1,13,0,0,0,1,4,0,0,0,0,0,12,1,0,0,0,0,0,0, 'Longrunner Proudhoof - On Reached WP13 - Say Line 4'), +(25335,0,13,14,61,0,100,0,0,0,0,0,101,0,0,0,0,0,0,1,0,0,0,0, 0, 0,0, 'Longrunner Proudhoof - On Reached WP13 - Set Home Position'), +(25335,0,14,0,61,0,100,0,0,0,0,0,12,25359,1,100000,0,0,0,8,0,0,0,3879.794, 5719.112, 66.50308,1.048136, 'Longrunner Proudhoof - On Reached WP13 - Summon '), +(25335,0,15,0,38,0,100,0,5,5,0,0,80,2533501,2,0,0,0,0,1,0,0,0,0,0,0,0, 'Longrunner Proudhoof - On Data Set 5 5 - Run Script 2'), +(25335,0,16,0,11,0,100,0,0,0,0,0,78,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Longrunner Proudhoof - On Respawn - Reset Scripts '), +(25336,0,0,0,38,0,100,0,1,1,0,0,80,2533600,2,0,0,0,0,1,0,0,0,0,0,0,0, 'Grunt Ragefist - On Data Set 1 1 - Run Script'), +(25336,0,1,2,38,0,100,0,2,2,0,0,59,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Grunt Ragefist - On Data Set 2 2 - Set Run on'), +(25336,0,2,0,61,0,100,0,0,0,0,0,29,2,3,0,0,0,0,19,25335,0,0,0,0,0,0, 'Grunt Ragefist - On Data Set 2 2 - Follow Longrunner Proudhoof'), +(25336,0,3,0,38,0,100,0,3,3,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Grunt Ragefist - On Data Set 3 3 - Despawn'), +(25336,0,4,0,38,0,100,0,4,4,0,0,101,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Grunt Ragefist - On Data Set 4 4 - Set Home Position'), +(25336,0,5,0,1,0,100,0,0,0,2000,2000,101,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Grunt Ragefist - OOC - Set Home Position'), +(25338,0,0,1,38,0,100,0,1,1,0,0,2,232,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Warsong Caravan Guard - On Data Set 1 1 - Set Faction'), +(25338,0,1,2,61,0,100,0,0,0,0,0,8,2,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Warsong Caravan Guard - On Data Set 1 1 - Set Hostile'), +(25338,0,2,0,61,0,100,0,0,0,0,0,102,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Warsong Caravan Guard - On Data Set 1 1 - Switch HP Regen off'), +(25338,0,3,4,38,0,100,0,2,2,0,0,59,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Warsong Caravan Guard - On Data Set 2 2 - Set Run on'), +(25338,0,4,0,61,0,100,0,0,0,0,0,29,1,2,0,0,0,0,19,25335,0,0,0,0,0,0, 'Warsong Caravan Guard - On Data Set 2 2 - Follow Longrunner Proudhoof'), +(25338,0,5,0,38,0,100,0,3,3,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Warsong Caravan Guard - On Data Set 3 3 - Despawn'), +(25338,0,6,0,38,0,100,0,4,4,0,0,101,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Warsong Caravan Guard - On Data Set 4 4 - Set Home Position'), +(25338,0,7,0,1,0,100,0,0,0,2000,2000,101,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Warsong Caravan Guard - OOC - Set Home Position'), + +(25359,0,0,0,54,0,100,0,0,0,0,0,49,0,0,0,0,0,0,19,25335,0,0,0,0,0,0, 'Force-Commander Steeljaw - On Just Summoned - Attack Longrunner Proudhoof'), +(25359,0,1,2,6,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Force-Commander Steeljaw - On Death Say Line 0'), +(25359,0,2,0,6,0,100,0,0,0,0,0,45,5,5,0,0,0,0,19,25335,0,0,0,0,0,0, 'Force-Commander Steeljaw - On Death - Set Data to Longrunner Proudhoof'), +(25359,0,3,0,9,0,100,0,0,5,8000,13000,11,15284,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Force-Commander Steeljaw - On Range - Cast Cleave'), +(25359,0,4,0,0,0,100,0,6000,9000,11000,18000,11,38256,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Force-Commander Steeljaw - IC - Cast Piercing Howl'), +(25359,0,5,0,2,0,100,1,0,50,0,0,11,50204,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Force-Commander Steeljaw - On 20% HP - Cast Steeljaw'), +(25359,0,6,0,0,0,100,0,9000,15000,18000,24000,11,41056,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Force-Commander Steeljaw - IC - Cast Whirlwind'), + +(2533500,9,0,0,0,0,100,0,0,0,0,0,81,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Longrunner Proudhoof - Script - Set NPC Flags'), +(2533500,9,1,0,0,0,100,0,0,0,0,0,45,1,1,0,0,0,0,19,25336,0,0,0,0,0,0, 'Longrunner Proudhoof - Script - Set Data to Grunt Ragefist'), +(2533500,9,2,0,0,0,100,0,0,0,0,0,45,1,1,0,0,0,0,9,25338,0,200,0,0,0,0, 'Longrunner Proudhoof - Script - Set Data to Warsong Caravan Guard'), +(2533500,9,3,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,12,1,0,0,0,0,0,0, 'Longrunner Proudhoof - Script - Say Line 0'), +(2533500,9,4,0,0,0,100,0,0,0,0,0,2,232,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Longrunner Proudhoof - Script - Set Faction'), +(2533500,9,5,0,0,0,100,0,0,0,0,0,8,2,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Longrunner Proudhoof - Script - Set Hostile'), +(2533500,9,6,0,0,0,100,0,0,0,0,0,102,0,0,0,0,0,0,12,1,0,0,0,0,0,0, 'Longrunner Proudhoof - Script - Switch HP Regen off'), +(2533500,9,7,0,0,0,100,0,11000,11000,0,0,1,1,0,0,0,0,0,12,1,0,0,0,0,0,0, 'Longrunner Proudhoof - Script - Say Line 0'), +(2533500,9,8,0,0,0,100,0,1000,1000,0,0,45,2,2,0,0,0,0,19,25336,0,0,0,0,0,0, 'Longrunner Proudhoof - Script - Set Data to Grunt Ragefist'), +(2533500,9,9,0,0,0,100,0,0,0,0,0,45,2,2,0,0,0,0,9,25338,0,200,0,0,0,0, 'Longrunner Proudhoof - Script - Set Data to Warsong Caravan Guard'), +(2533500,9,10,0,0,0,100,0,0,0,0,0,53,1,25335,0,0,0,2,1,0,0,0,0,0,0,0, 'Longrunner Proudhoof - Script - Start WP'), + +(2533501,9,0,0,0,0,100,0,0,0,0,0,1,5,0,0,0,0,0,12,1,0,0,0,0,0,0, 'Longrunner Proudhoof - Script 2 - Say Line 5'), +(2533501,9,1,0,0,0,100,0,0,0,0,0,15,11592,0,0,0,0,0,12,1,0,0,0,0,0,0, 'Longrunner Proudhoof - Script 2 - Complete Quest (We Strike)'), +(2533501,9,2,0,0,0,100,0,6000,6000,0,0,45,3,3,0,0,0,0,19,25336,0,0,0,0,0,0, 'Longrunner Proudhoof - Script 2 - Set Data to Grunt Ragefist'), +(2533501,9,3,0,0,0,100,0,0,0,0,0,45,3,3,0,0,0,0,9,25338,0,200,0,0,0,0, 'Longrunner Proudhoof - Script 2 - Set Data to Warsong Caravan Guard'), +(2533501,9,4,0,0,0,100,0,0,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Longrunner Proudhoof - Script 2 - Despawn'), + +(2533600,9,0,0,0,0,100,0,0,0,0,0,81,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Grunt Ragefist - Script - Set NPC Flags'), +(2533600,9,1,0,0,0,100,0,0,0,0,0,2,232,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Grunt Ragefist - Script - Set Faction'), +(2533600,9,2,0,0,0,100,0,0,0,0,0,8,2,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Grunt Ragefist - Script - Set Hostile'), +(2533600,9,3,0,0,0,100,0,0,0,0,0,102,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Grunt Ragefist - Script - Switch HP Regen off'); + + +DELETE FROM `waypoints` WHERE `entry`=25335; +INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES +(25335, 1, 4121.404, 5791.311, 62.72873, 'Longrunner Proudhoof'), +(25335, 2, 4101.437, 5799.435, 67.94357, 'Longrunner Proudhoof'), +(25335, 3, 4083.929, 5805.443, 71.37161, 'Longrunner Proudhoof'), +(25335, 4, 4068.87, 5807.64, 73.81717, 'Longrunner Proudhoof'), +(25335, 5, 4052.772, 5802.647, 75.09177, 'Longrunner Proudhoof'), +(25335, 6, 4038.374, 5795.233, 75.40152, 'Longrunner Proudhoof'), +(25335, 7, 4025.04, 5789.227, 75.19473, 'Longrunner Proudhoof'), +(25335, 8, 4006.379, 5787.299, 73.14676, 'Longrunner Proudhoof'), +(25335, 9, 3984.424, 5778.06, 73.17698, 'Longrunner Proudhoof'), -- Event +(25335, 10, 3952.678, 5758.444, 70.48514, 'Longrunner Proudhoof'), -- text +(25335, 11, 3919.015, 5753.338, 69.2403, 'Longrunner Proudhoof'), +(25335, 12, 3894.645, 5745.702, 70.36196, 'Longrunner Proudhoof'), +(25335, 13, 3883.361, 5725.309, 67.55053, 'Longrunner Proudhoof'); + +DELETE FROM `creature_summon_groups` WHERE `summonerId`=25335; +INSERT INTO `creature_summon_groups` (`summonerId`, `summonerType`, `groupId`, `entry`, `position_x`, `position_y`, `position_z`, `orientation`, `summonType`, `summonTime`) VALUES +(25335, 0, 1, 25351, 3981.684, 5766.304, 71.69027, 1.508547, 3, 100000), +(25335, 0, 1, 25351, 3972.008, 5783.715, 74.18502, 5.856251, 3, 100000), +(25335, 0, 1, 25351, 3996.715, 5773.316, 70.84, 2.772876, 3, 100000), +(25335, 0, 1, 25350, 3988.267, 5791.996, 74.18443, 4.443494, 3, 100000), +(25335, 0, 1, 25351, 3969.23, 5768.75, 72.69688, 0.5497994, 3, 100000); + + +DELETE FROM `creature_text` WHERE `entry`IN(25335,25359); +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`,`BroadcastTextID`) VALUES +(25335, 0, 0, '$n is going to join us on our assault. Let us bring peace to my ancestors!', 12, 1, 100, 396, 0, 0, 'Longrunner Proudhoof',24561), +(25335, 1, 0, 'WE STRIKE!', 14, 1, 100, 15, 0, 0, 'Longrunner Proudhoof',24562), +(25335, 2, 0, 'An ambush. Return them to their rest!', 12, 1, 100, 5, 0, 0, 'Longrunner Proudhoof',24563), +(25335, 3, 0, 'Regain your strength. The place where Steeljaw was felled is just ahead.', 12, 1, 100, 396, 0, 0, 'Longrunner Proudhoof',24564), +(25335, 4, 0, 'There''s the dog''s banner and there''s his corpse. What''s that? He''s upon us!', 12, 1, 100, 25, 0, 0, 'Longrunner Proudhoof',24565), +(25335, 5, 0, 'You fought well. Now go north to your orc outpost and inform Overlord Bor''gorok of our success!', 12, 1, 100, 113, 0, 0, 'Longrunner Proudhoof',24566), +(25359, 0, 0, 'I''m freed! Thank you.', 12, 1, 100, 0, 0, 0, 'Force-Commander Steeljaw',24575); + +-- Warsong Caravan Guards +DELETE FROM `creature` WHERE `id`=25338; +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `MovementType`) VALUES +(@CGUID+0, 25338, 571, 1, 1, 4141.54, 5783.948, 60.69736, 2.86234, 120, 0, 0), -- 25338 (Area: 3537) +(@CGUID+1, 25338, 571, 1, 1, 4139.149, 5782.773, 60.48185, 2.86234, 120, 0, 0), -- 25338 (Area: 3537) +(@CGUID+2, 25338, 571, 1, 1, 4141.218, 5786.635, 61.20373, 2.9147, 120, 0, 0); -- 25338 (Area: 3537) diff --git a/sql/updates/world/2014_11_24_03_world.sql b/sql/updates/world/2014_11_24_03_world.sql new file mode 100644 index 00000000000..afde0f04e51 --- /dev/null +++ b/sql/updates/world/2014_11_24_03_world.sql @@ -0,0 +1,29 @@ + -- Achievement: Pilgrims Peril + DELETE FROM `achievement_criteria_data` WHERE `criteria_id` IN (11134,11135,11136,11137,11138,11139,11140,11141); + INSERT INTO `achievement_criteria_data` (`criteria_id`, `type`, `value1`, `value2`) VALUES + -- Alliance + (11134, 5, 66303, 0), -- Orgrimmar + (11134, 6, 14, 0), -- Orgrimmar + (11134, 16, 404, 0), -- Orgrimmar + (11135, 5, 66303, 0), -- Silvermoon City + (11135, 6, 3470, 0), -- Silvermoon City + (11135, 16, 404, 0), -- Silvermoon City + (11136, 5, 66303, 0), -- Thunder Bluff + (11136, 6, 1638, 0), -- Thunder Bluff + (11136, 16, 404, 0), -- Thunder Bluff + (11137, 5, 66303, 0), -- Undercity + (11137, 6, 1497, 0), -- Undercity + (11137, 16, 404, 0), -- Undercity + -- Horde + (11138, 5, 66303, 0), -- Exodar + (11138, 6, 3557, 0), -- Exodar + (11138, 16, 404, 0), -- Exodar + (11139, 5, 66303, 0), -- Darnassus + (11139, 6, 1657, 0), -- Darnassus + (11139, 16, 404, 0), -- Darnassus + (11140, 5, 66303, 0), -- Ironforge + (11140, 6, 809, 0), -- Ironforge + (11140, 16, 404, 0), -- Ironforge + (11141, 5, 66303, 0), -- Stormwind + (11141, 6, 12, 0), -- Stormwind + (11141, 16, 404, 0); -- Stormwind diff --git a/sql/updates/world/2014_11_24_04_world.sql b/sql/updates/world/2014_11_24_04_world.sql new file mode 100644 index 00000000000..bbca1631efe --- /dev/null +++ b/sql/updates/world/2014_11_24_04_world.sql @@ -0,0 +1,12 @@ +DELETE FROM `creature_text` WHERE `entry`=21767; +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`,`BroadcastTextID`) VALUES +(21767, 0, 0, 'What $r dare harm those of my flock?', 14, 0, 100, 0, 0, 0, 'Harbinger of the Raven',19398); + +UPDATE `creature_template` SET `ainame`='SmartAI', `scriptname`='' WHERE `entry`=21767; + +DELETE FROM `smart_scripts` WHERE `entryorguid`=21767 AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(21767,0,0,0,54,0,100,0,0,0,0,0,1,0,7000,0,0,0,0,1,0,0,0,0,0,0,0,'Harbinger of the Raven - On Just Summoned - Say Line 0'), +(21767,0,1,2,52,0,100,0,0,21767,0,0,11,37446,0,0,0,0,0,1,0,0,0,0,0,0,0,'Harbinger of the Raven - On Text Over Line 0 - Cast Ruuan ok Oracle Transformation'), +(21767,0,2,3,61,0,100,0,0,0,0,0,2,954,0,0,0,0,0,1,0,0,0,0,0,0,0,'Harbinger of the Raven - On Text Over Line 0 - Set Faction'), +(21767,0,3,0,61,0,100,0,0,0,0,0,8,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Harbinger of the Raven - On Text Over Line 0 - Set Hostile'); diff --git a/sql/updates/world/2014_11_25_00_world.sql b/sql/updates/world/2014_11_25_00_world.sql new file mode 100644 index 00000000000..584a96f9511 --- /dev/null +++ b/sql/updates/world/2014_11_25_00_world.sql @@ -0,0 +1,47 @@ +UPDATE `creature_template` SET `unit_flags`=0 WHERE `entry`=19527; + +UPDATE `creature_template` SET `ainame`='SmartAI', `scriptname`='' WHERE `entry`=19527; + +DELETE FROM `smart_scripts` WHERE `entryorguid`=19527 AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(19527,0,0,0,4,0,100,0,0,0,0,0,11,34524,2,0,0,0,0,1,0,0,0,0,0,0,0,'Vacillating Voidcaller - On Just Summoned - Cast Elemental Response'), +(19527,0,1,0,2,0,100,1,0,10,0,0,11,34842,0,0,0,0,0,1,0,0,0,0,0,0,0,'Vacillating Voidcaller - On Less than 10% HP - Cast De-Materialize'), +(19527,0,2,0,8,0,100,0,34842,0,0,0,41,0,2,0,0,0,0,1,0,0,0,0,0,0,0,'Vacillating Voidcaller - On Spellhit De-Materialize - Despawn'), +(19527,0,3,0,4,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Vacillating Voidcaller - On Agro - Set Phase 1'), +(19527,0,4,17,8,1,100,0,0,2,0,0,11,34336,2,0,0,0,0,1,0,0,0,0,0,0,0,'Vacillating Voidcaller - On Spellhit (Holy) (Phase 1) - Cast Damage Reduction: Holy'), +(19527,0,5,18,8,1,100,0,0,4,0,0,11,34333,2,0,0,0,0,1,0,0,0,0,0,0,0,'Vacillating Voidcaller - On Spellhit (Fire) (Phase 1) - Cast Damage Reduction: Fire'), +(19527,0,6,19,8,1,100,0,0,8,0,0,11,34335,2,0,0,0,0,1,0,0,0,0,0,0,0,'Vacillating Voidcaller - On Spellhit (Nature)(Phase 1) - Cast Damage Reduction: Nature'), +(19527,0,7,20,8,1,100,0,0,16,0,0,11,34334,2,0,0,0,0,1,0,0,0,0,0,0,0,'Vacillating Voidcaller - On Spellhit (Frost) (Phase 1) - Cast Damage Reduction: Frost'), +(19527,0,8,21,8,1,100,0,0,32,0,0,11,34338,2,0,0,0,0,1,0,0,0,0,0,0,0,'Vacillating Voidcaller - On Spellhit (Shadow) (Phase 1) - Cast Damage Reduction: Shadow'), +(19527,0,9,22,8,1,100,0,0,64,0,0,11,34331,2,0,0,0,0,1,0,0,0,0,0,0,0,'Vacillating Voidcaller - On Spellhit (Arcane) (Phase 1) - Cast Damage Reduction: Arcane'), +(19527,0,10,0,61,0,100,0,0,0,0,0,22,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Vacillating Voidcaller - Link - Set Phase 2'), +(19527,0,11,0,0,2,100,0,0,0,2000,3000,11,34348,64,0,0,0,0,2,0,0,0,0,0,0,0,'Vacillating Voidcaller - IC (Phase 2) - Cast Fireball'), +(19527,0,12,0,0,2,100,0,0,0,5000,6000,11,34446,64,0,0,0,0,2,0,0,0,0,0,0,0,'Vacillating Voidcaller - IC (Phase 2) - Cast Arcane Missiles'), +(19527,0,13,0,0,2,100,0,0,0,2000,3000,11,34347,64,0,0,0,0,2,0,0,0,0,0,0,0,'Vacillating Voidcaller - IC (Phase 2) - Cast Frost Bolt'), +(19527,0,14,0,0,2,100,0,0,0,2000,3000,11,34346,64,0,0,0,0,2,0,0,0,0,0,0,0,'Vacillating Voidcaller - IC (Phase 2) - Cast Holy Bolt'), +(19527,0,15,0,0,2,100,0,0,0,2000,3000,11,34345,64,0,0,0,0,2,0,0,0,0,0,0,0,'Vacillating Voidcaller - IC (Phase 2) - Cast Lightning Bolt'), +(19527,0,16,0,0,2,100,0,0,0,2000,3000,11,34344,64,0,0,0,0,2,0,0,0,0,0,0,0,'Vacillating Voidcaller - IC (Phase 2) - Cast Shadow Bolt'), +(19527,0,17,10,61,0,100,0,0,0,0,0,1,3,0,0,0,0,0,1,0,0,0,0,0,0,0,'Vacillating Voidcaller - On Spellhit (Holy) (Phase 1) - Say'), +(19527,0,18,10,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Vacillating Voidcaller - On Spellhit (Fire) (Phase 1) - Say'), +(19527,0,19,10,61,0,100,0,0,0,0,0,1,4,0,0,0,0,0,1,0,0,0,0,0,0,0,'Vacillating Voidcaller - On Spellhit (Nature)(Phase 1) - Say'), +(19527,0,20,10,61,0,100,0,0,0,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Vacillating Voidcaller - On Spellhit (Frost) (Phase 1) - Say'), +(19527,0,21,10,61,0,100,0,0,0,0,0,1,5,0,0,0,0,0,1,0,0,0,0,0,0,0,'Vacillating Voidcaller - On Spellhit (Shadow) (Phase 1) - Say'), +(19527,0,22,10,61,0,100,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Vacillating Voidcaller - On Spellhit (Arcane) (Phase 1) - Say'); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceEntry`=19527; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(22, 12, 19527, 0, 0, 1, 1, 34333, 0, 0, 0, 0, 0, '', 'Vacillating Voidcaller requires Damage Reduction: Fire to cast Fireball'), +(22, 13, 19527, 0, 0, 1, 1, 34331, 0, 0, 0, 0, 0, '', 'Vacillating Voidcaller requires Damage Reduction: Arcane to cast Arcane Missiles'), +(22, 14, 19527, 0, 0, 1, 1, 34334, 0, 0, 0, 0, 0, '', 'Vacillating Voidcaller requires Damage Reduction: Frost to cast Frost Bolt'), +(22, 15, 19527, 0, 0, 1, 1, 34336, 0, 0, 0, 0, 0, '', 'Vacillating Voidcaller requires Damage Reduction: Holy to cast Holy Bolt'), +(22, 16, 19527, 0, 0, 1, 1, 34335, 0, 0, 0, 0, 0, '', 'Vacillating Voidcaller requires Damage Reduction: Nature to cast Lightning Bolt'), +(22, 17, 19527, 0, 0, 1, 1, 34338, 0, 0, 0, 0, 0, '', 'Vacillating Voidcaller requires Damage Reduction: Shadow to cast Shadowbolt'); + +DELETE FROM `creature_text` WHERE `entry`=19527; +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`,`BroadcastTextID`) VALUES +(19527, 0, 0, '%s absorbs the fire energy of the attack.', 16, 0, 100, 0, 0, 0, 'Vacillating Voidcaller',17105), +(19527, 1, 0, '%s absorbs the arcane energy of the attack.', 16, 0, 100, 0, 0, 0, 'Vacillating Voidcaller',17109), +(19527, 2, 0, '%s absorbs the frost energy of the attack.', 16, 0, 100, 0, 0, 0, 'Vacillating Voidcaller',17106), +(19527, 3, 0, '%s absorbs the holy energy of the attack.', 16, 0, 100, 0, 0, 0, 'Vacillating Voidcaller',17110), +(19527, 4, 0, '%s absorbs the nature energy of the attack.', 16, 0, 100, 0, 0, 0, 'Vacillating Voidcaller',17107), +(19527, 5, 0, '%s absorbs the shadow energy of the attack.', 16, 0, 100, 0, 0, 0, 'Vacillating Voidcaller',17108); diff --git a/sql/updates/world/2014_11_25_01_world.sql b/sql/updates/world/2014_11_25_01_world.sql new file mode 100644 index 00000000000..8e06833d54d --- /dev/null +++ b/sql/updates/world/2014_11_25_01_world.sql @@ -0,0 +1,120 @@ +-- Nerub'Ar Victim by DDuarte closes #13621 +UPDATE `creature_template` SET `unit_flags`=`unit_flags`|4, `flags_extra`=`flags_extra`|64 WHERE `entry`=25284; +-- Search for Incendicite by Exodius closes #13309 +UPDATE `gameobject_loot_template` SET `QuestRequired`=0 WHERE `Entry`=1409 AND `Item`=3340; +-- Feeding Arngrim closes #12826 +UPDATE `creature_template` SET `unit_flags`=0 WHERE `entry`=30423; +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 30422; + +DELETE FROM `smart_scripts` WHERE `entryorguid` =30422; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(30422, 0, 0, 1, 8, 0, 100, 0, 56727, 0, 0, 0, 12, 30423, 1, 240000, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Roaming Jormungar - On Spellhit - Spawn Disembodied Jormungar'), +(30422, 0, 1, 0,61, 0, 100, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Roaming Jormungar - Linked with Previous Event - Despawn'); + +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 30423; + +DELETE FROM `smart_scripts` WHERE `entryorguid` =30423; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(30423, 0, 0, 0, 2, 0, 100, 1, 0, 30, 0, 0, 11, 56732, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Disembodied Jormungar - On 30% HP - Summon Arngrim'), +(30423, 0, 1, 2,38, 0, 100, 0, 1, 1, 0, 0, 11, 56731, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Disembodied Jormungar - On Spellhit - Cast Kill Credit'), +(30423, 0, 2, 0,61, 0, 100, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Disembodied Jormungar - Linked with Previous Event - Despawn'); + +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 30425; + +DELETE FROM `smart_scripts` WHERE `entryorguid` =30425; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(30425, 0, 0, 0,11, 0, 100, 0, 0, 0, 0, 0, 69, 0, 0, 0, 0, 0, 0, 19, 30423, 200, 0, 0, 0, 0, 0, 'Arngrim - On Spawn - Move to closest disembodied jormungar'), +(30425, 0, 1, 2, 1, 0, 100, 0, 10000, 10000, 30000, 30000, 45, 1, 1, 0, 0, 0, 0, 19, 30423, 20, 0, 0, 0, 0, 0, 'Arngrim - OOC - Cast Ping Jormungar'), +(30425, 0, 2, 0,61, 0, 100, 0, 0, 0, 0, 0, 41, 5000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Arngrim - OOC - Linked with Previous Event - Despawn After 5 seconds'); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`IN(13,17) AND `SourceEntry`=56727; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(17,0,56727,0,0,31,1,3,30422,0,0,0, '', 'Arngrims Tooth only hits Roaming Jormungar'), +(13,0,56727,0,0,31,1,3,30422,0,0,0, '', 'Arngrims Tooth only hits Roaming Jormungar'); + +-- Some CPP to SAI conversions closes #12645 +-- and yes of keys and cages again realised now the previous commit was not most recent version +UPDATE `creature_template` SET `AIName`= 'SmartAI',`ScriptName`='' WHERE `entry`=24035; +UPDATE `gameobject_template` SET `AIName`='SmartGameObjectAI', `ScriptName`='' WHERE`entry`IN(186491,186492,186493,186494,186498,186499,186500,186501,186502,186503,186504,186505,186508,186509,186512,186513,186514,186515,186516,186883,186895,186907,186908,186910,186911,186923,186924,186495,186496,186497,186507,186510,186511,186517,186518,186798,186909,186929,186930,186490); + +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (24035,2403500,186491,186492,18649100,186493,186494,186498,186499,186500,186501,186502,186503,186504,186505,186508,186509,186512,186513,186514,186515,186516,186883,186895,186907,186908,186910,186911,186923,186924,186495,186496,186497,186507,186510,186511,186517,186518,186798,186909,186929,186930,186490,18649000,24035); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(186491, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), +(186492, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), +(186493, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), +(186494, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), +(186495, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), +(186496, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), +(186497, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), +(186498, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), +(186499, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), +(186500, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), +(186501, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), +(186502, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), +(186503, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), +(186504, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), +(186505, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), +(186507, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), +(186508, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), +(186509, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), +(186510, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), +(186511, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), +(186512, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), +(186513, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), +(186514, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), +(186515, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), +(186516, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), +(186517, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), +(186518, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), +(186798, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), +(186883, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), +(186895, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), +(186907, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), +(186908, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), +(186909, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), +(186910, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), +(186911, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), +(186923, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), +(186924, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), +(186929, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), +(186930, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649100,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - On State Changed - Run Script'), +(186490, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18649000,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Large Gjalerbron Cage - On State Changed - Run Script'), +(18649100, 9, 0 ,0, 0, 0, 100, 0, 0, 0, 0,0,45,1,1,0,0,0,0,9,24035,0,10,0, 0, 0, 0, 'Gjalerbron Cage - Script - Set Data'), +(18649000, 9, 0 ,0, 0, 0, 100, 0, 0, 0, 0,0,45,1,1,0,0,0,0,9,24035,0,20,0, 0, 0, 0, 'Large Gjalerbron Cage - Set Data'), +(18649100, 9, 1 ,0, 0, 0, 100, 0, 0, 0, 0,0,64,1,0,0,0,0,0,7,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - Script - Store Targetlist'), +(18649000, 9, 1 ,0, 0, 0, 100, 0, 0, 0, 0,0,64,1,0,0,0,0,0,7,0,0,0,0, 0, 0, 0, 'Large Gjalerbron Cage - Store Targetlist'), +(18649100, 9, 2 ,0, 0, 0, 100, 0, 0, 0, 0,0,100,1,0,0,0,0,0,9,24035,0,10,0, 0, 0, 0, 'Gjalerbron Cage - Script - Send Targetlist'), +(18649000, 9, 2 ,0, 0, 0, 100, 0, 0, 0, 0,0,100,1,0,0,0,0,0,9,24035,0,20,0, 0, 0, 0, 'Large Gjalerbron Cage - Send Targetlist'), +(18649100, 9, 3 ,0, 0, 0, 100, 0, 300000, 300000, 0,0,32,0,0,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Gjalerbron Cage - Script - Reset Go'), +(18649000, 9, 3 ,0, 0, 0, 100, 0, 300000, 300000, 0,0,32,0,0,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Large Gjalerbron Cage - Script - Reset Go'), +(24035, 0, 0, 1, 38, 0, 100, 1, 1, 1, 0, 0, 80, 2403500, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Gjalerbron Prisoner - On Data Set - Kill Credit'), +(2403500, 9, 0, 0, 0, 0, 100, 1, 3000, 3000, 0, 0, 33, 24035, 0, 0, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 'Gjalerbron Prisoner - On Data Set - Kill Credit'), +(2403500, 9, 1, 0, 0, 0, 100, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Gjalerbron Prisoner - Linked with Previous Event - Say'), +(2403500, 9, 2, 0, 0, 0, 100, 1, 0, 0, 0, 0, 46, 10, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Gjalerbron Prisoner - Linked with Previous Event - Move Forward'), +(2403500, 9, 3, 0, 0, 0, 100, 1, 0, 0, 0, 0, 41, 15000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Gjalerbron Prisoner - Linked with Previous Event - Despawn'); +-- Whats Haunting With Hill? +UPDATE `creature_template` SET `AIName`= 'SmartAI',`ScriptName`='' WHERE `entry`=23555; + +DELETE FROM `smart_scripts` WHERE `entryorguid` =23555; + +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(23555, 0, 0, 0, 2, 0, 100, 0, 0, 50, 6000, 11000, 11, 37933, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Risen Husk - On Less than 50% HP - Cast Consume Flesh'), +(23555, 0, 1, 2, 6, 0, 100, 0, 0, 0, 0, 0, 11, 42511, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Risen Husk - On Death - Cast Summon Restless Apparotation'), +(23555, 0, 2, 0,61, 0, 100, 0, 0, 0, 0, 0, 11, 42512, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Risen Husk - Linked with Previous Event - Cast Witch Hill Information Credit'); + +-- Risen Spirit 23554 + +UPDATE `creature_template` SET `AIName`= 'SmartAI',`ScriptName`='' WHERE `entry`=23554; + +DELETE FROM `smart_scripts` WHERE `entryorguid` =23554; + +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(23554, 0, 0, 0, 0, 0, 100, 0, 0, 0, 6000, 11000, 11, 43127, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Risen Spirit - IC - Intangible Presence'), +(23554, 0, 1, 2, 6, 0, 100, 0, 0, 0, 0, 0, 11, 42511, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Risen Spirit - On Death - Cast Summon Restless Apparotation'), +(23554, 0, 2, 0,61, 0, 100, 0, 0, 0, 0, 0, 11, 42512, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Risen Spirit - Linked with Previous Event - Cast Witch Hill Information Credit'); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceEntry`IN(23554,23555) AND `SourceId`=0; + +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(22,2,23554,0,0,9,0,11180,0,0,0,0,'','AI Only executes if player is on Whats haunting witch Hill'), +(22,2,23555,0,0,9,0,11180,0,0,0,0,'','AI Only executes if player is on Whats haunting witch Hill'); diff --git a/sql/updates/world/2014_11_26_00_world.sql b/sql/updates/world/2014_11_26_00_world.sql new file mode 100644 index 00000000000..e2aae9d8249 --- /dev/null +++ b/sql/updates/world/2014_11_26_00_world.sql @@ -0,0 +1,11 @@ +UPDATE `smart_scripts` SET `target_type`=23 WHERE `entryorguid`=24981 AND `source_type`=0 AND `id`=1 AND `link`=2; +UPDATE `smart_scripts` SET `target_type`=23 WHERE `entryorguid`=24981 AND `source_type`=0 AND `id`=0 AND `link`=1; + +UPDATE `creature_template` SET `ainame`='SmartAI', `scriptname`='' WHERE `entry`=24972; +DELETE FROM `smart_scripts` WHERE `entryorguid`=24972 AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(24972,0,0,0,8,0,100,0,44997,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Erratic Sentry - On Spellhit (Converting Sentry) - Despawn'); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=44997; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(13, 1, 44997, 0, 0, 31, 1, 3, 24972, 0, 0, 0, 0, '', 'Converting Sentry Effect #1 targets Erratic Sentry'); diff --git a/sql/updates/world/2014_11_27_00_world.sql b/sql/updates/world/2014_11_27_00_world.sql new file mode 100644 index 00000000000..c114aa6e848 --- /dev/null +++ b/sql/updates/world/2014_11_27_00_world.sql @@ -0,0 +1,13 @@ +-- quest linking for Judgment at the eye of eternity/ Heroic Judgment at the eye of eternity +-- requires The Key to the Focusing Iris for 10m or Heroic: The Key to the Focusing Iris for 25m +UPDATE `quest_template` SET `PrevQuestId`=13372 WHERE `Id`=13384; +UPDATE `quest_template` SET `PrevQuestId`=13375 WHERE `Id`=13385; +UPDATE `quest_template` SET `NextQuestId`=13384 WHERE `Id`=13372; +UPDATE `quest_template` SET `NextQuestId`=13385 WHERE `Id`=13375; +-- Prevent Image of Loken and Warlord Jin\'arrak from aggroing on player when summoned for scripted quest event +DELETE FROM `smart_scripts` WHERE `entryorguid`=27199 AND `source_type`=0 AND `id`=5; +DELETE FROM `smart_scripts` WHERE `entryorguid`=27212 AND `source_type`=0 AND `id`=6; + +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(27199, 0, 5, 0, 11, 0, 100, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Warlord Jin\'arrak - On Spawn - Set Passive'), +(27212, 0, 6, 0, 11, 0, 100, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Image of Loken - On Spawn - Set Passive'); diff --git a/sql/updates/world/2014_11_27_01_world.sql b/sql/updates/world/2014_11_27_01_world.sql new file mode 100644 index 00000000000..df6a3f69c5e --- /dev/null +++ b/sql/updates/world/2014_11_27_01_world.sql @@ -0,0 +1,44 @@ +UPDATE `vehicle_template_accessory` SET `minion`=0 WHERE `entry` IN(32640,32633); + +UPDATE `creature_template` SET `ainame`='SmartAI', `scriptname`='' WHERE `entry` IN(32641,32642,32638,32639); + +DELETE FROM `smart_scripts` WHERE `entryorguid` IN(32641,32642,32638,32639) AND `source_type`=0; + +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(32641, 0, 0, 0, 23, 0, 100, 1, 61424, 1, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Drix Blackwrench - Mojodishu - On Has Aura - Set Phase 1'), +(32641, 0, 1, 2, 23, 1, 100, 1, 61424, 0, 0, 0, 81, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Drix Blackwrench - On Has No Aura (Phase 1) - Set NPC Flags'), +(32641, 0, 2, 3, 61, 1, 100, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Drix Blackwrench - Link - Say'), +(32641, 0, 3, 0, 61, 1, 100, 1, 0, 0, 0, 0, 41, 2000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Drix Blackwrench - Link - Despawn After 2 seconds'), + +(32642, 0, 0, 0, 23, 0, 100, 1, 61424, 1, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Mojodishu - On Has Aura - Set Phase 1'), +(32642, 0, 1, 2, 23, 1, 100, 1, 61424, 0, 0, 0, 81, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Mojodishu - On Has No Aura (Phase 1) - Set NPC Flags'), +(32642, 0, 2, 3, 61, 1, 100, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Mojodishu - Link - Say'), +(32642, 0, 3, 0, 61, 1, 100, 1, 0, 0, 0, 0, 41, 2000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Mojodishu - Link - Despawn After 2 seconds'), + +(32638, 0, 0, 0, 23, 0, 100, 1, 61424, 1, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Hakmud of Argus <Traveling Trader> - Mojodishu - On Has Aura - Set Phase 1'), +(32638, 0, 1, 2, 23, 1, 100, 1, 61424, 0, 0, 0, 81, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Hakmud of Argus <Traveling Trader> - On Has No Aura (Phase 1) - Set NPC Flags'), +(32638, 0, 2, 3, 61, 1, 100, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Hakmud of Argus <Traveling Trader> - Link - Say'), +(32638, 0, 3, 0, 61, 1, 100, 1, 0, 0, 0, 0, 41, 2000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Hakmud of Argus <Traveling Trader> - Link - Despawn After 2 seconds'), + +(32639, 0, 0, 0, 23, 0, 100, 1, 61424, 1, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Gnimo <Adventurous Tinker> - On Has Aura - Set Phase 1'), +(32639, 0, 1, 2, 23, 1, 100, 1, 61424, 0, 0, 0, 81, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Gnimo <Adventurous Tinker> - On Has No Aura (Phase 1) - Set NPC Flags'), +(32639, 0, 2, 3, 61, 1, 100, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Gnimo <Adventurous Tinker> - Link - Say'), +(32639, 0, 3, 0, 61, 1, 100, 1, 0, 0, 0, 0, 41, 2000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Gnimo <Adventurous Tinker> - Link - Despawn After 2 seconds'); + +DELETE FROM `creature_text` WHERE `entry` in(32641,32642,32638,32639); +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`,`BroadcastTextID`) VALUES +(32641, 0, 0, 'Our friendship is OVER!', 12, 0, 100, 6, 0, 0, 'Drix Blackwrench',33025), +(32641, 0, 1, 'Hey, yea, I''ve always wanted to be stranded somewhere.', 12, 0, 100, 0, 0, 0, 'Drix Blackwrench',33024), +(32641, 0, 2, 'Oh, I see how it is... You''re gonna do me like that, eh?', 12, 0, 100, 0, 0, 0, 'Drix Blackwrench',33023), +(32641, 0, 3, 'You''re just gonna leave me here? How am I supposed to get home?', 12, 0, 100, 0, 0, 0, 'Drix Blackwrench',33026), +(32642, 0, 0, 'Really, mon? Just like dat you be leavin'' Mojodishu behind?', 12, 0, 100, 1, 0, 0, 'Mojodishu',33027), +(32642, 0, 1, 'Dis bad mojo what you doin''. Don''t say Mojodishu didn''t warn ya!', 12, 0, 100, 0, 0, 0, 'Mojodishu',33028), +(32642, 0, 2, 'Be dat way den!', 12, 0, 100, 0, 0, 0, 'Mojodishu',33029), +(32638, 0, 0, 'Hakmud cannot work under these conditions! Goodbye!', 12, 0, 100, 0, 0, 0, 'Hakmud of Argus <Traveling Trader>',33017), +(32638, 0, 1, 'I thought we were friend, buddy! You leave Hakmud stranded?', 12, 0, 100, 0, 0, 0, 'Hakmud of Argus <Traveling Trader>',33018), +(32638, 0, 2, 'Thanks, buddy! Thanks for nothing!', 12, 0, 100, 0, 0, 0, 'Hakmud of Argus <Traveling Trader>',33014), +(32638, 0, 3, 'What is Hakmud supposed to do now, buddy?', 12, 0, 100, 0, 0, 0, 'Hakmud of Argus <Traveling Trader>',33016), +(32638, 0, 4, 'Why do you treat Hakmud like this, buddy?', 12, 0, 100, 0, 0, 0, 'Hakmud of Argus <Traveling Trader>',33015), +(32639, 0, 0, 'Goodbye! You were Gnimo''s best friend ever!', 12, 0, 100, 0, 0, 0, 'Gnimo <Adventurous Tinker>',33020), +(32639, 0, 1, 'Nobody loves Gnimo...', 12, 0, 100, 0, 0, 0, 'Gnimo <Adventurous Tinker>',33019), +(32639, 0, 2, 'Time for Gnimo to shut down.', 12, 0, 100, 0, 0, 0, 'Gnimo <Adventurous Tinker>',33021); diff --git a/sql/updates/world/2014_11_28_00_world.sql b/sql/updates/world/2014_11_28_00_world.sql new file mode 100644 index 00000000000..fbcca049d0b --- /dev/null +++ b/sql/updates/world/2014_11_28_00_world.sql @@ -0,0 +1,83 @@ +SET @Guid := 74948; + +DELETE FROM `creature_text` WHERE `entry`=19228 AND `groupid`=0 AND `id`=5; +DELETE FROM `creature_text` WHERE `entry`=19228 AND `groupid`=17 AND `id` IN(3,4); +DELETE FROM `creature_text` WHERE `entry`=19228 AND `groupid`=28 AND `id`=4; + +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `BroadcastTextID`, `comment`) VALUES +(19228, 0, 5, 'What a good looking crowd. The dwarven women even shaved.', 12, 0, 100, 21, 0, 0, 16648, 'Perry Gatner'), +(19228, 17, 3, 'Can I get a buff? I''m dying up here.', 12, 0, 100, 6, 0, 0, 16386, 'Perry Gatner'), +(19228, 17, 4, 'Come on! These jokes are epic!', 12, 0, 100, 6, 0, 0, 16387, 'Perry Gatner'), +(19228, 28, 4, 'Thank you everyone! And keep clapping, there is a fly in here and one of you are bound to get it! Good night!', 12, 0, 100, 21, 0, 0, 16345, 'Perry Gatner'); + +DELETE FROM `creature` WHERE `guid` IN(@GUID+0,@GUID+1,@GUID+2,@GUID+3) AND `id`=18152; +INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `VerifiedBuild`) VALUES +(@GUID+0, 18152, 530, 0, 0, 1, 1, 15397, 0, 1177.666, 8130.762, 19.62192, 1.151917, 120, 0, 0, 247, 0, 0, 0, 0, 0, 0), -- 7853077 +(@GUID+1, 18152, 530, 0, 0, 1, 1, 15394, 0, 1178.132, 8130.465, 19.65684, 1.117011, 120, 0, 0, 247, 0, 0, 0, 0, 0, 0), -- 16241685 +(@GUID+2, 18152, 530, 0, 0, 1, 1, 15393, 0, 1178.688, 8130.183, 19.68922, 1.082104, 120, 0, 0, 247, 0, 0, 0, 0, 0, 0), -- 24630293 +(@GUID+3, 18152, 530, 0, 0, 1, 1, 15396, 0, 1179.359, 8129.974, 19.69083, 1.012291, 120, 0, 0, 247, 0, 0, 0, 0, 0, 0); -- 33018901 + +DELETE FROM `event_scripts` WHERE `id`=11424 AND `command`=10; +INSERT INTO `event_scripts` (`id`, `delay`, `command`, `datalong`, `datalong2`, `dataint`, `x`, `y`, `z`, `o`) VALUES +(11424, 3, 10, 19656, 10000, 0, 1176.53, 8130.83, 20.13, 1.86); + +DELETE FROM `smart_scripts` WHERE `entryorguid` IN(1815200,1965602) AND `source_type`=9; + +DELETE FROM `smart_scripts` WHERE `entryorguid` IN(-@GUID-0,-@GUID-1,-@GUID-2,-@GUID-3) AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid` =19656 AND `source_type`=0 AND `id`=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`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(19656, 0, 1, 0, 11, 0, 100, 0, 0, 0, 0, 0, 80, 1965602, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Invisible Location Trigger - On Just Summoned - Run Script'), +(1965602, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 10, @GUID+0, 18152, 0, 0, 0, 0, 0, 'Invisible Location Trigger Script - Respawn Baby Murloc #1'), +(1965602, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 10, @GUID+1, 18152, 0, 0, 0, 0, 0, 'Invisible Location Trigger Script - Respawn Baby Murloc #2'), +(1965602, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 10, @GUID+2, 18152, 0, 0, 0, 0, 0, 'Invisible Location Trigger Script - Respawn Baby Murloc #3'), +(1965602, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 10, @GUID+3, 18152, 0, 0, 0, 0, 0, 'Invisible Location Trigger Script - Respawn Baby Murloc #4'), + +(1965602, 9, 4, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 45, 1, 1, 0, 0, 0, 0, 10, @GUID+0, 18152, 0, 0, 0, 0, 0, 'Invisible Location Trigger Script - Respawn Baby Murloc #1'), +(1965602, 9, 5, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 10, @GUID+1, 18152, 0, 0, 0, 0, 0, 'Invisible Location Trigger Script - Respawn Baby Murloc #2'), +(1965602, 9, 6, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 10, @GUID+2, 18152, 0, 0, 0, 0, 0, 'Invisible Location Trigger Script - Respawn Baby Murloc #3'), +(1965602, 9, 7, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 10, @GUID+3, 18152, 0, 0, 0, 0, 0, 'Invisible Location Trigger Script - Respawn Baby Murloc #4'), + +(-@GUID-0, 0, 0, 0, 38, 0, 100, 0, 2, 2, 0, 0, 47, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Baby Murloc - On Data Set - Set Visible'), +(-@GUID-1, 0, 0, 0, 38, 0, 100, 0, 2, 2, 0, 0, 47, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Baby Murloc - On Data Set - Set Visible'), +(-@GUID-2, 0, 0, 0, 38, 0, 100, 0, 2, 2, 0, 0, 47, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Baby Murloc - On Data Set - Set Visible'), +(-@GUID-3, 0, 0, 0, 38, 0, 100, 0, 2, 2, 0, 0, 47, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Baby Murloc - On Data Set - Set Visible'), +(-@GUID-0, 0, 1, 0, 38, 0, 100, 0, 1, 1, 0, 0, 53, 1, 1815200, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Baby Murloc - On Data Set - Start WP'), +(-@GUID-1, 0, 1, 0, 38, 0, 100, 0, 1, 1, 0, 0, 53, 1, 1815201, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Baby Murloc - On Data Set - Start WP'), +(-@GUID-2, 0, 1, 0, 38, 0, 100, 0, 1, 1, 0, 0, 53, 1, 1815202, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Baby Murloc - On Data Set - Start WP'), +(-@GUID-3, 0, 1, 0, 38, 0, 100, 0, 1, 1, 0, 0, 53, 1, 1815203, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Baby Murloc - On Data Set - Start WP'), +(-@GUID-0, 0, 2, 3, 34, 0, 100, 0, 0, 1, 0, 0, 66, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 5.375614, 'Baby Murloc - On Reached WP1 - Set Orientation'), +(-@GUID-1, 0, 2, 3, 34, 0, 100, 0, 0, 1, 0, 0, 66, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 4.886922, 'Baby Murloc - On Reached WP1 - Set Orientation'), +(-@GUID-2, 0, 2, 3, 34, 0, 100, 0, 0, 1, 0, 0, 66, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 3.159046, 'Baby Murloc - On Reached WP1 - Set Orientation'), +(-@GUID-3, 0, 2, 3, 34, 0, 100, 0, 0, 1, 0, 0, 66, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 2.9147, 'Baby Murloc - On Reached WP1 - Set Orientation'), +(-@GUID-0, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 80, 1815200, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Baby Murloc - On Respawn - Run Script'), +(-@GUID-1, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 80, 1815200, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Baby Murloc - On Respawn - Run Script'), +(-@GUID-2, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 80, 1815200, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Baby Murloc - On Respawn - Run Script'), +(-@GUID-3, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 80, 1815200, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Baby Murloc - On Respawn - Run Script'), +(-@GUID-0, 0, 4, 5, 11, 0, 100, 0, 0, 0, 0, 0, 47, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Baby Murloc - On Respawn - Set Visible'), +(-@GUID-1, 0, 4, 5, 11, 0, 100, 0, 0, 0, 0, 0, 47, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Baby Murloc - On Respawn - Set Visible'), +(-@GUID-2, 0, 4, 5, 11, 0, 100, 0, 0, 0, 0, 0, 47, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Baby Murloc - On Respawn - Set Visible'), +(-@GUID-3, 0, 4, 5, 11, 0, 100, 0, 0, 0, 0, 0, 47, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Baby Murloc - On Respawn - Set Visible'), +(-@GUID-0, 0, 5, 0, 61, 0, 100, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Baby Murloc - On Respawn - Set Emote State'), +(-@GUID-1, 0, 5, 0, 61, 0, 100, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Baby Murloc - On Respawn - Set Emote State'), +(-@GUID-2, 0, 5, 0, 61, 0, 100, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Baby Murloc - On Respawn - Set Emote State'), +(-@GUID-3, 0, 5, 0, 61, 0, 100, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Baby Murloc - On Respawn - Set Emote State'), + +(1815200, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 32040, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Baby Murloc - Script - Cast Scare Daggerfen'), +(1815200, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 17, 10, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Baby Murloc - Script - Set Emote State'), +(1815200, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 41, 18000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Baby Murloc - Script - Despawn'); + +DELETE FROM `waypoints` WHERE `entry` BETWEEN 1815200 AND 1815203; +INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES +(1815200, 1, 1169.526, 8146.214, 19.41322, 'Baby Murloc'), +(1815201, 1, 1184.131, 8162.72, 18.72033, 'Baby Murloc'), +(1815202, 1, 1205.028, 8157.705, 18.43147, 'Baby Murloc'), +(1815203, 1, 1204.707, 8140.139, 18.77224, 'Baby Murloc'); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceGroup`=2 AND `SourceEntry`=19656; + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=32040; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(13, 1, 32040, 0, 0, 31, 0, 3, 18115, 0, 0, 0, 0, '', 'Scare Daggerfen targets Daggerfen Muckdweller'), +(13, 1, 32040, 0, 1, 31, 0, 3, 18116, 0, 0, 0, 0, '', 'Scare Daggerfen targets Daggerfen Assasin'), +(22, 2, 19656, 0, 0, 23, 1, 3640, 0, 0, 0, 0, 0, '', ''); diff --git a/sql/updates/world/2014_11_28_01_world.sql b/sql/updates/world/2014_11_28_01_world.sql new file mode 100644 index 00000000000..f89267d71b6 --- /dev/null +++ b/sql/updates/world/2014_11_28_01_world.sql @@ -0,0 +1 @@ +UPDATE `creature` SET `spawntimesecs`=120 WHERE `guid` IN(74951,74950,74949,74948); diff --git a/sql/updates/world/2014_11_29_00_world.sql b/sql/updates/world/2014_11_29_00_world.sql new file mode 100644 index 00000000000..066ee2c2610 --- /dev/null +++ b/sql/updates/world/2014_11_29_00_world.sql @@ -0,0 +1,14 @@ +DELETE FROM `creature_text` WHERE `entry`=19228 AND `groupid` IN(49,50); +DELETE FROM `creature_text` WHERE `entry`=19228 AND `groupid` =0 and `id`=6; + +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `BroadcastTextID`, `comment`) VALUES +(19228, 49, 0, 'Is it just me, or is the Horde about the ugliest enemy we could find?', 12, 7, 100, 6, 0, 0, 16678, 'Perry Gatner'), +(19228, 50, 0, 'Just so you guys don''t feel left out, all I said was how attractive the blood elves are. It loses something in the translation.', 12, 1, 100, 6, 0, 0, 16679, 'Perry Gatner'), +(19228, 0, 6, 'Are you ready to laugh!', 12, 0, 100, 5, 0, 0, 16329, 'Perry Gatner'); + +DELETE FROM `smart_scripts` WHERE `entryorguid`=1927116 AND `source_type`=9; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(1927116, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 47, 0, 0, 0, 0, 0, 19, 19228, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - - Script 16 - Say Line 49 (Perry Gatner'), +(1927116, 9, 1, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 48, 0, 0, 0, 0, 0, 19, 19228, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - - Script 16 - Say Line 50 (Perry Gatner'); + +UPDATE `smart_scripts` SET `action_param4`=1927116 WHERE `entryorguid`=19271 AND `source_type`=0 AND `id`=15; diff --git a/sql/updates/world/2014_12_02_00_world.sql b/sql/updates/world/2014_12_02_00_world.sql new file mode 100644 index 00000000000..780315fc9d8 --- /dev/null +++ b/sql/updates/world/2014_12_02_00_world.sql @@ -0,0 +1,2 @@ +DELETE FROM `game_event` WHERE `eventEntry`=66; +UPDATE `game_event` SET `occurence`=240, `description`='Perry Gatner' WHERE `eventEntry`=65; diff --git a/sql/updates/world/2014_12_03_00_world.sql b/sql/updates/world/2014_12_03_00_world.sql new file mode 100644 index 00000000000..c6a38c49220 --- /dev/null +++ b/sql/updates/world/2014_12_03_00_world.sql @@ -0,0 +1,9 @@ +DELETE FROM `smart_scripts` WHERE `entryorguid`=18688 AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid`=1868800 AND `source_type`=9; + +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(18688, 0, 0, 1, 8, 0, 100, 0, 34063, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Ancient Orc Ancestor - On Spellhit "Soul Mirror" - Say Line 1'), +(18688, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 36, 19480, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Ancient Orc Ancestor - On Spellhit "Soul Mirror" - Change Entry to Darkened Spirit'), +(18688, 0, 2, 0, 0, 0, 100, 0, 20000, 40000, 60000, 180000, 1, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Ancient Orc Ancestor - In Combat - Say Line 0 (Phase 1) (No Repeat)'); + +UPDATE `vehicle_template_accessory` SET `minion`=0 WHERE `entry` IN(32640,32633); diff --git a/sql/updates/world/2014_12_04_00_world.sql b/sql/updates/world/2014_12_04_00_world.sql new file mode 100644 index 00000000000..50b5d63d4b6 --- /dev/null +++ b/sql/updates/world/2014_12_04_00_world.sql @@ -0,0 +1,103 @@ +UPDATE `creature_template` SET `ainame`='SmartAI', `scriptname`='' WHERE `entry`=4880; + +DELETE FROM `smart_scripts` WHERE `entryorguid`=4880 AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid` IN(488000,488001) AND `source_type`=9; + +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(4880,0,0,2,19,0,100,0,1270,0,0,0,64,1,0,0,0,0,0,7,0,0,0,0,0,0,0,'"Stinky" Ignatz - On Quest Accept (Stinkys Escape - H) - Store Targetlist'), +(4880,0,1,2,19,0,100,0,1222,0,0,0,64,1,0,0,0,0,0,7,0,0,0,0,0,0,0,'"Stinky" Ignatz - On Quest Accept (Stinkys Escape - A) - Store Targetlist'), +(4880,0,2,0,61,0,100,0,0,0,0,0,80,488000,2,0,0,0,0,1,0,0,0,0,0,0,0,'"Stinky" Ignatz - Link - Run Script'), +(4880,0,3,4,40,0,100,0,8,0,0,0,54,3000,0,0,0,0,0,1,0,0,0,0,0,0,0,'"Stinky" Ignatz - On Reached WP8 - Pause WP (3 Seconds)'), +(4880,0,4,0,61,0,100,0,0,0,0,0,1,1,0,0,0,0,0,12,1,0,0,0,0,0,0,'"Stinky" Ignatz - On Reached WP8 - Say Line 1'), +(4880,0,5,6,40,0,100,0,12,0,0,0,54,3000,0,0,0,0,0,1,0,0,0,0,0,0,0,'"Stinky" Ignatz - On Reached WP12 - Pause WP (3 Seconds)'), +(4880,0,6,0,61,0,100,0,0,0,0,0,1,2,0,0,0,0,0,12,1,0,0,0,0,0,0,'"Stinky" Ignatz - On Reached WP12 - Say Line 2'), +(4880,0,7,0,40,0,100,0,26,0,0,0,1,3,0,0,0,0,0,12,1,0,0,0,0,0,0,'"Stinky" Ignatz - On Reached WP26 - Say Line 3'), +(4880,0,8,9,40,0,100,0,27,0,0,0,54,6000,0,0,0,0,0,1,0,0,0,0,0,0,0,'"Stinky" Ignatz - On Reached 27 - Pause WP (6 Seconds)'), +(4880,0,9,0,61,0,100,0,0,0,0,0,1,4,0,0,0,0,0,12,1,0,0,0,0,0,0,'"Stinky" Ignatz - On Reached 27 - Say Line 4'), +(4880,0,10,11,40,0,100,0,28,0,0,0,54,6000,0,0,0,0,0,1,0,0,0,0,0,0,0,'"Stinky" Ignatz - On Reached WP28 - Pause WP (6 Seconds)'), +(4880,0,11,0,61,0,100,0,0,0,0,0,1,5,0,0,0,0,0,12,1,0,0,0,0,0,0,'"Stinky" Ignatz - On Reached 28 - Say Line 5'), +(4880,0,12,13,40,0,100,0,29,0,0,0,54,6000,0,0,0,0,0,1,0,0,0,0,0,0,0,'"Stinky" Ignatz - On Reached WP29 - Pause WP (6 Seconds)'), +(4880,0,13,14,61,0,100,0,0,0,0,0,90,8,0,0,0,0,0,1,0,0,0,0,0,0,0,'"Stinky" Ignatz - On Reached 29 - Set Bytes 1'), +(4880,0,14,27,61,0,100,0,0,0,0,0,1,6,0,0,0,0,0,1,0,0,0,0,0,0,0,'"Stinky" Ignatz - On Reached 29 - Say Line 6'), +(4880,0,15,16,40,0,100,0,30,0,0,0,91,8,0,0,0,0,0,1,0,0,0,0,0,0,0,'"Stinky" Ignatz - On Reached WP30 - Set Bytes 1'), +(4880,0,16,0,61,0,100,0,0,0,0,0,1,7,0,0,0,0,0,1,0,0,0,0,0,0,0,'"Stinky" Ignatz - On Reached WP30 - Say Line 7'), +(4880,0,17,18,40,0,100,0,38,0,0,0,54,6000,0,0,0,0,0,1,0,0,0,0,0,0,0,'"Stinky" Ignatz - On Reached WP38 - Pause WP (6 Seconds)'), +(4880,0,18,19,61,0,100,0,0,0,0,0,1,8,0,0,0,0,0,12,1,0,0,0,0,0,0,'"Stinky" Ignatz - On Reached WP38 - Say Line 8'), +(4880,0,19,20,61,0,100,0,0,0,0,0,15,1270,0,0,0,0,0,12,1,0,0,0,0,0,0,'"Stinky" Ignatz - On Reached WP38 - Complete Quest'), +(4880,0,20,21,61,0,100,0,0,0,0,0,15,1222,0,0,0,0,0,12,1,0,0,0,0,0,0,'"Stinky" Ignatz - On Reached WP38 - Complete Quest'), +(4880,0,21,0,40,0,100,0,0,0,0,0,59,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'"Stinky" Ignatz - On Reached WP38 - Set Run On'), +(4880,0,22,23,40,0,100,0,40,0,0,0,1,9,0,0,0,0,0,12,1,0,0,0,0,0,0,'"Stinky" Ignatz - On Reached WP40 - Say Line 9'), +(4880,0,23,0,61,0,100,0,40,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'"Stinky" Ignatz - On Reached WP40 - Despawn'), +(4880,0,24,26,6,0,100,0,0,0,0,0,6,1270,0,0,0,0,0,12,1,0,0,0,0,0,0,'"Stinky" Ignatz - On Death - Fail Quest'), +(4880,0,25,0,61,0,100,0,0,0,0,0,6,1222,0,0,0,0,0,12,1,0,0,0,0,0,0,'"Stinky" Ignatz - On Death - Fail Quest'), +(4880,0,26,0,0,0,100,0,1000,1000,30000,30000,1,10,0,0,0,0,0,12,1,0,0,0,0,0,0,'"Stinky" Ignatz - IC - Say Line 10'), +(4880,0,27,0,61,0,100,0,0,0,0,0,70,300,0,0,0,0,0,14,11757,20939,0,0,0,0,0,'"Stinky" Ignatz - On Reached WP29 - Despawn Bogbean Plant'), +(4880,0,28,0,24,0,100,0,0,0,0,0,91,8,0,0,0,0,0,1,0,0,0,0,0,0,0,'"Stinky" Ignatz - On Evade - Set Bytes 1'), +(488000,9,0,0,0,0,100,0,0,0,0,0,81,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'"Stinky" Ignatz - Script - Set NPC Flags'), +(488000,9,1,0,0,0,100,0,0,0,0,0,2,250,0,0,0,0,0,1,0,0,0,0,0,0,0,'"Stinky" Ignatz - Script - Set Faction'), +(488000,9,2,0,0,0,100,0,0,0,0,0,91,8,0,0,0,0,0,1,0,0,0,0,0,0,0,'"Stinky" Ignatz - Script - Set Bytes 1'), +(488000,9,3,0,0,0,100,0,0,0,0,0,8,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'"Stinky" Ignatz - Script - Set aggresive'), +(488000,9,4,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'"Stinky" Ignatz - Script - Say Line 0'), +(488000,9,5,0,0,0,100,0,0,0,0,0,53,0,4880,0,0,0,0,1,0,0,0,0,0,0,0,'"Stinky" Ignatz - Script - Start WP'); + +DELETE FROM `waypoints` WHERE `entry`=4880; +DELETE FROM `script_waypoint` WHERE `entry`=4880; + +INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES +(4880, 1, -2646.43, -3436.07, 35.3732, '"Stinky" Ignatz'), +(4880, 2, -2650.83, -3440.15, 35.1381, '"Stinky" Ignatz'), +(4880, 3, -2662.31, -3447.67, 35.1089, '"Stinky" Ignatz'), +(4880, 4, -2680.48, -3454.6, 34.6538, '"Stinky" Ignatz'), +(4880, 5, -2701.02, -3457.44, 34.2691, '"Stinky" Ignatz'), +(4880, 6, -2724.06, -3458.64, 33.6735, '"Stinky" Ignatz'), +(4880, 7, -2745.01, -3459.28, 32.5346, '"Stinky" Ignatz'), +(4880, 8, -2759.42, -3464.78, 32.7143, '"Stinky" Ignatz'), -- 3000 +(4880, 9, -2763.63, -3471.51, 33.5388, '"Stinky" Ignatz'), +(4880, 10, -2771.79, -3480.89, 33.2553, '"Stinky" Ignatz'), +(4880, 11, -2780.66, -3488.76, 31.875, '"Stinky" Ignatz'), +(4880, 12, -2796.14, -3489.01, 30.8585, '"Stinky" Ignatz'), -- 3000 +(4880, 13, -2792.12, -3495.97, 30.7324, '"Stinky" Ignatz'), +(4880, 14, -2789.06, -3502.37, 30.6704, '"Stinky" Ignatz'), +(4880, 15, -2787.72, -3515.01, 31.1176, '"Stinky" Ignatz'), +(4880, 16, -2790.84, -3523.31, 30.5733, '"Stinky" Ignatz'), +(4880, 17, -2796.59, -3520.62, 29.9187, '"Stinky" Ignatz'), +(4880, 18, -2798.56, -3518.91, 30.3887, '"Stinky" Ignatz'), +(4880, 19, -2801.47, -3516.75, 30.1915, '"Stinky" Ignatz'), +(4880, 20, -2804.36, -3513.9, 29.5508, '"Stinky" Ignatz'), +(4880, 21, -2807.98, -3518, 29.9488, '"Stinky" Ignatz'), +(4880, 22, -2815.68, -3521.74, 29.7723, '"Stinky" Ignatz'), +(4880, 23, -2823.39, -3526.23, 31.7194, '"Stinky" Ignatz'), +(4880, 24, -2836.11, -3544.7, 32.4939, '"Stinky" Ignatz'), +(4880, 25, -2830.39, -3568.86, 30.4104, '"Stinky" Ignatz'), +(4880, 26, -2824.84, -3569.52, 31.2811, '"Stinky" Ignatz'), +(4880, 27, -2818.66, -3567.8, 30.9204, '"Stinky" Ignatz'), -- 6000 +(4880, 28, -2817.66, -3568.94, 30.4312, '"Stinky" Ignatz'), -- 6000 +(4880, 29, -2820.39, -3592.22, 30.7163, '"Stinky" Ignatz'), -- 6000 +(4880, 30, -2820.77, -3592.5, 30.8861, '"Stinky" Ignatz'), +(4880, 31, -2829.91, -3588.73, 30.6831, '"Stinky" Ignatz'), +(4880, 32, -2842.32, -3577.5, 36.8489, '"Stinky" Ignatz'), +(4880, 33, -2851.18, -3567.58, 38.5159, '"Stinky" Ignatz'), +(4880, 34, -2865.55, -3551.58, 41.439, '"Stinky" Ignatz'), +(4880, 35, -2871.23, -3548.15, 40.7614, '"Stinky" Ignatz'), +(4880, 36, -2877.84, -3544.15, 38.6702, '"Stinky" Ignatz'), +(4880, 37, -2890.39, -3542.39, 34.3144, '"Stinky" Ignatz'), +(4880, 38, -2898.73, -3543.64, 34.32, '"Stinky" Ignatz'), -- 6000 +(4880, 39, -2910.06, -3568.96, 34.25, '"Stinky" Ignatz'), +(4880, 40, -2932.51, -3584.62, 37.2385, '"Stinky" Ignatz'); + +DELETE FROM `creature_text` WHERE `entry`=4880; +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(4880, 0, 0, 'Ok, let''s get started.', 12, 0, 100, 0, 0, 0, 1610, 0, '"Stinky" Ignatz'), +(4880, 1, 0, 'Now let''s look for the herb.', 12, 0, 100, 0, 0, 0, 1611, 0, '"Stinky" Ignatz'), +(4880, 2, 0, 'Nope, not here...', 12, 0, 100, 0, 0, 0, 1612, 0, '"Stinky" Ignatz'), +(4880, 3, 0, 'There must be one around here somewhere...', 12, 0, 100, 0, 0, 0, 1613, 0, '"Stinky" Ignatz'), +(4880, 4, 0, 'Ah, there''s one!', 12, 0, 100, 0, 0, 0, 1614, 0, '"Stinky" Ignatz'), +(4880, 5, 0, 'Come, $n! Let''s go over there and collect it!', 12, 0, 100, 0, 0, 0, 1615, 0, '"Stinky" Ignatz'), +(4880, 6, 0, '%s picks the herb from the ground.', 16, 0, 100, 0, 0, 0, 1616, 0, '"Stinky" Ignatz'), +(4880, 7, 0, 'Ok, now let''s get out of here!', 12, 0, 100, 0, 0, 0, 1617, 0, '"Stinky" Ignatz'), +(4880, 8, 0, 'I can make it from here. Thanks, $n! And talk to my employer about a reward!', 12, 0, 100, 0, 0, 0, 1618, 0, '"Stinky" Ignatz'), +(4880, 9, 0, '%s disappears back into the swamp.', 16, 0, 100, 0, 0, 0, 1619, 0, '"Stinky" Ignatz'), +(4880, 10, 0, 'Help! I''m under attack!', 12, 0, 100, 0, 0, 0, 1629, 0, '"Stinky" Ignatz'), +(4880, 10, 1, 'Help! The beast is on me!', 12, 0, 100, 0, 0, 0, 1630, 0, '"Stinky" Ignatz'); + +UPDATE `vehicle_template_accessory` SET `minion`=1 WHERE `entry` IN(32640,32633); diff --git a/sql/updates/world/2014_12_05_00_world.sql b/sql/updates/world/2014_12_05_00_world.sql new file mode 100644 index 00000000000..6bce51ddb2b --- /dev/null +++ b/sql/updates/world/2014_12_05_00_world.sql @@ -0,0 +1,82 @@ +SET @CGUID := 74952; + +DELETE FROM `creature` WHERE `id` IN(31314,30698,31306,31428); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `MovementType`) VALUES +(@CGUID+0, 31314, 571, 1, 175, 6865.108, 3570.752, 736.0794, 3.01942, 120, 0, 0), -- 31314 (Area: 4531) +(@CGUID+1, 31314, 571, 1, 175, 6869.777, 3584.097, 735.8923, 2.879793, 120, 0, 0), -- 31314 (Area: 4531) +(@CGUID+2, 31314, 571, 1, 175, 6866.223, 3574.63, 735.9076, 3.036873, 120, 0, 0), -- 31314 (Area: 4531) +(@CGUID+3, 31314, 571, 1, 175, 6868.476, 3579.733, 736.1484, 2.949606, 120, 0, 0), -- 31314 (Area: 4531) +(@CGUID+4, 30698, 571, 1, 175, 6853.651, 3582.979, 738.027, 6.038839, 120, 0, 0), -- 30698 (Area: 4531) +(@CGUID+5, 31306, 571, 1, 175, 6865.82, 3577.979, 736.0449, 2.932153, 120, 0, 0), -- 31306 (Area: 4531) +(@CGUID+6, 31428, 571, 1, 175, 6857.328, 3571.491, 735.8922, 1.151917, 120, 5, 1); -- 31428 (Area: 4531) (possible waypoints or random movement) + +DELETE FROM `gossip_menu` WHERE `entry`=10060; +INSERT INTO `gossip_menu` (`entry`, `text_id`) VALUES +(10060, 13978); + +DELETE FROM `gossip_menu_option` WHERE `menu_id`=10060; + +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `OptionBroadcastTextID`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `box_coded`, `box_money`, `box_text`, `BoxBroadcastTextID`) VALUES +(10060, 0, 0, 'Let\'s kill this... thing... and get this over with.', 32118, 1, 1, 0, 0, 0, 0, '', 0); + +DELETE FROM `creature_template_addon` WHERE `entry` IN(30698,31314,31306,31428,31301); +INSERT INTO `creature_template_addon` (`entry`, `mount`, `bytes1`, `bytes2`, `auras`) VALUES +(30698, 0, 0x0, 0x1, ''), -- 30698 +(31314, 0, 0x0, 0x1, ''), -- 31314 +(31306, 0, 0x0, 0x1, '58949'), -- 31306 - 58949 +(31428, 28919, 0x0, 0x1, ''), -- 31428 +(31301, 0, 0x0, 0x1, '34427'); -- 31301 - 34427 + +UPDATE `creature_template` SET `unit_flags`=768 WHERE `entry`=31301; + + +UPDATE `creature_template` SET `ainame`='SmartAI', `scriptname`='' WHERE `entry` IN(30698,31314,31306,31428,31301); + +DELETE FROM `smart_scripts` WHERE `entryorguid` IN(30698,31314,31306,31428,31301) AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid` IN(3130100) AND `source_type`=9; + +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(30698,0,0,1,38,0,100,0,1,1,0,0,19,768,0,0,0,0,0,1,0,0,0,0,0,0,0,'Morbidus - On Data Set 1 1 - Set Unit Flags'), +(30698,0,1,2,61,0,100,0,0,0,0,0,8,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Morbidus - On Data Set 1 1 - Set Hostile'), +(30698,0,2,3,61,0,100,0,0,0,0,0,45,1,1,0,0,0,0,19,31306,0,0,0,0,0,0,'Morbidus - On Data Set 1 1 - Set Data 1 1 on Margrave Dhakar'), +(30698,0,3,4,61,0,100,0,0,0,0,0,45,1,1,0,0,0,0,19,31428,0,0,0,0,0,0,'Morbidus - On Data Set 1 1 - Set Data 1 1 on Crusader Olakin Sainrith'), +(30698,0,4,0,61,0,100,0,0,0,0,0,45,1,1,0,0,0,0,9,31314,0,200,0,0,0,0,'Morbidus - On Data Set 1 1 - Set Data 1 1 on Ebon Blade Veteran'), +(30698,0,5,6,25,0,100,0,0,0,0,0,8,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Morbidus - On Reset - Set Passive'), +(30698,0,6,0,61,0,100,0,0,0,0,0,18,768,0,0,0,0,0,1,0,0,0,0,0,0,0,'Morbidus - On Reset - Set Unit Flags'), +(30698,0,7,0,6,0,100,0,0,0,0,0,33,30698,0,0,0,0,0,24,0,0,0,0,0,0,0,'Morbidus - On Death - Kill Credit'), +(31306,0,0,1,62,0,100,0,10060,0,0,0,64,1,0,0,0,0,0,7,0,0,0,0,0,0,0,'Margrave Dhakar - On Gossip Select - Store Targetlist'), +(31306,0,1,2,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Margrave Dhakar - On Gossip Select - Close Gossip'), +(31306,0,2,3,61,0,100,0,0,0,0,0,81,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Margrave Dhakar - On Gossip Select - Set NPC Flags'), +(31306,0,3,4,61,0,100,0,0,0,0,0,12,31301,1,600000,0,0,0,8,0,0,0,6858.596, 3580.5, 736.7512, 5.67232,'Margrave Dhakar - On Gossip Select - Summon The Lich King'), +(31306,0,4,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0, 0, 0, 0,'Margrave Dhakar - On Gossip Select - Say Line 0'), +(31306,0,5,6,38,0,100,0,1,1,0,0,8,2,0,0,0,0,0,1,0,0,0,0, 0, 0, 0,'Margrave Dhakar - On Data Set 1 1 - Set Hostile'), +(31306,0,6,0,61,0,100,0,0,0,0,0,49,0,0,0,0,0,0,19,30698,0,0,0,0,0,0,'Margrave Dhakar - On Data Set 1 1 - Attack Morbidus'), +(31306,0,7,8,7,0,100,0,0,0,0,0,8,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Margrave Dhakar - On Evade - Set Passive'), +(31306,0,8,0,61,0,100,0,0,0,0,0,81,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Margrave Dhakar - On Evade - Set NPC Flags'), +(31301,0,0,0,11,0,100,0,0,0,0,0,80,3130100,2,0,0,0,0,1,0,0,0,0,0,0,0,'The Lich King - On Just Summoned - Run Script'), +(31314,0,0,1,38,0,100,0,1,1,0,0,8,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Ebon Blade Veteran - On Data Set 1 1 - Set Hostile'), +(31314,0,1,0,61,0,100,0,0,0,0,0,49,0,0,0,0,0,0,19,30698,0,0,0,0,0,0,'Ebon Blade Veteran - On Data Set 1 1 - Attack Morbidus'), +(31314,0,2,0,7,0,100,0,0,0,0,0,8,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Ebon Blade Veteran - On Evade - Set Passive'), +(31428,0,0,1,38,0,100,0,1,1,0,0,2,1770,0,0,0,0,0,1,0,0,0,0,0,0,0,'Crusader Olakin Sainrith - On Data Set 1 1 - Set Faction'), +(31428,0,1,2,61,0,100,0,0,0,0,0,8,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Crusader Olakin Sainrith - On Data Set 1 1 - Set Hostile'), +(31428,0,2,0,61,0,100,0,0,0,0,0,49,0,0,0,0,0,0,19,30698,0,0,0,0,0,0,'Crusader Olakin Sainrith - On Data Set 1 1 - Attack Morbidus'), +(31428,0,3,4,7,0,100,0,1,1,0,0,2,2070,0,0,0,0,0,1,0,0,0,0,0,0,0,'Crusader Olakin Sainrith - On Evade - Set Faction'), +(31428,0,4,0,61,0,100,0,0,0,0,0,8,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Crusader Olakin Sainrith - On Evade - Set Passive'), +(3130100,9,0,0,0,0,100,0,100,100,0,0,11,34427,0,0,0,0,0,1,0,0,0,0,0,0,0,'The Lich King - Script - Cast Ethereal Teleport'), +(3130100,9,1,0,0,0,100,0,5000,5000,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'The Lich King - Script - Say Line 0'), +(3130100,9,2,0,0,0,100,0,1000,1000,0,0,11,53274,0,0,0,0,0,1,0,0,0,0,0,0,0,'The Lich King - Script - Cast Icebound Visage'), +(3130100,9,3,0,0,0,100,0,4000,4000,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'The Lich King - Script - Say Line 1'), +(3130100,9,4,0,0,0,100,0,5000,5000,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'The Lich King - Script - Say Line 2'), +(3130100,9,5,0,0,0,100,0,5000,5000,0,0,1,3,0,0,0,0,0,1,0,0,0,0,0,0,0,'The Lich King - Script - Say Line 3'), +(3130100,9,6,0,0,0,100,0,5000,5000,0,0,1,4,0,0,0,0,0,1,0,0,0,0,0,0,0,'The Lich King - Script - Say Line 4'), +(3130100,9,7,0,0,0,100,0,3000,3000,0,0,1,0,0,0,0,0,0,19,31428,0,0,0,0,0,0,'The Lich King - Script - Say Line 0 (Crusader Olakin Sainrith)'), +(3130100,9,8,0,0,0,100,0,2000,2000,0,0,45,1,1,0,0,0,0,19,30698,0,0,0,0,0,0,'The Lich King - Script - Set Data 1 1 on Morbidus'), +(3130100,9,9,0,0,0,100,0,0,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'The Lich King - Script - Despawn'); + +UPDATE `smart_scripts` SET `event_type`=7 WHERE `entryorguid`=4880 AND `source_type`=0 AND `id`=28 AND `link`=0; + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=10060; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(15, 10060, 0, 0, 0, 29, 0, 30698, 200, 0, 0, 0, 0, '', 'Margrave Dhakar only show gossip if Morbidus near'), +(15, 10060, 0, 0, 0, 36, 0, 0, 0, 0, 0, 0, 0, '', 'Margrave Dhakar only show gossip if Morbidus is alive'), +(15, 10060, 0, 0, 0, 9, 0, 13235, 0, 0, 0, 0, 0, '', 'Margrave Dhakar only show gossip if player has The Flesh Giant Champion taken'); diff --git a/sql/updates/world/2014_12_05_01_world.sql b/sql/updates/world/2014_12_05_01_world.sql new file mode 100644 index 00000000000..913ae3552a2 --- /dev/null +++ b/sql/updates/world/2014_12_05_01_world.sql @@ -0,0 +1,17 @@ +UPDATE `creature_template` SET `ainame`='SmartAI', `scriptname`='' WHERE `entry` =23720; +UPDATE `gameobject_template` SET `AIName`='SmartGameObjectAI', `ScriptName`='' WHERE `entry`=186287; + +DELETE FROM `smart_scripts` WHERE `entryorguid`=186287 AND `source_type`=1; +DELETE FROM `smart_scripts` WHERE `entryorguid`=23720 AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid`=18628700 AND `source_type`=9; + +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(186287, 1, 0, 1, 70, 0, 100, 0, 2, 0, 0, 0, 64, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Blackhoof Cage - On State Changed - Store Targetlist'), +(186287, 1, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 80, 18628700, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Blackhoof Cage - On State Changed - Run Script'), +(23720, 0, 0, 1, 38, 0, 100, 0, 1, 1, 0, 0, 1, 0, 2000, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Theramore Prisoner - On Data Set - Say'), +(23720, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 33, 23720, 0, 0, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 'Theramore Prisoner - Linked with Previous Event - Give Kill Credit'), +(23720, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 41, 5000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Theramore Prisoner - Linked with Previous Event - Despawn after 5 seconds'), +(23720, 0, 3, 0, 52, 0, 100, 0, 0, 23720, 0, 0, 46, 10, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Theramore Prisoner - Linked with Previous Event - Move Foward'), +(18628700, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 100, 1, 0, 0, 0, 0, 0, 9, 23720, 0, 5, 0, 0, 0, 0, 'Blackhoof Cage - Script - Send Targetlist to Theramore Prisoner'), +(18628700, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 9, 23720, 0, 5, 0, 0, 0, 0, 'Blackhoof Cage - Script - Set Data'), +(18628700, 9, 2, 0, 0, 0, 100, 0, 430000, 430000, 0, 0, 32, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Blackhoof Cage - Script - Reset Go'); diff --git a/sql/updates/world/2014_12_09_00_world.sql b/sql/updates/world/2014_12_09_00_world.sql new file mode 100644 index 00000000000..92a6caabb4c --- /dev/null +++ b/sql/updates/world/2014_12_09_00_world.sql @@ -0,0 +1,73 @@ +DELETE FROM `spell_area` WHERE `spell`=58932; +DELETE FROM `spell_area` WHERE `spell`=60778; + +INSERT INTO `spell_area` (`spell`, `area`, `quest_start`, `quest_end`,`racemask`, `autocast`, `gender`, `quest_start_status`, `quest_end_status`) VALUES(58932, 4171, 12499, 0,1101, 1,2,64,11), +(58932, 4171, 12499, 0,0, 1,2,64,11), +(58932, 4172, 12499, 0,0, 1,2,64,11), +(58932, 4171, 12500, 0,0, 1,2,64,11), +(58932, 4172, 12500, 0,0, 1,2,64,11), +(60778, 4171, 12499, 0,0, 1,2,64,11), +(60778, 4172, 12499, 0,0, 1,2,64,11), +(60778, 4171, 12500, 0,0, 1,2,64,11), +(60778, 4172, 12500, 0,0, 1,2,64,11); + +DELETE FROM `creature_text` WHERE `entry` IN(31333,31334); +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `BroadcastTextID`, `comment`) VALUES +(31333, 0, 0, 'No, my beloved.', 12, 0, 100, 1, 0, 0, 32040, 'Alexstrasza the Life-Binder to Player'), +(31333, 1, 0, 'They must not discover the fate of the young paladin. Not yet.', 12, 11, 100, 5, 0, 0, 32041, 'Alexstrasza the Life-Binder to Player'), +(31333, 2, 0, 'Come to me, $n.', 15, 0, 100, 0, 0, 0, 32048, 'Alexstrasza the Life-Binder to Player'), +(31334, 0, 0, 'My Queen, do they know?', 12, 0, 100, 6, 0, 0, 32038, 'Korialstrasz to Player'), +(31334, 1, 0, '%s nods.', 16, 0, 100, 0, 0, 0, 32046, 'Korialstrasz to Player'), +(31334, 2, 0, 'They will not.', 12, 0, 100, 1, 0, 0, 32047, 'Korialstrasz to Player'); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=10179; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceEntry`=31333; + +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(15, 10179, 0, 0, 0, 8, 0, 12499, 0, 0, 0, 0, 0, '', 'Alexstrasza the Life-Binder - Show Gossip if player is rewarded for Return To Angrathar'), +(15, 10179, 0, 0, 1, 8, 0, 12500, 0, 0, 0, 0, 0, '', 'Alexstrasza the Life-Binder - Show Gossip if player is rewarded for Return To Angrathar'), +(22, 3, 31333, 0, 0, 8, 0, 12499, 0, 0, 0, 0, 0, '', 'Alexstrasza the Life-Binder - Run AI only if player is rewarded for Return To Angrathar'), +(22, 3, 31333, 0, 1, 8, 0, 12500, 0, 0, 0, 0, 0, '', 'Alexstrasza the Life-Binder - Run AI only if player is rewarded for Return To Angrathar'); + +UPDATE `creature_template` SET `ainame`='SmartAI', `scriptname`='', `npcflag`=3 WHERE `entry`=31333; + +DELETE FROM `smart_scripts` WHERE `entryorguid`=31333 AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid`=3133300 AND `source_type`=9; + +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(31333,0,0,1,62,0,100,0,10179,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Alexstrasza the Life-Binder - On Gossip Option select - Close Gossip'), +(31333,0,1,0,61,0,100,0,0,0,0,0,68,14,0,0,0,0,0,7,0,0,0,0,0,0,0,'Alexstrasza the Life-Binder - On Gossip Option select - Play Movie'), +(31333,0,2,3,10,0,100,0,1,40,120000,120000,64,1,0,0,0,0,0,7,0,0,0,0,0,0,0,'Alexstrasza the Life-Binder - OOC Los - Store Targetlist'), +(31333,0,3,0,61,0,100,0,0,0,0,0,80,3133300,2,0,0,0,0,1,0,0,0,0,0,0,0,'Alexstrasza the Life-Binder - OOC Los - Run Script'), +(3133300,9,0,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,19,31334,0,0,0,0,0,0,'Alexstrasza the Life-Binder - Script - Say Line 0 (Korialstrasz)'), +(3133300,9,1,0,0,0,100,0,6000,6000,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Alexstrasza the Life-Binder - Script - Say Line 0 (Alexstrasza the Life-Binder)'), +(3133300,9,2,0,0,0,100,0,3000,3000,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Alexstrasza the Life-Binder - Script - Say Line 1 (Alexstrasza the Life-Binder)'), +(3133300,9,3,0,0,0,100,0,4000,4000,0,0,1,1,0,0,0,0,0,19,31334,0,0,0,0,0,0,'Alexstrasza the Life-Binder - Script - Say Line 1 (Korialstrasz)'), +(3133300,9,4,0,0,0,100,0,3000,3000,0,0,1,2,0,0,0,0,0,19,31334,0,0,0,0,0,0,'Alexstrasza the Life-Binder - Script - Say Line 2 (Korialstrasz)'), +(3133300,9,5,0,0,0,100,0,4000,4000,0,0,1,2,0,0,0,0,0,12,1,0,0,0,0,0,0,'Alexstrasza the Life-Binder - Script - Say Line 2 (Alexstrasza the Life-Binder)'); + +DELETE FROM `creature_template_addon` WHERE `entry` IN (31328, 31330, 26850, 31293, 31333, 28348, 31334, 31292, 31295, 31291, 31308, 31294, 31298, 31285, 31309, 31296, 31358, 31297, 31299, 31313, 31310, 26877); +INSERT INTO `creature_template_addon` (`entry`, `mount`, `bytes1`, `bytes2`, `auras`) VALUES +(31328, 0, 0x0, 0x1, ''), -- 31328 +(31330, 0, 0x0, 0x1, ''), -- 31330 +(26850, 0, 0x0, 0x101, ''), -- 26850 +(31293, 0, 0x10007, 0x1, '29266'), -- 31293 - 29266 +(31333, 0, 0x3000001, 0x1, '60778'), -- 31333 - 60778 +(28348, 0, 0x10000, 0x1, ''), -- 28348 +(31334, 0, 0x3000001, 0x1, ''), -- 31334 +(31292, 0, 0x10007, 0x1, '29266'), -- 31292 - 29266 +(31295, 0, 0x10007, 0x1, '29266'), -- 31295 - 29266 +(31291, 0, 0x10000, 0x1, ''), -- 31291 +(31308, 0, 0x10007, 0x1, '29266'), -- 31308 - 29266 +(31294, 0, 0x10007, 0x1, '29266'), -- 31294 - 29266 +(31298, 0, 0x10007, 0x1, '29266'), -- 31298 - 29266 +(31285, 0, 0x10007, 0x1, '29266'), -- 31285 - 29266 +(31309, 0, 0x10007, 0x1, '29266'), -- 31309 - 29266 +(31296, 0, 0x10007, 0x1, '29266'), -- 31296 - 29266 +(31358, 0, 0x0, 0x1, ''), -- 31358 +(31297, 0, 0x10007, 0x1, '29266'), -- 31297 - 29266 +(31299, 0, 0x10007, 0x1, '29266'), -- 31299 - 29266 +(31313, 0, 0x0, 0x1, ''), -- 31313 +(31310, 0, 0x0, 0x1, ''), -- 31310 +(26877, 0, 0x0, 0x101, ''); -- 26877 + diff --git a/sql/updates/world/2014_12_09_01_world.sql b/sql/updates/world/2014_12_09_01_world.sql new file mode 100644 index 00000000000..80bb200d19b --- /dev/null +++ b/sql/updates/world/2014_12_09_01_world.sql @@ -0,0 +1,55 @@ +SET @CGUID := 75045; + +DELETE FROM `creature` WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+18 AND `id` IN(31328,31330,31310,31313); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `MovementType`) VALUES +(@CGUID+0, 31328, 571, 1, 2,4897.725, 1335.234, 231.006, 5.068347, 120, 0, 0), -- 31328 (Area: 4171) +(@CGUID+1, 31330, 571, 1, 2,4939.318, 1323.521, 235.045, 4.453136, 120, 0, 0), -- 31330 (Area: 4171) +(@CGUID+2, 31313, 571, 1, 2,4664.651, 1447.415, 170.8568, 3.301515, 120, 0, 0), -- 31313 (Area: 4171) +(@CGUID+3, 31310, 571, 1, 2,4702.17, 1552.966, 249.4346, 2.188437, 120, 5, 1), -- 31310 (Area: 4171) (possible waypoints or random movement) +(@CGUID+4, 31313, 571, 1, 2,4702.964, 1557.946, 247.5312, 1.604996, 120, 0, 0), -- 31313 (Area: 4171) +(@CGUID+5, 31310, 571, 1, 2,4648.25, 1422.38, 170.9548, 1.993341, 120, 0, 0), -- 31310 (Area: 4171) +(@CGUID+6, 31330, 571, 1, 2,4806.307, 1318.516, 168.6461, 1.844061, 120, 0, 0), -- 31330 (Area: 4171) +(@CGUID+7, 31328, 571, 1, 2,4793.399, 1329.59, 170.9456, 2.494735, 120, 0, 0), -- 31328 (Area: 4171) +(@CGUID+8, 31330, 571, 1, 2,4800.977, 1323.843, 170.5469, 2.492624, 120, 0, 0), -- 31330 (Area: 4171) +(@CGUID+9, 31330, 571, 1, 2,4928.894, 1297.723, 230.3787, 4.188883, 120, 5, 1), -- 31330 (Area: 4171) (possible waypoints or random movement) +(@CGUID+10, 31330, 571, 1, 2,4901.572, 1317.947, 229.5681, 5.172978, 120, 5, 1), -- 31330 (Area: 4171) (possible waypoints or random movement) +(@CGUID+11, 31330, 571, 1, 2,4897.755, 1335.152, 231.0011, 5.068347, 120, 0, 0), -- 31330 (Area: 4171) +(@CGUID+12, 31310, 571, 1, 2,4701.083, 1410.821, 172.1171, 4.542583, 120, 0, 0), -- 31310 (Area: 4171) +(@CGUID+13, 31310, 571, 1, 2,4714.932, 1432.092, 174.4268, 5.404375, 120, 0, 0), -- 31310 (Area: 4171) +(@CGUID+14, 31330, 571, 1, 2,4767.026, 1300.882, 159.1799, 3.967742, 120, 0, 0), -- 31330 (Area: 4171) +(@CGUID+15, 31330, 571, 1, 2,4783.351, 1313.886, 165.2287, 3.801694, 120, 0, 0), -- 31330 (Area: 4171) +(@CGUID+16, 31310, 571, 1, 2,4726.307, 1305.983, 152.4278, 4.304676, 120, 0, 0), -- 31310 (Area: 4171) +(@CGUID+17, 31313, 571, 1, 2,4709.668, 1412.268, 174.0422, 5.927182, 120, 0, 0), -- 31313 (Area: 4171) +(@CGUID+18, 31310, 571, 1, 2,4709.66, 1415.296, 174.3237, 5.371386, 120, 0, 0); -- 31310 (Area: 4171) + +UPDATE `creature_template` SET `ainame`='SmartAI', `scriptname`='' WHERE `entry` IN(31310,31313,31328,31330); + +DELETE FROM `smart_scripts` WHERE `entryorguid` IN(31310,31313,31328,31330) AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid`IN(3131000,3131001,3131002,3131003,3131004,3131005,3131006,3131007,3131008) AND `source_type`=9; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(31313,0,0,1,11,0,100,0,0,0,0,0,59,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Fleeing Alliance Soldier - On Spawn - Set Run On'), +(31313,0,1,2,61,0,100,0,0,0,0,0,89,30,0,0,0,0,0,1,0,0,0,0,0,0,0,'Fleeing Alliance Soldier - On Spawn - Set Random Movement'), +(31313,0,2,0,61,0,100,0,0,0,0,0,11,52385,0,0,0,0,0,1,0,0,0,0,0,0,0,'Fleeing Alliance Soldier - On Spawn - Cast Cosmetic - Periodic Cower'), +(31313,0,3,0,1,0,100,0,0,3000,1000,3000,87,3131005,3131006,3131007,3131008,0,0,1,0,0,0,0,0,0,0,'Fleeing Alliance Soldier - OOC - Run Random Script'), +(31330,0,0,1,11,0,100,0,0,0,0,0,59,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Fleeing Horde Soldier - On Spawn - Set Run On'), +(31330,0,1,2,61,0,100,0,0,0,0,0,89,30,0,0,0,0,0,1,0,0,0,0,0,0,0,'Fleeing Horde Soldier - On Spawn - Set Random Movement'), +(31330,0,2,0,61,0,100,0,0,0,0,0,11,52385,0,0,0,0,0,1,0,0,0,0,0,0,0,'Fleeing Horde Soldier - On Spawn - Cast Cosmetic - Periodic Cower'), +(31330,0,3,0,1,0,100,0,0,3000,1000,3000,87,3131005,3131006,3131007,3131008,0,0,1,0,0,0,0,0,0,0,'Fleeing Horde Soldier - OOC - Run Random Script'), +(31310,0,0,1,11,0,100,0,0,0,0,0,59,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Fleeing Alliance Soldier - On Spawn - Set Run On'), +(31310,0,1,2,61,0,100,0,0,0,0,0,89,30,0,0,0,0,0,1,0,0,0,0,0,0,0,'Fleeing Alliance Soldier - On Spawn - Set Random Movement'), +(31310,0,2,0,61,0,100,0,0,0,0,0,11,52385,0,0,0,0,0,1,0,0,0,0,0,0,0,'Fleeing Alliance Soldier - On Spawn - Cast Cosmetic - Periodic Cower'), +(31310,0,3,0,1,0,100,0,0,3000,1000,3000,87,3131000,3131001,3131002,3131003,3131004,0,1,0,0,0,0,0,0,0,'Fleeing Alliance Soldier - OOC - Run Random Script'), +(31328,0,0,1,11,0,100,0,0,0,0,0,59,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Fleeing Horde Soldier - On Spawn - Set Run On'), +(31328,0,1,2,61,0,100,0,0,0,0,0,89,30,0,0,0,0,0,1,0,0,0,0,0,0,0,'Fleeing Horde Soldier - On Spawn - Set Random Movement'), +(31328,0,2,0,61,0,100,0,0,0,0,0,11,52385,0,0,0,0,0,1,0,0,0,0,0,0,0,'Fleeing Horde Soldier - On Spawn - Cast Cosmetic - Periodic Cower'), +(31328,0,3,0,1,0,100,0,0,3000,1000,3000,87,3131000,3131001,3131002,3131003,3131004,0,1,0,0,0,0,0,0,0,'Fleeing Horde Soldier - OOC - Run Random Script'), + +(3131000,9,0,0,0,0,100,0,0,0,0,0,4,14994,0,0,0,0,0,1,0,0,0,0,0,0,0,'Fleeing Soldier - Script 1 - Play Sound 14994'), +(3131001,9,0,0,0,0,100,0,0,0,0,0,4,14991,0,0,0,0,0,1,0,0,0,0,0,0,0,'Fleeing Soldier - Script 2 - Play Sound 14991'), +(3131002,9,0,0,0,0,100,0,0,0,0,0,4,14993,0,0,0,0,0,1,0,0,0,0,0,0,0,'Fleeing Soldier - Script 3 - Play Sound 14993'), +(3131003,9,0,0,0,0,100,0,0,0,0,0,4,14992,0,0,0,0,0,1,0,0,0,0,0,0,0,'Fleeing Soldier - Script 4 - Play Sound 14992'), +(3131004,9,0,0,0,0,100,0,0,0,0,0,4,15005,0,0,0,0,0,1,0,0,0,0,0,0,0,'Fleeing Soldier - Script 5 - Play Sound 15005'), +(3131005,9,0,0,0,0,100,0,0,0,0,0,4,14990,0,0,0,0,0,1,0,0,0,0,0,0,0,'Fleeing Soldier - Script 6 - Play Sound 14990'), +(3131006,9,0,0,0,0,100,0,0,0,0,0,4,14988,0,0,0,0,0,1,0,0,0,0,0,0,0,'Fleeing Soldier - Script 7 - Play Sound 14988'), +(3131007,9,0,0,0,0,100,0,0,0,0,0,4,14989,0,0,0,0,0,1,0,0,0,0,0,0,0,'Fleeing Soldier - Script 8 - Play Sound 14989'), +(3131008,9,0,0,0,0,100,0,0,0,0,0,4,14987,0,0,0,0,0,1,0,0,0,0,0,0,0,'Fleeing Soldier - Script 9 - Play Sound 14987'); diff --git a/sql/updates/world/2014_12_09_02_world.sql b/sql/updates/world/2014_12_09_02_world.sql new file mode 100644 index 00000000000..c5e9d832266 --- /dev/null +++ b/sql/updates/world/2014_12_09_02_world.sql @@ -0,0 +1,11 @@ +-- Apprentice Ralen SAI +DELETE FROM `smart_scripts` WHERE `entryorguid`=15941 AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(15941,0,0,1,8,0,100,0,27907,0,15000,15000,33,15941,0,0,0,0,0,7,0,0,0,0,0,0,0,"Apprentice Ralen - On Spellhit 'Disciplinary Rod' - Quest Credit 'Swift Discipline'"), +(15941,0,1,0,61,0,100,0,27907,0,15000,15000,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Apprentice Ralen - On Spellhit 'Disciplinary Rod' - Say Line 0"); + +-- Apprentice Meledor SAI +DELETE FROM `smart_scripts` WHERE `entryorguid`=15945 AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(15945,0,0,1,8,0,100,0,27907,0,15000,15000,33,15945,0,0,0,0,0,7,0,0,0,0,0,0,0,"Apprentice Meledor - On Spellhit 'Disciplinary Rod' - Quest Credit 'Swift Discipline'"), +(15945,0,1,0,61,0,100,0,27907,0,15000,15000,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Apprentice Meledor - On Spellhit 'Disciplinary Rod' - Say Line 0"); diff --git a/sql/updates/world/2014_12_09_03_world.sql b/sql/updates/world/2014_12_09_03_world.sql new file mode 100644 index 00000000000..2d4d7454b09 --- /dev/null +++ b/sql/updates/world/2014_12_09_03_world.sql @@ -0,0 +1,43 @@ +UPDATE `creature_template` SET `ainame`='SmartAI', `scriptname`='' WHERE `entry` IN(33877,33761,33861,33862); + +DELETE FROM `smart_scripts` WHERE `entryorguid` IN(33877,33761,33861,33862) AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid` IN(19455501,19455503) AND `source_type`=9; + +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(19455501, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 104, 16, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Archivum Console - Script 2 - Set Go Flags '), +(19455501, 9, 1, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 1, 3, 0, 0, 0, 0, 0, 19, 33874, 0, 0, 0, 0, 0, 0, 'Archivum Console - Script 2 - Say Text Line 3 on Archivum System '), +(19455501, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 12, 33876, 3, 67000, 0, 0, 0, 8, 0, 0, 0, 1438.32, 118.523, 425.434, 0, 'Archivum Console - Script 2 - Spawn Freya Image '), +(19455501, 9, 3, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 1, 4, 0, 0, 0, 0, 0, 19, 33874, 0, 0, 0, 0, 0, 0, 'Archivum Console - Script 2 - Say Text Line 4 on Archivum System '), +(19455501, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 12, 33861, 3, 58000, 0, 0, 0, 8, 0, 0, 0, 1435.8, 118.855, 425.881, 0, 'Archivum Console - Script 2 - Spawn Elder Brightleaf Image'), +(19455501, 9, 5, 0, 0, 0, 100, 0, 0, 0, 0, 0, 12, 33862, 3, 58000, 0, 0, 0, 8, 0, 0, 0, 1435.71, 120.41, 425.823, 0, 'Archivum Console - Script 2 - Spawn Elder Stonebark Image'), +(19455501, 9, 6, 0, 0, 0, 100, 0, 0, 0, 0, 0, 12, 33761, 3, 58000, 0, 0, 0, 8, 0, 0, 0, 1435.77, 117.288, 425.838, 0, 'Archivum Console - Script 2 - Spawn Elder Ironbark Image'), +(19455501, 9, 7, 0, 0, 0, 100, 0, 9000, 9000, 0, 0, 1, 5, 0, 0, 0, 0, 0, 19, 33874, 0, 0, 0, 0, 0, 0, 'Archivum Console - Script 2 - Say Text Line 5 on Archivum System '), +(19455501, 9, 8, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, 33761, 0, 0, 0, 0, 0, 0, 'Archivum Console - Script 2 - Set Data on Elder Brightleaf Image'), +(19455501, 9, 9, 0, 0, 0, 100, 0, 9000, 9000, 0, 0, 1, 6, 0, 0, 0, 0, 0, 19, 33874, 0, 0, 0, 0, 0, 0, 'Archivum Console - Script 2 - Say Text Line 6 on Archivum System '), +(19455501, 9, 10, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, 33862, 0, 0, 0, 0, 0, 0, 'Archivum Console - Script 2 - Set Data on Elder Stonebark Image'), +(19455501, 9, 11, 0, 0, 0, 100, 0, 9000, 9000, 0, 0, 1, 7, 0, 0, 0, 0, 0, 19, 33874, 0, 0, 0, 0, 0, 0, 'Archivum Console - Script 2 - Say Text Line 7 on Archivum System'), +(19455501, 9, 12, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, 33861, 0, 0, 0, 0, 0, 0, 'Archivum Console - Script 2 - Set Data on Elder Ironbranch Image'), +(19455501, 9, 13, 0, 0, 0, 100, 0, 9000, 9000, 0, 0, 1, 8, 0, 0, 0, 0, 0, 19, 33874, 0, 0, 0, 0, 0, 0, 'Archivum Console - Script 2 - Say Text Line 8 on Archivum System'), +(19455501, 9, 14, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 19, 33761, 0, 0, 0, 0, 0, 0, 'Archivum Console - Script 2 - Set Data on Elder Brightleaf Image'), +(19455501, 9, 15, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 19, 33862, 0, 0, 0, 0, 0, 0, 'Archivum Console - Script 2 - Set Data on Elder Stonebark Image'), +(19455501, 9, 16, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 19, 33861, 0, 0, 0, 0, 0, 0, 'Archivum Console - Script 2 - Set Data on Elder Ironbranch Image'), +(19455501, 9, 17, 0, 0, 0, 100, 0, 9000, 9000, 0, 0, 1, 9, 0, 0, 0, 0, 0, 19, 33874, 0, 0, 0, 0, 0, 0, 'Archivum Console - Script 2 - Say Text Line 9 on Archivum System'), +(19455501, 9, 18, 0, 0, 0, 100, 0, 13000, 13000, 0, 0, 104, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Archivum Console - Script 2 - Set Go Flags '), +(19455503, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 104, 16, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Archivum Console - Script 4 - Set Go Flags '), +(19455503, 9, 1, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 1, 15, 0, 0, 0, 0, 0, 19, 33874, 0, 0, 0, 0, 0, 0, 'Archivum Console - Script 4 - Say Text Line 15 on Archivum System '), +(19455503, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 12, 33878, 3, 40000, 0, 0, 0, 8, 0, 0, 0, 1436.22, 118.364, 425.789, 0, 'Archivum Console - Script 4 - Spawn Thorim Image'), +(19455503, 9, 3, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 1, 16, 0, 0, 0, 0, 0, 19, 33874, 0, 0, 0, 0, 0, 0, 'Archivum Console - Script 4 - Say Text Line 16 on Archivum System '), +(19455503, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 12, 33877, 3, 31000, 0, 0, 0, 8, 0, 0, 0, 1436.14, 120.3, 425.839, 4.95674, 'Archivum Console - Script 4 - Spawn Sif Image'), +(19455503, 9, 5, 0, 0, 0, 100, 0, 4000, 4000, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, 33877, 0, 0, 0, 0, 0, 0, 'Archivum Console - Script 4 - Set Data on Sif Image'), +(19455503, 9, 6, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 1, 17, 0, 0, 0, 0, 0, 19, 33874, 0, 0, 0, 0, 0, 0, 'Archivum Console - Script 4 - Say Text Line 17 on Archivum System '), +(19455503, 9, 7, 0, 0, 0, 100, 0, 9000, 9000, 0, 0, 1, 18, 0, 0, 0, 0, 0, 19, 33874, 0, 0, 0, 0, 0, 0, 'Archivum Console - Script 4 - Say Text Line 18 on Archivum System '), +(19455503, 9, 8, 0, 0, 0, 100, 0, 13000, 13000, 0, 0, 104, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Archivum Console - Script 4 - Set Go Flags '), +(33761,0,0,0,38,0,100,0,1,1,0,0,11,64201,0,0,0,0,0,1,0,0,0,0,0,0,0,'Elder Brightleaf Image - On Data Set - Cast Sunbeam'), +(33862,0,0,0,38,0,100,0,1,1,0,0,11,64228,0,0,0,0,0,1,0,0,0,0,0,0,0,'Elder Stonebark Image - On Data Set - Cast Ground Tremor'), +(33861,0,0,0,38,0,100,0,1,1,0,0,11,64229,0,0,0,0,0,1,0,0,0,0,0,0,0,'Elder Ironbranch Image - On Data Set - Cast Iron Roots'), +(33761,0,1,0,38,0,100,0,2,2,0,0,11,64269,0,0,0,0,0,19,33876,0,0,0,0,0,0,'Elder Brightleaf Image - On Data Set - Cast Hologram Freya Channel'), +(33862,0,1,0,38,0,100,0,2,2,0,0,11,64269,0,0,0,0,0,19,33876,0,0,0,0,0,0,'Elder Stonebark Image - On Data Set - Cast Hologram Freya Channel'), +(33861,0,1,0,38,0,100,0,2,2,0,0,11,64269,0,0,0,0,0,19,33876,0,0,0,0,0,0,'Elder Ironbranch Image - On Data Set - Cast Hologram Freya Channel'), +(33877,0,0,0,38,0,100,0,1,1,0,0,11,64324,0,0,0,0,0,19,33878,0,0,0,0,0,0,'Sif Image - On Data Set - Cast Hologram Sif Channel'); + +UPDATE `gossip_menu_option` SET `BoxBroadcastTextID`=0 WHERE `menu_id`=10368; diff --git a/sql/updates/world/2014_12_09_04_world.sql b/sql/updates/world/2014_12_09_04_world.sql new file mode 100644 index 00000000000..db6fd4dc8c4 --- /dev/null +++ b/sql/updates/world/2014_12_09_04_world.sql @@ -0,0 +1,13 @@ +SET @CGUID := 75064; + +DELETE FROM `creature` WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+3 AND `id`=24921; +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `MovementType`) VALUES +(@CGUID+0, 24921, 603, 3, 1, 1437.423, 117.3453, 425.8442, 0, 7200, 0, 0), -- 24921 (Area: 0) (Auras: ) +(@CGUID+1, 24921, 603, 3, 1, 1437.352, 115.7263, 425.8618, 0, 7200, 0, 0), -- 24921 (Area: 0) (Auras: ) +(@CGUID+2, 24921, 603, 3, 1, 1437.107, 118.4796, 425.813, 0, 7200, 0, 0), -- 24921 (Area: 0) (Auras: ) +(@CGUID+3, 24921, 603, 3, 1, 1436.955, 118.8366, 425.8709, 0, 7200, 0, 0); -- 24921 (Area: 0) (Auras: ) + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry` IN(64201,64229); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(13, 1, 64201, 0, 0, 31, 0, 3, 24921, 0, 0, 0, 0, '', 'Sunbeam Targets Cosmetic Trigger - LAB'), +(13, 1, 64229, 0, 0, 31, 0, 3, 24921, 0, 0, 0, 0, '', 'Iron Roots Targets Cosmetic Trigger - LAB'); diff --git a/sql/updates/world/2014_12_11_00_world.sql b/sql/updates/world/2014_12_11_00_world.sql new file mode 100644 index 00000000000..cf0b3f80eb0 --- /dev/null +++ b/sql/updates/world/2014_12_11_00_world.sql @@ -0,0 +1,2 @@ +UPDATE `gameobject` SET `state`=1 WHERE `id`=195310 AND `guid` IN(61663,61683); +UPDATE `gameobject` SET `position_x`=4020.56, `position_y`=5895.08, `position_z`=267.871 WHERE `guid`=13355; diff --git a/sql/updates/world/2014_12_11_01_world.sql b/sql/updates/world/2014_12_11_01_world.sql new file mode 100644 index 00000000000..9306d27f68b --- /dev/null +++ b/sql/updates/world/2014_12_11_01_world.sql @@ -0,0 +1,3 @@ +-- +INSERT INTO `spell_bonus_data` (`entry`, `comments`) VALUES +(14792, 'Venomhide Poison - should not get bonuses'); diff --git a/sql/updates/world/2014_12_12_00_world.sql b/sql/updates/world/2014_12_12_00_world.sql new file mode 100644 index 00000000000..bf1854689b3 --- /dev/null +++ b/sql/updates/world/2014_12_12_00_world.sql @@ -0,0 +1,34 @@ +-- Spawn few missing Bloodcursed Voyagers +SET @CGUID := 75068; +DELETE FROM `creature` WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+13; +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `MovementType`) VALUES +(@CGUID+0, 17714, 530, 1, 1, -981.0825, -12847.73, -78.35015, 2.45272, 120, 5, 1), +(@CGUID+1, 17714, 530, 1, 1, -981.314, -12813.58, -51.96035, 0.8106143, 120, 5, 1), +(@CGUID+2, 17714, 530, 1, 1, -1135.072, -12931.56, -98.48705, 2.435335, 120, 5, 1), +(@CGUID+3, 17714, 530, 1, 1, -1119.166, -12949.73, -99.68898, 2.535294, 120, 5, 1), +(@CGUID+4, 17714, 530, 1, 1, -1151.618, -12952.28, -101.0686, 2.985196, 120, 5, 1), +(@CGUID+5, 17714, 530, 1, 1, -1150.575, -12917.89, -101.5449, 3.950372, 120, 5, 1), +(@CGUID+6, 17714, 530, 1, 1, -1201.324, -12933.42, -102.7079, 1.193372, 120, 5, 1), +(@CGUID+7, 17714, 530, 1, 1, -1183.288, -12912.58, -102.4625, 3.731045, 120, 5, 1), +(@CGUID+8, 17714, 530, 1, 1, -1221.537, -12954.43, -104.158, 4.284279, 120, 5, 1), +(@CGUID+9, 17714, 530, 1, 1, -1252.931, -12952.77, -104.744, 3.633311, 120, 5, 1), +(@CGUID+10, 17714, 530, 1, 1, -1134.563, -12897.89, -102.6108, 2.934096, 120, 5, 1), +(@CGUID+11, 17714, 530, 1, 1, -1147.651, -12879.45, -102.4199, 4.143747, 120, 5, 1), +(@CGUID+12, 17714, 530, 1, 1, -1411.555, -12765.24, -16.17389, 1.595299, 120, 5, 1), +(@CGUID+13, 17714, 530, 1, 1, -1415.727, -12795.06, -15.76654, 1.830911, 120, 5, 1); + +DELETE FROM `gossip_menu_option` WHERE (`menu_id`=8298 AND `id`=0); +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `option_id`, `OptionBroadcastTextID`, `npc_option_npcflag`, `box_coded`, `box_money`, `box_text`) VALUES +(8298, 0, 0, 'Can you cast the spell to help me breathe and move underwater?', 1, 19071, 1, 0, 0, ''); -- 17712 + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 15 AND `SourceGroup` = 8298; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `Comment`) VALUES +(15, 8298, 0, 0, 0, 9, 0, 9674, 0, 0, 0, 0, 0, 'Captain Edward Hanes - Show Gossip if player has quest 9674 incomplete'), +(15, 8298, 0, 0, 1, 9, 0, 9682, 0, 0, 0, 0, 0, 'Captain Edward Hanes - Show Gossip if player has quest 9682 incomplete'); + +DELETE FROM `smart_scripts` WHERE `entryorguid` = 17712 AND `id` IN (1, 2, 3, 4); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(17712,0,1,2,62,0,100,0,8298,0,0,0,11,31319,0,0,0,0,0,7,0,0,0,0,0,0,0,'Captain Edward Hanes - On Gossip Select - Cast "The Captain\'s Kiss"'), +(17712,0,2,0,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Captain Edward Hanes - On Gossip Select - Close Gossip'), +(17712,0,3,0,19,0,100,0,9674,0,0,0,11,31319,0,0,0,0,0,7,0,0,0,0,0,0,0,'Captain Edward Hanes - On Quest Accept - Cast "The Captain\'s Kiss"'), +(17712,0,4,0,19,0,100,0,9682,0,0,0,11,31319,0,0,0,0,0,7,0,0,0,0,0,0,0,'Captain Edward Hanes - On Quest Accept - Cast "The Captain\'s Kiss"'); diff --git a/sql/updates/world/2014_12_12_01_world.sql b/sql/updates/world/2014_12_12_01_world.sql new file mode 100644 index 00000000000..740e6e962aa --- /dev/null +++ b/sql/updates/world/2014_12_12_01_world.sql @@ -0,0 +1,3 @@ +-- Ungroup some improperly grouped texts and set their text range +UPDATE `creature_text` SET `groupid` = 5, `TextRange` = 3 WHERE `entry` IN (16065, 16064, 30549, 16063) AND `groupid` = 1 AND `id` = 0; +UPDATE `creature_text` SET `groupid` = 6, `TextRange` = 3, `id` = 0 WHERE `entry` IN (16065, 16064, 30549, 16063) AND `groupid` = 1 AND `id` = 1; diff --git a/sql/updates/world/2014_12_13_00_world.sql b/sql/updates/world/2014_12_13_00_world.sql new file mode 100644 index 00000000000..3be9f73a293 --- /dev/null +++ b/sql/updates/world/2014_12_13_00_world.sql @@ -0,0 +1,6 @@ +-- Ungroup some improperly grouped texts and set their text range +UPDATE `creature_text` SET `TextRange` = 3 WHERE `entry` = 15990 AND `groupid` = 5; +UPDATE `creature_text` SET `groupid` = 16, `TextRange` = 3, `id` = 0 WHERE `entry` = 15990 AND `groupid` = 6 AND `id` = 0; +UPDATE `creature_text` SET `groupid` = 17, `TextRange` = 3, `id` = 0 WHERE `entry` = 15990 AND `groupid` = 6 AND `id` = 1; +UPDATE `creature_text` SET `groupid` = 18, `TextRange` = 3, `id` = 0 WHERE `entry` = 15990 AND `groupid` = 6 AND `id` = 2; +UPDATE `creature_text` SET `groupid` = 19, `TextRange` = 3, `id` = 0 WHERE `entry` = 15990 AND `groupid` = 6 AND `id` = 3; diff --git a/sql/updates/world/2014_12_14_00_world.sql b/sql/updates/world/2014_12_14_00_world.sql new file mode 100644 index 00000000000..3d6bf2d473d --- /dev/null +++ b/sql/updates/world/2014_12_14_00_world.sql @@ -0,0 +1,58 @@ +Set @Zootfizzle:= 28374; +Set @Dorian:= 28376; +Set @Hemet:= 28451; +Set @Stampy:= 28468; +DELETE FROM `vehicle_template_accessory` where `entry` in (@Stampy) AND `accessory_entry` in (@Hemet); +INSERT INTO `vehicle_template_accessory` (`entry`,`accessory_entry`,`seat_id`,`minion`,`description`,`summontype`,`summontimer`)VALUES +(@Stampy,@Hemet,1,1,'Stampy',8,0); +UPDATE creature_template SET npcflag= 16777216, spell1=51756, spell2=51751, spell3=51752 WHERE entry=@Stampy; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` in (@Zootfizzle, @Dorian, @Hemet, @Stampy); +DELETE FROM `npc_spellclick_spells` WHERE `npc_entry` in (@Stampy); +INSERT INTO `npc_spellclick_spells` (`npc_entry`, `spell_id`, `cast_flags`, `user_type`) VALUES +(@Stampy, 46598, 1, 0); +DELETE FROM `smart_scripts` WHERE `entryorguid` = @Dorian AND `source_type` = 0; +DELETE FROM `smart_scripts` WHERE `entryorguid` = @Dorian*100 AND `source_type` = 9; +DELETE FROM `smart_scripts` WHERE `entryorguid` = @Dorian*100+1 AND `source_type` = 9; +DELETE FROM `smart_scripts` WHERE `entryorguid` = @Hemet AND `source_type` = 0; +DELETE FROM `smart_scripts` WHERE `entryorguid` = @Hemet*100 AND `source_type` = 9; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(@Dorian, 0, 0, 0, 19, 0, 100, 0, 12614, 0, 0, 0, 11, 51757, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Dorian - On quest Accept - cast'), +(@Hemet, 0, 0, 0, 0, 0, 100, 0, 0, 0, 6000, 6000, 11, 51742, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Dorian - IC - cast'), +(@Hemet, 0, 1, 0, 0, 0, 100, 0, 2000, 2000, 15000, 15000, 11, 51740, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Dorian - IC - cast'), +(@Dorian, 0, 1, 0, 20, 0, 100, 0, 12614, 0, 0, 0, 80, @Dorian*100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Dorian - On quest rewarded - ActionList'), +(@Dorian*100, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 19, @Hemet, 20, 0, 0, 0, 0, 0, 'Dorian - ActionList - Despawn'), +(@Dorian*100, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 12, @Hemet, 5, 0, 0, 0, 0, 8, 0, 0, 0, 6448.532715, 5082.552734, -63.941204, 0.673032, 'Dorian - ActionList - Summon'), +(@Dorian*100, 9, 2, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 75, 59872, 0, 0, 0, 0, 0, 19, @Hemet, 20, 0, 0, 0, 0, 0, 'Dorian - ActionList - AddAura to trigger to triiger the event'), +(@Hemet, 0, 2, 0, 23, 0, 100, 0, 59872, 1, 0, 0, 80, @Hemet*100, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Hemet - HasAura - Actionlist'), +(@Hemet*100, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 28, 59872, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Hemet - Actionlist - Remove aura'), +(@Hemet*100, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Hemet - Actionlist - Talk'), +(@Hemet*100, 9, 2, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Hemet - Actionlist - Talk'), +(@Hemet*100, 9, 3, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Hemet - Actionlist - Talk'), +(@Hemet*100, 9, 4, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 1, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Hemet - Actionlist - Talk'), +(@Hemet*100, 9, 5, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 1, 4, 0, 0, 0, 0, 0, 21, 20, 0, 0, 0, 0, 0, 0, 'Hemet - Actionlist - Talk'), +(@Hemet*100, 9, 6, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 1, 5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Hemet - Actionlist - Talk'), +(@Hemet*100, 9, 7, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 6, 0, 0, 0, 0, 0, 21, 20, 0, 0, 0, 0, 0, 0, 'Hemet - Actionlist - Talk'), +(@Hemet*100, 9, 8, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Hemet - Actionlist - Talk'), +(@Hemet*100, 9, 9, 0, 0, 0, 100, 0, 4000, 4000, 0, 0, 1, 0, 0, 0, 0, 0, 0, 19, @Dorian, 20, 0, 0, 0, 0, 0, 'Hemet - Actionlist - Talk'), +(@Hemet*100, 9, 10, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Hemet - Actionlist - Despawn'), +-- Securing the Bait +(@Dorian, 0, 2, 0, 20, 0, 100, 0, 12605, 0, 0, 0, 80, @Dorian*100+1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Dorian - On quest rewarded - ActionList'), +(@Dorian*100+1, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 21, 10, 0, 0, 0, 0, 0, 0, 'Dorian - ActionList - talk'), +(@Dorian*100+1, 9, 1, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 1, 0, 0, 0, 0, 0, 0, 19, @Zootfizzle, 20, 0, 0, 0, 0, 0, 'Dorian - ActionList - talk'), +(@Dorian*100+1, 9, 2, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Dorian - ActionList - talk'), +(@Dorian*100+1, 9, 3, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 1, 1, 0, 0, 0, 0, 0, 19, @Zootfizzle, 20, 0, 0, 0, 0, 0, 'Dorian - ActionList - talk'); +Delete from `creature_text` where `entry` in (@Hemet, @Dorian, @Zootfizzle); +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`, `BroadcastTextID`) VALUES +(@Hemet, 0, 0, 'What a fight you missed, Dorian! It was one for the ages!', 12, 0, 100, 0, 0, 0, 'Hemet', 28026), +(@Hemet, 1, 0, 'There we were, riding into battle at full speed on the back of Stampy...', 12, 0, 100, 0, 0, 0, 'Hemet', 28027), +(@Hemet, 2, 0, 'Everything was shaking all over the place. I could hardly steady my gun.', 12, 0, 100, 0, 0, 0, 'Hemet', 28028), +(@Hemet, 3, 0, 'And then we saw her, the fearsome beast!', 12, 0, 100, 0, 0, 0, 'Hemet', 28029), +(@Hemet, 4, 0, 'It took all of $n''s skill to maintain control of Stampy.', 12, 0, 100, 0, 0, 0, 'Hemet', 28030), +(@Hemet, 5, 0, 'The battle was a haze of blood, lead, and sweat. The broodmother''s attacks came faster and faster!', 12, 0, 100, 0, 0, 0, 'Hemet', 28032), +(@Hemet, 6, 0, 'But, in the end, $n and I prevailed through our wits and teamwork. And now we have this glorious trophy as a memento of our victory.', 12, 0, 100, 0, 0, 0, 'Hemet', 28033), +(@Hemet, 7, 0, 'Do I detect a bit of jealousy, Dorian?', 12, 0, 100, 0, 0, 0, 'Hemet', 28036), +(@Dorian, 0, 0, 'Well, I don''t know. I was here tending the fire and discussing the drawbacks of cogs with Zootfizzle. That''s pretty epic, too, in its own way.', 12, 0, 100, 0, 0, 0, 'Dorian', 28037), +(@Dorian, 1, 0, 'It''s your lucky day, Zootfizzle. $n has brought back more hatchlings for you.', 12, 0, 100, 0, 0, 0, 'Dorian', 28892), +(@Dorian, 2, 0, 'Well, you can always go back to the camp and help Weslex with all his cogs...', 12, 0, 100, 0, 0, 0, 'Dorian', 28894), +(@Zootfizzle, 0, 0, 'I''m not here to be the keeper of your hatchlings, Dorian. I''m doing research of my own, as well.', 12, 0, 100, 0, 0, 0, 'Zootfizzle', 28893), +(@Zootfizzle, 1, 0, 'No, not the cogs! Anything but the cogs!', 12, 0, 100, 0, 0, 0, 'Zootfizzle', 28895); diff --git a/sql/updates/world/2014_12_14_01_world.sql b/sql/updates/world/2014_12_14_01_world.sql new file mode 100644 index 00000000000..3a66e2ce72f --- /dev/null +++ b/sql/updates/world/2014_12_14_01_world.sql @@ -0,0 +1,76 @@ +SET @ENTRY := 21315; -- Guid 74638 +SET @Drake := 22106; +UPDATE `creature_template` SET inhabittype=4,`speed_walk`=2.4,`speed_run`=1.71429,`ScriptName`='',`AIName`='SmartAI', unit_flags=32768, MovementType=2 WHERE `entry`=@ENTRY; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@Drake; +UPDATE `creature` SET `position_x`=-3761.743,`position_y`=1081.672,`position_z`=125.3161 WHERE `id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@drake; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid`=@ENTRY*100; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,11,0,100,0,0,0,0,0,53,0,@ENTRY,0,0,0,2,1,0,0,0,0,0,0,0,'Ruul the Darkener - On Spawn - StarWP'), +(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,60,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Ruul the Darkener - On Spawn - Set fly on'), +(@ENTRY,0,2,0,40,0,100,0,47,@ENTRY,0,0,53,0,@ENTRY,0,0,0,2,1,0,0,0,0,0,0,0,'Ruul the Darkener - Reach wp - Re Start WP'), +(@ENTRY,0,3,0,4,0,100,0,0,0,0,0,80,@ENTRY*100,2,0,0,0,0,1,0,0,0,0,0,0,0,'Ruul the Darkener - On aggro - ActionList'), +(@ENTRY*100,9,0,0,0,0,100,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Ruul the Darkener - ActionList - talk1'), +(@ENTRY*100,9,1,0,0,0,100,0,5000,5000,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Ruul the Darkener - ActionList - talk2'), +(@ENTRY,0,4,0,6,0,100,0,0,0,0,0,85,38343,1,0,0,0,0,1,0,0,0,0,0,0,0,'Ruul the Darkener - On death - Summon Ruul''s Nether Drake With Invoker_cast'), +(@Drake, 0, 0, 0, 0, 0, 100, 0, 3000, 3000, 5000, 5000, 11, 38344, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Drake - IC - CAST'), +(@Drake, 0, 1, 0, 0, 0, 100, 0, 3000, 3000, 10000, 10000, 11, 36513, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Drake - IC - CAST'), +(@Drake, 0, 2, 0, 54, 0, 100, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 21, 25, 0, 0, 0, 0, 0, 0, 'Drake - Just Summoned - StartAttack'), +(@ENTRY, 0, 5, 0, 0, 0, 100, 0, 3000, 3000, 6000, 6000, 11, 36073, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'ENTRY - IC - CAST'), +(@ENTRY, 0, 6, 0, 0, 0, 100, 0, 5000, 5000, 5000, 5000, 11, 39153, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'ENTRY - IC - CAST'), +(@ENTRY, 0, 7, 0, 0, 0, 100, 0, 1000, 1000, 4000, 4000, 11, 15284, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'ENTRY - IC - CAST'); +-- Waypoints for Ruul the Darkener from sniff +DELETE FROM `waypoints` WHERE `entry`=@ENTRY; +INSERT INTO `waypoints` (`entry`,`pointid`,`position_x`,`position_y`,`position_z`,`point_comment`) VALUES +(@ENTRY,1,-3805.743,1074.672,125.3161, 'Ruul the Darkener WP'), +(@ENTRY,2,-3806.74,1074.585,125.3161, 'Ruul the Darkener WP'), +(@ENTRY,3,-3844.399,1071.154,116.4082, 'Ruul the Darkener WP'), +(@ENTRY,4,-3871.77,1061.122,104.3527, 'Ruul the Darkener WP'), +(@ENTRY,5,-3897.401,1040.65,84.43602, 'Ruul the Darkener WP'), +(@ENTRY,6,-3923.55,1019.801,59.43599, 'Ruul the Darkener WP'), +(@ENTRY,7,-3946.312,1007.962,41.49157, 'Ruul the Darkener WP'), +(@ENTRY,8,-3981.2,987.1596,17.43604, 'Ruul the Darkener WP'), +(@ENTRY,9,-4003.07,957.1582,13.24213, 'Ruul the Darkener WP'), +(@ENTRY,10,-4012.831,932.0213,12.51513, 'Ruul the Darkener WP'), +(@ENTRY,11,-4023.356,901.5677,8.140135, 'Ruul the Darkener WP'), +(@ENTRY,12,-4033.129,864.9609,4.726814, 'Ruul the Darkener WP'), +(@ENTRY,13,-4039.05,829.5438,1.101814, 'Ruul the Darkener WP'), +(@ENTRY,14,-4046.8,785.2863,2.422696, 'Ruul the Darkener WP'), +(@ENTRY,15,-4053.405,754.4661,1.867994, 'Ruul the Darkener WP'), +(@ENTRY,16,-4077.986,718.4368,1.501426, 'Ruul the Darkener WP'), +(@ENTRY,17,-4104.671,681.145,2.619006, 'Ruul the Darkener WP'), +(@ENTRY,18,-4124.385,652.7042,3.424712, 'Ruul the Darkener WP'), +(@ENTRY,19,-4139.037,629.68,4.261003, 'Ruul the Darkener WP'), +(@ENTRY,20,-4144.591,607.7719,5.011003, 'Ruul the Darkener WP'), +(@ENTRY,21,-4148.39,587.783,8.4231, 'Ruul the Darkener WP'), +(@ENTRY,22,-4155.772,562.8152,11.38299, 'Ruul the Darkener WP'), +(@ENTRY,23,-4165.006,542.4948,15.88299, 'Ruul the Darkener WP'), +(@ENTRY,24,-4174.202,524.9961,22.73551, 'Ruul the Darkener WP'), -- fi Aller +(@ENTRY,25,-4165.006,542.4948,15.88299, 'Ruul the Darkener WP'),-- début du retour +(@ENTRY,26,-4155.772,562.8152,11.38299, 'Ruul the Darkener WP'), +(@ENTRY,27,-4148.39,587.783,8.4231, 'Ruul the Darkener WP'), +(@ENTRY,28,-4144.591,607.7719,5.011003, 'Ruul the Darkener WP'), +(@ENTRY,29,-4139.037,629.68,4.261003, 'Ruul the Darkener WP'), +(@ENTRY,30,-4124.385,652.7042,3.424712, 'Ruul the Darkener WP'), +(@ENTRY,31,-4104.671,681.145,2.619006, 'Ruul the Darkener WP'), +(@ENTRY,32,-4077.986,718.4368,1.501426, 'Ruul the Darkener WP'), +(@ENTRY,33,-4053.405,754.4661,1.867994, 'Ruul the Darkener WP'), +(@ENTRY,34,-4046.8,785.2863,2.422696, 'Ruul the Darkener WP'), +(@ENTRY,35,-4039.05,829.5438,1.101814, 'Ruul the Darkener WP'), +(@ENTRY,36,-4033.129,864.9609,4.726814, 'Ruul the Darkener WP'), +(@ENTRY,37,-4023.356,901.5677,8.140135, 'Ruul the Darkener WP'), +(@ENTRY,38,-4012.831,932.0213,12.51513, 'Ruul the Darkener WP'), +(@ENTRY,39,-4003.07,957.1582,13.24213, 'Ruul the Darkener WP'), +(@ENTRY,40,-3981.2,987.1596,17.43604, 'Ruul the Darkener WP'), +(@ENTRY,41,-3946.312,1007.962,41.49157, 'Ruul the Darkener WP'), +(@ENTRY,42,-3923.55,1019.801,59.43599, 'Ruul the Darkener WP'), +(@ENTRY,43,-3897.401,1040.65,84.43602, 'Ruul the Darkener WP'), +(@ENTRY,44,-3871.77,1061.122,104.3527, 'Ruul the Darkener WP'), +(@ENTRY,45,-3844.399,1071.154,116.4082, 'Ruul the Darkener WP'), +(@ENTRY,46,-3806.74,1074.585,125.3161, 'Ruul the Darkener WP'), +(@ENTRY,47,-3805.743,1074.672,125.3161, 'Ruul the Darkener WP'); +Delete from `creature_text` where `entry` in (@ENTRY); +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`, `BroadcastTextID`) VALUES +(@ENTRY, 0, 0, 'The skies will darken and all will go quiet. Only then will you know the sweet serenity of death...', 12, 0, 100, 0, 0, 0, 'Ruul the Darkener', 19291), +(@ENTRY, 1, 0, 'Your world is at an end.', 12, 0, 100, 0, 0, 0, 'Ruul the Darkener', 19290); diff --git a/sql/updates/world/2014_12_14_02_world.sql b/sql/updates/world/2014_12_14_02_world.sql new file mode 100644 index 00000000000..25f4ed66880 --- /dev/null +++ b/sql/updates/world/2014_12_14_02_world.sql @@ -0,0 +1,89 @@ +SET @Pentarus := 28160; -- Archmage Pentarus +SET @SPELL := 50860; -- Summon Machine 28192 +Set @Machine:= 28192; +Set @Spell2 := 51036; -- Summon Summon Venture Co. Air Patrol 28229 +Set @AirPatrol:= 28229; +UPDATE `creature_template` SET `AIName`='SmartAI',`ScriptName`='' WHERE `entry`=@Pentarus; +UPDATE `creature_template` SET `npcflag`= 16777216, `InhabitType`=4, `AIName`='SmartAI', `VehicleId`=220 WHERE `entry`=@Machine; +UPDATE `creature_template` SET `InhabitType`=4, `AIName`='SmartAI' WHERE `entry`=@AirPatrol; +UPDATE creature_template SET InhabitType=4, `AIName`='SmartAI' WHERE entry=27987; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@Pentarus; +DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid`=@Pentarus*100; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@Machine; +DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid`=@Machine*100; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@Machine; +DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid`=@Machine*100+1; +DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid`=@Machine*100+2; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@AirPatrol; +DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid`=@AirPatrol*100; +DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid`=27987*100; +DELETE FROM `smart_scripts` WHERE `entryorguid` = 27987 AND `source_type` = 0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@Pentarus,0,0,0,62,0,100,0,10024,0,0,0,80,@Pentarus*100,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Archmage Pentarus - On gossip option select - run script'), +(@Pentarus*100, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Archmage Pentarus - Actionlist - Close gossip'), +(@Pentarus*100,9,1,0,0,0,100,0,0,0,0,0,85,@SPELL,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Archmage Pentarus - Script - Cast Flight to Sholazar on player'), +(@Pentarus*100,9,2,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Archmage Pentarus - Script - say 0'), +(@Pentarus*100,9,3,0,0,0,100,0,0,0,0,0,50,190488,19,0,0,0,0,8,0,0,0,5832.702637, 436.761108, 669.141174, 1.612513, 'Archmage Pentarus - Script - spawn portal'), +(@Machine, 0, 0, 0, 54, 0, 100, 0, 0, 0, 0, 0, 80, @Machine*100, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Machine - On summon - Action List'), +(@Machine*100, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 60, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Machine - Action List - Set Fly ON'), +(@Machine*100, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 85, 46598, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Machine - Action List - CrossCast'), +(@Machine*100, 9, 2, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 69, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 5832.702637, 436.761108, 669.141174, 0.612513, 'Machine - Action List - InvokerCast'), +(@Machine*100, 9, 3, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 11, 50987, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Machine - Action List - cast teleportation'), +(@Machine*100, 9, 4, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 53, 1, @Machine, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Machine - Action List - Start wp'), +(@Machine, 0, 1, 0, 40, 0, 100, 0, 1, 0, 0, 0, 80, @Machine*100+1, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Machine - on wp end - ActionList'), +(@Machine*100+1, 9, 0, 0, 0, 0, 100, 0, 11000, 11000, 0, 0, 11, @Spell2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Machine - Action List - cast spell to invok AirPatrol'), +(@AirPatrol, 0, 0, 0, 54, 0, 100, 0, 0, 0, 0, 0, 80, @AirPatrol*100, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, '@AirPatrol - On spawn - Action List'), +(@AirPatrol*100, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 60, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, '@AirPatrol - Action List - Set Fly ON'), +(@AirPatrol*100, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, '@AirPatrol - Action List - Set react passif'), +(@AirPatrol*100, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 29, 5, 45, 0, 0, 0, 0, 19, @Machine, 60, 0, 0, 0, 0, 0, '@AirPatrol - Action List - follow target'), +(@AirPatrol*100, 9, 3, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, '@AirPatrol - Action List - Talk'), +(@AirPatrol*100, 9, 4, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 1, 0, 0, 0, 0, 0, 0, 19, @Machine, 30, 0, 0, 0, 0, 0, '@AirPatrol - Action List - Talk'), +(@AirPatrol*100, 9, 5, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 11, 50878, 0, 0, 0, 0, 0, 19, @Machine, 30, 0, 0, 0, 0, 0, '@AirPatrol - Action List - Cast'), +(@AirPatrol*100, 9, 6, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 11, 50878, 0, 0, 0, 0, 0, 19, @Machine, 30, 0, 0, 0, 0, 0, '@AirPatrol - Action List - Cast'), +(@AirPatrol*100, 9, 7, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 11, 50878, 0, 0, 0, 0, 0, 19, @Machine, 30, 0, 0, 0, 0, 0, '@AirPatrol - Action List - Cast'), +(@AirPatrol*100, 9, 8, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 11, 50878, 0, 0, 0, 0, 0, 19, @Machine, 30, 0, 0, 0, 0, 0, '@AirPatrol - Action List - Cast'), +(@AirPatrol*100, 9, 9, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 11, 50878, 0, 0, 0, 0, 0, 19, @Machine, 30, 0, 0, 0, 0, 0, '@AirPatrol - Action List - Cast'), +(@AirPatrol*100, 9, 10, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 11, 50878, 0, 0, 0, 0, 0, 19, @Machine, 30, 0, 0, 0, 0, 0, '@AirPatrol - Action List - Cast'), +(@AirPatrol*100, 9, 11, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 11, 50892, 0, 0, 0, 0, 0, 19, @Machine, 30, 0, 0, 0, 0, 0, '@AirPatrol - Action List - Cast'), +(@AirPatrol*100, 9, 12, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 11, 50892, 0, 0, 0, 0, 0, 19, @Machine, 30, 0, 0, 0, 0, 0, '@AirPatrol - Action List - Cast'), +(@AirPatrol*100, 9, 13, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 11, 50892, 0, 0, 0, 0, 0, 19, @Machine, 30, 0, 0, 0, 0, 0, '@AirPatrol - Action List - Cast'), +(@AirPatrol*100, 9, 14, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 11, 50892, 0, 0, 0, 0, 0, 19, @Machine, 30, 0, 0, 0, 0, 0, '@AirPatrol - Action List - Cast'), +(@AirPatrol*100, 9, 15, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 11, 50892, 0, 0, 0, 0, 0, 19, @Machine, 30, 0, 0, 0, 0, 0, '@AirPatrol - Action List - Cast'), +(@Machine, 0, 2, 0, 40, 0, 100, 0, 2, 0, 0, 0, 80, 27987*100, 2, 0, 0, 0, 0, 10, 103289, 27987, 0, 0, 0, 0, 0, '@Machine - On WP2 - Actionlist'), +(27987*100, 9, 0, 0, 0, 0, 100, 0, 10000, 10000, 0, 0, 1, 0, 0, 0, 0, 0, 0, 21, 40, 0, 0, 0, 0, 0, 0, '27987 - Action List - talk'), +(@Machine, 0, 3, 0, 40, 0, 100, 0, 3, 0, 0, 0, 80, @Machine*100+2, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, '@Machine - On spellHit - Actionlist'), +(@Machine*100+2, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 75, 61360, 0, 0, 0, 0, 0, 21, 10, 0, 0, 0, 0, 0, 0, '@Machine - Actionlist - Add parachute'), +(@Machine*100+2, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 50630, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, '@Machine - Actionlist - Eject passenger'), +(27987, 0, 0, 1, 25, 0, 100, 0, 0, 0, 0, 0, 60, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, ' 27987 - On spawn - set fly on'); +DELETE FROM `waypoints` WHERE `entry` IN(@Machine); +INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES +(@Machine, 1, 5478.141113, 4971.844238, -22.431667, 'Archimage Pentarus Flying Machine'), +(@Machine, 2, 5593.686035, 5187.787109, -72.69004, 'Archimage Pentarus Flying Machine'), +(@Machine, 3, 5647.750488, 5229.604004, -72.69004, 'Archimage Pentarus Flying Machine'); +DELETE FROM `creature_text` WHERE `entry`in (@AirPatrol, 27987, @Machine, 28160); +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`, `BroadcastTextID`) VALUES +(28160,0,0, 'I''ll send you on my flying machine. Keep your eyes peeled for clues about what might''ve happened to Hemet!',12,0,100,25,0,0, 'Archmage Pentarus',27620), +(@AirPatrol,0,0, 'More intruders? You''ll soon learn, no one messes with the Venture Company!',14,0,100,0,0,0, 'Venture Co. Air Patrol',27611), +(27987,0,0, 'Over here, to the southeast. I see they got you too...',14,0,100,0,0,0, 'Monte Muzzleshot',27610), +(@Machine,0,0, 'WARNING: Missile lock detected. Engaging evasive maneuvers.',12,0,100,0,0,0, 'Archimage Pentarus Flying Machine',27621); +DELETE FROM `spell_target_position` WHERE `id` in (50987, 50859); +INSERT INTO `spell_target_position` (`id`,`target_map`,`target_position_x`,`target_position_y`,`target_position_z`,`target_orientation`) VALUES +(50987, 571, 5071.35, 4642.54, 72.164, 0.878587),-- Teleport to Sholazar +(50859,571, 5832.892, 482.8708, 658.2753, 0.9121326); +DELETE FROM `npc_spellclick_spells` WHERE `npc_entry`=@Machine; +INSERT INTO `npc_spellclick_spells` (`npc_entry`,`spell_id`,`cast_flags`,`user_type`) VALUES +(@Machine,46598,1,0); -- Archmage Pentarus' Flying Machine - Ride Vehicle Hardcoded +DELETE FROM `creature_addon` WHERE `guid`=103289; -- Monte Muzzleshot +INSERT INTO `creature_addon` (`guid`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`)VALUES +(103289,0,0,1,0, '50544'); -- Monte Muzzleshot, aura: Cosmetic - Parachute Stuck +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=10024; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(15,10024,0,0,28,12521,0,0,0,'','Show gossip option if player has quest Where in the World is Hemet Nesingwary?'); +DELETE FROM `gossip_menu_option` WHERE `menu_id`=10024 AND `id`=1; +Delete from `conditions` where `SourceTypeOrReferenceId`=13 AND `SourceEntry`in (50878, 50892); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(13, 1, 50892, 0, 31, 3, @Machine, 0, 0, '', 'Only petrus flying machine is the target for the rockets'), +(13, 1, 50878, 0, 31, 3, @Machine, 0, 0, '', 'Only petrus flying machine is the target for the rockets'); + +UPDATE `creature_template` SET `DamageModifier`=5 WHERE `entry`=28468; + diff --git a/sql/updates/world/2014_12_15_00_world.sql b/sql/updates/world/2014_12_15_00_world.sql new file mode 100644 index 00000000000..8ed026454c6 --- /dev/null +++ b/sql/updates/world/2014_12_15_00_world.sql @@ -0,0 +1,18 @@ +SET @CGUID := 6747; +DELETE FROM `creature` WHERE `guid`=@CGUID; +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `MovementType`) VALUES +(@CGUID, 22418, 534, 1, 1, 5502.288, -3525.471, 1607.909, 2.617994, 7200, 0, 0); + +DELETE FROM `creature_text` WHERE `entry`=17968 AND `groupid`=8; +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(17968, 8, 0, 'All of your efforts have been in vain, for the draining of the World Tree has already begun! Soon the heart of your world will beat no more!', 14, 0, 100, 0, 0, 10986, 20432, 3, 'Archimonde - Intro'); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry` IN (39140,39141,39142); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(13,1,39140,0,0,31,0,3,22418,0,0,0, '', 'Drain World Tree Visual'), +(13,1,39141,0,0,31,0,3,17968,0,0,0, '', 'Drain World Tree Visual 2'), +(13,1,39142,0,0,31,0,3,22418,0,0,0, '', 'Drain World Tree Dummy'); + +DELETE FROM `spell_script_names` WHERE `spell_id`=39142; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(39142, 'spell_archimonde_drain_world_tree_dummy'); diff --git a/sql/updates/world/2014_12_16_00_world.sql b/sql/updates/world/2014_12_16_00_world.sql new file mode 100644 index 00000000000..b67691cee8d --- /dev/null +++ b/sql/updates/world/2014_12_16_00_world.sql @@ -0,0 +1,60 @@ +DELETE FROM `creature_text` WHERE `entry` IN(33662,33701,33626,33686,33696); +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `BroadcastTextID`, `comment`) VALUES +(33662, 0, 0, 'Any luck?', 12, 0, 100, 0, 0, 0, 34184, 'Kirin Tor Battle-Mage to Player'), +(33662, 1, 0, 'Keep at it. If our suspicions are right and this is a transporter, it could prove extremely useful in our assault.', 12, 0, 100, 0, 0, 0, 34186, 'Kirin Tor Battle-Mage to Player'), +(33701, 0, 0, 'I heard a story or two of a Lore Keeper in Uldaman that fit your description. Do you serve a similar purpose?', 12, 0, 100, 0, 0, 0, 33702, 'High Explorer Dellorah to Player'), +(33701, 1, 0, 'Frontal defense systems? Is there something I should let Brann know before he has anyone attempt to enter the complex?', 12, 0, 100, 0, 0, 0, 33704, 'High Explorer Dellorah to Player'), +(33701, 2, 0, 'Can you detail the nature of these defense systems?', 12, 0, 100, 0, 0, 0, 33706, 'High Explorer Dellorah to Player'), +(33701, 3, 0, 'Got it. At least we don''t have to deal with those orbital emplacements.', 12, 0, 100, 0, 0, 0, 33708, 'High Explorer Dellorah to Player'), +(33701, 4, 0, 'Rhydian, make sure you let Brann and Archmage Pentarus know about those defenses immediately.', 12, 0, 100, 0, 0, 0, 33709, 'High Explorer Dellorah to Player'), +(33701, 5, 0, 'And you mentioned an imprisoned entity? What is the nature of this entity and what is its status?', 12, 0, 100, 0, 0, 0, 33710, 'High Explorer Dellorah to Player'), +(33701, 6, 0, 'Yogg-Saron is here? It sounds like we really will have our hands full then.', 12, 0, 100, 0, 0, 0, 33713, 'High Explorer Dellorah to Player'), +(33626, 0, 0, 'Not a bit. For the life of me, I can''t figure out how this thing works.', 12, 0, 100, 0, 0, 0, 34183, 'Hired Engineer to Player'), +(33626, 1, 0, 'I know, I know... I haven''t given up yet. Don''t get your hopes up though, this technology is way beyond me.', 12, 0, 100, 0, 0, 0, 34187, 'Hired Engineer to Player'), +(33686, 0, 0, 'I was constructed to serve as a repository for essential information regarding this complex. My primary functions include communicating the status of the frontal defense systems and assessing the status of the entity that this complex was built to imprison.', 12, 0, 100, 0, 0, 0, 33703, 'Lore Keeper of Norgannon to Player'), +(33686, 1, 0, 'Compromise of complex detected, security override enabled - query permitted.', 12, 0, 100, 0, 0, 0, 33707, 'Lore Keeper of Norgannon to Player'), +(33686, 2, 0, 'Primary defensive emplacements consist of iron constructs and Storm Beacons, which will generate additional constructs as necessary. Secondary systems consist of orbital defense emplacements.', 12, 0, 100, 0, 0, 0, 33712, 'Lore Keeper of Norgannon to Player'), +(33686, 3, 0, 'Entity designate: Yogg-Saron. Security has been compromised. Prison operational status unknown. Unable to contact Watchers for notification purposes.', 12, 0, 100, 0, 0, 0, 33711, 'Lore Keeper of Norgannon to Player'), +(33696, 0, 0, '%s nods.', 16, 0, 100, 0, 0, 0, 33715, 'Archmage Rhydian to Player'), +(33696, 1, 0, '%s whispers something to Brann.', 16, 0, 100, 0, 0, 0, 33716, 'Archmage Rhydian to Player'); + +UPDATE `creature_template` SET `ainame`='SmartAI', `scriptname`='' WHERE `entry` IN(33662,33701,33696); +DELETE FROM `smart_scripts` WHERE `entryorguid`IN(33696,33701,-136527) AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid`IN(3369600,3370100) AND `source_type`=9; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(-136527,0,0,0,10,0,100,0,1,40,90000,120000,80,3369600,2,0,0,0,0,1,0,0,0,0,0,0,0,'Kirin Tor Battle-Mage - OOC Los - Run Script'), +(33701,0,0,0,10,0,100,1,1,40,30000,60000,80,3370100,2,0,0,0,0,1,0,0,0,0,0,0,0,'High Explorer Dellorah - OOC Los - Run Script (No repeat)'), +(33696,0,0,0,38,0,100,0,1,1,0,0,1,0,2000,0,0,0,0,1,0,0,0,0,0,0,0,'Archmage Rhydian - On Data Set - Say Line 0'), +(33696,0,1,0,52,0,100,0,0,33696,0,0,53,1,33696,0,0,0,0,1,0,0,0,0,0,0,0,'Archmage Rhydian - On Text Over (Line 0) - Start WP'), +(33696,0,2,3,40,0,100,0,8,33696,0,0,54,8000,0,0,0,0,0,1,0,0,0,0,0,0,0,'Archmage Rhydian - On Reached WP8 - Pause WP'), +(33696,0,3,0,61,0,100,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Archmage Rhydian - On Reached WP8 - Say Line 1'), +(33696,0,4,0,40,0,100,0,10,33696,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,5.916666,'Archmage Rhydian - On Reached WP10 - Set Orientation'), +(3369600, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Kirin Tor Battle-Mage - Script - Say Line 0'), +(3369600, 9, 1, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 1, 0, 0, 0, 0, 0, 0, 19, 33626, 0, 0, 0, 0, 0, 0, 'Kirin Tor Battle-Mage - Script - Say Line 0 (Hired Engineer)'), +(3369600, 9, 2, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Kirin Tor Battle-Mage - Script - Say Line 1'), +(3369600, 9, 3, 0, 0, 0, 100, 0, 9000, 9000, 0, 0, 1, 0, 0, 0, 0, 0, 0, 19, 33626, 0, 0, 0, 0, 0, 0, 'Kirin Tor Battle-Mage - Script - Say Line 1 (Hired Engineer)'), +(3370100, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'High Explorer Dellorah - Script - Say Line 0'), +(3370100, 9, 1, 0, 0, 0, 100, 0, 9000, 9000, 0, 0, 1, 0, 0, 0, 0, 0, 0, 19, 33686, 0, 0, 0, 0, 0, 0, 'High Explorer Dellorah - Script - Say Line 0 (Lore Keeper of Norgannon)'), +(3370100, 9, 2, 0, 0, 0, 100, 0, 13000, 13000, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'High Explorer Dellorah - Script - Say Line 1'), +(3370100, 9, 3, 0, 0, 0, 100, 0, 11000, 11000, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'High Explorer Dellorah - Script - Say Line 2'), +(3370100, 9, 4, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 1, 0, 0, 0, 0, 0, 19, 33686, 0, 0, 0, 0, 0, 0, 'High Explorer Dellorah - Script - Say Line 1 (Lore Keeper of Norgannon)'), +(3370100, 9, 5, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 2, 0, 0, 0, 0, 0, 19, 33686, 0, 0, 0, 0, 0, 0, 'High Explorer Dellorah - Script - Say Line 2 (Lore Keeper of Norgannon)'), +(3370100, 9, 6, 0, 0, 0, 100, 0, 12000, 12000, 0, 0, 1, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'High Explorer Dellorah - Script - Say Line 3'), +(3370100, 9, 7, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'High Explorer Dellorah - Script - Say Line 4'), +(3370100, 9, 8, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 1, 5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'High Explorer Dellorah - Script - Say Line 5'), +(3370100, 9, 9, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, 33696, 0, 0, 0, 0, 0, 0, 'High Explorer Dellorah - Script - Set Data to Archmage Rhydian'), +(3370100, 9, 10, 0, 0, 0, 100, 0, 9000, 9000, 0, 0, 1, 4, 0, 0, 0, 0, 0, 19, 33686 , 0, 0, 0, 0, 0, 0, 'High Explorer Dellorah - Script - Say Line 3 (Lore Keeper of Norgannon)'), +(3370100, 9, 11, 0, 0, 0, 100, 0, 13000, 13000, 0, 0, 1, 6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'High Explorer Dellorah - Script - Say Line 6'); + +DELETE FROM `waypoints` WHERE `entry`=33696; +INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES +(33696, 1, -769.512 ,-120.8109 ,429.5509, 'Archmage Rhydian'), +(33696, 2, -769.1432 ,-104.0848 ,429.8661, 'Archmage Rhydian'), +(33696, 3, -763.0945 ,-86.176 ,429.9557, 'Archmage Rhydian'), +(33696, 4, -755.0403 ,-68.30566 ,429.9557, 'Archmage Rhydian'), +(33696, 5, -746.3733 ,-54.03885 ,429.9657, 'Archmage Rhydian'), +(33696, 6, -738.9852 ,-49.87864 ,429.9657, 'Archmage Rhydian'), +(33696, 7, -729.1484 ,-49.88547 ,429.9657, 'Archmage Rhydian'), +(33696, 8, -718.4777 ,-52.54433 ,429.8407, 'Archmage Rhydian'), +(33696, 9, -768.5124 ,-112.0747 ,429.8398, 'Archmage Rhydian'), +(33696, 10, -773.566 ,-144.6838 ,429.9191, 'Archmage Rhydian'); diff --git a/sql/updates/world/2014_12_17_00_world.sql b/sql/updates/world/2014_12_17_00_world.sql new file mode 100644 index 00000000000..fd1e88f9c1a --- /dev/null +++ b/sql/updates/world/2014_12_17_00_world.sql @@ -0,0 +1,23 @@ +-- +UPDATE `creature_text` SET `TextRange` = 3 WHERE `entry` = 15990 AND `groupid` IN (0, 2, 4); +DELETE FROM `creature_text` WHERE `entry` = 15990 AND `groupid` IN (13, 20); +DELETE FROM `creature_text` WHERE `entry` = 16980 AND `groupid` IN (1, 2, 3); +DELETE FROM `creature_text` WHERE `entry` = 15384 AND `groupid` = 0; +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `BroadcastTextID`, `TextRange`, `comment`) VALUES +(15990, 20, 0, 'Come, heroes... By the will of the Lich King, you shall be destroyed.', 14, 0, 100, 0, 0, 0, 12993, 3, 'Kel''Thuzad SAY_DIALOGUE_SAPPHIRON_KELTHUZAD4'), +(15990, 13, 0, 'Kel''Thuzad strikes!', 41, 0, 100, 0, 0, 0, 32803, 0, 'Kel''Thuzad EMOTE_PHASE_TWO'), +(16980, 1, 0, 'Soon we will eradicate the Alliance and Horde. Then the rest of Azeroth will fall before the might of my army.', 14, 0, 100, 0, 0, 14768, 12988, 3, 'The Lich King SAY_DIALOGUE_SAPPHIRON_LICHKING'), +(16980, 2, 0, 'Invaders... here?! DESTROY them, Kel''Thuzad! Naxxramas must not fall!', 14, 0, 100, 0, 0, 14769, 12989, 3, 'The Lich King SAY_DIALOGUE_SAPPHIRON_LICHKING2'), +(16980, 3, 0, 'Very well. Warriors of the frozen wastes, rise up! I command you to fight, kill and die for your master! Let none survive!', 14, 0, 100, 0, 0, 14770, 12994, 3, 'The Lich King SAY_ANSWER_REQUEST'), +(15384, 0, 0, 'A Guardian of Icecrown enters the fight!', 41, 0, 100, 0, 0, 0, 32804, 0, 'OLDWorld Trigger (DO NOT DELETE)'); + +-- Spawn some missing triggers and the Lich King dummy. Triggers are used to emote when a Guardian of Icecrown is spawned, currently not implemented. +SET @CGUID = 75082; +DELETE FROM `creature` WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+5; +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `MovementType`) VALUES +(@CGUID+0, 16980, 533, 3, 1, 3762.382, -5115.862, 143.9382, 0.1919862, 7200, 0, 0), -- 16980 (Area: -1) +(@CGUID+1, 15384, 533, 3, 1, 3759.62, -5172.786, 143.8345, 5.148721, 7200, 0, 0), -- 15384 (Area: -1) +(@CGUID+2, 15384, 533, 3, 1, 3716.097, -5106.208, 141.373, 4.939282, 7200, 0, 0), -- 15384 (Area: -1) +(@CGUID+3, 15384, 533, 3, 1, 3777.213, -5066.177, 143.6412, 1.53589, 7200, 0, 0), -- 15384 (Area: -1) +(@CGUID+4, 15384, 533, 3, 1, 3732.598, -5028.03, 144.0342, 5.951573, 7200, 0, 0), -- 15384 (Area: -1) +(@CGUID+5, 15384, 533, 3, 1, 3700.7, -5182.372, 143.9172, 3.525565, 7200, 0, 0); -- 15384 (Area: -1) diff --git a/sql/updates/world/2014_12_18_00_world.sql b/sql/updates/world/2014_12_18_00_world.sql new file mode 100644 index 00000000000..18ab9f47256 --- /dev/null +++ b/sql/updates/world/2014_12_18_00_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature_template` SET `unit_flags`=0 WHERE `entry`=21004; diff --git a/sql/updates/world/2014_12_21_00_world.sql b/sql/updates/world/2014_12_21_00_world.sql new file mode 100644 index 00000000000..857d7286352 --- /dev/null +++ b/sql/updates/world/2014_12_21_00_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature_text` SET `sound`= 8506 WHERE `entry`= 15367; diff --git a/sql/updates/world/2014_12_22_00_world.sql b/sql/updates/world/2014_12_22_00_world.sql new file mode 100644 index 00000000000..ec1776e5c5b --- /dev/null +++ b/sql/updates/world/2014_12_22_00_world.sql @@ -0,0 +1,16 @@ +DELETE FROM `gossip_menu` WHERE `entry` in(10355,10366,10477); + +INSERT INTO `gossip_menu` (`entry`, `text_id`) VALUES +(10355, 14369), +(10366, 14375), +(10477, 14496); + +DELETE FROM `gossip_menu_option` WHERE `menu_id` in(10355,10366,10477); + +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `OptionBroadcastTextID`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `box_coded`, `box_money`, `box_text`, `BoxBroadcastTextID`) VALUES +(10355, 0, 0, 'We''re ready. Begin the assault!', 33652, 1, 1, 0, 0, 0, 0, NULL, 0), +(10366, 0, 0, 'Activate secondary defensive systems.', 34420, 1, 1, 10477, 0, 0, 0, NULL, 0), +(10477, 0, 0, 'Confirmed.', 34421, 1, 1, 0, 0, 0, 0, NULL, 0); + +UPDATE `creature_template` SET `gossip_menu_id`=10355 WHERE `entry`=33579; +UPDATE `creature_template` SET `gossip_menu_id`=10366 WHERE `entry`=33686; diff --git a/sql/updates/world/2014_12_26_00_world.sql b/sql/updates/world/2014_12_26_00_world.sql new file mode 100644 index 00000000000..101ed3c08be --- /dev/null +++ b/sql/updates/world/2014_12_26_00_world.sql @@ -0,0 +1,9 @@ +SET @OGUID := 6166; +DELETE FROM `gameobject` WHERE `guid` BETWEEN @OGUID+0 AND @OGUID+2; +INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(@OGUID+0, 181575, 533, 3, 1, 3465.175, -3940.402, 308.79, 2.443457, 0, 0, 1, -4.371139E-08, 7200, 255, 1), -- 181575 (Area: 3456) +(@OGUID+1, 181578, 533, 3, 1, 2493.018, -2921.778, 241.1933, 3.141593, 0, 0, 1, -4.371139E-08, 7200, 255, 1), -- 181578 (Area: -1) +(@OGUID+2, 181576, 533, 3, 1, 3539.016, -2936.821, 302.4756, 3.141593, 0, 0, 1, -4.371139E-08, 7200, 255, 1); -- 181576 (Area: 3456) + +-- These gameobjects have wrong flags at tdb 335, it's fine at 6.x. As seen on sniffs, they should have flags 16. Previous value was 6553616. +UPDATE `gameobject_template` SET `flags` = 16 WHERE `entry` IN (181575, 181576); diff --git a/sql/updates/world/2014_12_26_01_world.sql b/sql/updates/world/2014_12_26_01_world.sql new file mode 100644 index 00000000000..90ee138a237 --- /dev/null +++ b/sql/updates/world/2014_12_26_01_world.sql @@ -0,0 +1,4 @@ +UPDATE `creature_text` SET `TextRange` = 3 WHERE `entry` = 27656 AND `groupid` = 0; +DELETE FROM `creature_text` WHERE `entry` = 27447 AND `groupid` = 4; +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `BroadcastTextID`, `TextRange`, `comment`) VALUES +(27447, 4, 0, 'Intruders, your victory will be short-lived. I am Commander Varos Cloudstrider. My drakes control the skies and protect this conduit. I will see to it personally that the Oculus does not fall into your hands!', 14, 0, 100, 0, 0, 13648, 31812, 3, 'Varos Cloudstrider SAY_VAROS_INTRO_TEXT'); diff --git a/sql/updates/world/2014_12_27_00_world.sql b/sql/updates/world/2014_12_27_00_world.sql new file mode 100644 index 00000000000..d1273193738 --- /dev/null +++ b/sql/updates/world/2014_12_27_00_world.sql @@ -0,0 +1,73 @@ +-- +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE entry IN (32451); + +UPDATE `creature` SET `modelid`=0, movementType=2 WHERE guid IN (114330, 114331); + +DELETE FROM creature_addon WHERE guid = 114331; +INSERT INTO creature_addon (guid, path_id, mount, bytes1, bytes2, emote,auras) VALUES (114331, 1143310, 0, 0, 1, 0, ''); + +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid` IN (32451); +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(32451, 0, 0, 0, 1, 0, 100, 0, 5000, 5000, 120000, 120000, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Dalaran Citizen - Ooc - talk'); + +DELETE FROM waypoint_data WHERE id=1143310; +INSERT INTO waypoint_data (id, POINT, position_x, position_y, position_z, orientation, delay, move_type, ACTION, action_chance, wpguid) VALUES +(1143310, 1, 5961.356445, 661.699219, 641.721252, 0, 0, 0, 0, 100, 0), +(1143310, 2, 5954.011230, 657.709167, 641.991577, 0, 0, 0, 0, 100, 0), +(1143310, 3, 5947.983887, 658.844055, 642.101562, 0, 0, 0, 0, 100, 0), +(1143310, 4, 5950.894043, 662.109314, 641.363831, 0, 0, 0, 0, 100, 0), +(1143310, 5, 5959.004395, 674.209778, 640.880432, 0, 0, 0, 0, 100, 0), +(1143310, 6, 5961.065430, 680.407043, 640.494263, 0, 0, 0, 0, 100, 0), +(1143310, 7, 5962.776367, 679.769470, 640.680603, 0, 0, 0, 0, 100, 0), +(1143310, 8, 5963.701172, 675.173035, 640.749817, 0, 0, 0, 0, 100, 0), +(1143310, 9, 5963.879883, 666.781982, 641.512024, 0, 20000, 0, 0, 100, 0); + +DELETE FROM creature_text WHERE entry IN (32451); +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`, `BroadcastTextID`) VALUES +(32451, 0, 0, 'She said to meet her right here... maybe I''m in the wrong place?', 12, 0, 100, 1, 0, 0, 'Dalaran Citizen', 33069), +(32451, 0, 1, 'Luckily, the Lich King''s grasp has not reached Dalaran yet.', 12, 0, 100, 1, 0, 0, 'Dalaran Citizen', 33068), +(32451, 0, 2, 'Sometimes it''s nice to get away from the sanctum and get some fresh air.', 12, 0, 100, 1, 0, 0, 'Dalaran Citizen', 33067); + +UPDATE `creature` SET movementType=2 WHERE guid IN (28686); + +DELETE FROM creature_addon WHERE guid IN (28686); +INSERT INTO creature_addon (guid, path_id, mount, bytes1, bytes2, emote,auras) +VALUES (28686, 286860, 0, 0, 0, 0, ''); + +DELETE FROM waypoint_data WHERE id IN (286860); +INSERT INTO waypoint_data (id, POINT, position_x, position_y, position_z, orientation, delay, move_type, ACTION, action_chance, wpguid)VALUES +(286860, 1, 5960.950195, 598.314026, 650.627014, 0, 0, 0, 0, 100, 0), +(286860, 2, 5957.295898, 617.082153, 650.627258, 0, 0, 0, 0, 100, 0), +(286860, 3, 5894.468262, 657.878052, 644.688843, 0, 0, 0, 0, 100, 0), +(286860, 4, 5823.077637, 714.962402, 641.066895, 0, 0, 0, 0, 100, 0), +(286860, 5, 5799.794922, 719.503174, 640.661865, 0, 0, 0, 0, 100, 0), +(286860, 6, 5770.590820, 703.946777, 641.473755, 0, 0, 0, 0, 100, 0), +(286860, 7, 5728.678223, 659.602661, 645.874878, 0, 0, 0, 0, 100, 0), +(286860, 8, 5716.125977, 657.985718, 646.207947, 0, 0, 0, 0, 100, 0), +(286860, 9, 5701.286621, 654.542480, 646.277710, 0, 0, 0, 0, 100, 0), +(286860, 10, 5697.024902, 648.178040, 646.409180, 0, 0, 0, 0, 100, 0), +(286860, 11, 5728.723633, 617.990295, 647.119080, 0, 0, 0, 0, 100, 0), +(286860, 12, 5764.286621, 595.154358, 649.794617, 0, 0, 0, 0, 100, 0), +(286860, 13, 5771.400391, 598.777588, 650.299805, 0, 0, 0, 0, 100, 0), +(286860, 14, 5798.370605, 631.354919, 647.415161, 0, 20000, 0, 0, 100, 0), +(286860, 15, 5809.011719, 632.435669, 647.466370, 0, 0, 0, 0, 100, 0), +(286860, 16, 5813.840332, 639.437012, 647.445251, 0, 0, 0, 0, 100, 0), +(286860, 17, 5812.633301, 647.708679, 647.411682, 0, 0, 0, 0, 100, 0), +(286860, 18, 5837.737305, 679.004089, 643.481323, 0, 0, 0, 0, 100, 0), +(286860, 19, 5863.233887, 672.251282, 644.026489, 0, 0, 0, 0, 100, 0), +(286860, 20, 5872.090332, 660.963562, 644.639648, 0, 0, 0, 0, 100, 0), +(286860, 21, 5871.882812, 655.302795, 645.210327, 0, 0, 0, 0, 100, 0), +(286860, 22, 5866.628906, 656.807068, 645.358337, 0, 0, 0, 0, 100, 0), +(286860, 23, 5858.618164, 665.766174, 647.507935, 0, 0, 0, 0, 100, 0), +(286860, 24, 5854.410645, 663.378418, 647.491699, 0, 0, 0, 0, 100, 0), +(286860, 25, 5853.316406, 646.056763, 647.511597, 0, 0, 0, 0, 100, 0), +(286860, 26, 5855.305664, 646.037170, 647.511597, 0, 20000, 0, 0, 100, 0), +(286860, 27, 5853.801270, 644.892761, 647.511597, 0, 0, 0, 0, 100, 0), +(286860, 28, 5854.399902, 639.586365, 647.511597, 0, 0, 0, 0, 100, 0), +(286860, 29, 5861.342773, 632.158997, 647.913147, 0, 0, 0, 0, 100, 0), +(286860, 30, 5873.931152, 637.613953, 646.993347, 0, 0, 0, 0, 100, 0), +(286860, 31, 5888.598145, 639.828796, 646.219421, 0, 0, 0, 0, 100, 0), +(286860, 32, 5911.427246, 634.141296, 645.621460, 0, 0, 0, 0, 100, 0), +(286860, 33, 5944.164062, 622.176941, 650.655151, 0, 0, 0, 0, 100, 0), +(286860, 34, 5958.649414, 608.832092, 650.627136, 0, 0, 0, 0, 100, 0), +(286860, 35, 5960.950195, 598.314026, 650.627014, 0, 20000, 0, 0, 100, 0); diff --git a/sql/updates/world/2014_12_27_01_world_335.sql b/sql/updates/world/2014_12_27_01_world_335.sql new file mode 100644 index 00000000000..961e9a0523d --- /dev/null +++ b/sql/updates/world/2014_12_27_01_world_335.sql @@ -0,0 +1,85 @@ +-- deprecated on 4.x +DELETE FROM `creature_text` WHERE `entry`=14875; +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES +(14875, 0, 0, 'Begin the ritual, my servants. We must banish the heart of Hakkar back into the void!', 14, 0, 100, 0, 0, 0, 'Molthor'), +(14875, 1, 0, 'All Hail $n, slayer of Hakkar, and hero of Azeroth!', 14, 0, 100, 0, 0, 0, 'Molthor'); + +DELETE FROM `locales_creature_text` WHERE `entry`=14875; +INSERT INTO `locales_creature_text` (`entry`, `groupid`, `id`, `text_loc3`) VALUES +(14875, 0, 0, 'Beginnt mit dem Ritual. Wir müssen das Herz von Hakkar zurück in die Leere verbannen!'), +(14875, 1, 0, 'All Hail $n, Bezwinger von Hakkar und Held von Azeroth!'); + +-- Molthor SAI +SET @ENTRY := 14875; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,64,0,100,0,0,0,0,0,5,4,0,0,0,0,0,1,0,0,0,0,0,0,0,"Molthor - On Gossip Hello - Play Emote 4"), +(@ENTRY,0,1,0,20,0,100,0,8183,0,0,0,53,0,14875,0,0,0,0,1,0,0,0,0,0,0,0,"Molthor - On Quest 'The Heart of Hakkar' Finished - Start Waypoint"), +(@ENTRY,0,2,0,40,0,100,0,11,14875,0,0,80,@ENTRY*100+00,2,0,0,0,0,1,0,0,0,0,0,0,0,"Molthor - On Waypoint 12 Reached - Run Script"), +(@ENTRY,0,3,0,40,0,100,0,11,14875,0,0,54,39000,0,0,0,0,0,1,0,0,0,0,0,0,0,"Molthor - On Waypoint 12 Reached - Pause Waypoint"); + +-- Actionlist SAI +SET @ENTRY := 1487500; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=9; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,9,0,0,0,0,100,0,0,0,0,0,11,24203,2,0,0,0,0,1,0,0,0,0,0,0,0,"Molthor - On Script - Cast 'Heart of Hakkar Banning'"), +(@ENTRY,9,1,0,0,0,100,0,0,0,0,0,12,15080,6,0,0,0,0,8,0,0,0,-11817,1324,1,1,"Molthor - On Script - Summon Creature 'Servant of the Hand'"), +(@ENTRY,9,2,0,0,0,100,0,0,0,0,0,12,15080,6,0,0,0,0,8,0,0,0,-11831.5,1331.15,1.839,0.615,"Molthor - On Script - Summon Creature 'Servant of the Hand'"), +(@ENTRY,9,3,0,0,0,100,0,0,0,0,0,12,15080,6,0,0,0,0,8,0,0,0,-11834.8,1349.83,2.009,5.864,"Molthor - On Script - Summon Creature 'Servant of the Hand'"), +(@ENTRY,9,4,0,0,0,100,0,0,0,0,0,12,15080,6,0,0,0,0,8,0,0,0,-11801,1335.25,1.261,2.808,"Molthor - On Script - Summon Creature 'Servant of the Hand'"), +(@ENTRY,9,5,0,0,0,100,0,2000,2000,0,0,12,15069,2,38000,0,0,0,8,0,0,0,-11818.9,1343.2,7.905,4.3411,"Molthor - On Script - Summon Creature 'Heart of Hakkar'"), +(@ENTRY,9,6,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Molthor - On Script - Say Line 1"), +(@ENTRY,9,7,0,0,0,100,0,36000,36000,0,0,85,24425,0,0,0,0,0,17,0,2000,0,0,0,0,0,"Molthor - On Script - Invoker Cast 'Spirit of Zandalar'"), +(@ENTRY,9,8,0,0,0,100,0,0,0,0,0,59,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Molthor - On Script - Set Run On"), +(@ENTRY,9,9,0,0,0,100,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Molthor - On Script - Say Line 1"), +(@ENTRY,9,10,0,0,0,100,0,0,0,0,0,11,24425,2,0,0,0,0,17,0,2000,0,0,0,0,0,"Molthor - On Script - Cast 'Spirit of Zandalar'"); + +-- Servant of the Hand SAI +SET @ENTRY := 15080; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,54,0,100,0,0,0,0,0,80,@ENTRY*100+00,2,0,0,0,0,1,0,0,0,0,0,0,0,"Servant of the Hand - On Just Summoned - Run Script"); + +-- Actionlist SAI +SET @ENTRY := 1508000; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=9; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,9,0,0,0,0,100,0,0,0,0,0,11,24602,2,0,0,0,0,1,0,0,0,0,0,0,0,"On Script - Cast 'Create Heart of Hakkar Summon Circle'"), +(@ENTRY,9,1,0,0,0,100,0,4000,4000,0,0,11,24217,64,0,0,0,0,19,15069,200,0,0,0,0,0,"On Script - Cast 'Quest - Heart of Hakkar, Ritual Cast Visual'"), +(@ENTRY,9,2,0,0,0,100,0,34000,34000,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"On Script - Despawn Instant"); + +-- Heart of Hakkar SAI +SET @ENTRY := 15069; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,1,0,100,0,100,100,5000,5000,11,24202,2,0,0,0,0,1,0,0,0,0,0,0,0,"Heart of Hakkar - Out of Combat - Cast 'Create Heart of Hakkar Rift'"), +(@ENTRY,0,1,0,1,0,100,0,38000,38000,0,0,41,10,0,0,0,0,0,1,0,0,0,0,0,0,0,"Heart of Hakkar - Out of Combat - Despawn In 10 ms"); + +DELETE FROM `waypoints` WHERE `entry`=14875; +INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES +(14875, 1, -11813.9, 1257.9, 6.00591, 'Molthor'), +(14875, 2, -11816, 1253.34, 4.10438, 'Molthor'), +(14875, 3, -11817.8, 1250.34, 2.64272, 'Molthor'), +(14875, 4, -11822.2, 1248.5, 2.45973, 'Molthor'), +(14875, 5, -11823, 1248.43, 2.43644, 'Molthor'), +(14875, 6, -11830.2, 1262.37, 1.60647, 'Molthor'), +(14875, 7, -11833.6, 1272.28, 1.51623, 'Molthor'), +(14875, 8, -11836.3, 1282.42, 1.74283, 'Molthor'), +(14875, 9, -11836.9, 1294, 0.464341, 'Molthor'), +(14875, 10, -11835.6, 1297.62, 0.654105, 'Molthor'), +(14875, 11, -11826.2, 1322.37, 0.217855, 'Molthor'), +(14875, 21, -11813.9, 1257.9, 6.00591, 'Molthor'), +(14875, 20, -11816, 1253.34, 4.10438, 'Molthor'), +(14875, 19, -11817.8, 1250.34, 2.64272, 'Molthor'), +(14875, 18, -11822.2, 1248.5, 2.45973, 'Molthor'), +(14875, 17, -11823, 1248.43, 2.43644, 'Molthor'), +(14875, 16, -11830.2, 1262.37, 1.60647, 'Molthor'), +(14875, 15, -11833.6, 1272.28, 1.51623, 'Molthor'), +(14875, 14, -11836.3, 1282.42, 1.74283, 'Molthor'), +(14875, 13, -11836.9, 1294, 0.464341, 'Molthor'), +(14875, 12, -11835.6, 1297.62, 0.654105, 'Molthor'), +(14875, 22, -11811.491, 1262.42, 6.004, 'Molthor'), +(14875, 23, -11812.52, 1260.45, 6.004, 'Molthor'); diff --git a/sql/updates/world/2014_12_27_02_world.sql b/sql/updates/world/2014_12_27_02_world.sql new file mode 100644 index 00000000000..3ce1d97df0e --- /dev/null +++ b/sql/updates/world/2014_12_27_02_world.sql @@ -0,0 +1,5 @@ +-- +DELETE FROM `spell_proc_event` WHERE `entry` IN (71174,71198); +INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `ppmRate`, `CustomChance`, `Cooldown`) VALUES +(71174, 1, 7, 0, 0, 0, 0, 0, 0, 0, 0), +(71198, 4, 11, 0, 0, 0, 0, 0, 0, 0, 0); diff --git a/sql/updates/world/2014_12_27_03_world.sql b/sql/updates/world/2014_12_27_03_world.sql new file mode 100644 index 00000000000..ba883f29e66 --- /dev/null +++ b/sql/updates/world/2014_12_27_03_world.sql @@ -0,0 +1,144 @@ +-- Adding missing spawn Bleeding Hollow Dark Shaman Entry: 16873 +SET @GUID := 29978; +INSERT INTO `creature` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `curhealth`, `curmana`, `MovementType`) VALUES +(@GUID, 16873, 530, -945.313, 1948.252, 58.1359, 67.06455, 300, 3984, 2434, 2); + +-- Bleeding Hollow Dark Shaman SAI +SET @ENTRY := 16873; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,1,0,100,1,0,0,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Bleeding Hollow Dark Shaman - Out of Combat - Enable Combat Movement (No Repeat)"), +(@ENTRY,0,1,0,1,0,100,0,1000,1000,1800000,1800000,11,12550,1,0,0,0,0,1,0,0,0,0,0,0,0,"Bleeding Hollow Dark Shaman - Out of Combat - Cast 'Lightning Shield' (No Repeat)"), +(@ENTRY,0,2,3,4,0,100,1,0,0,0,0,11,20825,0,0,0,0,0,2,0,0,0,0,0,0,0,"Bleeding Hollow Dark Shaman - On Aggro - Cast 'Shadow Bolt' (No Repeat)"), +(@ENTRY,0,3,0,61,0,100,0,0,0,0,0,23,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Bleeding Hollow Dark Shaman - On Aggro - Increment Phase By 1 (No Repeat)"), +(@ENTRY,0,4,0,9,1,100,0,0,40,2400,3800,11,20825,0,0,0,0,0,2,0,0,0,0,0,0,0,"Bleeding Hollow Dark Shaman - Within 0-40 Range - Cast 'Shadow Bolt' (No Repeat)"), +(@ENTRY,0,5,6,3,1,100,1,0,15,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Bleeding Hollow Dark Shaman - Between 0-15% Mana - Enable Combat Movement (Phase 1) (No Repeat)"), +(@ENTRY,0,6,0,61,1,100,0,0,0,0,0,23,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Bleeding Hollow Dark Shaman - Between 0-15% Mana - Increment Phase By 1 (Phase 1) (No Repeat)"), +(@ENTRY,0,7,0,9,1,100,0,35,80,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Bleeding Hollow Dark Shaman - Within 35-80 Range - Enable Combat Movement (Phase 1) (No Repeat)"), +(@ENTRY,0,8,0,9,1,100,0,5,15,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Bleeding Hollow Dark Shaman - Within 5-15 Range - Disable Combat Movement (Phase 1) (No Repeat)"), +(@ENTRY,0,9,0,9,1,100,0,0,5,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Bleeding Hollow Dark Shaman - Within 0-5 Range - Enable Combat Movement (Phase 1) (No Repeat)"), +(@ENTRY,0,10,0,3,2,100,0,30,100,100,100,23,0,1,0,0,0,0,1,0,0,0,0,0,0,0,"Bleeding Hollow Dark Shaman - Between 30-100% Mana - Decrement Phase By 1 (Phase 1) (No Repeat)"), +(@ENTRY,0,11,0,2,0,100,1,0,30,0,0,11,6742,0,0,0,0,0,1,0,0,0,0,0,0,0,"Bleeding Hollow Dark Shaman - Between 0-30% Health - Cast 'Bloodlust' (Phase 1) (No Repeat)"), +(@ENTRY,0,12,0,0,0,100,0,4000,8000,30000,45000,11,32062,1,0,0,0,0,1,0,0,0,0,0,0,0,"Bleeding Hollow Dark Shaman - In Combat - Cast 'Fire Nova Totem' (Phase 1) (No Repeat)"), +(@ENTRY,0,13,14,2,0,100,1,0,15,0,0,22,3,0,0,0,0,0,1,0,0,0,0,0,0,0,"Bleeding Hollow Dark Shaman - Between 0-15% Health - Set Event Phase 3 (No Repeat)"), +(@ENTRY,0,14,15,61,0,100,0,0,0,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Bleeding Hollow Dark Shaman - Between 0-15% Health - Enable Combat Movement (No Repeat)"), +(@ENTRY,0,15,0,61,0,100,0,0,0,0,0,25,1,0,0,0,0,0,0,0,0,0,0,0,0,0,"Bleeding Hollow Dark Shaman - Between 0-15% Health - Flee For Assist (No Repeat)"), +(@ENTRY,0,16,0,5,0,100,1,0,0,0,0,11,34013,1,0,0,0,0,7,0,0,0,0,0,0,0,"Bleeding Hollow Dark Shaman - On Killed Unit - Cast 'Raise Soul' (No Repeat)"); + +-- Pathing for Bleeding Hollow Dark Shaman Entry: 16873 'TDB FORMAT' +SET @NPC := 58257; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-1058.69,`position_y`=2123.373,`position_z`=51.63616 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,-1058.69,2123.373,51.63616,0,0,0,0,100,0), +(@PATH,2,-1057.219,2099.756,59.51154,0,0,0,0,100,0), +(@PATH,3,-1044.785,2080.962,64.48811,0,0,0,0,100,0), +(@PATH,4,-1027.752,2060.003,67.17399,0,0,0,0,100,0), +(@PATH,5,-1035.883,2045.864,67.88428,0,0,0,0,100,0), +(@PATH,6,-1024.891,2036.104,67.17399,0,0,0,0,100,0), +(@PATH,7,-1011.885,2038.549,67.04899,0,0,0,0,100,0), +(@PATH,8,-993.7006,2017.729,67.06455,0,0,0,0,100,0), +(@PATH,9,-1008.182,1997.039,67.06455,0,0,0,0,100,0), +(@PATH,10,-992.9711,2018.175,67.06455,0,0,0,0,100,0), +(@PATH,11,-971.9114,2014.351,67.06455,0,0,0,0,100,0), +(@PATH,12,-992.9711,2018.175,67.06455,0,0,0,0,100,0), +(@PATH,13,-1008.182,1997.039,67.06455,0,0,0,0,100,0), +(@PATH,14,-1008.182,1997.039,67.06455,0,0,0,0,100,0), +(@PATH,15,-993.7006,2017.729,67.06455,0,0,0,0,100,0), +(@PATH,16,-1011.885,2038.549,67.04899,0,0,0,0,100,0), +(@PATH,17,-1011.885,2038.549,67.04899,0,0,0,0,100,0), +(@PATH,18,-1024.891,2036.104,67.17399,0,0,0,0,100,0), +(@PATH,19,-1035.883,2045.864,67.88428,0,0,0,0,100,0), +(@PATH,20,-1027.752,2060.003,67.17399,0,0,0,0,100,0), +(@PATH,21,-1027.752,2060.003,67.17399,0,0,0,0,100,0), +(@PATH,22,-1044.785,2080.966,64.57795,0,0,0,0,100,0), +(@PATH,23,-1057.219,2099.756,59.51154,0,0,0,0,100,0); +-- 0xF13041E90060F72D .go -1058.69 2123.373 51.63616 + +-- Pathing for Bleeding Hollow Dark Shaman Entry: 16873 'TDB FORMAT' +SET @NPC := 58256; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-1144.076,`position_y`=1954.738,`position_z`=80.57024 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,-1144.076,1954.738,80.57024,0,0,0,0,100,0), +(@PATH,2,-1133.44,1972.225,73.66801,0,0,0,0,100,0), +(@PATH,3,-1122.611,1999.216,68.83028,0,0,0,0,100,0), +(@PATH,4,-1099.563,2031.872,67.05327,0,0,0,0,100,0), +(@PATH,5,-1084.684,2065.122,66.82748,0,0,0,0,100,0), +(@PATH,6,-1070.713,2090.635,62.18363,0,0,0,0,100,0), +(@PATH,7,-1100.243,2084.849,66.59998,0,0,0,0,100,0), +(@PATH,8,-1129.753,2078.135,67.00842,0,0,0,0,100,0), +(@PATH,9,-1100.243,2084.849,66.59998,0,0,0,0,100,0), +(@PATH,10,-1070.713,2090.635,62.18363,0,0,0,0,100,0), +(@PATH,11,-1084.646,2065.203,66.72787,0,0,0,0,100,0), +(@PATH,12,-1099.563,2031.872,67.05327,0,0,0,0,100,0), +(@PATH,13,-1122.611,1999.216,68.83028,0,0,0,0,100,0), +(@PATH,14,-1133.43,1972.312,73.66801,0,0,0,0,100,0); +-- 0xF13041E900612D35 .go -1144.076 1954.738 80.57024 + +-- Pathing for Bleeding Hollow Dark Shaman Entry: 16873 'TDB FORMAT' +SET @NPC := 58258; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-1060.848,`position_y`=2105.119,`position_z`=58.13591 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,-1060.848,2105.119,58.13591,0,0,0,0,100,0), +(@PATH,2,-1037.167,2107.136,59.97014,0,0,0,0,100,0), +(@PATH,3,-1018.748,2084.713,68.99667,0,0,0,0,100,0), +(@PATH,4,-990.0961,2053.444,67.06454,0,0,0,0,100,0), +(@PATH,5,-961.8248,2037.499,67.04703,0,0,0,0,100,0), +(@PATH,6,-938.3379,2024.596,65.73439,0,0,0,0,100,0), +(@PATH,7,-921.1564,2015.199,62.66013,0,0,0,0,100,0), +(@PATH,8,-909.5775,1992.915,67.29996,0,0,0,0,100,0), +(@PATH,9,-889.6608,1985.54,67.38715,0,0,0,0,100,0), +(@PATH,10,-879.1632,1955.284,67.81312,0,0,0,0,100,0), +(@PATH,11,-877.1085,1921.789,70.60205,0,0,0,0,100,0), +(@PATH,12,-901.7319,1883,76.4217,0,0,0,0,100,0), +(@PATH,13,-877.1085,1921.789,70.60205,0,0,0,0,100,0), +(@PATH,14,-879.1632,1955.284,67.81312,0,0,0,0,100,0), +(@PATH,15,-889.6608,1985.54,67.38715,0,0,0,0,100,0), +(@PATH,16,-909.5775,1992.915,67.29996,0,0,0,0,100,0), +(@PATH,17,-921.1564,2015.199,62.66013,0,0,0,0,100,0), +(@PATH,18,-938.3379,2024.596,65.73439,0,0,0,0,100,0), +(@PATH,19,-961.8248,2037.499,67.04703,0,0,0,0,100,0), +(@PATH,20,-990.0961,2053.444,67.06454,0,0,0,0,100,0), +(@PATH,21,-1018.748,2084.713,68.99667,0,0,0,0,100,0), +(@PATH,22,-1037.167,2107.136,59.97014,0,0,0,0,100,0), +(@PATH,23,-1060.848,2105.119,58.13591,0,0,0,0,100,0); +-- 0xF13041E90061464D .go -1060.848 2105.119 58.13591 + +-- Pathing for Bleeding Hollow Dark Shaman Entry: 16873 'TDB FORMAT' +SET @NPC := 6747; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-945.313,`position_y`=1948.252,`position_z`=67.06455 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,-945.313,1948.252,67.06455,0,0,0,0,100,0), +(@PATH,2,-946.7964,1966.628,67.06455,0,0,0,0,100,0), +(@PATH,3,-932.1639,1983.549,66.96194,0,0,0,0,100,0), +(@PATH,4,-914.9733,1976.555,67.05032,0,0,0,0,100,0), +(@PATH,5,-929.8001,1991.014,66.44107,0,0,0,0,100,0), +(@PATH,6,-929.8001,1991.014,66.44107,0,0,0,0,100,0), +(@PATH,7,-941.426,2015.632,66.31691,0,0,0,0,100,0), +(@PATH,8,-965.7396,2015.727,67.03322,0,0,0,0,100,0), +(@PATH,9,-968.4443,2047.705,67.06454,0,0,0,0,100,0), +(@PATH,10,-965.7396,2015.727,67.03322,0,0,0,0,100,0), +(@PATH,11,-965.7396,2015.727,67.03322,0,0,0,0,100,0), +(@PATH,12,-941.426,2015.632,66.31691,0,0,0,0,100,0), +(@PATH,13,-929.8001,1991.014,66.44107,0,0,0,0,100,0), +(@PATH,14,-914.9733,1976.555,67.05032,0,0,0,0,100,0), +(@PATH,15,-914.9733,1976.555,67.05032,0,0,0,0,100,0), +(@PATH,16,-932.1639,1983.549,66.96194,0,0,0,0,100,0), +(@PATH,17,-946.7964,1966.628,67.06455,0,0,0,0,100,0); +-- 0xF13041E90061F326 .go -945.313 1948.252 67.06455 diff --git a/sql/updates/world/2014_12_27_04_world.sql b/sql/updates/world/2014_12_27_04_world.sql new file mode 100644 index 00000000000..3ca4f69f591 --- /dev/null +++ b/sql/updates/world/2014_12_27_04_world.sql @@ -0,0 +1,136 @@ +-- Updating SAI +-- Dreadcaller SAI +SET @ENTRY := 19434; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,1,0,100,1,0,0,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Dreadcaller - Out of Combat - Enable Combat Movement (No Repeat)"), +(@ENTRY,0,1,2,4,0,100,1,0,0,0,0,11,32666,0,0,0,0,0,2,0,0,0,0,0,0,0,"Dreadcaller - On Aggro - Cast 'Shadow Bolt' (No Repeat)"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,23,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Dreadcaller - On Aggro - Increment Phase By 1 (No Repeat)"), +(@ENTRY,0,3,0,9,1,100,0,0,40,2400,3800,11,32666,0,0,0,0,0,2,0,0,0,0,0,0,0,"Dreadcaller - Within 0-40 Range - Cast 'Shadow Bolt' (No Repeat)"), +(@ENTRY,0,4,5,3,1,100,1,0,15,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Dreadcaller - Between 0-15% Mana - Enable Combat Movement (Phase 1) (No Repeat)"), +(@ENTRY,0,5,0,61,1,100,0,0,0,0,0,23,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Dreadcaller - Between 0-15% Mana - Increment Phase By 1 (Phase 1) (No Repeat)"), +(@ENTRY,0,6,0,9,1,100,0,35,80,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Dreadcaller - Within 35-80 Range - Enable Combat Movement (Phase 1) (No Repeat)"), +(@ENTRY,0,7,0,9,1,100,0,5,15,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Dreadcaller - Within 5-15 Range - Disable Combat Movement (Phase 1) (No Repeat)"), +(@ENTRY,0,8,0,9,1,100,0,0,5,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Dreadcaller - Within 0-5 Range - Enable Combat Movement (Phase 1) (No Repeat)"), +(@ENTRY,0,9,0,3,0,100,0,30,100,100,100,23,0,1,0,0,0,0,1,0,0,0,0,0,0,0,"Dreadcaller - Between 30-100% Mana - Decrement Phase By 1 (Phase 1) (No Repeat)"), +(@ENTRY,0,10,0,0,0,100,0,4000,9000,18100,24000,11,11443,1,0,0,0,0,2,0,0,0,0,0,0,0,"Dreadcaller - In Combat - Cast 'Cripple' (Phase 1) (No Repeat)"); + +-- Pathing for Dreadcaller Entry: 19434 'TDB FORMAT' +SET @NPC := 69502; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=177.5729,`position_y`=2268.238,`position_z`=48.5948 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,177.5729,2268.238,48.5948,0,0,0,0,100,0), +(@PATH,2,206.0571,2228.519,54.04856,0,0,0,0,100,0); +-- 0xF1304BEA00397367 .go 177.5729 2268.238 48.5948 + +-- Pathing for Dreadcaller Entry: 19434 'TDB FORMAT' +SET @NPC := 69501; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=190.7178,`position_y`=2286.323,`position_z`=49.66181 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,190.7178,2286.323,49.66181,0,0,0,0,100,0), +(@PATH,2,210.6431,2285.845,53.60326,0,0,0,0,100,0), +(@PATH,3,222.5459,2286.666,56.13475,0,0,0,0,100,0), +(@PATH,4,231.5569,2296.63,60.31371,0,0,0,0,100,0), +(@PATH,5,220.7462,2308.746,60.02021,0,0,0,0,100,0), +(@PATH,6,208.7211,2311.991,57.36103,0,0,0,0,100,0), +(@PATH,7,195.7977,2312.93,53.85427,0,0,0,0,100,0), +(@PATH,8,181.254,2297.919,50.28107,0,0,0,0,100,0); +-- 0xF1304BEA00396ED6 .go 190.7178 2286.323 49.66181 + +-- Pathing for Dreadcaller Entry: 19434 'TDB FORMAT' +SET @NPC := 69500; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=233.3709,`position_y`=2074.927,`position_z`=39.10539 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,233.3709,2074.927,39.10539,0,0,0,0,100,0), +(@PATH,2,228.1582,2076.218,39.70464,0,0,0,0,100,0), +(@PATH,3,226.8357,2086.181,39.48833,0,0,0,0,100,0), +(@PATH,4,227.4231,2100.461,39.53439,0,0,0,0,100,0), +(@PATH,5,231.5971,2104.666,38.92635,0,0,0,0,100,0), +(@PATH,6,237.6874,2098.439,39.00676,0,0,0,0,100,0), +(@PATH,7,241.6207,2088.015,38.11906,0,0,0,0,100,0), +(@PATH,8,238.947,2078.802,38.06547,0,0,0,0,100,0); +-- 0xF1304BEA00353517 .go 233.3709 2074.927 39.10539 + + +-- Pathing for Dreadcaller Entry: 19434 'TDB FORMAT' +SET @NPC := 69503; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-523.7537,`position_y`=2008.213,`position_z`=82.43176 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,-523.7537,2008.213,82.43176,0,0,0,0,100,0), +(@PATH,2,-513.3772,2034.226,82.13103,0,0,0,0,100,0), +(@PATH,3,-501.1374,2063.957,81.46646,0,0,0,0,100,0), +(@PATH,4,-490.7202,2097.977,79.50304,0,0,0,0,100,0), +(@PATH,5,-495.6437,2124.143,75.1469,0,0,0,0,100,0), +(@PATH,6,-500.0753,2152.032,70.07507,0,0,0,0,100,0), +(@PATH,7,-497.6553,2131.211,73.99121,0,0,0,0,100,0), +(@PATH,8,-488.903,2108.3,78.71799,0,0,0,0,100,0), +(@PATH,9,-496.6252,2076.111,81.08714,0,0,0,0,100,0), +(@PATH,10,-505.7927,2051.876,81.88617,0,0,0,0,100,0), +(@PATH,11,-519.2833,2018.794,82.35017,0,0,0,0,100,0), +(@PATH,12,-523.7976,2008.294,82.49103,0,0,0,0,100,0); +-- 0x1C09E4424012FA8000002000004E9B0D .go -523.7537 2008.213 82.43176 + +-- Pathing for Dreadcaller Entry: 19434 'TDB FORMAT' +SET @NPC := 69499; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-558.5822,`position_y`=2003.227,`position_z`=98.30606 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,-558.5822,2003.227,98.30606,0,0,0,0,100,0), +(@PATH,2,-557.4218,2005.291,99.07405,0,0,0,0,100,0), +(@PATH,3,-559.7542,2056.054,96.38632,0,0,0,0,100,0), +(@PATH,4,-540.9093,2062.701,104.2178,0,0,0,0,100,0), +(@PATH,5,-538.0739,2083.637,102.7935,0,0,0,0,100,0), +(@PATH,6,-531.9629,2100.469,104.145,0,0,0,0,100,0), +(@PATH,7,-540.8042,2121.509,97.44407,0,0,0,0,100,0), +(@PATH,8,-542.6715,2139.263,94.42299,0,0,0,0,100,0), +(@PATH,9,-542.0955,2125.005,96.38588,0,0,0,0,100,0), +(@PATH,10,-531.0101,2105.611,103.8495,0,0,0,0,100,0), +(@PATH,11,-533.4691,2097.096,103.5421,0,0,0,0,100,0), +(@PATH,12,-539.8324,2066.038,103.8721,0,0,0,0,100,0), +(@PATH,13,-559.5454,2057.871,96.58672,0,0,0,0,100,0), +(@PATH,14,-557.4636,2005.37,98.92694,0,0,0,0,100,0); +-- 0x1C09E4424012FA8000002D00001EC994 .go -558.5822 2003.227 98.30606 + +-- Pathing for Dreadcaller Entry: 19434 'TDB FORMAT' +SET @NPC := 69504; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-506.4011,`position_y`=1982.52,`position_z`=85.11931 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,-506.4011,1982.52,85.11931,0,0,0,0,100,0), +(@PATH,2,-491.8763,2002.533,90.20009,0,0,0,0,100,0), +(@PATH,3,-475.5587,2034.282,93.52704,0,0,0,0,100,0), +(@PATH,4,-459.14,2057.011,93.19531,0,0,0,0,100,0), +(@PATH,5,-488.9269,2006.812,90.64146,0,0,0,0,100,0), +(@PATH,6,-506.4684,1982.384,85.10349,0,0,0,0,100,0), +(@PATH,7,-459.1624,2056.984,93.22046,0,0,0,0,100,0), +(@PATH,8,-453.0856,2078.318,92.4622,0,0,0,0,100,0), +(@PATH,9,-458.4782,2105.915,91.30417,0,0,0,0,100,0), +(@PATH,10,-453.1829,2091.579,91.92897,0,0,0,0,100,0), +(@PATH,11,-454.6579,2067.877,92.86068,0,0,0,0,100,0), +(@PATH,12,-471.7339,2040.147,93.86339,0,0,0,0,100,0), +(@PATH,13,-488.8954,2006.772,90.6447,0,0,0,0,100,0), +(@PATH,14,-506.3882,1982.291,85.0636,0,0,0,0,100,0); +-- 0x1C09E4424012FA8000002D00001EC026 .go -506.4011 1982.52 85.11931 diff --git a/sql/updates/world/2014_12_27_05_world.sql b/sql/updates/world/2014_12_27_05_world.sql new file mode 100644 index 00000000000..01743ff30c3 --- /dev/null +++ b/sql/updates/world/2014_12_27_05_world.sql @@ -0,0 +1,272 @@ +-- Pathing for Bleeding Hollow Tormentor Entry: 19424 'TDB FORMAT' +SET @NPC := 69477; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-975.6777,`position_y`=1903.692,`position_z`=84.41418 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,9562,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,-975.6777,1903.692,84.41418,0,0,0,0,100,0), +(@PATH,2,-973.8419,1939.495,70.39467,0,0,0,0,100,0), +(@PATH,3,-955.7029,1969.015,68.00587,0,0,0,0,100,0), +(@PATH,4,-933.9344,1986.529,66.71876,0,0,0,0,100,0), +(@PATH,5,-920.0254,2004.145,64.96164,0,0,0,0,100,0), +(@PATH,6,-912.637,2028.022,56.54257,0,0,0,0,100,0), +(@PATH,7,-891.1589,2064.74,34.64294,0,0,0,0,100,0), +(@PATH,8,-869.7386,2091.601,23.5704,0,0,0,0,100,0), +(@PATH,9,-858.7391,2124.865,17.03608,0,0,0,0,100,0), +(@PATH,10,-823.7175,2119.571,16.5663,0,0,0,0,100,0), +(@PATH,11,-792.2368,2090.261,22.4062,0,0,0,0,100,0), +(@PATH,12,-783.2084,2054.525,29.63973,0,0,0,0,100,0), +(@PATH,13,-779.9326,2023.77,34.75321,0,0,0,0,100,0), +(@PATH,14,-800.3509,1985.585,39.80645,0,0,0,0,100,0), +(@PATH,15,-814.7488,1949.572,47.55807,0,0,0,0,100,0), +(@PATH,16,-822.0464,1919.74,54.06172,0,0,0,0,100,0), +(@PATH,17,-847.4603,1891.778,64.08673,0,0,0,0,100,0), +(@PATH,18,-885.2077,1883.808,72.72009,0,0,0,0,100,0), +(@PATH,19,-915.132,1902.349,70.37255,0,0,0,0,100,0), +(@PATH,20,-940.0393,1898.689,74.6819,0,0,0,0,100,0), +(@PATH,21,-958.8931,1878.34,92.07265,0,0,0,0,100,0), +(@PATH,22,-967.469,1873.979,94.75582,0,0,0,0,100,0), +(@PATH,23,-976.3881,1877.903,94.82088,0,0,0,0,100,0); +-- 0xF1304BE000608B4F .go -975.6777 1903.692 84.41418 + +-- Pathing for Bleeding Hollow Tormentor Entry: 19424 'TDB FORMAT' +SET @NPC := 69471; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-1157.17,`position_y`=1943.396,`position_z`=81.40363 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,-1157.17,1943.396,81.40363,0,0,0,0,100,0), +(@PATH,2,-1151.672,1940.954,81.40428,0,0,0,0,100,0), +(@PATH,3,-1143.042,1932.632,81.42173,0,0,0,0,100,0), +(@PATH,4,-1139.161,1923.026,81.20094,0,0,0,0,100,0), +(@PATH,5,-1138.57,1918.28,81.37885,0,0,0,0,100,0), +(@PATH,6,-1135.403,1912.328,81.4029,0,0,0,0,100,0), +(@PATH,7,-1138.515,1901.65,81.35353,0,0,0,0,100,0), +(@PATH,8,-1145.631,1891.622,81.32314,0,0,0,0,100,0), +(@PATH,9,-1139.867,1899.911,81.37244,0,0,0,0,100,0), +(@PATH,10,-1155.281,1909.135,81.45526,0,0,0,0,100,0), +(@PATH,11,-1139.867,1899.911,81.37244,0,0,0,0,100,0), +(@PATH,12,-1145.631,1891.622,81.32314,0,0,0,0,100,0), +(@PATH,13,-1138.515,1901.65,81.35353,0,0,0,0,100,0), +(@PATH,14,-1135.493,1912.019,81.39507,0,0,0,0,100,0), +(@PATH,15,-1138.57,1918.28,81.37885,0,0,0,0,100,0), +(@PATH,16,-1139.161,1923.026,81.20094,0,0,0,0,100,0), +(@PATH,17,-1142.842,1932.44,81.40112,0,0,0,0,100,0), +(@PATH,18,-1151.672,1940.954,81.40428,0,0,0,0,100,0); +-- 0xF1304BE00060877C .go -1157.17 1943.396 81.40363 + +-- Pathing for Bleeding Hollow Tormentor Entry: 19424 'TDB FORMAT' +SET @NPC := 69476; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-1033.498,`position_y`=2016.301,`position_z`=67.98228 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,9562,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,-1033.498,2016.301,67.98228,0,0,0,0,100,0), +(@PATH,2,-1000.079,2017.703,67.06455,0,0,0,0,100,0), +(@PATH,3,-954.4206,2015.588,67.03322,0,0,0,0,100,0), +(@PATH,4,-915.6917,2025.381,58.45187,0,0,0,0,100,0), +(@PATH,5,-886.038,2057.447,35.91393,0,0,0,0,100,0), +(@PATH,6,-886.0889,2092.425,24.59444,0,0,0,0,100,0), +(@PATH,7,-915.6437,2115.709,20.89748,0,0,0,0,100,0), +(@PATH,8,-914.2065,2149.265,14.4707,0,0,0,0,100,0), +(@PATH,9,-922.1042,2170.104,12.60829,0,0,0,0,100,0), +(@PATH,10,-945.8377,2185.868,12.26309,0,0,0,0,100,0), +(@PATH,11,-961.3444,2217.514,9.387299,0,0,0,0,100,0), +(@PATH,12,-957.1495,2247.785,6.748508,0,0,0,0,100,0), +(@PATH,13,-984.4343,2282.687,6.486638,0,0,0,0,100,0), +(@PATH,14,-1016.313,2306.371,8.956036,0,0,0,0,100,0), +(@PATH,15,-1048.225,2313.089,14.2006,0,0,0,0,100,0), +(@PATH,16,-1081.711,2312.186,20.69922,0,0,0,0,100,0), +(@PATH,17,-1087.714,2285.604,24.63902,0,0,0,0,100,0), +(@PATH,18,-1067.954,2244.344,24.47042,0,0,0,0,100,0), +(@PATH,19,-1052.511,2214.931,19.66574,0,0,0,0,100,0), +(@PATH,20,-1051.316,2178.967,24.62208,0,0,0,0,100,0), +(@PATH,21,-1055.739,2145.756,39.92072,0,0,0,0,100,0), +(@PATH,22,-1057.033,2106.794,57.37517,0,0,0,0,100,0), +(@PATH,23,-1046.553,2082.452,64.01545,0,0,0,0,100,0), +(@PATH,24,-1029.464,2056.926,67.17399,0,0,0,0,100,0), +(@PATH,25,-1056.46,2029.947,67.56455,0,0,0,0,100,0), +(@PATH,26,-1084.9,1998.348,67.47117,0,0,0,0,100,0), +(@PATH,27,-1065.154,1984.061,69.4269,0,0,0,0,100,0), +(@PATH,28,-1084.9,1998.348,67.47117,0,0,0,0,100,0), +(@PATH,29,-1056.46,2029.947,67.56455,0,0,0,0,100,0), +(@PATH,30,-1029.464,2056.926,67.17399,0,0,0,0,100,0), +(@PATH,31,-1046.553,2082.452,64.01545,0,0,0,0,100,0), +(@PATH,32,-1057.033,2106.794,57.37517,0,0,0,0,100,0), +(@PATH,33,-1055.739,2145.756,39.92072,0,0,0,0,100,0), +(@PATH,34,-1051.316,2178.967,24.62208,0,0,0,0,100,0), +(@PATH,35,-1052.511,2214.931,19.66574,0,0,0,0,100,0), +(@PATH,36,-1067.954,2244.344,24.47042,0,0,0,0,100,0), +(@PATH,37,-1087.714,2285.604,24.63902,0,0,0,0,100,0), +(@PATH,38,-1081.711,2312.186,20.69922,0,0,0,0,100,0), +(@PATH,39,-1048.225,2313.089,14.2006,0,0,0,0,100,0), +(@PATH,40,-1016.313,2306.371,8.956036,0,0,0,0,100,0), +(@PATH,41,-984.4343,2282.687,6.486638,0,0,0,0,100,0), +(@PATH,42,-957.1495,2247.785,6.748508,0,0,0,0,100,0), +(@PATH,43,-961.3444,2217.514,9.387299,0,0,0,0,100,0), +(@PATH,44,-945.8377,2185.868,12.26309,0,0,0,0,100,0), +(@PATH,45,-922.1042,2170.104,12.60829,0,0,0,0,100,0), +(@PATH,46,-914.2065,2149.265,14.4707,0,0,0,0,100,0), +(@PATH,47,-915.6437,2115.709,20.89748,0,0,0,0,100,0), +(@PATH,48,-886.0889,2092.425,24.59444,0,0,0,0,100,0), +(@PATH,49,-886.038,2057.447,35.91393,0,0,0,0,100,0), +(@PATH,50,-915.6917,2025.381,58.45187,0,0,0,0,100,0), +(@PATH,51,-954.4206,2015.588,67.03322,0,0,0,0,100,0), +(@PATH,52,-1000.079,2017.703,67.06455,0,0,0,0,100,0), +(@PATH,53,-1033.498,2016.301,67.98228,0,0,0,0,100,0); +-- 0xF1304BE00060AF73 .go -1033.498 2016.301 67.98228 + +-- Pathing for Bleeding Hollow Tormentor Entry: 19424 'TDB FORMAT' +SET @NPC := 69479; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-887.3162,`position_y`=2100.392,`position_z`=22.98137 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,9562,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,-887.3162,2100.392,22.98137,0,0,0,0,100,0), +(@PATH,2,-902.8832,2104.852,22.5635,0,0,0,0,100,0), +(@PATH,3,-915.3331,2120.114,20.053,0,0,0,0,100,0), +(@PATH,4,-914.8217,2141.304,15.65685,0,0,0,0,100,0), +(@PATH,5,-920.6898,2180.254,11.73329,0,0,0,0,100,0), +(@PATH,6,-928.6917,2208.044,9.395775,0,0,0,0,100,0), +(@PATH,7,-935.8201,2223.378,8.009735,0,0,0,0,100,0), +(@PATH,8,-957.2545,2229.223,7.933442,0,0,0,0,100,0), +(@PATH,9,-962.3887,2210.646,10.17673,0,0,0,0,100,0), +(@PATH,10,-949.9908,2203.8,9.920502,0,0,0,0,100,0), +(@PATH,11,-929.2674,2205.433,9.8395,0,0,0,0,100,0), +(@PATH,12,-897.6884,2189.902,10.51884,0,0,0,0,100,0), +(@PATH,13,-862.864,2165.974,11.53246,0,0,0,0,100,0), +(@PATH,14,-840.7776,2152.851,13.35741,0,0,0,0,100,0), +(@PATH,15,-837.7058,2133.558,15.67247,0,0,0,0,100,0), +(@PATH,16,-852.1836,2118.362,17.45734,0,0,0,0,100,0), +(@PATH,17,-871.5316,2098.868,21.64986,0,0,0,0,100,0); +-- 0xF1304BE0006135E2 .go -887.3162 2100.392 22.98137 + +-- Pathing for Bleeding Hollow Tormentor Entry: 19424 'TDB FORMAT' +SET @NPC := 69481; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-1072.546,`position_y`=2254.384,`position_z`=25.03121 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,9562,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,-1072.546,2254.384,25.03121,0,0,0,0,100,0), +(@PATH,2,-1050.309,2248.466,22.70865,0,0,0,0,100,0), +(@PATH,3,-1016.866,2228.801,13.34218,0,0,0,0,100,0), +(@PATH,4,-975.5443,2209.247,10.59319,0,0,0,0,100,0), +(@PATH,5,-950.7357,2192.689,11.50015,0,0,0,0,100,0), +(@PATH,6,-915.4313,2157.962,13.552,0,0,0,0,100,0), +(@PATH,7,-912.6307,2132.925,17.52908,0,0,0,0,100,0), +(@PATH,8,-912.6307,2132.925,17.52908,0,0,0,0,100,0), +(@PATH,9,-915.4313,2157.962,13.552,0,0,0,0,100,0), +(@PATH,10,-950.7357,2192.689,11.50015,0,0,0,0,100,0), +(@PATH,11,-975.5443,2209.247,10.59319,0,0,0,0,100,0), +(@PATH,12,-1016.866,2228.801,13.34218,0,0,0,0,100,0), +(@PATH,13,-1050.309,2248.466,22.70865,0,0,0,0,100,0), +(@PATH,14,-1072.546,2254.384,25.03121,0,0,0,0,100,0); +-- 0xF1304BE00061378F .go -1072.546 2254.384 25.03121 + +-- Pathing for Bleeding Hollow Tormentor Entry: 19424 'TDB FORMAT' +SET @NPC := 69480; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-1000.677,`position_y`=2218.161,`position_z`=11.39956 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,9562,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,-1000.677,2218.161,11.39956,0,0,0,0,100,0), +(@PATH,2,-1034.118,2233.885,16.91886,0,0,0,0,100,0), +(@PATH,3,-1000.677,2218.161,11.39956,0,0,0,0,100,0), +(@PATH,4,-960.3612,2199.009,11.10769,0,0,0,0,100,0), +(@PATH,5,-929.8221,2168.747,12.79615,0,0,0,0,100,0), +(@PATH,6,-917.9709,2134.846,17.4569,0,0,0,0,100,0), +(@PATH,7,-899.0653,2097.202,24.10116,0,0,0,0,100,0), +(@PATH,8,-867.7588,2092.518,23.16903,0,0,0,0,100,0), +(@PATH,9,-834.6699,2065.056,28.35329,0,0,0,0,100,0), +(@PATH,10,-834.6699,2065.056,28.35329,0,0,0,0,100,0), +(@PATH,11,-867.7588,2092.518,23.16903,0,0,0,0,100,0), +(@PATH,12,-899.0653,2097.202,24.10116,0,0,0,0,100,0), +(@PATH,13,-917.9709,2134.846,17.4569,0,0,0,0,100,0), +(@PATH,14,-929.8221,2168.747,12.79615,0,0,0,0,100,0), +(@PATH,15,-960.3612,2199.009,11.10769,0,0,0,0,100,0), +(@PATH,16,-1000.677,2218.161,11.39956,0,0,0,0,100,0), +(@PATH,17,-1034.118,2233.885,16.91886,0,0,0,0,100,0), +(@PATH,18,-1000.677,2218.161,11.39956,0,0,0,0,100,0); +-- 0xF1304BE000613CEA .go -1000.677 2218.161 11.39956 + +-- Pathing for Bleeding Hollow Tormentor Entry: 19424 'TDB FORMAT' +SET @NPC := 69474; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-1141.451,`position_y`=2039.274,`position_z`=67.06458 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,-1141.451,2039.274,67.06458,0,0,0,0,100,0), +(@PATH,2,-1098.165,2044.068,66.97787,0,0,0,0,100,0), +(@PATH,3,-1053.092,2025.227,67.56455,0,0,0,0,100,0), +(@PATH,4,-1011.46,2004.103,67.06455,0,0,0,0,100,0), +(@PATH,5,-983.9862,1982.55,68.81455,0,0,0,0,100,0), +(@PATH,6,-984.9029,1950.981,70.32558,0,0,0,0,100,0), +(@PATH,7,-974.4434,1917.587,77.03918,0,0,0,0,100,0), +(@PATH,8,-951.4631,1888.722,82.49074,0,0,0,0,100,0), +(@PATH,9,-918.9573,1886.185,78.15961,0,0,0,0,100,0), +(@PATH,10,-918.9573,1886.185,78.15961,0,0,0,0,100,0), +(@PATH,11,-951.4631,1888.722,82.49074,0,0,0,0,100,0), +(@PATH,12,-974.4434,1917.587,77.03918,0,0,0,0,100,0), +(@PATH,13,-984.9029,1950.981,70.32558,0,0,0,0,100,0), +(@PATH,14,-983.9862,1982.55,68.81455,0,0,0,0,100,0), +(@PATH,15,-1011.46,2004.103,67.06455,0,0,0,0,100,0), +(@PATH,16,-1053.092,2025.227,67.56455,0,0,0,0,100,0), +(@PATH,17,-1098.165,2044.068,66.97787,0,0,0,0,100,0), +(@PATH,18,-1141.451,2039.274,67.06458,0,0,0,0,100,0); +-- 0xF1304BE00061420D .go -1141.451 2039.274 67.06458 + +-- Pathing for Bleeding Hollow Tormentor Entry: 19424 'TDB FORMAT' +SET @NPC := 69478; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-824.4816,`position_y`=1990.778,`position_z`=38.91302 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,9562,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,-824.4816,1990.778,38.91302,0,0,0,0,100,0), +(@PATH,2,-800.973,2019.102,38.81275,0,0,0,0,100,0), +(@PATH,3,-801.4883,2043.102,41.42069,0,0,0,0,100,0), +(@PATH,4,-820.149,2057.47,35.70707,0,0,0,0,100,0), +(@PATH,5,-830.2311,2072.128,25.74135,0,0,0,0,100,0), +(@PATH,6,-842.6055,2101.628,19.20734,0,0,0,0,100,0), +(@PATH,7,-854.4006,2133.824,15.76549,0,0,0,0,100,0), +(@PATH,8,-854.3831,2150.491,13.76549,0,0,0,0,100,0), +(@PATH,9,-871.9949,2163.9,11.56941,0,0,0,0,100,0), +(@PATH,10,-900.2237,2167.077,11.69764,0,0,0,0,100,0), +(@PATH,11,-900.2237,2167.077,11.69764,0,0,0,0,100,0), +(@PATH,12,-871.9949,2163.9,11.56941,0,0,0,0,100,0), +(@PATH,13,-854.3831,2150.491,13.76549,0,0,0,0,100,0), +(@PATH,14,-854.4006,2133.824,15.76549,0,0,0,0,100,0), +(@PATH,15,-842.6055,2101.628,19.20734,0,0,0,0,100,0), +(@PATH,16,-830.2311,2072.128,25.74135,0,0,0,0,100,0), +(@PATH,17,-820.149,2057.47,35.70707,0,0,0,0,100,0), +(@PATH,18,-801.4883,2043.102,41.42069,0,0,0,0,100,0), +(@PATH,19,-800.973,2019.102,38.81275,0,0,0,0,100,0), +(@PATH,20,-824.4816,1990.778,38.91302,0,0,0,0,100,0); +-- 0xF1304BE0006192D2 .go -824.4816 1990.778 38.91302 + +-- Pathing for Worg Master Kruush Entry: 19442 'TDB FORMAT' +SET @NPC := 69634; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-1057.877,`position_y`=1996.641,`position_z`=67.34181 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,-1057.877,1996.641,67.34181,0,0,0,0,100,0), +(@PATH,2,-1050.188,2009.977,67.06455,0,0,0,0,100,0); +-- 0xF1304BF20060E90B .go -1057.877 1996.641 67.34181 diff --git a/sql/updates/world/2014_12_27_06_world.sql b/sql/updates/world/2014_12_27_06_world.sql new file mode 100644 index 00000000000..bc19a755a9b --- /dev/null +++ b/sql/updates/world/2014_12_27_06_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `smart_scripts` SET `action_param2` = 0 WHERE `entryorguid`=37007 AND `id`=1; diff --git a/sql/updates/world/2014_12_27_07_world.sql b/sql/updates/world/2014_12_27_07_world.sql new file mode 100644 index 00000000000..78d9ee848a5 --- /dev/null +++ b/sql/updates/world/2014_12_27_07_world.sql @@ -0,0 +1,42 @@ +DELETE FROM `creature_formations` WHERE `leaderGUID`=38429; +INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`) VALUES +(38429, 38429, 0, 0, 2), +(38429, 38430, 3, 270, 2); + +-- Pathing for Mattie Alred Entry: 5668 'TDB FORMAT' +SET @NPC := 38429; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=1717.818,`position_y`=303.1138,`position_z`=-61.47988 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,1717.818,303.1138,-61.47988,0,0,0,0,100,0), +(@PATH,2,1724.056,285.5189,-62.18394,0,0,0,0,100,0), +(@PATH,3,1725.809,279.2398,-62.18219,0,0,0,0,100,0), +(@PATH,4,1728.313,268.6199,-62.17767,0,0,0,0,100,0), +(@PATH,5,1730.295,250.8002,-62.17767,0,0,0,0,100,0), +(@PATH,6,1716.658,240.3017,-62.17767,0,0,0,0,100,0), +(@PATH,7,1692.596,241.7838,-62.17767,0,0,0,0,100,0), +(@PATH,8,1672.504,242.9413,-62.17767,0,0,0,0,100,0), +(@PATH,9,1665.619,249.5088,-62.1778,0,0,0,0,100,0), +(@PATH,10,1663.849,264.2947,-62.17823,0,0,0,0,100,0), +(@PATH,11,1659.715,273.889,-62.17942,0,0,0,0,100,0), +(@PATH,12,1652.447,286.605,-62.18125,0,0,0,0,100,0), +(@PATH,13,1637.696,299.425,-62.17578,0,0,0,0,100,0), +(@PATH,14,1621.363,308.3512,-62.17768,0,0,0,0,100,0), +(@PATH,15,1605.388,311.2079,-62.17768,0,0,0,0,100,0), +(@PATH,16,1598.25,318.9116,-62.17767,0,0,0,0,100,0), +(@PATH,17,1598.482,334.9213,-62.17767,0,0,0,0,100,0), +(@PATH,18,1599.09,358.2072,-62.17767,0,0,0,0,100,0), +(@PATH,19,1598.418,367.1544,-62.22174,0,0,0,0,100,0), +(@PATH,20,1610.374,374.7628,-62.17767,0,0,0,0,100,0), +(@PATH,21,1627.031,371.8268,-62.17767,0,0,0,0,100,0), +(@PATH,22,1637.79,368.5305,-62.16847,0,0,0,0,100,0), +(@PATH,23,1655.578,358.9601,-60.74146,0,0,0,0,100,0), +(@PATH,24,1657.84,352.9977,-60.72892,0,0,0,0,100,0), +(@PATH,25,1654.79,342.4309,-62.17167,0,0,0,0,100,0), +(@PATH,26,1668.162,325.3488,-62.15568,0,0,0,0,100,0), +(@PATH,27,1680.751,314.6597,-62.15656,0,0,0,0,100,0), +(@PATH,28,1694.482,302.0437,-62.16363,0,0,0,0,100,0); +-- 0xF13016240000906A .go 1717.818 303.1138 -61.47988 diff --git a/sql/updates/world/2014_12_27_08_world.sql b/sql/updates/world/2014_12_27_08_world.sql new file mode 100644 index 00000000000..ac4a228c154 --- /dev/null +++ b/sql/updates/world/2014_12_27_08_world.sql @@ -0,0 +1,8 @@ +-- +SET @GUID := 75088; +DELETE FROM `creature` WHERE id IN (33630,33639,33642,33645); +INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `VerifiedBuild`) VALUES +(@GUID+0, 33630, 530, 0, 0, 1, 1, 0, 1, -2091.979, 5634.983, 50.31123, 2.844887, 300, 0, 0, 2266, 6015, 0, 0, 0, 0, 0), +(@GUID+1, 33639, 530, 0, 0, 1, 1, 0, 1, -2093.764, 5632.878, 50.31123, 2.513274, 300, 0, 0, 3237, 0, 0, 0, 0, 0, 0), +(@GUID+2, 33642, 530, 0, 0, 1, 1, 0, 1, -2254.972, 5560.913, 67.10059, 5.951573, 300, 0, 0, 2835, 7196, 0, 0, 0, 0, 0), +(@GUID+3, 33645, 571, 0, 0, 1, 1, 0, 1, 8579.87, 749.8559, 547.376, 6.08289, 300, 0, 0, 10635, 0, 0, 0, 0, 0, 0); diff --git a/sql/updates/world/2014_12_27_09_world.sql b/sql/updates/world/2014_12_27_09_world.sql new file mode 100644 index 00000000000..89371fff954 --- /dev/null +++ b/sql/updates/world/2014_12_27_09_world.sql @@ -0,0 +1,70 @@ +-- +SET @CGUID := 75092; + +DELETE FROM `creature` WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+7; +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `MovementType`) VALUES +(@CGUID+0, 29854, 571, 1, 1, 6712.09, -533.401, 1211.94, 1.69635, 0, 0, 0), +(@CGUID+1, 29854, 571, 1, 1, 6695.85, -487.759, 1195.42, 1.80238, 0, 0, 0), +(@CGUID+2, 29854, 571, 1, 1, 6675.19, -420.657, 1184.11, 3.36925, 0, 15, 1), +(@CGUID+3, 29854, 571, 1, 1, 6647.07, -477.868, 1167.51, 2.68202, 0, 0, 0), +(@CGUID+4, 29854, 571, 1, 1, 6706.95, -521.231, 1211.49, 5.17959, 0, 0, 0), +(@CGUID+5, 29854, 571, 1, 1, 6697.77, -462.455, 1178.17, 5.77257, 0, 0, 0), +(@CGUID+6, 29854, 571, 1, 1, 6671.19, -467.731, 1178.39, 6.27915, 0, 0, 0); + +UPDATE `creature_template` SET `InhabitType`=4 WHERE `entry` IN (29854, 30013); + +DELETE FROM `creature` WHERE `guid` IN (99014, 99015, 99017, 99172, 121713, 121358); -- vehicle accessory and wrong spawn + +DELETE FROM `vehicle_template_accessory` WHERE `entry`= 30013; +INSERT INTO `vehicle_template_accessory` (`entry`,`accessory_entry`,`seat_id`,`minion`,`description`,`summontype`,`summontimer`) VALUES +(30013,29730,0,1,'Stormcrest Eagle',5,0); + +UPDATE `creature` SET movementType=2 WHERE `guid` IN (101713, 101714, 101715, 101801); + +DELETE FROM `creature_addon` WHERE `guid` IN (101713, 101714, 101715, 101801); +INSERT INTO `creature_addon` (`guid`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`,`auras`) VALUES +(101713, 1017130, 0, 0, 1, 0, ''), +(101714, 1017140, 0, 0, 1, 0, ''), +(101715, 1017150, 0, 0, 1, 0, ''), +(101801, 1018010, 0, 0, 1, 0, ''); + +DELETE FROM `waypoint_data` WHERE `id` IN (1017130, 1017140, 1017150, 1018010); +INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_type`, `action`, `action_chance`, `wpguid`) VALUES +(1017130, 1, 6580.963, -341.5958, 1025.59, 0, 0, 1, 0, 100, 0), +(1017130, 2, 6595.587, -274.2542, 1025.59, 0, 0, 1, 0, 100, 0), +(1017130, 3, 6603.651, -214.6846, 1025.59, 0, 0, 1, 0, 100, 0), +(1017130, 4, 6598.268, -139.6636, 1025.59, 0, 0, 1, 0, 100, 0), +(1017130, 5, 6583.247, -70.26400, 1025.59, 0, 0, 1, 0, 100, 0), +(1017130, 6, 6517.861, -27.37788, 1025.59, 0, 0, 1, 0, 100, 0), +(1017130, 7, 6334.042, -80.26796, 1025.59, 0, 0, 1, 0, 100, 0), +(1017130, 8, 6302.791, -214.7384, 1025.59, 0, 0, 1, 0, 100, 0), +(1017130, 9, 6306.531, -372.1047, 1025.59, 0, 0, 1, 0, 100, 0), +(1017130, 10, 6347.108, -523.2972, 1025.59, 0, 0, 1, 0, 100, 0), +(1017130, 11, 6469.087, -575.7284, 1025.59, 0, 0, 1, 0, 100, 0), +(1017130, 12, 6543.881, -476.6713, 1025.59, 0, 0, 1, 0, 100, 0), +(1017140, 1, 6558.544, -152.0257, 1054.933, 0, 0, 1, 0, 100, 0), +(1017140, 2, 6609.241, -127.7897, 1055.322, 0, 0, 1, 0, 100, 0), +(1017140, 3, 6701.458, -107.1807, 1059.877, 0, 0, 1, 0, 100, 0), +(1017140, 4, 6774.843, -197.2011, 1078.129, 0, 0, 1, 0, 100, 0), +(1017140, 5, 6777.308, -292.3615, 1095.376, 0, 0, 1, 0, 100, 0), +(1017140, 6, 6703.971, -329.4862, 1100.933, 0, 0, 1, 0, 100, 0), +(1017140, 7, 6606.578, -326.3456, 1091.265, 0, 0, 1, 0, 100, 0), +(1017140, 8, 6552.779, -289.719, 1077.712, 0, 0, 1, 0, 100, 0), +(1017140, 9, 6536.85, -189.0296, 1059.237, 0, 0, 1, 0, 100, 0), +(1017150, 1, 6630.098, -152.5961, 999.0965, 0, 0, 1, 0, 100, 0), +(1017150, 2, 6663.148, -136.3936, 999.0965, 0, 0, 1, 0, 100, 0), +(1017150, 3, 6705.553, -94.23096, 999.0965, 0, 0, 1, 0, 100, 0), +(1017150, 4, 6728.896, 43.04465, 999.0965, 0, 0, 1, 0, 100, 0), +(1017150, 5, 6628.838, 175.6433, 999.0965, 0, 0, 1, 0, 100, 0), +(1017150, 6, 6520.246, 148.9764, 999.0965, 0, 0, 1, 0, 100, 0), +(1017150, 7, 6386.172, -22.66618, 999.0965, 0, 0, 1, 0, 100, 0), +(1017150, 8, 6253.463, -195.8139, 999.0965, 0, 0, 1, 0, 100, 0), +(1017150, 9, 6330.91, -276.6109, 999.0965, 0, 0, 1, 0, 100, 0), +(1017150, 10, 6537.496, -198.9901, 999.0965, 0, 0, 1, 0, 100, 0), +(1018010, 1, 6725.225586, -25.534340, 999.721313, 0, 0, 1, 0, 100, 0), +(1018010, 2, 6638.638184, -52.154530, 991.158203, 0, 0, 1, 0, 100, 0), +(1018010, 3, 6567.925293, -153.043152, 1001.600220, 0, 0, 1, 0, 100, 0), +(1018010, 4, 6591.385742, -224.502579, 1003.976013, 0, 0, 1, 0, 100, 0), +(1018010, 5, 6695.518555, -252.929214, 1022.529175, 0, 0, 1, 0, 100, 0), +(1018010, 6, 6802.429199, -243.025558, 1022.408691, 0, 0, 1, 0, 100, 0), +(1018010, 7, 6798.217285, -161.789276, 1046.530518, 0, 0, 1, 0, 100, 0); diff --git a/sql/updates/world/2014_12_27_10_world.sql b/sql/updates/world/2014_12_27_10_world.sql new file mode 100644 index 00000000000..590be4a9adc --- /dev/null +++ b/sql/updates/world/2014_12_27_10_world.sql @@ -0,0 +1,10 @@ +-- The Brewmaiden SAI +SET @ENTRY := 36021; + +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY; + +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,22,0,100,0,101,0,0,0,11,48249,1,0,0,0,0,7,0,0,0,0,0,0,0,"The Brewmaiden - Received Emote 101 - Cast 'Brewfest Brew Toss'"), +(@ENTRY,0,1,2,54,0,100,0,0,0,0,0,75,68269,0,0,0,0,0,23,0,0,0,0,0,0,0,"The Brewmaiden - On Just Summoned - Add Aura 'The Brewmaiden's Blessing'"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,80,@ENTRY*100+00,2,0,0,0,0,1,0,0,0,0,0,0,0,"The Brewmaiden - On Just Summoned - Run Script"); diff --git a/sql/updates/world/2014_12_27_11_world.sql b/sql/updates/world/2014_12_27_11_world.sql new file mode 100644 index 00000000000..8474f056f5e --- /dev/null +++ b/sql/updates/world/2014_12_27_11_world.sql @@ -0,0 +1,5 @@ +-- Actionlist SAI +SET @ENTRY := 3602100; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=9; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,9,0,0,0,0,100,0,34000,34000,0,0,28,68269,0,0,0,0,0,23,0,0,0,0,0,0,0,"On Script - Remove Aura 'The Brewmaiden's Blessing'"); diff --git a/sql/updates/world/2014_12_27_12_world.sql b/sql/updates/world/2014_12_27_12_world.sql new file mode 100644 index 00000000000..acc0a8fb619 --- /dev/null +++ b/sql/updates/world/2014_12_27_12_world.sql @@ -0,0 +1,17 @@ +UPDATE `quest_template` SET `PrevQuestId`=0 WHERE `Id` IN(10995,10996,10997); +UPDATE `quest_template` SET `ExclusiveGroup`=10983 WHERE `Id` IN(10983,10989); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN(19,20) AND `SourceEntry` IN(10995,10996,10997); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(19, 0, 10995, 0, 0, 8, 0, 10989, 0, 0, 0, 0, 0, '', 'Grulloc Has Two Skulls after Mog dorg the Wizened'), +(20, 0, 10995, 0, 0, 8, 0, 10989, 0, 0, 0, 0, 0, '', 'Grulloc Has Two Skulls after Mog dorg the Wizened'), +(19, 0, 10995, 0, 1, 8, 0, 10983, 0, 0, 0, 0, 0, '', 'Grulloc Has Two Skulls after Mog dorg the Wizened'), +(20, 0, 10995, 0, 1, 8, 0, 10983, 0, 0, 0, 0, 0, '', 'Grulloc Has Two Skulls after Mog dorg the Wizened'), +(19, 0, 10996, 0, 0, 8, 0, 10989, 0, 0, 0, 0, 0, '', 'Maggocs Treasure Chest after Mog dorg the Wizened'), +(20, 0, 10996, 0, 0, 8, 0, 10989, 0, 0, 0, 0, 0, '', 'Maggocs Treasure Chest after Mog dorg the Wizened'), +(19, 0, 10996, 0, 1, 8, 0, 10983, 0, 0, 0, 0, 0, '', 'Maggocs Treasure Chest after Mog dorg the Wizened'), +(20, 0, 10996, 0, 1, 8, 0, 10983, 0, 0, 0, 0, 0, '', 'Maggocs Treasure Chest after Mog dorg the Wizened'), +(19, 0, 10997, 0, 0, 8, 0, 10989, 0, 0, 0, 0, 0, '', 'Even Gronn Have Standards after Mog dorg the Wizened'), +(20, 0, 10997, 0, 0, 8, 0, 10989, 0, 0, 0, 0, 0, '', 'Even Gronn Have Standards after Mog dorg the Wizened'), +(19, 0, 10997, 0, 1, 8, 0, 10983, 0, 0, 0, 0, 0, '', 'Even Gronn Have Standards after Mog dorg the Wizened'), +(20, 0, 10997, 0, 1, 8, 0, 10983, 0, 0, 0, 0, 0, '', 'Even Gronn Have Standards after Mog dorg the Wizened'); diff --git a/sql/updates/world/2014_12_28_00_world.sql b/sql/updates/world/2014_12_28_00_world.sql new file mode 100644 index 00000000000..467115a2de2 --- /dev/null +++ b/sql/updates/world/2014_12_28_00_world.sql @@ -0,0 +1,199 @@ +-- Wrong npc spawned, should be a Stormwind Infantry npc +UPDATE `creature` SET `id`=16864 WHERE `guid`=57934; + +-- Pathing for Stormwind Infantry Entry: 16864 'TDB FORMAT' +SET @NPC := 57934; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-702.9703,`position_y`=1826.119,`position_z`=75.24933 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,-702.9703,1826.119,75.24933,0,0,0,0,100,0), +(@PATH,2,-707.4134,1826.754,75.24933,0,0,0,0,100,0); +-- 0x1C09E4424010780000002B00009A4063 .go -702.9703 1826.119 75.24933 + +DELETE FROM `creature_formations` WHERE `leaderGUID`=57965; +INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`) VALUES +(57965, 57965, 0, 0, 2), +(57965, 57966, 5, 0, 2), +(57965, 57967, 10, 0, 2), +(57965, 57968, 15, 0, 2); + +-- SAI Set Run On is bugged, if fixed this will work. +-- Honor Hold Cavalryman SAI +SET @ENTRY := 16843; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,11,0,100,0,0,0,0,0,59,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Honor Hold Cavalryman - On Respawn - Set Run On"); + +-- Pathing for Honor Hold Cavalryman Entry: 16843 'TDB FORMAT' +SET @NPC := 57965; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-693.6425,`position_y`=2675.357,`position_z`=93.08069 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,2410,0,0,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,-693.6425,2675.357,93.08069,0,0,0,0,100,0), +(@PATH,2,-678.617,2653.904,90.11584,0,0,0,0,100,0), +(@PATH,3,-670.0779,2623.337,87.22372,0,0,0,0,100,0), +(@PATH,4,-647.809,2588.676,83.14737,0,0,0,0,100,0), +(@PATH,5,-620.405,2546.836,73.68471,0,0,0,0,100,0), +(@PATH,6,-604.7114,2503.37,64.40894,0,0,0,0,100,0), +(@PATH,7,-603.8063,2468.986,57.10122,0,0,0,0,100,0), +(@PATH,8,-604.4416,2435.113,50.43313,0,0,0,0,100,0), +(@PATH,9,-599.5267,2409.476,44.74646,0,0,0,0,100,0), +(@PATH,10,-584.7905,2406.665,43.70581,0,0,0,0,100,0), +(@PATH,11,-582.3721,2430.458,47.94434,0,0,0,0,100,0), +(@PATH,12,-582.2322,2463.321,53.99577,0,0,0,0,100,0), +(@PATH,13,-583.6086,2498.498,61.39573,0,0,0,0,100,0), +(@PATH,14,-558.1572,2532.4,67.07269,0,0,0,0,100,0), +(@PATH,15,-524.5069,2553.839,65.79486,0,0,0,0,100,0), +(@PATH,16,-505.5841,2594.287,68.31036,0,0,0,0,100,0), +(@PATH,17,-504.4444,2604.637,70.43836,0,0,0,0,100,0), +(@PATH,18,-510.0499,2664.531,70.29152,0,0,0,0,100,0), +(@PATH,19,-511.0184,2694.743,68.82625,0,0,0,0,100,0), +(@PATH,20,-517.2742,2716.729,67.8214,0,0,0,0,100,0), +(@PATH,21,-534.5939,2747.733,69.1256,0,0,0,0,100,0), +(@PATH,22,-565.1152,2807.142,63.14902,0,0,0,0,100,0), +(@PATH,23,-596.1111,2836.904,59.59448,0,0,0,0,100,0), +(@PATH,24,-630.4422,2866.988,51.1272,0,0,0,0,100,0), +(@PATH,25,-678.3279,2883.457,47.06744,0,0,0,0,100,0), +(@PATH,26,-723.3876,2887.968,33.10106,0,0,0,0,100,0), +(@PATH,27,-762.0458,2886.646,24.27474,0,0,0,0,100,0), +(@PATH,28,-792.7939,2863.772,21.49371,0,0,0,0,100,0), +(@PATH,29,-819.7803,2843.219,19.12334,0,0,0,0,100,0), +(@PATH,30,-873.9691,2815.151,15.98937,0,0,0,0,100,0), +(@PATH,31,-893.9761,2802.479,14.45792,0,0,0,0,100,0), +(@PATH,32,-897.1367,2771.076,20.99353,0,0,0,0,100,0), +(@PATH,33,-867.2095,2775.483,38.31301,0,0,0,0,100,0), +(@PATH,34,-860.2045,2761.954,45.71127,0,0,0,0,100,0), +(@PATH,35,-868.9539,2736.927,57.97308,0,0,0,0,100,0), +(@PATH,36,-871.5066,2701.324,78.20714,0,0,0,0,100,0), +(@PATH,37,-856.217,2675.711,92.33214,0,0,0,0,100,0), +(@PATH,38,-833.6348,2676.617,98.47594,0,0,0,0,100,0), +(@PATH,39,-808.0863,2687.279,104.1725,0,0,0,0,100,0), +(@PATH,40,-790.8087,2689.64,104.0867,0,0,0,0,100,0), +(@PATH,41,-724.9875,2676.18,96.8718,0,0,0,0,100,0); +-- 0x1C09E442401072C000002000004EA00B .go -693.6425 2675.357 93.08069 + +DELETE FROM `creature_formations` WHERE `leaderGUID`=57937; +INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`) VALUES +(57937, 57937, 0, 0, 2), +(57937, 57923, 3, 90, 2); + +-- Pathing for Honor Hold Defender Entry: 16842 'TDB FORMAT' +SET @NPC := 57937; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-872.1663,`position_y`=2769.454,`position_z`=37.44319 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,-872.1663,2769.454,37.44319,0,0,0,0,100,0), +(@PATH,2,-869.7395,2768.148,39.13062,0,0,0,0,100,0), +(@PATH,3,-865.2796,2739.821,56.70609,0,0,0,0,100,0), +(@PATH,4,-867.5071,2718.566,68.9836,0,0,0,0,100,0), +(@PATH,5,-867.6776,2699.037,79.59444,0,0,0,0,100,0), +(@PATH,6,-857.8785,2686.67,88.437,0,0,0,0,100,0), +(@PATH,7,-842.5071,2678.96,95.25343,0,0,0,0,100,0), +(@PATH,8,-822.5238,2681.506,102.4034,0,0,0,0,100,0), +(@PATH,9,-817.7297,2683.09,103.48,0,0,0,0,100,0), +(@PATH,10,-817.5452,2683.404,103.4257,0,0,0,0,100,0), +(@PATH,11,-838.7125,2678.288,96.64885,0,0,0,0,100,0), +(@PATH,12,-856.334,2685.094,89.30038,0,0,0,0,100,0), +(@PATH,13,-866.9412,2697.539,80.50797,0,0,0,0,100,0), +(@PATH,14,-867.8522,2713.977,71.4567,0,0,0,0,100,0), +(@PATH,15,-865.3911,2736.797,58.61076,0,0,0,0,100,0), +(@PATH,16,-866.6399,2765.021,41.61932,0,0,0,0,100,0); +-- 0x1C09E4424010728000002D00001E733B .go -872.1663 2769.454 37.44319 + +-- Pathing for Honor Hold Archer Entry: 16896 'TDB FORMAT' +SET @NPC := 58441; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-794.1317,`position_y`=2601.671,`position_z`=133.2523 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,-794.1317,2601.671,133.2523,0,0,0,0,100,0), +(@PATH,2,-778.0168,2611.436,133.2532,0,0,0,0,100,0); +-- 0x1C09E4424010800000001F00004BCB3D .go -794.1317 2601.671 133.2523 + +-- Pathing for Honor Hold Archer Entry: 16896 'TDB FORMAT' +SET @NPC := 58440; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-800.5278,`position_y`=2648.273,`position_z`=133.2537 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,-800.5278,2648.273,133.2537,0,0,0,0,100,0), +(@PATH,2,-816.2895,2638.862,133.2529,0,0,0,0,100,0); +-- 0x1C09E4424010800000001F00004BCB47 .go -800.5278 2648.273 133.2537 + +-- Pathing for Honor Hold Archer Entry: 16896 'TDB FORMAT' +SET @NPC := 58448; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-697.1456,`position_y`=2567.732,`position_z`=101.4374 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,-697.1456,2567.732,101.4374,0,0,0,0,100,0), +(@PATH,2,-683.9911,2574.386,100.8064,0,0,0,0,100,0), +(@PATH,3,-683.9779,2574.394,100.8655,0,0,0,0,100,0), +(@PATH,4,-697.2676,2567.764,101.4445,0,0,0,0,100,0), +(@PATH,5,-682.3236,2567.782,100.8602,0,0,0,0,100,0); +-- 0x1C09E4424010800000001F00014B15DB .go -697.1456 2567.732 101.4374 + + +-- Pathing for Honor Hold Archer Entry: 16896 'TDB FORMAT' +SET @NPC := 58442; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-750.128,`position_y`=2567.929,`position_z`=104.1502 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,-750.128,2567.929,104.1502,0,0,0,0,100,0), +(@PATH,2,-746.1736,2566.977,104.3655,0,0,0,0,100,0), +(@PATH,3,-732.6676,2565.869,104.5501,0,0,0,0,100,0), +(@PATH,4,-754.0043,2574.421,104.1675,0,0,0,0,100,0), +(@PATH,5,-754.0061,2574.378,104.2026,0,0,0,0,100,0), +(@PATH,6,-732.6328,2565.721,104.5407,0,0,0,0,100,0), +(@PATH,7,-746.1768,2566.991,104.2605,0,0,0,0,100,0); +-- 0x1C09E4424010800000001F00024B15DA .go -750.128 2567.929 104.1502 + +-- Pathing for Honor Hold Archer Entry: 16896 'TDB FORMAT' +SET @NPC := 58452; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-674.274,`position_y`=2787.06,`position_z`=109.5986 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,-674.274,2787.06,109.5986,0,0,0,0,100,0), +(@PATH,2,-661.9408,2782.68,107.5661,0,0,0,0,100,0), +(@PATH,3,-645.2046,2773.514,104.8345,0,0,0,0,100,0), +(@PATH,4,-664.4965,2777.165,107.6214,0,0,0,0,100,0), +(@PATH,5,-664.445,2776.807,107.7074,0,0,0,0,100,0), +(@PATH,6,-645.4469,2773.186,104.7909,0,0,0,0,100,0); +-- 0x1C09E4424010800000001F0003CB15DA .go -674.274 2787.06 109.5986 + +-- Pathing for Honor Hold Archer Entry: 16896 'TDB FORMAT' +SET @NPC := 58453; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-607.841,`position_y`=2612.785,`position_z`=99.32381 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,-607.841,2612.785,99.32381,0,0,0,0,100,0), +(@PATH,2,-604.588,2617.701,99.53741,0,0,0,0,100,0), +(@PATH,3,-605.6599,2620.353,99.11266,0,0,0,0,100,0), +(@PATH,4,-605.5408,2620.273,98.99216,0,0,0,0,100,0), +(@PATH,5,-604.4185,2617.526,99.5359,0,0,0,0,100,0); +-- 0x1C09E4424010800000002000004E9D75 .go -607.841 2612.785 99.32381 diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp index 5f6573ad1a6..36eedae90ef 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -2264,7 +2264,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u if (linked) ProcessEvent(linked, unit, var0, var1, bvar, spell, gob); else - TC_LOG_ERROR("sql.sql", "SmartScript::ProcessAction: Entry %d SourceType %u, Event %u, Link Event %u not found or invalid, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.link); + TC_LOG_DEBUG("sql.sql", "SmartScript::ProcessAction: Entry %d SourceType %u, Event %u, Link Event %u not found or invalid, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.link); } } diff --git a/src/server/game/Accounts/AccountMgr.cpp b/src/server/game/Accounts/AccountMgr.cpp index 79b9557fc2b..43fe9a80bc3 100644 --- a/src/server/game/Accounts/AccountMgr.cpp +++ b/src/server/game/Accounts/AccountMgr.cpp @@ -462,7 +462,7 @@ void AccountMgr::LoadRBAC() while (result->NextRow()); TC_LOG_DEBUG("rbac", "AccountMgr::LoadRBAC: Loading default permissions"); - result = LoginDatabase.Query("SELECT secId, permissionId FROM rbac_default_permissions ORDER BY secId ASC"); + result = LoginDatabase.PQuery("SELECT secId, permissionId FROM rbac_default_permissions WHERE (realmId = %u OR realmId = -1) ORDER BY secId ASC", realmID); if (!result) { TC_LOG_INFO("server.loading", ">> Loaded 0 default permission definitions. DB table `rbac_default_permissions` is empty."); diff --git a/src/server/game/Accounts/RBAC.h b/src/server/game/Accounts/RBAC.h index 7001374d90a..d63ba84605e 100644 --- a/src/server/game/Accounts/RBAC.h +++ b/src/server/game/Accounts/RBAC.h @@ -100,6 +100,7 @@ enum RBACPermissions RBAC_PERM_COMMANDS_PINFO_CHECK_PERSONAL_DATA = 48, RBAC_PERM_EMAIL_CONFIRM_FOR_PASS_CHANGE = 49, RBAC_PERM_MAY_CHECK_OWN_EMAIL = 50, + RBAC_PERM_ALLOW_TWO_SIDE_TRADE = 51, // Free space for core permissions (till 149) // Roles (Permissions with delegated permissions) use 199 and descending diff --git a/src/server/game/Chat/Chat.cpp b/src/server/game/Chat/Chat.cpp index 6f614994489..f05ce5bded9 100644 --- a/src/server/game/Chat/Chat.cpp +++ b/src/server/game/Chat/Chat.cpp @@ -982,7 +982,7 @@ uint32 ChatHandler::extractSpellIdFromLink(char* text) if (!idS) return 0; - uint32 id = (uint32)atol(idS); + uint32 id = atoul(idS); switch (type) { @@ -995,13 +995,10 @@ uint32 ChatHandler::extractSpellIdFromLink(char* text) if (!talentEntry) return 0; - int32 rank = param1_str ? (uint32)atol(param1_str) : 0; + uint32 rank = param1_str ? atol(param1_str) : 0u; if (rank >= MAX_TALENT_RANK) return 0; - if (rank < 0) - rank = 0; - return talentEntry->RankID[rank]; } case SPELL_LINK_ENCHANT: @@ -1009,7 +1006,7 @@ uint32 ChatHandler::extractSpellIdFromLink(char* text) return id; case SPELL_LINK_GLYPH: { - uint32 glyph_prop_id = param1_str ? (uint32)atol(param1_str) : 0; + uint32 glyph_prop_id = param1_str ? atoul(param1_str) : 0; GlyphPropertiesEntry const* glyphPropEntry = sGlyphPropertiesStore.LookupEntry(glyph_prop_id); if (!glyphPropEntry) @@ -1082,7 +1079,7 @@ ObjectGuid ChatHandler::extractGuidFromLink(char* text) } case SPELL_LINK_CREATURE: { - uint32 lowguid = (uint32)atol(idS); + uint32 lowguid = atoul(idS); if (CreatureData const* data = sObjectMgr->GetCreatureData(lowguid)) return ObjectGuid(HIGHGUID_UNIT, data->id, lowguid); @@ -1091,7 +1088,7 @@ ObjectGuid ChatHandler::extractGuidFromLink(char* text) } case SPELL_LINK_GAMEOBJECT: { - uint32 lowguid = (uint32)atol(idS); + uint32 lowguid = atoul(idS); if (GameObjectData const* data = sObjectMgr->GetGOData(lowguid)) return ObjectGuid(HIGHGUID_GAMEOBJECT, data->id, lowguid); diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp index 094a8345395..f7fa719a610 100644 --- a/src/server/game/Conditions/ConditionMgr.cpp +++ b/src/server/game/Conditions/ConditionMgr.cpp @@ -29,6 +29,79 @@ #include "SpellMgr.h" #include "Spell.h" +char const* ConditionMgr::StaticSourceTypeData[CONDITION_SOURCE_TYPE_MAX] = +{ + "None", + "Creature Loot", + "Disenchant Loot", + "Fishing Loot", + "GameObject Loot", + "Item Loot", + "Mail Loot", + "Milling Loot", + "Pickpocketing Loot", + "Prospecting Loot", + "Reference Loot", + "Skinning Loot", + "Spell Loot", + "Spell Impl. Target", + "Gossip Menu", + "Gossip Menu Option", + "Creature Vehicle", + "Spell Expl. Target", + "Spell Click Event", + "Quest Accept", + "Quest Show Mark", + "Vehicle Spell", + "SmartScript", + "Npc Vendor", + "Spell Proc", + "Phase Def" +}; + +ConditionMgr::ConditionTypeInfo const ConditionMgr::StaticConditionTypeData[CONDITION_MAX] = +{ + { "None", false, false, false }, + { "Aura", true, true, true }, + { "Item Stored", true, true, true }, + { "Item Equipped", true, false, false }, + { "Zone", true, false, false }, + { "Reputation", true, true, false }, + { "Team", true, false, false }, + { "Skill", true, true, false }, + { "Quest Rewarded", true, false, false }, + { "Quest Taken", true, false, false }, + { "Drunken", true, false, false }, + { "WorldState", true, true, false }, + { "Active Event", true, false, false }, + { "Instance Info", true, true, true }, + { "Quest None", true, false, false }, + { "Class", true, false, false }, + { "Race", true, false, false }, + { "Achievement", true, false, false }, + { "Title", true, false, false }, + { "SpawnMask", true, false, false }, + { "Gender", true, false, false }, + { "Unit State", true, false, false }, + { "Map", true, false, false }, + { "Area", true, false, false }, + { "CreatureType", true, false, false }, + { "Spell Known", true, false, false }, + { "PhaseMask", true, false, false }, + { "Level", true, true, false }, + { "Quest Completed", true, false, false }, + { "Near Creature", true, true, false }, + { "Near GameObject", true, true, false }, + { "Object Entry or Guid", true, true, true }, + { "Object TypeMask", true, false, false }, + { "Relation", true, true, false }, + { "Reaction", true, true, false }, + { "Distance", true, true, true }, + { "Alive", false, false, false }, + { "Health Value", true, true, false }, + { "Health Pct", true, true, false } +}; + // Checks if object meets the condition // Can have CONDITION_SOURCE_TYPE_NONE && !mReferenceId if called from a special event (ie: eventAI) bool Condition::Meets(ConditionSourceInfo& sourceInfo) @@ -38,7 +111,7 @@ bool Condition::Meets(ConditionSourceInfo& sourceInfo) // object not present, return false if (!object) { - TC_LOG_DEBUG("condition", "Condition object not found for condition (Entry: %u Type: %u Group: %u)", SourceEntry, SourceType, SourceGroup); + TC_LOG_DEBUG("condition", "Condition object not found for %s", ToString().c_str()); return false; } bool condMeets = false; @@ -535,6 +608,34 @@ uint32 Condition::GetMaxAvailableConditionTargets() } } +std::string Condition::ToString(bool ext /*= false*/) const +{ + std::ostringstream ss; + ss << "[Condition "; + ss << "SourceType: " << SourceType; + if (SourceType < CONDITION_SOURCE_TYPE_MAX) + ss << " (" << ConditionMgr::StaticSourceTypeData[SourceType] << ")"; + else + ss << " (Unknown)"; + if (ConditionMgr::CanHaveSourceGroupSet(SourceType)) + ss << ", SourceGroup: " << SourceGroup; + ss << ", SourceEntry: " << SourceEntry; + if (ConditionMgr::CanHaveSourceIdSet(SourceType)) + ss << ", SourceId: " << SourceId; + + if (ext) + { + ss << ", ConditionType: " << ConditionType; + if (ConditionType < CONDITION_MAX) + ss << " (" << ConditionMgr::StaticConditionTypeData[ConditionType].Name << ")"; + else + ss << " (Unknown)"; + } + + ss << "]"; + return ss.str(); +} + ConditionMgr::ConditionMgr() { } ConditionMgr::~ConditionMgr() @@ -597,7 +698,7 @@ bool ConditionMgr::IsObjectMeetToConditionList(ConditionSourceInfo& sourceInfo, std::map<uint32, bool> ElseGroupStore; for (ConditionList::const_iterator i = conditions.begin(); i != conditions.end(); ++i) { - TC_LOG_DEBUG("condition", "ConditionMgr::IsPlayerMeetToConditionList condType: %u val1: %u", (*i)->ConditionType, (*i)->ConditionValue1); + TC_LOG_DEBUG("condition", "ConditionMgr::IsPlayerMeetToConditionList %s val1: %u", (*i)->ToString().c_str(), (*i)->ConditionValue1); if ((*i)->isLoaded()) { //! Find ElseGroup in ElseGroupStore @@ -618,8 +719,8 @@ bool ConditionMgr::IsObjectMeetToConditionList(ConditionSourceInfo& sourceInfo, } else { - TC_LOG_DEBUG("condition", "IsPlayerMeetToConditionList: Reference template -%u not found", - (*i)->ReferenceId);//checked at loading, should never happen + TC_LOG_DEBUG("condition", "ConditionMgr::IsPlayerMeetToConditionList %s Reference template -%u not found", + (*i)->ToString().c_str(), (*i)->ReferenceId); // checked at loading, should never happen } } @@ -658,7 +759,7 @@ bool ConditionMgr::IsObjectMeetToConditions(ConditionSourceInfo& sourceInfo, Con return IsObjectMeetToConditionList(sourceInfo, conditions); } -bool ConditionMgr::CanHaveSourceGroupSet(ConditionSourceType sourceType) const +bool ConditionMgr::CanHaveSourceGroupSet(ConditionSourceType sourceType) { return (sourceType == CONDITION_SOURCE_TYPE_CREATURE_LOOT_TEMPLATE || sourceType == CONDITION_SOURCE_TYPE_DISENCHANT_LOOT_TEMPLATE || @@ -681,7 +782,7 @@ bool ConditionMgr::CanHaveSourceGroupSet(ConditionSourceType sourceType) const sourceType == CONDITION_SOURCE_TYPE_NPC_VENDOR); } -bool ConditionMgr::CanHaveSourceIdSet(ConditionSourceType sourceType) const +bool ConditionMgr::CanHaveSourceIdSet(ConditionSourceType sourceType) { return (sourceType == CONDITION_SOURCE_TYPE_SMART_EVENT); } @@ -715,7 +816,7 @@ ConditionList ConditionMgr::GetConditionsForSpellClickEvent(uint32 creatureId, u if (i != (*itr).second.end()) { cond = (*i).second; - TC_LOG_DEBUG("condition", "GetConditionsForSpellClickEvent: found conditions for Vehicle entry %u spell %u", creatureId, spellId); + TC_LOG_DEBUG("condition", "GetConditionsForSpellClickEvent: found conditions for SpellClickEvent entry %u spell %u", creatureId, spellId); } } return cond; @@ -747,7 +848,7 @@ ConditionList ConditionMgr::GetConditionsForSmartEvent(int32 entryOrGuid, uint32 if (i != (*itr).second.end()) { cond = (*i).second; - TC_LOG_DEBUG("condition", "GetConditionsForSmartEvent: found conditions for Smart Event entry or guid %d event_id %u", entryOrGuid, eventId); + TC_LOG_DEBUG("condition", "GetConditionsForSmartEvent: found conditions for Smart Event entry or guid %d eventId %u", entryOrGuid, eventId); } } return cond; @@ -895,26 +996,26 @@ void ConditionMgr::LoadConditions(bool isReload) //Grouping is only allowed for some types (loot templates, gossip menus, gossip items) if (cond->SourceGroup && !CanHaveSourceGroupSet(cond->SourceType)) { - TC_LOG_ERROR("sql.sql", "Condition type %u has not allowed value of SourceGroup = %u!", uint32(cond->SourceType), cond->SourceGroup); + TC_LOG_ERROR("sql.sql", "%s has not allowed value of SourceGroup = %u!", cond->ToString().c_str(), cond->SourceGroup); delete cond; continue; } if (cond->SourceId && !CanHaveSourceIdSet(cond->SourceType)) { - TC_LOG_ERROR("sql.sql", "Condition type %u has not allowed value of SourceId = %u!", uint32(cond->SourceType), cond->SourceId); + TC_LOG_ERROR("sql.sql", "%s has not allowed value of SourceId = %u!", cond->ToString().c_str(), cond->SourceId); delete cond; continue; } if (cond->ErrorType && cond->SourceType != CONDITION_SOURCE_TYPE_SPELL) { - TC_LOG_ERROR("sql.sql", "Condition type %u entry %i can't have ErrorType (%u), set to 0!", uint32(cond->SourceType), cond->SourceEntry, cond->ErrorType); + TC_LOG_ERROR("sql.sql", "%s can't have ErrorType (%u), set to 0!", cond->ToString().c_str(), cond->ErrorType); cond->ErrorType = 0; } if (cond->ErrorTextId && !cond->ErrorType) { - TC_LOG_ERROR("sql.sql", "Condition type %u entry %i has any ErrorType, ErrorTextId (%u) is set, set to 0!", uint32(cond->SourceType), cond->SourceEntry, cond->ErrorTextId); + TC_LOG_ERROR("sql.sql", "%s has any ErrorType, ErrorTextId (%u) is set, set to 0!", cond->ToString().c_str(), cond->ErrorTextId); cond->ErrorTextId = 0; } @@ -1005,7 +1106,7 @@ void ConditionMgr::LoadConditions(bool isReload) if (!valid) { - TC_LOG_ERROR("sql.sql", "Not handled grouped condition, SourceGroup %u", cond->SourceGroup); + TC_LOG_ERROR("sql.sql", "%s Not handled grouped condition.", cond->ToString().c_str()); delete cond; } else @@ -1038,21 +1139,20 @@ void ConditionMgr::LoadConditions(bool isReload) while (result->NextRow()); TC_LOG_INFO("server.loading", ">> Loaded %u conditions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - } bool ConditionMgr::addToLootTemplate(Condition* cond, LootTemplate* loot) { if (!loot) { - TC_LOG_ERROR("sql.sql", "ConditionMgr: LootTemplate %u not found", cond->SourceGroup); + TC_LOG_ERROR("sql.sql", "%s LootTemplate %u not found.", cond->ToString().c_str(), cond->SourceGroup); return false; } if (loot->addConditionItem(cond)) return true; - TC_LOG_ERROR("sql.sql", "ConditionMgr: Item %u not found in LootTemplate %u", cond->SourceEntry, cond->SourceGroup); + TC_LOG_ERROR("sql.sql", "%s Item %u not found in LootTemplate %u.", cond->ToString().c_str(), cond->SourceEntry, cond->SourceGroup); return false; } @@ -1072,7 +1172,7 @@ bool ConditionMgr::addToGossipMenus(Condition* cond) } } - TC_LOG_ERROR("sql.sql", "addToGossipMenus: GossipMenu %u not found", cond->SourceGroup); + TC_LOG_ERROR("sql.sql", "%s GossipMenu %u not found.", cond->ToString().c_str(), cond->SourceGroup); return false; } @@ -1091,7 +1191,7 @@ bool ConditionMgr::addToGossipMenuItems(Condition* cond) } } - TC_LOG_ERROR("sql.sql", "addToGossipMenuItems: GossipMenuId %u Item %u not found", cond->SourceGroup, cond->SourceEntry); + TC_LOG_ERROR("sql.sql", "%s GossipMenuId %u Item %u not found.", cond->ToString().c_str(), cond->SourceGroup, cond->SourceEntry); return false; } @@ -1116,12 +1216,12 @@ bool ConditionMgr::addToSpellImplicitTargetConditions(Condition* cond) continue; // build new shared mask with found effect - uint32 sharedMask = (1<<i); + uint32 sharedMask = (1 << i); ConditionList* cmp = spellInfo->Effects[i].ImplicitTargetConditions; for (uint8 effIndex = i+1; effIndex < MAX_SPELL_EFFECTS; ++effIndex) { if (spellInfo->Effects[effIndex].ImplicitTargetConditions == cmp) - sharedMask |= 1<<effIndex; + sharedMask |= 1 << effIndex; } sharedMasks.push_back(sharedMask); } @@ -1148,8 +1248,8 @@ bool ConditionMgr::addToSpellImplicitTargetConditions(Condition* cond) // we have overlapping masks in db if (conditionEffMask != *itr) { - TC_LOG_ERROR("sql.sql", "SourceEntry %u in `condition` table, has incorrect SourceGroup %u (spell effectMask) set - " - "effect masks are overlapping (all SourceGroup values having given bit set must be equal) - ignoring.", cond->SourceEntry, cond->SourceGroup); + TC_LOG_ERROR("sql.sql", "%s in `condition` table, has incorrect SourceGroup %u (spell effectMask) set - " + "effect masks are overlapping (all SourceGroup values having given bit set must be equal) - ignoring.", cond->ToString().c_str(), cond->SourceGroup); return false; } } @@ -1182,7 +1282,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) { if (cond->SourceType == CONDITION_SOURCE_TYPE_NONE || cond->SourceType >= CONDITION_SOURCE_TYPE_MAX) { - TC_LOG_ERROR("sql.sql", "Invalid ConditionSourceType %u in `condition` table, ignoring.", uint32(cond->SourceType)); + TC_LOG_ERROR("sql.sql", "%s Invalid ConditionSourceType in `condition` table, ignoring.", cond->ToString().c_str()); return false; } @@ -1192,7 +1292,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) { if (!LootTemplates_Creature.HaveLootFor(cond->SourceGroup)) { - TC_LOG_ERROR("sql.sql", "SourceGroup %u in `condition` table, does not exist in `creature_loot_template`, ignoring.", cond->SourceGroup); + TC_LOG_ERROR("sql.sql", "%s SourceGroup in `condition` table, does not exist in `creature_loot_template`, ignoring.", cond->ToString().c_str()); return false; } @@ -1200,7 +1300,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry); if (!pItemProto && !loot->isReference(cond->SourceEntry)) { - TC_LOG_ERROR("sql.sql", "SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry); + TC_LOG_ERROR("sql.sql", "%s SourceType, SourceEntry in `condition` table, does not exist in `item_template`, ignoring.", cond->ToString().c_str()); return false; } break; @@ -1209,7 +1309,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) { if (!LootTemplates_Disenchant.HaveLootFor(cond->SourceGroup)) { - TC_LOG_ERROR("sql.sql", "SourceGroup %u in `condition` table, does not exist in `disenchant_loot_template`, ignoring.", cond->SourceGroup); + TC_LOG_ERROR("sql.sql", "%s SourceGroup in `condition` table, does not exist in `disenchant_loot_template`, ignoring.", cond->ToString().c_str()); return false; } @@ -1217,7 +1317,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry); if (!pItemProto && !loot->isReference(cond->SourceEntry)) { - TC_LOG_ERROR("sql.sql", "SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry); + TC_LOG_ERROR("sql.sql", "%s SourceType, SourceEntry in `condition` table, does not exist in `item_template`, ignoring.", cond->ToString().c_str()); return false; } break; @@ -1226,7 +1326,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) { if (!LootTemplates_Fishing.HaveLootFor(cond->SourceGroup)) { - TC_LOG_ERROR("sql.sql", "SourceGroup %u in `condition` table, does not exist in `fishing_loot_template`, ignoring.", cond->SourceGroup); + TC_LOG_ERROR("sql.sql", "%s SourceGroup in `condition` table, does not exist in `fishing_loot_template`, ignoring.", cond->ToString().c_str()); return false; } @@ -1234,7 +1334,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry); if (!pItemProto && !loot->isReference(cond->SourceEntry)) { - TC_LOG_ERROR("sql.sql", "SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry); + TC_LOG_ERROR("sql.sql", "%s SourceType, SourceEntry in `condition` table, does not exist in `item_template`, ignoring.", cond->ToString().c_str()); return false; } break; @@ -1243,7 +1343,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) { if (!LootTemplates_Gameobject.HaveLootFor(cond->SourceGroup)) { - TC_LOG_ERROR("sql.sql", "SourceGroup %u in `condition` table, does not exist in `gameobject_loot_template`, ignoring.", cond->SourceGroup); + TC_LOG_ERROR("sql.sql", "%s SourceGroup in `condition` table, does not exist in `gameobject_loot_template`, ignoring.", cond->ToString().c_str()); return false; } @@ -1251,7 +1351,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry); if (!pItemProto && !loot->isReference(cond->SourceEntry)) { - TC_LOG_ERROR("sql.sql", "SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry); + TC_LOG_ERROR("sql.sql", "%s SourceType, SourceEntry in `condition` table, does not exist in `item_template`, ignoring.", cond->ToString().c_str()); return false; } break; @@ -1260,7 +1360,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) { if (!LootTemplates_Item.HaveLootFor(cond->SourceGroup)) { - TC_LOG_ERROR("sql.sql", "SourceGroup %u in `condition` table, does not exist in `item_loot_template`, ignoring.", cond->SourceGroup); + TC_LOG_ERROR("sql.sql", "%s SourceGroup in `condition` table, does not exist in `item_loot_template`, ignoring.", cond->ToString().c_str()); return false; } @@ -1268,7 +1368,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry); if (!pItemProto && !loot->isReference(cond->SourceEntry)) { - TC_LOG_ERROR("sql.sql", "SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry); + TC_LOG_ERROR("sql.sql", "%s SourceType, SourceEntry in `condition` table, does not exist in `item_template`, ignoring.", cond->ToString().c_str()); return false; } break; @@ -1277,7 +1377,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) { if (!LootTemplates_Mail.HaveLootFor(cond->SourceGroup)) { - TC_LOG_ERROR("sql.sql", "SourceGroup %u in `condition` table, does not exist in `mail_loot_template`, ignoring.", cond->SourceGroup); + TC_LOG_ERROR("sql.sql", "%s SourceGroup in `condition` table, does not exist in `mail_loot_template`, ignoring.", cond->ToString().c_str()); return false; } @@ -1285,7 +1385,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry); if (!pItemProto && !loot->isReference(cond->SourceEntry)) { - TC_LOG_ERROR("sql.sql", "SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry); + TC_LOG_ERROR("sql.sql", "%s SourceType, SourceEntry in `condition` table, does not exist in `item_template`, ignoring.", cond->ToString().c_str()); return false; } break; @@ -1294,7 +1394,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) { if (!LootTemplates_Milling.HaveLootFor(cond->SourceGroup)) { - TC_LOG_ERROR("sql.sql", "SourceGroup %u in `condition` table, does not exist in `milling_loot_template`, ignoring.", cond->SourceGroup); + TC_LOG_ERROR("sql.sql", "%s SourceGroup in `condition` table, does not exist in `milling_loot_template`, ignoring.", cond->ToString().c_str()); return false; } @@ -1302,7 +1402,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry); if (!pItemProto && !loot->isReference(cond->SourceEntry)) { - TC_LOG_ERROR("sql.sql", "SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry); + TC_LOG_ERROR("sql.sql", "%s SourceType, SourceEntry in `condition` table, does not exist in `item_template`, ignoring.", cond->ToString().c_str()); return false; } break; @@ -1311,7 +1411,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) { if (!LootTemplates_Pickpocketing.HaveLootFor(cond->SourceGroup)) { - TC_LOG_ERROR("sql.sql", "SourceGroup %u in `condition` table, does not exist in `pickpocketing_loot_template`, ignoring.", cond->SourceGroup); + TC_LOG_ERROR("sql.sql", "%s SourceGroup in `condition` table, does not exist in `pickpocketing_loot_template`, ignoring.", cond->ToString().c_str()); return false; } @@ -1319,7 +1419,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry); if (!pItemProto && !loot->isReference(cond->SourceEntry)) { - TC_LOG_ERROR("sql.sql", "SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry); + TC_LOG_ERROR("sql.sql", "%s SourceType, SourceEntry in `condition` table, does not exist in `item_template`, ignoring.", cond->ToString().c_str()); return false; } break; @@ -1328,7 +1428,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) { if (!LootTemplates_Prospecting.HaveLootFor(cond->SourceGroup)) { - TC_LOG_ERROR("sql.sql", "SourceGroup %u in `condition` table, does not exist in `prospecting_loot_template`, ignoring.", cond->SourceGroup); + TC_LOG_ERROR("sql.sql", "%s SourceGroup in `condition` table, does not exist in `prospecting_loot_template`, ignoring.", cond->ToString().c_str()); return false; } @@ -1336,7 +1436,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry); if (!pItemProto && !loot->isReference(cond->SourceEntry)) { - TC_LOG_ERROR("sql.sql", "SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry); + TC_LOG_ERROR("sql.sql", "%s SourceType, SourceEntry in `condition` table, does not exist in `item_template`, ignoring.", cond->ToString().c_str()); return false; } break; @@ -1345,7 +1445,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) { if (!LootTemplates_Reference.HaveLootFor(cond->SourceGroup)) { - TC_LOG_ERROR("sql.sql", "SourceGroup %u in `condition` table, does not exist in `reference_loot_template`, ignoring.", cond->SourceGroup); + TC_LOG_ERROR("sql.sql", "%s SourceGroup in `condition` table, does not exist in `reference_loot_template`, ignoring.", cond->ToString().c_str()); return false; } @@ -1353,7 +1453,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry); if (!pItemProto && !loot->isReference(cond->SourceEntry)) { - TC_LOG_ERROR("sql.sql", "SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry); + TC_LOG_ERROR("sql.sql", "%s SourceType, SourceEntry in `condition` table, does not exist in `item_template`, ignoring.", cond->ToString().c_str()); return false; } break; @@ -1362,7 +1462,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) { if (!LootTemplates_Skinning.HaveLootFor(cond->SourceGroup)) { - TC_LOG_ERROR("sql.sql", "SourceGroup %u in `condition` table, does not exist in `skinning_loot_template`, ignoring.", cond->SourceGroup); + TC_LOG_ERROR("sql.sql", "%s SourceGroup in `condition` table, does not exist in `skinning_loot_template`, ignoring.", cond->ToString().c_str()); return false; } @@ -1370,7 +1470,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry); if (!pItemProto && !loot->isReference(cond->SourceEntry)) { - TC_LOG_ERROR("sql.sql", "SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry); + TC_LOG_ERROR("sql.sql", "%s SourceType, SourceEntry in `condition` table, does not exist in `item_template`, ignoring.", cond->ToString().c_str()); return false; } break; @@ -1379,7 +1479,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) { if (!LootTemplates_Spell.HaveLootFor(cond->SourceGroup)) { - TC_LOG_ERROR("sql.sql", "SourceGroup %u in `condition` table, does not exist in `spell_loot_template`, ignoring.", cond->SourceGroup); + TC_LOG_ERROR("sql.sql", "%s SourceGroup in `condition` table, does not exist in `spell_loot_template`, ignoring.", cond->ToString().c_str()); return false; } @@ -1387,7 +1487,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry); if (!pItemProto && !loot->isReference(cond->SourceEntry)) { - TC_LOG_ERROR("sql.sql", "SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry); + TC_LOG_ERROR("sql.sql", "%s SourceType, SourceEntry in `condition` table, does not exist in `item_template`, ignoring.", cond->ToString().c_str()); return false; } break; @@ -1397,13 +1497,13 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(cond->SourceEntry); if (!spellInfo) { - TC_LOG_ERROR("sql.sql", "SourceEntry %u in `condition` table, does not exist in `spell.dbc`, ignoring.", cond->SourceEntry); + TC_LOG_ERROR("sql.sql", "%s in `condition` table, SourceEntry does not exist in `spell.dbc`, ignoring.", cond->ToString().c_str()); return false; } if ((cond->SourceGroup > MAX_EFFECT_MASK) || !cond->SourceGroup) { - TC_LOG_ERROR("sql.sql", "SourceEntry %u in `condition` table, has incorrect SourceGroup %u (spell effectMask) set, ignoring.", cond->SourceEntry, cond->SourceGroup); + TC_LOG_ERROR("sql.sql", "%s in `condition` table, has incorrect SourceGroup (spell effectMask) set, ignoring.", cond->ToString().c_str()); return false; } @@ -1411,7 +1511,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i) { - if (!((1<<i) & cond->SourceGroup)) + if (!((1 << i) & cond->SourceGroup)) continue; switch (spellInfo->Effects[i].TargetA.GetSelectionCategory()) @@ -1435,7 +1535,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) } TC_LOG_ERROR("sql.sql", "SourceEntry %u SourceGroup %u in `condition` table - spell %u does not have implicit targets of types: _AREA_, _CONE_, _NEARBY_ for effect %u, SourceGroup needs correction, ignoring.", cond->SourceEntry, origGroup, cond->SourceEntry, uint32(i)); - cond->SourceGroup &= ~(1<<i); + cond->SourceGroup &= ~(1 << i); } // all effects were removed, no need to add the condition at all if (!cond->SourceGroup) @@ -1446,7 +1546,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) { if (!sObjectMgr->GetCreatureTemplate(cond->SourceEntry)) { - TC_LOG_ERROR("sql.sql", "SourceEntry %u in `condition` table, does not exist in `creature_template`, ignoring.", cond->SourceEntry); + TC_LOG_ERROR("sql.sql", "%s SourceEntry in `condition` table, does not exist in `creature_template`, ignoring.", cond->ToString().c_str()); return false; } break; @@ -1457,48 +1557,42 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) SpellInfo const* spellProto = sSpellMgr->GetSpellInfo(cond->SourceEntry); if (!spellProto) { - TC_LOG_ERROR("sql.sql", "SourceEntry %u in `condition` table, does not exist in `spell.dbc`, ignoring.", cond->SourceEntry); + TC_LOG_ERROR("sql.sql", "%s SourceEntry in `condition` table, does not exist in `spell.dbc`, ignoring.", cond->ToString().c_str()); return false; } break; } case CONDITION_SOURCE_TYPE_QUEST_ACCEPT: - if (!sObjectMgr->GetQuestTemplate(cond->SourceEntry)) - { - TC_LOG_ERROR("sql.sql", "CONDITION_SOURCE_TYPE_QUEST_ACCEPT specifies non-existing quest (%u), skipped", cond->SourceEntry); - return false; - } - break; case CONDITION_SOURCE_TYPE_QUEST_SHOW_MARK: if (!sObjectMgr->GetQuestTemplate(cond->SourceEntry)) { - TC_LOG_ERROR("sql.sql", "CONDITION_SOURCE_TYPE_QUEST_SHOW_MARK specifies non-existing quest (%u), skipped", cond->SourceEntry); + TC_LOG_ERROR("sql.sql", "%s SourceEntry specifies non-existing quest, skipped.", cond->ToString().c_str()); return false; } break; case CONDITION_SOURCE_TYPE_VEHICLE_SPELL: if (!sObjectMgr->GetCreatureTemplate(cond->SourceGroup)) { - TC_LOG_ERROR("sql.sql", "SourceEntry %u in `condition` table, does not exist in `creature_template`, ignoring.", cond->SourceGroup); + TC_LOG_ERROR("sql.sql", "%s SourceEntry in `condition` table, does not exist in `creature_template`, ignoring.", cond->ToString().c_str()); return false; } if (!sSpellMgr->GetSpellInfo(cond->SourceEntry)) { - TC_LOG_ERROR("sql.sql", "SourceEntry %u in `condition` table, does not exist in `spell.dbc`, ignoring.", cond->SourceEntry); + TC_LOG_ERROR("sql.sql", "%s SourceEntry in `condition` table, does not exist in `spell.dbc`, ignoring.", cond->ToString().c_str()); return false; } break; case CONDITION_SOURCE_TYPE_SPELL_CLICK_EVENT: if (!sObjectMgr->GetCreatureTemplate(cond->SourceGroup)) { - TC_LOG_ERROR("sql.sql", "SourceEntry %u in `condition` table, does not exist in `creature_template`, ignoring.", cond->SourceGroup); + TC_LOG_ERROR("sql.sql", "%s SourceEntry in `condition` table, does not exist in `creature_template`, ignoring.", cond->ToString().c_str()); return false; } if (!sSpellMgr->GetSpellInfo(cond->SourceEntry)) { - TC_LOG_ERROR("sql.sql", "SourceEntry %u in `condition` table, does not exist in `spell.dbc`, ignoring.", cond->SourceEntry); + TC_LOG_ERROR("sql.sql", "%s SourceEntry in `condition` table, does not exist in `spell.dbc`, ignoring.", cond->ToString().c_str()); return false; } break; @@ -1506,13 +1600,13 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) { if (!sObjectMgr->GetCreatureTemplate(cond->SourceGroup)) { - TC_LOG_ERROR("sql.sql", "SourceEntry %u in `condition` table, does not exist in `creature_template`, ignoring.", cond->SourceGroup); + TC_LOG_ERROR("sql.sql", "%s SourceEntry in `condition` table, does not exist in `creature_template`, ignoring.", cond->ToString().c_str()); return false; } ItemTemplate const* itemTemplate = sObjectMgr->GetItemTemplate(cond->SourceEntry); if (!itemTemplate) { - TC_LOG_ERROR("sql.sql", "SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceEntry); + TC_LOG_ERROR("sql.sql", "%s SourceEntry in `condition` table, does not exist in `item_template`, ignoring.", cond->ToString().c_str()); return false; } break; @@ -1537,13 +1631,13 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) { if (cond->ConditionType == CONDITION_NONE || cond->ConditionType >= CONDITION_MAX) { - TC_LOG_ERROR("sql.sql", "Invalid ConditionType %u at SourceEntry %u in `condition` table, ignoring.", uint32(cond->ConditionType), cond->SourceEntry); + TC_LOG_ERROR("sql.sql", "%s Invalid ConditionType in `condition` table, ignoring.", cond->ToString().c_str()); return false; } if (cond->ConditionTarget >= cond->GetMaxAvailableConditionTargets()) { - TC_LOG_ERROR("sql.sql", "SourceType %u, SourceEntry %u, SourceGroup %u in `condition` table, has incorrect ConditionTarget set, ignoring.", cond->SourceType, cond->SourceEntry, cond->SourceGroup); + TC_LOG_ERROR("sql.sql", "%s in `condition` table, has incorrect ConditionTarget set, ignoring.", cond->ToString(true).c_str()); return false; } @@ -1553,17 +1647,15 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) { if (!sSpellMgr->GetSpellInfo(cond->ConditionValue1)) { - TC_LOG_ERROR("sql.sql", "Aura condition has non existing spell (Id: %d), skipped", cond->ConditionValue1); + TC_LOG_ERROR("sql.sql", "%s has non existing spell (Id: %d), skipped.", cond->ToString(true).c_str(), cond->ConditionValue1); return false; } if (cond->ConditionValue2 > EFFECT_2) { - TC_LOG_ERROR("sql.sql", "Aura condition has non existing effect index (%u) (must be 0..2), skipped", cond->ConditionValue2); + TC_LOG_ERROR("sql.sql", "%s has non existing effect index (%u) (must be 0..2), skipped.", cond->ToString(true).c_str(), cond->ConditionValue2); return false; } - if (cond->ConditionValue3) - TC_LOG_ERROR("sql.sql", "Aura condition has useless data in value3 (%u)!", cond->ConditionValue3); break; } case CONDITION_ITEM: @@ -1571,13 +1663,13 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) ItemTemplate const* proto = sObjectMgr->GetItemTemplate(cond->ConditionValue1); if (!proto) { - TC_LOG_ERROR("sql.sql", "Item condition has non existing item (%u), skipped", cond->ConditionValue1); + TC_LOG_ERROR("sql.sql", "%s Item (%u) does not exist, skipped.", cond->ToString(true).c_str(), cond->ConditionValue1); return false; } if (!cond->ConditionValue2) { - TC_LOG_ERROR("sql.sql", "Item condition has 0 set for item count in value2 (%u), skipped", cond->ConditionValue2); + TC_LOG_ERROR("sql.sql", "%s Zero item count in ConditionValue2, skipped.", cond->ToString(true).c_str()); return false; } break; @@ -1587,14 +1679,9 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) ItemTemplate const* proto = sObjectMgr->GetItemTemplate(cond->ConditionValue1); if (!proto) { - TC_LOG_ERROR("sql.sql", "ItemEquipped condition has non existing item (%u), skipped", cond->ConditionValue1); + TC_LOG_ERROR("sql.sql", "%s Item (%u) does not exist, skipped.", cond->ToString(true).c_str(), cond->ConditionValue1); return false; } - - if (cond->ConditionValue2) - TC_LOG_ERROR("sql.sql", "ItemEquipped condition has useless data in value2 (%u)!", cond->ConditionValue2); - if (cond->ConditionValue3) - TC_LOG_ERROR("sql.sql", "ItemEquipped condition has useless data in value3 (%u)!", cond->ConditionValue3); break; } case CONDITION_ZONEID: @@ -1602,20 +1689,15 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) AreaTableEntry const* areaEntry = GetAreaEntryByAreaID(cond->ConditionValue1); if (!areaEntry) { - TC_LOG_ERROR("sql.sql", "ZoneID condition has non existing area (%u), skipped", cond->ConditionValue1); + TC_LOG_ERROR("sql.sql", "%s Area (%u) does not exist, skipped.", cond->ToString(true).c_str(), cond->ConditionValue1); return false; } if (areaEntry->zone != 0) { - TC_LOG_ERROR("sql.sql", "ZoneID condition requires to be in area (%u) which is a subzone but zone expected, skipped", cond->ConditionValue1); + TC_LOG_ERROR("sql.sql", "%s requires to be in area (%u) which is a subzone but zone expected, skipped.", cond->ToString(true).c_str(), cond->ConditionValue1); return false; } - - if (cond->ConditionValue2) - TC_LOG_ERROR("sql.sql", "ZoneID condition has useless data in value2 (%u)!", cond->ConditionValue2); - if (cond->ConditionValue3) - TC_LOG_ERROR("sql.sql", "ZoneID condition has useless data in value3 (%u)!", cond->ConditionValue3); break; } case CONDITION_REPUTATION_RANK: @@ -1623,25 +1705,18 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) FactionEntry const* factionEntry = sFactionStore.LookupEntry(cond->ConditionValue1); if (!factionEntry) { - TC_LOG_ERROR("sql.sql", "Reputation condition has non existing faction (%u), skipped", cond->ConditionValue1); + TC_LOG_ERROR("sql.sql", "%s has non existing faction (%u), skipped.", cond->ToString(true).c_str(), cond->ConditionValue1); return false; } - if (cond->ConditionValue3) - TC_LOG_ERROR("sql.sql", "Reputation condition has useless data in value3 (%u)!", cond->ConditionValue3); break; } case CONDITION_TEAM: { if (cond->ConditionValue1 != ALLIANCE && cond->ConditionValue1 != HORDE) { - TC_LOG_ERROR("sql.sql", "Team condition specifies unknown team (%u), skipped", cond->ConditionValue1); + TC_LOG_ERROR("sql.sql", "%s specifies unknown team (%u), skipped.", cond->ToString(true).c_str(), cond->ConditionValue1); return false; } - - if (cond->ConditionValue2) - TC_LOG_ERROR("sql.sql", "Team condition has useless data in value2 (%u)!", cond->ConditionValue2); - if (cond->ConditionValue3) - TC_LOG_ERROR("sql.sql", "Team condition has useless data in value3 (%u)!", cond->ConditionValue3); break; } case CONDITION_SKILL: @@ -1649,17 +1724,15 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) SkillLineEntry const* pSkill = sSkillLineStore.LookupEntry(cond->ConditionValue1); if (!pSkill) { - TC_LOG_ERROR("sql.sql", "Skill condition specifies non-existing skill (%u), skipped", cond->ConditionValue1); + TC_LOG_ERROR("sql.sql", "%s specifies non-existing skill (%u), skipped.", cond->ToString(true).c_str(), cond->ConditionValue1); return false; } if (cond->ConditionValue2 < 1 || cond->ConditionValue2 > sWorld->GetConfigMaxSkillValue()) { - TC_LOG_ERROR("sql.sql", "Skill condition specifies skill (%u) with invalid value (%u), skipped", cond->ConditionValue1, cond->ConditionValue2); + TC_LOG_ERROR("sql.sql", "%s specifies skill (%u) with invalid value (%u), skipped.", cond->ToString(true).c_str(), cond->ConditionValue1, cond->ConditionValue2); return false; } - if (cond->ConditionValue3) - TC_LOG_ERROR("sql.sql", "Skill condition has useless data in value3 (%u)!", cond->ConditionValue3); break; } case CONDITION_QUESTREWARDED: @@ -1669,30 +1742,19 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) { if (!sObjectMgr->GetQuestTemplate(cond->ConditionValue1)) { - TC_LOG_ERROR("sql.sql", "Quest condition (Type: %u) points to non-existing quest (%u) for Source Entry %u. SourceGroup: %u, SourceTypeOrReferenceId: %u", - cond->ConditionType, cond->ConditionValue1, cond->SourceEntry, cond->SourceGroup, cond->SourceType); + TC_LOG_ERROR("sql.sql", "%s points to non-existing quest (%u), skipped.", cond->ToString(true).c_str(), cond->ConditionValue1); return false; } - - if (cond->ConditionValue2 > 1) - TC_LOG_ERROR("sql.sql", "Quest condition has useless data in value2 (%u)!", cond->ConditionValue2); - if (cond->ConditionValue3) - TC_LOG_ERROR("sql.sql", "Quest condition has useless data in value3 (%u)!", cond->ConditionValue3); break; } case CONDITION_ACTIVE_EVENT: { GameEventMgr::GameEventDataMap const& events = sGameEventMgr->GetEventMap(); - if (cond->ConditionValue1 >=events.size() || !events[cond->ConditionValue1].isValid()) + if (cond->ConditionValue1 >= events.size() || !events[cond->ConditionValue1].isValid()) { - TC_LOG_ERROR("sql.sql", "ActiveEvent condition has non existing event id (%u), skipped", cond->ConditionValue1); + TC_LOG_ERROR("sql.sql", "%s has non existing event id (%u), skipped.", cond->ToString(true).c_str(), cond->ConditionValue1); return false; } - - if (cond->ConditionValue2) - TC_LOG_ERROR("sql.sql", "ActiveEvent condition has useless data in value2 (%u)!", cond->ConditionValue2); - if (cond->ConditionValue3) - TC_LOG_ERROR("sql.sql", "ActiveEvent condition has useless data in value3 (%u)!", cond->ConditionValue3); break; } case CONDITION_ACHIEVEMENT: @@ -1700,56 +1762,36 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) AchievementEntry const* achievement = sAchievementMgr->GetAchievement(cond->ConditionValue1); if (!achievement) { - TC_LOG_ERROR("sql.sql", "Achivement condition has non existing achivement id (%u), skipped", cond->ConditionValue1); + TC_LOG_ERROR("sql.sql", "%s has non existing achivement id (%u), skipped.", cond->ToString(true).c_str(), cond->ConditionValue1); return false; } - - if (cond->ConditionValue2) - TC_LOG_ERROR("sql.sql", "Achivement condition has useless data in value2 (%u)!", cond->ConditionValue2); - if (cond->ConditionValue3) - TC_LOG_ERROR("sql.sql", "Achivement condition has useless data in value3 (%u)!", cond->ConditionValue3); break; } case CONDITION_CLASS: { if (!(cond->ConditionValue1 & CLASSMASK_ALL_PLAYABLE)) { - TC_LOG_ERROR("sql.sql", "Class condition has non existing classmask (%u), skipped", cond->ConditionValue1 & ~CLASSMASK_ALL_PLAYABLE); + TC_LOG_ERROR("sql.sql", "%s has non existing classmask (%u), skipped.", cond->ToString(true).c_str(), cond->ConditionValue1 & ~CLASSMASK_ALL_PLAYABLE); return false; } - - if (cond->ConditionValue2) - TC_LOG_ERROR("sql.sql", "Class condition has useless data in value2 (%u)!", cond->ConditionValue2); - if (cond->ConditionValue3) - TC_LOG_ERROR("sql.sql", "Class condition has useless data in value3 (%u)!", cond->ConditionValue3); break; } case CONDITION_RACE: { if (!(cond->ConditionValue1 & RACEMASK_ALL_PLAYABLE)) { - TC_LOG_ERROR("sql.sql", "Race condition has non existing racemask (%u), skipped", cond->ConditionValue1 & ~RACEMASK_ALL_PLAYABLE); + TC_LOG_ERROR("sql.sql", "%s has non existing racemask (%u), skipped.", cond->ToString(true).c_str(), cond->ConditionValue1 & ~RACEMASK_ALL_PLAYABLE); return false; } - - if (cond->ConditionValue2) - TC_LOG_ERROR("sql.sql", "Race condition has useless data in value2 (%u)!", cond->ConditionValue2); - if (cond->ConditionValue3) - TC_LOG_ERROR("sql.sql", "Race condition has useless data in value3 (%u)!", cond->ConditionValue3); break; } case CONDITION_GENDER: { if (!Player::IsValidGender(uint8(cond->ConditionValue1))) { - TC_LOG_ERROR("sql.sql", "Gender condition has invalid gender (%u), skipped", cond->ConditionValue1); + TC_LOG_ERROR("sql.sql", "%s has invalid gender (%u), skipped.", cond->ToString(true).c_str(), cond->ConditionValue1); return false; } - - if (cond->ConditionValue2) - TC_LOG_ERROR("sql.sql", "Gender condition has useless data in value2 (%u)!", cond->ConditionValue2); - if (cond->ConditionValue3) - TC_LOG_ERROR("sql.sql", "Gender condition has useless data in value3 (%u)!", cond->ConditionValue3); break; } case CONDITION_MAPID: @@ -1757,77 +1799,54 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) MapEntry const* me = sMapStore.LookupEntry(cond->ConditionValue1); if (!me) { - TC_LOG_ERROR("sql.sql", "Map condition has non existing map (%u), skipped", cond->ConditionValue1); + TC_LOG_ERROR("sql.sql", "%s has non existing map (%u), skipped", cond->ToString(true).c_str(), cond->ConditionValue1); return false; } - - if (cond->ConditionValue2) - TC_LOG_ERROR("sql.sql", "Map condition has useless data in value2 (%u)!", cond->ConditionValue2); - if (cond->ConditionValue3) - TC_LOG_ERROR("sql.sql", "Map condition has useless data in value3 (%u)!", cond->ConditionValue3); break; } case CONDITION_SPELL: { if (!sSpellMgr->GetSpellInfo(cond->ConditionValue1)) { - TC_LOG_ERROR("sql.sql", "Spell condition has non existing spell (Id: %d), skipped", cond->ConditionValue1); + TC_LOG_ERROR("sql.sql", "%s has non existing spell (Id: %d), skipped", cond->ToString(true).c_str(), cond->ConditionValue1); return false; } - - if (cond->ConditionValue2) - TC_LOG_ERROR("sql.sql", "Spell condition has useless data (spell Id: %d) in value2 (%u)!", cond->ConditionValue1, cond->ConditionValue2); - if (cond->ConditionValue3) - TC_LOG_ERROR("sql.sql", "Spell condition has useless data (spell Id: %d) in value3 (%u)!", cond->ConditionValue1, cond->ConditionValue3); break; } case CONDITION_LEVEL: { if (cond->ConditionValue2 >= COMP_TYPE_MAX) { - TC_LOG_ERROR("sql.sql", "Level condition has invalid ComparisionType (%u), skipped", cond->ConditionValue2); + TC_LOG_ERROR("sql.sql", "%s has invalid ComparisionType (%u), skipped.", cond->ToString(true).c_str(), cond->ConditionValue2); return false; } - if (cond->ConditionValue3) - TC_LOG_ERROR("sql.sql", "Level condition has useless data in value3 (%u)!", cond->ConditionValue3); break; } case CONDITION_DRUNKENSTATE: { if (cond->ConditionValue1 > DRUNKEN_SMASHED) { - TC_LOG_ERROR("sql.sql", "DrunkState condition has invalid state (%u), skipped", cond->ConditionValue1); - return false; - } - if (cond->ConditionValue2) - { - TC_LOG_ERROR("sql.sql", "DrunkState condition has useless data in value2 (%u)!", cond->ConditionValue2); + TC_LOG_ERROR("sql.sql", "%s has invalid state (%u), skipped.", cond->ToString(true).c_str(), cond->ConditionValue1); return false; } - if (cond->ConditionValue3) - TC_LOG_ERROR("sql.sql", "DrunkState condition has useless data in value3 (%u)!", cond->ConditionValue3); break; } case CONDITION_NEAR_CREATURE: { if (!sObjectMgr->GetCreatureTemplate(cond->ConditionValue1)) { - TC_LOG_ERROR("sql.sql", "NearCreature condition has non existing creature template entry (%u), skipped", cond->ConditionValue1); + TC_LOG_ERROR("sql.sql", "%s has non existing creature template entry (%u), skipped", cond->ToString(true).c_str(), cond->ConditionValue1); return false; } - if (cond->ConditionValue3) - TC_LOG_ERROR("sql.sql", "NearCreature condition has useless data in value3 (%u)!", cond->ConditionValue3); break; } case CONDITION_NEAR_GAMEOBJECT: { if (!sObjectMgr->GetGameObjectTemplate(cond->ConditionValue1)) { - TC_LOG_ERROR("sql.sql", "NearGameObject condition has non existing gameobject template entry (%u), skipped", cond->ConditionValue1); + TC_LOG_ERROR("sql.sql", "%s has non existing gameobject template entry (%u), skipped.", cond->ToString().c_str(), cond->ConditionValue1); return false; } - if (cond->ConditionValue3) - TC_LOG_ERROR("sql.sql", "NearGameObject condition has useless data in value3 (%u)!", cond->ConditionValue3); break; } case CONDITION_OBJECT_ENTRY_GUID: @@ -1837,7 +1856,7 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) case TYPEID_UNIT: if (cond->ConditionValue2 && !sObjectMgr->GetCreatureTemplate(cond->ConditionValue2)) { - TC_LOG_ERROR("sql.sql", "ObjectEntryGuid condition has non existing creature template entry (%u), skipped", cond->ConditionValue2); + TC_LOG_ERROR("sql.sql", "%s has non existing creature template entry (%u), skipped.", cond->ToString(true).c_str(), cond->ConditionValue2); return false; } if (cond->ConditionValue3) @@ -1846,13 +1865,13 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) { if (cond->ConditionValue2 && creatureData->id != cond->ConditionValue2) { - TC_LOG_ERROR("sql.sql", "ObjectEntryGuid condition has guid %u set but does not match creature entry (%u), skipped", cond->ConditionValue3, cond->ConditionValue2); + TC_LOG_ERROR("sql.sql", "%s has guid %u set but does not match creature entry (%u), skipped.", cond->ToString(true).c_str(), cond->ConditionValue3, cond->ConditionValue2); return false; } } else { - TC_LOG_ERROR("sql.sql", "ObjectEntryGuid condition has non existing creature guid (%u), skipped", cond->ConditionValue3); + TC_LOG_ERROR("sql.sql", "%s has non existing creature guid (%u), skipped.", cond->ToString(true).c_str(), cond->ConditionValue3); return false; } } @@ -1860,7 +1879,7 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) case TYPEID_GAMEOBJECT: if (cond->ConditionValue2 && !sObjectMgr->GetGameObjectTemplate(cond->ConditionValue2)) { - TC_LOG_ERROR("sql.sql", "ObjectEntryGuid condition has non existing gameobject template entry (%u), skipped", cond->ConditionValue2); + TC_LOG_ERROR("sql.sql", "%s has non existing gameobject template entry (%u), skipped.", cond->ToString(true).c_str(), cond->ConditionValue2); return false; } if (cond->ConditionValue3) @@ -1869,13 +1888,13 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) { if (cond->ConditionValue2 && goData->id != cond->ConditionValue2) { - TC_LOG_ERROR("sql.sql", "ObjectEntryGuid condition has guid %u set but does not match gameobject entry (%u), skipped", cond->ConditionValue3, cond->ConditionValue2); + TC_LOG_ERROR("sql.sql", "%s has guid %u set but does not match gameobject entry (%u), skipped.", cond->ToString(true).c_str(), cond->ConditionValue3, cond->ConditionValue2); return false; } } else { - TC_LOG_ERROR("sql.sql", "ObjectEntryGuid condition has non existing gameobject guid (%u), skipped", cond->ConditionValue3); + TC_LOG_ERROR("sql.sql", "%s has non existing gameobject guid (%u), skipped.", cond->ToString(true).c_str(), cond->ConditionValue3); return false; } } @@ -1883,12 +1902,12 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) case TYPEID_PLAYER: case TYPEID_CORPSE: if (cond->ConditionValue2) - TC_LOG_ERROR("sql.sql", "ObjectEntryGuid condition has useless data in value2 (%u)!", cond->ConditionValue2); + LogUselessConditionValue(cond, 2, cond->ConditionValue2); if (cond->ConditionValue3) - TC_LOG_ERROR("sql.sql", "ObjectEntryGuid condition has useless data in value3 (%u)!", cond->ConditionValue3); + LogUselessConditionValue(cond, 3, cond->ConditionValue3); break; default: - TC_LOG_ERROR("sql.sql", "ObjectEntryGuid condition has wrong typeid set (%u), skipped", cond->ConditionValue1); + TC_LOG_ERROR("sql.sql", "%s has wrong typeid set (%u), skipped", cond->ToString(true).c_str(), cond->ConditionValue1); return false; } break; @@ -1897,51 +1916,45 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) { if (!cond->ConditionValue1 || (cond->ConditionValue1 & ~(TYPEMASK_UNIT | TYPEMASK_PLAYER | TYPEMASK_GAMEOBJECT | TYPEMASK_CORPSE))) { - TC_LOG_ERROR("sql.sql", "TypeMask condition has invalid typemask set (%u), skipped", cond->ConditionValue2); + TC_LOG_ERROR("sql.sql", "%s has invalid typemask set (%u), skipped.", cond->ToString(true).c_str(), cond->ConditionValue2); return false; } - if (cond->ConditionValue2) - TC_LOG_ERROR("sql.sql", "TypeMask condition has useless data in value2 (%u)!", cond->ConditionValue2); - if (cond->ConditionValue3) - TC_LOG_ERROR("sql.sql", "TypeMask condition has useless data in value3 (%u)!", cond->ConditionValue3); break; } case CONDITION_RELATION_TO: { if (cond->ConditionValue1 >= cond->GetMaxAvailableConditionTargets()) { - TC_LOG_ERROR("sql.sql", "RelationTo condition has invalid ConditionValue1(ConditionTarget selection) (%u), skipped", cond->ConditionValue1); + TC_LOG_ERROR("sql.sql", "%s has invalid ConditionValue1(ConditionTarget selection) (%u), skipped.", cond->ToString(true).c_str(), cond->ConditionValue1); return false; } if (cond->ConditionValue1 == cond->ConditionTarget) { - TC_LOG_ERROR("sql.sql", "RelationTo condition has ConditionValue1(ConditionTarget selection) set to self (%u), skipped", cond->ConditionValue1); + TC_LOG_ERROR("sql.sql", "%s has ConditionValue1(ConditionTarget selection) set to self (%u), skipped.", cond->ToString(true).c_str(), cond->ConditionValue1); return false; } if (cond->ConditionValue2 >= RELATION_MAX) { - TC_LOG_ERROR("sql.sql", "RelationTo condition has invalid ConditionValue2(RelationType) (%u), skipped", cond->ConditionValue2); + TC_LOG_ERROR("sql.sql", "%s has invalid ConditionValue2(RelationType) (%u), skipped.", cond->ToString(true).c_str(), cond->ConditionValue2); return false; } - if (cond->ConditionValue3) - TC_LOG_ERROR("sql.sql", "RelationTo condition has useless data in value3 (%u)!", cond->ConditionValue3); break; } case CONDITION_REACTION_TO: { if (cond->ConditionValue1 >= cond->GetMaxAvailableConditionTargets()) { - TC_LOG_ERROR("sql.sql", "ReactionTo condition has invalid ConditionValue1(ConditionTarget selection) (%u), skipped", cond->ConditionValue1); + TC_LOG_ERROR("sql.sql", "%s has invalid ConditionValue1(ConditionTarget selection) (%u), skipped.", cond->ToString(true).c_str(), cond->ConditionValue1); return false; } if (cond->ConditionValue1 == cond->ConditionTarget) { - TC_LOG_ERROR("sql.sql", "ReactionTo condition has ConditionValue1(ConditionTarget selection) set to self (%u), skipped", cond->ConditionValue1); + TC_LOG_ERROR("sql.sql", "%s has ConditionValue1(ConditionTarget selection) set to self (%u), skipped.", cond->ToString(true).c_str(), cond->ConditionValue1); return false; } if (!cond->ConditionValue2) { - TC_LOG_ERROR("sql.sql", "mConditionValue2 condition has invalid ConditionValue2(rankMask) (%u), skipped", cond->ConditionValue2); + TC_LOG_ERROR("sql.sql", "%s has invalid ConditionValue2(rankMask) (%u), skipped.", cond->ToString(true).c_str(), cond->ConditionValue2); return false; } break; @@ -1950,78 +1963,55 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) { if (cond->ConditionValue1 >= cond->GetMaxAvailableConditionTargets()) { - TC_LOG_ERROR("sql.sql", "DistanceTo condition has invalid ConditionValue1(ConditionTarget selection) (%u), skipped", cond->ConditionValue1); + TC_LOG_ERROR("sql.sql", "%s has invalid ConditionValue1(ConditionTarget selection) (%u), skipped.", cond->ToString(true).c_str(), cond->ConditionValue1); return false; } if (cond->ConditionValue1 == cond->ConditionTarget) { - TC_LOG_ERROR("sql.sql", "DistanceTo condition has ConditionValue1(ConditionTarget selection) set to self (%u), skipped", cond->ConditionValue1); + TC_LOG_ERROR("sql.sql", "%s has ConditionValue1(ConditionTarget selection) set to self (%u), skipped.", cond->ToString(true).c_str(), cond->ConditionValue1); return false; } if (cond->ConditionValue3 >= COMP_TYPE_MAX) { - TC_LOG_ERROR("sql.sql", "DistanceTo condition has invalid ComparisionType (%u), skipped", cond->ConditionValue3); + TC_LOG_ERROR("sql.sql", "%s has invalid ComparisionType (%u), skipped.", cond->ToString(true).c_str(), cond->ConditionValue3); return false; } break; } - case CONDITION_ALIVE: - { - if (cond->ConditionValue1) - TC_LOG_ERROR("sql.sql", "Alive condition has useless data in value1 (%u)!", cond->ConditionValue1); - if (cond->ConditionValue2) - TC_LOG_ERROR("sql.sql", "Alive condition has useless data in value2 (%u)!", cond->ConditionValue2); - if (cond->ConditionValue3) - TC_LOG_ERROR("sql.sql", "Alive condition has useless data in value3 (%u)!", cond->ConditionValue3); - break; - } case CONDITION_HP_VAL: { if (cond->ConditionValue2 >= COMP_TYPE_MAX) { - TC_LOG_ERROR("sql.sql", "HpVal condition has invalid ComparisionType (%u), skipped", cond->ConditionValue2); + TC_LOG_ERROR("sql.sql", "%s has invalid ComparisionType (%u), skipped.", cond->ToString(true).c_str(), cond->ConditionValue2); return false; } if (cond->ConditionValue3) - TC_LOG_ERROR("sql.sql", "HpVal condition has useless data in value3 (%u)!", cond->ConditionValue3); + TC_LOG_ERROR("sql.sql", "%s has useless data in value3 (%u)!", cond->ToString(true).c_str(), cond->ConditionValue3); break; } case CONDITION_HP_PCT: { if (cond->ConditionValue1 > 100) { - TC_LOG_ERROR("sql.sql", "HpPct condition has too big percent value (%u), skipped", cond->ConditionValue1); + TC_LOG_ERROR("sql.sql", "%s has too big percent value (%u), skipped.", cond->ToString(true).c_str(), cond->ConditionValue1); return false; } if (cond->ConditionValue2 >= COMP_TYPE_MAX) { - TC_LOG_ERROR("sql.sql", "HpPct condition has invalid ComparisionType (%u), skipped", cond->ConditionValue2); + TC_LOG_ERROR("sql.sql", "%s has invalid ComparisionType (%u), skipped.", cond->ToString(true).c_str(), cond->ConditionValue2); return false; } if (cond->ConditionValue3) - TC_LOG_ERROR("sql.sql", "HpPct condition has useless data in value3 (%u)!", cond->ConditionValue3); + TC_LOG_ERROR("sql.sql", "%s has useless data in value3 (%u)!", cond->ToString().c_str(), cond->ConditionValue3); break; } - case CONDITION_AREAID: - case CONDITION_INSTANCE_INFO: - break; case CONDITION_WORLD_STATE: { if (!sWorld->getWorldState(cond->ConditionValue1)) { - TC_LOG_ERROR("sql.sql", "World state condition has non existing world state in value1 (%u), skipped", cond->ConditionValue1); + TC_LOG_ERROR("sql.sql", "%s has non existing world state in value1 (%u), skipped.", cond->ToString(true).c_str(), cond->ConditionValue1); return false; } - if (cond->ConditionValue3) - TC_LOG_ERROR("sql.sql", "World state condition has useless data in value3 (%u)!", cond->ConditionValue3); - break; - } - case CONDITION_PHASEMASK: - { - if (cond->ConditionValue2) - TC_LOG_ERROR("sql.sql", "Phasemask condition has useless data in value2 (%u)!", cond->ConditionValue2); - if (cond->ConditionValue3) - TC_LOG_ERROR("sql.sql", "Phasemask condition has useless data in value3 (%u)!", cond->ConditionValue3); break; } case CONDITION_TITLE: @@ -2029,7 +2019,7 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) CharTitlesEntry const* titleEntry = sCharTitlesStore.LookupEntry(cond->ConditionValue1); if (!titleEntry) { - TC_LOG_ERROR("sql.sql", "Title condition has non existing title in value1 (%u), skipped", cond->ConditionValue1); + TC_LOG_ERROR("sql.sql", "%s has non existing title in value1 (%u), skipped.", cond->ToString(true).c_str(), cond->ConditionValue1); return false; } break; @@ -2038,7 +2028,7 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) { if (cond->ConditionValue1 > SPAWNMASK_RAID_ALL) { - TC_LOG_ERROR("sql.sql", "SpawnMask condition has non existing SpawnMask in value1 (%u), skipped", cond->ConditionValue1); + TC_LOG_ERROR("sql.sql", "%s has non existing SpawnMask in value1 (%u), skipped.", cond->ToString(true).c_str(), cond->ConditionValue1); return false; } break; @@ -2047,7 +2037,7 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) { if (!(cond->ConditionValue1 & UNIT_STATE_ALL_STATE_SUPPORTED)) { - TC_LOG_ERROR("sql.sql", "UnitState condition has non existing UnitState in value1 (%u), skipped", cond->ConditionValue1); + TC_LOG_ERROR("sql.sql", "%s has non existing UnitState in value1 (%u), skipped.", cond->ToString(true).c_str(), cond->ConditionValue1); return false; } break; @@ -2056,17 +2046,35 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) { if (!cond->ConditionValue1 || cond->ConditionValue1 > CREATURE_TYPE_GAS_CLOUD) { - TC_LOG_ERROR("sql.sql", "CreatureType condition has non existing CreatureType in value1 (%u), skipped", cond->ConditionValue1); + TC_LOG_ERROR("sql.sql", "%s has non existing CreatureType in value1 (%u), skipped.", cond->ToString(true).c_str(), cond->ConditionValue1); return false; } break; } + case CONDITION_INSTANCE_INFO: + case CONDITION_AREAID: + case CONDITION_PHASEMASK: + case CONDITION_ALIVE: + break; default: break; } + + if (cond->ConditionValue1 && !StaticConditionTypeData[cond->ConditionType].HasConditionValue1) + LogUselessConditionValue(cond, 1, cond->ConditionValue1); + if (cond->ConditionValue2 && !StaticConditionTypeData[cond->ConditionType].HasConditionValue2) + LogUselessConditionValue(cond, 2, cond->ConditionValue2); + if (cond->ConditionValue3 && !StaticConditionTypeData[cond->ConditionType].HasConditionValue3) + LogUselessConditionValue(cond, 3, cond->ConditionValue3); + return true; } +void ConditionMgr::LogUselessConditionValue(Condition* cond, uint8 index, uint32 value) +{ + TC_LOG_ERROR("sql.sql", "%s has useless data in ConditionValue%u (%u)!", cond->ToString(true).c_str(), index, value); +} + void ConditionMgr::Clean() { for (ConditionReferenceContainer::iterator itr = ConditionReferenceStore.begin(); itr != ConditionReferenceStore.end(); ++itr) diff --git a/src/server/game/Conditions/ConditionMgr.h b/src/server/game/Conditions/ConditionMgr.h index 24e44c662ba..621da355b7b 100644 --- a/src/server/game/Conditions/ConditionMgr.h +++ b/src/server/game/Conditions/ConditionMgr.h @@ -210,6 +210,8 @@ struct Condition uint32 GetSearcherTypeMaskForCondition(); bool isLoaded() const { return ConditionType > CONDITION_NONE || ReferenceId; } uint32 GetMaxAvailableConditionTargets(); + + std::string ToString(bool ext = false) const; /// For logging purpose }; typedef std::list<Condition*> ConditionList; @@ -228,7 +230,6 @@ class ConditionMgr ~ConditionMgr(); public: - static ConditionMgr* instance() { static ConditionMgr instance; @@ -243,14 +244,24 @@ class ConditionMgr bool IsObjectMeetToConditions(WorldObject* object, ConditionList const& conditions); bool IsObjectMeetToConditions(WorldObject* object1, WorldObject* object2, ConditionList const& conditions); bool IsObjectMeetToConditions(ConditionSourceInfo& sourceInfo, ConditionList const& conditions); - bool CanHaveSourceGroupSet(ConditionSourceType sourceType) const; - bool CanHaveSourceIdSet(ConditionSourceType sourceType) const; + static bool CanHaveSourceGroupSet(ConditionSourceType sourceType); + static bool CanHaveSourceIdSet(ConditionSourceType sourceType); ConditionList GetConditionsForNotGroupedEntry(ConditionSourceType sourceType, uint32 entry); ConditionList GetConditionsForSpellClickEvent(uint32 creatureId, uint32 spellId); ConditionList GetConditionsForSmartEvent(int32 entryOrGuid, uint32 eventId, uint32 sourceType); ConditionList GetConditionsForVehicleSpell(uint32 creatureId, uint32 spellId); ConditionList GetConditionsForNpcVendorEvent(uint32 creatureId, uint32 itemId); + struct ConditionTypeInfo + { + char const* Name; + bool HasConditionValue1; + bool HasConditionValue2; + bool HasConditionValue3; + }; + static char const* StaticSourceTypeData[CONDITION_SOURCE_TYPE_MAX]; + static ConditionTypeInfo const StaticConditionTypeData[CONDITION_MAX]; + private: bool isSourceTypeValid(Condition* cond); bool addToLootTemplate(Condition* cond, LootTemplate* loot); @@ -259,6 +270,8 @@ class ConditionMgr bool addToSpellImplicitTargetConditions(Condition* cond); bool IsObjectMeetToConditionList(ConditionSourceInfo& sourceInfo, ConditionList const& conditions); + static void LogUselessConditionValue(Condition* cond, uint8 index, uint32 value); + void Clean(); // free up resources std::list<Condition*> AllocatedMemoryStore; // some garbage collection :) diff --git a/src/server/game/Entities/Object/Object.cpp b/src/server/game/Entities/Object/Object.cpp index 4ffddde021c..6702815870f 100644 --- a/src/server/game/Entities/Object/Object.cpp +++ b/src/server/game/Entities/Object/Object.cpp @@ -607,7 +607,7 @@ void Object::_LoadIntoDataField(std::string const& data, uint32 startOffset, uin for (uint32 index = 0; index < count; ++index) { - m_uint32Values[startOffset + index] = atol(tokens[index]); + m_uint32Values[startOffset + index] = atoul(tokens[index]); _changesMask.SetBit(startOffset + index); } } diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 8a45c1c6420..b8abc33f675 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -203,7 +203,7 @@ void PlayerTaxi::LoadTaxiMask(std::string const &data) for (Tokenizer::const_iterator iter = tokens.begin(); index < TaxiMaskSize && iter != tokens.end(); ++iter, ++index) { // load and set bits only for existing taxi nodes - m_taximask[index] = sTaxiNodesMask[index] & uint32(atol(*iter)); + m_taximask[index] = sTaxiNodesMask[index] & atoul(*iter); } } @@ -229,7 +229,7 @@ bool PlayerTaxi::LoadTaxiDestinationsFromString(const std::string& values, uint3 for (Tokenizer::const_iterator iter = Tokenizer.begin(); iter != Tokenizer.end(); ++iter) { - uint32 node = uint32(atol(*iter)); + uint32 node = atoul(*iter); AddTaxiDestination(node); } @@ -15483,12 +15483,13 @@ void Player::RewardQuest(Quest const* quest, uint32 reward, Object* questGiver, void Player::FailQuest(uint32 questId) { - // Already complete quests shouldn't turn failed. - if (GetQuestStatus(questId) == QUEST_STATUS_COMPLETE) - return; if (Quest const* quest = sObjectMgr->GetQuestTemplate(questId)) { + // Already complete quests shouldn't turn failed. + if (GetQuestStatus(questId) == QUEST_STATUS_COMPLETE && !quest->HasSpecialFlag(QUEST_SPECIAL_FLAGS_TIMED)) + return; + SetQuestStatus(questId, QUEST_STATUS_FAILED); uint16 log_slot = FindQuestSlot(questId); diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 9a4b7a347c8..beac32b0145 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -13852,7 +13852,7 @@ void CharmInfo::LoadPetActionBar(const std::string& data) // use unsigned cast to avoid sign negative format use at long-> ActiveStates (int) conversion ActiveStates type = ActiveStates(atol(*iter)); ++iter; - uint32 action = uint32(atol(*iter)); + uint32 action = atoul(*iter); PetActionBar[index].SetActionAndType(action, type); diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index 9e31e901189..8dc117b3362 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -556,17 +556,17 @@ void ObjectMgr::LoadCreatureTemplateAddons() creatureAddon.auras.resize(tokens.size()); for (Tokenizer::const_iterator itr = tokens.begin(); itr != tokens.end(); ++itr) { - SpellInfo const* AdditionalSpellInfo = sSpellMgr->GetSpellInfo(uint32(atol(*itr))); + SpellInfo const* AdditionalSpellInfo = sSpellMgr->GetSpellInfo(atoul(*itr)); if (!AdditionalSpellInfo) { - TC_LOG_ERROR("sql.sql", "Creature (Entry: %u) has wrong spell %u defined in `auras` field in `creature_template_addon`.", entry, uint32(atol(*itr))); + TC_LOG_ERROR("sql.sql", "Creature (Entry: %u) has wrong spell %lu defined in `auras` field in `creature_template_addon`.", entry, atoul(*itr)); continue; } if (AdditionalSpellInfo->HasAura(SPELL_AURA_CONTROL_VEHICLE)) - TC_LOG_ERROR("sql.sql", "Creature (Entry: %u) has SPELL_AURA_CONTROL_VEHICLE aura %u defined in `auras` field in `creature_template_addon`.", entry, uint32(atol(*itr))); + TC_LOG_ERROR("sql.sql", "Creature (Entry: %u) has SPELL_AURA_CONTROL_VEHICLE aura %lu defined in `auras` field in `creature_template_addon`.", entry, atoul(*itr)); - creatureAddon.auras[i++] = uint32(atol(*itr)); + creatureAddon.auras[i++] = atoul(*itr); } if (creatureAddon.mount) @@ -1004,17 +1004,17 @@ void ObjectMgr::LoadCreatureAddons() creatureAddon.auras.resize(tokens.size()); for (Tokenizer::const_iterator itr = tokens.begin(); itr != tokens.end(); ++itr) { - SpellInfo const* AdditionalSpellInfo = sSpellMgr->GetSpellInfo(uint32(atol(*itr))); + SpellInfo const* AdditionalSpellInfo = sSpellMgr->GetSpellInfo(atoul(*itr)); if (!AdditionalSpellInfo) { - TC_LOG_ERROR("sql.sql", "Creature (GUID: %u) has wrong spell %u defined in `auras` field in `creature_addon`.", guid, uint32(atol(*itr))); + TC_LOG_ERROR("sql.sql", "Creature (GUID: %u) has wrong spell %lu defined in `auras` field in `creature_addon`.", guid, atoul(*itr)); continue; } if (AdditionalSpellInfo->HasAura(SPELL_AURA_CONTROL_VEHICLE)) - TC_LOG_ERROR("sql.sql", "Creature (GUID: %u) has SPELL_AURA_CONTROL_VEHICLE aura %u defined in `auras` field in `creature_addon`.", guid, uint32(atol(*itr))); + TC_LOG_ERROR("sql.sql", "Creature (GUID: %u) has SPELL_AURA_CONTROL_VEHICLE aura %lu defined in `auras` field in `creature_addon`.", guid, atoul(*itr)); - creatureAddon.auras[i++] = uint32(atol(*itr)); + creatureAddon.auras[i++] = atoul(*itr); } if (creatureAddon.mount) @@ -5673,35 +5673,32 @@ void ObjectMgr::LoadAreaTriggerScripts() uint32 oldMSTime = getMSTime(); _areaTriggerScriptStore.clear(); // need for reload case - QueryResult result = WorldDatabase.Query("SELECT entry, ScriptName FROM areatrigger_scripts"); + QueryResult result = WorldDatabase.Query("SELECT entry, ScriptName FROM areatrigger_scripts"); if (!result) { TC_LOG_INFO("server.loading", ">> Loaded 0 areatrigger scripts. DB table `areatrigger_scripts` is empty."); return; } - uint32 count = 0; - do { - ++count; - Field* fields = result->Fetch(); - uint32 Trigger_ID = fields[0].GetUInt32(); - const char *scriptName = fields[1].GetCString(); + uint32 triggerId = fields[0].GetUInt32(); + char const* scriptName = fields[1].GetCString(); - AreaTriggerEntry const* atEntry = sAreaTriggerStore.LookupEntry(Trigger_ID); + AreaTriggerEntry const* atEntry = sAreaTriggerStore.LookupEntry(triggerId); if (!atEntry) { - TC_LOG_ERROR("sql.sql", "Area trigger (ID:%u) does not exist in `AreaTrigger.dbc`.", Trigger_ID); + TC_LOG_ERROR("sql.sql", "AreaTrigger (ID: %u) does not exist in `AreaTrigger.dbc`.", triggerId); continue; } - _areaTriggerScriptStore[Trigger_ID] = GetScriptId(scriptName); - } while (result->NextRow()); + _areaTriggerScriptStore[triggerId] = GetScriptId(scriptName); + } + while (result->NextRow()); - TC_LOG_INFO("server.loading", ">> Loaded %u areatrigger scripts in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + TC_LOG_INFO("server.loading", ">> Loaded " SZFMTD " areatrigger scripts in %u ms", _areaTriggerScriptStore.size(), GetMSTimeDiffToNow(oldMSTime)); } uint32 ObjectMgr::GetNearestTaxiNode(float x, float y, float z, uint32 mapid, uint32 team) @@ -8544,31 +8541,32 @@ void ObjectMgr::LoadScriptNames() { uint32 oldMSTime = getMSTime(); - _scriptNamesStore.push_back(""); + _scriptNamesStore.emplace_back(""); + QueryResult result = WorldDatabase.Query( - "SELECT DISTINCT(ScriptName) FROM achievement_criteria_data WHERE ScriptName <> '' AND type = 11 " - "UNION " - "SELECT DISTINCT(ScriptName) FROM battleground_template WHERE ScriptName <> '' " - "UNION " - "SELECT DISTINCT(ScriptName) FROM creature_template WHERE ScriptName <> '' " - "UNION " - "SELECT DISTINCT(ScriptName) FROM gameobject_template WHERE ScriptName <> '' " - "UNION " - "SELECT DISTINCT(ScriptName) FROM item_template WHERE ScriptName <> '' " - "UNION " - "SELECT DISTINCT(ScriptName) FROM areatrigger_scripts WHERE ScriptName <> '' " - "UNION " - "SELECT DISTINCT(ScriptName) FROM spell_script_names WHERE ScriptName <> '' " - "UNION " - "SELECT DISTINCT(ScriptName) FROM transports WHERE ScriptName <> '' " - "UNION " - "SELECT DISTINCT(ScriptName) FROM game_weather WHERE ScriptName <> '' " - "UNION " - "SELECT DISTINCT(ScriptName) FROM conditions WHERE ScriptName <> '' " - "UNION " - "SELECT DISTINCT(ScriptName) FROM outdoorpvp_template WHERE ScriptName <> '' " - "UNION " - "SELECT DISTINCT(script) FROM instance_template WHERE script <> ''"); + "SELECT DISTINCT(ScriptName) FROM achievement_criteria_data WHERE ScriptName <> '' AND type = 11 " + "UNION " + "SELECT DISTINCT(ScriptName) FROM battleground_template WHERE ScriptName <> '' " + "UNION " + "SELECT DISTINCT(ScriptName) FROM creature_template WHERE ScriptName <> '' " + "UNION " + "SELECT DISTINCT(ScriptName) FROM gameobject_template WHERE ScriptName <> '' " + "UNION " + "SELECT DISTINCT(ScriptName) FROM item_template WHERE ScriptName <> '' " + "UNION " + "SELECT DISTINCT(ScriptName) FROM areatrigger_scripts WHERE ScriptName <> '' " + "UNION " + "SELECT DISTINCT(ScriptName) FROM spell_script_names WHERE ScriptName <> '' " + "UNION " + "SELECT DISTINCT(ScriptName) FROM transports WHERE ScriptName <> '' " + "UNION " + "SELECT DISTINCT(ScriptName) FROM game_weather WHERE ScriptName <> '' " + "UNION " + "SELECT DISTINCT(ScriptName) FROM conditions WHERE ScriptName <> '' " + "UNION " + "SELECT DISTINCT(ScriptName) FROM outdoorpvp_template WHERE ScriptName <> '' " + "UNION " + "SELECT DISTINCT(script) FROM instance_template WHERE script <> ''"); if (!result) { @@ -8576,20 +8574,23 @@ void ObjectMgr::LoadScriptNames() return; } - uint32 count = 1; - do { - _scriptNamesStore.push_back((*result)[0].GetString()); - ++count; + _scriptNamesStore.emplace_back((*result)[0].GetCString()); } while (result->NextRow()); std::sort(_scriptNamesStore.begin(), _scriptNamesStore.end()); - TC_LOG_INFO("server.loading", ">> Loaded %d Script Names in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + +#ifdef SCRIPTS + for (size_t i = 1; i < _scriptNamesStore.size(); ++i) + UnusedScriptNames.push_back(_scriptNamesStore[i]); +#endif + + TC_LOG_INFO("server.loading", ">> Loaded " SZFMTD " ScriptNames in %u ms", _scriptNamesStore.size(), GetMSTimeDiffToNow(oldMSTime)); } -uint32 ObjectMgr::GetScriptId(const char *name) +uint32 ObjectMgr::GetScriptId(char const* name) { // use binary search to find the script name in the sorted vector // assume "" is the first element diff --git a/src/server/game/Globals/ObjectMgr.h b/src/server/game/Globals/ObjectMgr.h index 62303143202..7504f03868e 100644 --- a/src/server/game/Globals/ObjectMgr.h +++ b/src/server/game/Globals/ObjectMgr.h @@ -1253,9 +1253,8 @@ class ObjectMgr bool IsVendorItemValid(uint32 vendor_entry, uint32 item, int32 maxcount, uint32 ptime, uint32 ExtendedCost, Player* player = NULL, std::set<uint32>* skip_vendors = NULL, uint32 ORnpcflag = 0) const; void LoadScriptNames(); - ScriptNameContainer &GetScriptNames() { return _scriptNamesStore; } - const char * GetScriptName(uint32 id) const { return id < _scriptNamesStore.size() ? _scriptNamesStore[id].c_str() : ""; } - uint32 GetScriptId(const char *name); + char const* GetScriptName(uint32 id) const { return id < _scriptNamesStore.size() ? _scriptNamesStore[id].c_str() : ""; } + uint32 GetScriptId(char const* name); SpellClickInfoMapBounds GetSpellClickInfoMapBounds(uint32 creature_id) const { diff --git a/src/server/game/Handlers/CharacterHandler.cpp b/src/server/game/Handlers/CharacterHandler.cpp index 18cd5d5bd06..7e218b601e0 100644 --- a/src/server/game/Handlers/CharacterHandler.cpp +++ b/src/server/game/Handlers/CharacterHandler.cpp @@ -2004,7 +2004,7 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recvData) } for (uint32 index = 0; index < ktcount; ++index) - knownTitles[index] = atol(tokens[index]); + knownTitles[index] = atoul(tokens[index]); for (std::map<uint32, uint32>::const_iterator it = sObjectMgr->FactionChangeTitles.begin(); it != sObjectMgr->FactionChangeTitles.end(); ++it) { diff --git a/src/server/game/Handlers/PetitionsHandler.cpp b/src/server/game/Handlers/PetitionsHandler.cpp index 1e6dc1adbb9..9bee32a95e6 100644 --- a/src/server/game/Handlers/PetitionsHandler.cpp +++ b/src/server/game/Handlers/PetitionsHandler.cpp @@ -42,14 +42,6 @@ enum CharterItemIDs ARENA_TEAM_CHARTER_5v5 = 23562 }; -enum CharterCosts -{ - GUILD_CHARTER_COST = 1000, - ARENA_TEAM_CHARTER_2v2_COST = 800000, - ARENA_TEAM_CHARTER_3v3_COST = 1200000, - ARENA_TEAM_CHARTER_5v5_COST = 2000000 -}; - void WorldSession::HandlePetitionBuyOpcode(WorldPacket& recvData) { TC_LOG_DEBUG("network", "Received opcode CMSG_PETITION_BUY"); @@ -106,7 +98,7 @@ void WorldSession::HandlePetitionBuyOpcode(WorldPacket& recvData) return; charterid = GUILD_CHARTER; - cost = GUILD_CHARTER_COST; + cost = sWorld->getIntConfig(CONFIG_CHARTER_COST_GUILD); type = GUILD_CHARTER_TYPE; } else @@ -122,17 +114,17 @@ void WorldSession::HandlePetitionBuyOpcode(WorldPacket& recvData) { case 1: charterid = ARENA_TEAM_CHARTER_2v2; - cost = ARENA_TEAM_CHARTER_2v2_COST; + cost = sWorld->getIntConfig(CONFIG_CHARTER_COST_ARENA_2v2); type = ARENA_TEAM_CHARTER_2v2_TYPE; break; case 2: charterid = ARENA_TEAM_CHARTER_3v3; - cost = ARENA_TEAM_CHARTER_3v3_COST; + cost = sWorld->getIntConfig(CONFIG_CHARTER_COST_ARENA_3v3); type = ARENA_TEAM_CHARTER_3v3_TYPE; break; case 3: charterid = ARENA_TEAM_CHARTER_5v5; - cost = ARENA_TEAM_CHARTER_5v5_COST; + cost = sWorld->getIntConfig(CONFIG_CHARTER_COST_ARENA_5v5); type = ARENA_TEAM_CHARTER_5v5_TYPE; break; default: @@ -945,7 +937,7 @@ void WorldSession::SendPetitionShowList(ObjectGuid guid) data << uint32(1); // index data << uint32(GUILD_CHARTER); // charter entry data << uint32(CHARTER_DISPLAY_ID); // charter display id - data << uint32(GUILD_CHARTER_COST); // charter cost + data << uint32(sWorld->getIntConfig(CONFIG_CHARTER_COST_GUILD)); // charter cost data << uint32(0); // unknown data << uint32(sWorld->getIntConfig(CONFIG_MIN_PETITION_SIGNS)); // required signs } @@ -956,21 +948,21 @@ void WorldSession::SendPetitionShowList(ObjectGuid guid) data << uint32(1); // index data << uint32(ARENA_TEAM_CHARTER_2v2); // charter entry data << uint32(CHARTER_DISPLAY_ID); // charter display id - data << uint32(ARENA_TEAM_CHARTER_2v2_COST); // charter cost + data << uint32(sWorld->getIntConfig(CONFIG_CHARTER_COST_ARENA_2v2)); // charter cost data << uint32(2); // unknown data << uint32(2); // required signs? // 3v3 data << uint32(2); // index data << uint32(ARENA_TEAM_CHARTER_3v3); // charter entry data << uint32(CHARTER_DISPLAY_ID); // charter display id - data << uint32(ARENA_TEAM_CHARTER_3v3_COST); // charter cost + data << uint32(sWorld->getIntConfig(CONFIG_CHARTER_COST_ARENA_3v3)); // charter cost data << uint32(3); // unknown data << uint32(3); // required signs? // 5v5 data << uint32(3); // index data << uint32(ARENA_TEAM_CHARTER_5v5); // charter entry data << uint32(CHARTER_DISPLAY_ID); // charter display id - data << uint32(ARENA_TEAM_CHARTER_5v5_COST); // charter cost + data << uint32(sWorld->getIntConfig(CONFIG_CHARTER_COST_ARENA_5v5)); // charter cost data << uint32(5); // unknown data << uint32(5); // required signs? } diff --git a/src/server/game/Handlers/TradeHandler.cpp b/src/server/game/Handlers/TradeHandler.cpp index 4b032199604..8949b161e7b 100644 --- a/src/server/game/Handlers/TradeHandler.cpp +++ b/src/server/game/Handlers/TradeHandler.cpp @@ -676,7 +676,9 @@ void WorldSession::HandleInitiateTradeOpcode(WorldPacket& recvPacket) return; } - if (!sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_TRADE) && pOther->GetTeam() !=_player->GetTeam()) + if (pOther->GetTeam() != _player->GetTeam() && + (!sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_TRADE) && + !GetPlayer()->GetSession()->HasPermission(rbac::RBAC_PERM_ALLOW_TWO_SIDE_TRADE))) { info.Status = TRADE_STATUS_WRONG_FACTION; SendTradeStatus(info); diff --git a/src/server/game/Instances/InstanceScript.cpp b/src/server/game/Instances/InstanceScript.cpp index 88ee153423f..77d3d3ffe0b 100644 --- a/src/server/game/Instances/InstanceScript.cpp +++ b/src/server/game/Instances/InstanceScript.cpp @@ -128,7 +128,7 @@ void InstanceScript::LoadObjectData(ObjectData const* creatureData, ObjectData c if (gameObjectData) LoadObjectData(gameObjectData, _gameObjectInfo); - TC_LOG_ERROR("scripts", "InstanceScript::LoadObjectData: " SZFMTD " objects loaded.", _creatureInfo.size() + _gameObjectInfo.size()); + TC_LOG_DEBUG("scripts", "InstanceScript::LoadObjectData: " SZFMTD " objects loaded.", _creatureInfo.size() + _gameObjectInfo.size()); } void InstanceScript::LoadObjectData(ObjectData const* data, ObjectInfoMap& objectInfo) diff --git a/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp index 2e859a7a56f..33d93ee1384 100644 --- a/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp @@ -56,12 +56,12 @@ void RandomMovementGenerator<Creature>::_setRandomLocation(Creature* creature) Trinity::NormalizeMapCoord(destX); Trinity::NormalizeMapCoord(destY); - travelDistZ = distanceX*distanceX + distanceY*distanceY; + travelDistZ = range; // sin^2+cos^2=1, so travelDistZ=range^2; no need for sqrt below if (is_air_ok) // 3D system above ground and above water (flying mode) { // Limit height change - const float distanceZ = float(rand_norm()) * std::sqrt(travelDistZ)/2.0f; + const float distanceZ = float(rand_norm()) * travelDistZ/2.0f; destZ = respZ + distanceZ; float levelZ = map->GetWaterOrGroundLevel(destX, destY, destZ-2.0f); @@ -73,7 +73,7 @@ void RandomMovementGenerator<Creature>::_setRandomLocation(Creature* creature) else // 2D only { // 10.0 is the max that vmap high can check (MAX_CAN_FALL_DISTANCE) - travelDistZ = travelDistZ >= 100.0f ? 10.0f : std::sqrt(travelDistZ); + travelDistZ = travelDistZ >= 10.0f ? 10.0f : travelDistZ; // The fastest way to get an accurate result 90% of the time. // Better result can be obtained like 99% accuracy with a ray light, but the cost is too high and the code is too long. diff --git a/src/server/game/Scripting/ScriptMgr.cpp b/src/server/game/Scripting/ScriptMgr.cpp index be0bf1aa067..d1ebcba118d 100644 --- a/src/server/game/Scripting/ScriptMgr.cpp +++ b/src/server/game/Scripting/ScriptMgr.cpp @@ -34,6 +34,12 @@ #include "WorldPacket.h" #include "WorldSession.h" +// namespace +// { + UnusedScriptContainer UnusedScripts; + UnusedScriptNamesContainer UnusedScriptNames; +// } + // This is the global static registry of scripts. template<class TScript> class ScriptRegistry @@ -89,6 +95,12 @@ class ScriptRegistry { ScriptPointerList[id] = script; sScriptMgr->IncrementScriptCount(); + + #ifdef SCRIPTS + UnusedScriptNamesContainer::iterator itr = std::lower_bound(UnusedScriptNames.begin(), UnusedScriptNames.end(), script->GetName()); + if (itr != UnusedScriptNames.end() && *itr == script->GetName()) + UnusedScriptNames.erase(itr); + #endif } else { @@ -106,8 +118,7 @@ class ScriptRegistry // Avoid calling "delete script;" because we are currently in the script constructor // In a valid scenario this will not happen because every script has a name assigned in the database - // If that happens, it's acceptable to just leak a few bytes - + UnusedScripts.push_back(script); return; } } @@ -189,6 +200,15 @@ void ScriptMgr::Initialize() FillSpellSummary(); AddScripts(); +#ifdef SCRIPTS + for (std::string const& scriptName : UnusedScriptNames) + { + TC_LOG_ERROR("sql.sql", "ScriptName '%s' exists in database, but no core script found!", scriptName.c_str()); + } +#endif + + UnloadUnusedScripts(); + TC_LOG_INFO("server.loading", ">> Loaded %u C++ scripts in %u ms", GetScriptCount(), GetMSTimeDiffToNow(oldMSTime)); } @@ -229,10 +249,19 @@ void ScriptMgr::Unload() #undef SCR_CLEAR + UnloadUnusedScripts(); + delete[] SpellSummary; delete[] UnitAI::AISpellInfo; } +void ScriptMgr::UnloadUnusedScripts() +{ + for (size_t i = 0; i < UnusedScripts.size(); ++i) + delete UnusedScripts[i]; + UnusedScripts.clear(); +} + void ScriptMgr::LoadDatabase() { sScriptSystemMgr->LoadScriptWaypoints(); diff --git a/src/server/game/Scripting/ScriptMgr.h b/src/server/game/Scripting/ScriptMgr.h index f6e76763f95..6a4e2f9910a 100644 --- a/src/server/game/Scripting/ScriptMgr.h +++ b/src/server/game/Scripting/ScriptMgr.h @@ -873,6 +873,15 @@ class GroupScript : public ScriptObject // Placed here due to ScriptRegistry::AddScript dependency. #define sScriptMgr ScriptMgr::instance() +// namespace +// { + typedef std::vector<ScriptObject*> UnusedScriptContainer; + typedef std::list<std::string> UnusedScriptNamesContainer; + + extern UnusedScriptContainer UnusedScripts; + extern UnusedScriptNamesContainer UnusedScriptNames; +// } + // Manages registration, loading, and execution of scripts. class ScriptMgr { @@ -901,6 +910,7 @@ class ScriptMgr public: /* Unloading */ void Unload(); + void UnloadUnusedScripts(); public: /* SpellScriptLoader */ diff --git a/src/server/game/Server/WorldSession.cpp b/src/server/game/Server/WorldSession.cpp index 69297d32105..609617f0478 100644 --- a/src/server/game/Server/WorldSession.cpp +++ b/src/server/game/Server/WorldSession.cpp @@ -284,11 +284,7 @@ bool WorldSession::Update(uint32 diff, PacketFilter& updater) while (m_Socket && !_recvQueue.empty() && _recvQueue.peek(true) != firstDelayedPacket && _recvQueue.next(packet, updater)) { - if (!AntiDOS.EvaluateOpcode(*packet, currentTime)) - { - KickPlayer(); - } - else if (packet->GetOpcode() >= NUM_MSG_TYPES) + if (packet->GetOpcode() >= NUM_MSG_TYPES) { TC_LOG_ERROR("network.opcode", "Received non-existed opcode %s from %s", GetOpcodeNameForLogging(packet->GetOpcode()).c_str() , GetPlayerInfo().c_str()); @@ -320,7 +316,7 @@ bool WorldSession::Update(uint32 diff, PacketFilter& updater) "Player is currently not in world yet.", GetOpcodeNameForLogging(packet->GetOpcode()).c_str()); } } - else if (_player->IsInWorld()) + else if (_player->IsInWorld() && AntiDOS.EvaluateOpcode(*packet, currentTime)) { sScriptMgr->OnPacketReceive(this, *packet); (this->*opHandle.handler)(*packet); @@ -332,7 +328,7 @@ bool WorldSession::Update(uint32 diff, PacketFilter& updater) if (!_player && !m_playerRecentlyLogout && !m_playerLogout) // There's a short delay between _player = null and m_playerRecentlyLogout = true during logout LogUnexpectedOpcode(packet, "STATUS_LOGGEDIN_OR_RECENTLY_LOGGOUT", "the player has not logged in yet and not recently logout"); - else + else if (AntiDOS.EvaluateOpcode(*packet, currentTime)) { // not expected _player or must checked in packet handler sScriptMgr->OnPacketReceive(this, *packet); @@ -345,7 +341,7 @@ bool WorldSession::Update(uint32 diff, PacketFilter& updater) LogUnexpectedOpcode(packet, "STATUS_TRANSFER", "the player has not logged in yet"); else if (_player->IsInWorld()) LogUnexpectedOpcode(packet, "STATUS_TRANSFER", "the player is still in world"); - else + else if(AntiDOS.EvaluateOpcode(*packet, currentTime)) { sScriptMgr->OnPacketReceive(this, *packet); (this->*opHandle.handler)(*packet); @@ -365,9 +361,12 @@ bool WorldSession::Update(uint32 diff, PacketFilter& updater) if (packet->GetOpcode() == CMSG_CHAR_ENUM) m_playerRecentlyLogout = false; - sScriptMgr->OnPacketReceive(this, *packet); - (this->*opHandle.handler)(*packet); - LogUnprocessedTail(packet); + if (AntiDOS.EvaluateOpcode(*packet, currentTime)) + { + sScriptMgr->OnPacketReceive(this, *packet); + (this->*opHandle.handler)(*packet); + LogUnprocessedTail(packet); + } break; case STATUS_NEVER: TC_LOG_ERROR("network.opcode", "Received not allowed opcode %s from %s", GetOpcodeNameForLogging(packet->GetOpcode()).c_str() @@ -1262,8 +1261,11 @@ bool WorldSession::DosProtection::EvaluateOpcode(WorldPacket& p, time_t time) co case POLICY_LOG: return true; case POLICY_KICK: + { TC_LOG_INFO("network", "AntiDOS: Player kicked!"); + Session->KickPlayer(); return false; + } case POLICY_BAN: { BanMode bm = (BanMode)sWorld->getIntConfig(CONFIG_PACKET_SPOOF_BANMODE); @@ -1277,7 +1279,7 @@ bool WorldSession::DosProtection::EvaluateOpcode(WorldPacket& p, time_t time) co } sWorld->BanAccount(bm, nameOrIp, duration, "DOS (Packet Flooding/Spoofing", "Server: AutoDOS"); TC_LOG_INFO("network", "AntiDOS: Player automatically banned for %u seconds.", duration); - + Session->KickPlayer(); return false; } default: // invalid policy diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 311182291c5..e8e1bbd8ff4 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -3438,7 +3438,7 @@ void Spell::SendSpellCooldown() { // Handle pet cooldowns here if needed instead of in PetAI to avoid hidden cooldown restarts Creature* _creature = m_caster->ToCreature(); - if (_creature && _creature->IsPet()) + if (_creature && (_creature->IsPet() || _creature->IsGuardian())) _creature->AddCreatureSpellCooldown(m_spellInfo->Id); return; @@ -7043,6 +7043,19 @@ bool Spell::CallScriptEffectHandlers(SpellEffIndex effIndex, SpellEffectHandleMo return preventDefault; } +void Spell::CallScriptSuccessfulDispel(SpellEffIndex effIndex) +{ + for (std::list<SpellScript*>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end(); ++scritr) + { + (*scritr)->_PrepareScriptCall(SPELL_SCRIPT_HOOK_EFFECT_SUCCESSFUL_DISPEL); + std::list<SpellScript::EffectHandler>::iterator hookItrEnd = (*scritr)->OnEffectSuccessfulDispel.end(), hookItr = (*scritr)->OnEffectSuccessfulDispel.begin(); + for (; hookItr != hookItrEnd; ++hookItr) + hookItr->Call(*scritr, effIndex); + + (*scritr)->_FinishScriptCall(); + } +} + void Spell::CallScriptBeforeHitHandlers() { for (std::list<SpellScript*>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end(); ++scritr) diff --git a/src/server/game/Spells/Spell.h b/src/server/game/Spells/Spell.h index 6e0a5fc9d3e..c219a497eb9 100644 --- a/src/server/game/Spells/Spell.h +++ b/src/server/game/Spells/Spell.h @@ -644,6 +644,7 @@ class Spell SpellCastResult CallScriptCheckCastHandlers(); void PrepareScriptHitHandlers(); bool CallScriptEffectHandlers(SpellEffIndex effIndex, SpellEffectHandleMode mode); + void CallScriptSuccessfulDispel(SpellEffIndex effIndex); void CallScriptBeforeHitHandlers(); void CallScriptOnHitHandlers(); void CallScriptAfterHitHandlers(); diff --git a/src/server/game/Spells/SpellScript.cpp b/src/server/game/Spells/SpellScript.cpp index 8ab3a72b47e..fccdea7fde1 100644 --- a/src/server/game/Spells/SpellScript.cpp +++ b/src/server/game/Spells/SpellScript.cpp @@ -310,6 +310,10 @@ bool SpellScript::_Validate(SpellInfo const* entry) if (!(*itr).GetAffectedEffectsMask(entry)) TC_LOG_ERROR("scripts", "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectHitTarget` of SpellScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str()); + for (std::list<EffectHandler>::iterator itr = OnEffectSuccessfulDispel.begin(); itr != OnEffectSuccessfulDispel.end(); ++itr) + if (!(*itr).GetAffectedEffectsMask(entry)) + TC_LOG_ERROR("scripts", "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectSuccessfulDispel` of SpellScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str()); + for (std::list<ObjectAreaTargetSelectHandler>::iterator itr = OnObjectAreaTargetSelect.begin(); itr != OnObjectAreaTargetSelect.end(); ++itr) if (!(*itr).GetAffectedEffectsMask(entry)) TC_LOG_ERROR("scripts", "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnObjectAreaTargetSelect` of SpellScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str()); diff --git a/src/server/game/Spells/SpellScript.h b/src/server/game/Spells/SpellScript.h index 653ae9ab5e9..c606cb91de3 100644 --- a/src/server/game/Spells/SpellScript.h +++ b/src/server/game/Spells/SpellScript.h @@ -130,6 +130,7 @@ enum SpellScriptHookType SPELL_SCRIPT_HOOK_EFFECT_LAUNCH_TARGET, SPELL_SCRIPT_HOOK_EFFECT_HIT, SPELL_SCRIPT_HOOK_EFFECT_HIT_TARGET, + SPELL_SCRIPT_HOOK_EFFECT_SUCCESSFUL_DISPEL, SPELL_SCRIPT_HOOK_BEFORE_HIT, SPELL_SCRIPT_HOOK_HIT, SPELL_SCRIPT_HOOK_AFTER_HIT, @@ -292,6 +293,7 @@ class SpellScript : public _SpellScript HookList<EffectHandler> OnEffectLaunchTarget; HookList<EffectHandler> OnEffectHit; HookList<EffectHandler> OnEffectHitTarget; + HookList<EffectHandler> OnEffectSuccessfulDispel; #define SpellEffectFn(F, I, N) EffectHandlerFunction(&F, I, N) // example: BeforeHit += SpellHitFn(class::function); @@ -334,6 +336,9 @@ class SpellScript : public _SpellScript // 11. OnHit - executed just before spell deals damage and procs auras - when spell hits target - called for each target from spell target map // 12. AfterHit - executed just after spell finishes all it's jobs for target - called for each target from spell target map + // this hook is only executed after a successful dispel of any aura + // OnEffectSuccessfulDispel - executed just after effect successfully dispelled aura(s) + // // methods allowing interaction with Spell object // diff --git a/src/server/game/Tools/PlayerDump.cpp b/src/server/game/Tools/PlayerDump.cpp index 584331ad393..136f8aab22c 100644 --- a/src/server/game/Tools/PlayerDump.cpp +++ b/src/server/game/Tools/PlayerDump.cpp @@ -527,10 +527,10 @@ DumpReturn PlayerDumpReader::LoadDump(std::string const& file, uint32 account, s if (!changenth(line, 2, chraccount)) // characters.account update ROLLBACK(DUMP_FILE_BROKEN); - race = uint8(atol(getnth(line, 4).c_str())); - playerClass = uint8(atol(getnth(line, 5).c_str())); - gender = uint8(atol(getnth(line, 6).c_str())); - level = uint8(atol(getnth(line, 7).c_str())); + race = uint8(atoul(getnth(line, 4).c_str())); + playerClass = uint8(atoul(getnth(line, 5).c_str())); + gender = uint8(atoul(getnth(line, 6).c_str())); + level = uint8(atoul(getnth(line, 7).c_str())); if (name.empty()) { // check if the original name already exists diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp index 47dd37936aa..de191774b77 100644 --- a/src/server/game/World/World.cpp +++ b/src/server/game/World/World.cpp @@ -692,6 +692,11 @@ void World::LoadConfigSettings(bool reload) m_int_configs[CONFIG_MIN_PET_NAME] = 2; } + m_int_configs[CONFIG_CHARTER_COST_GUILD] = sConfigMgr->GetIntDefault("Guild.CharterCost", 1000); + m_int_configs[CONFIG_CHARTER_COST_ARENA_2v2] = sConfigMgr->GetIntDefault("ArenaTeam.CharterCost.2v2", 800000); + m_int_configs[CONFIG_CHARTER_COST_ARENA_3v3] = sConfigMgr->GetIntDefault("ArenaTeam.CharterCost.3v3", 1200000); + m_int_configs[CONFIG_CHARTER_COST_ARENA_5v5] = sConfigMgr->GetIntDefault("ArenaTeam.CharterCost.5v5", 2000000); + m_int_configs[CONFIG_CHARACTER_CREATING_DISABLED] = sConfigMgr->GetIntDefault("CharacterCreating.Disabled", 0); m_int_configs[CONFIG_CHARACTER_CREATING_DISABLED_RACEMASK] = sConfigMgr->GetIntDefault("CharacterCreating.Disabled.RaceMask", 0); m_int_configs[CONFIG_CHARACTER_CREATING_DISABLED_CLASSMASK] = sConfigMgr->GetIntDefault("CharacterCreating.Disabled.ClassMask", 0); diff --git a/src/server/game/World/World.h b/src/server/game/World/World.h index 5c97b8f5653..a02f735ed4d 100644 --- a/src/server/game/World/World.h +++ b/src/server/game/World/World.h @@ -341,6 +341,10 @@ enum WorldIntConfigs CONFIG_BIRTHDAY_TIME, CONFIG_CREATURE_PICKPOCKET_REFILL, CONFIG_AHBOT_UPDATE_INTERVAL, + CONFIG_CHARTER_COST_GUILD, + CONFIG_CHARTER_COST_ARENA_2v2, + CONFIG_CHARTER_COST_ARENA_3v3, + CONFIG_CHARTER_COST_ARENA_5v5, INT_CONFIG_VALUE_COUNT }; diff --git a/src/server/scripts/Commands/cs_debug.cpp b/src/server/scripts/Commands/cs_debug.cpp index d3d012e70d5..2eebc9cae10 100644 --- a/src/server/scripts/Commands/cs_debug.cpp +++ b/src/server/scripts/Commands/cs_debug.cpp @@ -488,7 +488,7 @@ public: static bool HandleDebugSendQuestPartyMsgCommand(ChatHandler* handler, char const* args) { - uint32 msg = atol((char*)args); + uint32 msg = atoul(args); handler->GetSession()->GetPlayer()->SendPushToPartyResponse(handler->GetSession()->GetPlayer(), msg); return true; } @@ -507,7 +507,7 @@ public: static bool HandleDebugSendQuestInvalidMsgCommand(ChatHandler* handler, char const* args) { - QuestFailedReason msg = static_cast<QuestFailedReason>(atol((char*)args)); + QuestFailedReason msg = static_cast<QuestFailedReason>(atoul(args)); handler->GetSession()->GetPlayer()->SendCanTakeQuestResponse(msg); return true; } diff --git a/src/server/scripts/Commands/cs_gobject.cpp b/src/server/scripts/Commands/cs_gobject.cpp index f3ddc6f0137..c0bf2a6bb84 100644 --- a/src/server/scripts/Commands/cs_gobject.cpp +++ b/src/server/scripts/Commands/cs_gobject.cpp @@ -118,7 +118,7 @@ public: if (!id) return false; - uint32 objectId = atol(id); + uint32 objectId = atoul(id); if (!objectId) return false; @@ -238,7 +238,7 @@ public: if (!id) return false; - uint32 objectId = atol(id); + uint32 objectId = atoul(id); if (objectId) result = WorldDatabase.PQuery("SELECT guid, id, position_x, position_y, position_z, orientation, map, phaseMask, (POW(position_x - '%f', 2) + POW(position_y - '%f', 2) + POW(position_z - '%f', 2)) AS order_ FROM gameobject WHERE map = '%i' AND id = '%u' ORDER BY order_ ASC LIMIT 1", diff --git a/src/server/scripts/Commands/cs_group.cpp b/src/server/scripts/Commands/cs_group.cpp index a558d977b85..06967c69888 100644 --- a/src/server/scripts/Commands/cs_group.cpp +++ b/src/server/scripts/Commands/cs_group.cpp @@ -269,7 +269,7 @@ public: const char* onlineState = ""; // Parse the guid to uint32... - ObjectGuid parseGUID(HIGHGUID_PLAYER, uint32(atol((char*)args))); + ObjectGuid parseGUID(HIGHGUID_PLAYER, uint32(atoul(args))); // ... and try to extract a player out of it. if (sObjectMgr->GetPlayerNameByGUID(parseGUID, nameTarget)) diff --git a/src/server/scripts/Commands/cs_list.cpp b/src/server/scripts/Commands/cs_list.cpp index 0f21200c22d..b57629a577e 100644 --- a/src/server/scripts/Commands/cs_list.cpp +++ b/src/server/scripts/Commands/cs_list.cpp @@ -65,7 +65,7 @@ public: if (!id) return false; - uint32 creatureId = atol(id); + uint32 creatureId = atoul(id); if (!creatureId) { handler->PSendSysMessage(LANG_COMMAND_INVALIDCREATUREID, creatureId); @@ -82,7 +82,7 @@ public: } char* countStr = strtok(NULL, " "); - uint32 count = countStr ? atol(countStr) : 10; + uint32 count = countStr ? atoul(countStr) : 10; if (count == 0) return false; @@ -133,11 +133,11 @@ public: if (!*args) return false; - char* id = handler->extractKeyFromLink((char*)args, "Hitem"); + char const* id = handler->extractKeyFromLink((char*)args, "Hitem"); if (!id) return false; - uint32 itemId = atol(id); + uint32 itemId = atoul(id); if (!itemId) { handler->PSendSysMessage(LANG_COMMAND_ITEMIDINVALID, itemId); @@ -154,7 +154,7 @@ public: } char* countStr = strtok(NULL, " "); - uint32 count = countStr ? atol(countStr) : 10; + uint32 count = countStr ? atoul(countStr) : 10; if (count == 0) return false; @@ -354,7 +354,7 @@ public: if (!id) return false; - uint32 gameObjectId = atol(id); + uint32 gameObjectId = atoul(id); if (!gameObjectId) { handler->PSendSysMessage(LANG_COMMAND_LISTOBJINVALIDID, gameObjectId); @@ -371,7 +371,7 @@ public: } char* countStr = strtok(NULL, " "); - uint32 count = countStr ? atol(countStr) : 10; + uint32 count = countStr ? atoul(countStr) : 10; if (count == 0) return false; @@ -476,7 +476,7 @@ public: if (!*args) return false; - ObjectGuid parseGUID(HIGHGUID_PLAYER, uint32(atol((char*)args))); + ObjectGuid parseGUID(HIGHGUID_PLAYER, uint32(atoul(args))); if (sObjectMgr->GetPlayerNameByGUID(parseGUID, targetName)) { diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp index a853a02bb11..331a31f6c02 100644 --- a/src/server/scripts/Commands/cs_misc.cpp +++ b/src/server/scripts/Commands/cs_misc.cpp @@ -1134,7 +1134,7 @@ public: char const* id = handler->extractKeyFromLink((char*)args, "Hitem"); if (!id) return false; - itemId = uint32(atol(id)); + itemId = atoul(id); } char const* ccount = strtok(NULL, " "); @@ -1216,7 +1216,7 @@ public: if (!id) return false; - uint32 itemSetId = atol(id); + uint32 itemSetId = atoul(id); // prevent generation all items with itemset field value '0' if (itemSetId == 0) @@ -1357,7 +1357,7 @@ public: return false; } - int32 level = uint32(atol(levelStr)); + int32 level = atol(levelStr); Player* target = handler->getSelectedPlayer(); if (!target) @@ -1379,7 +1379,7 @@ public: // If our target does not yet have the skill they are trying to add to them, the chosen level also becomes // the max level of the new profession. - uint16 max = maxPureSkill ? atol (maxPureSkill) : targetHasSkill ? target->GetPureMaxSkillValue(skill) : uint16(level); + uint16 max = maxPureSkill ? atoul(maxPureSkill) : targetHasSkill ? target->GetPureMaxSkillValue(skill) : uint16(level); if (level <= 0 || level > max || max <= 0) return false; @@ -1419,7 +1419,7 @@ public: PreparedStatement* stmt = NULL; // To make sure we get a target, we convert our guid to an omniversal... - ObjectGuid parseGUID(HIGHGUID_PLAYER, uint32(atol((char*)args))); + ObjectGuid parseGUID(HIGHGUID_PLAYER, uint32(atoul(args))); // ... and make sure we get a target, somehow. if (sObjectMgr->GetPlayerNameByGUID(parseGUID, targetName)) @@ -1780,7 +1780,7 @@ public: uint32 totalmail = uint32(fields[1].GetUInt64()); // ... we have to convert it from Char to int. We can use totalmail as it is - rmailint = atol(readmail.c_str()); + rmailint = atoul(readmail.c_str()); // Output XXI. LANG_INFO_CHR_MAILS if at least one mail is given if (totalmail >= 1) @@ -1978,7 +1978,7 @@ public: static bool HandleMuteInfoHelper(uint32 accountId, char const* accountName, ChatHandler *handler) { PreparedStatement *stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_ACCOUNT_MUTE_INFO); - stmt->setUInt16(0, accountId); + stmt->setUInt32(0, accountId); PreparedQueryResult result = LoginDatabase.Query(stmt); if (!result) diff --git a/src/server/scripts/Commands/cs_npc.cpp b/src/server/scripts/Commands/cs_npc.cpp index 987c12debb7..1434493e948 100644 --- a/src/server/scripts/Commands/cs_npc.cpp +++ b/src/server/scripts/Commands/cs_npc.cpp @@ -326,15 +326,15 @@ public: char* fmaxcount = strtok(NULL, " "); //add maxcount, default: 0 uint32 maxcount = 0; if (fmaxcount) - maxcount = atol(fmaxcount); + maxcount = atoul(fmaxcount); char* fincrtime = strtok(NULL, " "); //add incrtime, default: 0 uint32 incrtime = 0; if (fincrtime) - incrtime = atol(fincrtime); + incrtime = atoul(fincrtime); char* fextendedcost = strtok(NULL, " "); //add ExtendedCost, default: 0 - uint32 extendedcost = fextendedcost ? atol(fextendedcost) : 0; + uint32 extendedcost = fextendedcost ? atoul(fextendedcost) : 0; Creature* vendor = handler->getSelectedCreature(); if (!vendor) { @@ -564,7 +564,7 @@ public: handler->SetSentErrorMessage(true); return false; } - uint32 itemId = atol(pitem); + uint32 itemId = atoul(pitem); if (!sObjectMgr->RemoveVendorItem(vendor->GetEntry(), itemId)) { @@ -1321,7 +1321,7 @@ public: return false; } - ObjectGuid receiver_guid(HIGHGUID_PLAYER, uint32(atol(receiver_str))); + ObjectGuid receiver_guid(HIGHGUID_PLAYER, uint32(atoul(receiver_str))); // check online security Player* receiver = ObjectAccessor::FindPlayer(receiver_guid); diff --git a/src/server/scripts/Commands/cs_quest.cpp b/src/server/scripts/Commands/cs_quest.cpp index fb486128049..9f7098b9134 100644 --- a/src/server/scripts/Commands/cs_quest.cpp +++ b/src/server/scripts/Commands/cs_quest.cpp @@ -67,7 +67,7 @@ public: if (!cId) return false; - uint32 entry = atol(cId); + uint32 entry = atoul(cId); Quest const* quest = sObjectMgr->GetQuestTemplate(entry); @@ -112,7 +112,7 @@ public: if (!cId) return false; - uint32 entry = atol(cId); + uint32 entry = atoul(cId); Quest const* quest = sObjectMgr->GetQuestTemplate(entry); @@ -165,7 +165,7 @@ public: if (!cId) return false; - uint32 entry = atol(cId); + uint32 entry = atoul(cId); Quest const* quest = sObjectMgr->GetQuestTemplate(entry); @@ -269,7 +269,7 @@ public: if (!cId) return false; - uint32 entry = atol(cId); + uint32 entry = atoul(cId); Quest const* quest = sObjectMgr->GetQuestTemplate(entry); diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_ragnaros.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_ragnaros.cpp index 58f38ec4267..860cc609c7b 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_ragnaros.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_ragnaros.cpp @@ -225,7 +225,7 @@ class boss_ragnaros : public CreatureScript events.ScheduleEvent(EVENT_ELEMENTAL_FIRE, urand(10000, 14000)); break; case EVENT_MAGMA_BLAST: - if (me->IsWithinMeleeRange(me->GetVictim())) + if (!me->IsWithinMeleeRange(me->GetVictim())) { DoCastVictim(SPELL_MAGMA_BLAST); if (!_hasYelledMagmaBurst) diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp index 992b20d2580..e0416b56397 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp @@ -25,10 +25,9 @@ EndScriptData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" -#include "hyjal.h" -#include "SpellAuras.h" -#include "hyjal_trash.h" +#include "SpellScript.h" #include "Player.h" +#include "hyjal.h" enum Texts { @@ -39,42 +38,59 @@ enum Texts SAY_ENRAGE = 5, SAY_DEATH = 6, SAY_SOUL_CHARGE = 7, + // YELL_ARCHIMONDE_INTRO = 8 }; enum Spells { - SPELL_DENOUEMENT_WISP = 32124, - SPELL_ANCIENT_SPARK = 39349, - SPELL_PROTECTION_OF_ELUNE = 38528, - - SPELL_DRAIN_WORLD_TREE = 39140, - SPELL_DRAIN_WORLD_TREE_2 = 39141, - - SPELL_FINGER_OF_DEATH = 31984, - SPELL_HAND_OF_DEATH = 35354, - SPELL_AIR_BURST = 32014, - SPELL_GRIP_OF_THE_LEGION = 31972, - SPELL_DOOMFIRE_STRIKE = 31903, //summons two creatures - SPELL_DOOMFIRE_SPAWN = 32074, - SPELL_DOOMFIRE = 31945, - SPELL_SOUL_CHARGE_YELLOW = 32045, - SPELL_SOUL_CHARGE_GREEN = 32051, - SPELL_SOUL_CHARGE_RED = 32052, - SPELL_UNLEASH_SOUL_YELLOW = 32054, - SPELL_UNLEASH_SOUL_GREEN = 32057, - SPELL_UNLEASH_SOUL_RED = 32053, - SPELL_FEAR = 31970, + SPELL_DENOUEMENT_WISP = 32124, + SPELL_ANCIENT_SPARK = 39349, + SPELL_PROTECTION_OF_ELUNE = 38528, + + SPELL_DRAIN_WORLD_TREE = 39140, + SPELL_DRAIN_WORLD_TREE_TRIGGERED = 39141, + + SPELL_FINGER_OF_DEATH = 31984, + SPELL_HAND_OF_DEATH = 35354, + SPELL_AIR_BURST = 32014, + SPELL_GRIP_OF_THE_LEGION = 31972, + SPELL_DOOMFIRE_STRIKE = 31903, // summons two creatures + SPELL_DOOMFIRE_SPAWN = 32074, + SPELL_DOOMFIRE = 31945, + SPELL_SOUL_CHARGE_YELLOW = 32045, + SPELL_SOUL_CHARGE_GREEN = 32051, + SPELL_SOUL_CHARGE_RED = 32052, + SPELL_UNLEASH_SOUL_YELLOW = 32054, + SPELL_UNLEASH_SOUL_GREEN = 32057, + SPELL_UNLEASH_SOUL_RED = 32053, + SPELL_FEAR = 31970 +}; + +enum Events +{ + EVENT_HAND_OF_DEATH = 1, // Raid wiper + EVENT_UNLEASH_SOUL_CHARGE, + EVENT_FINGER_OF_DEATH, + EVENT_GRIP_OF_THE_LEGION, + EVENT_FEAR, + EVENT_AIR_BURST, + EVENT_DOOMFIRE, + EVENT_DISTANCE_CHECK, // This checks if he's too close to the World Tree (75 yards from a point on the tree), if true then he will enrage + EVENT_SUMMON_WHISP }; enum Summons { - CREATURE_DOOMFIRE = 18095, - CREATURE_DOOMFIRE_SPIRIT = 18104, - CREATURE_ANCIENT_WISP = 17946, - CREATURE_CHANNEL_TARGET = 22418, + NPC_DOOMFIRE = 18095, + NPC_DOOMFIRE_SPIRIT = 18104, + NPC_ANCIENT_WISP = 17946 }; -Position const NordrassilLoc = {5503.713f, -3523.436f, 1608.781f, 0.0f}; +enum Actions +{ + ACTION_ENRAGE, + ACTION_CHANNEL_WORLD_TREE +}; class npc_ancient_wisp : public CreatureScript { @@ -200,7 +216,6 @@ public: } void MoveInLineOfSight(Unit* who) override - { //will update once TargetGUID is 0. In case noone actually moves(not likely) and this is 0 //when UpdateAI needs it, it will be forced to select randomPoint @@ -249,409 +264,309 @@ class boss_archimonde : public CreatureScript public: boss_archimonde() : CreatureScript("boss_archimonde") { } - CreatureAI* GetAI(Creature* creature) const override - { - return GetInstanceAI<boss_archimondeAI>(creature); - } - - struct boss_archimondeAI : public hyjal_trashAI + struct boss_archimondeAI : public BossAI { - boss_archimondeAI(Creature* creature) : hyjal_trashAI(creature) + boss_archimondeAI(Creature* creature) : BossAI(creature, DATA_ARCHIMONDE) { Initialize(); - instance = creature->GetInstanceScript(); } void Initialize() { DoomfireSpiritGUID.Clear(); - damageTaken = 0; - WorldTreeGUID.Clear(); - - DrainNordrassilTimer = 0; - FearTimer = 42000; - AirBurstTimer = 30000; - GripOfTheLegionTimer = urand(5000, 25000); - DoomfireTimer = 20000; - SoulChargeTimer = urand(2000, 30000); + SoulChargeCount = 0; - MeleeRangeCheckTimer = 15000; - HandOfDeathTimer = 2000; WispCount = 0; // When ~30 wisps are summoned, Archimonde dies - EnrageTimer = 600000; // 10 minutes - CheckDistanceTimer = 30000; // This checks if he's too close to the World Tree (75 yards from a point on the tree), if true then he will enrage - SummonWispTimer = 0; + _unleashSpell = 0; + _chargeSpell = 0; Enraged = false; - BelowTenPercent = false; HasProtected = false; - IsChanneling = false; } - InstanceScript* instance; - - ObjectGuid DoomfireSpiritGUID; - ObjectGuid WorldTreeGUID; - - uint32 DrainNordrassilTimer; - uint32 FearTimer; - uint32 AirBurstTimer; - uint32 GripOfTheLegionTimer; - uint32 DoomfireTimer; - uint32 SoulChargeTimer; - uint8 SoulChargeCount; - uint32 MeleeRangeCheckTimer; - uint32 HandOfDeathTimer; - uint32 SummonWispTimer; - uint8 WispCount; - uint32 EnrageTimer; - uint32 CheckDistanceTimer; - - bool Enraged; - bool BelowTenPercent; - bool HasProtected; - bool IsChanneling; + void InitializeAI() override + { + BossAI::InitializeAI(); + DoAction(ACTION_CHANNEL_WORLD_TREE); + } void Reset() override { - instance->SetData(DATA_ARCHIMONDEEVENT, NOT_STARTED); - Initialize(); + _Reset(); + me->RemoveAllAuras(); // Reset Soul Charge auras. } void EnterCombat(Unit* /*who*/) override { - me->InterruptSpell(CURRENT_CHANNELED_SPELL); Talk(SAY_AGGRO); - DoZoneInCombat(); - - instance->SetData(DATA_ARCHIMONDEEVENT, IN_PROGRESS); - } - - void KilledUnit(Unit* victim) override - { - Talk(SAY_SLAY); - - if (victim && victim->GetTypeId() == TYPEID_PLAYER) - GainSoulCharge(victim->ToPlayer()); + _EnterCombat(); + events.ScheduleEvent(EVENT_FEAR, 42000); + events.ScheduleEvent(EVENT_AIR_BURST, 30000); + events.ScheduleEvent(EVENT_GRIP_OF_THE_LEGION, urand(5000, 25000)); + events.ScheduleEvent(EVENT_DOOMFIRE, 20000); + events.ScheduleEvent(EVENT_UNLEASH_SOUL_CHARGE, urand(2000, 30000)); + events.ScheduleEvent(EVENT_FINGER_OF_DEATH, 15000); + events.ScheduleEvent(EVENT_HAND_OF_DEATH, 600000); + events.ScheduleEvent(EVENT_DISTANCE_CHECK, 30000); } - void GainSoulCharge(Player* victim) + void ExecuteEvent(uint32 eventId) override { - switch (victim->getClass()) + switch (eventId) { - case CLASS_PRIEST: - case CLASS_PALADIN: - case CLASS_WARLOCK: - victim->CastSpell(me, SPELL_SOUL_CHARGE_RED, true); + case EVENT_HAND_OF_DEATH: + DoCastAOE(SPELL_HAND_OF_DEATH); + events.ScheduleEvent(EVENT_HAND_OF_DEATH, 2000); + break; + case EVENT_UNLEASH_SOUL_CHARGE: + _chargeSpell = 0; + _unleashSpell = 0; + me->InterruptNonMeleeSpells(false); + switch (urand(0, 2)) + { + case 0: + _chargeSpell = SPELL_SOUL_CHARGE_RED; + _unleashSpell = SPELL_UNLEASH_SOUL_RED; + break; + case 1: + _chargeSpell = SPELL_SOUL_CHARGE_YELLOW; + _unleashSpell = SPELL_UNLEASH_SOUL_YELLOW; + break; + case 2: + _chargeSpell = SPELL_SOUL_CHARGE_GREEN; + _unleashSpell = SPELL_UNLEASH_SOUL_GREEN; + break; + } + + if (me->HasAura(_chargeSpell)) + { + me->RemoveAuraFromStack(_chargeSpell); + DoCastVictim(_unleashSpell); + SoulChargeCount--; + events.ScheduleEvent(EVENT_UNLEASH_SOUL_CHARGE, urand(2000, 30000)); + } + break; + case EVENT_FINGER_OF_DEATH: + if (!SelectTarget(SELECT_TARGET_RANDOM, 0, 5.0f)) // Checks if there are no targets in melee range + { + DoCast(SelectTarget(SELECT_TARGET_RANDOM, 0), SPELL_FINGER_OF_DEATH); + events.ScheduleEvent(EVENT_FINGER_OF_DEATH, 1000); + } + else + events.ScheduleEvent(EVENT_FINGER_OF_DEATH, 5000); break; - case CLASS_MAGE: - case CLASS_ROGUE: - case CLASS_WARRIOR: - victim->CastSpell(me, SPELL_SOUL_CHARGE_YELLOW, true); + case EVENT_GRIP_OF_THE_LEGION: + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) + DoCast(target, SPELL_GRIP_OF_THE_LEGION); + events.ScheduleEvent(EVENT_GRIP_OF_THE_LEGION, urand(5000, 25000)); break; - case CLASS_DRUID: - case CLASS_SHAMAN: - case CLASS_HUNTER: - victim->CastSpell(me, SPELL_SOUL_CHARGE_GREEN, true); + case EVENT_AIR_BURST: + Talk(SAY_AIR_BURST); + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1)) + DoCast(target, SPELL_AIR_BURST); //not on tank + events.ScheduleEvent(EVENT_AIR_BURST, urand(25000, 40000)); + break; + case EVENT_FEAR: + DoCastAOE(SPELL_FEAR); + events.ScheduleEvent(EVENT_FEAR, 42000); + break; + case EVENT_DOOMFIRE: + Talk(SAY_DOOMFIRE); + if (Unit* temp = SelectTarget(SELECT_TARGET_RANDOM, 1)) + SummonDoomfire(temp); + else + SummonDoomfire(me->GetVictim()); + events.ScheduleEvent(EVENT_DOOMFIRE, 20000); + break; + case EVENT_DISTANCE_CHECK: + if (Creature* channelTrigger = instance->GetCreature(DATA_CHANNEL_TARGET)) + if (me->IsWithinDistInMap(channelTrigger, 75.0f)) + DoAction(ACTION_ENRAGE); + events.ScheduleEvent(EVENT_DISTANCE_CHECK, 5000); + break; + case EVENT_SUMMON_WHISP: + DoSpawnCreature(NPC_ANCIENT_WISP, float(rand32() % 40), float(rand32() % 40), 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + ++WispCount; + if (WispCount >= 30) + me->DealDamage(me, me->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + events.ScheduleEvent(EVENT_SUMMON_WHISP, 1500); + break; + default: break; } - - SoulChargeTimer = urand(2000, 30000); - ++SoulChargeCount; - } - - void JustDied(Unit* killer) override - { - hyjal_trashAI::JustDied(killer); - Talk(SAY_DEATH); - - instance->SetData(DATA_ARCHIMONDEEVENT, DONE); } - bool CanUseFingerOfDeath() + void DamageTaken(Unit* /*attacker*/, uint32 &damage) override { - // First we check if our current victim is in melee range or not. - Unit* victim = me->GetVictim(); - if (victim && me->IsWithinDistInMap(victim, me->GetAttackDistance(victim))) - return false; - - ThreatContainer::StorageType const &threatlist = me->getThreatManager().getThreatList(); - if (threatlist.empty()) - return false; - - std::list<Unit*> targets; - ThreatContainer::StorageType::const_iterator itr = threatlist.begin(); - for (; itr != threatlist.end(); ++itr) + if (me->HealthBelowPctDamaged(10, damage)) { - Unit* unit = ObjectAccessor::GetUnit(*me, (*itr)->getUnitGuid()); - if (unit && unit->IsAlive()) - targets.push_back(unit); - } + if (!Enraged) + DoAction(ACTION_ENRAGE); - if (targets.empty()) - return false; + if (!HasProtected) + { + me->GetMotionMaster()->Clear(false); + me->GetMotionMaster()->MoveIdle(); - targets.sort(Trinity::ObjectDistanceOrderPred(me)); - Unit* target = targets.front(); - if (target) - { - if (!me->IsWithinDistInMap(target, me->GetAttackDistance(target))) - return true; // Cast Finger of Death - else // This target is closest, he is our new tank - me->AddThreat(target, me->getThreatManager().getThreat(me->GetVictim())); + // All members of raid must get this buff + DoCastAOE(SPELL_PROTECTION_OF_ELUNE, true); + HasProtected = true; + events.ScheduleEvent(EVENT_SUMMON_WHISP, 1500); + } } - - return false; } - void JustSummoned(Creature* summoned) override + void KilledUnit(Unit* victim) override { - if (summoned->GetEntry() == CREATURE_ANCIENT_WISP) - summoned->AI()->AttackStart(me); - else - { - summoned->setFaction(me->getFaction()); - summoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - summoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - } - - if (summoned->GetEntry() == CREATURE_DOOMFIRE_SPIRIT) - { - DoomfireSpiritGUID = summoned->GetGUID(); - } + Talk(SAY_SLAY); - if (summoned->GetEntry() == CREATURE_DOOMFIRE) + if (victim->GetTypeId() == TYPEID_PLAYER) { - summoned->CastSpell(summoned, SPELL_DOOMFIRE_SPAWN, false); - summoned->CastSpell(summoned, SPELL_DOOMFIRE, true, 0, 0, me->GetGUID()); - - if (Unit* DoomfireSpirit = ObjectAccessor::GetUnit(*me, DoomfireSpiritGUID)) + switch (victim->getClass()) { - summoned->GetMotionMaster()->MoveFollow(DoomfireSpirit, 0.0f, 0.0f); - DoomfireSpiritGUID.Clear(); + case CLASS_PRIEST: + case CLASS_PALADIN: + case CLASS_WARLOCK: + victim->CastSpell(me, SPELL_SOUL_CHARGE_RED, true); + break; + case CLASS_MAGE: + case CLASS_ROGUE: + case CLASS_WARRIOR: + victim->CastSpell(me, SPELL_SOUL_CHARGE_YELLOW, true); + break; + case CLASS_DRUID: + case CLASS_SHAMAN: + case CLASS_HUNTER: + victim->CastSpell(me, SPELL_SOUL_CHARGE_GREEN, true); + break; } + + events.ScheduleEvent(EVENT_UNLEASH_SOUL_CHARGE, urand(2000, 30000)); + ++SoulChargeCount; } } - //this is code doing close to what the summoning spell would do (spell 31903) - void SummonDoomfire(Unit* target) + void JustReachedHome() override { - me->SummonCreature(CREATURE_DOOMFIRE_SPIRIT, - target->GetPositionX()+15.0f, target->GetPositionY()+15.0f, target->GetPositionZ(), 0, - TEMPSUMMON_TIMED_DESPAWN, 27000); - - me->SummonCreature(CREATURE_DOOMFIRE, - target->GetPositionX()-15.0f, target->GetPositionY()-15.0f, target->GetPositionZ(), 0, - TEMPSUMMON_TIMED_DESPAWN, 27000); + DoAction(ACTION_CHANNEL_WORLD_TREE); } - void UnleashSoulCharge() + void JustDied(Unit* /*killer*/) override { - me->InterruptNonMeleeSpells(false); - - bool HasCast = false; - uint32 chargeSpell = 0; - uint32 unleashSpell = 0; + Talk(SAY_DEATH); + _JustDied(); + // @todo: remove this when instance script gets updated, kept for compatibility only + instance->SetData(DATA_ARCHIMONDE, DONE); + } - switch (urand(0, 2)) + void JustSummoned(Creature* summoned) override + { + switch (summoned->GetEntry()) { - case 0: - chargeSpell = SPELL_SOUL_CHARGE_RED; - unleashSpell = SPELL_UNLEASH_SOUL_RED; - break; - case 1: - chargeSpell = SPELL_SOUL_CHARGE_YELLOW; - unleashSpell = SPELL_UNLEASH_SOUL_YELLOW; + case NPC_ANCIENT_WISP: + summoned->AI()->AttackStart(me); break; - case 2: - chargeSpell = SPELL_SOUL_CHARGE_GREEN; - unleashSpell = SPELL_UNLEASH_SOUL_GREEN; + case NPC_DOOMFIRE_SPIRIT: + DoomfireSpiritGUID = summoned->GetGUID(); break; - } + case NPC_DOOMFIRE: + summoned->CastSpell(summoned, SPELL_DOOMFIRE_SPAWN, false); + summoned->CastSpell(summoned, SPELL_DOOMFIRE, true, 0, 0, me->GetGUID()); - if (me->HasAura(chargeSpell)) - { - me->RemoveAuraFromStack(chargeSpell); - DoCastVictim(unleashSpell); - HasCast = true; - SoulChargeCount--; + if (Unit* DoomfireSpirit = ObjectAccessor::GetUnit(*me, DoomfireSpiritGUID)) + { + summoned->GetMotionMaster()->MoveFollow(DoomfireSpirit, 0.0f, 0.0f); + DoomfireSpiritGUID.Clear(); + } + break; + default: + break; } - - if (HasCast) - SoulChargeTimer = urand(2000, 30000); } - void UpdateAI(uint32 diff) override + void DoAction(int32 actionId) override { - if (!me->IsInCombat()) + switch (actionId) { - // Do not let the raid skip straight to Archimonde. Visible and hostile ONLY if Azagalor is finished. - if ((instance->GetData(DATA_AZGALOREVENT) < DONE) && (me->IsVisible() || (me->getFaction() != 35))) - { - me->SetVisible(false); - me->setFaction(35); - } - else if ((instance->GetData(DATA_AZGALOREVENT) >= DONE) && (!me->IsVisible() || (me->getFaction() == 35))) - { - me->setFaction(1720); - me->SetVisible(true); - } - - if (DrainNordrassilTimer <= diff) - { - if (!IsChanneling) - { - Creature* temp = me->SummonCreature(CREATURE_CHANNEL_TARGET, NordrassilLoc, TEMPSUMMON_TIMED_DESPAWN, 1200000); - - if (temp) - WorldTreeGUID = temp->GetGUID(); - - if (Unit* Nordrassil = ObjectAccessor::GetUnit(*me, WorldTreeGUID)) - { - Nordrassil->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - Nordrassil->SetDisplayId(11686); - DoCast(Nordrassil, SPELL_DRAIN_WORLD_TREE); - IsChanneling = true; - } - } - - if (Unit* Nordrassil = ObjectAccessor::GetUnit(*me, WorldTreeGUID)) - { - Nordrassil->CastSpell(me, SPELL_DRAIN_WORLD_TREE_2, true); - DrainNordrassilTimer = 1000; - } - } else DrainNordrassilTimer -= diff; + case ACTION_ENRAGE: + me->GetMotionMaster()->Clear(false); + me->GetMotionMaster()->MoveIdle(); + Enraged = true; + Talk(SAY_ENRAGE); + break; + case ACTION_CHANNEL_WORLD_TREE: + DoCastAOE(SPELL_DRAIN_WORLD_TREE, true); + break; + default: + break; } + } - if (!UpdateVictim()) + //this is code doing close to what the summoning spell would do (spell 31903) + void SummonDoomfire(Unit* target) + { + if (!target) return; - if (me->HealthBelowPct(10) && !BelowTenPercent && !Enraged) - BelowTenPercent = true; - - if (!Enraged) - { - if (EnrageTimer <= diff) - { - if (HealthAbovePct(10)) - { - me->GetMotionMaster()->Clear(false); - me->GetMotionMaster()->MoveIdle(); - Enraged = true; - Talk(SAY_ENRAGE); - } - } else EnrageTimer -= diff; + me->SummonCreature(NPC_DOOMFIRE_SPIRIT, + target->GetPositionX()+15.0f, target->GetPositionY()+15.0f, target->GetPositionZ(), 0, + TEMPSUMMON_TIMED_DESPAWN, 27000); - if (CheckDistanceTimer <= diff) - { - // To simplify the check, we simply summon a Creature in the location and then check how far we are from the creature - Creature* Check = me->SummonCreature(CREATURE_CHANNEL_TARGET, NordrassilLoc, TEMPSUMMON_TIMED_DESPAWN, 2000); - if (Check) - { - Check->SetVisible(false); - - if (me->IsWithinDistInMap(Check, 75)) - { - me->GetMotionMaster()->Clear(false); - me->GetMotionMaster()->MoveIdle(); - Enraged = true; - Talk(SAY_ENRAGE); - } - } - CheckDistanceTimer = 5000; - } else CheckDistanceTimer -= diff; - } + me->SummonCreature(NPC_DOOMFIRE, + target->GetPositionX()-15.0f, target->GetPositionY()-15.0f, target->GetPositionZ(), 0, + TEMPSUMMON_TIMED_DESPAWN, 27000); + } - if (BelowTenPercent) - { - if (!HasProtected) - { - me->GetMotionMaster()->Clear(false); - me->GetMotionMaster()->MoveIdle(); + private: + ObjectGuid DoomfireSpiritGUID; + uint8 SoulChargeCount; + uint8 WispCount; + uint32 _chargeSpell; + uint32 _unleashSpell; + bool Enraged; + bool HasProtected; + }; - //all members of raid must get this buff - DoCastVictim(SPELL_PROTECTION_OF_ELUNE, true); - HasProtected = true; - Enraged = true; - } + CreatureAI* GetAI(Creature* creature) const override + { + return GetInstanceAI<boss_archimondeAI>(creature); + } +}; - if (SummonWispTimer <= diff) - { - DoSpawnCreature(CREATURE_ANCIENT_WISP, float(rand32() % 40), float(rand32() % 40), 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); - SummonWispTimer = 1500; - ++WispCount; - } else SummonWispTimer -= diff; +// 39142 - Drain World Tree Dummy +class spell_archimonde_drain_world_tree_dummy : public SpellScriptLoader +{ + public: + spell_archimonde_drain_world_tree_dummy() : SpellScriptLoader("spell_archimonde_drain_world_tree_dummy") { } - if (WispCount >= 30) - me->DealDamage(me, me->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - } + class spell_archimonde_drain_world_tree_dummy_SpellScript : public SpellScript + { + PrepareSpellScript(spell_archimonde_drain_world_tree_dummy_SpellScript); - if (Enraged) + bool Validate(SpellInfo const* /*spellInfo*/) override { - if (HandOfDeathTimer <= diff) - { - DoCastVictim(SPELL_HAND_OF_DEATH); - HandOfDeathTimer = 2000; - } else HandOfDeathTimer -= diff; - return; // Don't do anything after this point. + if (!sSpellMgr->GetSpellInfo(SPELL_DRAIN_WORLD_TREE_TRIGGERED)) + return false; + return true; } - if (SoulChargeCount) + void HandleScript(SpellEffIndex /*effIndex*/) { - if (SoulChargeTimer <= diff) - UnleashSoulCharge(); - else SoulChargeTimer -= diff; + if (Unit* target = GetHitUnit()) + target->CastSpell(GetCaster(), SPELL_DRAIN_WORLD_TREE_TRIGGERED, true); } - if (GripOfTheLegionTimer <= diff) - { - DoCast(SelectTarget(SELECT_TARGET_RANDOM, 0), SPELL_GRIP_OF_THE_LEGION); - GripOfTheLegionTimer = urand(5000, 25000); - } else GripOfTheLegionTimer -= diff; - - if (AirBurstTimer <= diff) - { - Talk(SAY_AIR_BURST); - DoCast(SelectTarget(SELECT_TARGET_RANDOM, 1), SPELL_AIR_BURST);//not on tank - AirBurstTimer = urand(25000, 40000); - } else AirBurstTimer -= diff; - - if (FearTimer <= diff) - { - DoCastVictim(SPELL_FEAR); - FearTimer = 42000; - } else FearTimer -= diff; - - if (DoomfireTimer <= diff) + void Register() override { - Talk(SAY_DOOMFIRE); - Unit* temp = SelectTarget(SELECT_TARGET_RANDOM, 1); - if (!temp) - temp = me->GetVictim(); - - //replace with spell cast 31903 once implicitTarget 73 implemented - SummonDoomfire(temp); - - //supposedly three doomfire can be up at the same time - DoomfireTimer = 20000; - } else DoomfireTimer -= diff; - - if (MeleeRangeCheckTimer <= diff) - { - if (CanUseFingerOfDeath()) - { - DoCast(SelectTarget(SELECT_TARGET_RANDOM, 0), SPELL_FINGER_OF_DEATH); - MeleeRangeCheckTimer = 1000; - } - - MeleeRangeCheckTimer = 5000; - } else MeleeRangeCheckTimer -= diff; + OnEffectHitTarget += SpellEffectFn(spell_archimonde_drain_world_tree_dummy_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_DUMMY); + } + }; - DoMeleeAttackIfReady(); + SpellScript* GetSpellScript() const override + { + return new spell_archimonde_drain_world_tree_dummy_SpellScript(); } - void WaypointReached(uint32 /*waypointId*/) override { } - }; }; void AddSC_boss_archimonde() @@ -660,4 +575,5 @@ void AddSC_boss_archimonde() new npc_doomfire(); new npc_doomfire_targetting(); new npc_ancient_wisp(); + new spell_archimonde_drain_world_tree_dummy(); } diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.h b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.h index c5f4d4ae679..54a763573ed 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.h +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.h @@ -44,7 +44,8 @@ enum DataTypes DATA_HORDE_RETREAT = 17, DATA_RAIDDAMAGE = 18, DATA_RESET_RAIDDAMAGE = 19, - TYPE_RETREAT = 20 + TYPE_RETREAT = 20, + DATA_CHANNEL_TARGET = 21 }; enum WorldStateIds @@ -77,7 +78,8 @@ enum CreaturesIds KAZROGAL = 17888, AZGALOR = 17842, ARCHIMONDE = 17968, - NPC_WORLD_TRIGGER_TINY = 21987 + NPC_WORLD_TRIGGER_TINY = 21987, + NPC_CHANNEL_TARGET = 22418 }; enum GameobjectIds @@ -89,5 +91,6 @@ enum GameobjectIds GO_ROARING_FLAME = 182592 }; -#endif +#define MINRAIDDAMAGE 700000 // minimal damage before trash can drop loot and reputation, resets if faction leader dies +#endif diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp index c6adbd58c4a..d4b4061aaa8 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp @@ -26,7 +26,6 @@ enum Spells SPELL_METEOR = 33814, //infernal visual SPELL_IMMOLATION = 37059, SPELL_FLAME_BUFFET = 31724, - NPC_TRIGGER = 21987, //World Trigger (Tiny) MODEL_INVIS = 11686, //invisible model SPELL_DISEASE_CLOUD = 31607, SPELL_KNOCKDOWN = 31610, @@ -465,10 +464,7 @@ public: } if (!meteor) { - float x, y, z; - me->GetPosition(x, y, z); - Creature* trigger = me->SummonCreature(NPC_TRIGGER, x + 8, y + 8, z + 25 + rand32() % 10, me->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN, 1000); - if (trigger) + if (Creature* trigger = me->SummonCreature(NPC_WORLD_TRIGGER_TINY, me->GetPositionWithOffset({ 8.0f, 8.0f, frand(25.0f, 35.0f), 0.0f }), TEMPSUMMON_TIMED_DESPAWN, 1000)) { trigger->SetVisible(false); trigger->setFaction(me->getFaction()); diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.h b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.h index 18122ba2b0c..62f82ebcee1 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.h +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.h @@ -21,8 +21,6 @@ #include "hyjal.h" #include "ScriptedEscortAI.h" -#define MINRAIDDAMAGE 700000//minimal damage before trash can drop loot and reputation, resets if faction leader dies - struct hyjal_trashAI : public npc_escortAI { hyjal_trashAI(Creature* creature); diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp index 1d4a728b08b..99b8515c6e8 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp @@ -26,10 +26,7 @@ EndScriptData */ #include "ScriptMgr.h" #include "InstanceScript.h" #include "ScriptedCreature.h" -#include "hyjal_trash.h" -#include "Player.h" -#include "WorldPacket.h" -#include "Chat.h" +#include "hyjal.h" /* Battle of Mount Hyjal encounters: 0 - Rage Winterchill event @@ -39,8 +36,16 @@ EndScriptData */ 4 - Archimonde event */ -#define YELL_EFFORTS "All of your efforts have been in vain, for the draining of the World Tree has already begun. Soon the heart of your world will beat no more." -#define YELL_EFFORTS_NAME "Archimonde" +enum Yells +{ + YELL_ARCHIMONDE_INTRO = 8 +}; + +ObjectData const creatureData[] = +{ + { NPC_CHANNEL_TARGET, DATA_CHANNEL_TARGET }, + { 0, 0 } // END +}; class instance_hyjal : public InstanceMapScript { @@ -57,6 +62,7 @@ public: instance_mount_hyjal_InstanceMapScript(Map* map) : InstanceScript(map) { SetHeaders(DataHeader); + LoadObjectData(creatureData, nullptr); memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); RaidDamage = 0; @@ -104,15 +110,35 @@ public: { switch (creature->GetEntry()) { - case RAGE_WINTERCHILL: RageWinterchill = creature->GetGUID(); break; - case ANETHERON: Anetheron = creature->GetGUID(); break; - case KAZROGAL: Kazrogal = creature->GetGUID(); break; - case AZGALOR: Azgalor = creature->GetGUID(); break; - case ARCHIMONDE: Archimonde = creature->GetGUID(); break; - case JAINA: JainaProudmoore = creature->GetGUID(); break; - case THRALL: Thrall = creature->GetGUID(); break; - case TYRANDE: TyrandeWhisperwind = creature->GetGUID(); break; + case RAGE_WINTERCHILL: + RageWinterchill = creature->GetGUID(); + break; + case ANETHERON: + Anetheron = creature->GetGUID(); + break; + case KAZROGAL: + Kazrogal = creature->GetGUID(); + break; + case AZGALOR: + Azgalor = creature->GetGUID(); + break; + case ARCHIMONDE: + Archimonde = creature->GetGUID(); + if (GetData(DATA_AZGALOREVENT) != DONE) + creature->SetVisible(false); + break; + case JAINA: + JainaProudmoore = creature->GetGUID(); + break; + case THRALL: + Thrall = creature->GetGUID(); + break; + case TYRANDE: + TyrandeWhisperwind = creature->GetGUID(); + break; } + + InstanceScript::OnCreatureCreate(creature); } ObjectGuid GetGuidData(uint32 identifier) const override @@ -146,39 +172,18 @@ public: m_auiEncounter[2] = data; break; case DATA_AZGALOREVENT: + m_auiEncounter[3] = data; + if (data == DONE) { - m_auiEncounter[3] = data; - if (data == DONE) + instance->LoadGrid(5581.49f, -3445.63f); + if (Creature* archimonde = instance->GetCreature(Archimonde)) { - if (ArchiYell) - break; - - ArchiYell = true; + archimonde->SetVisible(true); - Creature* creature = instance->GetCreature(Azgalor); - if (creature) + if (!ArchiYell) { - Creature* unit = creature->SummonCreature(NPC_WORLD_TRIGGER_TINY, creature->GetPositionX(), creature->GetPositionY(), creature->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 10000); - - Map* map = creature->GetMap(); - if (map->IsDungeon() && unit) - { - unit->SetVisible(false); - Map::PlayerList const &PlayerList = map->GetPlayers(); - if (PlayerList.isEmpty()) - return; - - for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) - { - if (Player* player = i->GetSource()) - { - WorldPacket packet; - ChatHandler::BuildChatPacket(packet, CHAT_MSG_MONSTER_YELL, LANG_UNIVERSAL, unit, player, YELL_EFFORTS); - player->SendDirectMessage(&packet); - player->PlayDirectSound(10986, player); - } - } - } + ArchiYell = true; + archimonde->AI()->Talk(YELL_ARCHIMONDE_INTRO); } } } diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp index b84d24d66d3..794496382c2 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp @@ -292,6 +292,7 @@ public: break; } player->CLOSE_GOSSIP_MENU(); + ai->SetDespawnAtFar(false); creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); return true; } diff --git a/src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp b/src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp index 9f5e7bdf29d..d254cbe08fb 100644 --- a/src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp +++ b/src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp @@ -19,12 +19,11 @@ /* ScriptData SDName: Dustwallow_Marsh SD%Complete: 95 -SDComment: Quest support: 11180, 558, 11126, 11142, 11174, Vendor Nat Pagle +SDComment: Quest support: 558, 11126, 11142, 11174, Vendor Nat Pagle SDCategory: Dustwallow Marsh EndScriptData */ /* ContentData -npc_risen_husk_spirit npc_lady_jaina_proudmoore npc_nat_pagle npc_private_hendel @@ -40,99 +39,6 @@ EndContentData */ #include "WorldSession.h" /*###### -## npc_risen_husk_spirit -######*/ - -enum HauntingWitchHill -{ - // Quest - QUEST_WHATS_HAUNTING_WITCH_HILL = 11180, - - // General spells - SPELL_SUMMON_RESTLESS_APPARITION = 42511, - SPELL_WITCH_HILL_INFORMATION_CREDIT = 42512, - - // Risen Husk specific - SPELL_CONSUME_FLESH = 37933, - NPC_RISEN_HUSK = 23555, - - // Risen Spirit specific - SPELL_INTANGIBLE_PRESENCE = 43127, - NPC_RISEN_SPIRIT = 23554, - - // Events - EVENT_CONSUME_FLESH = 1, - EVENT_INTANGIBLE_PRESENCE = 2, -}; - -class npc_risen_husk_spirit : public CreatureScript -{ - public: - npc_risen_husk_spirit() : CreatureScript("npc_risen_husk_spirit") { } - - struct npc_risen_husk_spiritAI : public ScriptedAI - { - npc_risen_husk_spiritAI(Creature* creature) : ScriptedAI(creature) { } - - void Reset() override - { - events.Reset(); - if (me->GetEntry() == NPC_RISEN_HUSK) - events.ScheduleEvent(EVENT_CONSUME_FLESH, 5000); - else if (me->GetEntry() == NPC_RISEN_SPIRIT) - events.ScheduleEvent(EVENT_INTANGIBLE_PRESENCE, 5000); - } - - void JustDied(Unit* killer) override - { - if (killer->GetTypeId() == TYPEID_PLAYER) - { - if (killer->ToPlayer()->GetQuestStatus(QUEST_WHATS_HAUNTING_WITCH_HILL) == QUEST_STATUS_INCOMPLETE) - { - DoCast(me, SPELL_SUMMON_RESTLESS_APPARITION, true); - DoCast(killer, SPELL_WITCH_HILL_INFORMATION_CREDIT, true); - } - } - } - - void UpdateAI(uint32 diff) override - { - if (!UpdateVictim()) - return; - - events.Update(diff); - - while (uint32 eventId = events.ExecuteEvent()) - { - switch (eventId) - { - case EVENT_CONSUME_FLESH: - DoCastVictim(SPELL_CONSUME_FLESH); - events.ScheduleEvent(EVENT_CONSUME_FLESH, 15000); - break; - case EVENT_INTANGIBLE_PRESENCE: - DoCastVictim(SPELL_INTANGIBLE_PRESENCE); - events.ScheduleEvent(EVENT_INTANGIBLE_PRESENCE, 15000); - break; - default: - break; - } - } - - DoMeleeAttackIfReady(); - } - - private: - EventMap events; - }; - - CreatureAI* GetAI(Creature* creature) const override - { - return new npc_risen_husk_spiritAI(creature); - } -}; - -/*###### ## npc_lady_jaina_proudmoore ######*/ @@ -369,131 +275,6 @@ public: }; -/*###### -## npc_stinky -######*/ - -enum Stinky -{ - QUEST_STINKYS_ESCAPE_H = 1270, - QUEST_STINKYS_ESCAPE_A = 1222, - SAY_QUEST_ACCEPTED = 0, - SAY_STAY_1 = 1, - SAY_STAY_2 = 2, - SAY_STAY_3 = 3, - SAY_STAY_4 = 4, - SAY_STAY_5 = 5, - SAY_STAY_6 = 6, - SAY_QUEST_COMPLETE = 7, - SAY_ATTACKED_1 = 8, - EMOTE_DISAPPEAR = 9 -}; - -class npc_stinky : public CreatureScript -{ -public: - npc_stinky() : CreatureScript("npc_stinky") { } - - CreatureAI* GetAI(Creature* creature) const override - { - return new npc_stinkyAI(creature); - } - - bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest) override - { - if (quest->GetQuestId() == QUEST_STINKYS_ESCAPE_H || quest->GetQuestId() == QUEST_STINKYS_ESCAPE_A) - { - if (npc_stinkyAI* pEscortAI = CAST_AI(npc_stinky::npc_stinkyAI, creature->AI())) - { - creature->setFaction(FACTION_ESCORT_N_NEUTRAL_ACTIVE); - creature->SetStandState(UNIT_STAND_STATE_STAND); - creature->AI()->Talk(SAY_QUEST_ACCEPTED); - pEscortAI->Start(false, false, player->GetGUID()); - } - } - return true; - } - - struct npc_stinkyAI : public npc_escortAI - { - npc_stinkyAI(Creature* creature) : npc_escortAI(creature) { } - - void WaypointReached(uint32 waypointId) override - { - Player* player = GetPlayerForEscort(); - if (!player) - return; - - switch (waypointId) - { - case 7: - Talk(SAY_STAY_1, player); - break; - case 11: - Talk(SAY_STAY_2, player); - break; - case 25: - Talk(SAY_STAY_3, player); - break; - case 26: - Talk(SAY_STAY_4, player); - break; - case 27: - Talk(SAY_STAY_5, player); - break; - case 28: - Talk(SAY_STAY_6, player); - me->SetStandState(UNIT_STAND_STATE_KNEEL); - break; - case 29: - me->SetStandState(UNIT_STAND_STATE_STAND); - break; - case 37: - Talk(SAY_QUEST_COMPLETE, player); - me->SetSpeed(MOVE_RUN, 1.2f, true); - me->SetWalk(false); - if (player->GetQuestStatus(QUEST_STINKYS_ESCAPE_H)) - player->GroupEventHappens(QUEST_STINKYS_ESCAPE_H, me); - if (player->GetQuestStatus(QUEST_STINKYS_ESCAPE_A)) - player->GroupEventHappens(QUEST_STINKYS_ESCAPE_A, me); - break; - case 39: - Talk(EMOTE_DISAPPEAR); - break; - } - } - - void EnterCombat(Unit* who) override - { - Talk(SAY_ATTACKED_1, who); - } - - void Reset() override { } - - void JustDied(Unit* /*killer*/) override - { - Player* player = GetPlayerForEscort(); - if (player && HasEscortState(STATE_ESCORT_ESCORTING)) - { - if (player->GetQuestStatus(QUEST_STINKYS_ESCAPE_H)) - player->FailQuest(QUEST_STINKYS_ESCAPE_H); - - if (player->GetQuestStatus(QUEST_STINKYS_ESCAPE_A)) - player->FailQuest(QUEST_STINKYS_ESCAPE_A); - } - } - - void UpdateAI(uint32 uiDiff) override - { - npc_escortAI::UpdateAI(uiDiff); - - if (!UpdateVictim()) - return; - - DoMeleeAttackIfReady(); - } - }; -}; enum SpellScripts { @@ -634,46 +415,13 @@ class spell_energize_aoe : public SpellScriptLoader } }; -/*###### -## go_blackhoof_cage -######*/ - -enum PrisonersOfTheGrimTotems -{ - NPC_THERAMORE_PRISONER = 23720, - SAY_FREE = 0, -}; - -class go_blackhoof_cage : public GameObjectScript -{ -public: - go_blackhoof_cage() : GameObjectScript("go_blackhoof_cage") { } - - bool OnGossipHello(Player* player, GameObject* go) override - { - go->UseDoorOrButton(); - if (Creature* prisoner = go->FindNearestCreature(NPC_THERAMORE_PRISONER, 1.0f)) - { - if (player) - player->KilledMonsterCredit(NPC_THERAMORE_PRISONER); - - prisoner->AI()->Talk(SAY_FREE); // We also emote cry here (handled in creature_text.emote) - prisoner->DespawnOrUnsummon(6000); - } - return true; - } -}; - void AddSC_dustwallow_marsh() { - new npc_risen_husk_spirit(); new npc_lady_jaina_proudmoore(); new npc_nat_pagle(); new npc_private_hendel(); new npc_zelfrax(); - new npc_stinky(); new spell_ooze_zap(); new spell_ooze_zap_channel_end(); new spell_energize_aoe(); - new go_blackhoof_cage(); } diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp index a5978d8f8fa..a3d23108038 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp @@ -364,7 +364,7 @@ class NecroticPlagueTargetCheck : public std::unary_function<Unit*, bool> bool operator()(Unit* unit) const { - if (!unit || unit == _sourceObj || !unit->isTargetableForAttack() || unit->IsTotem() || unit->HasAura(SPELL_PLAGUE_AVOIDANCE)) + if (!unit || unit == _sourceObj || !unit->isTargetableForAttack() || unit->GetTypeId() != TYPEID_PLAYER || unit->HasAura(SPELL_PLAGUE_AVOIDANCE)) return false; if ((_notAura1 && unit->HasAura(_notAura1)) || (_notAura2 && unit->HasAura(_notAura2))) return false; diff --git a/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp b/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp index 6fe7bb30056..7292850bef1 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp @@ -30,26 +30,23 @@ EndScriptData */ #include "naxxramas.h" #include "Player.h" -enum Yells +enum Texts { - //when shappiron dies. dialog between kel and lich king (in this order) - SAY_SAPP_DIALOG1 = 0, //not used - SAY_SAPP_DIALOG2_LICH = 1, //not used - SAY_SAPP_DIALOG3 = 2, //not used - SAY_SAPP_DIALOG4_LICH = 3, //not used - SAY_SAPP_DIALOG5 = 4, //not used - SAY_CAT_DIED = 5, //when cat dies, not used - //when each of the 4 wing bosses dies - SAY_TAUNT = 6, SAY_AGGRO = 7, SAY_SLAY = 8, SAY_DEATH = 9, SAY_CHAIN = 10, SAY_FROST_BLAST = 11, SAY_REQUEST_AID = 12, //start of phase 3 - SAY_ANSWER_REQUEST = 13, //lich king answer + EMOTE_PHASE_TWO = 13, SAY_SUMMON_MINIONS = 14, //start of phase 1 - SAY_SPECIAL = 15 + SAY_SPECIAL = 15, + + // The Lich King + SAY_ANSWER_REQUEST = 3, + + // Old World Trigger + SAY_GUARDIAN_SPAWNED = 0 }; enum Events @@ -70,7 +67,10 @@ enum Events EVENT_TRIGGER, EVENT_PHASE, - EVENT_MORTAL_WOUND + EVENT_MORTAL_WOUND, + + EVENT_ANSWER_REQUEST, + EVENT_SUMMON_GUARDIANS }; enum Spells @@ -123,6 +123,13 @@ enum Spells SPELL_MORTAL_WOUND = 28467 }; +enum Phases +{ + PHASE_ONE = 1, // Players move in the circle and Kel'Thuzad spawns his minions. + PHASE_TWO = 2, // Starts on a timer. + PHASE_THREE = 3 // At 45% health. +}; + enum Creatures { NPC_WASTE = 16427, // Soldiers of the Frozen Wastes @@ -270,15 +277,11 @@ public: void Initialize() { nGuardiansOfIcecrownCount = 0; - uiGuardiansOfIcecrownTimer = 5000; // 5 seconds for summoning each Guardian of Icecrown in phase 3 - Phase = 0; nAbomination = 0; nWeaver = 0; } - uint32 Phase; - uint32 uiGuardiansOfIcecrownTimer; uint32 uiFaction; uint8 nGuardiansOfIcecrownCount; @@ -345,7 +348,6 @@ public: void EnterCombat(Unit* /*who*/) override { me->setFaction(uiFaction); - _EnterCombat(); for (uint8 i = 0; i <= 3; ++i) { @@ -354,10 +356,10 @@ public: } DoCast(me, SPELL_KELTHUZAD_CHANNEL, false); Talk(SAY_SUMMON_MINIONS); - Phase = 1; me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_NOT_SELECTABLE); me->SetFloatValue(UNIT_FIELD_COMBATREACH, 4); me->SetFloatValue(UNIT_FIELD_BOUNDINGRADIUS, 4); + events.SetPhase(PHASE_ONE); events.ScheduleEvent(EVENT_TRIGGER, 5000); events.ScheduleEvent(EVENT_WASTE, 15000); events.ScheduleEvent(EVENT_ABOMIN, 30000); @@ -365,6 +367,23 @@ public: events.ScheduleEvent(EVENT_PHASE, 228000); } + void DamageTaken(Unit* /*attacker*/, uint32& damage) override + { + if (events.IsInPhase(PHASE_TWO) && me->HealthBelowPctDamaged(45, damage)) + { + Talk(SAY_REQUEST_AID); + events.SetPhase(PHASE_THREE); + events.ScheduleEvent(EVENT_ANSWER_REQUEST, 4000); + + for (uint8 i = 0; i <= 3; ++i) + { + if (GameObject* portal = ObjectAccessor::GetGameObject(*me, instance->GetGuidData(DATA_KELTHUZAD_PORTAL01 + i))) + if (portal->getLootState() == GO_READY) + portal->UseDoorOrButton(); + } + } + } + void UpdateAI(uint32 diff) override { if (!UpdateVictim()) @@ -372,7 +391,7 @@ public: events.Update(diff); - if (Phase == 1) + if (events.IsInPhase(PHASE_ONE)) { while (uint32 eventId = events.ExecuteEvent()) { @@ -405,6 +424,7 @@ public: case EVENT_PHASE: events.Reset(); Talk(SAY_AGGRO); + Talk(EMOTE_PHASE_TWO); spawns.DespawnAll(); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_NOT_SELECTABLE); me->CastStop(); @@ -417,7 +437,7 @@ public: events.ScheduleEvent(EVENT_BLAST, urand(60000, 120000)); if (GetDifficulty() == RAID_DIFFICULTY_25MAN_NORMAL) events.ScheduleEvent(EVENT_CHAIN, urand(30000, 60000)); - Phase = 2; + events.SetPhase(PHASE_TWO); break; default: break; @@ -426,38 +446,6 @@ public: } else { - //start phase 3 when we are 45% health - if (Phase != 3) - { - if (HealthBelowPct(45)) - { - Phase = 3; - Talk(SAY_REQUEST_AID); - //here Lich King should respond to KelThuzad but I don't know which Creature to make talk - //so for now just make Kelthuzad says it. - Talk(SAY_ANSWER_REQUEST); - - for (uint8 i = 0; i <= 3; ++i) - { - if (GameObject* portal = ObjectAccessor::GetGameObject(*me, instance->GetGuidData(DATA_KELTHUZAD_PORTAL01 + i))) - if (portal->getLootState() == GO_READY) - portal->UseDoorOrButton(); - } - } - } - else if (nGuardiansOfIcecrownCount < RAID_MODE(2, 4)) - { - if (uiGuardiansOfIcecrownTimer <= diff) - { - /// @todo Add missing text - if (Creature* guardian = DoSummon(NPC_ICECROWN, Pos[RAND(2, 5, 8, 11)])) - guardian->SetFloatValue(UNIT_FIELD_COMBATREACH, 2); - ++nGuardiansOfIcecrownCount; - uiGuardiansOfIcecrownTimer = 5000; - } - else uiGuardiansOfIcecrownTimer -= diff; - } - if (me->HasUnitState(UNIT_STATE_CASTING)) return; @@ -609,6 +597,18 @@ public: Talk(SAY_FROST_BLAST); events.Repeat(30000, 90000); break; + case EVENT_ANSWER_REQUEST: + if (Creature* lichKing = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_LICH_KING))) + lichKing->AI()->Talk(SAY_ANSWER_REQUEST); + events.ScheduleEvent(EVENT_SUMMON_GUARDIANS, 5000); + break; + case EVENT_SUMMON_GUARDIANS: + if (Creature* guardian = DoSummon(NPC_ICECROWN, Pos[RAND(2, 5, 8, 11)])) + guardian->SetFloatValue(UNIT_FIELD_COMBATREACH, 2); + ++nGuardiansOfIcecrownCount; + if (nGuardiansOfIcecrownCount < RAID_MODE(2, 4)) + events.ScheduleEvent(EVENT_SUMMON_GUARDIANS, 5000); + break; default: break; } diff --git a/src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp b/src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp index 4151c4a85a7..e5895d78ab3 100644 --- a/src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp +++ b/src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp @@ -69,6 +69,15 @@ MinionData const minionData[] = { 0, 0, } }; +ObjectData const objectData[] = +{ + { GO_NAXX_PORTAL_ARACHNID, DATA_NAXX_PORTAL_ARACHNID }, + { GO_NAXX_PORTAL_CONSTRUCT, DATA_NAXX_PORTAL_CONSTRUCT }, + { GO_NAXX_PORTAL_PLAGUE, DATA_NAXX_PORTAL_PLAGUE }, + { GO_NAXX_PORTAL_MILITARY, DATA_NAXX_PORTAL_MILITARY }, + { 0, 0, } +}; + float const HeiganPos[2] = { 2796.0f, -3707.0f }; float const HeiganEruptionSlope[3] = { @@ -111,10 +120,12 @@ class instance_naxxramas : public InstanceMapScript SetBossNumber(EncounterCount); LoadDoorData(doorData); LoadMinionData(minionData); + LoadObjectData(nullptr, objectData); minHorsemenDiedTime = 0; maxHorsemenDiedTime = 0; AbominationCount = 0; + CurrentWingTaunt = SAY_KELTHUZAD_FIRST_WING_TAUNT; playerDied = 0; } @@ -156,6 +167,9 @@ class instance_naxxramas : public InstanceMapScript case NPC_KEL_THUZAD: KelthuzadGUID = creature->GetGUID(); break; + case NPC_LICH_KING: + LichKingGUID = creature->GetGUID(); + break; default: break; } @@ -201,11 +215,30 @@ class instance_naxxramas : public InstanceMapScript case GO_KELTHUZAD_TRIGGER: KelthuzadTriggerGUID = go->GetGUID(); break; + case GO_ROOM_KELTHUZAD: + KelthuzadDoorGUID = go->GetGUID(); + break; + case GO_NAXX_PORTAL_ARACHNID: + if (GetBossState(BOSS_MAEXXNA) == DONE) + go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); + break; + case GO_NAXX_PORTAL_CONSTRUCT: + if (GetBossState(BOSS_THADDIUS) == DONE) + go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); + break; + case GO_NAXX_PORTAL_PLAGUE: + if (GetBossState(BOSS_LOATHEB) == DONE) + go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); + break; + case GO_NAXX_PORTAL_MILITARY: + if (GetBossState(BOSS_HORSEMEN) == DONE) + go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); + break; default: break; } - AddDoor(go, true); + InstanceScript::OnGameObjectCreate(go); } void OnGameObjectRemove(GameObject* go) override @@ -232,7 +265,7 @@ class instance_naxxramas : public InstanceMapScript break; } - AddDoor(go, false); + InstanceScript::OnGameObjectRemove(go); } void OnUnitDeath(Unit* unit) override @@ -242,6 +275,15 @@ class instance_naxxramas : public InstanceMapScript playerDied = 1; SaveToDB(); } + + if (Creature* creature = unit->ToCreature()) + if (creature->GetEntry() == NPC_BIGGLESWORTH) + { + // Loads Kel'Thuzad's grid. We need this as he must be active in order for his texts to work. + instance->LoadGrid(3749.67f, -5114.06f); + if (Creature* kelthuzad = instance->GetCreature(KelthuzadGUID)) + kelthuzad->AI()->Talk(SAY_KELTHUZAD_CAT_DIED); + } } void SetData(uint32 id, uint32 value) override @@ -327,6 +369,8 @@ class instance_naxxramas : public InstanceMapScript return PortalsGUID[3]; case DATA_KELTHUZAD_TRIGGER: return KelthuzadTriggerGUID; + case DATA_LICH_KING: + return LichKingGUID; } return ObjectGuid::Empty; @@ -337,18 +381,156 @@ class instance_naxxramas : public InstanceMapScript if (!InstanceScript::SetBossState(id, state)) return false; - if (id == BOSS_HORSEMEN && state == DONE) + switch (id) { - if (GameObject* horsemenChest = instance->GetGameObject(HorsemenChestGUID)) - { - horsemenChest->SetRespawnTime(horsemenChest->GetRespawnDelay()); - horsemenChest->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); - } + case BOSS_MAEXXNA: + if (state == DONE) + { + if (GameObject* teleporter = GetGameObject(DATA_NAXX_PORTAL_ARACHNID)) + teleporter->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); + + events.ScheduleEvent(EVENT_KELTHUZAD_WING_TAUNT, 6000); + } + break; + case BOSS_LOATHEB: + if (state == DONE) + { + if (GameObject* teleporter = GetGameObject(DATA_NAXX_PORTAL_PLAGUE)) + teleporter->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); + + events.ScheduleEvent(EVENT_KELTHUZAD_WING_TAUNT, 6000); + } + break; + case BOSS_THADDIUS: + if (state == DONE) + { + if (GameObject* teleporter = GetGameObject(DATA_NAXX_PORTAL_CONSTRUCT)) + teleporter->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); + + events.ScheduleEvent(EVENT_KELTHUZAD_WING_TAUNT, 6000); + } + break; + case BOSS_GOTHIK: + if (state == DONE) + events.ScheduleEvent(EVENT_DIALOGUE_GOTHIK_KORTHAZZ, 10000); + break; + case BOSS_HORSEMEN: + if (state == DONE) + { + if (GameObject* horsemenChest = instance->GetGameObject(HorsemenChestGUID)) + { + horsemenChest->SetRespawnTime(horsemenChest->GetRespawnDelay()); + horsemenChest->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); + } + + if (GameObject* teleporter = GetGameObject(DATA_NAXX_PORTAL_MILITARY)) + teleporter->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); + + events.ScheduleEvent(EVENT_KELTHUZAD_WING_TAUNT, 6000); + } + break; + case BOSS_SAPPHIRON: + if (state == DONE) + events.ScheduleEvent(EVENT_DIALOGUE_SAPPHIRON_KELTHUZAD, 6000); + break; + default: + break; } return true; } + void Update(uint32 diff) override + { + events.Update(diff); + + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_DIALOGUE_GOTHIK_KORTHAZZ: + if (Creature* korthazz = instance->GetCreature(ThaneGUID)) + korthazz->AI()->Talk(SAY_DIALOGUE_GOTHIK_HORSEMAN); + events.ScheduleEvent(EVENT_DIALOGUE_GOTHIK_ZELIEK, 5000); + break; + case EVENT_DIALOGUE_GOTHIK_ZELIEK: + if (Creature* zeliek = instance->GetCreature(SirGUID)) + zeliek->AI()->Talk(SAY_DIALOGUE_GOTHIK_HORSEMAN); + events.ScheduleEvent(EVENT_DIALOGUE_GOTHIK_BLAUMEUX, 6000); + break; + case EVENT_DIALOGUE_GOTHIK_BLAUMEUX: + if (Creature* blaumeux = instance->GetCreature(LadyGUID)) + blaumeux->AI()->Talk(SAY_DIALOGUE_GOTHIK_HORSEMAN); + events.ScheduleEvent(EVENT_DIALOGUE_GOTHIK_RIVENDARE, 6000); + break; + case EVENT_DIALOGUE_GOTHIK_RIVENDARE: + if (Creature* rivendare = instance->GetCreature(BaronGUID)) + rivendare->AI()->Talk(SAY_DIALOGUE_GOTHIK_HORSEMAN); + events.ScheduleEvent(EVENT_DIALOGUE_GOTHIK_BLAUMEUX2, 6000); + break; + case EVENT_DIALOGUE_GOTHIK_BLAUMEUX2: + if (Creature* blaumeux = instance->GetCreature(LadyGUID)) + blaumeux->AI()->Talk(SAY_DIALOGUE_GOTHIK_HORSEMAN2); + events.ScheduleEvent(EVENT_DIALOGUE_GOTHIK_ZELIEK2, 6000); + break; + case EVENT_DIALOGUE_GOTHIK_ZELIEK2: + if (Creature* zeliek = instance->GetCreature(SirGUID)) + zeliek->AI()->Talk(SAY_DIALOGUE_GOTHIK_HORSEMAN2); + events.ScheduleEvent(EVENT_DIALOGUE_GOTHIK_KORTHAZZ2, 6000); + break; + case EVENT_DIALOGUE_GOTHIK_KORTHAZZ2: + if (Creature* korthazz = instance->GetCreature(ThaneGUID)) + korthazz->AI()->Talk(SAY_DIALOGUE_GOTHIK_HORSEMAN2); + events.ScheduleEvent(EVENT_DIALOGUE_GOTHIK_RIVENDARE2, 6000); + break; + case EVENT_DIALOGUE_GOTHIK_RIVENDARE2: + if (Creature* rivendare = instance->GetCreature(BaronGUID)) + rivendare->AI()->Talk(SAY_DIALOGUE_GOTHIK_HORSEMAN2); + break; + case EVENT_KELTHUZAD_WING_TAUNT: + // Loads Kel'Thuzad's grid. We need this as he must be active in order for his texts to work. + instance->LoadGrid(3749.67f, -5114.06f); + if (Creature* kelthuzad = instance->GetCreature(KelthuzadGUID)) + kelthuzad->AI()->Talk(CurrentWingTaunt); + ++CurrentWingTaunt; + break; + case EVENT_DIALOGUE_SAPPHIRON_KELTHUZAD: + if (Creature* kelthuzad = instance->GetCreature(KelthuzadGUID)) + kelthuzad->AI()->Talk(SAY_DIALOGUE_SAPPHIRON_KELTHUZAD); + HandleGameObject(KelthuzadDoorGUID, false); + events.ScheduleEvent(EVENT_DIALOGUE_SAPPHIRON_LICHKING, 6000); + break; + case EVENT_DIALOGUE_SAPPHIRON_LICHKING: + if (Creature* lichKing = instance->GetCreature(LichKingGUID)) + lichKing->AI()->Talk(SAY_DIALOGUE_SAPPHIRON_LICH_KING); + events.ScheduleEvent(EVENT_DIALOGUE_SAPPHIRON_KELTHUZAD2, 16000); + break; + case EVENT_DIALOGUE_SAPPHIRON_KELTHUZAD2: + if (Creature* kelthuzad = instance->GetCreature(KelthuzadGUID)) + kelthuzad->AI()->Talk(SAY_DIALOGUE_SAPPHIRON_KELTHUZAD2); + events.ScheduleEvent(EVENT_DIALOGUE_SAPPHIRON_LICHKING2, 9000); + break; + case EVENT_DIALOGUE_SAPPHIRON_LICHKING2: + if (Creature* lichKing = instance->GetCreature(LichKingGUID)) + lichKing->AI()->Talk(SAY_DIALOGUE_SAPPHIRON_LICH_KING2); + events.ScheduleEvent(EVENT_DIALOGUE_SAPPHIRON_KELTHUZAD3, 12000); + break; + case EVENT_DIALOGUE_SAPPHIRON_KELTHUZAD3: + if (Creature* kelthuzad = instance->GetCreature(KelthuzadGUID)) + kelthuzad->AI()->Talk(SAY_DIALOGUE_SAPPHIRON_KELTHUZAD3); + events.ScheduleEvent(EVENT_DIALOGUE_SAPPHIRON_KELTHUZAD4, 6000); + break; + case EVENT_DIALOGUE_SAPPHIRON_KELTHUZAD4: + if (Creature* kelthuzad = instance->GetCreature(KelthuzadGUID)) + kelthuzad->AI()->Talk(SAY_DIALOGUE_SAPPHIRON_KELTHUZAD4); + HandleGameObject(KelthuzadDoorGUID, true); + break; + default: + break; + } + } + } + void HeiganErupt(uint32 section) { for (uint32 i = 0; i < 4; ++i) @@ -450,10 +632,15 @@ class instance_naxxramas : public InstanceMapScript ObjectGuid KelthuzadGUID; ObjectGuid KelthuzadTriggerGUID; ObjectGuid PortalsGUID[4]; + ObjectGuid KelthuzadDoorGUID; + ObjectGuid LichKingGUID; uint8 AbominationCount; + uint8 CurrentWingTaunt; /* The Immortal / The Undying */ uint32 playerDied; + + EventMap events; }; InstanceScript* GetInstanceScript(InstanceMap* map) const override diff --git a/src/server/scripts/Northrend/Naxxramas/naxxramas.h b/src/server/scripts/Northrend/Naxxramas/naxxramas.h index 8325271a403..0f710a66bbe 100644 --- a/src/server/scripts/Northrend/Naxxramas/naxxramas.h +++ b/src/server/scripts/Northrend/Naxxramas/naxxramas.h @@ -52,6 +52,11 @@ enum Data DATA_HORSEMEN2, DATA_HORSEMEN3, DATA_ABOMINATION_KILLED, + + DATA_NAXX_PORTAL_ARACHNID, + DATA_NAXX_PORTAL_CONSTRUCT, + DATA_NAXX_PORTAL_PLAGUE, + DATA_NAXX_PORTAL_MILITARY }; enum Data64 @@ -71,6 +76,7 @@ enum Data64 DATA_KELTHUZAD_PORTAL03, DATA_KELTHUZAD_PORTAL04, DATA_KELTHUZAD_TRIGGER, + DATA_LICH_KING }; enum CreaturesIds @@ -89,7 +95,10 @@ enum CreaturesIds NPC_CRYPT_GUARD = 16573, NPC_NAXXRAMAS_FOLLOWER = 16505, NPC_FOLLOWER_WORSHIPPER = 16506, - NPC_DK_UNDERSTUDY = 16803 + NPC_DK_UNDERSTUDY = 16803, + NPC_BIGGLESWORTH = 16998, + NPC_LICH_KING = 16980, + NPC_OLD_WORLD_TRIGGER = 15384 }; enum GameObjectsIds @@ -133,7 +142,13 @@ enum GameObjectsIds GO_CONS_EYE_RAMP_BOSS = 181232, GO_CONS_NOX_TESLA_FEUGEN = 181477, GO_CONS_NOX_TESLA_STALAGG = 181478, - GO_BIRTH = 181356 + GO_BIRTH = 181356, + + // Teleporting pads spawned by the end of every quarter. + GO_NAXX_PORTAL_ARACHNID = 181575, + GO_NAXX_PORTAL_CONSTRUCT = 181576, + GO_NAXX_PORTAL_PLAGUE = 181577, + GO_NAXX_PORTAL_MILITARY = 181578 }; enum SpellIds @@ -142,6 +157,50 @@ enum SpellIds SPELL_SLIME = 28801 }; +enum InstanceEvents +{ + // Dialogue that happens after Gothik's death. + EVENT_DIALOGUE_GOTHIK_KORTHAZZ = 1, + EVENT_DIALOGUE_GOTHIK_ZELIEK, + EVENT_DIALOGUE_GOTHIK_BLAUMEUX, + EVENT_DIALOGUE_GOTHIK_RIVENDARE, + EVENT_DIALOGUE_GOTHIK_BLAUMEUX2, + EVENT_DIALOGUE_GOTHIK_ZELIEK2, + EVENT_DIALOGUE_GOTHIK_KORTHAZZ2, + EVENT_DIALOGUE_GOTHIK_RIVENDARE2, + + // Dialogue that happens after each wing. + EVENT_KELTHUZAD_WING_TAUNT, + + // Dialogue that happens after Sapphiron's death. + EVENT_DIALOGUE_SAPPHIRON_KELTHUZAD, + EVENT_DIALOGUE_SAPPHIRON_LICHKING, + EVENT_DIALOGUE_SAPPHIRON_KELTHUZAD2, + EVENT_DIALOGUE_SAPPHIRON_LICHKING2, + EVENT_DIALOGUE_SAPPHIRON_KELTHUZAD3, + EVENT_DIALOGUE_SAPPHIRON_KELTHUZAD4 +}; + +enum InstanceTexts +{ + // The Four Horsemen + SAY_DIALOGUE_GOTHIK_HORSEMAN = 5, + SAY_DIALOGUE_GOTHIK_HORSEMAN2 = 6, + + // Kel'Thuzad + SAY_DIALOGUE_SAPPHIRON_KELTHUZAD = 0, + SAY_DIALOGUE_SAPPHIRON_KELTHUZAD2 = 2, + SAY_DIALOGUE_SAPPHIRON_KELTHUZAD3 = 4, + SAY_DIALOGUE_SAPPHIRON_KELTHUZAD4 = 20, + + SAY_KELTHUZAD_CAT_DIED = 5, + SAY_KELTHUZAD_FIRST_WING_TAUNT = 16, + + // Lich King + SAY_DIALOGUE_SAPPHIRON_LICH_KING = 1, + SAY_DIALOGUE_SAPPHIRON_LICH_KING2 = 2 +}; + /* template<class AI> CreatureAI* GetNaxxramasAI(Creature* creature) diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp index ed08296acd8..dac06186dff 100644 --- a/src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp +++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp @@ -100,21 +100,21 @@ class boss_anomalus : public CreatureScript { Initialize(); - instance->SetData(DATA_ANOMALUS_EVENT, NOT_STARTED); + instance->SetBossState(DATA_ANOMALUS, NOT_STARTED); } void EnterCombat(Unit* /*who*/) override { Talk(SAY_AGGRO); - instance->SetData(DATA_ANOMALUS_EVENT, IN_PROGRESS); + instance->SetBossState(DATA_ANOMALUS, IN_PROGRESS); } void JustDied(Unit* /*killer*/) override { Talk(SAY_DEATH); - instance->SetData(DATA_ANOMALUS_EVENT, DONE); + instance->SetBossState(DATA_ANOMALUS, DONE); } uint32 GetData(uint32 type) const override diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp index 6b3df5ef665..a8ffb1d542e 100644 --- a/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp +++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp @@ -101,7 +101,7 @@ public: RemovePrison(CheckContainmentSpheres()); - instance->SetData(DATA_KERISTRASZA_EVENT, NOT_STARTED); + instance->SetBossState(DATA_KERISTRASZA, NOT_STARTED); } void EnterCombat(Unit* /*who*/) override @@ -109,14 +109,14 @@ public: Talk(SAY_AGGRO); DoCastAOE(SPELL_INTENSE_COLD); - instance->SetData(DATA_KERISTRASZA_EVENT, IN_PROGRESS); + instance->SetBossState(DATA_KERISTRASZA, IN_PROGRESS); } void JustDied(Unit* /*killer*/) override { Talk(SAY_DEATH); - instance->SetData(DATA_KERISTRASZA_EVENT, DONE); + instance->SetBossState(DATA_KERISTRASZA, DONE); } void KilledUnit(Unit* who) override diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp index 8c58a65cdbe..1df5f5eac8f 100644 --- a/src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp +++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp @@ -31,7 +31,9 @@ enum Spells SPELL_FIRE_MAGUS_VISUAL = 47705, SPELL_FROST_MAGUS_VISUAL = 47706, - SPELL_ARCANE_MAGUS_VISUAL = 47704 + SPELL_ARCANE_MAGUS_VISUAL = 47704, + + SPELL_WEAR_CHRISTMAS_HAT = 61400 }; enum Creatures @@ -53,7 +55,9 @@ enum Yells enum Misc { ACTION_MAGUS_DEAD = 1, - DATA_SPLIT_PERSONALITY = 2 + DATA_SPLIT_PERSONALITY = 2, + + GAME_EVENT_WINTER_VEIL = 2, }; const Position CenterOfRoom = {504.80f, 89.07f, -16.12f, 6.27f}; @@ -128,21 +132,24 @@ public: me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); me->SetVisible(true); - instance->SetData(DATA_MAGUS_TELESTRA_EVENT, NOT_STARTED); + instance->SetBossState(DATA_MAGUS_TELESTRA, NOT_STARTED); + + if (IsHeroic() && sGameEventMgr->IsActiveEvent(GAME_EVENT_WINTER_VEIL) && !me->HasAura(SPELL_WEAR_CHRISTMAS_HAT)) + me->AddAura(SPELL_WEAR_CHRISTMAS_HAT, me); } void EnterCombat(Unit* /*who*/) override { Talk(SAY_AGGRO); - instance->SetData(DATA_MAGUS_TELESTRA_EVENT, IN_PROGRESS); + instance->SetBossState(DATA_MAGUS_TELESTRA, IN_PROGRESS); } void JustDied(Unit* /*killer*/) override { Talk(SAY_DEATH); - instance->SetData(DATA_MAGUS_TELESTRA_EVENT, DONE); + instance->SetBossState(DATA_MAGUS_TELESTRA, DONE); } void KilledUnit(Unit* who) override diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp index 84523c1864d..f065f0679fc 100644 --- a/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp +++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp @@ -68,7 +68,7 @@ public: struct boss_ormorokAI : public BossAI { - boss_ormorokAI(Creature* creature) : BossAI(creature, DATA_ORMOROK_EVENT) + boss_ormorokAI(Creature* creature) : BossAI(creature, DATA_ORMOROK) { Initialize(); } @@ -95,8 +95,6 @@ public: events.ScheduleEvent(EVENT_CRYSTALLINE_TANGLER, 17000); Talk(SAY_AGGRO); - - instance->SetData(DATA_ORMOROK_EVENT, IN_PROGRESS); } void DamageTaken(Unit* /*attacker*/, uint32& /*damage*/) override @@ -112,10 +110,7 @@ public: void JustDied(Unit* /*killer*/) override { _JustDied(); - Talk(SAY_DEATH); - - instance->SetData(DATA_ORMOROK_EVENT, DONE); } void KilledUnit(Unit* who) override @@ -138,27 +133,27 @@ public: { switch (eventId) { - case EVENT_TRAMPLE: - DoCast(me, SPELL_TRAMPLE); - events.ScheduleEvent(EVENT_TRAMPLE, 10000); - break; - case EVENT_SPELL_REFLECTION: - Talk(SAY_REFLECT); - DoCast(me, SPELL_SPELL_REFLECTION); - events.ScheduleEvent(EVENT_SPELL_REFLECTION, 30000); - break; - case EVENT_CRYSTAL_SPIKES: - Talk(SAY_CRYSTAL_SPIKES); - DoCast(SPELL_CRYSTAL_SPIKES); - events.ScheduleEvent(EVENT_CRYSTAL_SPIKES, 12000); - break; - case EVENT_CRYSTALLINE_TANGLER: - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, OrmorokTanglerPredicate(me))) - DoCast(target, SPELL_SUMMON_CRYSTALLINE_TANGLER); - events.ScheduleEvent(EVENT_CRYSTALLINE_TANGLER, 17000); - break; - default: - break; + case EVENT_TRAMPLE: + DoCast(me, SPELL_TRAMPLE); + events.ScheduleEvent(EVENT_TRAMPLE, 10000); + break; + case EVENT_SPELL_REFLECTION: + Talk(SAY_REFLECT); + DoCast(me, SPELL_SPELL_REFLECTION); + events.ScheduleEvent(EVENT_SPELL_REFLECTION, 30000); + break; + case EVENT_CRYSTAL_SPIKES: + Talk(SAY_CRYSTAL_SPIKES); + DoCast(SPELL_CRYSTAL_SPIKES); + events.ScheduleEvent(EVENT_CRYSTAL_SPIKES, 12000); + break; + case EVENT_CRYSTALLINE_TANGLER: + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, OrmorokTanglerPredicate(me))) + DoCast(target, SPELL_SUMMON_CRYSTALLINE_TANGLER); + events.ScheduleEvent(EVENT_CRYSTALLINE_TANGLER, 17000); + break; + default: + break; } } diff --git a/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp b/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp index b7f2e23616b..b3b2cdd540f 100644 --- a/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp +++ b/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp @@ -18,10 +18,8 @@ #include "ScriptMgr.h" #include "InstanceScript.h" -#include "nexus.h" #include "Player.h" - -#define NUMBER_OF_ENCOUNTERS 4 +#include "nexus.h" enum Factions { @@ -30,229 +28,163 @@ enum Factions class instance_nexus : public InstanceMapScript { -public: - instance_nexus() : InstanceMapScript("instance_nexus", 576) { } - - InstanceScript* GetInstanceScript(InstanceMap* map) const override - { - return new instance_nexus_InstanceMapScript(map); - } + public: + instance_nexus() : InstanceMapScript(NexusScriptName, 576) { } - struct instance_nexus_InstanceMapScript : public InstanceScript - { - instance_nexus_InstanceMapScript(Map* map) : InstanceScript(map) + struct instance_nexus_InstanceMapScript : public InstanceScript { - SetHeaders(DataHeader); - memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); - } - - uint32 m_auiEncounter[NUMBER_OF_ENCOUNTERS]; - - ObjectGuid Anomalus; - ObjectGuid Keristrasza; - - ObjectGuid AnomalusContainmentSphere; - ObjectGuid OrmoroksContainmentSphere; - ObjectGuid TelestrasContainmentSphere; - - std::string strInstData; - - void OnCreatureCreate(Creature* creature) override - { - Map::PlayerList const &players = instance->GetPlayers(); - uint32 TeamInInstance = 0; - - if (!players.isEmpty()) + instance_nexus_InstanceMapScript(Map* map) : InstanceScript(map) { - if (Player* player = players.begin()->GetSource()) - TeamInInstance = player->GetTeam(); + SetHeaders(DataHeader); + SetBossNumber(EncounterCount); + _teamInInstance = 0; } - switch (creature->GetEntry()) + + void OnPlayerEnter(Player* player) override { - case 26763: - Anomalus = creature->GetGUID(); - break; - case 26723: - Keristrasza = creature->GetGUID(); - break; - // Alliance npcs are spawned by default, if you are alliance, you will fight against horde npcs. - case 26800: - { - if (ServerAllowsTwoSideGroups()) - creature->setFaction(FACTION_HOSTILE_FOR_ALL); - if (TeamInInstance == ALLIANCE) - creature->UpdateEntry(26799); - break; - } - case 26802: - { - if (ServerAllowsTwoSideGroups()) - creature->setFaction(FACTION_HOSTILE_FOR_ALL); - if (TeamInInstance == ALLIANCE) - creature->UpdateEntry(26801); - break; - } - case 26805: - { - if (ServerAllowsTwoSideGroups()) - creature->setFaction(FACTION_HOSTILE_FOR_ALL); - if (TeamInInstance == ALLIANCE) - creature->UpdateEntry(26803); - break; - } - case 27949: - { - if (ServerAllowsTwoSideGroups()) - creature->setFaction(FACTION_HOSTILE_FOR_ALL); - if (TeamInInstance == ALLIANCE) - creature->UpdateEntry(27947); - break; - } - case 26796: - { - if (ServerAllowsTwoSideGroups()) - creature->setFaction(FACTION_HOSTILE_FOR_ALL); - if (TeamInInstance == ALLIANCE) - creature->UpdateEntry(26798); - break; - } + if (!_teamInInstance) + _teamInInstance = player->GetTeam(); } - } - void OnGameObjectCreate(GameObject* go) override - { - switch (go->GetEntry()) + void OnCreatureCreate(Creature* creature) override { - case 188527: - { - AnomalusContainmentSphere = go->GetGUID(); - if (m_auiEncounter[1] == DONE) - go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); - break; - } - case 188528: - { - OrmoroksContainmentSphere = go->GetGUID(); - if (m_auiEncounter[2] == DONE) - go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); - break; - } - case 188526: + switch (creature->GetEntry()) { - TelestrasContainmentSphere = go->GetGUID(); - if (m_auiEncounter[0] == DONE) - go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); - break; + case NPC_ANOMALUS: + AnomalusGUID = creature->GetGUID(); + break; + case NPC_KERISTRASZA: + KeristraszaGUID = creature->GetGUID(); + break; + // Alliance npcs are spawned by default, if you are alliance, you will fight against horde npcs. + case NPC_ALLIANCE_BERSERKER: + if (ServerAllowsTwoSideGroups()) + creature->setFaction(FACTION_HOSTILE_FOR_ALL); + if (_teamInInstance == ALLIANCE) + creature->UpdateEntry(NPC_HORDE_BERSERKER); + break; + case NPC_ALLIANCE_RANGER: + if (ServerAllowsTwoSideGroups()) + creature->setFaction(FACTION_HOSTILE_FOR_ALL); + if (_teamInInstance == ALLIANCE) + creature->UpdateEntry(NPC_HORDE_RANGER); + break; + case NPC_ALLIANCE_CLERIC: + if (ServerAllowsTwoSideGroups()) + creature->setFaction(FACTION_HOSTILE_FOR_ALL); + if (_teamInInstance == ALLIANCE) + creature->UpdateEntry(NPC_HORDE_CLERIC); + break; + case NPC_ALLIANCE_COMMANDER: + if (ServerAllowsTwoSideGroups()) + creature->setFaction(FACTION_HOSTILE_FOR_ALL); + if (_teamInInstance == ALLIANCE) + creature->UpdateEntry(NPC_HORDE_COMMANDER); + break; + case NPC_COMMANDER_STOUTBEARD: + if (ServerAllowsTwoSideGroups()) + creature->setFaction(FACTION_HOSTILE_FOR_ALL); + if (_teamInInstance == ALLIANCE) + creature->UpdateEntry(NPC_COMMANDER_KOLURG); + break; + default: + break; } } - } - - uint32 GetData(uint32 identifier) const override - { - switch (identifier) - { - case DATA_MAGUS_TELESTRA_EVENT: return m_auiEncounter[0]; - case DATA_ANOMALUS_EVENT: return m_auiEncounter[1]; - case DATA_ORMOROK_EVENT: return m_auiEncounter[2]; - case DATA_KERISTRASZA_EVENT: return m_auiEncounter[3]; - } - return 0; - } - void SetData(uint32 identifier, uint32 data) override - { - switch (identifier) + void OnGameObjectCreate(GameObject* go) override { - case DATA_MAGUS_TELESTRA_EVENT: + switch (go->GetEntry()) { - if (data == DONE) - { - GameObject* Sphere = instance->GetGameObject(TelestrasContainmentSphere); - if (Sphere) - Sphere->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); - } - m_auiEncounter[0] = data; - break; + case GO_ANOMALUS_CONTAINMET_SPHERE: + AnomalusContainmentSphere = go->GetGUID(); + if (GetBossState(DATA_ANOMALUS) == DONE) + go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); + break; + case GO_ORMOROKS_CONTAINMET_SPHERE: + OrmoroksContainmentSphere = go->GetGUID(); + if (GetBossState(DATA_ORMOROK) == DONE) + go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); + break; + case GO_TELESTRAS_CONTAINMET_SPHERE: + TelestrasContainmentSphere = go->GetGUID(); + if (GetBossState(DATA_MAGUS_TELESTRA) == DONE) + go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); + break; + default: + break; } - case DATA_ANOMALUS_EVENT: - { - if (data == DONE) - { - if (GameObject* Sphere = instance->GetGameObject(AnomalusContainmentSphere)) - Sphere->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); - } - m_auiEncounter[1] = data; - break; - } - case DATA_ORMOROK_EVENT: - { - if (data == DONE) - { - if (GameObject* Sphere = instance->GetGameObject(OrmoroksContainmentSphere)) - Sphere->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); - } - m_auiEncounter[2] = data; - break; - } - case DATA_KERISTRASZA_EVENT: - m_auiEncounter[3] = data; - break; } - if (data == DONE) + bool SetBossState(uint32 type, EncounterState state) override { - OUT_SAVE_INST_DATA; - - std::ostringstream saveStream; - saveStream << m_auiEncounter[0] << ' ' << m_auiEncounter[1] << ' ' << m_auiEncounter[2] << ' ' - << m_auiEncounter[3]; + if (!InstanceScript::SetBossState(type, state)) + return false; - strInstData = saveStream.str(); + switch (type) + { + case DATA_MAGUS_TELESTRA: + if (state == DONE) + { + if (GameObject* sphere = instance->GetGameObject(TelestrasContainmentSphere)) + sphere->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); + } + break; + case DATA_ANOMALUS: + if (state == DONE) + { + if (GameObject* sphere = instance->GetGameObject(AnomalusContainmentSphere)) + sphere->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); + } + break; + case DATA_ORMOROK: + if (state == DONE) + { + if (GameObject* sphere = instance->GetGameObject(OrmoroksContainmentSphere)) + sphere->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); + } + break; + default: + break; + } - SaveToDB(); - OUT_SAVE_INST_DATA_COMPLETE; + return true; } - } - ObjectGuid GetGuidData(uint32 uiIdentifier) const override - { - switch (uiIdentifier) + ObjectGuid GetGuidData(uint32 type) const override { - case DATA_ANOMALUS: return Anomalus; - case DATA_KERISTRASZA: return Keristrasza; - case ANOMALUS_CONTAINMET_SPHERE: return AnomalusContainmentSphere; - case ORMOROKS_CONTAINMET_SPHERE: return OrmoroksContainmentSphere; - case TELESTRAS_CONTAINMET_SPHERE: return TelestrasContainmentSphere; - } - return ObjectGuid::Empty; - } - - std::string GetSaveData() override - { - return strInstData; - } + switch (type) + { + case DATA_ANOMALUS: + return AnomalusGUID; + case DATA_KERISTRASZA: + return KeristraszaGUID; + case ANOMALUS_CONTAINMET_SPHERE: + return AnomalusContainmentSphere; + case ORMOROKS_CONTAINMET_SPHERE: + return OrmoroksContainmentSphere; + case TELESTRAS_CONTAINMET_SPHERE: + return TelestrasContainmentSphere; + default: + break; + } - void Load(const char *chrIn) - { - if (!chrIn) - { - OUT_LOAD_INST_DATA_FAIL; - return; + return ObjectGuid::Empty; } - OUT_LOAD_INST_DATA(chrIn); - - std::istringstream loadStream(chrIn); - loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3]; + private: + ObjectGuid AnomalusGUID; + ObjectGuid KeristraszaGUID; + ObjectGuid AnomalusContainmentSphere; + ObjectGuid OrmoroksContainmentSphere; + ObjectGuid TelestrasContainmentSphere; + uint32 _teamInInstance; + }; - for (uint8 i = 0; i < NUMBER_OF_ENCOUNTERS; ++i) - if (m_auiEncounter[i] == IN_PROGRESS) - m_auiEncounter[i] = NOT_STARTED; - - OUT_LOAD_INST_DATA_COMPLETE; + InstanceScript* GetInstanceScript(InstanceMap* map) const override + { + return new instance_nexus_InstanceMapScript(map); } - }; - }; void AddSC_instance_nexus() diff --git a/src/server/scripts/Northrend/Nexus/Nexus/nexus.h b/src/server/scripts/Northrend/Nexus/Nexus/nexus.h index c9f5d44c932..9962b0c884d 100644 --- a/src/server/scripts/Northrend/Nexus/Nexus/nexus.h +++ b/src/server/scripts/Northrend/Nexus/Nexus/nexus.h @@ -18,21 +18,48 @@ #ifndef DEF_NEXUS_H #define DEF_NEXUS_H +#define NexusScriptName "instance_nexus" #define DataHeader "NEX" +uint32 const EncounterCount = 4; + enum DataTypes { - DATA_MAGUS_TELESTRA_EVENT, - DATA_ANOMALUS_EVENT, - DATA_ORMOROK_EVENT, - DATA_KERISTRASZA_EVENT, + DATA_MAGUS_TELESTRA = 0, + DATA_ANOMALUS = 1, + DATA_ORMOROK = 2, + DATA_KERISTRASZA = 3, + + ANOMALUS_CONTAINMET_SPHERE = 4, + ORMOROKS_CONTAINMET_SPHERE = 5, + TELESTRAS_CONTAINMET_SPHERE = 6 +}; - DATA_ANOMALUS, - DATA_KERISTRASZA, +enum CreatureIds +{ + NPC_ANOMALUS = 26763, + NPC_KERISTRASZA = 26723, + + // Alliance + NPC_ALLIANCE_BERSERKER = 26800, + NPC_ALLIANCE_RANGER = 26802, + NPC_ALLIANCE_CLERIC = 26805, + NPC_ALLIANCE_COMMANDER = 27949, + NPC_COMMANDER_STOUTBEARD = 26796, + + // Horde + NPC_HORDE_BERSERKER = 26799, + NPC_HORDE_RANGER = 26801, + NPC_HORDE_CLERIC = 26803, + NPC_HORDE_COMMANDER = 27947, + NPC_COMMANDER_KOLURG = 26798 +}; - ANOMALUS_CONTAINMET_SPHERE, - ORMOROKS_CONTAINMET_SPHERE, - TELESTRAS_CONTAINMET_SPHERE +enum GameObjectIds +{ + GO_ANOMALUS_CONTAINMET_SPHERE = 188527, + GO_ORMOROKS_CONTAINMET_SPHERE = 188528, + GO_TELESTRAS_CONTAINMET_SPHERE = 188526 }; #endif diff --git a/src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp b/src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp index 1c5aadc3581..24a712d9d38 100644 --- a/src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp +++ b/src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp @@ -192,6 +192,7 @@ class instance_oculus : public InstanceMapScript FreeDragons(); if (Creature* varos = instance->GetCreature(VarosGUID)) varos->SetPhaseMask(1, true); + events.ScheduleEvent(EVENT_VAROS_INTRO, 15000); } break; case DATA_VAROS: @@ -209,6 +210,7 @@ class instance_oculus : public InstanceMapScript { eregos->SetPhaseMask(1, true); GreaterWhelps(); + events.ScheduleEvent(EVENT_EREGOS_INTRO, 5000); } } break; @@ -267,6 +269,28 @@ class instance_oculus : public InstanceMapScript } } + void Update(uint32 diff) override + { + events.Update(diff); + + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_VAROS_INTRO: + if (Creature* varos = instance->GetCreature(VarosGUID)) + varos->AI()->Talk(SAY_VAROS_INTRO_TEXT); + break; + case EVENT_EREGOS_INTRO: + if (Creature* eregos = instance->GetCreature(EregosGUID)) + eregos->AI()->Talk(SAY_EREGOS_INTRO_TEXT); + break; + default: + break; + } + } + } + void GreaterWhelps() { for (ObjectGuid guid : GreaterWhelpList) @@ -289,6 +313,8 @@ class instance_oculus : public InstanceMapScript ObjectGuid EregosCacheGUID; GuidList GreaterWhelpList; + + EventMap events; }; InstanceScript* GetInstanceScript(InstanceMap* map) const override diff --git a/src/server/scripts/Northrend/Nexus/Oculus/oculus.h b/src/server/scripts/Northrend/Nexus/Oculus/oculus.h index 268cdb54e3e..d1144df9486 100644 --- a/src/server/scripts/Northrend/Nexus/Oculus/oculus.h +++ b/src/server/scripts/Northrend/Nexus/Oculus/oculus.h @@ -79,6 +79,18 @@ enum OculusSpells SPELL_DEATH_SPELL = 50415 }; +enum InstanceTexts +{ + SAY_EREGOS_INTRO_TEXT = 0, + SAY_VAROS_INTRO_TEXT = 4 +}; + +enum InstanceEvents +{ + EVENT_VAROS_INTRO = 1, + EVENT_EREGOS_INTRO +}; + enum Misc { POINT_MOVE_OUT = 1 diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_loken.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_loken.cpp index fc29369c28f..8c7d0c2797f 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_loken.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_loken.cpp @@ -28,7 +28,7 @@ EndScriptData */ #include "SpellScript.h" #include "halls_of_lightning.h" -enum Yells +enum Texts { SAY_INTRO_1 = 0, SAY_INTRO_2 = 1, @@ -51,6 +51,21 @@ enum Spells SPELL_PULSING_SHOCKWAVE_AURA = 59414 }; +enum Events +{ + EVENT_ARC_LIGHTNING = 1, + EVENT_LIGHTNING_NOVA, + EVENT_RESUME_PULSING_SHOCKWAVE, + EVENT_INTRO_DIALOGUE +}; + +enum Phases +{ + // Phases are used to allow executing the intro event while UpdateVictim() returns false and convenience. + PHASE_INTRO = 1, + PHASE_NORMAL +}; + enum Misc { ACHIEV_TIMELY_DEATH_START_EVENT = 20384 @@ -65,57 +80,41 @@ class boss_loken : public CreatureScript public: boss_loken() : CreatureScript("boss_loken") { } - CreatureAI* GetAI(Creature* creature) const override - { - return GetInstanceAI<boss_lokenAI>(creature); - } - - struct boss_lokenAI : public ScriptedAI + struct boss_lokenAI : public BossAI { - boss_lokenAI(Creature* creature) : ScriptedAI(creature) + boss_lokenAI(Creature* creature) : BossAI(creature, DATA_LOKEN) { Initialize(); - instance = creature->GetInstanceScript(); + _isIntroDone = false; } void Initialize() { - m_uiArcLightning_Timer = 15000; - m_uiLightningNova_Timer = 20000; - m_uiResumePulsingShockwave_Timer = 1000; - - m_uiHealthAmountModifier = 1; + _healthAmountModifier = 1; } - InstanceScript* instance; - - uint32 m_uiArcLightning_Timer; - uint32 m_uiLightningNova_Timer; - uint32 m_uiResumePulsingShockwave_Timer; - - uint32 m_uiHealthAmountModifier; - void Reset() override { Initialize(); - - instance->SetBossState(DATA_LOKEN, NOT_STARTED); + _Reset(); instance->DoStopTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMELY_DEATH_START_EVENT); } void EnterCombat(Unit* /*who*/) override { + _EnterCombat(); Talk(SAY_AGGRO); - - instance->SetBossState(DATA_LOKEN, IN_PROGRESS); + events.SetPhase(PHASE_NORMAL); + events.ScheduleEvent(EVENT_ARC_LIGHTNING, 15000); + events.ScheduleEvent(EVENT_LIGHTNING_NOVA, 20000); + events.ScheduleEvent(EVENT_RESUME_PULSING_SHOCKWAVE, 1000); instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMELY_DEATH_START_EVENT); } void JustDied(Unit* /*killer*/) override { Talk(SAY_DEATH); - - instance->SetBossState(DATA_LOKEN, DONE); + _JustDied(); instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_PULSING_SHOCKWAVE_AURA); } @@ -125,66 +124,89 @@ public: Talk(SAY_SLAY); } - void UpdateAI(uint32 uiDiff) override + void MoveInLineOfSight(Unit* who) override { - //Return since we have no target - if (!UpdateVictim()) - return; - - if (m_uiResumePulsingShockwave_Timer) + if (!_isIntroDone && me->IsValidAttackTarget(who) && me->IsWithinDistInMap(who, 40.0f)) { - if (m_uiResumePulsingShockwave_Timer <= uiDiff) - { - DoCast(me, SPELL_PULSING_SHOCKWAVE_AURA, true); - me->ClearUnitState(UNIT_STATE_CASTING); // this flag breaks movement - - DoCast(me, SPELL_PULSING_SHOCKWAVE, true); - m_uiResumePulsingShockwave_Timer = 0; - } - else - m_uiResumePulsingShockwave_Timer -= uiDiff; + _isIntroDone = true; + Talk(SAY_INTRO_1); + events.ScheduleEvent(EVENT_INTRO_DIALOGUE, 20000, 0, PHASE_INTRO); } + BossAI::MoveInLineOfSight(who); + } - if (m_uiArcLightning_Timer <= uiDiff) - { - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) - DoCast(target, SPELL_ARC_LIGHTNING); + void UpdateAI(uint32 diff) override + { + if (events.IsInPhase(PHASE_NORMAL) && !UpdateVictim()) + return; - m_uiArcLightning_Timer = urand(15000, 16000); - } - else - m_uiArcLightning_Timer -= uiDiff; + events.Update(diff); - if (m_uiLightningNova_Timer <= uiDiff) + while (uint32 eventId = events.ExecuteEvent()) { - Talk(SAY_NOVA); - Talk(EMOTE_NOVA); - DoCast(me, SPELL_LIGHTNING_NOVA); - - me->RemoveAurasDueToSpell(sSpellMgr->GetSpellIdForDifficulty(SPELL_PULSING_SHOCKWAVE, me)); - m_uiResumePulsingShockwave_Timer = DUNGEON_MODE(5000, 4000); // Pause Pulsing Shockwave aura - m_uiLightningNova_Timer = urand(20000, 21000); + switch (eventId) + { + case EVENT_ARC_LIGHTNING: + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) + DoCast(target, SPELL_ARC_LIGHTNING); + events.ScheduleEvent(EVENT_ARC_LIGHTNING, urand(15000, 16000)); + break; + case EVENT_LIGHTNING_NOVA: + Talk(SAY_NOVA); + Talk(EMOTE_NOVA); + DoCastAOE(SPELL_LIGHTNING_NOVA); + me->RemoveAurasDueToSpell(sSpellMgr->GetSpellIdForDifficulty(SPELL_PULSING_SHOCKWAVE, me)); + events.ScheduleEvent(EVENT_RESUME_PULSING_SHOCKWAVE, DUNGEON_MODE(5000, 4000)); // Pause Pulsing Shockwave aura + events.ScheduleEvent(EVENT_LIGHTNING_NOVA, urand(20000, 21000)); + break; + case EVENT_RESUME_PULSING_SHOCKWAVE: + DoCast(me, SPELL_PULSING_SHOCKWAVE_AURA, true); + me->ClearUnitState(UNIT_STATE_CASTING); // This flag breaks movement. + DoCast(me, SPELL_PULSING_SHOCKWAVE, true); + break; + case EVENT_INTRO_DIALOGUE: + Talk(SAY_INTRO_2); + events.SetPhase(PHASE_NORMAL); + break; + default: + break; + } } - else - m_uiLightningNova_Timer -= uiDiff; - // Health check - if (HealthBelowPct(100 - 25 * m_uiHealthAmountModifier)) + DoMeleeAttackIfReady(); + } + + void DamageTaken(Unit* /*attacker*/, uint32& damage) override + { + if (me->HealthBelowPctDamaged(100 - 25 * _healthAmountModifier, damage)) { - switch (m_uiHealthAmountModifier) + switch (_healthAmountModifier) { - case 1: Talk(SAY_75HEALTH); break; - case 2: Talk(SAY_50HEALTH); break; - case 3: Talk(SAY_25HEALTH); break; + case 1: + Talk(SAY_75HEALTH); + break; + case 2: + Talk(SAY_50HEALTH); + break; + case 3: + Talk(SAY_25HEALTH); + break; + default: + break; } - - ++m_uiHealthAmountModifier; + ++_healthAmountModifier; } - - DoMeleeAttackIfReady(); } + + private: + uint32 _healthAmountModifier; + bool _isIntroDone; }; + CreatureAI* GetAI(Creature* creature) const override + { + return GetInstanceAI<boss_lokenAI>(creature); + } }; class spell_loken_pulsing_shockwave : public SpellScriptLoader diff --git a/src/server/scripts/Northrend/zone_dragonblight.cpp b/src/server/scripts/Northrend/zone_dragonblight.cpp index eff84365f63..b949c43b64d 100644 --- a/src/server/scripts/Northrend/zone_dragonblight.cpp +++ b/src/server/scripts/Northrend/zone_dragonblight.cpp @@ -366,48 +366,6 @@ class npc_commander_eligor_dawnbringer : public CreatureScript } }; -enum AlexstraszaWrGate -{ - // Quest - QUEST_RETURN_TO_AG_A = 12499, - QUEST_RETURN_TO_AG_H = 12500, - - // Movie - MOVIE_ID_GATES = 14 -}; - -#define GOSSIP_ITEM_WHAT_HAPPENED "Alexstrasza, can you show me what happened here?" - -class npc_alexstrasza_wr_gate : public CreatureScript -{ -public: - npc_alexstrasza_wr_gate() : CreatureScript("npc_alexstrasza_wr_gate") { } - - bool OnGossipHello(Player* player, Creature* creature) override - { - if (creature->IsQuestGiver()) - player->PrepareQuestMenu(creature->GetGUID()); - - if (player->GetQuestRewardStatus(QUEST_RETURN_TO_AG_A) || player->GetQuestRewardStatus(QUEST_RETURN_TO_AG_H)) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_WHAT_HAPPENED, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - - player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID()); - return true; - } - - bool OnGossipSelect(Player* player, Creature* /*creature*/, uint32 /*sender*/, uint32 action) override - { - player->PlayerTalkClass->ClearMenus(); - if (action == GOSSIP_ACTION_INFO_DEF+1) - { - player->CLOSE_GOSSIP_MENU(); - player->SendMovieStart(MOVIE_ID_GATES); - } - - return true; - } -}; - /*###### ## Quest Strengthen the Ancients (12096|12092) ######*/ @@ -746,7 +704,6 @@ class npc_torturer_lecraft : public CreatureScript void AddSC_dragonblight() { new npc_commander_eligor_dawnbringer(); - new npc_alexstrasza_wr_gate(); new spell_q12096_q12092_dummy(); new spell_q12096_q12092_bark(); new npc_wyrmrest_defender(); diff --git a/src/server/scripts/Northrend/zone_icecrown.cpp b/src/server/scripts/Northrend/zone_icecrown.cpp index 7436ac8400f..2b317453992 100644 --- a/src/server/scripts/Northrend/zone_icecrown.cpp +++ b/src/server/scripts/Northrend/zone_icecrown.cpp @@ -210,52 +210,6 @@ public: }; /*###### -## npc_vereth_the_cunning -######*/ - -enum VerethTheCunning -{ - NPC_GEIST_RETURN_BUNNY_KC = 31049, - NPC_LITHE_STALKER = 30894, - SPELL_SUBDUED_LITHE_STALKER = 58151, -}; - -class npc_vereth_the_cunning : public CreatureScript -{ -public: - npc_vereth_the_cunning() : CreatureScript("npc_vereth_the_cunning") { } - - struct npc_vereth_the_cunningAI : public ScriptedAI - { - npc_vereth_the_cunningAI(Creature* creature) : ScriptedAI(creature) { } - - void MoveInLineOfSight(Unit* who) override - - { - ScriptedAI::MoveInLineOfSight(who); - - if (who->GetEntry() == NPC_LITHE_STALKER && me->IsWithinDistInMap(who, 10.0f)) - { - if (Unit* owner = who->GetCharmer()) - { - if (who->HasAura(SPELL_SUBDUED_LITHE_STALKER)) - { - owner->ToPlayer()->KilledMonsterCredit(NPC_GEIST_RETURN_BUNNY_KC); - who->ToCreature()->DisappearAndDie(); - - } - } - } - } - }; - - CreatureAI* GetAI(Creature* creature) const override - { - return new npc_vereth_the_cunningAI(creature); - } -}; - -/*###### * npc_tournament_training_dummy ######*/ enum TournamentDummy @@ -881,207 +835,12 @@ class npc_frostbrood_skytalon : public CreatureScript } }; -/*###### -## The Flesh Giant Champion - Id: 13235 -######*/ -enum FleshGiant -{ - QUEST_FLESH_GIANT_CHAMPION = 13235, - - NPC_MORBIDUS = 30698, - NPC_LICH_KING = 31301, - NPC_OLAKIN = 31428, - NPC_DHAKAR = 31306, - - FACTION_HOSTILE = 14, - FACTION_BASIC = 2102, - - EVENT_INTRO = 1, - EVENT_LK_SAY_1 = 2, - EVENT_LK_SAY_2 = 3, - EVENT_LK_SAY_3 = 4, - EVENT_LK_SAY_4 = 5, - EVENT_LK_SAY_5 = 6, - EVENT_OUTRO = 7, - EVENT_START = 8, - - SPELL_SIMPLE_TELEPORT = 64195, - - SAY_DHAKAR_START = 0, - SAY_LK_1 = 0, - SAY_LK_2 = 1, - SAY_LK_3 = 2, - SAY_LK_4 = 3, - SAY_LK_5 = 4, - SAY_OLAKIN_PAY = 0 -}; - -class npc_margrave_dhakar : public CreatureScript -{ - public: - npc_margrave_dhakar() : CreatureScript("npc_margrave_dhakar") { } - - struct npc_margrave_dhakarAI : public ScriptedAI - { - npc_margrave_dhakarAI(Creature* creature) : ScriptedAI(creature) , _summons(me) { } - - void Reset() override - { - me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); - me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_NONE); - - _events.Reset(); - _summons.DespawnAll(); - } - - void sGossipSelect(Player* player, uint32 sender, uint32 action) override - { - if (player->GetQuestStatus(QUEST_FLESH_GIANT_CHAMPION) == QUEST_STATUS_INCOMPLETE && !player->IsInCombat()) - { - if (me->GetCreatureTemplate()->GossipMenuId == sender && !action) - { - _events.ScheduleEvent(EVENT_INTRO, 1000); - me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); - } - } - } - - void UpdateAI(uint32 diff) override - { - _events.Update(diff); - - while (uint32 eventId = _events.ExecuteEvent()) - { - switch (eventId) - { - case EVENT_INTRO: - { - Talk(SAY_DHAKAR_START); - me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_READY2H); - - if (Creature* morbidus = me->FindNearestCreature(NPC_MORBIDUS, 50.0f, true)) - { - if (Creature* lichKing = me->SummonCreature(NPC_LICH_KING, morbidus->GetPositionX() + 10.0f, morbidus->GetPositionY(), morbidus->GetPositionZ())) - { - _lichKingGuid = lichKing->GetGUID(); - lichKing->SetFacingTo(morbidus->GetOrientation()); - lichKing->CastSpell(lichKing, SPELL_SIMPLE_TELEPORT, true); - } - } - - _events.ScheduleEvent(EVENT_LK_SAY_1, 5000); - break; - } - case EVENT_LK_SAY_1: - { - if (Creature* lichKing = ObjectAccessor::GetCreature(*me, _lichKingGuid)) - lichKing->AI()->Talk(SAY_LK_1); - _events.ScheduleEvent(EVENT_LK_SAY_2, 5000); - break; - } - case EVENT_LK_SAY_2: - { - if (Creature* lichKing = ObjectAccessor::GetCreature(*me, _lichKingGuid)) - lichKing->AI()->Talk(SAY_LK_2); - _events.ScheduleEvent(EVENT_LK_SAY_3, 5000); - break; - } - case EVENT_LK_SAY_3: - { - if (Creature* lichKing = ObjectAccessor::GetCreature(*me, _lichKingGuid)) - lichKing->AI()->Talk(SAY_LK_3); - _events.ScheduleEvent(EVENT_LK_SAY_4, 5000); - break; - } - case EVENT_LK_SAY_4: - { - if (Creature* lichKing = ObjectAccessor::GetCreature(*me, _lichKingGuid)) - lichKing->AI()->Talk(SAY_LK_4); - _events.ScheduleEvent(EVENT_OUTRO, 12000); - break; - } - case EVENT_LK_SAY_5: - { - if (Creature* lichKing = ObjectAccessor::GetCreature(*me, _lichKingGuid)) - lichKing->AI()->Talk(SAY_LK_5); - _events.ScheduleEvent(EVENT_OUTRO, 8000); - break; - } - case EVENT_OUTRO: - { - if (Creature* olakin = me->FindNearestCreature(NPC_OLAKIN, 50.0f, true)) - olakin->AI()->Talk(SAY_OLAKIN_PAY); - - if (Creature* lichKing = ObjectAccessor::GetCreature(*me, _lichKingGuid)) - lichKing->DespawnOrUnsummon(0); - - _events.ScheduleEvent(EVENT_START, 5000); - break; - } - case EVENT_START: - { - if (Creature* morbidus = me->FindNearestCreature(NPC_MORBIDUS, 50.0f, true)) - { - morbidus->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_ATTACKABLE_1 | UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC | UNIT_FLAG_DISABLE_MOVE); - morbidus->setFaction(FACTION_HOSTILE); - } - - break; - } - } - } - - DoMeleeAttackIfReady(); - } - - private: - EventMap _events; - SummonList _summons; - ObjectGuid _lichKingGuid; - }; - - CreatureAI* GetAI(Creature* creature) const override - { - return new npc_margrave_dhakarAI(creature); - } -}; - -class npc_morbidus : public CreatureScript -{ - public: - npc_morbidus() : CreatureScript("npc_morbidus") { } - - struct npc_morbidusAI : public ScriptedAI - { - npc_morbidusAI(Creature* creature) : ScriptedAI(creature) { } - - void Reset() override - { - if (Creature* dhakar = me->FindNearestCreature(NPC_DHAKAR, 50.0f, true)) - dhakar->AI()->Reset(); - - // this will prevent the event to start without morbidus being alive - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - me->SetReactState(REACT_PASSIVE); - me->setFaction(FACTION_BASIC); - } - }; - - CreatureAI* GetAI(Creature* creature) const override - { - return new npc_morbidusAI(creature); - } -}; - void AddSC_icecrown() { new npc_squire_david; new npc_argent_valiant; new npc_guardian_pavilion; - new npc_vereth_the_cunning; new npc_tournament_training_dummy; new npc_blessed_banner(); new npc_frostbrood_skytalon(); - new npc_margrave_dhakar(); - new npc_morbidus(); } diff --git a/src/server/scripts/Outland/Auchindoun/SethekkHalls/instance_sethekk_halls.cpp b/src/server/scripts/Outland/Auchindoun/SethekkHalls/instance_sethekk_halls.cpp index 53fbf8f0cf7..1f55abf8a11 100644 --- a/src/server/scripts/Outland/Auchindoun/SethekkHalls/instance_sethekk_halls.cpp +++ b/src/server/scripts/Outland/Auchindoun/SethekkHalls/instance_sethekk_halls.cpp @@ -21,8 +21,14 @@ DoorData const doorData[] = { - { GO_IKISS_DOOR, DATA_TALON_KING_IKISS, DOOR_TYPE_PASSAGE, BOUNDARY_NONE }, - { 0, 0, DOOR_TYPE_ROOM, BOUNDARY_NONE } // END + { GO_IKISS_DOOR, DATA_TALON_KING_IKISS, DOOR_TYPE_PASSAGE, BOUNDARY_NONE }, + { 0, 0, DOOR_TYPE_ROOM, BOUNDARY_NONE } // END +}; + +ObjectData const gameObjectData[] = +{ + { GO_TALON_KING_COFFER, DATA_TALON_KING_COFFER }, + { 0, 0 } // END }; class instance_sethekk_halls : public InstanceMapScript @@ -37,6 +43,7 @@ class instance_sethekk_halls : public InstanceMapScript SetHeaders(DataHeader); SetBossNumber(EncounterCount); LoadDoorData(doorData); + LoadObjectData(nullptr, gameObjectData); } void OnCreatureCreate(Creature* creature) override @@ -50,16 +57,27 @@ class instance_sethekk_halls : public InstanceMapScript } } - void OnGameObjectCreate(GameObject* go) override + bool SetBossState(uint32 type, EncounterState state) override { - if (go->GetEntry() == GO_IKISS_DOOR) - AddDoor(go, true); - } + if (!InstanceScript::SetBossState(type, state)) + return false; - void OnGameObjectRemove(GameObject* go) override - { - if (go->GetEntry() == GO_IKISS_DOOR) - AddDoor(go, false); + switch (type) + { + case DATA_TALON_KING_IKISS: + if (state == DONE) + { + /// @workaround: GO_FLAG_INTERACT_COND remains on the gob, but it is not handled correctly in this case + /// gameobject should have GO_DYNFLAG_LO_ACTIVATE too, which makes gobs interactable with GO_FLAG_INTERACT_COND + /// so just removed GO_FLAG_INTERACT_COND + if (GameObject* coffer = GetGameObject(DATA_TALON_KING_COFFER)) + coffer->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_INTERACT_COND | GO_FLAG_NOT_SELECTABLE); + } + break; + default: + break; + } + return true; } }; diff --git a/src/server/scripts/Outland/Auchindoun/SethekkHalls/sethekk_halls.h b/src/server/scripts/Outland/Auchindoun/SethekkHalls/sethekk_halls.h index 4b6bfab46cb..8cf01fb4635 100644 --- a/src/server/scripts/Outland/Auchindoun/SethekkHalls/sethekk_halls.h +++ b/src/server/scripts/Outland/Auchindoun/SethekkHalls/sethekk_halls.h @@ -28,7 +28,10 @@ enum DataTypes // Encounter States/Boss GUIDs DATA_DARKWEAVER_SYTH = 0, DATA_TALON_KING_IKISS = 1, - DATA_ANZU = 2 + DATA_ANZU = 2, + + // Additional Data + DATA_TALON_KING_COFFER = 3 }; enum CreatureIds @@ -39,7 +42,8 @@ enum CreatureIds enum GameObjectIds { - GO_IKISS_DOOR = 177203 + GO_IKISS_DOOR = 177203, + GO_TALON_KING_COFFER = 187372 }; template<class AI> diff --git a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/instance_steam_vault.cpp b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/instance_steam_vault.cpp index f0884e83baa..794d3a490f6 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/instance_steam_vault.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/instance_steam_vault.cpp @@ -31,21 +31,25 @@ class go_main_chambers_access_panel : public GameObjectScript return false; if (go->GetEntry() == GO_ACCESS_PANEL_HYDRO && (instance->GetBossState(DATA_HYDROMANCER_THESPIA) == DONE || instance->GetBossState(DATA_HYDROMANCER_THESPIA) == SPECIAL)) - { instance->SetBossState(DATA_HYDROMANCER_THESPIA, SPECIAL); - go->SetGoState(GO_STATE_ACTIVE); - } if (go->GetEntry() == GO_ACCESS_PANEL_MEK && (instance->GetBossState(DATA_MEKGINEER_STEAMRIGGER) == DONE || instance->GetBossState(DATA_MEKGINEER_STEAMRIGGER) == SPECIAL)) - { instance->SetBossState(DATA_MEKGINEER_STEAMRIGGER, SPECIAL); - go->SetGoState(GO_STATE_ACTIVE); - } + + go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); + go->SetGoState(GO_STATE_ACTIVE); return true; } }; +ObjectData const gameObjectData[] = +{ + { GO_ACCESS_PANEL_HYDRO, DATA_ACCESS_PANEL_HYDRO }, + { GO_ACCESS_PANEL_MEK, DATA_ACCESS_PANEL_MEK }, + { 0, 0 } // END +}; + class instance_steam_vault : public InstanceMapScript { public: @@ -57,6 +61,7 @@ class instance_steam_vault : public InstanceMapScript { SetHeaders(DataHeader); SetBossNumber(EncounterCount); + LoadObjectData(nullptr, gameObjectData); DistillerState = 0; } @@ -89,6 +94,8 @@ class instance_steam_vault : public InstanceMapScript default: break; } + + InstanceScript::OnGameObjectCreate(go); } ObjectGuid GetGuidData(uint32 type) const override @@ -128,6 +135,9 @@ class instance_steam_vault : public InstanceMapScript switch (type) { case DATA_HYDROMANCER_THESPIA: + if (state == DONE) + if (GameObject* panel = GetGameObject(DATA_ACCESS_PANEL_HYDRO)) + panel->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); if (state == SPECIAL) { if (GetBossState(DATA_MEKGINEER_STEAMRIGGER) == SPECIAL) @@ -137,6 +147,9 @@ class instance_steam_vault : public InstanceMapScript } break; case DATA_MEKGINEER_STEAMRIGGER: + if (state == DONE) + if (GameObject* panel = GetGameObject(DATA_ACCESS_PANEL_MEK)) + panel->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); if (state == SPECIAL) { if (GetBossState(DATA_HYDROMANCER_THESPIA) == SPECIAL) diff --git a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/steam_vault.h b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/steam_vault.h index 58f71b047ef..d18d0406dea 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/steam_vault.h +++ b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/steam_vault.h @@ -28,7 +28,11 @@ enum DataTypes DATA_HYDROMANCER_THESPIA = 0, DATA_MEKGINEER_STEAMRIGGER = 1, DATA_WARLORD_KALITHRESH = 2, - DATA_DISTILLER = 3 + DATA_DISTILLER = 3, + + // Additional Data + DATA_ACCESS_PANEL_HYDRO = 4, + DATA_ACCESS_PANEL_MEK = 5 }; enum CreatureIds diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp index 22968d70ff1..6717bec109f 100644 --- a/src/server/scripts/Spells/spell_hunter.cpp +++ b/src/server/scripts/Spells/spell_hunter.cpp @@ -69,7 +69,7 @@ class spell_hun_aspect_of_the_beast : public SpellScriptLoader bool Load() override { - return GetCaster()->GetTypeId() == TYPEID_PLAYER; + return GetOwner()->GetTypeId() == TYPEID_PLAYER; } bool Validate(SpellInfo const* /*spellInfo*/) override @@ -81,16 +81,16 @@ class spell_hun_aspect_of_the_beast : public SpellScriptLoader void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) { - if (Player* caster = GetCaster()->ToPlayer()) - if (Pet* pet = caster->GetPet()) - pet->RemoveAurasDueToSpell(SPELL_HUNTER_ASPECT_OF_THE_BEAST_PET); + Player* player = GetTarget()->ToPlayer(); + if (Pet* pet = player->GetPet()) + pet->RemoveAurasDueToSpell(SPELL_HUNTER_ASPECT_OF_THE_BEAST_PET); } void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) { - if (Player* caster = GetCaster()->ToPlayer()) - if (caster->GetPet()) - caster->CastSpell(caster, SPELL_HUNTER_ASPECT_OF_THE_BEAST_PET, true); + Player* player = GetTarget()->ToPlayer(); + if (player->GetPet()) + player->CastSpell(player, SPELL_HUNTER_ASPECT_OF_THE_BEAST_PET, true); } void Register() override diff --git a/src/server/scripts/World/go_scripts.cpp b/src/server/scripts/World/go_scripts.cpp index e35f7c9b70e..28680c9d1ce 100644 --- a/src/server/scripts/World/go_scripts.cpp +++ b/src/server/scripts/World/go_scripts.cpp @@ -40,8 +40,6 @@ go_dragonflayer_cage go_tadpole_cage go_amberpine_outhouse go_hive_pod -go_gjalerbron_cage -go_large_gjalerbron_cage go_veil_skith_cage EndContentData */ @@ -1111,69 +1109,6 @@ class go_massive_seaforium_charge : public GameObjectScript }; /*###### -## go_gjalerbron_cage -######*/ - -enum OfKeysAndCages -{ - QUEST_ALLIANCE_OF_KEYS_AND_CAGES = 11231, - QUEST_HORDE_OF_KEYS_AND_CAGES = 11265, - NPC_GJALERBRON_PRISONER = 24035, - SAY_FREE = 0, -}; - -class go_gjalerbron_cage : public GameObjectScript -{ - public: - go_gjalerbron_cage() : GameObjectScript("go_gjalerbron_cage") { } - - bool OnGossipHello(Player* player, GameObject* go) override - { - go->UseDoorOrButton(); - if ((player->GetTeamId() == TEAM_ALLIANCE && player->GetQuestStatus(QUEST_ALLIANCE_OF_KEYS_AND_CAGES) == QUEST_STATUS_INCOMPLETE) || - (player->GetTeamId() == TEAM_HORDE && player->GetQuestStatus(QUEST_HORDE_OF_KEYS_AND_CAGES) == QUEST_STATUS_INCOMPLETE)) - { - if (Creature* prisoner = go->FindNearestCreature(NPC_GJALERBRON_PRISONER, 5.0f)) - { - player->KilledMonsterCredit(NPC_GJALERBRON_PRISONER); - - prisoner->AI()->Talk(SAY_FREE); - prisoner->DespawnOrUnsummon(6000); - } - } - return true; - } -}; - -/*######## -## go_large_gjalerbron_cage -#####*/ - -class go_large_gjalerbron_cage : public GameObjectScript -{ - public: - go_large_gjalerbron_cage() : GameObjectScript("go_large_gjalerbron_cage") { } - - bool OnGossipHello(Player* player, GameObject* go) override - { - go->UseDoorOrButton(); - if ((player->GetTeamId() == TEAM_ALLIANCE && player->GetQuestStatus(QUEST_ALLIANCE_OF_KEYS_AND_CAGES) == QUEST_STATUS_INCOMPLETE) || - (player->GetTeamId() == TEAM_HORDE && player->GetQuestStatus(QUEST_HORDE_OF_KEYS_AND_CAGES) == QUEST_STATUS_INCOMPLETE)) - { - std::list<Creature*> prisonerList; - GetCreatureListWithEntryInGrid(prisonerList, go, NPC_GJALERBRON_PRISONER, INTERACTION_DISTANCE); - for (std::list<Creature*>::const_iterator itr = prisonerList.begin(); itr != prisonerList.end(); ++itr) - { - player->KilledMonsterCredit(NPC_GJALERBRON_PRISONER, (*itr)->GetGUID()); - (*itr)->DespawnOrUnsummon(6000); - (*itr)->AI()->Talk(SAY_FREE); - } - } - return false; - } -}; - -/*######## #### go_veil_skith_cage #####*/ @@ -1293,8 +1228,6 @@ void AddSC_go_scripts() new go_amberpine_outhouse(); new go_hive_pod(); new go_massive_seaforium_charge(); - new go_gjalerbron_cage(); - new go_large_gjalerbron_cage(); new go_veil_skith_cage(); new go_frostblade_shrine(); new go_midsummer_bonfire(); diff --git a/src/server/shared/Common.h b/src/server/shared/Common.h index 27e6cb63514..8ffb138379a 100644 --- a/src/server/shared/Common.h +++ b/src/server/shared/Common.h @@ -79,6 +79,9 @@ inline float finiteAlways(float f) { return std::isfinite(f) ? f : 0.0f; } +inline unsigned long atoul(char const* str) { return strtoul(str, nullptr, 10); } +inline unsigned long long atoull(char const* str) { return strtoull(str, nullptr, 10); } + #define STRINGIZE(a) #a enum TimeConstants diff --git a/src/server/shared/Networking/MessageBuffer.h b/src/server/shared/Networking/MessageBuffer.h index 2dcd4fbc161..a214af9d127 100644 --- a/src/server/shared/Networking/MessageBuffer.h +++ b/src/server/shared/Networking/MessageBuffer.h @@ -81,6 +81,14 @@ public: } } + // Ensures there's "some" free space, make sure to call Normalize() before this + void EnsureFreeSpace() + { + // Double the size of the buffer if it's already full + if (GetRemainingSpace() == 0) + _storage.resize(_storage.size() * 2); + } + void Write(void const* data, std::size_t size) { if (size) diff --git a/src/server/shared/Networking/Socket.h b/src/server/shared/Networking/Socket.h index d3e29ceaaea..b4f1692aeb2 100644 --- a/src/server/shared/Networking/Socket.h +++ b/src/server/shared/Networking/Socket.h @@ -90,7 +90,8 @@ public: return; _readBuffer.Normalize(); - _socket.async_read_some(boost::asio::buffer(_readBuffer.GetWritePointer(), READ_BLOCK_SIZE), + _readBuffer.EnsureFreeSpace(); + _socket.async_read_some(boost::asio::buffer(_readBuffer.GetWritePointer(), _readBuffer.GetRemainingSpace()), std::bind(&Socket<T>::ReadHandlerInternal, this->shared_from_this(), std::placeholders::_1, std::placeholders::_2)); } diff --git a/src/server/shared/Networking/SocketMgr.h b/src/server/shared/Networking/SocketMgr.h index dbe2b8ec902..a62fe973dfa 100644 --- a/src/server/shared/Networking/SocketMgr.h +++ b/src/server/shared/Networking/SocketMgr.h @@ -46,7 +46,16 @@ public: return false; } - _acceptor = new AsyncAcceptor(service, bindIp, port); + try + { + _acceptor = new AsyncAcceptor(service, bindIp, port); + } + catch (boost::system::system_error const& err) + { + TC_LOG_ERROR("network", "Exception caught in SocketMgr.StartNetwork (%s:%u): %s", bindIp.c_str(), port, err.what()); + return false; + } + _threads = CreateThreads(); ASSERT(_threads); diff --git a/src/server/worldserver/worldserver.conf.dist b/src/server/worldserver/worldserver.conf.dist index faf6441fd72..6a1d9706b30 100644 --- a/src/server/worldserver/worldserver.conf.dist +++ b/src/server/worldserver/worldserver.conf.dist @@ -581,6 +581,22 @@ MinCharterName = 2 MinPetName = 2 # +# Guild.CharterCost +# ArenaTeam.CharterCost.2v2 +# ArenaTeam.CharterCost.3v3 +# ArenaTeam.CharterCost.5v5 +# Description: Amount of money (in Copper) the petitions costs. +# Default: 1000 - (10 Silver) +# 800000 - (80 Gold) +# 1200000 - (120 Gold) +# 2000000 - (200 Gold) + +Guild.CharterCost = 1000 +ArenaTeam.CharterCost.2v2 = 800000 +ArenaTeam.CharterCost.3v3 = 1200000 +ArenaTeam.CharterCost.5v5 = 2000000 + +# # MaxWhoListReturns # Description: Set the max number of players returned in the /who list and interface. # Default: 49 - (stable) @@ -3028,7 +3044,7 @@ AuctionHouseBot.Buyer.Neutral.Chance.Ratio = 3 ################################################################################################### ################################################################################################### -# LOGGING SYSTEM SETTINGS +# LOGGING SYSTEM SETTINGS # # Appender config values: Given a appender "name" # Appender.name |