Merge branch 'master' into Playerbot
This commit is contained in:
@@ -223,7 +223,7 @@ def misc_codestyle_check(file: io, file_path: str) -> None:
|
|||||||
# used to check for "if/else (...) {" "} else" ignores "if/else (...) {...}" "#define ... if/else (...) {"
|
# used to check for "if/else (...) {" "} else" ignores "if/else (...) {...}" "#define ... if/else (...) {"
|
||||||
ifelse_curlyregex = r"^[^#define].*\s+(if|else)(\s*\(.*\))?\s*{[^}]*$|}\s*else(\s*{[^}]*$)"
|
ifelse_curlyregex = r"^[^#define].*\s+(if|else)(\s*\(.*\))?\s*{[^}]*$|}\s*else(\s*{[^}]*$)"
|
||||||
# used to catch double semicolons ";;" ignores "(;;)"
|
# used to catch double semicolons ";;" ignores "(;;)"
|
||||||
double_semiregex = r"[^(];;[^)]"
|
double_semiregex = r"(?<!\()\s*;;(?!\))"
|
||||||
# used to catch tabs
|
# used to catch tabs
|
||||||
tab_regex = r"\t"
|
tab_regex = r"\t"
|
||||||
|
|
||||||
@@ -245,7 +245,7 @@ def misc_codestyle_check(file: io, file_path: str) -> None:
|
|||||||
print(
|
print(
|
||||||
f"Curly brackets are not allowed to be leading or trailing if/else statements. Place it on a new line: {file_path} at line {line_number}")
|
f"Curly brackets are not allowed to be leading or trailing if/else statements. Place it on a new line: {file_path} at line {line_number}")
|
||||||
check_failed = True
|
check_failed = True
|
||||||
if re.match(double_semiregex, line):
|
if re.search(double_semiregex, line):
|
||||||
print(
|
print(
|
||||||
f"Double semicolon (;;) found in {file_path} at line {line_number}")
|
f"Double semicolon (;;) found in {file_path} at line {line_number}")
|
||||||
check_failed = True
|
check_failed = True
|
||||||
|
|||||||
@@ -206,18 +206,38 @@ def backtick_check(file: io, file_path: str) -> None:
|
|||||||
global error_handler, results
|
global error_handler, results
|
||||||
file.seek(0)
|
file.seek(0)
|
||||||
check_failed = False
|
check_failed = False
|
||||||
|
|
||||||
|
# Find SQL clauses
|
||||||
pattern = re.compile(
|
pattern = re.compile(
|
||||||
r'\b(SELECT|FROM|JOIN|WHERE|GROUP BY|ORDER BY|DELETE FROM|UPDATE|INSERT INTO|SET)\s+([^;]+)',
|
r'\b(SELECT|FROM|JOIN|WHERE|GROUP BY|ORDER BY|DELETE FROM|UPDATE|INSERT INTO|SET|REPLACE|REPLACE INTO)\s+(.*?)(?=;$|(?=\b(?:WHERE|SET|VALUES)\b)|$)',
|
||||||
re.IGNORECASE)
|
re.IGNORECASE | re.DOTALL
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
# Make sure to ignore values enclosed in single- and doublequotes
|
||||||
|
quote_pattern = re.compile(r"'(?:\\'|[^'])*'|\"(?:\\\"|[^\"])*\"")
|
||||||
|
|
||||||
for line_number, line in enumerate(file, start=1):
|
for line_number, line in enumerate(file, start=1):
|
||||||
matches = pattern.findall(line)
|
# Ignore comments
|
||||||
|
if line.startswith('--'):
|
||||||
|
continue
|
||||||
|
|
||||||
|
# Sanitize single- and doublequotes to prevent false positives
|
||||||
|
sanitized_line = quote_pattern.sub('', line)
|
||||||
|
matches = pattern.findall(sanitized_line)
|
||||||
|
|
||||||
for clause, content in matches:
|
for clause, content in matches:
|
||||||
words = re.findall(r'\b[a-zA-Z_][a-zA-Z0-9_]*\b', content)
|
# Find all words and exclude @variables
|
||||||
|
words = re.findall(r'\b(?<!@)([a-zA-Z_][a-zA-Z0-9_]*)\b', content)
|
||||||
|
|
||||||
for word in words:
|
for word in words:
|
||||||
|
# Skip SQL keywords
|
||||||
if word.upper() in {"SELECT", "FROM", "JOIN", "WHERE", "GROUP", "BY", "ORDER",
|
if word.upper() in {"SELECT", "FROM", "JOIN", "WHERE", "GROUP", "BY", "ORDER",
|
||||||
"DELETE", "UPDATE", "INSERT", "INTO", "SET", "VALUES"}:
|
"DELETE", "UPDATE", "INSERT", "INTO", "SET", "VALUES", "AND",
|
||||||
|
"IN", "OR", "REPLACE"}:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
# Make sure the word is enclosed in backticks
|
||||||
if not re.search(rf'`{re.escape(word)}`', content):
|
if not re.search(rf'`{re.escape(word)}`', content):
|
||||||
print(f"Missing backticks around ({word}). {file_path} at line {line_number}")
|
print(f"Missing backticks around ({word}). {file_path} at line {line_number}")
|
||||||
check_failed = True
|
check_failed = True
|
||||||
|
|||||||
@@ -1,797 +0,0 @@
|
|||||||
-- MySQL dump 10.13 Distrib 8.0.34, for Win64 (x86_64)
|
|
||||||
--
|
|
||||||
-- Host: 127.0.0.1 Database: acore_world
|
|
||||||
-- ------------------------------------------------------
|
|
||||||
-- Server version 8.0.34
|
|
||||||
|
|
||||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
|
||||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
|
||||||
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
|
||||||
/*!50503 SET NAMES utf8mb4 */;
|
|
||||||
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
|
|
||||||
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
|
||||||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
|
||||||
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Table structure for table `player_classlevelstats`
|
|
||||||
--
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `player_classlevelstats`;
|
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
||||||
/*!50503 SET character_set_client = utf8mb4 */;
|
|
||||||
CREATE TABLE `player_classlevelstats` (
|
|
||||||
`class` tinyint unsigned NOT NULL,
|
|
||||||
`level` tinyint unsigned NOT NULL,
|
|
||||||
`basehp` int unsigned NOT NULL DEFAULT '1',
|
|
||||||
`basemana` int unsigned NOT NULL DEFAULT '1',
|
|
||||||
PRIMARY KEY (`class`,`level`)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci PACK_KEYS=0 COMMENT='Stores levels stats.';
|
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Dumping data for table `player_classlevelstats`
|
|
||||||
--
|
|
||||||
|
|
||||||
LOCK TABLES `player_classlevelstats` WRITE;
|
|
||||||
/*!40000 ALTER TABLE `player_classlevelstats` DISABLE KEYS */;
|
|
||||||
INSERT INTO `player_classlevelstats` VALUES
|
|
||||||
(1,1,20,0),
|
|
||||||
(1,2,29,0),
|
|
||||||
(1,3,38,0),
|
|
||||||
(1,4,47,0),
|
|
||||||
(1,5,56,0),
|
|
||||||
(1,6,65,0),
|
|
||||||
(1,7,74,0),
|
|
||||||
(1,8,83,0),
|
|
||||||
(1,9,92,0),
|
|
||||||
(1,10,97,0),
|
|
||||||
(1,11,103,0),
|
|
||||||
(1,12,109,0),
|
|
||||||
(1,13,118,0),
|
|
||||||
(1,14,128,0),
|
|
||||||
(1,15,139,0),
|
|
||||||
(1,16,151,0),
|
|
||||||
(1,17,154,0),
|
|
||||||
(1,18,168,0),
|
|
||||||
(1,19,183,0),
|
|
||||||
(1,20,199,0),
|
|
||||||
(1,21,206,0),
|
|
||||||
(1,22,224,0),
|
|
||||||
(1,23,243,0),
|
|
||||||
(1,24,253,0),
|
|
||||||
(1,25,274,0),
|
|
||||||
(1,26,296,0),
|
|
||||||
(1,27,309,0),
|
|
||||||
(1,28,333,0),
|
|
||||||
(1,29,348,0),
|
|
||||||
(1,30,374,0),
|
|
||||||
(1,31,401,0),
|
|
||||||
(1,32,419,0),
|
|
||||||
(1,33,448,0),
|
|
||||||
(1,34,468,0),
|
|
||||||
(1,35,499,0),
|
|
||||||
(1,36,521,0),
|
|
||||||
(1,37,545,0),
|
|
||||||
(1,38,581,0),
|
|
||||||
(1,39,609,0),
|
|
||||||
(1,40,649,0),
|
|
||||||
(1,41,681,0),
|
|
||||||
(1,42,715,0),
|
|
||||||
(1,43,761,0),
|
|
||||||
(1,44,799,0),
|
|
||||||
(1,45,839,0),
|
|
||||||
(1,46,881,0),
|
|
||||||
(1,47,935,0),
|
|
||||||
(1,48,981,0),
|
|
||||||
(1,49,1029,0),
|
|
||||||
(1,50,1079,0),
|
|
||||||
(1,51,1131,0),
|
|
||||||
(1,52,1185,0),
|
|
||||||
(1,53,1241,0),
|
|
||||||
(1,54,1299,0),
|
|
||||||
(1,55,1359,0),
|
|
||||||
(1,56,1421,0),
|
|
||||||
(1,57,1485,0),
|
|
||||||
(1,58,1551,0),
|
|
||||||
(1,59,1619,0),
|
|
||||||
(1,60,1689,0),
|
|
||||||
(1,61,1902,0),
|
|
||||||
(1,62,2129,0),
|
|
||||||
(1,63,2357,0),
|
|
||||||
(1,64,2612,0),
|
|
||||||
(1,65,2883,0),
|
|
||||||
(1,66,3169,0),
|
|
||||||
(1,67,3455,0),
|
|
||||||
(1,68,3774,0),
|
|
||||||
(1,69,4109,0),
|
|
||||||
(1,70,4444,0),
|
|
||||||
(1,71,4720,0),
|
|
||||||
(1,72,5013,0),
|
|
||||||
(1,73,5325,0),
|
|
||||||
(1,74,5656,0),
|
|
||||||
(1,75,6008,0),
|
|
||||||
(1,76,6381,0),
|
|
||||||
(1,77,6778,0),
|
|
||||||
(1,78,7198,0),
|
|
||||||
(1,79,7646,0),
|
|
||||||
(1,80,8121,0),
|
|
||||||
(2,1,28,60),
|
|
||||||
(2,2,36,78),
|
|
||||||
(2,3,44,98),
|
|
||||||
(2,4,52,104),
|
|
||||||
(2,5,60,111),
|
|
||||||
(2,6,68,134),
|
|
||||||
(2,7,76,143),
|
|
||||||
(2,8,84,153),
|
|
||||||
(2,9,92,179),
|
|
||||||
(2,10,100,192),
|
|
||||||
(2,11,108,205),
|
|
||||||
(2,12,116,219),
|
|
||||||
(2,13,124,249),
|
|
||||||
(2,14,129,265),
|
|
||||||
(2,15,135,282),
|
|
||||||
(2,16,141,315),
|
|
||||||
(2,17,152,334),
|
|
||||||
(2,18,164,354),
|
|
||||||
(2,19,177,390),
|
|
||||||
(2,20,191,412),
|
|
||||||
(2,21,206,435),
|
|
||||||
(2,22,222,459),
|
|
||||||
(2,23,239,499),
|
|
||||||
(2,24,247,525),
|
|
||||||
(2,25,266,552),
|
|
||||||
(2,26,286,579),
|
|
||||||
(2,27,307,621),
|
|
||||||
(2,28,329,648),
|
|
||||||
(2,29,342,675),
|
|
||||||
(2,30,366,702),
|
|
||||||
(2,31,391,729),
|
|
||||||
(2,32,407,756),
|
|
||||||
(2,33,434,798),
|
|
||||||
(2,34,462,825),
|
|
||||||
(2,35,481,852),
|
|
||||||
(2,36,511,879),
|
|
||||||
(2,37,542,906),
|
|
||||||
(2,38,564,933),
|
|
||||||
(2,39,597,960),
|
|
||||||
(2,40,621,987),
|
|
||||||
(2,41,656,1014),
|
|
||||||
(2,42,682,1041),
|
|
||||||
(2,43,719,1068),
|
|
||||||
(2,44,747,1110),
|
|
||||||
(2,45,786,1137),
|
|
||||||
(2,46,816,1164),
|
|
||||||
(2,47,857,1176),
|
|
||||||
(2,48,889,1203),
|
|
||||||
(2,49,922,1230),
|
|
||||||
(2,50,966,1257),
|
|
||||||
(2,51,1001,1284),
|
|
||||||
(2,52,1037,1311),
|
|
||||||
(2,53,1084,1338),
|
|
||||||
(2,54,1122,1365),
|
|
||||||
(2,55,1161,1392),
|
|
||||||
(2,56,1201,1419),
|
|
||||||
(2,57,1252,1446),
|
|
||||||
(2,58,1294,1458),
|
|
||||||
(2,59,1337,1485),
|
|
||||||
(2,60,1381,1512),
|
|
||||||
(2,61,1540,1656),
|
|
||||||
(2,62,1708,1800),
|
|
||||||
(2,63,1884,1944),
|
|
||||||
(2,64,2068,2088),
|
|
||||||
(2,65,2262,2232),
|
|
||||||
(2,66,2466,2377),
|
|
||||||
(2,67,2679,2521),
|
|
||||||
(2,68,2901,2665),
|
|
||||||
(2,69,3134,2809),
|
|
||||||
(2,70,3377,2953),
|
|
||||||
(2,71,3629,3097),
|
|
||||||
(2,72,3900,3241),
|
|
||||||
(2,73,4191,3385),
|
|
||||||
(2,74,4503,3529),
|
|
||||||
(2,75,4839,3673),
|
|
||||||
(2,76,5200,3817),
|
|
||||||
(2,77,5588,3962),
|
|
||||||
(2,78,6005,4106),
|
|
||||||
(2,79,6453,4250),
|
|
||||||
(2,80,6934,4394),
|
|
||||||
(3,1,46,65),
|
|
||||||
(3,2,53,70),
|
|
||||||
(3,3,60,76),
|
|
||||||
(3,4,67,98),
|
|
||||||
(3,5,74,106),
|
|
||||||
(3,6,81,130),
|
|
||||||
(3,7,88,140),
|
|
||||||
(3,8,95,166),
|
|
||||||
(3,9,102,193),
|
|
||||||
(3,10,109,206),
|
|
||||||
(3,11,116,235),
|
|
||||||
(3,12,123,250),
|
|
||||||
(3,13,130,266),
|
|
||||||
(3,14,138,298),
|
|
||||||
(3,15,147,316),
|
|
||||||
(3,16,157,350),
|
|
||||||
(3,17,168,370),
|
|
||||||
(3,18,180,391),
|
|
||||||
(3,19,193,428),
|
|
||||||
(3,20,207,451),
|
|
||||||
(3,21,222,475),
|
|
||||||
(3,22,238,515),
|
|
||||||
(3,23,255,541),
|
|
||||||
(3,24,273,568),
|
|
||||||
(3,25,292,611),
|
|
||||||
(3,26,312,640),
|
|
||||||
(3,27,333,670),
|
|
||||||
(3,28,355,715),
|
|
||||||
(3,29,378,745),
|
|
||||||
(3,30,402,775),
|
|
||||||
(3,31,417,805),
|
|
||||||
(3,32,443,850),
|
|
||||||
(3,33,470,880),
|
|
||||||
(3,34,498,910),
|
|
||||||
(3,35,527,940),
|
|
||||||
(3,36,547,970),
|
|
||||||
(3,37,578,1015),
|
|
||||||
(3,38,610,1045),
|
|
||||||
(3,39,643,1075),
|
|
||||||
(3,40,667,1105),
|
|
||||||
(3,41,702,1135),
|
|
||||||
(3,42,738,1180),
|
|
||||||
(3,43,775,1210),
|
|
||||||
(3,44,803,1240),
|
|
||||||
(3,45,842,1270),
|
|
||||||
(3,46,872,1300),
|
|
||||||
(3,47,913,1330),
|
|
||||||
(3,48,955,1360),
|
|
||||||
(3,49,994,1390),
|
|
||||||
(3,50,1047,1420),
|
|
||||||
(3,51,1067,1450),
|
|
||||||
(3,52,1113,1480),
|
|
||||||
(3,53,1150,1510),
|
|
||||||
(3,54,1198,1540),
|
|
||||||
(3,55,1237,1570),
|
|
||||||
(3,56,1287,1600),
|
|
||||||
(3,57,1328,1630),
|
|
||||||
(3,58,1370,1660),
|
|
||||||
(3,59,1423,1690),
|
|
||||||
(3,60,1467,1720),
|
|
||||||
(3,61,1633,1886),
|
|
||||||
(3,62,1819,2053),
|
|
||||||
(3,63,2003,2219),
|
|
||||||
(3,64,2195,2385),
|
|
||||||
(3,65,2397,2552),
|
|
||||||
(3,66,2623,2718),
|
|
||||||
(3,67,2844,2884),
|
|
||||||
(3,68,3075,3050),
|
|
||||||
(3,69,3316,3217),
|
|
||||||
(3,70,3568,3383),
|
|
||||||
(3,71,3834,3549),
|
|
||||||
(3,72,4120,3716),
|
|
||||||
(3,73,4427,3882),
|
|
||||||
(3,74,4757,4048),
|
|
||||||
(3,75,5112,4215),
|
|
||||||
(3,76,5493,4381),
|
|
||||||
(3,77,5903,4547),
|
|
||||||
(3,78,6343,4713),
|
|
||||||
(3,79,6816,4880),
|
|
||||||
(3,80,7324,5046),
|
|
||||||
(4,1,25,0),
|
|
||||||
(4,2,32,0),
|
|
||||||
(4,3,49,0),
|
|
||||||
(4,4,56,0),
|
|
||||||
(4,5,63,0),
|
|
||||||
(4,6,70,0),
|
|
||||||
(4,7,87,0),
|
|
||||||
(4,8,94,0),
|
|
||||||
(4,9,101,0),
|
|
||||||
(4,10,118,0),
|
|
||||||
(4,11,125,0),
|
|
||||||
(4,12,142,0),
|
|
||||||
(4,13,149,0),
|
|
||||||
(4,14,156,0),
|
|
||||||
(4,15,173,0),
|
|
||||||
(4,16,181,0),
|
|
||||||
(4,17,190,0),
|
|
||||||
(4,18,200,0),
|
|
||||||
(4,19,221,0),
|
|
||||||
(4,20,233,0),
|
|
||||||
(4,21,246,0),
|
|
||||||
(4,22,260,0),
|
|
||||||
(4,23,275,0),
|
|
||||||
(4,24,301,0),
|
|
||||||
(4,25,318,0),
|
|
||||||
(4,26,336,0),
|
|
||||||
(4,27,355,0),
|
|
||||||
(4,28,375,0),
|
|
||||||
(4,29,396,0),
|
|
||||||
(4,30,428,0),
|
|
||||||
(4,31,451,0),
|
|
||||||
(4,32,475,0),
|
|
||||||
(4,33,500,0),
|
|
||||||
(4,34,526,0),
|
|
||||||
(4,35,553,0),
|
|
||||||
(4,36,581,0),
|
|
||||||
(4,37,610,0),
|
|
||||||
(4,38,640,0),
|
|
||||||
(4,39,671,0),
|
|
||||||
(4,40,703,0),
|
|
||||||
(4,41,736,0),
|
|
||||||
(4,42,770,0),
|
|
||||||
(4,43,805,0),
|
|
||||||
(4,44,841,0),
|
|
||||||
(4,45,878,0),
|
|
||||||
(4,46,916,0),
|
|
||||||
(4,47,955,0),
|
|
||||||
(4,48,995,0),
|
|
||||||
(4,49,1026,0),
|
|
||||||
(4,50,1068,0),
|
|
||||||
(4,51,1111,0),
|
|
||||||
(4,52,1155,0),
|
|
||||||
(4,53,1200,0),
|
|
||||||
(4,54,1246,0),
|
|
||||||
(4,55,1283,0),
|
|
||||||
(4,56,1331,0),
|
|
||||||
(4,57,1380,0),
|
|
||||||
(4,58,1430,0),
|
|
||||||
(4,59,1471,0),
|
|
||||||
(4,60,1523,0),
|
|
||||||
(4,61,1702,0),
|
|
||||||
(4,62,1879,0),
|
|
||||||
(4,63,2077,0),
|
|
||||||
(4,64,2285,0),
|
|
||||||
(4,65,2489,0),
|
|
||||||
(4,66,2717,0),
|
|
||||||
(4,67,2941,0),
|
|
||||||
(4,68,3190,0),
|
|
||||||
(4,69,3450,0),
|
|
||||||
(4,70,3704,0),
|
|
||||||
(4,71,3980,0),
|
|
||||||
(4,72,4277,0),
|
|
||||||
(4,73,4596,0),
|
|
||||||
(4,74,4939,0),
|
|
||||||
(4,75,5307,0),
|
|
||||||
(4,76,5703,0),
|
|
||||||
(4,77,6128,0),
|
|
||||||
(4,78,6585,0),
|
|
||||||
(4,79,7076,0),
|
|
||||||
(4,80,7604,0),
|
|
||||||
(5,1,52,73),
|
|
||||||
(5,2,57,76),
|
|
||||||
(5,3,72,95),
|
|
||||||
(5,4,77,114),
|
|
||||||
(5,5,92,133),
|
|
||||||
(5,6,101,152),
|
|
||||||
(5,7,112,171),
|
|
||||||
(5,8,117,190),
|
|
||||||
(5,9,132,209),
|
|
||||||
(5,10,137,212),
|
|
||||||
(5,11,142,215),
|
|
||||||
(5,12,157,234),
|
|
||||||
(5,13,172,254),
|
|
||||||
(5,14,177,260),
|
|
||||||
(5,15,192,282),
|
|
||||||
(5,16,197,305),
|
|
||||||
(5,17,212,329),
|
|
||||||
(5,18,227,339),
|
|
||||||
(5,19,232,365),
|
|
||||||
(5,20,247,377),
|
|
||||||
(5,21,252,405),
|
|
||||||
(5,22,268,434),
|
|
||||||
(5,23,275,449),
|
|
||||||
(5,24,293,480),
|
|
||||||
(5,25,302,497),
|
|
||||||
(5,26,322,530),
|
|
||||||
(5,27,343,549),
|
|
||||||
(5,28,355,584),
|
|
||||||
(5,29,378,605),
|
|
||||||
(5,30,392,627),
|
|
||||||
(5,31,417,665),
|
|
||||||
(5,32,433,689),
|
|
||||||
(5,33,460,728),
|
|
||||||
(5,34,478,752),
|
|
||||||
(5,35,507,776),
|
|
||||||
(5,36,527,800),
|
|
||||||
(5,37,548,839),
|
|
||||||
(5,38,580,863),
|
|
||||||
(5,39,603,887),
|
|
||||||
(5,40,637,911),
|
|
||||||
(5,41,662,950),
|
|
||||||
(5,42,698,974),
|
|
||||||
(5,43,725,998),
|
|
||||||
(5,44,763,1022),
|
|
||||||
(5,45,792,1046),
|
|
||||||
(5,46,822,1070),
|
|
||||||
(5,47,863,1094),
|
|
||||||
(5,48,895,1118),
|
|
||||||
(5,49,928,1142),
|
|
||||||
(5,50,972,1166),
|
|
||||||
(5,51,1007,1190),
|
|
||||||
(5,52,1053,1214),
|
|
||||||
(5,53,1090,1238),
|
|
||||||
(5,54,1128,1262),
|
|
||||||
(5,55,1177,1271),
|
|
||||||
(5,56,1217,1295),
|
|
||||||
(5,57,1258,1319),
|
|
||||||
(5,58,1300,1343),
|
|
||||||
(5,59,1353,1352),
|
|
||||||
(5,60,1397,1376),
|
|
||||||
(5,61,1557,1500),
|
|
||||||
(5,62,1738,1625),
|
|
||||||
(5,63,1916,1749),
|
|
||||||
(5,64,2101,1873),
|
|
||||||
(5,65,2295,1998),
|
|
||||||
(5,66,2495,2122),
|
|
||||||
(5,67,2719,2247),
|
|
||||||
(5,68,2936,2371),
|
|
||||||
(5,69,3160,2495),
|
|
||||||
(5,70,3391,2620),
|
|
||||||
(5,71,3644,2744),
|
|
||||||
(5,72,3916,2868),
|
|
||||||
(5,73,4208,2993),
|
|
||||||
(5,74,4522,3117),
|
|
||||||
(5,75,4859,3242),
|
|
||||||
(5,76,5221,3366),
|
|
||||||
(5,77,5610,3490),
|
|
||||||
(5,78,6028,3615),
|
|
||||||
(5,79,6477,3739),
|
|
||||||
(5,80,6960,3863),
|
|
||||||
(6,55,1359,0),
|
|
||||||
(6,56,1421,0),
|
|
||||||
(6,57,1485,0),
|
|
||||||
(6,58,1551,0),
|
|
||||||
(6,59,1619,0),
|
|
||||||
(6,60,1689,0),
|
|
||||||
(6,61,1902,0),
|
|
||||||
(6,62,2129,0),
|
|
||||||
(6,63,2357,0),
|
|
||||||
(6,64,2612,0),
|
|
||||||
(6,65,2883,0),
|
|
||||||
(6,66,3169,0),
|
|
||||||
(6,67,3455,0),
|
|
||||||
(6,68,3774,0),
|
|
||||||
(6,69,4109,0),
|
|
||||||
(6,70,4444,0),
|
|
||||||
(6,71,4720,0),
|
|
||||||
(6,72,5013,0),
|
|
||||||
(6,73,5325,0),
|
|
||||||
(6,74,5656,0),
|
|
||||||
(6,75,6008,0),
|
|
||||||
(6,76,6381,0),
|
|
||||||
(6,77,6778,0),
|
|
||||||
(6,78,7199,0),
|
|
||||||
(6,79,7646,0),
|
|
||||||
(6,80,8121,0),
|
|
||||||
(7,1,40,85),
|
|
||||||
(7,2,47,91),
|
|
||||||
(7,3,55,98),
|
|
||||||
(7,4,62,106),
|
|
||||||
(7,5,70,115),
|
|
||||||
(7,6,77,125),
|
|
||||||
(7,7,85,136),
|
|
||||||
(7,8,92,148),
|
|
||||||
(7,9,100,161),
|
|
||||||
(7,10,107,175),
|
|
||||||
(7,11,114,190),
|
|
||||||
(7,12,122,206),
|
|
||||||
(7,13,129,223),
|
|
||||||
(7,14,137,241),
|
|
||||||
(7,15,144,260),
|
|
||||||
(7,16,152,280),
|
|
||||||
(7,17,161,301),
|
|
||||||
(7,18,170,323),
|
|
||||||
(7,19,181,346),
|
|
||||||
(7,20,193,370),
|
|
||||||
(7,21,205,395),
|
|
||||||
(7,22,219,421),
|
|
||||||
(7,23,234,448),
|
|
||||||
(7,24,250,476),
|
|
||||||
(7,25,257,505),
|
|
||||||
(7,26,275,535),
|
|
||||||
(7,27,294,566),
|
|
||||||
(7,28,315,598),
|
|
||||||
(7,29,336,631),
|
|
||||||
(7,30,358,665),
|
|
||||||
(7,31,371,699),
|
|
||||||
(7,32,396,733),
|
|
||||||
(7,33,422,767),
|
|
||||||
(7,34,448,786),
|
|
||||||
(7,35,465,820),
|
|
||||||
(7,36,494,854),
|
|
||||||
(7,37,524,888),
|
|
||||||
(7,38,545,922),
|
|
||||||
(7,39,577,941),
|
|
||||||
(7,40,610,975),
|
|
||||||
(7,41,633,1009),
|
|
||||||
(7,42,669,1028),
|
|
||||||
(7,43,694,1062),
|
|
||||||
(7,44,732,1096),
|
|
||||||
(7,45,760,1115),
|
|
||||||
(7,46,799,1149),
|
|
||||||
(7,47,829,1183),
|
|
||||||
(7,48,871,1202),
|
|
||||||
(7,49,903,1236),
|
|
||||||
(7,50,947,1255),
|
|
||||||
(7,51,981,1289),
|
|
||||||
(7,52,1027,1323),
|
|
||||||
(7,53,1064,1342),
|
|
||||||
(7,54,1101,1376),
|
|
||||||
(7,55,1150,1395),
|
|
||||||
(7,56,1190,1414),
|
|
||||||
(7,57,1231,1448),
|
|
||||||
(7,58,1283,1467),
|
|
||||||
(7,59,1326,1501),
|
|
||||||
(7,60,1423,1520),
|
|
||||||
(7,61,1528,1664),
|
|
||||||
(7,62,1694,1808),
|
|
||||||
(7,63,1883,1951),
|
|
||||||
(7,64,2067,2095),
|
|
||||||
(7,65,2262,2239),
|
|
||||||
(7,66,2465,2383),
|
|
||||||
(7,67,2679,2527),
|
|
||||||
(7,68,2903,2670),
|
|
||||||
(7,69,3136,2814),
|
|
||||||
(7,70,3380,2958),
|
|
||||||
(7,71,3633,3102),
|
|
||||||
(7,72,3903,3246),
|
|
||||||
(7,73,4194,3389),
|
|
||||||
(7,74,4507,3533),
|
|
||||||
(7,75,4843,3677),
|
|
||||||
(7,76,5203,3821),
|
|
||||||
(7,77,5592,3965),
|
|
||||||
(7,78,6009,4108),
|
|
||||||
(7,79,6457,4252),
|
|
||||||
(7,80,6939,4396),
|
|
||||||
(8,1,32,100),
|
|
||||||
(8,2,47,110),
|
|
||||||
(8,3,52,106),
|
|
||||||
(8,4,67,118),
|
|
||||||
(8,5,82,131),
|
|
||||||
(8,6,97,130),
|
|
||||||
(8,7,102,145),
|
|
||||||
(8,8,117,146),
|
|
||||||
(8,9,132,163),
|
|
||||||
(8,10,137,196),
|
|
||||||
(8,11,152,215),
|
|
||||||
(8,12,167,220),
|
|
||||||
(8,13,172,241),
|
|
||||||
(8,14,187,263),
|
|
||||||
(8,15,202,271),
|
|
||||||
(8,16,207,295),
|
|
||||||
(8,17,222,305),
|
|
||||||
(8,18,237,331),
|
|
||||||
(8,19,242,343),
|
|
||||||
(8,20,257,371),
|
|
||||||
(8,21,272,385),
|
|
||||||
(8,22,277,415),
|
|
||||||
(8,23,292,431),
|
|
||||||
(8,24,298,463),
|
|
||||||
(8,25,315,481),
|
|
||||||
(8,26,333,515),
|
|
||||||
(8,27,342,535),
|
|
||||||
(8,28,362,556),
|
|
||||||
(8,29,373,592),
|
|
||||||
(8,30,395,613),
|
|
||||||
(8,31,418,634),
|
|
||||||
(8,32,432,670),
|
|
||||||
(8,33,457,691),
|
|
||||||
(8,34,473,712),
|
|
||||||
(8,35,500,733),
|
|
||||||
(8,36,518,754),
|
|
||||||
(8,37,547,790),
|
|
||||||
(8,38,577,811),
|
|
||||||
(8,39,598,832),
|
|
||||||
(8,40,630,853),
|
|
||||||
(8,41,653,874),
|
|
||||||
(8,42,687,895),
|
|
||||||
(8,43,712,916),
|
|
||||||
(8,44,748,937),
|
|
||||||
(8,45,775,958),
|
|
||||||
(8,46,813,979),
|
|
||||||
(8,47,842,1000),
|
|
||||||
(8,48,882,1021),
|
|
||||||
(8,49,913,1042),
|
|
||||||
(8,50,955,1048),
|
|
||||||
(8,51,988,1069),
|
|
||||||
(8,52,1032,1090),
|
|
||||||
(8,53,1067,1111),
|
|
||||||
(8,54,1103,1117),
|
|
||||||
(8,55,1150,1138),
|
|
||||||
(8,56,1188,1159),
|
|
||||||
(8,57,1237,1165),
|
|
||||||
(8,58,1277,1186),
|
|
||||||
(8,59,1328,1192),
|
|
||||||
(8,60,1370,1213),
|
|
||||||
(8,61,1526,1316),
|
|
||||||
(8,62,1702,1419),
|
|
||||||
(8,63,1875,1521),
|
|
||||||
(8,64,2070,1624),
|
|
||||||
(8,65,2261,1727),
|
|
||||||
(8,66,2461,1830),
|
|
||||||
(8,67,2686,1932),
|
|
||||||
(8,68,2906,2035),
|
|
||||||
(8,69,3136,2138),
|
|
||||||
(8,70,3393,2241),
|
|
||||||
(8,71,3646,2343),
|
|
||||||
(8,72,3918,2446),
|
|
||||||
(8,73,4210,2549),
|
|
||||||
(8,74,4524,2652),
|
|
||||||
(8,75,4861,2754),
|
|
||||||
(8,76,5223,2857),
|
|
||||||
(8,77,5612,2960),
|
|
||||||
(8,78,6030,3063),
|
|
||||||
(8,79,6480,3165),
|
|
||||||
(8,80,6963,3268),
|
|
||||||
(9,1,23,90),
|
|
||||||
(9,2,28,98),
|
|
||||||
(9,3,43,107),
|
|
||||||
(9,4,48,102),
|
|
||||||
(9,5,63,113),
|
|
||||||
(9,6,68,126),
|
|
||||||
(9,7,83,144),
|
|
||||||
(9,8,88,162),
|
|
||||||
(9,9,93,180),
|
|
||||||
(9,10,108,198),
|
|
||||||
(9,11,123,200),
|
|
||||||
(9,12,128,218),
|
|
||||||
(9,13,143,237),
|
|
||||||
(9,14,148,257),
|
|
||||||
(9,15,153,278),
|
|
||||||
(9,16,168,300),
|
|
||||||
(9,17,173,308),
|
|
||||||
(9,18,189,332),
|
|
||||||
(9,19,196,357),
|
|
||||||
(9,20,204,383),
|
|
||||||
(9,21,223,395),
|
|
||||||
(9,22,233,423),
|
|
||||||
(9,23,244,452),
|
|
||||||
(9,24,266,467),
|
|
||||||
(9,25,279,498),
|
|
||||||
(9,26,293,530),
|
|
||||||
(9,27,318,548),
|
|
||||||
(9,28,334,582),
|
|
||||||
(9,29,351,602),
|
|
||||||
(9,30,379,638),
|
|
||||||
(9,31,398,674),
|
|
||||||
(9,32,418,695),
|
|
||||||
(9,33,439,731),
|
|
||||||
(9,34,471,752),
|
|
||||||
(9,35,494,788),
|
|
||||||
(9,36,518,809),
|
|
||||||
(9,37,543,830),
|
|
||||||
(9,38,569,866),
|
|
||||||
(9,39,606,887),
|
|
||||||
(9,40,634,923),
|
|
||||||
(9,41,663,944),
|
|
||||||
(9,42,693,965),
|
|
||||||
(9,43,724,1001),
|
|
||||||
(9,44,756,1022),
|
|
||||||
(9,45,799,1043),
|
|
||||||
(9,46,832,1064),
|
|
||||||
(9,47,868,1100),
|
|
||||||
(9,48,904,1121),
|
|
||||||
(9,49,941,1142),
|
|
||||||
(9,50,979,1163),
|
|
||||||
(9,51,1018,1184),
|
|
||||||
(9,52,1058,1205),
|
|
||||||
(9,53,1099,1226),
|
|
||||||
(9,54,1141,1247),
|
|
||||||
(9,55,1184,1268),
|
|
||||||
(9,56,1228,1289),
|
|
||||||
(9,57,1273,1310),
|
|
||||||
(9,58,1319,1331),
|
|
||||||
(9,59,1366,1352),
|
|
||||||
(9,60,1414,1373),
|
|
||||||
(9,61,1580,1497),
|
|
||||||
(9,62,1755,1621),
|
|
||||||
(9,63,1939,1745),
|
|
||||||
(9,64,2133,1870),
|
|
||||||
(9,65,2323,1994),
|
|
||||||
(9,66,2535,2118),
|
|
||||||
(9,67,2758,2242),
|
|
||||||
(9,68,2991,2366),
|
|
||||||
(9,69,3235,2490),
|
|
||||||
(9,70,3490,2615),
|
|
||||||
(9,71,3750,2739),
|
|
||||||
(9,72,4025,2863),
|
|
||||||
(9,73,4330,2987),
|
|
||||||
(9,74,4646,3111),
|
|
||||||
(9,75,4997,3235),
|
|
||||||
(9,76,5373,3360),
|
|
||||||
(9,77,5774,3483),
|
|
||||||
(9,78,6207,3608),
|
|
||||||
(9,79,6667,3732),
|
|
||||||
(9,80,7136,3856),
|
|
||||||
(11,1,44,60),
|
|
||||||
(11,2,51,66),
|
|
||||||
(11,3,58,73),
|
|
||||||
(11,4,75,81),
|
|
||||||
(11,5,82,90),
|
|
||||||
(11,6,89,100),
|
|
||||||
(11,7,106,111),
|
|
||||||
(11,8,113,123),
|
|
||||||
(11,9,120,136),
|
|
||||||
(11,10,137,150),
|
|
||||||
(11,11,144,165),
|
|
||||||
(11,12,151,182),
|
|
||||||
(11,13,168,200),
|
|
||||||
(11,14,175,219),
|
|
||||||
(11,15,182,239),
|
|
||||||
(11,16,199,260),
|
|
||||||
(11,17,206,282),
|
|
||||||
(11,18,214,305),
|
|
||||||
(11,19,233,329),
|
|
||||||
(11,20,243,354),
|
|
||||||
(11,21,254,380),
|
|
||||||
(11,22,266,392),
|
|
||||||
(11,23,289,420),
|
|
||||||
(11,24,303,449),
|
|
||||||
(11,25,318,479),
|
|
||||||
(11,26,334,509),
|
|
||||||
(11,27,361,524),
|
|
||||||
(11,28,379,554),
|
|
||||||
(11,29,398,584),
|
|
||||||
(11,30,418,614),
|
|
||||||
(11,31,439,629),
|
|
||||||
(11,32,461,659),
|
|
||||||
(11,33,494,689),
|
|
||||||
(11,34,518,704),
|
|
||||||
(11,35,543,734),
|
|
||||||
(11,36,569,749),
|
|
||||||
(11,37,596,779),
|
|
||||||
(11,38,624,809),
|
|
||||||
(11,39,653,824),
|
|
||||||
(11,40,683,854),
|
|
||||||
(11,41,714,869),
|
|
||||||
(11,42,746,899),
|
|
||||||
(11,43,779,914),
|
|
||||||
(11,44,823,944),
|
|
||||||
(11,45,858,959),
|
|
||||||
(11,46,894,989),
|
|
||||||
(11,47,921,1004),
|
|
||||||
(11,48,959,1019),
|
|
||||||
(11,49,998,1049),
|
|
||||||
(11,50,1038,1064),
|
|
||||||
(11,51,1079,1079),
|
|
||||||
(11,52,1121,1109),
|
|
||||||
(11,53,1164,1124),
|
|
||||||
(11,54,1208,1139),
|
|
||||||
(11,55,1253,1154),
|
|
||||||
(11,56,1299,1169),
|
|
||||||
(11,57,1346,1199),
|
|
||||||
(11,58,1384,1214),
|
|
||||||
(11,59,1433,1229),
|
|
||||||
(11,60,1483,1244),
|
|
||||||
(11,61,1657,1357),
|
|
||||||
(11,62,1840,1469),
|
|
||||||
(11,63,2020,1582),
|
|
||||||
(11,64,2222,1694),
|
|
||||||
(11,65,2433,1807),
|
|
||||||
(11,66,2640,1919),
|
|
||||||
(11,67,2872,2032),
|
|
||||||
(11,68,3114,2145),
|
|
||||||
(11,69,3351,2257),
|
|
||||||
(11,70,3614,2370),
|
|
||||||
(11,71,3883,2482),
|
|
||||||
(11,72,4172,2595),
|
|
||||||
(11,73,4483,2708),
|
|
||||||
(11,74,4817,2820),
|
|
||||||
(11,75,5176,2933),
|
|
||||||
(11,76,5562,3045),
|
|
||||||
(11,77,5977,3158),
|
|
||||||
(11,78,6423,3270),
|
|
||||||
(11,79,6902,3383),
|
|
||||||
(11,80,7417,3496);
|
|
||||||
/*!40000 ALTER TABLE `player_classlevelstats` ENABLE KEYS */;
|
|
||||||
UNLOCK TABLES;
|
|
||||||
|
|
||||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
|
||||||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
|
||||||
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
|
||||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
|
||||||
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
|
||||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
|
||||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
|
||||||
|
|
||||||
-- Dump completed on 2024-12-17 22:34:15
|
|
||||||
|
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
-- DB update 2025_02_04_00 -> 2025_02_05_00
|
||||||
|
--
|
||||||
|
DELETE FROM `spell_script_names` WHERE `spell_id` IN (45370, 45367);
|
||||||
|
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
|
||||||
|
(45370, 'spell_gen_translocate_down'),
|
||||||
|
(45367, 'spell_gen_translocate_up');
|
||||||
|
|
||||||
|
UPDATE `conditions` SET `ConditionValue2` = 187428, `Comment` = 'Translocation (Up)' WHERE `SourceEntry` = 45368 AND `SourceTypeOrReferenceId` = 13;
|
||||||
|
UPDATE `conditions` SET `ConditionValue2` = 187431, `Comment` = 'Translocation (Down)' WHERE `SourceEntry` = 45371 AND `SourceTypeOrReferenceId` = 13;
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
-- DB update 2025_02_05_00 -> 2025_02_05_01
|
||||||
|
|
||||||
|
-- Trapdoor Crawler
|
||||||
|
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 28221;
|
||||||
|
|
||||||
|
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 28221);
|
||||||
|
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||||
|
(28221, 0, 0, 0, 1, 0, 100, 0, 20000, 30000, 20000, 30000, 0, 0, 11, 50981, 32, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Trapdoor Crawler - Out of Combat - Cast \'Burrow\''),
|
||||||
|
(28221, 0, 1, 0, 23, 0, 100, 0, 50981, 1, 40000, 50000, 0, 0, 28, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Trapdoor Crawler - On Aura \'Burrow\' - Remove Aura \'null\''),
|
||||||
|
(28221, 0, 2, 0, 4, 0, 100, 0, 0, 0, 0, 0, 0, 0, 28, 50981, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Trapdoor Crawler - On Aggro - Remove Aura \'Burrow\''),
|
||||||
|
(28221, 0, 3, 0, 0, 0, 100, 0, 2000, 5000, 4000, 8000, 0, 0, 11, 11918, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Trapdoor Crawler - In Combat - Cast \'Poison\'');
|
||||||
|
|
||||||
|
-- Thornvine Creeper
|
||||||
|
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 23874;
|
||||||
|
|
||||||
|
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 23874);
|
||||||
|
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||||
|
(23874, 0, 0, 0, 1, 0, 100, 0, 4000, 6000, 4000, 6000, 0, 0, 11, 33907, 32, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Thornvine Creeper - Out of Combat - Cast \'Thorns\''),
|
||||||
|
(23874, 0, 1, 0, 0, 0, 100, 0, 4000, 6000, 12000, 16000, 0, 0, 11, 31287, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Thornvine Creeper - In Combat - Cast \'Entangling Roots\'');
|
||||||
|
|
||||||
|
-- Keeper Witherleaf
|
||||||
|
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 24638;
|
||||||
|
|
||||||
|
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 24638);
|
||||||
|
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||||
|
(24638, 0, 0, 0, 0, 0, 100, 0, 4000, 12000, 4000, 12000, 0, 0, 11, 43619, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Keeper Witherleaf - In Combat - Cast \'Wrath\'');
|
||||||
|
|
||||||
|
-- Runic War Golem
|
||||||
|
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 26347;
|
||||||
|
|
||||||
|
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 26347);
|
||||||
|
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||||
|
(26347, 0, 0, 0, 0, 0, 100, 0, 8000, 12000, 20000, 30000, 0, 0, 11, 52702, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Runic War Golem - In Combat - Cast \'Rune Punch\'');
|
||||||
|
|
||||||
|
-- Icetouched Earthrager
|
||||||
|
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 29436;
|
||||||
|
|
||||||
|
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 29436);
|
||||||
|
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||||
|
(29436, 0, 0, 0, 0, 0, 100, 0, 4000, 8000, 12000, 24000, 0, 0, 11, 55216, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Icetouched Earthrager - In Combat - Cast \'Avalanche\'');
|
||||||
|
|
||||||
|
-- Tukemuth
|
||||||
|
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 32400;
|
||||||
|
|
||||||
|
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 32400);
|
||||||
|
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||||
|
(32400, 0, 0, 0, 9, 0, 100, 0, 0, 0, 9000, 13000, 0, 5, 11, 50410, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Tukemuth - Within 0-5 Range - Cast \'Tusk Strike\''),
|
||||||
|
(32400, 0, 1, 0, 0, 0, 100, 0, 9000, 17000, 15000, 22000, 0, 0, 11, 57066, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Tukemuth - In Combat - Cast \'Trample\'');
|
||||||
|
|
||||||
|
-- Wandering Shadow
|
||||||
|
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 30842;
|
||||||
|
|
||||||
|
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 30842);
|
||||||
|
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||||
|
(30842, 0, 0, 0, 0, 0, 100, 0, 4000, 8000, 12000, 24000, 0, 0, 11, 38240, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Wandering Shadow - In Combat - Cast \'Chilling Touch\''),
|
||||||
|
(30842, 0, 1, 0, 0, 0, 50, 0, 25000, 30000, 25000, 30000, 0, 0, 11, 18267, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Wandering Shadow - In Combat - Cast \'Curse of Weakness\'');
|
||||||
|
|
||||||
|
-- Shadow Revenant
|
||||||
|
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 30872;
|
||||||
|
|
||||||
|
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 30872);
|
||||||
|
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||||
|
(30872, 0, 0, 0, 0, 0, 100, 0, 4000, 8000, 12000, 20000, 0, 0, 11, 51131, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Shadow Revenant - In Combat - Cast \'Strangulate\'');
|
||||||
|
|
||||||
|
-- Iron Rune Sentinel
|
||||||
|
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 24316;
|
||||||
|
|
||||||
|
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 24316);
|
||||||
|
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||||
|
(24316, 0, 0, 0, 0, 0, 100, 0, 8000, 12000, 14000, 22000, 0, 0, 11, 48416, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Iron Rune Sentinel - In Combat - Cast \'Rune Detonation\'');
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
-- DB update 2025_02_05_01 -> 2025_02_06_00
|
||||||
|
--
|
||||||
|
UPDATE `creature_template` SET `flags_extra` = `flags_extra`|2147483648 WHERE `entry` = 24850;
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
-- DB update 2025_02_06_00 -> 2025_02_06_01
|
||||||
|
--
|
||||||
|
UPDATE `creature_text` SET `Language` = 0 WHERE `CreatureID` = 24882 AND `GroupId`= 3 AND `ID` = 0;
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
-- DB update 2025_02_06_01 -> 2025_02_06_02
|
||||||
|
-- Fix quest 11343 so that quest credit spell is cast on caster, not player
|
||||||
|
UPDATE `smart_scripts`
|
||||||
|
SET `target_type` = 1
|
||||||
|
WHERE `entryorguid` = 2431400 AND `action_type` = 11 AND `action_param1` = 43458;
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
-- DB update 2025_02_06_02 -> 2025_02_06_03
|
||||||
|
|
||||||
|
SET @LOOTTHISTLEBOAR := 1985; -- Skinning loot template for Thistle Boar
|
||||||
|
SET @LOOTSCORPIDWORKER := 3124; -- Skinning loot template for Scorpid Worker
|
||||||
|
SET @LIGHTLEATHER := 2318; -- Light Leather
|
||||||
|
SET @RUINEDSCRAPS := 2934; -- Ruined Leather Scraps
|
||||||
|
|
||||||
|
-- Setting skinloot as 0 for creature that should not be skinnable
|
||||||
|
UPDATE `creature_template` SET `skinloot` = 0 WHERE `entry` IN (1984, 1985, 2032, 3124);
|
||||||
|
|
||||||
|
-- Removing now unused skinning loot template to keep the DB cleaned up
|
||||||
|
DELETE FROM `skinning_loot_template` WHERE `entry` = @LOOTTHISTLEBOAR AND `item` = @LIGHTLEATHER;
|
||||||
|
DELETE FROM `skinning_loot_template` WHERE `entry` = @LOOTTHISTLEBOAR AND `item` = @RUINEDSCRAPS;
|
||||||
|
DELETE FROM `skinning_loot_template` WHERE `entry` = @LOOTSCORPIDWORKER AND `item` = @LIGHTLEATHER;
|
||||||
|
DELETE FROM `skinning_loot_template` WHERE `entry` = @LOOTSCORPIDWORKER AND `item` = @RUINEDSCRAPS;
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
-- DB update 2025_02_06_03 -> 2025_02_06_04
|
||||||
|
-- Update gold drop rate with min 437 and max 3869 like picture
|
||||||
|
-- I suspect realistically ~200 ~4000
|
||||||
|
UPDATE `creature_template` SET `mingold` = 437, `maxgold` = 3869 WHERE `entry` IN (18853, 19453, 18852, 18857, 19779, 18855, 19643);
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
-- DB update 2025_02_06_04 -> 2025_02_07_00
|
||||||
|
--
|
||||||
|
UPDATE `creature_addon` SET `mount` = 20675 WHERE `guid` = 94387;
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
-- DB update 2025_02_07_00 -> 2025_02_07_01
|
||||||
|
|
||||||
|
-- Thornvine Creeper skinloot
|
||||||
|
UPDATE `creature_template` SET `skinloot` = 80007 WHERE (`entry` = 23874);
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
-- DB update 2025_02_07_01 -> 2025_02_07_02
|
||||||
|
UPDATE `creature_template` SET `skinloot` = 80103 WHERE `entry` = 24316;
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
-- DB update 2025_02_07_02 -> 2025_02_07_03
|
||||||
|
-- Setting the 'CREATURE_FLAG_EXTRA_CIVILIAN' flag
|
||||||
|
UPDATE `creature_template` SET `flags_extra` = `flags_extra` | 2 WHERE `entry` = 27064;
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
-- DB update 2025_02_07_03 -> 2025_02_07_04
|
||||||
|
-- Failed Incursion requirement removed from Lost in Action
|
||||||
|
UPDATE `quest_template_addon` SET `PrevQuestID` = 0 WHERE (`ID` = 9738);
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
-- DB update 2025_02_07_04 -> 2025_02_09_00
|
||||||
|
-- Kaylaan smart ai
|
||||||
|
SET @ENTRY := 20780;
|
||||||
|
UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = @ENTRY;
|
||||||
|
DELETE FROM `smart_scripts` WHERE `source_type` = 0 AND `entryOrGuid` = @ENTRY;
|
||||||
|
DELETE FROM `smart_scripts` WHERE `source_type` = 9 AND `entryOrGuid` IN (@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`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||||
|
(@ENTRY, 0, 0, 0, 1, 0, 100, 0, 0, 0, 74000, 105000, 0, 0, 80, @ENTRY * 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Kaylaan - Out of Combat - Run Script'),
|
||||||
|
(@ENTRY * 100, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Kaylaan - Actionlist - Say Line 0'),
|
||||||
|
(@ENTRY * 100, 9, 1, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 0, 0, 11, 35746, 0, 0, 0, 0, 0, 19, 20922, 10, 0, 0, 0, 0, 0, 'Kaylaan - Actionlist - Cast \'Resurrection\''),
|
||||||
|
(@ENTRY * 100, 9, 2, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Kaylaan - Actionlist - Say Line 1');
|
||||||
|
|
||||||
|
-- Add creature spawn
|
||||||
|
SET @CGUID := 425;
|
||||||
|
DELETE FROM `creature` WHERE `id1` = 20922 AND `guid` = @CGUID;
|
||||||
|
INSERT INTO `creature` (`guid`, `id1`, `id2`, `id3`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `ScriptName`, `VerifiedBuild`) VALUES
|
||||||
|
(@CGUID, 20922, 0, 0, 530, 3523, 3852, 1, 1, 0, 4034.83203125, 3545.646728515625, 121.47908782958984, 2.670353651046753, 120, 0, 0, 6986, 0, 0, 0, 0, 0, '', 58629);
|
||||||
|
|
||||||
|
-- aura 29266 Permanent Feign Death
|
||||||
|
DELETE FROM `creature_addon` WHERE (`guid` IN (@CGUID));
|
||||||
|
INSERT INTO `creature_addon` (`guid`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `visibilityDistanceType`, `auras`) VALUES
|
||||||
|
(@CGUID, 0, 0, 0, 1, 0, 0, '29266');
|
||||||
|
|
||||||
|
-- add creature_text
|
||||||
|
DELETE FROM `creature_text` WHERE `CreatureID` = 20780;
|
||||||
|
INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
|
||||||
|
(20780, 0, 1, 'Light! Do not fail me!', 12, 0, 100, 274, 0, 0, 18385, 0, 'Kaylaan'),
|
||||||
|
(20780, 0, 2, 'Do not die on me, vindicator!', 12, 0, 100, 0, 0, 0, 18386, 0, 'Kaylaan'),
|
||||||
|
(20780, 0, 3, 'Kael\'thas and the Legion... just what we needed!', 12, 0, 100, 0, 0, 0, 18387, 0, 'Kaylaan'),
|
||||||
|
(20780, 1, 0, 'It is hopeless... I\'ve done all I can.', 12, 0, 100, 274, 0, 0, 18594, 0, 'Kaylaan'),
|
||||||
|
(20780, 1, 1, 'I\'ve failed. The Light has abandoned me.', 12, 0, 100, 274, 0, 0, 18595, 0, 'Kaylaan');
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
-- DB update 2025_02_09_00 -> 2025_02_09_01
|
||||||
|
--
|
||||||
|
SET
|
||||||
|
@sunwellnone = 116,
|
||||||
|
@sunwellfirst = 117,
|
||||||
|
@sunwellsecond = 118,
|
||||||
|
@sunwellall = 119;
|
||||||
|
|
||||||
|
-- Vindicator Moorba
|
||||||
|
-- move menuID entries and conditions from 51004 to 9293 `creature_template.gossip_menu_id`
|
||||||
|
UPDATE `gossip_menu` SET `MenuID` = 9293 WHERE `MenuID` = 51004 AND `TextID` IN (12602, 12603, 12605);
|
||||||
|
UPDATE `conditions` SET `SourceGroup` = 9293 WHERE `SourceGroup` = 51004 AND `SourceEntry` IN (12602, 12603, 12605) AND `ConditionTypeOrReference` = 12 AND `ConditionValue1` IN (@sunwellnone, @sunwellfirst, @sunwellsecond);
|
||||||
|
|
||||||
|
DELETE FROM `conditions` WHERE `ConditionTypeOrReference` = 12 AND `ConditionValue1` IN (@sunwellall) AND `SourceGroup` IN (9307, 9293) AND `SourceEntry` IN (12623, 12604);
|
||||||
|
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
|
||||||
|
-- Exarch Nasuun (Shattrath)
|
||||||
|
(14, 9307, 12623, 0, 0, 12, 0, @sunwellall, 0, 0, 0, 0, 0, '', 'Show gossip text if the event ''SWP - All Gates Open'' is active'),
|
||||||
|
-- Vindicator Moorba (SWP)
|
||||||
|
(14, 9293, 12604, 0, 0, 12, 0, @sunwellall, 0, 0, 0, 0, 0, '', 'Show gossip text if the event ''SWP - All Gates Open'' is active');
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
-- DB update 2025_02_09_01 -> 2025_02_09_02
|
||||||
|
|
||||||
|
-- Theremis
|
||||||
|
UPDATE `creature_template_movement` SET `Flight` = 1, `Ground` = 2 WHERE (`CreatureId` = 25976);
|
||||||
|
|
||||||
|
-- Shattered Sun Archmage
|
||||||
|
UPDATE `creature_template_movement` SET `Flight` = 1, `Ground` = 2 WHERE (`CreatureId` = 25170);
|
||||||
|
|
||||||
|
-- Yrma
|
||||||
|
UPDATE `creature_template_movement` SET `Flight` = 1, `Ground` = 2 WHERE (`CreatureId` = 25977);
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
-- DB update 2025_02_09_02 -> 2025_02_09_03
|
||||||
|
UPDATE `creature_template` SET `speed_run` = 0.42857 WHERE `entry` = 25543;
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
-- DB update 2025_02_09_03 -> 2025_02_09_04
|
||||||
|
--
|
||||||
|
UPDATE `creature_template_movement` SET `Flight` = 2 WHERE `CreatureId` = 25038;
|
||||||
|
|
||||||
|
DELETE FROM `creature` WHERE `id1` = 25038;
|
||||||
|
|
||||||
|
-- Pathing for Entry: 25038
|
||||||
|
SET @NPC := 25038;
|
||||||
|
SET @PATH := @NPC * 10;
|
||||||
|
DELETE FROM `waypoint_data` WHERE `id`=@PATH;
|
||||||
|
INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES
|
||||||
|
(@PATH,1,1469.8419,617.6385,43.109043,0,0,2,0,100,0),
|
||||||
|
(@PATH,2,1457.057,601.483,45.94235,0,0,2,0,100,0),
|
||||||
|
(@PATH,3,1441.8115,579.3153,47.886784,0,0,2,0,100,0),
|
||||||
|
(@PATH,4,1436.9575,553.7235,48.136852,0,0,2,0,100,0),
|
||||||
|
(@PATH,5,1445.1992,530.0166,47.609146,0,0,2,0,100,0),
|
||||||
|
(@PATH,6,1466.5448,511.74057,46.942425,0,0,2,0,100,0),
|
||||||
|
(@PATH,7,1495.123,512.1063,47.056377,0,0,2,0,100,0),
|
||||||
|
(@PATH,8,1508.4324,531.7451,46.67483,0,0,2,0,100,0),
|
||||||
|
(@PATH,9,1511.3053,556.9556,46.87133,0,0,2,0,100,0),
|
||||||
|
(@PATH,10,1507.6771,580.32935,47.010162,0,0,2,0,100,0),
|
||||||
|
(@PATH,11,1497.4128,601.9794,47.37127,0,0,0,2,100,0),
|
||||||
|
(@PATH,12,1479.3727,624.20746,47.287914,0,0,2,0,100,0),
|
||||||
|
(@PATH,13,1467.832,637.91895,46.565674,0,0,2,0,100,0),
|
||||||
|
(@PATH,14,1449.8766,658.87976,46.037872,0,0,2,0,100,0),
|
||||||
|
(@PATH,15,1442.1505,681.62445,45.26012,0,0,2,0,100,0),
|
||||||
|
(@PATH,16,1438.8881,713.9516,44.95452,0,0,2,0,100,0),
|
||||||
|
(@PATH,17,1452.2178,737.73157,44.23236,0,0,2,0,100,0),
|
||||||
|
(@PATH,18,1476.1324,743.0824,43.843422,0,0,2,0,100,0),
|
||||||
|
(@PATH,19,1498.3573,726.6184,43.843445,0,0,2,0,100,0),
|
||||||
|
(@PATH,20,1503.4194,693.78595,44.26011,0,0,2,0,100,0),
|
||||||
|
(@PATH,21,1496.3456,664.36005,43.037888,0,0,2,0,100,0);
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
-- DB update 2025_02_09_04 -> 2025_02_10_00
|
||||||
|
--
|
||||||
|
DELETE FROM `spell_custom_attr` WHERE `spell_id`=46305;
|
||||||
|
INSERT INTO `spell_custom_attr` (`spell_id`, `attributes`) VALUES (46305, 4194304);
|
||||||
|
|
||||||
|
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 25948) AND (`source_type` = 0) AND (`id` IN (0));
|
||||||
|
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||||
|
(25948, 0, 0, 0, 6, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 46305, 2, 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 'Doomfire Shard - On Just Died - Cast \'Avenging Rage\'');
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
-- DB update 2025_02_10_00 -> 2025_02_10_01
|
||||||
|
|
||||||
|
-- Remove flag IMMUNE_TO_NPC. Add Flag PET_IN_COMBAT (Sniffed Values)
|
||||||
|
UPDATE `creature_template` SET `unit_flags`=`unit_flags`& ~512 WHERE (`entry` = 24938);
|
||||||
|
UPDATE `creature_template` SET `unit_flags`=`unit_flags`|2048 WHERE (`entry` = 24938);
|
||||||
|
|
||||||
|
-- Change Temp movement
|
||||||
|
UPDATE `creature_template_movement` SET `Rooted` = `Rooted`|1 WHERE (`CreatureId` = 24938);
|
||||||
|
|
||||||
|
-- Dawnblade Hawkrider SmartAI
|
||||||
|
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 25063;
|
||||||
|
|
||||||
|
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 25063);
|
||||||
|
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||||
|
(25063, 0, 0, 0, 25, 0, 100, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Dawnblade Hawkrider - On Reset - Set Reactstate Passive'),
|
||||||
|
(25063, 0, 1, 0, 60, 0, 100, 0, 3000, 6500, 3000, 6500, 0, 0, 11, 45189, 2, 0, 1, 0, 0, 9, 24938, 5, 40, 0, 0, 0, 0, 0, 'Dawnblade Hawkrider - On Update - Cast \'Dawnblade Attack\'');
|
||||||
|
|
||||||
|
-- Shattered Sun Marksman SmartAI
|
||||||
|
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 24938;
|
||||||
|
|
||||||
|
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 24938);
|
||||||
|
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||||
|
(24938, 0, 0, 0, 1, 0, 100, 1, 1000, 1000, 1000, 1000, 0, 0, 21, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Shattered Sun Marksman - Out of Combat - Disable Combat Movement (No Repeat)'),
|
||||||
|
(24938, 0, 1, 0, 60, 0, 100, 0, 4500, 8000, 4500, 8000, 0, 0, 11, 74414, 0, 0, 1, 0, 0, 9, 25063, 0, 40, 0, 0, 0, 0, 0, 'Shattered Sun Marksman - On Update - Cast \'Shoot\''),
|
||||||
|
(24938, 0, 2, 0, 10, 0, 100, 1, 0, 70, 4500, 8000, 0, 0, 11, 74414, 0, 0, 0, 0, 0, 9, 25192, 0, 50, 0, 0, 0, 0, 0, 'Shattered Sun Marksman - Within 0-70 Range Out of Combat LoS - Cast \'Shoot\' (No Repeat)'),
|
||||||
|
(24938, 0, 3, 0, 11, 0, 100, 0, 0, 0, 0, 0, 0, 0, 88, 2493810, 2493813, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Shattered Sun Marksman - On Respawn - Run Random Script'),
|
||||||
|
(24938, 0, 4, 0, 11, 0, 100, 0, 0, 0, 0, 0, 0, 0, 88, 2493820, 2493823, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Shattered Sun Marksman - On Respawn - Run Random Script'),
|
||||||
|
(24938, 0, 5, 0, 11, 0, 100, 0, 0, 0, 0, 0, 0, 0, 88, 2493830, 2493833, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Shattered Sun Marksman - On Respawn - Run Random Script'),
|
||||||
|
(24938, 0, 6, 0, 11, 0, 100, 0, 0, 0, 0, 0, 0, 0, 88, 2493840, 2493843, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Shattered Sun Marksman - On Respawn - Run Random Script');
|
||||||
@@ -267,6 +267,8 @@ void CharacterDatabaseConnection::DoPrepareStatements()
|
|||||||
PrepareStatement(CHAR_DEL_ALL_GAME_EVENT_CONDITION_SAVE, "DELETE FROM game_event_condition_save WHERE eventEntry = ?", CONNECTION_ASYNC);
|
PrepareStatement(CHAR_DEL_ALL_GAME_EVENT_CONDITION_SAVE, "DELETE FROM game_event_condition_save WHERE eventEntry = ?", CONNECTION_ASYNC);
|
||||||
PrepareStatement(CHAR_DEL_GAME_EVENT_CONDITION_SAVE, "DELETE FROM game_event_condition_save WHERE eventEntry = ? AND condition_id = ?", CONNECTION_ASYNC);
|
PrepareStatement(CHAR_DEL_GAME_EVENT_CONDITION_SAVE, "DELETE FROM game_event_condition_save WHERE eventEntry = ? AND condition_id = ?", CONNECTION_ASYNC);
|
||||||
PrepareStatement(CHAR_INS_GAME_EVENT_CONDITION_SAVE, "INSERT INTO game_event_condition_save (eventEntry, condition_id, done) VALUES (?, ?, ?)", CONNECTION_ASYNC);
|
PrepareStatement(CHAR_INS_GAME_EVENT_CONDITION_SAVE, "INSERT INTO game_event_condition_save (eventEntry, condition_id, done) VALUES (?, ?, ?)", CONNECTION_ASYNC);
|
||||||
|
PrepareStatement(CHAR_SEL_GAME_EVENT_CONDITION_SAVE_DATA, "SELECT eventEntry, condition_id, done FROM game_event_condition_save", CONNECTION_SYNCH);
|
||||||
|
PrepareStatement(CHAR_SEL_GAME_EVENT_SAVE_DATA, "SELECT eventEntry, state, next_start FROM game_event_save", CONNECTION_SYNCH);
|
||||||
|
|
||||||
// Petitions
|
// Petitions
|
||||||
PrepareStatement(CHAR_DEL_ALL_PETITION_SIGNATURES, "DELETE FROM petition_sign WHERE playerguid = ?", CONNECTION_ASYNC);
|
PrepareStatement(CHAR_DEL_ALL_PETITION_SIGNATURES, "DELETE FROM petition_sign WHERE playerguid = ?", CONNECTION_ASYNC);
|
||||||
|
|||||||
@@ -218,6 +218,8 @@ enum CharacterDatabaseStatements : uint32
|
|||||||
CHAR_DEL_ALL_GAME_EVENT_CONDITION_SAVE,
|
CHAR_DEL_ALL_GAME_EVENT_CONDITION_SAVE,
|
||||||
CHAR_DEL_GAME_EVENT_CONDITION_SAVE,
|
CHAR_DEL_GAME_EVENT_CONDITION_SAVE,
|
||||||
CHAR_INS_GAME_EVENT_CONDITION_SAVE,
|
CHAR_INS_GAME_EVENT_CONDITION_SAVE,
|
||||||
|
CHAR_SEL_GAME_EVENT_CONDITION_SAVE_DATA,
|
||||||
|
CHAR_SEL_GAME_EVENT_SAVE_DATA,
|
||||||
|
|
||||||
CHAR_INS_ARENA_TEAM,
|
CHAR_INS_ARENA_TEAM,
|
||||||
CHAR_INS_ARENA_TEAM_MEMBER,
|
CHAR_INS_ARENA_TEAM_MEMBER,
|
||||||
|
|||||||
@@ -84,6 +84,21 @@ void WorldDatabaseConnection::DoPrepareStatements()
|
|||||||
PrepareStatement(WORLD_SEL_GAMEOBJECT_NEAREST, "SELECT guid, id, position_x, position_y, position_z, map, (POW(position_x - ?, 2) + POW(position_y - ?, 2) + POW(position_z - ?, 2)) AS order_ FROM gameobject WHERE map = ? AND (POW(position_x - ?, 2) + POW(position_y - ?, 2) + POW(position_z - ?, 2)) <= ? AND (phaseMask & ?) <> 0 ORDER BY order_", CONNECTION_SYNCH);
|
PrepareStatement(WORLD_SEL_GAMEOBJECT_NEAREST, "SELECT guid, id, position_x, position_y, position_z, map, (POW(position_x - ?, 2) + POW(position_y - ?, 2) + POW(position_z - ?, 2)) AS order_ FROM gameobject WHERE map = ? AND (POW(position_x - ?, 2) + POW(position_y - ?, 2) + POW(position_z - ?, 2)) <= ? AND (phaseMask & ?) <> 0 ORDER BY order_", CONNECTION_SYNCH);
|
||||||
PrepareStatement(WORLD_SEL_CREATURE_NEAREST, "SELECT guid, id1, id2, id3, position_x, position_y, position_z, map, (POW(position_x - ?, 2) + POW(position_y - ?, 2) + POW(position_z - ?, 2)) AS order_ FROM creature WHERE map = ? AND (POW(position_x - ?, 2) + POW(position_y - ?, 2) + POW(position_z - ?, 2)) <= ? AND (phaseMask & ?) <> 0 ORDER BY order_", CONNECTION_SYNCH);
|
PrepareStatement(WORLD_SEL_CREATURE_NEAREST, "SELECT guid, id1, id2, id3, position_x, position_y, position_z, map, (POW(position_x - ?, 2) + POW(position_y - ?, 2) + POW(position_z - ?, 2)) AS order_ FROM creature WHERE map = ? AND (POW(position_x - ?, 2) + POW(position_y - ?, 2) + POW(position_z - ?, 2)) <= ? AND (phaseMask & ?) <> 0 ORDER BY order_", CONNECTION_SYNCH);
|
||||||
PrepareStatement(WORLD_INS_CREATURE, "INSERT INTO creature (guid, id1, id2, id3, map, spawnMask, phaseMask, equipment_id, position_x, position_y, position_z, orientation, spawntimesecs, wander_distance, currentwaypoint, curhealth, curmana, MovementType, npcflag, unit_flags, dynamicflags) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC);
|
PrepareStatement(WORLD_INS_CREATURE, "INSERT INTO creature (guid, id1, id2, id3, map, spawnMask, phaseMask, equipment_id, position_x, position_y, position_z, orientation, spawntimesecs, wander_distance, currentwaypoint, curhealth, curmana, MovementType, npcflag, unit_flags, dynamicflags) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC);
|
||||||
|
PrepareStatement(WORLD_SEL_GAME_EVENTS, "SELECT eventEntry, UNIX_TIMESTAMP(start_time), UNIX_TIMESTAMP(end_time), occurence, length, holiday, holidayStage, description, world_event, announce FROM game_event", CONNECTION_SYNCH);
|
||||||
|
PrepareStatement(WORLD_SEL_GAME_EVENT_PREREQUISITE_DATA, "SELECT eventEntry, prerequisite_event FROM game_event_prerequisite", CONNECTION_SYNCH);
|
||||||
|
PrepareStatement(WORLD_SEL_GAME_EVENT_CREATURE_DATA, "SELECT guid, eventEntry FROM game_event_creature", CONNECTION_SYNCH);
|
||||||
|
PrepareStatement(WORLD_SEL_GAME_EVENT_GAMEOBJECT_DATA, "SELECT guid, eventEntry FROM game_event_gameobject", CONNECTION_SYNCH);
|
||||||
|
PrepareStatement(WORLD_SEL_GAME_EVENT_MODEL_EQUIPMENT_DATA, "SELECT creature.guid, creature.id1, creature.id2, creature.id3, game_event_model_equip.eventEntry, game_event_model_equip.modelid, game_event_model_equip.equipment_id FROM creature JOIN game_event_model_equip ON creature.guid=game_event_model_equip.guid", CONNECTION_SYNCH);
|
||||||
|
PrepareStatement(WORLD_SEL_GAME_EVENT_QUEST_DATA, "SELECT id, quest, eventEntry FROM game_event_creature_quest", CONNECTION_SYNCH);
|
||||||
|
PrepareStatement(WORLD_SEL_GAME_EVENT_GAMEOBJECT_QUEST_DATA, "SELECT id, quest, eventEntry FROM game_event_gameobject_quest", CONNECTION_SYNCH);
|
||||||
|
PrepareStatement(WORLD_SEL_GAME_EVENT_QUEST_CONDITION_DATA, "SELECT quest, eventEntry, condition_id, num FROM game_event_quest_condition", CONNECTION_SYNCH);
|
||||||
|
PrepareStatement(WORLD_SEL_GAME_EVENT_CONDITION_DATA, "SELECT eventEntry, condition_id, req_num, max_world_state_field, done_world_state_field FROM game_event_condition", CONNECTION_SYNCH);
|
||||||
|
PrepareStatement(WORLD_SEL_GAME_EVENT_NPC_FLAGS, "SELECT guid, eventEntry, npcflag FROM game_event_npcflag", CONNECTION_SYNCH);
|
||||||
|
PrepareStatement(WORLD_SEL_GAME_EVENT_QUEST_SEASONAL_RELATIONS, "SELECT questId, eventEntry FROM game_event_seasonal_questrelation", CONNECTION_SYNCH);
|
||||||
|
PrepareStatement(WORLD_SEL_GAME_EVENT_BATTLEGROUND_DATA, "SELECT eventEntry, bgflag FROM game_event_battleground_holiday", CONNECTION_SYNCH);
|
||||||
|
PrepareStatement(WORLD_SEL_GAME_EVENT_POOL_DATA, "SELECT pool_template.entry, game_event_pool.eventEntry FROM pool_template JOIN game_event_pool ON pool_template.entry = game_event_pool.pool_entry", CONNECTION_SYNCH);
|
||||||
|
PrepareStatement(WORLD_SEL_GAME_EVENT_ARENA_SEASON, "SELECT eventEntry FROM game_event_arena_seasons WHERE season = ?", CONNECTION_SYNCH);
|
||||||
|
PrepareStatement(WORLD_SEL_GAME_EVENT_HOLIDAY_DATES, "SELECT id, date_id, date_value, holiday_duration FROM holiday_dates", CONNECTION_SYNCH);
|
||||||
PrepareStatement(WORLD_DEL_GAME_EVENT_CREATURE, "DELETE FROM game_event_creature WHERE guid = ?", CONNECTION_ASYNC);
|
PrepareStatement(WORLD_DEL_GAME_EVENT_CREATURE, "DELETE FROM game_event_creature WHERE guid = ?", CONNECTION_ASYNC);
|
||||||
PrepareStatement(WORLD_DEL_GAME_EVENT_MODEL_EQUIP, "DELETE FROM game_event_model_equip WHERE guid = ?", CONNECTION_ASYNC);
|
PrepareStatement(WORLD_DEL_GAME_EVENT_MODEL_EQUIP, "DELETE FROM game_event_model_equip WHERE guid = ?", CONNECTION_ASYNC);
|
||||||
PrepareStatement(WORLD_SEL_GAME_EVENT_NPC_VENDOR, "SELECT eventEntry, guid, item, maxcount, incrtime, ExtendedCost FROM game_event_npc_vendor ORDER BY guid, slot ASC", CONNECTION_SYNCH);
|
PrepareStatement(WORLD_SEL_GAME_EVENT_NPC_VENDOR, "SELECT eventEntry, guid, item, maxcount, incrtime, ExtendedCost FROM game_event_npc_vendor ORDER BY guid, slot ASC", CONNECTION_SYNCH);
|
||||||
|
|||||||
@@ -90,6 +90,21 @@ enum WorldDatabaseStatements : uint32
|
|||||||
WORLD_SEL_CREATURE_NEAREST,
|
WORLD_SEL_CREATURE_NEAREST,
|
||||||
WORLD_SEL_GAMEOBJECT_TARGET,
|
WORLD_SEL_GAMEOBJECT_TARGET,
|
||||||
WORLD_INS_CREATURE,
|
WORLD_INS_CREATURE,
|
||||||
|
WORLD_SEL_GAME_EVENTS,
|
||||||
|
WORLD_SEL_GAME_EVENT_PREREQUISITE_DATA,
|
||||||
|
WORLD_SEL_GAME_EVENT_CREATURE_DATA,
|
||||||
|
WORLD_SEL_GAME_EVENT_GAMEOBJECT_DATA,
|
||||||
|
WORLD_SEL_GAME_EVENT_MODEL_EQUIPMENT_DATA,
|
||||||
|
WORLD_SEL_GAME_EVENT_QUEST_DATA,
|
||||||
|
WORLD_SEL_GAME_EVENT_GAMEOBJECT_QUEST_DATA,
|
||||||
|
WORLD_SEL_GAME_EVENT_QUEST_CONDITION_DATA,
|
||||||
|
WORLD_SEL_GAME_EVENT_CONDITION_DATA,
|
||||||
|
WORLD_SEL_GAME_EVENT_NPC_FLAGS,
|
||||||
|
WORLD_SEL_GAME_EVENT_QUEST_SEASONAL_RELATIONS,
|
||||||
|
WORLD_SEL_GAME_EVENT_BATTLEGROUND_DATA,
|
||||||
|
WORLD_SEL_GAME_EVENT_POOL_DATA,
|
||||||
|
WORLD_SEL_GAME_EVENT_ARENA_SEASON,
|
||||||
|
WORLD_SEL_GAME_EVENT_HOLIDAY_DATES,
|
||||||
WORLD_DEL_GAME_EVENT_CREATURE,
|
WORLD_DEL_GAME_EVENT_CREATURE,
|
||||||
WORLD_DEL_GAME_EVENT_MODEL_EQUIP,
|
WORLD_DEL_GAME_EVENT_MODEL_EQUIP,
|
||||||
WORLD_SEL_GAME_EVENT_NPC_VENDOR,
|
WORLD_SEL_GAME_EVENT_NPC_VENDOR,
|
||||||
|
|||||||
@@ -806,7 +806,10 @@ Creature* Battlefield::SpawnCreature(uint32 entry, float x, float y, float z, fl
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
creature->SetFaction(BattlefieldFactions[teamId]);
|
// no need to set faction for neutral team
|
||||||
|
if (teamId == TEAM_ALLIANCE || teamId == TEAM_HORDE)
|
||||||
|
creature->SetFaction(BattlefieldFactions[teamId]);
|
||||||
|
|
||||||
creature->SetHomePosition(x, y, z, o);
|
creature->SetHomePosition(x, y, z, o);
|
||||||
|
|
||||||
// force using DB speeds -- do we really need this?
|
// force using DB speeds -- do we really need this?
|
||||||
|
|||||||
@@ -525,7 +525,7 @@ bool Creature::InitEntry(uint32 Entry, const CreatureData* data)
|
|||||||
|
|
||||||
SetFloatValue(UNIT_FIELD_HOVERHEIGHT, cinfo->HoverHeight);
|
SetFloatValue(UNIT_FIELD_HOVERHEIGHT, cinfo->HoverHeight);
|
||||||
|
|
||||||
SetCanDualWield(cinfo->flags_extra & CREATURE_FLAG_EXTRA_USE_OFFHAND_ATTACK);
|
SetCanDualWield(cinfo->HasFlagsExtra(CREATURE_FLAG_EXTRA_USE_OFFHAND_ATTACK));
|
||||||
|
|
||||||
// checked at loading
|
// checked at loading
|
||||||
m_defaultMovementType = MovementGeneratorType(cinfo->MovementType);
|
m_defaultMovementType = MovementGeneratorType(cinfo->MovementType);
|
||||||
@@ -556,7 +556,7 @@ bool Creature::UpdateEntry(uint32 Entry, const CreatureData* data, bool changele
|
|||||||
uint32 npcflag, unit_flags, dynamicflags;
|
uint32 npcflag, unit_flags, dynamicflags;
|
||||||
ObjectMgr::ChooseCreatureFlags(cInfo, npcflag, unit_flags, dynamicflags, data);
|
ObjectMgr::ChooseCreatureFlags(cInfo, npcflag, unit_flags, dynamicflags, data);
|
||||||
|
|
||||||
if (cInfo->flags_extra & CREATURE_FLAG_EXTRA_WORLDEVENT)
|
if (cInfo->HasFlagsExtra(CREATURE_FLAG_EXTRA_WORLDEVENT))
|
||||||
ReplaceAllNpcFlags(NPCFlags(npcflag | sGameEventMgr->GetNPCFlag(this)));
|
ReplaceAllNpcFlags(NPCFlags(npcflag | sGameEventMgr->GetNPCFlag(this)));
|
||||||
else
|
else
|
||||||
ReplaceAllNpcFlags(NPCFlags(npcflag));
|
ReplaceAllNpcFlags(NPCFlags(npcflag));
|
||||||
@@ -571,7 +571,7 @@ bool Creature::UpdateEntry(uint32 Entry, const CreatureData* data, bool changele
|
|||||||
|
|
||||||
ReplaceAllDynamicFlags(dynamicflags);
|
ReplaceAllDynamicFlags(dynamicflags);
|
||||||
|
|
||||||
SetCanDualWield(cInfo->flags_extra & CREATURE_FLAG_EXTRA_USE_OFFHAND_ATTACK);
|
SetCanDualWield(cInfo->HasFlagsExtra(CREATURE_FLAG_EXTRA_USE_OFFHAND_ATTACK));
|
||||||
|
|
||||||
SetAttackTime(BASE_ATTACK, cInfo->BaseAttackTime);
|
SetAttackTime(BASE_ATTACK, cInfo->BaseAttackTime);
|
||||||
SetAttackTime(OFF_ATTACK, cInfo->BaseAttackTime);
|
SetAttackTime(OFF_ATTACK, cInfo->BaseAttackTime);
|
||||||
@@ -637,7 +637,7 @@ bool Creature::UpdateEntry(uint32 Entry, const CreatureData* data, bool changele
|
|||||||
|
|
||||||
InitializeReactState();
|
InitializeReactState();
|
||||||
|
|
||||||
if (!IsPet() && cInfo->flags_extra & CREATURE_FLAG_EXTRA_NO_TAUNT)
|
if (!IsPet() && cInfo->HasFlagsExtra(CREATURE_FLAG_EXTRA_NO_TAUNT))
|
||||||
{
|
{
|
||||||
ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, true);
|
ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, true);
|
||||||
ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_ATTACK_ME, true);
|
ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_ATTACK_ME, true);
|
||||||
@@ -1200,7 +1200,7 @@ bool Creature::Create(ObjectGuid::LowType guidlow, Map* map, uint32 phaseMask, u
|
|||||||
|
|
||||||
LastUsedScriptID = GetScriptId();
|
LastUsedScriptID = GetScriptId();
|
||||||
|
|
||||||
if (IsSpiritHealer() || IsSpiritGuide() || (GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_GHOST_VISIBILITY))
|
if (IsSpiritHealer() || IsSpiritGuide() || HasFlagsExtra(CREATURE_FLAG_EXTRA_GHOST_VISIBILITY))
|
||||||
{
|
{
|
||||||
m_serverSideVisibility.SetValue(SERVERSIDE_VISIBILITY_GHOST, GHOST_VISIBILITY_GHOST);
|
m_serverSideVisibility.SetValue(SERVERSIDE_VISIBILITY_GHOST, GHOST_VISIBILITY_GHOST);
|
||||||
m_serverSideVisibilityDetect.SetValue(SERVERSIDE_VISIBILITY_GHOST, GHOST_VISIBILITY_GHOST);
|
m_serverSideVisibilityDetect.SetValue(SERVERSIDE_VISIBILITY_GHOST, GHOST_VISIBILITY_GHOST);
|
||||||
@@ -1213,7 +1213,7 @@ bool Creature::Create(ObjectGuid::LowType guidlow, Map* map, uint32 phaseMask, u
|
|||||||
if (Entry == VISUAL_WAYPOINT)
|
if (Entry == VISUAL_WAYPOINT)
|
||||||
SetVisible(false);
|
SetVisible(false);
|
||||||
|
|
||||||
if (GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_IGNORE_PATHFINDING)
|
if (HasFlagsExtra(CREATURE_FLAG_EXTRA_IGNORE_PATHFINDING))
|
||||||
AddUnitState(UNIT_STATE_IGNORE_PATHFINDING);
|
AddUnitState(UNIT_STATE_IGNORE_PATHFINDING);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -2175,12 +2175,8 @@ void Creature::ForcedDespawn(uint32 timeMSToDespawn, Seconds forceRespawnTimer)
|
|||||||
RemoveCorpse(true);
|
RemoveCorpse(true);
|
||||||
|
|
||||||
if (forceRespawnTimer > Seconds::zero())
|
if (forceRespawnTimer > Seconds::zero())
|
||||||
{
|
|
||||||
if (GetMap())
|
if (GetMap())
|
||||||
{
|
|
||||||
GetMap()->ScheduleCreatureRespawn(GetGUID(), forceRespawnTimer);
|
GetMap()->ScheduleCreatureRespawn(GetGUID(), forceRespawnTimer);
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Creature::DespawnOrUnsummon(Milliseconds msTimeToDespawn /*= 0*/, Seconds forcedRespawnTimer)
|
void Creature::DespawnOrUnsummon(Milliseconds msTimeToDespawn /*= 0*/, Seconds forcedRespawnTimer)
|
||||||
@@ -2203,7 +2199,7 @@ void Creature::DespawnOnEvade(Seconds respawnDelay)
|
|||||||
|
|
||||||
if (TempSummon* whoSummon = ToTempSummon())
|
if (TempSummon* whoSummon = ToTempSummon())
|
||||||
{
|
{
|
||||||
LOG_WARN("entities.unit", "DespawnOnEvade called on a temporary summon.");
|
GetMap()->ScheduleCreatureRespawn(GetGUID(), respawnDelay, GetHomePosition());
|
||||||
whoSummon->UnSummon();
|
whoSummon->UnSummon();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -3184,8 +3180,7 @@ bool Creature::IsDungeonBoss() const
|
|||||||
if (GetOwnerGUID().IsPlayer())
|
if (GetOwnerGUID().IsPlayer())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
CreatureTemplate const* cinfo = sObjectMgr->GetCreatureTemplate(GetEntry());
|
return HasFlagsExtra(CREATURE_FLAG_EXTRA_DUNGEON_BOSS);
|
||||||
return cinfo && (cinfo->flags_extra & CREATURE_FLAG_EXTRA_DUNGEON_BOSS);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Creature::IsImmuneToKnockback() const
|
bool Creature::IsImmuneToKnockback() const
|
||||||
@@ -3193,8 +3188,7 @@ bool Creature::IsImmuneToKnockback() const
|
|||||||
if (GetOwnerGUID().IsPlayer())
|
if (GetOwnerGUID().IsPlayer())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
CreatureTemplate const* cinfo = sObjectMgr->GetCreatureTemplate(GetEntry());
|
return HasFlagsExtra(CREATURE_FLAG_EXTRA_IMMUNITY_KNOCKBACK);
|
||||||
return cinfo && (cinfo->flags_extra & CREATURE_FLAG_EXTRA_IMMUNITY_KNOCKBACK);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Creature::HasWeapon(WeaponAttackType type) const
|
bool Creature::HasWeapon(WeaponAttackType type) const
|
||||||
@@ -3464,7 +3458,7 @@ void Creature::UpdateMovementFlags()
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
// Creatures with CREATURE_FLAG_EXTRA_NO_MOVE_FLAGS_UPDATE should control MovementFlags in your own scripts
|
// Creatures with CREATURE_FLAG_EXTRA_NO_MOVE_FLAGS_UPDATE should control MovementFlags in your own scripts
|
||||||
if (info->flags_extra & CREATURE_FLAG_EXTRA_NO_MOVE_FLAGS_UPDATE)
|
if (info->HasFlagsExtra(CREATURE_FLAG_EXTRA_NO_MOVE_FLAGS_UPDATE))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
float ground = GetFloorZ();
|
float ground = GetFloorZ();
|
||||||
@@ -3820,7 +3814,7 @@ void Creature::ModifyThreatPercentTemp(Unit* victim, int32 percent, Milliseconds
|
|||||||
|
|
||||||
bool Creature::IsDamageEnoughForLootingAndReward() const
|
bool Creature::IsDamageEnoughForLootingAndReward() const
|
||||||
{
|
{
|
||||||
return (m_creatureInfo->flags_extra & CREATURE_FLAG_EXTRA_NO_PLAYER_DAMAGE_REQ) || (_playerDamageReq == 0 && _damagedByPlayer);
|
return m_creatureInfo->HasFlagsExtra(CREATURE_FLAG_EXTRA_NO_PLAYER_DAMAGE_REQ) || (_playerDamageReq == 0 && _damagedByPlayer);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Creature::LowerPlayerDamageReq(uint32 unDamage, bool damagedByPlayer /*= true*/)
|
void Creature::LowerPlayerDamageReq(uint32 unDamage, bool damagedByPlayer /*= true*/)
|
||||||
|
|||||||
@@ -70,10 +70,11 @@ public:
|
|||||||
void SetCorpseDelay(uint32 delay) { m_corpseDelay = delay; }
|
void SetCorpseDelay(uint32 delay) { m_corpseDelay = delay; }
|
||||||
void SetCorpseRemoveTime(uint32 delay);
|
void SetCorpseRemoveTime(uint32 delay);
|
||||||
[[nodiscard]] uint32 GetCorpseDelay() const { return m_corpseDelay; }
|
[[nodiscard]] uint32 GetCorpseDelay() const { return m_corpseDelay; }
|
||||||
|
[[nodiscard]] bool HasFlagsExtra(uint32 flag) const { return GetCreatureTemplate()->HasFlagsExtra(flag); }
|
||||||
[[nodiscard]] bool IsRacialLeader() const { return GetCreatureTemplate()->RacialLeader; }
|
[[nodiscard]] bool IsRacialLeader() const { return GetCreatureTemplate()->RacialLeader; }
|
||||||
[[nodiscard]] bool IsCivilian() const { return GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_CIVILIAN; }
|
[[nodiscard]] bool IsCivilian() const { return HasFlagsExtra(CREATURE_FLAG_EXTRA_CIVILIAN); }
|
||||||
[[nodiscard]] bool IsTrigger() const { return GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_TRIGGER; }
|
[[nodiscard]] bool IsTrigger() const { return HasFlagsExtra(CREATURE_FLAG_EXTRA_TRIGGER); }
|
||||||
[[nodiscard]] bool IsGuard() const { return GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_GUARD; }
|
[[nodiscard]] bool IsGuard() const { return HasFlagsExtra(CREATURE_FLAG_EXTRA_GUARD); }
|
||||||
CreatureMovementData const& GetMovementTemplate() const;
|
CreatureMovementData const& GetMovementTemplate() const;
|
||||||
[[nodiscard]] bool CanWalk() const { return GetMovementTemplate().IsGroundAllowed(); }
|
[[nodiscard]] bool CanWalk() const { return GetMovementTemplate().IsGroundAllowed(); }
|
||||||
[[nodiscard]] bool CanSwim() const override;
|
[[nodiscard]] bool CanSwim() const override;
|
||||||
@@ -127,7 +128,7 @@ public:
|
|||||||
|
|
||||||
[[nodiscard]] bool IsDungeonBoss() const;
|
[[nodiscard]] bool IsDungeonBoss() const;
|
||||||
[[nodiscard]] bool IsImmuneToKnockback() const;
|
[[nodiscard]] bool IsImmuneToKnockback() const;
|
||||||
[[nodiscard]] bool IsAvoidingAOE() const { return GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_AVOID_AOE; }
|
[[nodiscard]] bool IsAvoidingAOE() const { return HasFlagsExtra(CREATURE_FLAG_EXTRA_AVOID_AOE); }
|
||||||
|
|
||||||
uint8 getLevelForTarget(WorldObject const* target) const override; // overwrite Unit::getLevelForTarget for boss level support
|
uint8 getLevelForTarget(WorldObject const* target) const override; // overwrite Unit::getLevelForTarget for boss level support
|
||||||
|
|
||||||
@@ -272,7 +273,7 @@ public:
|
|||||||
bool HasSearchedAssistance() { return m_AlreadySearchedAssistance; }
|
bool HasSearchedAssistance() { return m_AlreadySearchedAssistance; }
|
||||||
bool CanAssistTo(Unit const* u, Unit const* enemy, bool checkfaction = true) const;
|
bool CanAssistTo(Unit const* u, Unit const* enemy, bool checkfaction = true) const;
|
||||||
bool _IsTargetAcceptable(Unit const* target) const;
|
bool _IsTargetAcceptable(Unit const* target) const;
|
||||||
[[nodiscard]] bool CanIgnoreFeignDeath() const { return (GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_IGNORE_FEIGN_DEATH) != 0; }
|
[[nodiscard]] bool CanIgnoreFeignDeath() const { return HasFlagsExtra(CREATURE_FLAG_EXTRA_IGNORE_FEIGN_DEATH); }
|
||||||
|
|
||||||
// pussywizard: Updated at faction change, disable move in line of sight if actual faction is not hostile to anyone
|
// pussywizard: Updated at faction change, disable move in line of sight if actual faction is not hostile to anyone
|
||||||
void UpdateMoveInLineOfSightState();
|
void UpdateMoveInLineOfSightState();
|
||||||
|
|||||||
@@ -310,13 +310,9 @@ void TempSummon::UnSummon(uint32 msTime)
|
|||||||
if (WorldObject* owner = GetSummoner())
|
if (WorldObject* owner = GetSummoner())
|
||||||
{
|
{
|
||||||
if (owner->IsCreature() && owner->ToCreature()->IsAIEnabled)
|
if (owner->IsCreature() && owner->ToCreature()->IsAIEnabled)
|
||||||
{
|
|
||||||
owner->ToCreature()->AI()->SummonedCreatureDespawn(this);
|
owner->ToCreature()->AI()->SummonedCreatureDespawn(this);
|
||||||
}
|
|
||||||
else if (owner->IsGameObject() && owner->ToGameObject()->AI())
|
else if (owner->IsGameObject() && owner->ToGameObject()->AI())
|
||||||
{
|
|
||||||
owner->ToGameObject()->AI()->SummonedCreatureDespawn(this);
|
owner->ToGameObject()->AI()->SummonedCreatureDespawn(this);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
AddObjectToRemoveList();
|
AddObjectToRemoveList();
|
||||||
|
|||||||
@@ -12721,17 +12721,11 @@ bool Player::isHonorOrXPTarget(Unit* victim) const
|
|||||||
|
|
||||||
// Victim level less gray level
|
// Victim level less gray level
|
||||||
if (v_level <= k_grey)
|
if (v_level <= k_grey)
|
||||||
{
|
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
|
|
||||||
if (victim->IsCreature())
|
if (victim->IsCreature())
|
||||||
{
|
if (victim->IsTotem() || victim->IsCritter() || victim->IsPet() || victim->ToCreature()->HasFlagsExtra(CREATURE_FLAG_EXTRA_NO_XP))
|
||||||
if (victim->IsTotem() || victim->IsCritter() || victim->IsPet() || (victim->ToCreature()->GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_NO_XP))
|
|
||||||
{
|
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1375,7 +1375,7 @@ public:
|
|||||||
|
|
||||||
[[nodiscard]] Player* GetTrader() const { return m_trade ? m_trade->GetTrader() : nullptr; }
|
[[nodiscard]] Player* GetTrader() const { return m_trade ? m_trade->GetTrader() : nullptr; }
|
||||||
[[nodiscard]] TradeData* GetTradeData() const { return m_trade; }
|
[[nodiscard]] TradeData* GetTradeData() const { return m_trade; }
|
||||||
void TradeCancel(bool sendback);
|
void TradeCancel(bool sendback, TradeStatus status = TRADE_STATUS_TRADE_CANCELED);
|
||||||
|
|
||||||
CinematicMgr* GetCinematicMgr() const { return _cinematicMgr; }
|
CinematicMgr* GetCinematicMgr() const { return _cinematicMgr; }
|
||||||
|
|
||||||
|
|||||||
@@ -4085,7 +4085,7 @@ void Player::SendSellError(SellResult msg, Creature* creature, ObjectGuid guid,
|
|||||||
GetSession()->SendPacket(&data);
|
GetSession()->SendPacket(&data);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Player::TradeCancel(bool sendback)
|
void Player::TradeCancel(bool sendback, TradeStatus status /*= TRADE_STATUS_TRADE_CANCELED*/)
|
||||||
{
|
{
|
||||||
if (m_trade)
|
if (m_trade)
|
||||||
{
|
{
|
||||||
@@ -4093,9 +4093,9 @@ void Player::TradeCancel(bool sendback)
|
|||||||
|
|
||||||
// send yellow "Trade canceled" message to both traders
|
// send yellow "Trade canceled" message to both traders
|
||||||
if (sendback)
|
if (sendback)
|
||||||
GetSession()->SendCancelTrade();
|
GetSession()->SendCancelTrade(status);
|
||||||
|
|
||||||
trader->GetSession()->SendCancelTrade();
|
trader->GetSession()->SendCancelTrade(status);
|
||||||
|
|
||||||
// cleanup
|
// cleanup
|
||||||
delete m_trade;
|
delete m_trade;
|
||||||
@@ -6066,7 +6066,7 @@ Item* Player::_LoadItem(CharacterDatabaseTransaction trans, uint32 zoneId, uint3
|
|||||||
GameEventMgr::ActiveEvents const& activeEventsList = sGameEventMgr->GetActiveEventList();
|
GameEventMgr::ActiveEvents const& activeEventsList = sGameEventMgr->GetActiveEventList();
|
||||||
for (GameEventMgr::ActiveEvents::const_iterator itr = activeEventsList.begin(); itr != activeEventsList.end(); ++itr)
|
for (GameEventMgr::ActiveEvents::const_iterator itr = activeEventsList.begin(); itr != activeEventsList.end(); ++itr)
|
||||||
{
|
{
|
||||||
if (uint32(events[*itr].holiday_id) == proto->HolidayId)
|
if (uint32(events[*itr].HolidayId) == proto->HolidayId)
|
||||||
{
|
{
|
||||||
remove = false;
|
remove = false;
|
||||||
break;
|
break;
|
||||||
@@ -6724,7 +6724,7 @@ bool Player::Satisfy(DungeonProgressionRequirements const* ar, uint32 target_map
|
|||||||
|
|
||||||
if (sDisableMgr->IsDisabledFor(DISABLE_TYPE_MAP, target_map, this))
|
if (sDisableMgr->IsDisabledFor(DISABLE_TYPE_MAP, target_map, this))
|
||||||
{
|
{
|
||||||
GetSession()->SendAreaTriggerMessage("{}", GetSession()->GetAcoreString(LANG_INSTANCE_CLOSED));
|
GetSession()->SendAreaTriggerMessage(LANG_INSTANCE_CLOSED);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -6862,11 +6862,11 @@ bool Player::Satisfy(DungeonProgressionRequirements const* ar, uint32 target_map
|
|||||||
{
|
{
|
||||||
ObjectMgr::GetLocaleString(il->Name, loc_idx, name);
|
ObjectMgr::GetLocaleString(il->Name, loc_idx, name);
|
||||||
}
|
}
|
||||||
GetSession()->SendAreaTriggerMessage(GetSession()->GetAcoreString(LANG_LEVEL_MINREQUIRED_AND_ITEM), ar->levelMin, name.c_str());
|
GetSession()->SendAreaTriggerMessage(LANG_LEVEL_MINREQUIRED_AND_ITEM, ar->levelMin, name);
|
||||||
}
|
}
|
||||||
else if (LevelMin)
|
else if (LevelMin)
|
||||||
{
|
{
|
||||||
GetSession()->SendAreaTriggerMessage(GetSession()->GetAcoreString(LANG_LEVEL_MINREQUIRED), LevelMin);
|
GetSession()->SendAreaTriggerMessage(LANG_LEVEL_MINREQUIRED, LevelMin);
|
||||||
}
|
}
|
||||||
else if (ilvlRequirementNotMet)
|
else if (ilvlRequirementNotMet)
|
||||||
{
|
{
|
||||||
@@ -6924,11 +6924,11 @@ bool Player::Satisfy(DungeonProgressionRequirements const* ar, uint32 target_map
|
|||||||
|
|
||||||
if (LevelMin)
|
if (LevelMin)
|
||||||
{
|
{
|
||||||
GetSession()->SendAreaTriggerMessage(GetSession()->GetAcoreString(LANG_LEVEL_MINREQUIRED), LevelMin);
|
GetSession()->SendAreaTriggerMessage(LANG_LEVEL_MINREQUIRED, LevelMin);
|
||||||
}
|
}
|
||||||
else if (LevelMax)
|
else if (LevelMax)
|
||||||
{
|
{
|
||||||
GetSession()->SendAreaTriggerMessage(GetSession()->GetAcoreString(LANG_ACCESS_REQUIREMENT_MAX_LEVEL), LevelMax);
|
GetSession()->SendAreaTriggerMessage(LANG_ACCESS_REQUIREMENT_MAX_LEVEL, LevelMax);
|
||||||
}
|
}
|
||||||
else if (mapDiff->hasErrorMessage && !errorAlreadyPrinted)
|
else if (mapDiff->hasErrorMessage && !errorAlreadyPrinted)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -980,9 +980,7 @@ void Player::UpdateWeaponSkill(Unit* victim, WeaponAttackType attType, Item* ite
|
|||||||
if (GetShapeshiftForm() == FORM_TREE)
|
if (GetShapeshiftForm() == FORM_TREE)
|
||||||
return; // use weapon but not skill up
|
return; // use weapon but not skill up
|
||||||
|
|
||||||
if (victim->IsCreature() &&
|
if (victim->IsCreature() && victim->ToCreature()->HasFlagsExtra(CREATURE_FLAG_EXTRA_NO_SKILL_GAINS))
|
||||||
(victim->ToCreature()->GetCreatureTemplate()->flags_extra &
|
|
||||||
CREATURE_FLAG_EXTRA_NO_SKILL_GAINS))
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
uint32 weapon_skill_gain = sWorld->getIntConfig(CONFIG_SKILL_GAIN_WEAPON);
|
uint32 weapon_skill_gain = sWorld->getIntConfig(CONFIG_SKILL_GAIN_WEAPON);
|
||||||
@@ -1168,7 +1166,7 @@ bool Player::UpdatePosition(float x, float y, float z, float orientation,
|
|||||||
SetGroupUpdateFlag(GROUP_UPDATE_FLAG_POSITION);
|
SetGroupUpdateFlag(GROUP_UPDATE_FLAG_POSITION);
|
||||||
|
|
||||||
if (GetTrader() && !IsWithinDistInMap(GetTrader(), INTERACTION_DISTANCE))
|
if (GetTrader() && !IsWithinDistInMap(GetTrader(), INTERACTION_DISTANCE))
|
||||||
GetSession()->SendCancelTrade();
|
GetSession()->SendCancelTrade(TRADE_STATUS_TRADE_CANCELED);
|
||||||
|
|
||||||
CheckAreaExploreAndOutdoor();
|
CheckAreaExploreAndOutdoor();
|
||||||
|
|
||||||
|
|||||||
@@ -582,7 +582,22 @@ void MotionTransport::DelayedTeleportTransport()
|
|||||||
float destX, destY, destZ, destO;
|
float destX, destY, destZ, destO;
|
||||||
obj->m_movementInfo.transport.pos.GetPosition(destX, destY, destZ, destO);
|
obj->m_movementInfo.transport.pos.GetPosition(destX, destY, destZ, destO);
|
||||||
TransportBase::CalculatePassengerPosition(destX, destY, destZ, &destO, x, y, z, o);
|
TransportBase::CalculatePassengerPosition(destX, destY, destZ, &destO, x, y, z, o);
|
||||||
if (!obj->ToPlayer()->TeleportTo(newMapId, destX, destY, destZ, destO, TELE_TO_NOT_LEAVE_TRANSPORT))
|
|
||||||
|
Player* player = obj->ToPlayer();
|
||||||
|
// Vehicle passengers are dropped in the middle of nowhere, so lets try to eject them, add to the transport and teleport
|
||||||
|
// this needs to be revisited to properly restore vehicles with passengers after transport teleportation
|
||||||
|
if (player->IsVehicle())
|
||||||
|
if (Vehicle* vehicleKit = player->GetVehicleKit())
|
||||||
|
for (SeatMap::iterator itr = vehicleKit->Seats.begin(); itr != vehicleKit->Seats.end(); ++itr)
|
||||||
|
if (Player* passenger = ObjectAccessor::GetPlayer(*player, itr->second.Passenger.Guid))
|
||||||
|
{
|
||||||
|
passenger->ExitVehicle();
|
||||||
|
AddPassenger(passenger, true);
|
||||||
|
if (!passenger->TeleportTo(newMapId, destX, destY, destZ, destO, TELE_TO_NOT_LEAVE_TRANSPORT))
|
||||||
|
_passengers.erase(passenger);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!player->TeleportTo(newMapId, destX, destY, destZ, destO, TELE_TO_NOT_LEAVE_TRANSPORT))
|
||||||
_passengers.erase(obj);
|
_passengers.erase(obj);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -2856,7 +2856,7 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst(Unit const* victim, WeaponAttackTy
|
|||||||
//LOG_DEBUG("entities.unit", "RollMeleeOutcomeAgainst: attack came from behind and victim was a player.");
|
//LOG_DEBUG("entities.unit", "RollMeleeOutcomeAgainst: attack came from behind and victim was a player.");
|
||||||
}
|
}
|
||||||
// Xinef: do not allow to dodge with CREATURE_FLAG_EXTRA_NO_DODGE flag
|
// Xinef: do not allow to dodge with CREATURE_FLAG_EXTRA_NO_DODGE flag
|
||||||
else if (victim->IsPlayer() || !(victim->ToCreature()->GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_NO_DODGE))
|
else if (victim->IsPlayer() || !(victim->ToCreature()->HasFlagsExtra(CREATURE_FLAG_EXTRA_NO_DODGE)))
|
||||||
{
|
{
|
||||||
// Reduce dodge chance by attacker expertise rating
|
// Reduce dodge chance by attacker expertise rating
|
||||||
if (IsPlayer())
|
if (IsPlayer())
|
||||||
@@ -2898,7 +2898,7 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst(Unit const* victim, WeaponAttackTy
|
|||||||
else
|
else
|
||||||
parry_chance -= GetTotalAuraModifier(SPELL_AURA_MOD_EXPERTISE) * 25;
|
parry_chance -= GetTotalAuraModifier(SPELL_AURA_MOD_EXPERTISE) * 25;
|
||||||
|
|
||||||
if (victim->IsPlayer() || !(victim->ToCreature()->GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_NO_PARRY))
|
if (victim->IsPlayer() || !(victim->ToCreature()->HasFlagsExtra(CREATURE_FLAG_EXTRA_NO_PARRY)))
|
||||||
{
|
{
|
||||||
tmp = parry_chance;
|
tmp = parry_chance;
|
||||||
|
|
||||||
@@ -2915,7 +2915,7 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst(Unit const* victim, WeaponAttackTy
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (victim->IsPlayer() || !(victim->ToCreature()->GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_NO_BLOCK))
|
if (victim->IsPlayer() || !(victim->ToCreature()->HasFlagsExtra(CREATURE_FLAG_EXTRA_NO_BLOCK)))
|
||||||
{
|
{
|
||||||
tmp = block_chance;
|
tmp = block_chance;
|
||||||
|
|
||||||
@@ -2957,7 +2957,7 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst(Unit const* victim, WeaponAttackTy
|
|||||||
if (getLevelForTarget(victim) >= victim->getLevelForTarget(this) + 4 &&
|
if (getLevelForTarget(victim) >= victim->getLevelForTarget(this) + 4 &&
|
||||||
// can be from by creature (if can) or from controlled player that considered as creature
|
// can be from by creature (if can) or from controlled player that considered as creature
|
||||||
!IsControlledByPlayer() &&
|
!IsControlledByPlayer() &&
|
||||||
!(IsCreature() && ToCreature()->GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_NO_CRUSHING_BLOWS))
|
!(IsCreature() && ToCreature()->HasFlagsExtra(CREATURE_FLAG_EXTRA_NO_CRUSHING_BLOWS)))
|
||||||
{
|
{
|
||||||
// when their weapon skill is 15 or more above victim's defense skill
|
// when their weapon skill is 15 or more above victim's defense skill
|
||||||
tmp = victimDefenseSkill;
|
tmp = victimDefenseSkill;
|
||||||
@@ -2984,10 +2984,8 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst(Unit const* victim, WeaponAttackTy
|
|||||||
if (tmp > 0 && roll < (sum += tmp))
|
if (tmp > 0 && roll < (sum += tmp))
|
||||||
{
|
{
|
||||||
LOG_DEBUG("entities.unit", "RollMeleeOutcomeAgainst: CRIT <{}, {})", sum - tmp, sum);
|
LOG_DEBUG("entities.unit", "RollMeleeOutcomeAgainst: CRIT <{}, {})", sum - tmp, sum);
|
||||||
if (IsCreature() && (ToCreature()->GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_NO_CRIT))
|
if (IsCreature() && (ToCreature()->HasFlagsExtra(CREATURE_FLAG_EXTRA_NO_CRIT)))
|
||||||
{
|
|
||||||
LOG_DEBUG("entities.unit", "RollMeleeOutcomeAgainst: CRIT DISABLED)");
|
LOG_DEBUG("entities.unit", "RollMeleeOutcomeAgainst: CRIT DISABLED)");
|
||||||
}
|
|
||||||
else
|
else
|
||||||
return MELEE_HIT_CRIT;
|
return MELEE_HIT_CRIT;
|
||||||
}
|
}
|
||||||
@@ -3122,7 +3120,7 @@ bool Unit::isSpellBlocked(Unit* victim, SpellInfo const* spellProto, WeaponAttac
|
|||||||
{
|
{
|
||||||
// Check creatures flags_extra for disable block
|
// Check creatures flags_extra for disable block
|
||||||
if (victim->IsCreature() &&
|
if (victim->IsCreature() &&
|
||||||
victim->ToCreature()->GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_NO_BLOCK)
|
victim->ToCreature()->HasFlagsExtra(CREATURE_FLAG_EXTRA_NO_BLOCK))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
float blockChance = victim->GetUnitBlockChance();
|
float blockChance = victim->GetUnitBlockChance();
|
||||||
@@ -10453,10 +10451,9 @@ bool Unit::Attack(Unit* victim, bool meleeAttack)
|
|||||||
creature->SendAIReaction(AI_REACTION_HOSTILE);
|
creature->SendAIReaction(AI_REACTION_HOSTILE);
|
||||||
|
|
||||||
/// @todo: Implement aggro range, detection range and assistance range templates
|
/// @todo: Implement aggro range, detection range and assistance range templates
|
||||||
if (!(creature->GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_DONT_CALL_ASSISTANCE))
|
if (!(creature->HasFlagsExtra(CREATURE_FLAG_EXTRA_DONT_CALL_ASSISTANCE)))
|
||||||
{
|
|
||||||
creature->CallAssistance();
|
creature->CallAssistance();
|
||||||
}
|
|
||||||
creature->SetAssistanceTimer(sWorld->getIntConfig(CONFIG_CREATURE_FAMILY_ASSISTANCE_PERIOD));
|
creature->SetAssistanceTimer(sWorld->getIntConfig(CONFIG_CREATURE_FAMILY_ASSISTANCE_PERIOD));
|
||||||
|
|
||||||
SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
|
SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
|
||||||
@@ -15144,7 +15141,7 @@ float Unit::ApplyDiminishingToDuration(DiminishingGroup group, int32& duration,
|
|||||||
Unit const* source = casterOwner ? casterOwner : caster;
|
Unit const* source = casterOwner ? casterOwner : caster;
|
||||||
|
|
||||||
if ((target->IsPlayer()
|
if ((target->IsPlayer()
|
||||||
|| target->ToCreature()->GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_ALL_DIMINISH)
|
|| target->ToCreature()->HasFlagsExtra(CREATURE_FLAG_EXTRA_ALL_DIMINISH))
|
||||||
&& source->IsPlayer())
|
&& source->IsPlayer())
|
||||||
duration = limitduration;
|
duration = limitduration;
|
||||||
}
|
}
|
||||||
@@ -15153,7 +15150,7 @@ float Unit::ApplyDiminishingToDuration(DiminishingGroup group, int32& duration,
|
|||||||
|
|
||||||
if (group == DIMINISHING_TAUNT)
|
if (group == DIMINISHING_TAUNT)
|
||||||
{
|
{
|
||||||
if (IsCreature() && (ToCreature()->GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_OBEYS_TAUNT_DIMINISHING_RETURNS))
|
if (IsCreature() && (ToCreature()->HasFlagsExtra(CREATURE_FLAG_EXTRA_OBEYS_TAUNT_DIMINISHING_RETURNS)))
|
||||||
{
|
{
|
||||||
DiminishingLevels diminish = Level;
|
DiminishingLevels diminish = Level;
|
||||||
switch (diminish)
|
switch (diminish)
|
||||||
@@ -15180,7 +15177,7 @@ float Unit::ApplyDiminishingToDuration(DiminishingGroup group, int32& duration,
|
|||||||
// Some diminishings applies to mobs too (for example, Stun)
|
// Some diminishings applies to mobs too (for example, Stun)
|
||||||
else if ((GetDiminishingReturnsGroupType(group) == DRTYPE_PLAYER
|
else if ((GetDiminishingReturnsGroupType(group) == DRTYPE_PLAYER
|
||||||
&& ((targetOwner ? (targetOwner->IsPlayer()) : (IsPlayer()))
|
&& ((targetOwner ? (targetOwner->IsPlayer()) : (IsPlayer()))
|
||||||
|| (IsCreature() && ToCreature()->GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_ALL_DIMINISH)))
|
|| (IsCreature() && ToCreature()->HasFlagsExtra(CREATURE_FLAG_EXTRA_ALL_DIMINISH))))
|
||||||
|| GetDiminishingReturnsGroupType(group) == DRTYPE_ALL)
|
|| GetDiminishingReturnsGroupType(group) == DRTYPE_ALL)
|
||||||
{
|
{
|
||||||
DiminishingLevels diminish = Level;
|
DiminishingLevels diminish = Level;
|
||||||
@@ -18057,7 +18054,7 @@ void Unit::Kill(Unit* killer, Unit* victim, bool durabilityLoss, WeaponAttackTyp
|
|||||||
|
|
||||||
if (instanceMap->IsDungeon() && player)
|
if (instanceMap->IsDungeon() && player)
|
||||||
if (instanceMap->IsRaidOrHeroicDungeon())
|
if (instanceMap->IsRaidOrHeroicDungeon())
|
||||||
if (creature->GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_INSTANCE_BIND)
|
if (creature->HasFlagsExtra(CREATURE_FLAG_EXTRA_INSTANCE_BIND))
|
||||||
instanceMap->ToInstanceMap()->PermBindAllPlayers();
|
instanceMap->ToInstanceMap()->PermBindAllPlayers();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -20997,16 +20994,12 @@ void Unit::PatchValuesUpdate(ByteBuffer& valuesUpdateBuf, BuildValuesCachePosPoi
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cinfo->flags_extra & CREATURE_FLAG_EXTRA_TRIGGER)
|
if (cinfo->HasFlagsExtra(CREATURE_FLAG_EXTRA_TRIGGER))
|
||||||
{
|
{
|
||||||
if (target->IsGameMaster() && target->GetSession()->IsGMAccount())
|
if (target->IsGameMaster() && target->GetSession()->IsGMAccount())
|
||||||
{
|
|
||||||
displayId = cinfo->GetFirstVisibleModel()->CreatureDisplayID;
|
displayId = cinfo->GetFirstVisibleModel()->CreatureDisplayID;
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
displayId = cinfo->GetFirstInvisibleModel()->CreatureDisplayID;
|
displayId = cinfo->GetFirstInvisibleModel()->CreatureDisplayID;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -38,17 +38,17 @@ enum GameEventState
|
|||||||
|
|
||||||
struct GameEventFinishCondition
|
struct GameEventFinishCondition
|
||||||
{
|
{
|
||||||
float reqNum; // required number // use float, since some events use percent
|
float ReqNum; // required number // use float, since some events use percent
|
||||||
float done; // done number
|
float Done; // done number
|
||||||
uint32 max_world_state; // max resource count world state update id
|
uint32 MaxWorldState; // max resource count world state update id
|
||||||
uint32 done_world_state; // done resource count world state update id
|
uint32 DoneWorldState; // done resource count world state update id
|
||||||
};
|
};
|
||||||
|
|
||||||
struct GameEventQuestToEventConditionNum
|
struct GameEventQuestToEventConditionNum
|
||||||
{
|
{
|
||||||
uint16 event_id;
|
uint16 EventId;
|
||||||
uint32 condition;
|
uint32 Condition;
|
||||||
float num;
|
float Num;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef std::map<uint32 /*condition id*/, GameEventFinishCondition> GameEventConditionMap;
|
typedef std::map<uint32 /*condition id*/, GameEventFinishCondition> GameEventConditionMap;
|
||||||
@@ -56,37 +56,37 @@ typedef std::map<uint32 /*condition id*/, GameEventFinishCondition> GameEventCon
|
|||||||
struct GameEventData
|
struct GameEventData
|
||||||
{
|
{
|
||||||
GameEventData() = default;
|
GameEventData() = default;
|
||||||
uint32 eventId;
|
uint32 EventId;
|
||||||
time_t start{1}; // occurs after this time
|
time_t Start{1}; // occurs after this time
|
||||||
time_t end{0}; // occurs before this time
|
time_t End{0}; // occurs before this time
|
||||||
time_t nextstart{0}; // after this time the follow-up events count this phase completed
|
time_t NextStart{0}; // after this time the follow-up events count this phase completed
|
||||||
uint32 occurence{0}; // time between end and start
|
uint32 Occurence{0}; // time between end and start
|
||||||
uint32 length{0}; // length of the event (minutes) after finishing all conditions
|
uint32 Length{0}; // length of the event (minutes) after finishing all conditions
|
||||||
HolidayIds holiday_id{HOLIDAY_NONE};
|
HolidayIds HolidayId{HOLIDAY_NONE};
|
||||||
uint8 holidayStage;
|
uint8 HolidayStage;
|
||||||
GameEventState state{GAMEEVENT_NORMAL}; // state of the game event, these are saved into the game_event table on change!
|
GameEventState State{GAMEEVENT_NORMAL}; // state of the game event, these are saved into the game_event table on change!
|
||||||
GameEventConditionMap conditions; // conditions to finish
|
GameEventConditionMap Conditions; // conditions to finish
|
||||||
std::set<uint16 /*gameevent id*/> prerequisite_events; // events that must be completed before starting this event
|
std::set<uint16 /*gameevent id*/> PrerequisiteEvents; // events that must be completed before starting this event
|
||||||
std::string description;
|
std::string Description;
|
||||||
uint8 announce; // if 0 dont announce, if 1 announce, if 2 take config value
|
uint8 Announce; // if 0 dont announce, if 1 announce, if 2 take config value
|
||||||
|
|
||||||
[[nodiscard]] bool isValid() const { return length > 0 || state > GAMEEVENT_NORMAL; }
|
[[nodiscard]] bool isValid() const { return Length > 0 || State > GAMEEVENT_NORMAL; }
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ModelEquip
|
struct ModelEquip
|
||||||
{
|
{
|
||||||
uint32 modelid;
|
uint32 ModelId;
|
||||||
uint32 modelid_prev;
|
uint32 ModelIdPrev;
|
||||||
uint8 equipment_id;
|
uint8 EquipmentId;
|
||||||
uint8 equipement_id_prev;
|
uint8 EquipementIdPrev;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct NPCVendorEntry
|
struct NPCVendorEntry
|
||||||
{
|
{
|
||||||
uint32 entry; // creature entry
|
uint32 Entry; // creature entry
|
||||||
uint32 item; // item id
|
uint32 Item; // item id
|
||||||
int32 maxcount; // 0 for infinite
|
int32 MaxCount; // 0 for infinite
|
||||||
uint32 incrtime; // time for restore items amount if maxcount != 0
|
uint32 Incrtime; // time for restore items amount if maxcount != 0
|
||||||
uint32 ExtendedCost;
|
uint32 ExtendedCost;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -105,46 +105,62 @@ public:
|
|||||||
|
|
||||||
typedef std::set<uint16> ActiveEvents;
|
typedef std::set<uint16> ActiveEvents;
|
||||||
typedef std::vector<GameEventData> GameEventDataMap;
|
typedef std::vector<GameEventData> GameEventDataMap;
|
||||||
[[nodiscard]] ActiveEvents const& GetActiveEventList() const { return m_ActiveEvents; }
|
[[nodiscard]] ActiveEvents const& GetActiveEventList() const { return _activeEvents; }
|
||||||
[[nodiscard]] GameEventDataMap const& GetEventMap() const { return mGameEvent; }
|
[[nodiscard]] GameEventDataMap const& GetEventMap() const { return _gameEvent; }
|
||||||
[[nodiscard]] bool CheckOneGameEvent(uint16 entry) const;
|
[[nodiscard]] bool CheckOneGameEvent(uint16 entry) const;
|
||||||
[[nodiscard]] uint32 NextCheck(uint16 entry) const;
|
[[nodiscard]] uint32 NextCheck(uint16 entry) const;
|
||||||
void LoadFromDB();
|
void LoadFromDB();
|
||||||
void LoadHolidayDates();
|
void LoadHolidayDates();
|
||||||
uint32 Update();
|
uint32 Update();
|
||||||
bool IsActiveEvent(uint16 event_id) { return (m_ActiveEvents.find(event_id) != m_ActiveEvents.end()); }
|
bool IsActiveEvent(uint16 eventId) { return (_activeEvents.find(eventId) != _activeEvents.end()); }
|
||||||
uint32 StartSystem();
|
uint32 StartSystem();
|
||||||
void Initialize();
|
void Initialize();
|
||||||
void StartArenaSeason();
|
void StartArenaSeason();
|
||||||
void StartInternalEvent(uint16 event_id);
|
void StartInternalEvent(uint16 eventId);
|
||||||
bool StartEvent(uint16 event_id, bool overwrite = false);
|
bool StartEvent(uint16 eventId, bool overwrite = false);
|
||||||
void StopEvent(uint16 event_id, bool overwrite = false);
|
void StopEvent(uint16 eventId, bool overwrite = false);
|
||||||
void HandleQuestComplete(uint32 quest_id); // called on world event type quest completions
|
void HandleQuestComplete(uint32 questId); // called on world event type quest completions
|
||||||
uint32 GetNPCFlag(Creature* cr);
|
uint32 GetNPCFlag(Creature* cr);
|
||||||
// Load the game event npc vendor table from the DB
|
// Load the game event npc vendor table from the DB
|
||||||
void LoadEventVendors();
|
void LoadEventVendors();
|
||||||
[[nodiscard]] uint32 GetHolidayEventId(uint32 holidayId) const;
|
[[nodiscard]] uint32 GetHolidayEventId(uint32 holidayId) const;
|
||||||
private:
|
private:
|
||||||
void SendWorldStateUpdate(Player* player, uint16 event_id);
|
void LoadEvents();
|
||||||
void AddActiveEvent(uint16 event_id) { m_ActiveEvents.insert(event_id); }
|
void LoadEventSaveData();
|
||||||
void RemoveActiveEvent(uint16 event_id) { m_ActiveEvents.erase(event_id); }
|
void LoadEventPrerequisiteData();
|
||||||
void ApplyNewEvent(uint16 event_id);
|
void LoadEventCreatureData();
|
||||||
void UnApplyEvent(uint16 event_id);
|
void LoadEventGameObjectData();
|
||||||
void GameEventSpawn(int16 event_id);
|
void LoadEventModelEquipmentChangeData();
|
||||||
void GameEventUnspawn(int16 event_id);
|
void LoadEventQuestData();
|
||||||
void ChangeEquipOrModel(int16 event_id, bool activate);
|
void LoadEventGameObjectQuestData();
|
||||||
void UpdateEventQuests(uint16 event_id, bool activate);
|
void LoadEventQuestConditionData();
|
||||||
void UpdateWorldStates(uint16 event_id, bool Activate);
|
void LoadEventConditionData();
|
||||||
void UpdateEventNPCFlags(uint16 event_id);
|
void LoadEventConditionSaveData();
|
||||||
void UpdateEventNPCVendor(uint16 event_id, bool activate);
|
void LoadEventNPCFlags();
|
||||||
|
void LoadEventSeasonalQuestRelations();
|
||||||
|
void LoadEventBattlegroundData();
|
||||||
|
void LoadEventPoolData();
|
||||||
|
|
||||||
|
void SendWorldStateUpdate(Player* player, uint16 eventId);
|
||||||
|
void AddActiveEvent(uint16 eventId) { _activeEvents.insert(eventId); }
|
||||||
|
void RemoveActiveEvent(uint16 eventId) { _activeEvents.erase(eventId); }
|
||||||
|
void ApplyNewEvent(uint16 eventId);
|
||||||
|
void UnApplyEvent(uint16 eventId);
|
||||||
|
void GameEventSpawn(int16 eventId);
|
||||||
|
void GameEventUnspawn(int16 eventId);
|
||||||
|
void ChangeEquipOrModel(int16 eventId, bool activate);
|
||||||
|
void UpdateEventQuests(uint16 eventId, bool activate);
|
||||||
|
void UpdateWorldStates(uint16 eventId, bool Activate);
|
||||||
|
void UpdateEventNPCFlags(uint16 eventId);
|
||||||
|
void UpdateEventNPCVendor(uint16 eventId, bool activate);
|
||||||
void UpdateBattlegroundSettings();
|
void UpdateBattlegroundSettings();
|
||||||
void RunSmartAIScripts(uint16 event_id, bool activate); //! Runs SMART_EVENT_GAME_EVENT_START/_END SAI
|
void RunSmartAIScripts(uint16 eventId, bool activate); //! Runs SMART_EVENT_GAME_EVENT_START/_END SAI
|
||||||
bool CheckOneGameEventConditions(uint16 event_id);
|
bool CheckOneGameEventConditions(uint16 eventId);
|
||||||
void SaveWorldEventStateToDB(uint16 event_id);
|
void SaveWorldEventStateToDB(uint16 eventId);
|
||||||
bool hasCreatureQuestActiveEventExcept(uint32 quest_id, uint16 event_id);
|
bool HasCreatureQuestActiveEventExcept(uint32 quest_id, uint16 eventId);
|
||||||
bool hasGameObjectQuestActiveEventExcept(uint32 quest_id, uint16 event_id);
|
bool HasGameObjectQuestActiveEventExcept(uint32 quest_id, uint16 eventId);
|
||||||
bool hasCreatureActiveEventExcept(ObjectGuid::LowType creature_guid, uint16 event_id);
|
bool HasCreatureActiveEventExcept(ObjectGuid::LowType creature_guid, uint16 eventId);
|
||||||
bool hasGameObjectActiveEventExcept(ObjectGuid::LowType go_guid, uint16 event_id);
|
bool HasGameObjectActiveEventExcept(ObjectGuid::LowType go_guid, uint16 eventId);
|
||||||
void SetHolidayEventTime(GameEventData& event);
|
void SetHolidayEventTime(GameEventData& event);
|
||||||
|
|
||||||
typedef std::list<ObjectGuid::LowType> GuidLowList;
|
typedef std::list<ObjectGuid::LowType> GuidLowList;
|
||||||
@@ -165,29 +181,27 @@ private:
|
|||||||
typedef std::vector<NPCFlagList> GameEventNPCFlagMap;
|
typedef std::vector<NPCFlagList> GameEventNPCFlagMap;
|
||||||
typedef std::vector<uint32> GameEventBitmask;
|
typedef std::vector<uint32> GameEventBitmask;
|
||||||
typedef std::unordered_map<uint32, std::vector<uint32>> GameEventSeasonalQuestsMap;
|
typedef std::unordered_map<uint32, std::vector<uint32>> GameEventSeasonalQuestsMap;
|
||||||
GameEventQuestMap mGameEventCreatureQuests;
|
GameEventQuestMap _gameEventCreatureQuests;
|
||||||
GameEventQuestMap mGameEventGameObjectQuests;
|
GameEventQuestMap _gameEventGameObjectQuests;
|
||||||
GameEventNPCVendorMap mGameEventVendors;
|
GameEventNPCVendorMap _gameEventVendors;
|
||||||
GameEventModelEquipMap mGameEventModelEquip;
|
GameEventModelEquipMap _gameEventModelEquip;
|
||||||
//GameEventGuidMap mGameEventCreatureGuids;
|
GameEventIdMap _gameEventPoolIds;
|
||||||
//GameEventGuidMap mGameEventGameobjectGuids;
|
GameEventDataMap _gameEvent;
|
||||||
GameEventIdMap mGameEventPoolIds;
|
GameEventBitmask _gameEventBattlegroundHolidays;
|
||||||
GameEventDataMap mGameEvent;
|
QuestIdToEventConditionMap _questToEventConditions;
|
||||||
GameEventBitmask mGameEventBattlegroundHolidays;
|
GameEventNPCFlagMap _gameEventNPCFlags;
|
||||||
QuestIdToEventConditionMap mQuestToEventConditions;
|
ActiveEvents _activeEvents;
|
||||||
GameEventNPCFlagMap mGameEventNPCFlags;
|
bool _isSystemInit;
|
||||||
ActiveEvents m_ActiveEvents;
|
|
||||||
bool isSystemInit;
|
|
||||||
GameEventSeasonalQuestsMap _gameEventSeasonalQuestsMap;
|
GameEventSeasonalQuestsMap _gameEventSeasonalQuestsMap;
|
||||||
public:
|
public:
|
||||||
GameEventGuidMap mGameEventCreatureGuids;
|
GameEventGuidMap GameEventCreatureGuids;
|
||||||
GameEventGuidMap mGameEventGameobjectGuids;
|
GameEventGuidMap GameEventGameobjectGuids;
|
||||||
std::vector<uint32> modifiedHolidays;
|
std::vector<uint32> ModifiedHolidays;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define sGameEventMgr GameEventMgr::instance()
|
#define sGameEventMgr GameEventMgr::instance()
|
||||||
|
|
||||||
bool IsHolidayActive(HolidayIds id);
|
bool IsHolidayActive(HolidayIds id);
|
||||||
bool IsEventActive(uint16 event_id);
|
bool IsEventActive(uint16 eventId);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -1651,7 +1651,7 @@ CreatureModel const* ObjectMgr::ChooseDisplayId(CreatureTemplate const* cinfo, C
|
|||||||
if (CreatureModel const* model = cinfo->GetModelWithDisplayId(data->displayid))
|
if (CreatureModel const* model = cinfo->GetModelWithDisplayId(data->displayid))
|
||||||
return model;
|
return model;
|
||||||
|
|
||||||
if (!(cinfo->flags_extra & CREATURE_FLAG_EXTRA_TRIGGER))
|
if (!cinfo->HasFlagsExtra(CREATURE_FLAG_EXTRA_TRIGGER))
|
||||||
if (CreatureModel const* model = cinfo->GetRandomValidModel())
|
if (CreatureModel const* model = cinfo->GetRandomValidModel())
|
||||||
return model;
|
return model;
|
||||||
|
|
||||||
@@ -2233,7 +2233,7 @@ void ObjectMgr::LoadCreatures()
|
|||||||
data.equipmentId = 0;
|
data.equipmentId = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ((cInfo->flags_extra & CREATURE_FLAG_EXTRA_INSTANCE_BIND) || (data.id2 && cInfo2->flags_extra & CREATURE_FLAG_EXTRA_INSTANCE_BIND) || (data.id3 && cInfo3->flags_extra & CREATURE_FLAG_EXTRA_INSTANCE_BIND))
|
if (cInfo->HasFlagsExtra(CREATURE_FLAG_EXTRA_INSTANCE_BIND) || (data.id2 && cInfo2->HasFlagsExtra(CREATURE_FLAG_EXTRA_INSTANCE_BIND)) || (data.id3 && cInfo3->HasFlagsExtra(CREATURE_FLAG_EXTRA_INSTANCE_BIND)))
|
||||||
{
|
{
|
||||||
if (!mapEntry->IsDungeon())
|
if (!mapEntry->IsDungeon())
|
||||||
LOG_ERROR("sql.sql", "Table `creature` have creature (SpawnId: {} Entries: {}, {}, {}) with a `creature_template`.`flags_extra` in one or more entries including CREATURE_FLAG_EXTRA_INSTANCE_BIND but creature are not in instance.",
|
LOG_ERROR("sql.sql", "Table `creature` have creature (SpawnId: {} Entries: {}, {}, {}) with a `creature_template`.`flags_extra` in one or more entries including CREATURE_FLAG_EXTRA_INSTANCE_BIND but creature are not in instance.",
|
||||||
|
|||||||
@@ -153,8 +153,8 @@ void WorldSession::HandleCalendarGetCalendar(WorldPacket& /*recvData*/)
|
|||||||
data.append(dataBuffer);
|
data.append(dataBuffer);
|
||||||
|
|
||||||
/// @todo: Fix this, how we do know how many and what holidays to send?
|
/// @todo: Fix this, how we do know how many and what holidays to send?
|
||||||
data << uint32(sGameEventMgr->modifiedHolidays.size());
|
data << uint32(sGameEventMgr->ModifiedHolidays.size());
|
||||||
for (uint32 entry : sGameEventMgr->modifiedHolidays)
|
for (uint32 entry : sGameEventMgr->ModifiedHolidays)
|
||||||
{
|
{
|
||||||
HolidaysEntry const* holiday = sHolidaysStore.LookupEntry(entry);
|
HolidaysEntry const* holiday = sHolidaysStore.LookupEntry(entry);
|
||||||
|
|
||||||
|
|||||||
@@ -743,7 +743,7 @@ void WorldSession::HandleSellItemOpcode(WorldPacket& recvData)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((creature->GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_NO_SELL_VENDOR) != 0)
|
if (creature->HasFlagsExtra(CREATURE_FLAG_EXTRA_NO_SELL_VENDOR))
|
||||||
{
|
{
|
||||||
_player->SendSellError(SELL_ERR_CANT_SELL_TO_THIS_MERCHANT, creature, itemguid, 0);
|
_player->SendSellError(SELL_ERR_CANT_SELL_TO_THIS_MERCHANT, creature, itemguid, 0);
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -70,14 +70,12 @@ void WorldSession::SendTradeStatus(TradeStatus status)
|
|||||||
|
|
||||||
void WorldSession::HandleIgnoreTradeOpcode(WorldPacket& /*recvPacket*/)
|
void WorldSession::HandleIgnoreTradeOpcode(WorldPacket& /*recvPacket*/)
|
||||||
{
|
{
|
||||||
LOG_DEBUG("network", "WORLD: Ignore Trade {}", _player->GetGUID().ToString());
|
_player->TradeCancel(true, TRADE_STATUS_IGNORE_YOU);
|
||||||
// recvPacket.print_storage();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void WorldSession::HandleBusyTradeOpcode(WorldPacket& /*recvPacket*/)
|
void WorldSession::HandleBusyTradeOpcode(WorldPacket& /*recvPacket*/)
|
||||||
{
|
{
|
||||||
LOG_DEBUG("network", "WORLD: Busy Trade {}", _player->GetGUID().ToString());
|
_player->TradeCancel(true, TRADE_STATUS_BUSY);
|
||||||
// recvPacket.print_storage();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void WorldSession::SendUpdateTrade(bool trader_data /*= true*/)
|
void WorldSession::SendUpdateTrade(bool trader_data /*= true*/)
|
||||||
@@ -526,12 +524,12 @@ void WorldSession::HandleBeginTradeOpcode(WorldPacket& /*recvPacket*/)
|
|||||||
SendTradeStatus(TRADE_STATUS_OPEN_WINDOW);
|
SendTradeStatus(TRADE_STATUS_OPEN_WINDOW);
|
||||||
}
|
}
|
||||||
|
|
||||||
void WorldSession::SendCancelTrade()
|
void WorldSession::SendCancelTrade(TradeStatus status)
|
||||||
{
|
{
|
||||||
if (PlayerRecentlyLoggedOut() || PlayerLogout())
|
if (PlayerRecentlyLoggedOut() || PlayerLogout())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
SendTradeStatus(TRADE_STATUS_TRADE_CANCELED);
|
SendTradeStatus(status);
|
||||||
}
|
}
|
||||||
|
|
||||||
void WorldSession::HandleCancelTradeOpcode(WorldPacket& /*recvPacket*/)
|
void WorldSession::HandleCancelTradeOpcode(WorldPacket& /*recvPacket*/)
|
||||||
@@ -620,12 +618,6 @@ void WorldSession::HandleInitiateTradeOpcode(WorldPacket& recvPacket)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pOther->GetSocial()->HasIgnore(GetPlayer()->GetGUID()))
|
|
||||||
{
|
|
||||||
SendTradeStatus(TRADE_STATUS_IGNORE_YOU);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_TRADE) && pOther->GetTeamId() != _player->GetTeamId())
|
if (!sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_TRADE) && pOther->GetTeamId() != _player->GetTeamId())
|
||||||
{
|
{
|
||||||
SendTradeStatus(TRADE_STATUS_WRONG_FACTION);
|
SendTradeStatus(TRADE_STATUS_WRONG_FACTION);
|
||||||
|
|||||||
@@ -3724,14 +3724,14 @@ void Map::RemoveOldCorpses()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Map::ScheduleCreatureRespawn(ObjectGuid creatureGuid, Milliseconds respawnTimer)
|
void Map::ScheduleCreatureRespawn(ObjectGuid creatureGuid, Milliseconds respawnTimer, Position pos)
|
||||||
{
|
{
|
||||||
_creatureRespawnScheduler.Schedule(respawnTimer, [this, creatureGuid](TaskContext)
|
_creatureRespawnScheduler.Schedule(respawnTimer, [this, creatureGuid, pos](TaskContext)
|
||||||
{
|
{
|
||||||
if (Creature* creature = GetCreature(creatureGuid))
|
if (Creature* creature = GetCreature(creatureGuid))
|
||||||
{
|
|
||||||
creature->Respawn();
|
creature->Respawn();
|
||||||
}
|
else
|
||||||
|
SummonCreature(creatureGuid.GetEntry(), pos);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -596,7 +596,7 @@ public:
|
|||||||
|
|
||||||
TaskScheduler _creatureRespawnScheduler;
|
TaskScheduler _creatureRespawnScheduler;
|
||||||
|
|
||||||
void ScheduleCreatureRespawn(ObjectGuid /*creatureGuid*/, Milliseconds /*respawnTimer*/);
|
void ScheduleCreatureRespawn(ObjectGuid /*creatureGuid*/, Milliseconds /*respawnTimer*/, Position pos = Position());
|
||||||
|
|
||||||
void LoadCorpseData();
|
void LoadCorpseData();
|
||||||
void DeleteCorpseData();
|
void DeleteCorpseData();
|
||||||
|
|||||||
@@ -167,7 +167,7 @@ Map::EnterState MapMgr::PlayerCannotEnter(uint32 mapid, Player* player, bool log
|
|||||||
{
|
{
|
||||||
// probably there must be special opcode, because client has this string constant in GlobalStrings.lua
|
// probably there must be special opcode, because client has this string constant in GlobalStrings.lua
|
||||||
/// @todo: this is not a good place to send the message
|
/// @todo: this is not a good place to send the message
|
||||||
player->GetSession()->SendAreaTriggerMessage(player->GetSession()->GetAcoreString(LANG_INSTANCE_RAID_GROUP_ONLY), mapName);
|
player->GetSession()->SendAreaTriggerMessage(LANG_INSTANCE_RAID_GROUP_ONLY, mapName);
|
||||||
LOG_DEBUG("maps", "MAP: Player '{}' must be in a raid group to enter instance '{}'", player->GetName(), mapName);
|
LOG_DEBUG("maps", "MAP: Player '{}' must be in a raid group to enter instance '{}'", player->GetName(), mapName);
|
||||||
return Map::CANNOT_ENTER_NOT_IN_RAID;
|
return Map::CANNOT_ENTER_NOT_IN_RAID;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ uint32 Acore::XP::Gain(Player* player, Unit* unit, bool isBattleGround /*= false
|
|||||||
uint32 gain = 0;
|
uint32 gain = 0;
|
||||||
|
|
||||||
if (!creature || (!creature->IsTotem() && !creature->IsPet() && !creature->IsCritter() &&
|
if (!creature || (!creature->IsTotem() && !creature->IsPet() && !creature->IsCritter() &&
|
||||||
!(creature->GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_NO_XP)))
|
!creature->HasFlagsExtra(CREATURE_FLAG_EXTRA_NO_XP)))
|
||||||
{
|
{
|
||||||
float xpMod = 1.0f;
|
float xpMod = 1.0f;
|
||||||
|
|
||||||
|
|||||||
@@ -372,7 +372,7 @@ public:
|
|||||||
void SendAreaTriggerMessage(std::string_view str);
|
void SendAreaTriggerMessage(std::string_view str);
|
||||||
|
|
||||||
template<typename... Args>
|
template<typename... Args>
|
||||||
void SendAreaTriggerMessage(std::string fmt, Args&&... args)
|
void SendAreaTriggerMessage(char const* fmt, Args&&... args)
|
||||||
{
|
{
|
||||||
if (!m_playerLoading)
|
if (!m_playerLoading)
|
||||||
SendAreaTriggerMessage(Acore::StringFormat(fmt, std::forward<Args>(args)...));
|
SendAreaTriggerMessage(Acore::StringFormat(fmt, std::forward<Args>(args)...));
|
||||||
@@ -466,7 +466,7 @@ public:
|
|||||||
|
|
||||||
void SendTradeStatus(TradeStatus status);
|
void SendTradeStatus(TradeStatus status);
|
||||||
void SendUpdateTrade(bool trader_data = true);
|
void SendUpdateTrade(bool trader_data = true);
|
||||||
void SendCancelTrade();
|
void SendCancelTrade(TradeStatus status);
|
||||||
|
|
||||||
void SendPetitionQueryOpcode(ObjectGuid petitionguid);
|
void SendPetitionQueryOpcode(ObjectGuid petitionguid);
|
||||||
|
|
||||||
|
|||||||
@@ -3107,6 +3107,7 @@ void SpellMgr::LoadSpellInfoCorrections()
|
|||||||
// Tail Smash (Sindragosa)
|
// Tail Smash (Sindragosa)
|
||||||
ApplySpellFix({ 71077 }, [](SpellInfo* spellInfo)
|
ApplySpellFix({ 71077 }, [](SpellInfo* spellInfo)
|
||||||
{
|
{
|
||||||
|
spellInfo->AttributesEx2 |= SPELL_ATTR2_IGNORE_LINE_OF_SIGHT;
|
||||||
spellInfo->Effects[EFFECT_0].TargetA = SpellImplicitTargetInfo(TARGET_DEST_CASTER_BACK);
|
spellInfo->Effects[EFFECT_0].TargetA = SpellImplicitTargetInfo(TARGET_DEST_CASTER_BACK);
|
||||||
spellInfo->Effects[EFFECT_0].TargetB = SpellImplicitTargetInfo(TARGET_UNIT_DEST_AREA_ENEMY);
|
spellInfo->Effects[EFFECT_0].TargetB = SpellImplicitTargetInfo(TARGET_UNIT_DEST_AREA_ENEMY);
|
||||||
spellInfo->Effects[EFFECT_1].TargetA = SpellImplicitTargetInfo(TARGET_DEST_CASTER_BACK);
|
spellInfo->Effects[EFFECT_1].TargetA = SpellImplicitTargetInfo(TARGET_DEST_CASTER_BACK);
|
||||||
|
|||||||
@@ -881,9 +881,9 @@ std::string WorldState::GetSunsReachPrintout()
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
output += "Sunwell Plateau Gate Phase " + std::to_string(m_sunsReachData.m_gate) + " (" + formatGatePhase(m_sunsReachData.m_gate) + ")" + ":\n";
|
output += "Sunwell Plateau Gate Phase " + std::to_string(m_sunsReachData.m_gate) + " (" + formatGatePhase(m_sunsReachData.m_gate) + ")" + ":\n";
|
||||||
output += " 0. Gate 1 (Agamath): " + std::string(m_sunsReachData.m_gate >= SUNWELL_AGAMATH_GATE1_OPEN ? "Open " : "Closed ") + std::to_string(m_sunsReachData.m_sunsReachReclamationCounters[COUNTER_AGAMATH_THE_FIRST_GATE]) + " (" + std::to_string(m_sunsReachData.GetSunwellGatePercentage(SUNWELL_ALL_GATES_CLOSED)) + "%)\n";
|
output += " 0. Gate 1 (Agamath): " + std::string(m_sunsReachData.m_gate >= SUNWELL_AGAMATH_GATE1_OPEN ? "Open " : "Closed ") + std::to_string(m_sunsReachData.m_gateCounters[COUNTER_AGAMATH_THE_FIRST_GATE]) + " (" + std::to_string(m_sunsReachData.GetSunwellGatePercentage(SUNWELL_ALL_GATES_CLOSED)) + "%)\n";
|
||||||
output += " 1. Gate 2 (Rohendor): " + std::string(m_sunsReachData.m_gate >= SUNWELL_ROHENDOR_GATE2_OPEN ? "Open " : "Closed ") + std::to_string(m_sunsReachData.m_sunsReachReclamationCounters[COUNTER_ROHENDOR_THE_SECOND_GATE]) + " (" + std::to_string(m_sunsReachData.GetSunwellGatePercentage(SUNWELL_AGAMATH_GATE1_OPEN)) + "%)\n";
|
output += " 1. Gate 2 (Rohendor): " + std::string(m_sunsReachData.m_gate >= SUNWELL_ROHENDOR_GATE2_OPEN ? "Open " : "Closed ") + std::to_string(m_sunsReachData.m_gateCounters[COUNTER_ROHENDOR_THE_SECOND_GATE]) + " (" + std::to_string(m_sunsReachData.GetSunwellGatePercentage(SUNWELL_AGAMATH_GATE1_OPEN)) + "%)\n";
|
||||||
output += " 2. Gate 3 (Archonisus): " + std::string(m_sunsReachData.m_gate >= SUNWELL_ARCHONISUS_GATE3_OPEN ? "Open " : "Closed ") + std::to_string(m_sunsReachData.m_sunsReachReclamationCounters[COUNTER_ARCHONISUS_THE_FINAL_GATE]) + " (" + std::to_string(m_sunsReachData.GetSunwellGatePercentage(SUNWELL_ROHENDOR_GATE2_OPEN)) + "%)\n";
|
output += " 2. Gate 3 (Archonisus): " + std::string(m_sunsReachData.m_gate >= SUNWELL_ARCHONISUS_GATE3_OPEN ? "Open " : "Closed ") + std::to_string(m_sunsReachData.m_gateCounters[COUNTER_ARCHONISUS_THE_FINAL_GATE]) + " (" + std::to_string(m_sunsReachData.GetSunwellGatePercentage(SUNWELL_ROHENDOR_GATE2_OPEN)) + "%)\n";
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -68,9 +68,9 @@ public:
|
|||||||
GameEventData const& eventData = events[eventId];
|
GameEventData const& eventData = events[eventId];
|
||||||
|
|
||||||
if (handler->GetSession())
|
if (handler->GetSession())
|
||||||
handler->PSendSysMessage(LANG_EVENT_ENTRY_LIST_CHAT, eventId, eventId, eventData.description, active);
|
handler->PSendSysMessage(LANG_EVENT_ENTRY_LIST_CHAT, eventId, eventId, eventData.Description, active);
|
||||||
else
|
else
|
||||||
handler->PSendSysMessage(LANG_EVENT_ENTRY_LIST_CONSOLE, eventId, eventData.description, active);
|
handler->PSendSysMessage(LANG_EVENT_ENTRY_LIST_CONSOLE, eventId, eventData.Description, active);
|
||||||
|
|
||||||
++counter;
|
++counter;
|
||||||
}
|
}
|
||||||
@@ -104,17 +104,17 @@ public:
|
|||||||
bool active = activeEvents.find(eventId) != activeEvents.end();
|
bool active = activeEvents.find(eventId) != activeEvents.end();
|
||||||
std::string activeStr = active ? handler->GetAcoreString(LANG_ACTIVE) : "";
|
std::string activeStr = active ? handler->GetAcoreString(LANG_ACTIVE) : "";
|
||||||
|
|
||||||
std::string startTimeStr = Acore::Time::TimeToTimestampStr(Seconds(eventData.start));
|
std::string startTimeStr = Acore::Time::TimeToTimestampStr(Seconds(eventData.Start));
|
||||||
std::string endTimeStr = Acore::Time::TimeToTimestampStr(Seconds(eventData.end));
|
std::string endTimeStr = Acore::Time::TimeToTimestampStr(Seconds(eventData.End));
|
||||||
|
|
||||||
uint32 delay = sGameEventMgr->NextCheck(eventId);
|
uint32 delay = sGameEventMgr->NextCheck(eventId);
|
||||||
time_t nextTime = GameTime::GetGameTime().count() + delay;
|
time_t nextTime = GameTime::GetGameTime().count() + delay;
|
||||||
std::string nextStr = nextTime >= eventData.start && nextTime < eventData.end ? Acore::Time::TimeToTimestampStr(Seconds(nextTime)) : "-";
|
std::string nextStr = nextTime >= eventData.Start && nextTime < eventData.End ? Acore::Time::TimeToTimestampStr(Seconds(nextTime)) : "-";
|
||||||
|
|
||||||
std::string occurenceStr = secsToTimeString(eventData.occurence * MINUTE, true);
|
std::string occurenceStr = secsToTimeString(eventData.Occurence * MINUTE, true);
|
||||||
std::string lengthStr = secsToTimeString(eventData.length * MINUTE, true);
|
std::string lengthStr = secsToTimeString(eventData.Length * MINUTE, true);
|
||||||
|
|
||||||
handler->PSendSysMessage(LANG_EVENT_INFO, uint16(eventId), eventData.description, activeStr,
|
handler->PSendSysMessage(LANG_EVENT_INFO, uint16(eventId), eventData.Description, activeStr,
|
||||||
startTimeStr, endTimeStr, occurenceStr, lengthStr,
|
startTimeStr, endTimeStr, occurenceStr, lengthStr,
|
||||||
nextStr);
|
nextStr);
|
||||||
|
|
||||||
@@ -141,11 +141,11 @@ public:
|
|||||||
GameEventMgr::ActiveEvents const& activeEvents = sGameEventMgr->GetActiveEventList();
|
GameEventMgr::ActiveEvents const& activeEvents = sGameEventMgr->GetActiveEventList();
|
||||||
if (activeEvents.find(eventId) != activeEvents.end())
|
if (activeEvents.find(eventId) != activeEvents.end())
|
||||||
{
|
{
|
||||||
handler->SendErrorMessage(LANG_EVENT_ALREADY_ACTIVE, uint16(eventId), eventData.description);
|
handler->SendErrorMessage(LANG_EVENT_ALREADY_ACTIVE, uint16(eventId), eventData.Description);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
handler->PSendSysMessage(LANG_EVENT_STARTED, uint16(eventId), eventData.description);
|
handler->PSendSysMessage(LANG_EVENT_STARTED, uint16(eventId), eventData.Description);
|
||||||
sGameEventMgr->StartEvent(eventId, true);
|
sGameEventMgr->StartEvent(eventId, true);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -171,11 +171,11 @@ public:
|
|||||||
|
|
||||||
if (activeEvents.find(eventId) == activeEvents.end())
|
if (activeEvents.find(eventId) == activeEvents.end())
|
||||||
{
|
{
|
||||||
handler->SendErrorMessage(LANG_EVENT_NOT_ACTIVE, uint16(eventId), eventData.description);
|
handler->SendErrorMessage(LANG_EVENT_NOT_ACTIVE, uint16(eventId), eventData.Description);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
handler->PSendSysMessage(LANG_EVENT_STOPPED, uint16(eventId), eventData.description);
|
handler->PSendSysMessage(LANG_EVENT_STOPPED, uint16(eventId), eventData.Description);
|
||||||
sGameEventMgr->StopEvent(eventId, true);
|
sGameEventMgr->StopEvent(eventId, true);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -269,17 +269,13 @@ public:
|
|||||||
static bool HandleLookupEventCommand(ChatHandler* handler, Tail namePart)
|
static bool HandleLookupEventCommand(ChatHandler* handler, Tail namePart)
|
||||||
{
|
{
|
||||||
if (namePart.empty())
|
if (namePart.empty())
|
||||||
{
|
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
|
|
||||||
std::wstring wNamePart;
|
std::wstring wNamePart;
|
||||||
|
|
||||||
// converting string that we try to find to lower case
|
// converting string that we try to find to lower case
|
||||||
if (!Utf8toWStr(namePart, wNamePart))
|
if (!Utf8toWStr(namePart, wNamePart))
|
||||||
{
|
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
|
|
||||||
wstrToLower(wNamePart);
|
wstrToLower(wNamePart);
|
||||||
|
|
||||||
@@ -294,11 +290,9 @@ public:
|
|||||||
{
|
{
|
||||||
GameEventData const& eventData = events[id];
|
GameEventData const& eventData = events[id];
|
||||||
|
|
||||||
std::string descr = eventData.description;
|
std::string descr = eventData.Description;
|
||||||
if (descr.empty())
|
if (descr.empty())
|
||||||
{
|
|
||||||
continue;
|
continue;
|
||||||
}
|
|
||||||
|
|
||||||
if (Utf8FitTo(descr, wNamePart))
|
if (Utf8FitTo(descr, wNamePart))
|
||||||
{
|
{
|
||||||
@@ -311,25 +305,17 @@ public:
|
|||||||
std::string active = activeEvents.find(id) != activeEvents.end() ? handler->GetAcoreString(LANG_ACTIVE) : "";
|
std::string active = activeEvents.find(id) != activeEvents.end() ? handler->GetAcoreString(LANG_ACTIVE) : "";
|
||||||
|
|
||||||
if (handler->GetSession())
|
if (handler->GetSession())
|
||||||
{
|
handler->PSendSysMessage(LANG_EVENT_ENTRY_LIST_CHAT, id, id, eventData.Description, active);
|
||||||
handler->PSendSysMessage(LANG_EVENT_ENTRY_LIST_CHAT, id, id, eventData.description, active);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
handler->PSendSysMessage(LANG_EVENT_ENTRY_LIST_CONSOLE, id, eventData.Description, active);
|
||||||
handler->PSendSysMessage(LANG_EVENT_ENTRY_LIST_CONSOLE, id, eventData.description, active);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!found)
|
if (!found)
|
||||||
{
|
|
||||||
found = true;
|
found = true;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!found)
|
if (!found)
|
||||||
{
|
|
||||||
handler->SendSysMessage(LANG_NOEVENTFOUND);
|
handler->SendSysMessage(LANG_NOEVENTFOUND);
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ public:
|
|||||||
handler->PSendSysMessage("Invalid subphase, see \".worldstate sunsreach subphase\" for usage");
|
handler->PSendSysMessage("Invalid subphase, see \".worldstate sunsreach subphase\" for usage");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
sWorldState->HandleSunsReachSubPhaseTransition(subphase);;
|
sWorldState->HandleSunsReachSubPhaseTransition(subphase);
|
||||||
handler->PSendSysMessage(sWorldState->GetSunsReachPrintout());
|
handler->PSendSysMessage(sWorldState->GetSunsReachPrintout());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -354,9 +354,8 @@ struct npc_madrigosa : public NullCreatureAI
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case EVENT_SPAWN_FELMYST:
|
case EVENT_SPAWN_FELMYST:
|
||||||
|
DoCastAOE(SPELL_SUMMON_FELBLAZE, true);
|
||||||
me->DespawnOrUnsummon(1);
|
me->DespawnOrUnsummon(1);
|
||||||
if (Creature* felmyst = instance->GetCreature(DATA_FELMYST))
|
|
||||||
felmyst->AI()->DoAction(ACTION_START_EVENT);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -100,30 +100,30 @@ private:
|
|||||||
|
|
||||||
struct boss_felmyst : public BossAI
|
struct boss_felmyst : public BossAI
|
||||||
{
|
{
|
||||||
boss_felmyst(Creature* creature) : BossAI(creature, DATA_FELMYST)
|
boss_felmyst(Creature* creature) : BossAI(creature, DATA_FELMYST) { }
|
||||||
{
|
|
||||||
bool appear = instance->GetBossState(DATA_BRUTALLUS) == DONE;
|
|
||||||
creature->SetVisible(appear);
|
|
||||||
creature->SetStandState(UNIT_STAND_STATE_SLEEP);
|
|
||||||
creature->SetReactState(REACT_PASSIVE);
|
|
||||||
}
|
|
||||||
|
|
||||||
void DoAction(int32 param) override
|
void InitializeAI() override
|
||||||
{
|
{
|
||||||
if (param == ACTION_START_EVENT)
|
me->SetReactState(REACT_PASSIVE);
|
||||||
|
|
||||||
|
if (instance->GetBossState(DATA_FELMYST) == TO_BE_DECIDED)
|
||||||
{
|
{
|
||||||
me->SetVisible(true);
|
me->SetStandState(UNIT_STAND_STATE_SLEEP);
|
||||||
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
me->SetImmuneToPC(true);
|
||||||
StartIntro();
|
StartIntro();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
me->SetCanFly(true);
|
||||||
|
me->SetDisableGravity(true);
|
||||||
|
me->SendMovementFlagUpdate();
|
||||||
|
me->GetMotionMaster()->MovePath(me->GetEntry() * 10, true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Reset() override
|
void Reset() override
|
||||||
{
|
{
|
||||||
BossAI::Reset();
|
BossAI::Reset();
|
||||||
me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
|
||||||
me->SetReactState(REACT_PASSIVE);
|
|
||||||
me->SetDisableGravity(false);
|
|
||||||
me->m_Events.KillAllEvents(false);
|
me->m_Events.KillAllEvents(false);
|
||||||
instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_FOG_OF_CORRUPTION_CHARM);
|
instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_FOG_OF_CORRUPTION_CHARM);
|
||||||
}
|
}
|
||||||
@@ -131,10 +131,18 @@ struct boss_felmyst : public BossAI
|
|||||||
void JustEngagedWith(Unit* who) override
|
void JustEngagedWith(Unit* who) override
|
||||||
{
|
{
|
||||||
BossAI::JustEngagedWith(who);
|
BossAI::JustEngagedWith(who);
|
||||||
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
me->CastSpell(me, SPELL_NOXIOUS_FUMES, true);
|
||||||
|
me->m_Events.AddEventAtOffset([&] {
|
||||||
|
Talk(YELL_BERSERK);
|
||||||
|
DoCastSelf(SPELL_BERSERK, true);
|
||||||
|
}, 10min);
|
||||||
|
|
||||||
if (!scheduler.IsGroupScheduled(GROUP_START_INTRO))
|
me->GetMotionMaster()->Clear();
|
||||||
StartIntro();
|
|
||||||
|
Position landPos = who->GetPosition();
|
||||||
|
me->m_Events.AddEventAtOffset([&, landPos] {
|
||||||
|
me->GetMotionMaster()->MovePoint(POINT_GROUND, landPos, false, true);
|
||||||
|
}, 2s);
|
||||||
}
|
}
|
||||||
|
|
||||||
void KilledUnit(Unit* victim) override
|
void KilledUnit(Unit* victim) override
|
||||||
@@ -146,6 +154,7 @@ struct boss_felmyst : public BossAI
|
|||||||
void JustDied(Unit* killer) override
|
void JustDied(Unit* killer) override
|
||||||
{
|
{
|
||||||
BossAI::JustDied(killer);
|
BossAI::JustDied(killer);
|
||||||
|
me->m_Events.KillAllEvents(false);
|
||||||
Talk(YELL_DEATH);
|
Talk(YELL_DEATH);
|
||||||
instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_FOG_OF_CORRUPTION_CHARM);
|
instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_FOG_OF_CORRUPTION_CHARM);
|
||||||
|
|
||||||
@@ -161,8 +170,10 @@ struct boss_felmyst : public BossAI
|
|||||||
if (point == POINT_GROUND)
|
if (point == POINT_GROUND)
|
||||||
{
|
{
|
||||||
me->HandleEmoteCommand(EMOTE_ONESHOT_LAND);
|
me->HandleEmoteCommand(EMOTE_ONESHOT_LAND);
|
||||||
|
me->SetCanFly(false);
|
||||||
me->SetDisableGravity(false);
|
me->SetDisableGravity(false);
|
||||||
me->SendMovementFlagUpdate();
|
me->SendMovementFlagUpdate();
|
||||||
|
SetInvincibility(false);
|
||||||
|
|
||||||
me->m_Events.AddEventAtOffset([&] {
|
me->m_Events.AddEventAtOffset([&] {
|
||||||
me->SetReactState(REACT_AGGRESSIVE);
|
me->SetReactState(REACT_AGGRESSIVE);
|
||||||
@@ -171,7 +182,7 @@ struct boss_felmyst : public BossAI
|
|||||||
me->SetTarget(me->GetVictim()->GetGUID());
|
me->SetTarget(me->GetVictim()->GetGUID());
|
||||||
|
|
||||||
me->ResumeChasingVictim();
|
me->ResumeChasingVictim();
|
||||||
}, 1s);
|
}, 2s);
|
||||||
|
|
||||||
ScheduleTimedEvent(7500ms, [&] {
|
ScheduleTimedEvent(7500ms, [&] {
|
||||||
DoCastVictim(SPELL_CLEAVE);
|
DoCastVictim(SPELL_CLEAVE);
|
||||||
@@ -238,6 +249,7 @@ struct boss_felmyst : public BossAI
|
|||||||
me->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF);
|
me->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF);
|
||||||
me->SetDisableGravity(true);
|
me->SetDisableGravity(true);
|
||||||
me->SendMovementFlagUpdate();
|
me->SendMovementFlagUpdate();
|
||||||
|
SetInvincibility(true);
|
||||||
|
|
||||||
me->m_Events.AddEventAtOffset([&] {
|
me->m_Events.AddEventAtOffset([&] {
|
||||||
me->GetMotionMaster()->MovePoint(POINT_AIR, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ() + 15.0f, false, true);
|
me->GetMotionMaster()->MovePoint(POINT_AIR, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ() + 15.0f, false, true);
|
||||||
@@ -304,30 +316,16 @@ struct boss_felmyst : public BossAI
|
|||||||
|
|
||||||
me->m_Events.AddEventAtOffset([&] {
|
me->m_Events.AddEventAtOffset([&] {
|
||||||
Talk(YELL_BIRTH);
|
Talk(YELL_BIRTH);
|
||||||
|
me->SetCanFly(true);
|
||||||
me->SetDisableGravity(true);
|
me->SetDisableGravity(true);
|
||||||
me->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF);
|
|
||||||
me->SendMovementFlagUpdate();
|
me->SendMovementFlagUpdate();
|
||||||
|
me->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF);
|
||||||
}, 7s);
|
}, 7s);
|
||||||
|
|
||||||
me->m_Events.AddEventAtOffset([&] {
|
me->m_Events.AddEventAtOffset([&] {
|
||||||
me->GetMotionMaster()->MovePoint(POINT_AIR, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ() + 10.0f, false, true);
|
me->SetImmuneToPC(false);
|
||||||
|
me->GetMotionMaster()->MovePath(me->GetEntry() * 10, true);
|
||||||
}, 8500ms);
|
}, 8500ms);
|
||||||
|
|
||||||
me->m_Events.AddEventAtOffset([&] {
|
|
||||||
me->SetInCombatWithZone();
|
|
||||||
me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
|
||||||
me->CastSpell(me, SPELL_NOXIOUS_FUMES, true);
|
|
||||||
me->GetMotionMaster()->MovePoint(POINT_MISC, 1472.18f, 603.38f, 34.0f, false, true);
|
|
||||||
|
|
||||||
me->m_Events.AddEventAtOffset([&] {
|
|
||||||
me->GetMotionMaster()->MovePoint(POINT_GROUND, me->GetPositionX(), me->GetPositionY(), me->GetMapHeight(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()), false, true);
|
|
||||||
}, 3s);
|
|
||||||
|
|
||||||
me->m_Events.AddEventAtOffset([&] {
|
|
||||||
Talk(YELL_BERSERK);
|
|
||||||
DoCastSelf(SPELL_BERSERK, true);
|
|
||||||
}, 10min);
|
|
||||||
}, 10500ms);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -106,12 +106,6 @@ struct boss_kalecgos : public BossAI
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustReachedHome() override
|
|
||||||
{
|
|
||||||
BossAI::JustReachedHome();
|
|
||||||
me->SetVisible(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Reset() override
|
void Reset() override
|
||||||
{
|
{
|
||||||
BossAI::Reset();
|
BossAI::Reset();
|
||||||
@@ -175,7 +169,6 @@ struct boss_kalecgos : public BossAI
|
|||||||
}, 4s);
|
}, 4s);
|
||||||
|
|
||||||
me->m_Events.AddEventAtOffset([&] {
|
me->m_Events.AddEventAtOffset([&] {
|
||||||
me->SetVisible(false);
|
|
||||||
EnterEvadeMode();
|
EnterEvadeMode();
|
||||||
}, 9s);
|
}, 9s);
|
||||||
|
|
||||||
@@ -251,10 +244,11 @@ struct boss_kalecgos : public BossAI
|
|||||||
DoCastAOE(SPELL_SPECTRAL_BLAST);
|
DoCastAOE(SPELL_SPECTRAL_BLAST);
|
||||||
}, 15s, 25s);
|
}, 15s, 25s);
|
||||||
|
|
||||||
me->m_Events.AddEventAtOffset([&] {
|
scheduler.Schedule(16s, [this](TaskContext)
|
||||||
|
{
|
||||||
me->SummonCreature(NPC_KALEC, 1702.21f, 931.7f, -74.56f, 5.07f, TEMPSUMMON_MANUAL_DESPAWN);
|
me->SummonCreature(NPC_KALEC, 1702.21f, 931.7f, -74.56f, 5.07f, TEMPSUMMON_MANUAL_DESPAWN);
|
||||||
me->SummonCreature(NPC_SATHROVARR, 1704.62f, 927.78f, -73.9f, 2.0f, TEMPSUMMON_MANUAL_DESPAWN);
|
me->SummonCreature(NPC_SATHROVARR, 1704.62f, 927.78f, -73.9f, 2.0f, TEMPSUMMON_MANUAL_DESPAWN);
|
||||||
}, 16s);
|
});
|
||||||
|
|
||||||
me->SetStandState(UNIT_STAND_STATE_STAND);
|
me->SetStandState(UNIT_STAND_STATE_STAND);
|
||||||
Talk(SAY_EVIL_AGGRO);
|
Talk(SAY_EVIL_AGGRO);
|
||||||
@@ -282,10 +276,7 @@ enum Kalec
|
|||||||
|
|
||||||
struct boss_kalec : public ScriptedAI
|
struct boss_kalec : public ScriptedAI
|
||||||
{
|
{
|
||||||
boss_kalec(Creature* creature) : ScriptedAI(creature)
|
boss_kalec(Creature* creature) : ScriptedAI(creature) { }
|
||||||
{
|
|
||||||
SetInvincibility(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Reset() override
|
void Reset() override
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -89,6 +89,18 @@ public:
|
|||||||
LoadSummonData(summonData);
|
LoadSummonData(summonData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Load(char const* data) override
|
||||||
|
{
|
||||||
|
InstanceScript::Load(data);
|
||||||
|
|
||||||
|
scheduler.Schedule(3s, [this](TaskContext /*context*/)
|
||||||
|
{
|
||||||
|
if (IsBossDone(DATA_BRUTALLUS) && !IsBossDone(DATA_FELMYST))
|
||||||
|
if (Creature* madrigosa = GetCreature(DATA_MADRIGOSA))
|
||||||
|
madrigosa->CastSpell((Unit*)nullptr, SPELL_SUMMON_FELBLAZE, true);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
void OnPlayerEnter(Player* player) override
|
void OnPlayerEnter(Player* player) override
|
||||||
{
|
{
|
||||||
instance->LoadGrid(1477.94f, 643.22f);
|
instance->LoadGrid(1477.94f, 643.22f);
|
||||||
|
|||||||
@@ -106,6 +106,11 @@ enum GameObjectIds
|
|||||||
GO_ORB_OF_THE_BLUE_DRAGONFLIGHT4 = 188116
|
GO_ORB_OF_THE_BLUE_DRAGONFLIGHT4 = 188116
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum SpellIds
|
||||||
|
{
|
||||||
|
SPELL_SUMMON_FELBLAZE = 45069 // Felblaze? Summons Felmyst
|
||||||
|
};
|
||||||
|
|
||||||
template <class AI, class T>
|
template <class AI, class T>
|
||||||
inline AI* GetSunwellPlateauAI(T* obj)
|
inline AI* GetSunwellPlateauAI(T* obj)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1114,10 +1114,9 @@ public:
|
|||||||
return !_caster->IsWithinLOSInMap(unit);
|
return !_caster->IsWithinLOSInMap(unit);
|
||||||
|
|
||||||
// for players and pets check only dynamic los (ice block gameobjects)
|
// for players and pets check only dynamic los (ice block gameobjects)
|
||||||
float ox, oy, oz;
|
if (unit->IsUnit() && unit->ToUnit()->HasUnitState(UNIT_STATE_MELEE_ATTACKING) && unit->ToUnit()->IsWithinMeleeRange(_caster))
|
||||||
_caster->GetPosition(ox, oy, oz);
|
return false;
|
||||||
DynamicMapTree const& dTree = unit->GetMap()->GetDynamicMapTree();
|
return !_caster->IsWithinLOSInMap(unit, VMAP::ModelIgnoreFlags::Nothing, LINEOFSIGHT_CHECK_GOBJECT_M2, 0, _caster->GetCombatReach() * 0.7);
|
||||||
return !dTree.isInLineOfSight(unit->GetPositionX(), unit->GetPositionY(), unit->GetPositionZ() + 2.f, ox, oy, oz + 2.f, unit->GetPhaseMask(), VMAP::ModelIgnoreFlags::Nothing);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -1161,17 +1161,6 @@ public:
|
|||||||
{
|
{
|
||||||
IsSindragosaIntroDone = true;
|
IsSindragosaIntroDone = true;
|
||||||
HandleDropAttempt();
|
HandleDropAttempt();
|
||||||
if (instance->IsHeroic())
|
|
||||||
{
|
|
||||||
if (HeroicAttempts)
|
|
||||||
{
|
|
||||||
Events.ScheduleEvent(EVENT_RESPAWN_SINDRAGOSA, 30s);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Events.ScheduleEvent(EVENT_RESPAWN_SINDRAGOSA, 30s);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (state == DONE && !instance->IsHeroic() && LichKingHeroicAvailable)
|
if (state == DONE && !instance->IsHeroic() && LichKingHeroicAvailable)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -369,6 +369,9 @@ public:
|
|||||||
break;
|
break;
|
||||||
case NPC_ALGALON:
|
case NPC_ALGALON:
|
||||||
m_uiAlgalonGUID = creature->GetGUID();
|
m_uiAlgalonGUID = creature->GetGUID();
|
||||||
|
|
||||||
|
if (!m_algalonTimer)
|
||||||
|
creature->DespawnOrUnsummon();
|
||||||
break;
|
break;
|
||||||
case NPC_HARPOON_FIRE_STATE:
|
case NPC_HARPOON_FIRE_STATE:
|
||||||
{
|
{
|
||||||
@@ -811,17 +814,6 @@ public:
|
|||||||
go->EnableCollision(false);
|
go->EnableCollision(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data == FAIL)
|
|
||||||
{
|
|
||||||
scheduler.Schedule(5s, [this](TaskContext)
|
|
||||||
{
|
|
||||||
if (m_algalonTimer && (m_algalonTimer <= 60 || m_algalonTimer == TIMER_ALGALON_TO_SUMMON))
|
|
||||||
{
|
|
||||||
instance->SummonCreature(NPC_ALGALON, AlgalonLandPos);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// Achievement
|
// Achievement
|
||||||
|
|||||||
@@ -444,7 +444,9 @@ public:
|
|||||||
|
|
||||||
void MoveInLineOfSight(Unit* who) override
|
void MoveInLineOfSight(Unit* who) override
|
||||||
{
|
{
|
||||||
if (!who || !who->IsInWorld() || who->GetZoneId() != 4395)
|
// 4395 Dalaran
|
||||||
|
// 4569 Sewer Exit Pipe
|
||||||
|
if (!who || !who->IsInWorld()|| who->GetZoneId() != 4395 || who->GetAreaId() == 4569)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!me->IsWithinDist(who, 5.0f, false))
|
if (!me->IsWithinDist(who, 5.0f, false))
|
||||||
|
|||||||
@@ -5400,6 +5400,38 @@ class spell_gen_proc_on_victim : public AuraScript
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum TranslocateSpells
|
||||||
|
{
|
||||||
|
SPELL_TRANSLOCATION_DOWN = 45368,
|
||||||
|
SPELL_TRANSLOCATION_UP = 45371
|
||||||
|
};
|
||||||
|
|
||||||
|
class spell_gen_translocate : public SpellScript
|
||||||
|
{
|
||||||
|
PrepareSpellScript(spell_gen_translocate);
|
||||||
|
|
||||||
|
public:
|
||||||
|
spell_gen_translocate(uint32 spellId) : SpellScript(), _spellId(spellId) {}
|
||||||
|
|
||||||
|
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||||
|
{
|
||||||
|
return ValidateSpellInfo({ _spellId });
|
||||||
|
}
|
||||||
|
|
||||||
|
void HandleScript()
|
||||||
|
{
|
||||||
|
GetCaster()->CastSpell(GetCaster(), _spellId);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Register() override
|
||||||
|
{
|
||||||
|
AfterCast += SpellCastFn(spell_gen_translocate::HandleScript);
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
uint32 _spellId;
|
||||||
|
};
|
||||||
|
|
||||||
void AddSC_generic_spell_scripts()
|
void AddSC_generic_spell_scripts()
|
||||||
{
|
{
|
||||||
RegisterSpellScript(spell_silithyst);
|
RegisterSpellScript(spell_silithyst);
|
||||||
@@ -5560,4 +5592,6 @@ void AddSC_generic_spell_scripts()
|
|||||||
RegisterSpellScript(spell_gen_set_health);
|
RegisterSpellScript(spell_gen_set_health);
|
||||||
RegisterSpellScript(spell_pet_spellhit_expertise_spellpen_scaling);
|
RegisterSpellScript(spell_pet_spellhit_expertise_spellpen_scaling);
|
||||||
RegisterSpellScript(spell_gen_proc_on_victim);
|
RegisterSpellScript(spell_gen_proc_on_victim);
|
||||||
|
RegisterSpellScriptWithArgs(spell_gen_translocate, "spell_gen_translocate_down", SPELL_TRANSLOCATION_DOWN);
|
||||||
|
RegisterSpellScriptWithArgs(spell_gen_translocate, "spell_gen_translocate_up", SPELL_TRANSLOCATION_UP);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user