Merge branch '4.3.4' of https://gitlab.com/trinitycore/TrinityCore_434 into 4.3.4
# Conflicts: # src/server/game/Entities/Player/Player.cpp # src/server/game/Maps/Map.cpp # src/server/game/Maps/Map.h
This commit is contained in:
commit
617b3a8a11
172 files changed
+4534
-1342
No files matched your search
+11
-7
@@ -10,14 +10,18 @@ git:
|
||||
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- sourceline: 'ppa:kzemek/boost'
|
||||
packages:
|
||||
- libboost1.55-dev
|
||||
- libboost-filesystem1.55-dev
|
||||
- libboost-iostreams1.55-dev
|
||||
- libboost-program-options1.55-dev
|
||||
- libboost-regex1.55-dev
|
||||
- libboost-system1.55-dev
|
||||
- libboost-thread1.55-dev
|
||||
- g++-6
|
||||
- libboost1.58-dev
|
||||
- libboost-filesystem1.58-dev
|
||||
- libboost-iostreams1.58-dev
|
||||
- libboost-program-options1.58-dev
|
||||
- libboost-regex1.58-dev
|
||||
- libboost-system1.58-dev
|
||||
- libboost-thread1.58-dev
|
||||
- libssl-dev
|
||||
- libmysqlclient-dev
|
||||
- libreadline6-dev
|
||||
|
||||
@@ -31,12 +31,12 @@ website at [TrinityCore.org](https://www.trinitycore.org).
|
||||
|
||||
+ Platform: Linux, Windows or Mac
|
||||
+ Processor with SSE2 support
|
||||
+ Boost ≥ 1.55 (Linux) 1.63 (Windows)
|
||||
+ Boost ≥ 1.58 (Linux) 1.63 (Windows)
|
||||
+ MySQL ≥ 5.1.0
|
||||
+ CMake ≥ 3.0.2 (Linux) 3.3.2 (Windows)
|
||||
+ CMake ≥ 3.2.0 (Linux) 3.3.2 (Windows)
|
||||
+ OpenSSL = 1.0.x
|
||||
+ GCC ≥ 4.9.2 (Linux only) (clang 3.5 heavy recommended)
|
||||
+ MS Visual Studio ≥ 14 (2015) (Windows only)
|
||||
+ GCC ≥ 6.3.0 (Linux only) (clang 3.5 heavy recommended)
|
||||
+ MS Visual Studio ≥ 15 (2017) (Windows only)
|
||||
+ zlib ≥ 1.2.7
|
||||
+ ZeroMQ:
|
||||
+ apt-get install libzmq-dev (Linux only)
|
||||
|
||||
@@ -16,7 +16,7 @@ endif()
|
||||
|
||||
# -Wno-narrowing needed to suppress a warning in g3d
|
||||
# -Wno-deprecated-register is needed to suppress 185 gsoap warnings on Unix systems.
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wno-narrowing -Wno-deprecated-register")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -Wno-narrowing -Wno-deprecated-register")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG=1")
|
||||
|
||||
if (BUILD_SHARED_LIBS)
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
# Set build-directive (used in core to tell which buildtype we used)
|
||||
add_definitions(-D_BUILD_DIRECTIVE='"${CMAKE_BUILD_TYPE}"')
|
||||
|
||||
set(GCC_EXPECTED_VERSION 4.9.0)
|
||||
set(GCC_EXPECTED_VERSION 6.3.0)
|
||||
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS GCC_EXPECTED_VERSION)
|
||||
message(FATAL_ERROR "GCC: TrinityCore requires version ${GCC_EXPECTED_VERSION} to build but found ${CMAKE_CXX_COMPILER_VERSION}")
|
||||
endif()
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||
message(STATUS "GCC: Enabled c++11 support")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
|
||||
message(STATUS "GCC: Enabled c++14 support")
|
||||
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99")
|
||||
message(STATUS "GCC: Enabled C99 support")
|
||||
|
||||
@@ -80,30 +80,37 @@ IF(WIN32 AND NOT CYGWIN)
|
||||
# libeay32MD.lib is identical to ../libeay32.lib, and
|
||||
# ssleay32MD.lib is identical to ../ssleay32.lib
|
||||
|
||||
# Since OpenSSL 1.1, lib names are like libcrypto32MTd.lib and libssl32MTd.lib
|
||||
if( "${CMAKE_SIZEOF_VOID_P}" STREQUAL "8" )
|
||||
set(_OPENSSL_MSVC_ARCH_SUFFIX "64")
|
||||
else()
|
||||
set(_OPENSSL_MSVC_ARCH_SUFFIX "32")
|
||||
endif()
|
||||
|
||||
FIND_LIBRARY(LIB_EAY_DEBUG
|
||||
NAMES
|
||||
libeay32MDd libeay32
|
||||
libcrypto${_OPENSSL_MSVC_ARCH_SUFFIX}MDd libeay32MDd libeay32
|
||||
PATHS
|
||||
${OPENSSL_ROOT_DIR}/lib/VC
|
||||
)
|
||||
|
||||
FIND_LIBRARY(LIB_EAY_RELEASE
|
||||
NAMES
|
||||
libeay32MD libeay32
|
||||
libcrypto${_OPENSSL_MSVC_ARCH_SUFFIX}MD libeay32MD libeay32
|
||||
PATHS
|
||||
${OPENSSL_ROOT_DIR}/lib/VC
|
||||
)
|
||||
|
||||
FIND_LIBRARY(SSL_EAY_DEBUG
|
||||
NAMES
|
||||
ssleay32MDd ssleay32 ssl
|
||||
libssl${_OPENSSL_MSVC_ARCH_SUFFIX}MDd ssleay32MDd ssleay32 ssl
|
||||
PATHS
|
||||
${OPENSSL_ROOT_DIR}/lib/VC
|
||||
)
|
||||
|
||||
FIND_LIBRARY(SSL_EAY_RELEASE
|
||||
NAMES
|
||||
ssleay32MD ssleay32 ssl
|
||||
libssl${_OPENSSL_MSVC_ARCH_SUFFIX}MD ssleay32MD ssleay32 ssl
|
||||
PATHS
|
||||
${OPENSSL_ROOT_DIR}/lib/VC
|
||||
)
|
||||
|
||||
@@ -38,7 +38,7 @@ if (WIN32)
|
||||
# On windows the requirements are higher according to the wiki.
|
||||
set(BOOST_REQUIRED_VERSION 1.59)
|
||||
else()
|
||||
set(BOOST_REQUIRED_VERSION 1.55)
|
||||
set(BOOST_REQUIRED_VERSION 1.56)
|
||||
endif()
|
||||
|
||||
find_package(Boost ${BOOST_REQUIRED_VERSION} REQUIRED system filesystem thread program_options iostreams regex)
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
#define _DATE "@rev_date@"
|
||||
#define _BRANCH "@rev_branch@"
|
||||
#define _CMAKE_COMMAND R"(@CMAKE_COMMAND@)"
|
||||
#define _CMAKE_VERSION R"(@CMAKE_VERSION@)"
|
||||
#define _CMAKE_HOST_SYSTEM R"(@CMAKE_HOST_SYSTEM_NAME@ @CMAKE_HOST_SYSTEM_VERSION@)"
|
||||
#define _SOURCE_DIRECTORY R"(@CMAKE_SOURCE_DIR@)"
|
||||
#define _BUILD_DIRECTORY R"(@BUILDDIR@)"
|
||||
#define _MYSQL_EXECUTABLE R"(@MYSQL_EXECUTABLE@)"
|
||||
|
||||
@@ -975,6 +975,7 @@ INSERT INTO `rbac_linked_permissions` VALUES
|
||||
(196,843),
|
||||
(196,866),
|
||||
(196,867),
|
||||
(196,872),
|
||||
(197,232),
|
||||
(197,236),
|
||||
(197,237),
|
||||
@@ -1868,7 +1869,8 @@ INSERT INTO `rbac_permissions` VALUES
|
||||
(863,'Command: group set maintank'),
|
||||
(864,'Command: group set mainassist'),
|
||||
(865,'Command: npc showloot'),
|
||||
(867,'Command: reload quest_greeting_locale');
|
||||
(867,'Command: reload quest_greeting_locale'),
|
||||
(872,'Command: server debug');
|
||||
/*!40000 ALTER TABLE `rbac_permissions` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
@@ -2001,7 +2003,8 @@ INSERT INTO `updates` VALUES
|
||||
('2017_12_17_00_auth.sql','E2EC5999D5305FC12EA576D08EFB95D1660DCF4D','ARCHIVED','2017-12-17 01:40:04',0),
|
||||
('2018_01_06_00_auth.sql','CD9B826B9D95697DC412DEF780E814FA3991D6CD','ARCHIVED','2018-01-06 01:40:04',0),
|
||||
('2018_01_15_00_auth.sql','1C5C28490B27D86EBC14F6034AA4D34E66D5545D','ARCHIVED','2018-01-15 01:40:04',0),
|
||||
('2018_02_16_00_auth.sql','1AAD2FC649CBE8093ECE5908EBBBB31EC326166A','ARCHIVED','2018-02-16 01:40:04',0);
|
||||
('2018_02_16_00_auth.sql','1AAD2FC649CBE8093ECE5908EBBBB31EC326166A','ARCHIVED','2018-02-16 01:40:04',0),
|
||||
('2018_03_06_00_auth_from_335_was_2018_03_06_00_auth.sql','3F8EA885898CE0F9D47043A832602D77','ARCHIVED','2018-02-16 01:40:04',0);
|
||||
/*!40000 ALTER TABLE `updates` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
|
||||
@@ -3616,6 +3616,51 @@ CREATE TABLE `spelleffect_dbc` (
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `terrain_phase_info`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `terrain_phase_info`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `terrain_phase_info` (
|
||||
`Id` int(10) unsigned NOT NULL,
|
||||
`TerrainSwapMap` int(10) unsigned NOT NULL,
|
||||
`Comment` varchar(255) DEFAULT NULL,
|
||||
PRIMARY KEY (`Id`,`TerrainSwapMap`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `terrain_swap_defaults`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `terrain_swap_defaults`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `terrain_swap_defaults` (
|
||||
`MapId` int(10) unsigned NOT NULL,
|
||||
`TerrainSwapMap` int(10) unsigned NOT NULL,
|
||||
`Comment` varchar(255) DEFAULT NULL,
|
||||
PRIMARY KEY (`MapId`,`TerrainSwapMap`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `terrain_worldmap`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `terrain_worldmap`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `terrain_worldmap` (
|
||||
`TerrainSwapMap` int(10) unsigned NOT NULL,
|
||||
`WorldMapArea` int(10) unsigned NOT NULL,
|
||||
`Comment` varchar(255) DEFAULT NULL,
|
||||
PRIMARY KEY (`TerrainSwapMap`,`WorldMapArea`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `transports`
|
||||
--
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
DELETE FROM `rbac_permissions` WHERE `id`=872;
|
||||
INSERT INTO `rbac_permissions` (`id`, `name`) VALUES
|
||||
(872, 'Command: server debug');
|
||||
INSERT INTO `rbac_linked_permissions` (`id`, `linkedId`) VALUES
|
||||
(196, 872);
|
||||
@@ -0,0 +1,2 @@
|
||||
--
|
||||
UPDATE `creature_loot_template` SET `QuestRequired`=1 WHERE `Item` IN (24426,24427);
|
||||
@@ -0,0 +1,80 @@
|
||||
--
|
||||
-- Gnomeregan Evacuee
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=7843 AND `source_type`=0 AND `id`=6;
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(7843,0,6,0,6,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Gnomeregan Evacuee - On Just Died - Say Line 0");
|
||||
|
||||
DELETE FROM `creature_text` WHERE `CreatureID`=7843;
|
||||
INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
|
||||
(7843,0,0,"Aaaaahhh! So close to escaping.",12,7,100,0,0,0,3829,0,"Gnomeregan Evacuee");
|
||||
|
||||
-- Addled Leper
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=6221 AND `source_type`=0 AND `id`=6;
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(6221,0,6,0,4,0,40,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Addled Leper - On Aggro - Say Line 0");
|
||||
|
||||
DELETE FROM `creature_text` WHERE `CreatureID`=6221;
|
||||
INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
|
||||
(6221,0,0,"No gnome will be left behind.",12,7,100,0,0,0,2422,0,"Addled Leper"),
|
||||
(6221,0,1,"The troggs...they never stop coming. Die trogg! Die!",12,7,100,0,0,0,2423,0,"Addled Leper"),
|
||||
(6221,0,2,"This sickness clouds my vision, but I know you must be a trogg. Die foul invader!",12,7,100,0,0,0,2424,0,"Addled Leper"),
|
||||
(6221,0,3,"A foul trogg if ever I saw one. Die!",12,7,100,0,0,0,2425,0,"Addled Leper");
|
||||
|
||||
-- Leprous Technician
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=6222 AND `source_type`=0 AND `id`=5;
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(6222,0,5,0,4,0,20,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Leprous Technician - On Aggro - Say Line 1");
|
||||
|
||||
DELETE FROM `creature_text` WHERE `CreatureID`=6222 AND `GroupID`=1;
|
||||
INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
|
||||
(6222,1,0,"No gnome will be left behind.",12,7,100,0,0,0,2422,0,"Leprous Technician"),
|
||||
(6222,1,1,"The troggs...they never stop coming. Die trogg! Die!",12,7,100,0,0,0,2423,0,"Leprous Technician"),
|
||||
(6222,1,2,"This sickness clouds my vision, but I know you must be a trogg. Die foul invader!",12,7,100,0,0,0,2424,0,"Leprous Technician"),
|
||||
(6222,1,3,"A foul trogg if ever I saw one. Die!",12,7,100,0,0,0,2425,0,"Leprous Technician");
|
||||
|
||||
-- Leprous Defender
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=6223 AND `source_type`=0 AND `id`=5;
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(6223,0,5,0,4,0,20,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Leprous Defender - On Aggro - Say Line 1");
|
||||
|
||||
DELETE FROM `creature_text` WHERE `CreatureID`=6223 AND `GroupID`=1;
|
||||
INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
|
||||
(6223,1,0,"No gnome will be left behind.",12,7,100,0,0,0,2422,0,"Leprous Defender"),
|
||||
(6223,1,1,"The troggs...they never stop coming. Die trogg! Die!",12,7,100,0,0,0,2423,0,"Leprous Defender"),
|
||||
(6223,1,2,"This sickness clouds my vision, but I know you must be a trogg. Die foul invader!",12,7,100,0,0,0,2424,0,"Leprous Defender"),
|
||||
(6223,1,3,"A foul trogg if ever I saw one. Die!",12,7,100,0,0,0,2425,0,"Leprous Defender");
|
||||
|
||||
-- Leprous Assistant
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=7603 AND `source_type`=0 AND `id`=2;
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(7603,0,2,0,4,0,20,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Leprous Assistant - On Aggro - Say Line 1");
|
||||
|
||||
DELETE FROM `creature_text` WHERE `CreatureID`=7603 AND `GroupID`=1;
|
||||
INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
|
||||
(7603,1,0,"No gnome will be left behind.",12,7,100,0,0,0,2422,0,"Leprous Assistant"),
|
||||
(7603,1,1,"The troggs...they never stop coming. Die trogg! Die!",12,7,100,0,0,0,2423,0,"Leprous Assistant"),
|
||||
(7603,1,2,"This sickness clouds my vision, but I know you must be a trogg. Die foul invader!",12,7,100,0,0,0,2424,0,"Leprous Assistant"),
|
||||
(7603,1,3,"A foul trogg if ever I saw one. Die!",12,7,100,0,0,0,2425,0,"Leprous Assistant");
|
||||
|
||||
-- Leprous Machinesmith
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=6224 AND `source_type`=0 AND `id`=4;
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(6224,0,4,0,4,0,20,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Leprous Machinesmith - On Aggro - Say Line 1");
|
||||
|
||||
DELETE FROM `creature_text` WHERE `CreatureID`=6224 AND `GroupID`=1;
|
||||
INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
|
||||
(6224,1,0,"No gnome will be left behind.",12,7,100,0,0,0,2422,0,"Leprous Machinesmith"),
|
||||
(6224,1,1,"The troggs...they never stop coming. Die trogg! Die!",12,7,100,0,0,0,2423,0,"Leprous Machinesmith"),
|
||||
(6224,1,2,"This sickness clouds my vision, but I know you must be a trogg. Die foul invader!",12,7,100,0,0,0,2424,0,"Leprous Machinesmith"),
|
||||
(6224,1,3,"A foul trogg if ever I saw one. Die!",12,7,100,0,0,0,2425,0,"Leprous Machinesmith");
|
||||
|
||||
-- Dark Iron Agent
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=6212 AND `source_type`=0 AND `id`=1;
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(6212,0,1,0,4,0,20,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Dark Iron Agent - On Aggro - Say Line 1");
|
||||
|
||||
DELETE FROM `creature_text` WHERE `CreatureID`=6212 AND `GroupID`=1;
|
||||
INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
|
||||
(6212,1,0,"Never cross a Dark Iron, $C.",12,0,100,0,0,0,1934,0,"Dark Iron Agent"),
|
||||
(6212,1,1,"Time to die, $C.",12,0,100,0,0,0,1935,0,"Dark Iron Agent"),
|
||||
(6212,1,2,"Feel the power of the Dark Iron Dwarves!",12,0,100,0,0,0,1936,0,"Dark Iron Agent");
|
||||
@@ -0,0 +1,351 @@
|
||||
/*
|
||||
-- Quest "Escorting Erland"
|
||||
UPDATE `quest_offer_reward` SET `Emote1`=1 WHERE `ID`=435;
|
||||
|
||||
-- Quest "Return to Quinn"
|
||||
UPDATE `quest_request_items` SET `EmoteOnComplete`=6 WHERE `ID`=430;
|
||||
|
||||
-- Quest "Ivar the Foul"
|
||||
UPDATE `quest_request_items` SET `EmoteOnComplete`=0 WHERE `ID`=425;
|
||||
|
||||
-- Quest "Wand to Bethor"
|
||||
UPDATE `quest_request_items` SET `EmoteOnComplete`=0 WHERE `ID`=491;
|
||||
|
||||
-- Quest "Supplying the Sepulcher"
|
||||
DELETE FROM `quest_details` WHERE `ID`=6321;
|
||||
INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES
|
||||
(6321,1,0,0,0,0,0,0,0,0);
|
||||
UPDATE `quest_request_items` SET `EmoteOnComplete`=6 WHERE `ID`=6321;
|
||||
UPDATE `quest_offer_reward` SET `Emote1`=1 WHERE `ID`=6321;
|
||||
|
||||
-- Quest "Ride to the Undercity"
|
||||
DELETE FROM `quest_details` WHERE `ID`=6323;
|
||||
INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES
|
||||
(6323,1,0,0,0,0,0,0,0,0);
|
||||
UPDATE `quest_request_items` SET `EmoteOnComplete`=6 WHERE `ID`=6323;
|
||||
UPDATE `quest_offer_reward` SET `Emote1`=1 WHERE `ID`=6323;
|
||||
|
||||
-- Quest "Michael Garrett"
|
||||
DELETE FROM `quest_details` WHERE `ID`=6322;
|
||||
INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES
|
||||
(6322,1,0,0,0,0,0,0,0,0);
|
||||
UPDATE `quest_offer_reward` SET `Emote1`=6 WHERE `ID`=6322;
|
||||
|
||||
-- Quest "Return to Podrig"
|
||||
DELETE FROM `quest_details` WHERE `ID`=6324;
|
||||
INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES
|
||||
(6324,1,0,0,0,0,0,0,0,0);
|
||||
UPDATE `quest_request_items` SET `EmoteOnComplete`=6 WHERE `ID`=6324;
|
||||
UPDATE `quest_offer_reward` SET `Emote1`=1 WHERE `ID`=6324;
|
||||
|
||||
-- Quest "The Deathstalkers' Report"
|
||||
UPDATE `quest_request_items` SET `EmoteOnComplete`=0 WHERE `ID`=449;
|
||||
|
||||
-- Quest "Speak with Renferrel"
|
||||
UPDATE `quest_offer_reward` SET `Emote1`=1 WHERE `ID`=3221;
|
||||
|
||||
-- Quest "Delivery to Silverpine Forest"
|
||||
UPDATE `quest_request_items` SET `EmoteOnComplete`=6 WHERE `ID`=445;
|
||||
UPDATE `quest_offer_reward` SET `Emote1`=1 WHERE `ID`=445;
|
||||
|
||||
-- Quest "Zinge's Delivery"
|
||||
UPDATE `quest_request_items` SET `EmoteOnComplete`=6 WHERE `ID`=1359;
|
||||
UPDATE `quest_offer_reward` SET `Emote1`=1 WHERE `ID`=1359;
|
||||
|
||||
-- Quest "Sample for Helbrim"
|
||||
DELETE FROM `quest_details` WHERE `ID`=1358;
|
||||
INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES
|
||||
(1358,1,0,0,0,0,0,0,0,0);
|
||||
UPDATE `quest_request_items` SET `EmoteOnComplete`=0 WHERE `ID`=1358;
|
||||
UPDATE `quest_offer_reward` SET `Emote1`=1 WHERE `ID`=1358;
|
||||
|
||||
-- Quest "The Dead Fields"
|
||||
UPDATE `quest_request_items` SET `EmoteOnComplete`=0 WHERE `ID`=437;
|
||||
|
||||
-- Quest "Rot Hide Clues"
|
||||
UPDATE `quest_request_items` SET `EmoteOnComplete`=0 WHERE `ID`=439;
|
||||
|
||||
-- Quest "Rot Hide Ichor"
|
||||
UPDATE `quest_request_items` SET `EmoteOnComplete`=0 WHERE `ID`=443;
|
||||
|
||||
-- Quest "Rot Hide Origins"
|
||||
UPDATE `quest_request_items` SET `EmoteOnComplete`=0 WHERE `ID`=444;
|
||||
|
||||
-- Quest "Thule Ravenclaw"
|
||||
UPDATE `quest_request_items` SET `EmoteOnComplete`=0 WHERE `ID`=446;
|
||||
UPDATE `quest_offer_reward` SET `Emote1`=1 WHERE `ID`=446;
|
||||
|
||||
-- Quest "Assault on Fenris Isle"
|
||||
UPDATE `quest_request_items` SET `EmoteOnComplete`=0 WHERE `ID`=442;
|
||||
|
||||
-- Quest "The Engraved Ring"
|
||||
UPDATE `quest_request_items` SET `EmoteOnComplete`=0 WHERE `ID`=440;
|
||||
|
||||
-- Quest "Raleigh and the Undercity"
|
||||
UPDATE `quest_request_items` SET `EmoteOnComplete`=6 WHERE `ID`=441;
|
||||
UPDATE `quest_offer_reward` SET `Emote1`=1, `Emote2`=1 WHERE `ID`=441;
|
||||
|
||||
-- Quest "A Husband's Revenge"
|
||||
DELETE FROM `quest_details` WHERE `ID`=530;
|
||||
INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES
|
||||
(530,1,0,0,0,0,0,0,0,0);
|
||||
UPDATE `quest_request_items` SET `EmoteOnIncomplete`=6, `EmoteOnComplete`=6 WHERE `ID`=530;
|
||||
UPDATE `quest_offer_reward` SET `Emote1`=1 WHERE `ID`=530;
|
||||
|
||||
-- Quest "Prove Your Worth"
|
||||
UPDATE `quest_offer_reward` SET `Emote1`=1 WHERE `ID`=421;
|
||||
|
||||
-- Quest "Arugal's Folly"
|
||||
DELETE FROM `quest_details` WHERE `ID`=422;
|
||||
INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES
|
||||
(422,1,1,0,0,0,0,0,0,0);
|
||||
UPDATE `quest_request_items` SET `EmoteOnIncomplete`=1 WHERE `ID`=422;
|
||||
UPDATE `quest_offer_reward` SET `Emote1`=1 WHERE `ID`=422;
|
||||
|
||||
-- Quest "Arugal's Folly (Part 2)"
|
||||
UPDATE `quest_request_items` SET `EmoteOnComplete`=0 WHERE `ID`=423;
|
||||
UPDATE `quest_offer_reward` SET `Emote1`=1 WHERE `ID`=423;
|
||||
|
||||
-- Quest "Arugal's Folly (Part 3)"
|
||||
DELETE FROM `quest_details` WHERE `ID`=424;
|
||||
INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES
|
||||
(424,1,1,0,0,0,0,0,0,0);
|
||||
UPDATE `quest_request_items` SET `EmoteOnIncomplete`=6, `EmoteOnComplete`=6 WHERE `ID`=424;
|
||||
|
||||
-- Quest "Arugal's Folly (Part 4)"
|
||||
DELETE FROM `quest_details` WHERE `ID`=99;
|
||||
INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES
|
||||
(99,1,1,0,0,0,0,0,0,0);
|
||||
UPDATE `quest_request_items` SET `EmoteOnComplete`=0 WHERE `ID`=99;
|
||||
UPDATE `quest_offer_reward` SET `Emote1`=21 WHERE `ID`=99;
|
||||
|
||||
-- Quest "Maps and Runes"
|
||||
UPDATE `quest_request_items` SET `EmoteOnComplete`=0 WHERE `ID`=478;
|
||||
|
||||
-- Quest "Dalar's Analysis"
|
||||
UPDATE `quest_request_items` SET `EmoteOnComplete`=0 WHERE `ID`=481;
|
||||
|
||||
-- Quest "Ambermill Investigations"
|
||||
UPDATE `quest_request_items` SET `EmoteOnComplete`=0 WHERE `ID`=479;
|
||||
|
||||
-- Quest "The Weaver"
|
||||
UPDATE `quest_request_items` SET `EmoteOnComplete`=0 WHERE `ID`=480;
|
||||
|
||||
-- Quest "A Recipe For Death"
|
||||
UPDATE `quest_request_items` SET `EmoteOnIncomplete`=66, `EmoteOnComplete`=66 WHERE `ID`=447;
|
||||
UPDATE `quest_offer_reward` SET `Emote1`=273 WHERE `ID`=447;
|
||||
|
||||
-- Quest "A Recipe For Death (Part 2)"
|
||||
DELETE FROM `quest_details` WHERE `ID`=450;
|
||||
INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES
|
||||
(450,1,1,0,0,0,0,0,0,0);
|
||||
UPDATE `quest_request_items` SET `EmoteOnIncomplete`=1, `EmoteOnComplete`=1 WHERE `ID`=450;
|
||||
UPDATE `quest_offer_reward` SET `Emote1`=5 WHERE `ID`=450;
|
||||
|
||||
-- Quest "A Recipe For Death (Part 3)"
|
||||
DELETE FROM `quest_details` WHERE `ID`=451;
|
||||
INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES
|
||||
(451,1,0,0,0,0,0,0,0,0);
|
||||
UPDATE `quest_request_items` SET `EmoteOnIncomplete`=6, `EmoteOnComplete`=6 WHERE `ID`=451;
|
||||
|
||||
-- Quest "Arugal Must Die"
|
||||
DELETE FROM `quest_details` WHERE `ID`=1014;
|
||||
INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES
|
||||
(1014,1,1,5,0,0,0,0,0,0);
|
||||
UPDATE `quest_request_items` SET `EmoteOnIncomplete`=1, `EmoteOnComplete`=1 WHERE `ID`=1014;
|
||||
UPDATE `quest_offer_reward` SET `Emote1`=4 WHERE `ID`=1014;
|
||||
|
||||
-- Quest "Journey to Hillsbrad Foothills"
|
||||
UPDATE `quest_request_items` SET `EmoteOnComplete`=6 WHERE `ID`=493;
|
||||
UPDATE `quest_offer_reward` SET `Emote1`=273 WHERE `ID`=493;
|
||||
|
||||
-- Quest "Time To Strike"
|
||||
DELETE FROM `quest_details` WHERE `ID`=494;
|
||||
INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES
|
||||
(494,5,1,0,0,0,0,0,0,0);
|
||||
UPDATE `quest_offer_reward` SET `Emote1`=6, `Emote2`=1 WHERE `ID`=494;
|
||||
|
||||
-- Quest "Helcular's Revenge"
|
||||
DELETE FROM `quest_details` WHERE `ID`=552;
|
||||
INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES
|
||||
(552,1,0,0,0,0,0,0,0,0);
|
||||
UPDATE `quest_request_items` SET `EmoteOnIncomplete`=6, `EmoteOnComplete`=6 WHERE `ID`=552;
|
||||
|
||||
-- Quest "Helcular's Revenge (Part 2)"
|
||||
DELETE FROM `quest_details` WHERE `ID`=553;
|
||||
INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES
|
||||
(553,1,0,0,0,0,0,0,0,0);
|
||||
|
||||
-- Quest "Battle of Hillsbrad"
|
||||
DELETE FROM `quest_details` WHERE `ID`=527;
|
||||
INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES
|
||||
(527,25,1,1,0,0,0,0,0,0);
|
||||
UPDATE `quest_offer_reward` SET `Emote1`=25 WHERE `ID`=527;
|
||||
|
||||
-- Quest "Battle of Hillsbrad (Part 2)"
|
||||
DELETE FROM `quest_details` WHERE `ID`=528;
|
||||
INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES
|
||||
(528,1,1,1,0,0,0,0,0,0);
|
||||
UPDATE `quest_offer_reward` SET `Emote1`=1 WHERE `ID`=528;
|
||||
|
||||
-- Quest "Battle of Hillsbrad (Part 3)"
|
||||
DELETE FROM `quest_details` WHERE `ID`=529;
|
||||
INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES
|
||||
(529,1,1,0,0,0,0,0,0,0);
|
||||
UPDATE `quest_request_items` SET `EmoteOnIncomplete`=6, `EmoteOnComplete`=6 WHERE `ID`=529;
|
||||
UPDATE `quest_offer_reward` SET `Emote1`=21 WHERE `ID`=529;
|
||||
|
||||
-- Quest "Battle of Hillsbrad (Part 4)"
|
||||
DELETE FROM `quest_details` WHERE `ID`=532;
|
||||
INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES
|
||||
(532,1,1,0,0,0,0,0,0,0);
|
||||
UPDATE `quest_request_items` SET `EmoteOnIncomplete`=6, `EmoteOnComplete`=6 WHERE `ID`=532;
|
||||
UPDATE `quest_offer_reward` SET `Emote1`=21 WHERE `ID`=532;
|
||||
|
||||
-- Quest "Battle of Hillsbrad (Part 5)"
|
||||
DELETE FROM `quest_details` WHERE `ID`=539;
|
||||
INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES
|
||||
(539,1,1,1,0,0,0,0,0,0);
|
||||
UPDATE `quest_offer_reward` SET `Emote1`=21 WHERE `ID`=539;
|
||||
|
||||
-- Quest "Battle of Hillsbrad (Part 6)"
|
||||
DELETE FROM `quest_details` WHERE `ID`=541;
|
||||
INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES
|
||||
(541,6,5,1,0,0,0,0,0,0);
|
||||
UPDATE `quest_offer_reward` SET `Emote1`=21 WHERE `ID`=541;
|
||||
|
||||
-- Quest "Battle of Hillsbrad (Part 7)"
|
||||
DELETE FROM `quest_details` WHERE `ID`=14351;
|
||||
INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES
|
||||
(14351,1,66,0,0,0,0,0,0,0);
|
||||
UPDATE `quest_request_items` SET `EmoteOnComplete`=5 WHERE `ID`=14351;
|
||||
UPDATE `quest_offer_reward` SET `Emote1`=6, `Emote2`=1, `Emote3`=1 WHERE `ID`=14351;
|
||||
|
||||
-- Quest "Bracers of Binding"
|
||||
UPDATE `quest_request_items` SET `EmoteOnComplete`=0 WHERE `ID`=557;
|
||||
|
||||
-- Quest "Frostmaw"
|
||||
UPDATE `quest_request_items` SET `EmoteOnComplete`=0 WHERE `ID`=1136;
|
||||
UPDATE `quest_offer_reward` SET `Emote1`=1 WHERE `ID`=1136;
|
||||
|
||||
-- Quest "The Rescue"
|
||||
DELETE FROM `quest_details` WHERE `ID`=498;
|
||||
INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES
|
||||
(498,1,1,1,0,0,0,0,0,0);
|
||||
UPDATE `quest_offer_reward` SET `Emote1`=6, `Emote2`=5, `Emote3`=1 WHERE `ID`=498;
|
||||
|
||||
-- Quest "Infiltration"
|
||||
DELETE FROM `quest_details` WHERE `ID`=533;
|
||||
INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES
|
||||
(533,1,0,0,0,0,0,0,0,0);
|
||||
UPDATE `quest_request_items` SET `EmoteOnIncomplete`=6, `EmoteOnComplete`=6 WHERE `ID`=533;
|
||||
UPDATE `quest_offer_reward` SET `Emote1`=1 WHERE `ID`=533;
|
||||
|
||||
-- Quest "Gol'dir"
|
||||
DELETE FROM `quest_details` WHERE `ID`=503;
|
||||
INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES
|
||||
(503,1,0,0,0,0,0,0,0,0);
|
||||
UPDATE `quest_request_items` SET `EmoteOnComplete`=0 WHERE `ID`=503;
|
||||
UPDATE `quest_offer_reward` SET `Emote1`=2, `Emote2`=1 WHERE `ID`=503;
|
||||
|
||||
-- Quest "Blackmoore's Legacy"
|
||||
DELETE FROM `quest_details` WHERE `ID`=506;
|
||||
INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES
|
||||
(506,1,1,1,0,0,0,0,0,0);
|
||||
UPDATE `quest_offer_reward` SET `Emote1`=5 WHERE `ID`=506;
|
||||
|
||||
-- Quest "Lord Aliden Perenolde"
|
||||
DELETE FROM `quest_details` WHERE `ID`=507;
|
||||
INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES
|
||||
(507,1,0,0,0,0,0,0,0,0);
|
||||
UPDATE `quest_offer_reward` SET `Emote1`=20 WHERE `ID`=507;
|
||||
|
||||
-- Quest "Taretha's Gift"
|
||||
UPDATE `quest_request_items` SET `EmoteOnComplete`=6 WHERE `ID`=508;
|
||||
UPDATE `quest_offer_reward` SET `Emote1`=1 WHERE `ID`=508;
|
||||
|
||||
-- Quest "WANTED: Syndicate Personnel"
|
||||
UPDATE `quest_offer_reward` SET `Emote1`=21 WHERE `ID`=549;
|
||||
|
||||
-- Quest "WANTED: Baron Vardus"
|
||||
UPDATE `quest_request_items` SET `EmoteOnIncomplete`=6, `EmoteOnComplete`=6 WHERE `ID`=566;
|
||||
UPDATE `quest_offer_reward` SET `Emote1`=21 WHERE `ID`=566;
|
||||
|
||||
-- Quest "Dangerous!"
|
||||
UPDATE `quest_offer_reward` SET `Emote1`=21 WHERE `ID`=567;
|
||||
|
||||
-- Quest "Souvenirs of Death"
|
||||
DELETE FROM `quest_details` WHERE `ID`=546;
|
||||
INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES
|
||||
(546,1,1,6,0,0,0,0,0,0);
|
||||
UPDATE `quest_request_items` SET `EmoteOnIncomplete`=6, `EmoteOnComplete`=6 WHERE `ID`=546;
|
||||
UPDATE `quest_offer_reward` SET `Emote1`=4 WHERE `ID`=546;
|
||||
|
||||
-- Quest "Humbert's Sword"
|
||||
DELETE FROM `quest_details` WHERE `ID`=547;
|
||||
INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES
|
||||
(547,1,0,0,0,0,0,0,0,0);
|
||||
UPDATE `quest_request_items` SET `EmoteOnIncomplete`=6, `EmoteOnComplete`=6 WHERE `ID`=547;
|
||||
UPDATE `quest_offer_reward` SET `Emote1`=4 WHERE `ID`=547;
|
||||
|
||||
-- Quest "Soothing Turtle Bisque"
|
||||
DELETE FROM `quest_details` WHERE `ID`=7321;
|
||||
INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES
|
||||
(7321,6,1,1,0,0,0,0,0,0);
|
||||
UPDATE `quest_request_items` SET `EmoteOnIncomplete`=6 WHERE `ID`=7321;
|
||||
UPDATE `quest_offer_reward` SET `Emote1`=1 WHERE `ID`=7321;
|
||||
|
||||
-- Quest "Elixir of Suffering"
|
||||
DELETE FROM `quest_details` WHERE `ID`=496;
|
||||
INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES
|
||||
(496,1,1,0,0,0,0,0,0,0);
|
||||
UPDATE `quest_request_items` SET `EmoteOnIncomplete`=1 WHERE `ID`=496;
|
||||
UPDATE `quest_offer_reward` SET `Emote1`=1 WHERE `ID`=496;
|
||||
|
||||
-- Quest "Elixir of Suffering (Part 2)"
|
||||
DELETE FROM `quest_details` WHERE `ID`=499;
|
||||
INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES
|
||||
(499,1,11,0,0,0,0,0,0,0);
|
||||
|
||||
-- Quest "Elixir of Pain"
|
||||
DELETE FROM `quest_details` WHERE `ID`=501;
|
||||
INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES
|
||||
(501,1,5,0,0,0,0,0,0,0);
|
||||
UPDATE `quest_request_items` SET `EmoteOnIncomplete`=1 WHERE `ID`=501;
|
||||
UPDATE `quest_offer_reward` SET `Emote1`=4 WHERE `ID`=501;
|
||||
|
||||
-- Quest "Elixir of Pain (Part 2)"
|
||||
DELETE FROM `quest_details` WHERE `ID`=502;
|
||||
INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES
|
||||
(502,5,1,11,0,0,0,0,0,0);
|
||||
|
||||
-- Quest "Elixir of Agony"
|
||||
DELETE FROM `quest_details` WHERE `ID`=509;
|
||||
INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES
|
||||
(509,1,1,0,0,0,0,0,0,0);
|
||||
UPDATE `quest_request_items` SET `EmoteOnIncomplete`=6, `EmoteOnComplete`=6 WHERE `ID`=509;
|
||||
UPDATE `quest_offer_reward` SET `Emote1`=1, `Emote2`=11 WHERE `ID`=509;
|
||||
|
||||
-- Quest "Elixir of Agony (Part 2)"
|
||||
DELETE FROM `quest_details` WHERE `ID`=513;
|
||||
INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES
|
||||
(513,1,0,0,0,0,0,0,0,0);
|
||||
UPDATE `quest_request_items` SET `EmoteOnComplete`=5 WHERE `ID`=513;
|
||||
UPDATE `quest_offer_reward` SET `Emote1`=6, `Emote2`=1 WHERE `ID`=513;
|
||||
|
||||
-- Quest "Elixir of Agony (Part 3)"
|
||||
UPDATE `quest_request_items` SET `EmoteOnIncomplete`=1 WHERE `ID`=515;
|
||||
UPDATE `quest_offer_reward` SET `Emote1`=5 WHERE `ID`=515;
|
||||
|
||||
-- Quest "Elixir of Agony (Part 4)"
|
||||
DELETE FROM `quest_details` WHERE `ID`=517;
|
||||
INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES
|
||||
(517,1,1,11,0,0,0,0,0,0);
|
||||
UPDATE `quest_request_items` SET `EmoteOnIncomplete`=1 WHERE `ID`=517;
|
||||
UPDATE `quest_offer_reward` SET `Emote1`=5 WHERE `ID`=517;
|
||||
|
||||
-- Quest "Elixir of Agony (Part 5)"
|
||||
DELETE FROM `quest_details` WHERE `ID`=524;
|
||||
INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES
|
||||
(524,1,1,11,0,0,0,0,0,0);
|
||||
*/
|
||||
@@ -0,0 +1,94 @@
|
||||
-- Stormwind City Guard
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (6800,6801,6802,6803,6804) AND `source_type`=9;
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(6800,9,0,0,0,0,100,0,0,0,0,0,103,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stormwind City Guard - On Script - Set Rooted On"),
|
||||
(6800,9,1,0,0,0,100,0,0,0,0,0,66,0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Stormwind City Guard - On Script - Set Orientation"),
|
||||
(6800,9,2,0,0,0,100,0,2000,2000,0,0,5,3,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stormwind City Guard - On Script - Play Emote 'Wave'"),
|
||||
(6800,9,3,0,0,0,100,0,4000,4000,0,0,66,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stormwind City Guard - On Script - Set Orientation"),
|
||||
(6800,9,4,0,0,0,100,0,0,0,0,0,103,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stormwind City Guard - On Script - Set Rooted Off"),
|
||||
(6801,9,0,0,0,0,100,0,0,0,0,0,103,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stormwind City Guard - On Script - Set Rooted On"),
|
||||
(6801,9,1,0,0,0,100,0,0,0,0,0,66,0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Stormwind City Guard - On Script - Set Orientation"),
|
||||
(6801,9,2,0,0,0,100,0,2000,2000,0,0,5,66,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stormwind City Guard - On Script - Play Emote 'Salute'"),
|
||||
(6801,9,3,0,0,0,100,0,4000,4000,0,0,66,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stormwind City Guard - On Script - Set Orientation"),
|
||||
(6801,9,4,0,0,0,100,0,0,0,0,0,103,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stormwind City Guard - On Script - Set Rooted Off"),
|
||||
(6802,9,0,0,0,0,100,0,0,0,0,0,103,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stormwind City Guard - On Script - Set Rooted On"),
|
||||
(6802,9,1,0,0,0,100,0,0,0,0,0,66,0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Stormwind City Guard - On Script - Set Orientation"),
|
||||
(6802,9,2,0,0,0,100,0,2000,2000,0,0,5,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stormwind City Guard - On Script - Play Emote 'Bow'"),
|
||||
(6802,9,3,0,0,0,100,0,4000,4000,0,0,66,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stormwind City Guard - On Script - Set Orientation"),
|
||||
(6802,9,4,0,0,0,100,0,0,0,0,0,103,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stormwind City Guard - On Script - Set Rooted Off"),
|
||||
(6803,9,0,0,0,0,100,0,0,0,0,0,103,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stormwind City Guard - On Script - Set Rooted On"),
|
||||
(6803,9,1,0,0,0,100,0,0,0,0,0,66,0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Stormwind City Guard - On Script - Set Orientation"),
|
||||
(6803,9,2,0,0,0,100,0,2000,2000,0,0,5,23,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stormwind City Guard - On Script - Play Emote 'Flex'"),
|
||||
(6803,9,3,0,0,0,100,0,4000,4000,0,0,66,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stormwind City Guard - On Script - Set Orientation"),
|
||||
(6803,9,4,0,0,0,100,0,0,0,0,0,103,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stormwind City Guard - On Script - Set Rooted Off"),
|
||||
(6804,9,0,0,0,0,100,0,0,0,0,0,103,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stormwind City Guard - On Script - Set Rooted On"),
|
||||
(6804,9,1,0,0,0,100,0,0,0,0,0,66,0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Stormwind City Guard - On Script - Set Orientation"),
|
||||
(6804,9,2,0,0,0,100,0,2000,2000,0,0,5,25,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stormwind City Guard - On Script - Play Emote 'Point'"),
|
||||
(6804,9,3,0,0,0,100,0,4000,4000,0,0,66,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stormwind City Guard - On Script - Set Orientation"),
|
||||
(6804,9,4,0,0,0,100,0,0,0,0,0,103,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stormwind City Guard - On Script - Set Rooted Off");
|
||||
|
||||
-- Stormwind City Patroller
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=1976 AND `source_type`=0 AND `id` IN (1,2,3,4,5,6,7,8,9,10,11);
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(1976,0,1,0,0,0,100,0,0,0,2000,4000,11,6660,64,0,0,0,0,2,0,0,0,0,0,0,0,"Stormwind City Patroller - In Combat - Cast 'Shoot'"),
|
||||
(1976,0,2,0,9,0,100,0,0,5,11000,14000,11,12169,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stormwind City Patroller - Within 0-5 Range - Cast 'Shield Block'"),
|
||||
(1976,0,3,0,0,0,100,0,5000,9000,8000,13000,11,12170,0,0,0,0,0,2,0,0,0,0,0,0,0,"Stormwind City Patroller - In Combat - Cast 'Revenge'"),
|
||||
(1976,0,4,0,22,0,100,0,101,5000,5000,0,80,6800,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stormwind City Patroller - On Received Emote 'Wave' - Run Script"),
|
||||
(1976,0,5,0,22,0,100,0,78,5000,5000,0,80,6801,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stormwind City Patroller - On Received Emote 'Salute' - Run Script"),
|
||||
(1976,0,6,0,22,0,100,0,58,5000,5000,0,80,6802,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stormwind City Patroller - On Received Emote 'Kiss' - Run Script"),
|
||||
(1976,0,7,0,22,0,100,0,84,5000,5000,0,80,6803,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stormwind City Patroller - On Received Emote 'Shy' - Run Script"),
|
||||
(1976,0,8,0,22,0,100,0,77,5000,5000,0,80,6804,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stormwind City Patroller - On Received Emote 'Rude' - Run Script"),
|
||||
(1976,0,9,0,22,0,100,0,22,5000,5000,0,80,6804,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stormwind City Patroller - On Received Emote 'Chicken' - Run Script"),
|
||||
(1976,0,10,0,22,0,100,0,17,5000,5000,0,80,6802,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stormwind City Patroller - On Received Emote 'Bow' - Run Script");
|
||||
|
||||
-- Stormwind Royal Guard
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=1756 AND `source_type`=0 AND `id` IN (1,2,3,4,5,6,7,8,9,10);
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(1756,0,1,0,0,0,100,0,0,0,2000,4000,11,6660,64,0,0,0,0,2,0,0,0,0,0,0,0,"Stormwind Royal Guard - In Combat - Cast 'Shoot'"),
|
||||
(1756,0,2,0,9,0,100,0,0,5,11000,14000,11,12169,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stormwind Royal Guard - Within 0-5 Range - Cast 'Shield Block'"),
|
||||
(1756,0,3,0,0,0,100,0,5000,9000,8000,13000,11,12170,0,0,0,0,0,2,0,0,0,0,0,0,0,"Stormwind Royal Guard - In Combat - Cast 'Revenge'"),
|
||||
(1756,0,4,0,22,0,100,0,101,5000,5000,0,80,6800,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stormwind Royal Guard - On Received Emote 'Wave' - Run Script"),
|
||||
(1756,0,5,0,22,0,100,0,78,5000,5000,0,80,6801,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stormwind Royal Guard - On Received Emote 'Salute' - Run Script"),
|
||||
(1756,0,6,0,22,0,100,0,58,5000,5000,0,80,6802,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stormwind Royal Guard - On Received Emote 'Kiss' - Run Script"),
|
||||
(1756,0,7,0,22,0,100,0,84,5000,5000,0,80,6803,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stormwind Royal Guard - On Received Emote 'Shy' - Run Script"),
|
||||
(1756,0,8,0,22,0,100,0,77,5000,5000,0,80,6804,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stormwind Royal Guard - On Received Emote 'Rude' - Run Script"),
|
||||
(1756,0,9,0,22,0,100,0,22,5000,5000,0,80,6804,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stormwind Royal Guard - On Received Emote 'Chicken' - Run Script"),
|
||||
(1756,0,10,0,22,0,100,0,17,5000,5000,0,80,6802,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stormwind Royal Guard - On Received Emote 'Bow' - Run Script");
|
||||
|
||||
-- Orgrimmar Grunt
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=3296 AND `source_type`=0 AND `id` IN (1,2,3,4,5,6,7,8,9,10,11);
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(3296,0,1,0,0,0,100,0,0,0,2000,4000,11,6660,64,0,0,0,0,2,0,0,0,0,0,0,0,"Orgrimmar Grunt - In Combat - Cast 'Shoot'"),
|
||||
(3296,0,2,0,0,0,100,0,5000,9000,8000,13000,11,40505,0,0,0,0,0,2,0,0,0,0,0,0,0,"Orgrimmar Grunt - In Combat - Cast 'Cleave'"),
|
||||
(3296,0,3,0,2,0,100,1,0,30,0,0,11,8599,0,0,0,0,0,1,0,0,0,0,0,0,0,"Orgrimmar Grunt - Between 0-30% Health - Cast 'Enrage' (No Repeat)"),
|
||||
(3296,0,4,0,2,0,100,1,0,30,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Orgrimmar Grunt - Between 0-30% Health - Say Line 0 (No Repeat)"),
|
||||
(3296,0,5,0,22,0,100,0,101,5000,5000,0,80,6800,0,0,0,0,0,1,0,0,0,0,0,0,0,"Orgrimmar Grunt - On Received Emote 'Wave' - Run Script"),
|
||||
(3296,0,6,0,22,0,100,0,78,5000,5000,0,80,6801,0,0,0,0,0,1,0,0,0,0,0,0,0,"Orgrimmar Grunt - On Received Emote 'Salute' - Run Script"),
|
||||
(3296,0,7,0,22,0,100,0,58,5000,5000,0,80,6802,0,0,0,0,0,1,0,0,0,0,0,0,0,"Orgrimmar Grunt - On Received Emote 'Kiss' - Run Script"),
|
||||
(3296,0,8,0,22,0,100,0,84,5000,5000,0,80,6803,0,0,0,0,0,1,0,0,0,0,0,0,0,"Orgrimmar Grunt - On Received Emote 'Shy' - Run Script"),
|
||||
(3296,0,9,0,22,0,100,0,77,5000,5000,0,80,6804,0,0,0,0,0,1,0,0,0,0,0,0,0,"Orgrimmar Grunt - On Received Emote 'Rude' - Run Script"),
|
||||
(3296,0,10,0,22,0,100,0,22,5000,5000,0,80,6804,0,0,0,0,0,1,0,0,0,0,0,0,0,"Orgrimmar Grunt - On Received Emote 'Chicken' - Run Script"),
|
||||
(3296,0,11,0,22,0,100,0,17,5000,5000,0,80,6802,0,0,0,0,0,1,0,0,0,0,0,0,0,"Orgrimmar Grunt - On Received Emote 'Bow' - Run Script");
|
||||
|
||||
DELETE FROM `creature_text` WHERE `CreatureID`=3296 AND `GroupID`=0;
|
||||
INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
|
||||
(3296,0,0,"%s becomes enraged!",16,0,100,0,0,0,10677,0,"Orgrimmar Grunt");
|
||||
|
||||
-- Kor'kron Elite
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=14304 AND `source_type`=0 AND `id` IN (1,2,3,4,5,6,7,8,9,10,11);
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(14304,0,1,0,0,0,100,0,0,0,2000,4000,11,6660,64,0,0,0,0,2,0,0,0,0,0,0,0,"Kor'kron Elite - In Combat - Cast 'Shoot'"),
|
||||
(14304,0,2,0,0,0,100,0,5000,9000,8000,13000,11,40505,0,0,0,0,0,2,0,0,0,0,0,0,0,"Kor'kron Elite - In Combat - Cast 'Cleave'"),
|
||||
(14304,0,3,0,2,0,100,0,0,30,120000,120000,11,8599,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kor'kron Elite - Between 0-30% Health - Cast 'Enrage'"),
|
||||
(14304,0,4,0,2,0,100,1,0,30,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kor'kron Elite - Between 0-30% Health - Say Line 1 (No Repeat)"),
|
||||
(14304,0,5,0,22,0,100,0,101,5000,5000,0,80,6800,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kor'kron Elite - On Received Emote 'Wave' - Run Script"),
|
||||
(14304,0,6,0,22,0,100,0,78,5000,5000,0,80,6801,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kor'kron Elite - On Received Emote 'Salute' - Run Script"),
|
||||
(14304,0,7,0,22,0,100,0,58,5000,5000,0,80,6802,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kor'kron Elite - On Received Emote 'Kiss' - Run Script"),
|
||||
(14304,0,8,0,22,0,100,0,84,5000,5000,0,80,6803,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kor'kron Elite - On Received Emote 'Shy' - Run Script"),
|
||||
(14304,0,9,0,22,0,100,0,77,5000,5000,0,80,6804,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kor'kron Elite - On Received Emote 'Rude' - Run Script"),
|
||||
(14304,0,10,0,22,0,100,0,22,5000,5000,0,80,6804,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kor'kron Elite - On Received Emote 'Chicken' - Run Script"),
|
||||
(14304,0,11,0,22,0,100,0,17,5000,5000,0,80,6802,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kor'kron Elite - On Received Emote 'Bow' - Run Script");
|
||||
|
||||
DELETE FROM `creature_text` WHERE `CreatureID`=14304 AND `GroupID`=1;
|
||||
INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
|
||||
(14304,1,0,"%s becomes enraged!",16,0,100,0,0,0,10677,0,"Kor'kron Elite");
|
||||
@@ -0,0 +1,122 @@
|
||||
-- Tarren Mill Deathguard
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=2405 AND `source_type`=0 AND `id` IN (1,2,3,4,5,6,7,8,9,10);
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(2405,0,1,0,0,0,100,0,0,0,2000,4000,11,6660,64,0,0,0,0,2,0,0,0,0,0,0,0,"Tarren Mill Deathguard - In Combat - Cast 'Shoot'"),
|
||||
(2405,0,2,0,9,0,100,0,0,5,11000,14000,11,12169,0,0,0,0,0,1,0,0,0,0,0,0,0,"Tarren Mill Deathguard - Within 0-5 Range - Cast 'Shield Block'"),
|
||||
(2405,0,3,0,0,0,100,0,5000,9000,8000,13000,11,12170,0,0,0,0,0,2,0,0,0,0,0,0,0,"Tarren Mill Deathguard - In Combat - Cast 'Revenge'"),
|
||||
(2405,0,4,0,22,0,100,0,101,5000,5000,0,80,6800,0,0,0,0,0,1,0,0,0,0,0,0,0,"Tarren Mill Deathguard - On Received Emote 'Wave' - Run Script"),
|
||||
(2405,0,5,0,22,0,100,0,78,5000,5000,0,80,6801,0,0,0,0,0,1,0,0,0,0,0,0,0,"Tarren Mill Deathguard - On Received Emote 'Salute' - Run Script"),
|
||||
(2405,0,6,0,22,0,100,0,58,5000,5000,0,80,6802,0,0,0,0,0,1,0,0,0,0,0,0,0,"Tarren Mill Deathguard - On Received Emote 'Kiss' - Run Script"),
|
||||
(2405,0,7,0,22,0,100,0,84,5000,5000,0,80,6803,0,0,0,0,0,1,0,0,0,0,0,0,0,"Tarren Mill Deathguard - On Received Emote 'Shy' - Run Script"),
|
||||
(2405,0,8,0,22,0,100,0,77,5000,5000,0,80,6804,0,0,0,0,0,1,0,0,0,0,0,0,0,"Tarren Mill Deathguard - On Received Emote 'Rude' - Run Script"),
|
||||
(2405,0,9,0,22,0,100,0,22,5000,5000,0,80,6804,0,0,0,0,0,1,0,0,0,0,0,0,0,"Tarren Mill Deathguard - On Received Emote 'Chicken' - Run Script"),
|
||||
(2405,0,10,0,22,0,100,0,17,5000,5000,0,80,6802,0,0,0,0,0,1,0,0,0,0,0,0,0,"Tarren Mill Deathguard - On Received Emote 'Bow' - Run Script");
|
||||
|
||||
UPDATE `creature_text` SET `Language`=33 WHERE `CreatureID`=2405; -- Fix language for Tarren Mill Deathguard's aggro text
|
||||
|
||||
-- Hammerfall Guardian
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=2621 AND `source_type`=0;
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(2621,0,0,0,0,0,100,0,0,0,2000,4000,11,6660,64,0,0,0,0,2,0,0,0,0,0,0,0,"Hammerfall Guardian - In Combat - Cast 'Shoot'"),
|
||||
(2621,0,1,0,9,0,100,0,0,5,11000,14000,11,12169,0,0,0,0,0,1,0,0,0,0,0,0,0,"Hammerfall Guardian - Within 0-5 Range - Cast 'Shield Block'"),
|
||||
(2621,0,2,0,0,0,100,0,5000,9000,8000,13000,11,12170,0,0,0,0,0,2,0,0,0,0,0,0,0,"Hammerfall Guardian - In Combat - Cast 'Revenge'"),
|
||||
(2621,0,3,0,22,0,100,0,101,5000,5000,0,80,6800,0,0,0,0,0,1,0,0,0,0,0,0,0,"Hammerfall Guardian - On Received Emote 'Wave' - Run Script"),
|
||||
(2621,0,4,0,22,0,100,0,78,5000,5000,0,80,6801,0,0,0,0,0,1,0,0,0,0,0,0,0,"Hammerfall Guardian - On Received Emote 'Salute' - Run Script"),
|
||||
(2621,0,5,0,22,0,100,0,58,5000,5000,0,80,6802,0,0,0,0,0,1,0,0,0,0,0,0,0,"Hammerfall Guardian - On Received Emote 'Kiss' - Run Script"),
|
||||
(2621,0,6,0,22,0,100,0,84,5000,5000,0,80,6803,0,0,0,0,0,1,0,0,0,0,0,0,0,"Hammerfall Guardian - On Received Emote 'Shy' - Run Script"),
|
||||
(2621,0,7,0,22,0,100,0,77,5000,5000,0,80,6804,0,0,0,0,0,1,0,0,0,0,0,0,0,"Hammerfall Guardian - On Received Emote 'Rude' - Run Script"),
|
||||
(2621,0,8,0,22,0,100,0,22,5000,5000,0,80,6804,0,0,0,0,0,1,0,0,0,0,0,0,0,"Hammerfall Guardian - On Received Emote 'Chicken' - Run Script"),
|
||||
(2621,0,9,0,22,0,100,0,17,5000,5000,0,80,6802,0,0,0,0,0,1,0,0,0,0,0,0,0,"Hammerfall Guardian - On Received Emote 'Bow' - Run Script");
|
||||
|
||||
-- Skyguard Windcharger
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=23257 AND `source_type`=0 AND `id`=1;
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(23257,0,1,0,9,0,100,0,0,20,12000,16000,11,12024,0,0,0,0,0,2,0,0,0,0,0,0,0,"Skyguard Windcharger - Within 0-20 Range - Cast 'Net'");
|
||||
|
||||
-- Stormwind Marine
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=20556 AND `source_type`=0 AND `id` IN (2,3,4,5,6,7,8,9);
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(20556,0,2,0,0,0,100,0,0,0,2000,4000,11,6660,64,0,0,0,0,2,0,0,0,0,0,0,0,"Stormwind Marine - In Combat - Cast 'Shoot'"),
|
||||
(20556,0,3,0,22,0,100,0,101,5000,5000,0,80,6800,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stormwind Marine - On Received Emote 'Wave' - Run Script"),
|
||||
(20556,0,4,0,22,0,100,0,78,5000,5000,0,80,6801,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stormwind Marine - On Received Emote 'Salute' - Run Script"),
|
||||
(20556,0,5,0,22,0,100,0,58,5000,5000,0,80,6802,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stormwind Marine - On Received Emote 'Kiss' - Run Script"),
|
||||
(20556,0,6,0,22,0,100,0,84,5000,5000,0,80,6803,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stormwind Marine - On Received Emote 'Shy' - Run Script"),
|
||||
(20556,0,7,0,22,0,100,0,77,5000,5000,0,80,6804,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stormwind Marine - On Received Emote 'Rude' - Run Script"),
|
||||
(20556,0,8,0,22,0,100,0,22,5000,5000,0,80,6804,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stormwind Marine - On Received Emote 'Chicken' - Run Script"),
|
||||
(20556,0,9,0,22,0,100,0,17,5000,5000,0,80,6802,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stormwind Marine - On Received Emote 'Bow' - Run Script");
|
||||
|
||||
UPDATE `creature_template` SET `npcflag`=0, `IconName`=NULL WHERE `entry`=20556; -- They don't give directions and don't have gossip text
|
||||
|
||||
-- Deathguard Elite
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=7980 AND `source_type`=0 AND `id` IN (1,2,3,4,5,6,7,8,9,10);
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(7980,0,1,0,25,0,100,0,0,0,0,0,11,18950,0,0,0,0,0,1,0,0,0,0,0,0,0,"Deathguard Elite - On Reset - Cast 'Invisibility and Stealth Detection'"),
|
||||
(7980,0,2,0,0,0,100,0,5000,7000,7000,10000,11,14516,0,0,0,0,0,2,0,0,0,0,0,0,0,"Deathguard Elite - In Combat - Cast 'Strike'"),
|
||||
(7980,0,3,0,9,0,100,0,0,5,12000,16000,11,9080,0,0,0,0,0,2,0,0,0,0,0,0,0,"Deathguard Elite - Within 0-5 Range - Cast 'Hamstring'"),
|
||||
(7980,0,4,0,22,0,100,0,101,5000,5000,0,80,6800,0,0,0,0,0,1,0,0,0,0,0,0,0,"Deathguard Elite - On Received Emote 'Wave' - Run Script"),
|
||||
(7980,0,5,0,22,0,100,0,78,5000,5000,0,80,6801,0,0,0,0,0,1,0,0,0,0,0,0,0,"Deathguard Elite - On Received Emote 'Salute' - Run Script"),
|
||||
(7980,0,6,0,22,0,100,0,58,5000,5000,0,80,6802,0,0,0,0,0,1,0,0,0,0,0,0,0,"Deathguard Elite - On Received Emote 'Kiss' - Run Script"),
|
||||
(7980,0,7,0,22,0,100,0,84,5000,5000,0,80,6803,0,0,0,0,0,1,0,0,0,0,0,0,0,"Deathguard Elite - On Received Emote 'Shy' - Run Script"),
|
||||
(7980,0,8,0,22,0,100,0,77,5000,5000,0,80,6804,0,0,0,0,0,1,0,0,0,0,0,0,0,"Deathguard Elite - On Received Emote 'Rude' - Run Script"),
|
||||
(7980,0,9,0,22,0,100,0,22,5000,5000,0,80,6804,0,0,0,0,0,1,0,0,0,0,0,0,0,"Deathguard Elite - On Received Emote 'Chicken' - Run Script"),
|
||||
(7980,0,10,0,22,0,100,0,17,5000,5000,0,80,6802,0,0,0,0,0,1,0,0,0,0,0,0,0,"Deathguard Elite - On Received Emote 'Bow' - Run Script");
|
||||
|
||||
-- Mounted Ironforge Mountaineer
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=12996 AND `source_type`=0 AND `id` IN (2,3,4,5,6,7,8,9);
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(12996,0,2,0,22,0,100,0,101,5000,5000,0,80,6800,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mounted Ironforge Mountaineer - On Received Emote 'Wave' - Run Script"),
|
||||
(12996,0,3,0,22,0,100,0,78,5000,5000,0,80,6801,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mounted Ironforge Mountaineer - On Received Emote 'Salute' - Run Script"),
|
||||
(12996,0,4,0,22,0,100,0,58,5000,5000,0,80,6802,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mounted Ironforge Mountaineer - On Received Emote 'Kiss' - Run Script"),
|
||||
(12996,0,5,0,22,0,100,0,84,5000,5000,0,80,6803,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mounted Ironforge Mountaineer - On Received Emote 'Shy' - Run Script"),
|
||||
(12996,0,6,0,22,0,100,0,77,5000,5000,0,80,6804,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mounted Ironforge Mountaineer - On Received Emote 'Rude' - Run Script"),
|
||||
(12996,0,7,0,22,0,100,0,22,5000,5000,0,80,6804,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mounted Ironforge Mountaineer - On Received Emote 'Chicken' - Run Script"),
|
||||
(12996,0,8,0,22,0,100,0,17,5000,5000,0,80,6802,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mounted Ironforge Mountaineer - On Received Emote 'Bow' - Run Script");
|
||||
|
||||
UPDATE `creature_template` SET `gossip_menu_id`=2121 WHERE `entry`=12996; -- Add gossip text
|
||||
|
||||
-- Scout Stronghand
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=14375 AND `source_type`=0 AND `id` IN (1,2,3);
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `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
|
||||
(14375,0,1,0,9,0,100,0,0,30,8000,12000,11,14030,0,0,0,0,0,2,0,0,0,0,0,0,0,"Scout Stronghand - Within 0-30 Range - Cast 'Hooked Net'"),
|
||||
(14375,0,2,0,0,0,100,0,5000,7000,5000,9000,11,15572,0,0,0,0,0,2,0,0,0,0,0,0,0,"Scout Stronghand - In Combat - Cast 'Sunder Armor'"),
|
||||
(14375,0,3,0,0,0,100,0,0,0,2000,4000,11,6660,64,0,0,0,0,2,0,0,0,0,0,0,0,"Scout Stronghand - In Combat - Cast 'Shoot'");
|
||||
|
||||
-- Expedition Warden
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=17855 AND `source_type`=0;
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(17855,0,0,0,9,0,100,0,0,20,12000,16000,11,12024,0,0,0,0,0,2,0,0,0,0,0,0,0,"Expedition Warden - Within 0-20 Range - Cast 'Net'"),
|
||||
(17855,0,1,0,0,0,100,0,0,0,2000,4000,11,6660,64,0,0,0,0,2,0,0,0,0,0,0,0,"Expedition Warden - In Combat - Cast 'Shoot'"),
|
||||
(17855,0,2,0,4,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Expedition Warden - On Aggro - Cast Say Line 0");
|
||||
|
||||
DELETE FROM `creature_text` WHERE `CreatureID`=17855;
|
||||
INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
|
||||
(17855,0,0,"Taste blade, mongrel!",12,0,100,0,0,0,10950,0,"Expedition Warden"),
|
||||
(17855,0,1,"Please tell me that you didn't just do what I think you just did. Please tell me that I'm not going to have to hurt you...",12,0,100,0,0,0,10951,0,"Expedition Warden"),
|
||||
(17855,0,2,"As if we don't have enough problems, you go and create more!",12,0,100,0,0,0,10953,0,"Expedition Warden"),
|
||||
(17855,0,3,"You dare spill blood on neutral ground? OUT! OUT, I SAY!",12,0,100,0,0,0,10948,0,"Expedition Warden"),
|
||||
(17855,0,4,"We don't take kindly to miscreants, $r.",12,0,100,0,0,0,10949,0,"Expedition Warden"),
|
||||
(17855,0,5,"Get a rope!",12,0,100,0,0,0,10952,0,"Expedition Warden"),
|
||||
(17855,0,6,"Believe me when I tell you this: You're gonna wish you weren't born, sissy!",12,0,100,0,0,0,10954,0,"Expedition Warden"),
|
||||
(17855,0,7,"Your actions shame us all, $c. I hurt inside as I beat you senseless.",12,0,100,0,0,0,10955,0,"Expedition Warden");
|
||||
|
||||
-- Scout Manslayer
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=14376 AND `source_type`=0 AND `id` IN (1,2,3);
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `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
|
||||
(14376,0,1,0,9,0,100,0,0,30,8000,12000,11,14030,0,0,0,0,0,2,0,0,0,0,0,0,0,"Scout Manslayer - Within 0-30 Range - Cast 'Hooked Net'"),
|
||||
(14376,0,2,0,0,0,100,0,5000,7000,5000,9000,11,15572,0,0,0,0,0,2,0,0,0,0,0,0,0,"Scout Manslayer - In Combat - Cast 'Sunder Armor'"),
|
||||
(14376,0,3,0,0,0,100,0,0,0,2000,4000,11,6660,64,0,0,0,0,2,0,0,0,0,0,0,0,"Scout Manslayer - In Combat - Cast 'Shoot'");
|
||||
|
||||
-- Scout Tharr
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=14377 AND `source_type`=0 AND `id` IN (1,2,3);
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `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
|
||||
(14377,0,1,0,9,0,100,0,0,30,8000,12000,11,14030,0,0,0,0,0,2,0,0,0,0,0,0,0,"Scout Tharr - Within 0-30 Range - Cast 'Hooked Net'"),
|
||||
(14377,0,2,0,0,0,100,0,5000,7000,5000,9000,11,15572,0,0,0,0,0,2,0,0,0,0,0,0,0,"Scout Tharr - In Combat - Cast 'Sunder Armor'"),
|
||||
(14377,0,3,0,0,0,100,0,0,0,2000,4000,11,6660,64,0,0,0,0,2,0,0,0,0,0,0,0,"Scout Tharr - In Combat - Cast 'Shoot'");
|
||||
|
||||
-- Cenarion Hold Infantry
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=15184 AND `source_type`=0 AND `id`=4;
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(15184,0,4,0,0,0,100,0,0,0,2000,4000,11,6660,64,0,0,0,0,2,0,0,0,0,0,0,0,"Cenarion Hold Infantry - In Combat - Cast 'Shoot'");
|
||||
|
||||
UPDATE `creature_template` SET `flags_extra`=32768 WHERE `entry` IN (1756);
|
||||
UPDATE `creature_template` SET `faction`=105 WHERE `entry` IN (3084);
|
||||
@@ -0,0 +1,104 @@
|
||||
/*
|
||||
-- Quest "A Fine Mess"
|
||||
-- Pooling for Kernobee
|
||||
SET @GUID := 64977;
|
||||
SET @POOL := 385;
|
||||
DELETE FROM `creature` WHERE `guid` BETWEEN @GUID+0 AND @GUID+6;
|
||||
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `ScriptName`, `VerifiedBuild`) VALUES
|
||||
(@GUID+0,7850,90,0,0,1,1,0,0,-637.053,101.836,-194.48,4.76023,7200,0,0,896,0,0,0,0,0,"",0),
|
||||
(@GUID+1,7850,90,0,0,1,1,0,0,-577.696,28.5626,-197.735,4.76023,7200,0,0,896,0,0,0,0,0,"",0),
|
||||
(@GUID+2,7850,90,0,0,1,1,0,0,-618.832,153.15,-199.654,6.25451,7200,0,0,896,0,0,0,0,0,"",0),
|
||||
(@GUID+3,7850,90,0,0,1,1,0,0,-600.079,15.9729,-179.679,5.47311,7200,0,0,896,0,0,0,0,0,"",0),
|
||||
(@GUID+4,7850,90,0,0,1,1,0,0,-540.499,21.528,-179.737,1.53634,7200,0,0,896,0,0,0,0,0,"",0),
|
||||
(@GUID+5,7850,90,0,0,1,1,0,0,-533.081,34.7292,-199.0739,1.89563,7200,0,0,896,0,0,0,0,0,"",0),
|
||||
(@GUID+6,7850,90,0,0,1,1,0,0,-621.389,51.785,-199.647,5.47311,7200,0,0,896,0,0,0,0,0,"",0);
|
||||
|
||||
DELETE FROM `pool_template` WHERE `entry`=@POOL;
|
||||
INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES
|
||||
(@POOL,1,"Kernobee");
|
||||
|
||||
DELETE FROM `pool_creature` WHERE `pool_entry`=@POOL;
|
||||
INSERT INTO `pool_creature` (`guid`, `pool_entry`, `chance`, `description`) VALUES
|
||||
(@GUID+0,@POOL,0,"Kernobee (7850) - Spawn 1"),
|
||||
(@GUID+1,@POOL,0,"Kernobee (7850) - Spawn 2"),
|
||||
(@GUID+2,@POOL,0,"Kernobee (7850) - Spawn 3"),
|
||||
(@GUID+3,@POOL,0,"Kernobee (7850) - Spawn 4"),
|
||||
(@GUID+4,@POOL,0,"Kernobee (7850) - Spawn 5"),
|
||||
(@GUID+5,@POOL,0,"Kernobee (7850) - Spawn 6"),
|
||||
(@GUID+6,@POOL,0,"Kernobee (7850) - Spawn 7"),
|
||||
(30135,@POOL,0,"Kernobee (7850) - Spawn 8");
|
||||
|
||||
-- Texts
|
||||
DELETE FROM `creature_text` WHERE `CreatureID` IN (7850,7897);
|
||||
INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
|
||||
(7850,0,0,"I see the exit! Hurry, hurry!",12,0,100,5,0,0,3948,0,"Kernobee"),
|
||||
(7850,1,0,"%s cheers!",16,0,100,4,0,0,3928,0,"Kernobee"),
|
||||
(7850,2,0,"Thank you for rescuing me! Word of your deed will not go unnoticed.",12,0,100,0,0,0,3929,0,"Kernobee"),
|
||||
(7850,3,0,"%s waves goodbye to everyone.",16,0,100,3,0,0,3930,0,"Kernobee"),
|
||||
(7850,4,0,"Uh oh....",12,0,100,0,0,0,3953,0,"Kernobee"),
|
||||
(7850,5,0,"Get me out of here!",12,0,100,5,0,0,3881,0,"Kernobee"),
|
||||
(7897,0,0,"%s activates!",14,0,100,0,0,0,3926,0,"Alarm-a-bomb 2600"),
|
||||
(7897,1,0,"Self-destruct sequence activated.",14,0,100,0,0,0,3927,0,"Alarm-a-bomb 2600"),
|
||||
(7897,2,0,"Anti-escape countermeasures activated. Self-destruct in t-minus 20 seconds....",14,0,100,0,0,0,3949,0,"Alarm-a-bomb 2600"),
|
||||
(7897,3,0,"Alarm-a-bomb unit 2600 has failed. Self-destruct override [ACTIVE]. Cooldown [ACTIVE].",14,0,100,0,0,0,3950,0,"Alarm-a-bomb 2600");
|
||||
|
||||
-- Kernobee
|
||||
DELETE FROM `creature_addon` WHERE `guid`=30135;
|
||||
|
||||
UPDATE `creature_template` SET `AIName`="SmartAI", `ScriptName`="" WHERE `entry`=7850;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=7850 AND `source_type`=0;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=785000 AND `source_type`=9;
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(7850,0,0,1,19,0,100,0,2904,0,0,0,29,2,180,0,0,0,0,7,0,0,0,0,0,0,0,"Kernobee - On Quest 'A Fine Mess' Taken - Start Follow Player"),
|
||||
(7850,0,1,2,61,0,100,0,0,0,0,0,64,1,0,0,0,0,0,16,0,0,0,0,0,0,0,"Kernobee - On Quest 'A Fine Mess' Taken - Store Targetlist"),
|
||||
(7850,0,2,3,61,0,100,0,0,0,0,0,91,7,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kernobee - On Quest 'A Fine Mess' Taken - Remove Flag Standstate 'Dead'"),
|
||||
(7850,0,3,4,61,0,100,0,0,0,0,0,83,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kernobee - On Quest 'A Fine Mess' Taken - Remove Npc Flag Questgiver"),
|
||||
(7850,0,4,5,61,0,100,0,0,0,0,0,19,768,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kernobee - On Quest 'A Fine Mess' Taken - Remove Unit Flag 'Immune To NPCs' & 'Immune To Players'"),
|
||||
(7850,0,5,6,61,0,100,0,0,0,0,0,2,250,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kernobee - On Quest 'A Fine Mess' Taken - Set Faction 250"),
|
||||
(7850,0,6,7,61,0,100,0,0,0,0,0,1,5,0,0,0,0,0,12,1,0,0,0,0,0,0,"Kernobee - On Quest 'A Fine Mess' Taken - Say Line 5"),
|
||||
(7850,0,7,0,61,0,100,0,0,0,0,0,45,1,1,0,0,0,0,10,30134,7897,0,0,0,0,0,"Kernobee - On Quest 'A Fine Mess' Taken - Set Data to Alarm-a-bomb 2600"),
|
||||
(7850,0,8,0,6,0,100,0,0,0,0,0,6,2904,0,0,0,0,0,12,1,0,0,0,0,0,0,"Kernobee - On Death - Fail Quest 'A Fine Mess'"),
|
||||
(7850,0,9,0,11,0,100,0,0,0,0,0,90,7,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kernobee - On Respawn - Add Flag Standstate 'Dead'"),
|
||||
(7850,0,10,11,38,0,100,1,1,1,0,0,1,0,0,0,0,0,0,12,1,0,0,0,0,0,0,"Kernobee - On Data Set - Say Line 0"),
|
||||
(7850,0,11,12,61,0,100,0,0,0,0,0,29,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kernobee - On Data Set - Stop Follow"),
|
||||
(7850,0,12,13,61,0,100,0,0,0,0,0,69,0,0,0,0,0,0,8,0,0,0,-337.215,-0.165544,-152.847,0,"Kernobee - On Data Set - Move to Position"),
|
||||
(7850,0,13,0,61,0,100,0,0,0,0,0,80,785000,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kernobee - On Data Set - Run Script"),
|
||||
(785000,9,0,0,0,0,100,0,11000,11000,0,0,15,2904,0,0,0,0,0,12,1,0,0,0,0,0,0,"Kernobee - On Script - Quest Credit 'A Fine Mess'"),
|
||||
(785000,9,1,0,0,0,100,0,0,0,0,0,45,3,3,0,0,0,0,19,7897,0,0,0,0,0,0,"Kernobee - On Script - Set Data to Alarm-a-bomb 2600"),
|
||||
(785000,9,2,0,0,0,100,0,500,500,0,0,1,1,0,0,0,0,0,12,1,0,0,0,0,0,0,"Kernobee - On Script - Say Line 1"),
|
||||
(785000,9,3,0,0,0,100,0,4000,4000,0,0,66,0,0,0,0,0,0,12,1,0,0,0,0,0,0,"Kernobee - On Script - Set Orientation"),
|
||||
(785000,9,4,0,0,0,100,0,1000,1000,0,0,1,2,0,0,0,0,0,12,1,0,0,0,0,0,0,"Kernobee - On Script - Say Line 2"),
|
||||
(785000,9,5,0,0,0,100,0,5000,5000,0,0,1,3,0,0,0,0,0,12,1,0,0,0,0,0,0,"Kernobee - On Script - Say Line 3"),
|
||||
(785000,9,6,0,0,0,100,0,3000,3000,0,0,69,0,0,0,0,0,0,8,0,0,0,-297.319,-7.321,-152.849,0,"Kernobee - On Script - Move to Position"),
|
||||
(785000,9,7,0,0,0,100,0,2000,2000,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kernobee - On Script - Despawn");
|
||||
|
||||
-- Alarm-a-bomb 2600
|
||||
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=7897;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=7897 AND `source_type`=0;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (789700,789701) AND `source_type`=9;
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(7897,0,0,0,38,0,100,0,1,1,0,0,80,789700,2,0,0,0,0,1,0,0,0,0,0,0,0,"Alarm-a-bomb 2600 - On Data Set - Run Script"),
|
||||
(7897,0,1,0,38,0,100,1,1,1,0,0,29,2,270,0,0,0,0,19,7850,200,0,0,0,0,0,"Alarm-a-bomb 2600 - On Data Set - Start Follow Kernobee"),
|
||||
(7897,0,2,0,38,1,100,1,2,2,0,0,45,1,1,0,0,0,0,19,7850,0,0,0,0,0,0,"Alarm-a-bomb 2600 - On Data Set - Set Data to Kernobee (Phase 1)"),
|
||||
(7897,0,3,0,38,1,100,1,3,3,0,0,80,789701,2,0,0,0,0,1,0,0,0,0,0,0,0,"Alarm-a-bomb 2600 - On Data Set - Run Script (Phase 1)"),
|
||||
(789700,9,0,0,0,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Alarm-a-bomb 2600 - On Script - Set Event Phase 1"),
|
||||
(789700,9,1,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Alarm-a-bomb 2600 - On Script - Say Line 0"),
|
||||
(789700,9,2,0,0,0,100,0,4000,4000,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Alarm-a-bomb 2600 - On Script - Say Line 1"),
|
||||
(789700,9,3,0,0,0,100,0,276000,276000,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Alarm-a-bomb 2600 - On Script - Say Line 2"),
|
||||
(789700,9,4,0,0,0,100,0,6000,6000,0,0,1,4,0,0,0,0,0,19,7850,0,0,0,0,0,0,"Alarm-a-bomb 2600 - On Script - Say Line 4 (Kernobee)"),
|
||||
(789700,9,5,0,0,0,100,0,14000,14000,0,0,11,9874,0,0,0,0,0,1,0,0,0,0,0,0,0,"Alarm-a-bomb 2600 - On Script - Cast 'Self Destruct'"),
|
||||
(789700,9,6,0,0,0,100,0,500,500,0,0,51,0,0,0,0,0,0,19,7850,0,0,0,0,0,0,"Alarm-a-bomb 2600 - On Script - Kill Kernobee"),
|
||||
(789700,9,7,0,0,0,100,0,0,0,0,0,37,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Alarm-a-bomb 2600 - On Script - Kill Self"),
|
||||
(789701,9,0,0,0,0,100,0,0,0,0,0,103,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Alarm-a-bomb 2600 - On Script - Set Rooted On"),
|
||||
(789701,9,1,0,0,0,100,0,0,0,0,0,1,3,0,0,0,0,0,1,0,0,0,0,0,0,0,"Alarm-a-bomb 2600 - On Script - Say Line 3"),
|
||||
(789701,9,2,0,0,0,100,0,12000,12000,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Alarm-a-bomb 2600 - On Script - Despawn");
|
||||
|
||||
-- Areatrigger
|
||||
DELETE FROM `areatrigger_scripts` WHERE `entry`=1105;
|
||||
INSERT INTO `areatrigger_scripts` (`entry`, `ScriptName`) VALUES
|
||||
(1105,"SmartTrigger");
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=1105 AND `source_type`=2;
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(1105,2,0,0,46,0,100,0,1105,0,0,0,45,2,2,0,0,0,0,10,30134,7897,0,0,0,0,0,"Areatrigger - On Trigger - Set Data to Alarm-a-bomb 2600");
|
||||
*/
|
||||
@@ -0,0 +1,3 @@
|
||||
DELETE FROM `command` WHERE `name`='server debug';
|
||||
INSERT INTO `command` (`name`, `permission`, `help`) VALUES
|
||||
('server debug', 872, 'Syntax: .server debug\n\nShows detailed information about server setup, useful when reporting a bug');
|
||||
@@ -0,0 +1,22 @@
|
||||
ALTER TABLE `creature`
|
||||
ADD `phaseUseFlags` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `spawnMask`,
|
||||
ADD `terrainSwapMap` int(11) NOT NULL DEFAULT '-1' AFTER `PhaseGroup`;
|
||||
|
||||
ALTER TABLE `gameobject`
|
||||
ADD `phaseUseFlags` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `spawnMask`,
|
||||
ADD `terrainSwapMap` int(11) NOT NULL DEFAULT '-1' AFTER `PhaseGroup`;
|
||||
|
||||
DROP TABLE `terrain_phase_info`;
|
||||
|
||||
ALTER TABLE `transports` ADD `phaseUseFlags` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `name`;
|
||||
|
||||
DELETE FROM `trinity_string` WHERE `entry` IN (101,178,179,180,181,182,183,184,185);
|
||||
INSERT INTO `trinity_string` (`entry`,`content_default`) VALUES
|
||||
(101,'Map: %u (%s) Zone: %u (%s) Area: %u (%s)\nX: %f Y: %f Z: %f Orientation: %f'),
|
||||
(178,'grid[%u,%u]cell[%u,%u] InstanceID: %u\n ZoneX: %f ZoneY: %f\nGroundZ: %f FloorZ: %f Have height data (Map: %u VMap: %u MMap: %u)'),
|
||||
(179,'PhaseShift:\n* Flags %u, PersonalGuid: %s'),
|
||||
(180,'* Phases: %s'),
|
||||
(181,'* VisibleMapIds: %s'),
|
||||
(182,'* UiWorldMapAreaSwaps: %s'),
|
||||
(183,'Cosmetic'),
|
||||
(184,'Personal');
|
||||
@@ -0,0 +1,2 @@
|
||||
--
|
||||
UPDATE `creature` SET `modelid` = 0 WHERE `id` = 30169;
|
||||
@@ -0,0 +1,15 @@
|
||||
-- Veil Skith: Darkstone of Terokk
|
||||
UPDATE `creature` SET `MovementType`=0, `spawndist`=0 WHERE `guid`=65930;
|
||||
UPDATE `creature_template` SET `InhabitType`=4 WHERE `entry` IN (22288);
|
||||
DELETE FROM `disables` WHERE `sourceType`=0 AND `entry` IN (38729,38736);
|
||||
UPDATE `conditions` SET `SourceGroup`=1 WHERE `SourceEntry` IN (38729) AND `SourceTypeOrReferenceId`=13 AND `ConditionValue2`=185191;
|
||||
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry` IN (38729) AND `ConditionValue2`=22288;
|
||||
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry` IN (38736) AND `ConditionValue1`=185191;
|
||||
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
|
||||
(13,4,38729,0,0, 31,0,3,22288,0,0,0,'',''),
|
||||
(13,1,38736,0,0, 30,0,185191,15,0,0,0,'','');
|
||||
|
||||
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=22288;
|
||||
DELETE FROM `smart_scripts` WHERE (`entryorguid`=22288 AND `source_type`=0);
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(22288, 0, 0, 0, 8, 0, 100, 0, 38729, 0, 5000, 5000, 41, 0, 30, 0, 0, 0, 0, 20, 185191, 5, 0, 0, 0, 0, 0, "Terokk target - on spellhit - despawn gob");
|
||||
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
--
|
||||
DELETE FROM `conditions` WHERE `SourceEntry` IN (28806) AND `SourceTypeOrReferenceId`=13 AND `ConditionValue1`=5;
|
||||
UPDATE `conditions` SET `ConditionValue1`=3, `ConditionValue2`=17066 WHERE `SourceEntry` IN (29172) AND `SourceTypeOrReferenceId`=13;
|
||||
UPDATE `conditions` SET `ConditionValue1`=3, `ConditionValue2`=17066 WHERE `SourceEntry` IN (29531) AND `SourceTypeOrReferenceId`=13;
|
||||
UPDATE `conditions` SET `ConditionValue1`=3, `ConditionValue2`=17066 WHERE `SourceEntry` IN (29831) AND `SourceTypeOrReferenceId`=13;
|
||||
|
||||
DELETE FROM `conditions` WHERE `SourceEntry` IN (30098) AND `SourceTypeOrReferenceId`=17;
|
||||
DELETE FROM `conditions` WHERE `SourceEntry` IN (30098) AND `SourceTypeOrReferenceId`=13;
|
||||
INSERT INTO conditions (SourceTypeOrReferenceId, SourceGroup, SourceEntry, SourceId, ElseGroup, ConditionTypeOrReference, ConditionTarget, ConditionValue1, ConditionValue2, ConditionValue3, NegativeCondition, ErrorType, ErrorTextId, ScriptName, COMMENT) VALUES
|
||||
(13, 2, 30098, 0, 0, 31, 0, 3, 17253, 0, 0, 0, 0, "", ""),
|
||||
(13, 2, 30098, 0, 0, 29, 0, 17233, 20, 0, 1, 0, 0, "", ""),
|
||||
(13, 1, 30098, 0, 0, 31, 0, 5, 182483, 0, 0, 0, 0, "", ""),
|
||||
(13, 4, 30098, 0, 0, 31, 0, 5, 181653, 0, 0, 0, 0, "", "");
|
||||
|
||||
DELETE FROM `conditions` WHERE `SourceEntry` IN (17233) AND `SourceTypeOrReferenceId`=22;
|
||||
INSERT INTO conditions (SourceTypeOrReferenceId, SourceGroup, SourceEntry, SourceId, ElseGroup, ConditionTypeOrReference, ConditionTarget, ConditionValue1, ConditionValue2, ConditionValue3, NegativeCondition, ErrorType, ErrorTextId, ScriptName, COMMENT) VALUES
|
||||
(22, 1, 17233, 0, 0, 6, 0, 67, 0, 0, 1, 0, 0, "", "");
|
||||
|
||||
UPDATE `event_scripts` SET `datalong2`=55000 WHERE `id`=10561;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=17253 AND `source_type`=0 AND `id`=6;
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(17253, 0, 6, 0, 52, 0, 100, 0, 7, 17233, 0, 0, 32, 0, 0, 0, 0, 0, 0, 20, 182483, 20, 0, 0, 0, 0, 0, "Defile Uther's Tomb Trigger - On Text 7 Over - reset gob");
|
||||
UPDATE smart_scripts SET `target_o`=0.2935 WHERE `entryorguid`=17238 AND `source_type`=0 AND `id`=16;
|
||||
UPDATE smart_scripts SET `target_type`=21, `target_param1`=50 WHERE `entryorguid`=1723801 AND `source_type`=9 AND `id`=1;
|
||||
*/
|
||||
@@ -0,0 +1,7 @@
|
||||
--
|
||||
DELETE FROM `gameobject_template` WHERE `entry`=300077;
|
||||
DELETE FROM `gameobject_template_addon` WHERE `entry`=300077;
|
||||
UPDATE `gameobject` SET `id`=182140 WHERE `guid`=99918 AND `id`=300077;
|
||||
UPDATE `gameobject` SET `id`=182141 WHERE `guid`=99919 AND `id`=300077;
|
||||
UPDATE `gameobject` SET `id`=182142 WHERE `guid`=99920 AND `id`=300077;
|
||||
UPDATE `gameobject` SET `id`=182143 WHERE `guid`=99921 AND `id`=300077;
|
||||
@@ -0,0 +1,85 @@
|
||||
--
|
||||
DELETE FROM `creature` WHERE id=18109;
|
||||
UPDATE `conditions` SET `SourceGroup`=2 WHERE `SourceEntry` IN (31927) AND `SourceTypeOrReferenceId`=13;
|
||||
|
||||
-- Windyreed Quest Credit (Hut 01) SAI
|
||||
SET @ENTRY := 18142;
|
||||
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
|
||||
SET @SPELL_LIVING_FIRE := 31927; -- Living Fire
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@ENTRY) AND `source_type`=0;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@ENTRY*100) AND `source_type`=9;
|
||||
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
|
||||
(@ENTRY,0,0,0,8,0,100,0,@SPELL_LIVING_FIRE,0,20000,20000,80,@ENTRY*100,0,0,0,0,0,1,0,0,0,0,0,0,0,"Windyreed Quest Credit - On Spellhit - Run Script"),
|
||||
(@ENTRY*100,9,0,0,0,0,100,0,0,0,0,0,11,31928,0,0,0,0,0,1,0,0,0,0,0,0,0,"Windyreed Quest Credit - Script - cast Living Fire"),
|
||||
(@ENTRY*100,9,1,0,0,0,100,0,0,0,0,0,33,@ENTRY,0,0,0,0,0,7,0,0,0,0,0,0,0,"Windyreed Quest Credit - Script - credit kill"),
|
||||
(@ENTRY*100,9,2,0,0,0,100,0,7000,7000,0,0,50,182146,20,0,0,0,0,8,0,0,0,-1850.186401,6378.753906,49.132702,0,"Windyreed Quest Credit - Script - Summon Hut Fire (Large)"),
|
||||
(@ENTRY*100,9,3,0,0,0,100,0,0,0,0,0,50,182146,20,0,0,0,0,8,0,0,0,-1843.883911,6373.384277,46.005417,0,"Windyreed Quest Credit - Script - Summon Hut Fire (Large)"),
|
||||
(@ENTRY*100,9,4,0,0,0,100,0,0,0,0,0,50,182146,20,0,0,0,0,8,0,0,0,-1845.056030,6383.819336,56.662624,0,"Windyreed Quest Credit - Script - Summon Hut Fire (Large)"),
|
||||
(@ENTRY*100,9,5,0,0,0,100,0,0,0,0,0,50,182146,20,0,0,0,0,8,0,0,0,-1845.103638,6391.827148,53.700901,0,"Windyreed Quest Credit - Script - Summon Hut Fire (Large)"),
|
||||
(@ENTRY*100,9,6,0,0,0,100,0,0,0,0,0,50,182146,20,0,0,0,0,8,0,0,0,-1831.184937,6391.026855,45.671902,0,"Windyreed Quest Credit - Script - Summon Hut Fire (Large)"),
|
||||
(@ENTRY*100,9,7,0,0,0,100,0,2000,2000,0,0,51,0,0,0,0,0,0,10,60165,17139,0,0,0,0,0,"Windyreed Quest Credit - Script - Kill Creature Inside Burning Hut");
|
||||
|
||||
-- Windyreed Quest Credit (Hut 02) SAI
|
||||
SET @ENTRY := 18143;
|
||||
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
|
||||
SET @SPELL_LIVING_FIRE := 31927; -- Living Fire
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@ENTRY) AND `source_type`=0;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@ENTRY*100) AND `source_type`=9;
|
||||
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
|
||||
(@ENTRY,0,0,0,8,0,100,0,@SPELL_LIVING_FIRE,0,20000,20000,80,@ENTRY*100,0,0,0,0,0,1,0,0,0,0,0,0,0,"Windyreed Quest Credit - On Spellhit - Run Script"),
|
||||
(@ENTRY*100,9,0,0,0,0,100,0,0,0,0,0,11,31928,0,0,0,0,0,1,0,0,0,0,0,0,0,"Windyreed Quest Credit - Script - cast Living Fire"),
|
||||
(@ENTRY*100,9,1,0,0,0,100,0,0,0,0,0,33,@ENTRY,0,0,0,0,0,7,0,0,0,0,0,0,0,"Windyreed Quest Credit - Script - credit kill"),
|
||||
(@ENTRY*100,9,2,0,0,0,100,0,7000,7000,0,0,50,182146,20,0,0,0,0,8,0,0,0,-1915.344116,6350.488770,52.229897,0,"Windyreed Quest Credit - Script - Summon Hut Fire (Large)"),
|
||||
(@ENTRY*100,9,3,0,0,0,100,0,0,0,0,0,50,182146,20,0,0,0,0,8,0,0,0,-1907.135986,6353.901367,48.899532,0,"Windyreed Quest Credit - Script - Summon Hut Fire (Large)"),
|
||||
(@ENTRY*100,9,4,0,0,0,100,0,0,0,0,0,50,182146,20,0,0,0,0,8,0,0,0,-1911.698730,6354.161133,58.254566,0,"Windyreed Quest Credit - Script - Summon Hut Fire (Large)"),
|
||||
(@ENTRY*100,9,5,0,0,0,100,0,0,0,0,0,50,182146,20,0,0,0,0,8,0,0,0,-1926.308350,6360.901855,57.298611,0,"Windyreed Quest Credit - Script - Summon Hut Fire (Large)"),
|
||||
(@ENTRY*100,9,6,0,0,0,100,0,0,0,0,0,50,182146,20,0,0,0,0,8,0,0,0,-1921.458862,6367.373047,59.892593,0,"Windyreed Quest Credit - Script - Summon Hut Fire (Large)"),
|
||||
(@ENTRY*100,9,7,0,0,0,100,0,2000,2000,0,0,51,0,0,0,0,0,0,10,60159,17139,0,0,0,0,0,"Windyreed Quest Credit - Script - Kill Creature Inside Burning Hut");
|
||||
|
||||
-- Windyreed Quest Credit (Hut 03) SAI
|
||||
SET @ENTRY := 18144;
|
||||
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
|
||||
SET @SPELL_LIVING_FIRE := 31927; -- Living Fire
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@ENTRY) AND `source_type`=0;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@ENTRY*100) AND `source_type`=9;
|
||||
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
|
||||
(@ENTRY,0,0,0,8,0,100,0,@SPELL_LIVING_FIRE,0,20000,20000,80,@ENTRY*100,0,0,0,0,0,1,0,0,0,0,0,0,0,"Windyreed Quest Credit - On Spellhit - Run Script"),
|
||||
(@ENTRY*100,9,0,0,0,0,100,0,0,0,0,0,11,31928,0,0,0,0,0,1,0,0,0,0,0,0,0,"Windyreed Quest Credit - Script - cast Living Fire"),
|
||||
(@ENTRY*100,9,1,0,0,0,100,0,0,0,0,0,33,@ENTRY,0,0,0,0,0,7,0,0,0,0,0,0,0,"Windyreed Quest Credit - Script - credit kill"),
|
||||
(@ENTRY*100,9,2,0,0,0,100,0,7000,7000,0,0,50,182146,20,0,0,0,0,8,0,0,0,-1969.078369,6278.307129,56.866646,0,"Windyreed Quest Credit - Script - Summon Hut Fire (Large)"),
|
||||
(@ENTRY*100,9,3,0,0,0,100,0,0,0,0,0,50,182146,20,0,0,0,0,8,0,0,0,-1977.147461,6277.312988,59.912029,0,"Windyreed Quest Credit - Script - Summon Hut Fire (Large)"),
|
||||
(@ENTRY*100,9,5,0,0,0,100,0,0,0,0,0,50,182146,20,0,0,0,0,8,0,0,0,-1974.763306,6269.175781,51.401920,0,"Windyreed Quest Credit - Script - Summon Hut Fire (Large)"),
|
||||
(@ENTRY*100,9,6,0,0,0,100,0,0,0,0,0,50,182146,20,0,0,0,0,8,0,0,0,-1970.424805,6273.501953,61.741539,0,"Windyreed Quest Credit - Script - Summon Hut Fire (Large)"),
|
||||
(@ENTRY*100,9,7,0,0,0,100,0,2000,2000,0,0,51,0,0,0,0,0,0,10,60157,17139,0,0,0,0,0,"Windyreed Quest Credit - Script - Kill Creature Inside Burning Hut");
|
||||
|
||||
-- Windyreed Quest Credit (Big Hut) SAI
|
||||
SET @ENTRY := 18110;
|
||||
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
|
||||
SET @SPELL_LIVING_FIRE := 31927; -- Living Fire
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@ENTRY) AND `source_type`=0;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@ENTRY*100) AND `source_type`=9;
|
||||
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
|
||||
(@ENTRY,0,0,0,8,0,100,0,@SPELL_LIVING_FIRE,0,20000,20000,80,@ENTRY*100,0,0,0,0,0,1,0,0,0,0,0,0,0,"Windyreed Quest Credit - On Spellhit - Run Script"),
|
||||
(@ENTRY*100,9,0,0,0,0,100,0,0,0,0,0,11,31928,0,0,0,0,0,1,0,0,0,0,0,0,0,"Windyreed Quest Credit - Script - cast Living Fire"),
|
||||
(@ENTRY*100,9,1,0,0,0,100,0,0,0,0,0,33,@ENTRY,0,0,0,0,0,7,0,0,0,0,0,0,0,"Windyreed Quest Credit - Script - credit kill"),
|
||||
(@ENTRY*100,9,2,0,0,0,100,0,7000,7000,0,0,50,182146,20,0,0,0,0,8,0,0,0,-1816.939941,6283.669922,61.357101,0,"Windyreed Quest Credit - Script - Summon Hut Fire (Large)"),
|
||||
(@ENTRY*100,9,3,0,0,0,100,0,0,0,0,0,50,182146,20,0,0,0,0,8,0,0,0,-1816.94,6283.67,61.3571,0,"Windyreed Quest Credit - Script - Summon Hut Fire (Large)"),
|
||||
(@ENTRY*100,9,4,0,0,0,100,0,0,0,0,0,50,182146,20,0,0,0,0,8,0,0,0,-1819.71,6305.89,63.4012,0,"Windyreed Quest Credit - Script - Summon Hut Fire (Large)"),
|
||||
(@ENTRY*100,9,5,0,0,0,100,0,0,0,0,0,50,182146,20,0,0,0,0,8,0,0,0,-1819.55,6298.08,73.4331,0,"Windyreed Quest Credit - Script - Summon Hut Fire (Large)"),
|
||||
(@ENTRY*100,9,6,0,0,0,100,0,0,0,0,0,50,182146,20,0,0,0,0,8,0,0,0,-1801.45,6308.03,59.2728,0,"Windyreed Quest Credit - Script - Summon Hut Fire (Large)"),
|
||||
(@ENTRY*100,9,7,0,0,0,100,0,0,0,0,0,50,182146,20,0,0,0,0,8,0,0,0,-1808.88,6307.05,72.4877,0,"Windyreed Quest Credit - Script - Summon Hut Fire (Large)"),
|
||||
(@ENTRY*100,9,8,0,0,0,100,0,0,0,0,0,50,182146,20,0,0,0,0,8,0,0,0,-1794.54,6300.6,71.2263,0,"Windyreed Quest Credit - Script - Summon Hut Fire (Large)"),
|
||||
(@ENTRY*100,9,9,0,0,0,100,0,2000,2000,0,0,51,0,0,0,0,0,0,10,60166,17139,0,0,0,0,0,"Windyreed Quest Credit - Script - Kill Creatures Inside Burning Hut"),
|
||||
(@ENTRY*100,9,10,0,0,0,100,0,0,0,0,0,51,0,0,0,0,0,0,10,60167,17139,0,0,0,0,0,"Windyreed Quest Credit - Script - Kill Creatures Inside Burning Hut");
|
||||
|
||||
SET @ENTRY := 18109;
|
||||
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@ENTRY) AND `source_type`=0;
|
||||
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
|
||||
(@ENTRY,0,0,1,54,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Living Fire - just summoned - Say text"),
|
||||
(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,89,7,0,0,0,0,0,1,0,0,0,0,0,0,0,"Living Fire - just summoned - start random movement"),
|
||||
(@ENTRY,0,2,0,1,0,100,1,20000,20000,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Living Fire - ooc - despawn");
|
||||
|
||||
DELETE FROM `creature_text` WHERE `CreatureID`=@ENTRY;
|
||||
INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
|
||||
(@ENTRY,0,0,"Burn! Burn! Burn!",12,12,100,0,0,0,14778,0,"Living Fire");
|
||||
@@ -0,0 +1,4 @@
|
||||
DELETE FROM `conditions` WHERE `SourceEntry` IN (34387) AND `SourceTypeOrReferenceId`=13;
|
||||
INSERT INTO conditions (SourceTypeOrReferenceId, SourceGroup, SourceEntry, SourceId, ElseGroup, ConditionTypeOrReference, ConditionTarget, ConditionValue1, ConditionValue2, ConditionValue3, NegativeCondition, ErrorType, ErrorTextId, ScriptName, COMMENT) VALUES
|
||||
(13, 2, 34387, 0, 0, 31, 0, 3, 19652, 0, 0, 0, 0, "", ""),
|
||||
(13, 2, 34387, 0, 1, 31, 0, 3, 19717, 0, 0, 0, 0, "", "");
|
||||
@@ -0,0 +1,18 @@
|
||||
--
|
||||
DELETE FROM `conditions` WHERE `SourceEntry` IN (36460) AND `SourceTypeOrReferenceId`=13;
|
||||
INSERT INTO conditions (SourceTypeOrReferenceId, SourceGroup, SourceEntry, SourceId, ElseGroup, ConditionTypeOrReference, ConditionTarget, ConditionValue1, ConditionValue2, ConditionValue3, NegativeCondition, ErrorType, ErrorTextId, ScriptName, COMMENT) VALUES
|
||||
(13, 4, 36460, 0, 0, 31, 0, 3, 21262, 0, 0, 0, 0, "", "");
|
||||
|
||||
SET @ENTRY := 21262;
|
||||
UPDATE `creature_template` SET `AIName`='SmartAI', `flags_extra`=130 WHERE `entry`=@ENTRY;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@ENTRY) AND `source_type`=0;
|
||||
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
|
||||
(@ENTRY,0,0,1,8,0,100,0,36460,0,5000,5000,11,34815,0,0,0,0,0,1,0,0,0,0,0,0,0,"Equipement trigger - On Spellhit - Cast spell"),
|
||||
(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,41,0,0,0,0,0,0,20,183808,5,0,0,0,0,0,"Equipement trigger - On Spellhit - despawn gob"),
|
||||
(@ENTRY,0,2,3,61,0,100,0,0,0,0,0,41,0,0,0,0,0,0,20,183807,5,0,0,0,0,0,"Equipement trigger - On Spellhit - despawn gob"),
|
||||
(@ENTRY,0,3,4,61,0,100,0,0,0,0,0,41,0,0,0,0,0,0,20,183806,5,0,0,0,0,0,"Equipement trigger - On Spellhit - despawn gob"),
|
||||
(@ENTRY,0,4,0,61,0,100,0,0,0,0,0,41,0,0,0,0,0,0,20,183805,5,0,0,0,0,0,"Equipement trigger - On Spellhit - despawn gob");
|
||||
|
||||
DELETE FROM `disables` WHERE `sourceType`=0 AND `entry` IN (36460);
|
||||
INSERT INTO `disables`(`sourceType`,`entry`,`flags`,`comment`) VALUES
|
||||
(0,36460,64,'Ignore LOS');
|
||||
@@ -0,0 +1,14 @@
|
||||
--
|
||||
DELETE FROM `conditions` WHERE `SourceEntry` IN (38250) AND `SourceTypeOrReferenceId`=13;
|
||||
INSERT INTO conditions (SourceTypeOrReferenceId, SourceGroup, SourceEntry, SourceId, ElseGroup, ConditionTypeOrReference, ConditionTarget, ConditionValue1, ConditionValue2, ConditionValue3, NegativeCondition, ErrorType, ErrorTextId, ScriptName, COMMENT) VALUES
|
||||
(13, 1, 38250, 0, 0, 31, 0, 3, 22058, 0, 0, 0, 0, "", "");
|
||||
|
||||
SET @ENTRY := 22061;
|
||||
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@ENTRY) AND `source_type`=0;
|
||||
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
|
||||
(@ENTRY,0,0,0,25,0,100,0,0,0,0,0,11,38250,0,0,0,0,0,19,22058,0,0,0,0,0,0,"Shadowmoon Soulstealer - On reset - Cast spell");
|
||||
|
||||
UPDATE `creature_template_addon` SET `auras`='38376' WHERE `entry` IN (22058);
|
||||
UPDATE `creature_template_addon` SET `emote`=468, `auras`='38442' WHERE `entry` IN (22081);
|
||||
DELETE FROM `creature_addon` WHERE `guid` IN (77374, 77375, 77376, 77379, 77380, 77381, 77382, 77383, 77384, 77387, 77389, 77390, 77391, 77392, 77393, 77394);
|
||||
@@ -0,0 +1,2 @@
|
||||
--
|
||||
UPDATE `conditions` SET `ConditionValue1`=3, `ConditionValue2`=22356 WHERE `SourceEntry` IN (38629) AND `SourceTypeOrReferenceId`=13 AND `SourceGroup`=1 AND `ElseGroup`=0;
|
||||
@@ -0,0 +1,3 @@
|
||||
--
|
||||
UPDATE `conditions` SET `ConditionValue1`=3, `ConditionValue2`=22395 WHERE `SourceEntry` IN (39124) AND `SourceTypeOrReferenceId`=13 AND `SourceGroup`=1;
|
||||
UPDATE `creature` SET `position_x`=-4543.57177, `position_y`=1022.8920, `position_z`=9.817793, `orientation`=3.930219 WHERE `id`=21797;
|
||||
@@ -0,0 +1,2 @@
|
||||
--
|
||||
UPDATE `conditions` SET `ConditionValue1`=3, `ConditionValue2`=23037 WHERE `SourceEntry` IN (39974) AND `SourceTypeOrReferenceId`=13 AND `SourceGroup`=1;
|
||||
@@ -0,0 +1,5 @@
|
||||
--
|
||||
DELETE FROM `creature` WHERE `guid`=64984;
|
||||
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `ScriptName`, `VerifiedBuild`) VALUES
|
||||
(64984,23746,530,0,0,1,1,0,0,6718.222656, -7594.638672, 126.092712,0.413325,7200,0,0,0,0,0,0,0,0,"",0);
|
||||
UPDATE `conditions` SET `ConditionValue1`=3, `ConditionValue2`=23746, `ConditionValue3`=64984 WHERE `SourceEntry` IN (42391) AND `SourceTypeOrReferenceId`=13;
|
||||
@@ -0,0 +1,5 @@
|
||||
--
|
||||
DELETE FROM `creature` WHERE `guid`=64985;
|
||||
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `ScriptName`, `VerifiedBuild`) VALUES
|
||||
(64985,25114,530,0,0,1,1,0,0,12664.64160,-6986.25,15.608,1.622840,7200,0,0,0,0,0,0,0,0,"",0);
|
||||
UPDATE `conditions` SET `ConditionValue1`=3, `ConditionValue2`=25114 WHERE `SourceEntry` IN (45149) AND `SourceTypeOrReferenceId`=13;
|
||||
@@ -0,0 +1,3 @@
|
||||
--
|
||||
UPDATE `conditions` SET `ConditionValue1`=4, `ConditionValue2`=0 WHERE `SourceEntry` IN (45368,45371) AND `SourceTypeOrReferenceId`=13;
|
||||
UPDATE `conditions` SET `ConditionValue1`=3, `ConditionValue2`=17066 WHERE `SourceEntry` IN (46852,46896) AND `SourceTypeOrReferenceId`=13;
|
||||
@@ -0,0 +1,2 @@
|
||||
--
|
||||
UPDATE `creature_addon` SET `bytes1`=33554432 WHERE `guid`= 128739;
|
||||
@@ -0,0 +1,15 @@
|
||||
--
|
||||
DELETE FROM `conditions` WHERE `SourceEntry` IN (50790,50791,50802,50803,50825,50826) AND `SourceTypeOrReferenceId`=13;
|
||||
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
|
||||
(13, 1, 50790, 0, 0, 31, 0, 3, 22515, 0, 0, 0, 0, "", ""),
|
||||
(13, 1, 50791, 0, 0, 31, 0, 3, 22515, 0, 0, 0, 0, "", ""),
|
||||
(13, 2, 50790, 0, 0, 31, 0, 5, 192163, 0, 0, 0, 0, "", ""),
|
||||
(13, 2, 50791, 0, 0, 31, 0, 5, 192164, 0, 0, 0, 0, "", ""),
|
||||
(13, 1, 50802, 0, 0, 31, 0, 3, 22515, 0, 0, 0, 0, "", ""),
|
||||
(13, 1, 50803, 0, 0, 31, 0, 3, 22515, 0, 0, 0, 0, "", ""),
|
||||
(13, 2, 50802, 0, 0, 31, 0, 5, 192163, 0, 0, 0, 0, "", ""),
|
||||
(13, 2, 50803, 0, 0, 31, 0, 5, 192164, 0, 0, 0, 0, "", ""),
|
||||
(13, 1, 50825, 0, 0, 31, 0, 3, 22515, 0, 0, 0, 0, "", ""),
|
||||
(13, 1, 50826, 0, 0, 31, 0, 3, 22515, 0, 0, 0, 0, "", ""),
|
||||
(13, 2, 50825, 0, 0, 31, 0, 5, 192163, 0, 0, 0, 0, "", ""),
|
||||
(13, 2, 50826, 0, 0, 31, 0, 5, 192164, 0, 0, 0, 0, "", "");
|
||||
@@ -0,0 +1,3 @@
|
||||
--
|
||||
DELETE FROM `conditions` WHERE SourceEntry IN (44608) AND `SourceTypeOrReferenceId`=13;
|
||||
UPDATE `conditions` SET `SourceGroup`=1 WHERE `SourceEntry` IN (44213,43986) AND `SourceTypeOrReferenceId`=13;
|
||||
@@ -0,0 +1,69 @@
|
||||
--
|
||||
-- Shadowlord Deathwail
|
||||
UPDATE `creature_addon` SET `mount`=20684 WHERE `guid`=77084; -- Fix mount
|
||||
|
||||
/*
|
||||
DELETE FROM `creature_template_movement` WHERE `CreatureId`=22006; -- Fix inhabit type
|
||||
INSERT INTO `creature_template_movement` (`CreatureId`, `Ground`, `Swim`, `Flight`, `Rooted`) VALUES
|
||||
(22006,1,1,2,0);
|
||||
*/
|
||||
|
||||
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=22006;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=22006 AND `source_type`=0;
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(22006,0,0,0,6,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Shadowlord Deathwail - On Just Died - Say Line 0"),
|
||||
(22006,0,1,0,0,0,100,0,0,0,3000,5000,11,12471,64,0,0,0,0,2,0,0,0,0,0,0,0,"Shadowlord Deathwail - In Combat - Cast 'Shadow Bolt'"),
|
||||
(22006,0,2,0,0,0,100,0,5000,7000,15000,17000,11,15245,0,0,0,0,0,1,0,0,0,0,0,0,0,"Shadowlord Deathwail - In Combat - Cast 'Shadow Bolt Volley'"),
|
||||
(22006,0,3,0,0,0,100,0,9000,12000,18000,24000,11,32709,0,0,0,0,0,5,0,0,0,0,0,0,0,"Shadowlord Deathwail - In Combat - Cast 'Death Coil'"),
|
||||
(22006,0,4,0,0,0,100,0,14000,17000,22000,28000,11,27641,0,0,0,0,0,5,0,0,0,0,0,0,0,"Shadowlord Deathwail - In Combat - Cast 'Fear'");
|
||||
|
||||
DELETE FROM `creature_text` WHERE `CreatureID`=22006;
|
||||
INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
|
||||
(22006,0,0,"Master... I've failed you...",14,0,100,0,0,0,19820,0,"Shadowlord Deathwail");
|
||||
|
||||
-- Shadowmoon Soulstealer
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=22061 AND `source_type`=0 AND `id` IN (1,2);
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(22061,0,1,0,25,0,100,0,0,0,0,0,8,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Shadowmoon Soulstealer - On Reset - Set Reactstate Passive"),
|
||||
(22061,0,2,0,4,0,100,0,0,0,0,0,11,38250,0,0,0,0,0,19,22058,0,0,0,0,0,0,"Shadowmoon Soulstealer - On Aggro - Cast 'Heart of Fury Siphon'");
|
||||
|
||||
-- Shadowmoon Darkweaver
|
||||
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=22081;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=22081 AND `source_type`=0;
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(22081,0,0,0,0,0,100,0,0,0,3000,5000,11,9613,64,0,0,0,0,2,0,0,0,0,0,0,0,"Shadowmoon Darkweaver - In Combat - Cast 'Shadow Bolt'"),
|
||||
(22081,0,1,0,9,0,100,0,0,30,15000,18000,11,11962,0,0,0,0,0,2,0,0,0,0,0,0,0,"Shadowmoon Darkweaver - Within 0-30 Range - Cast 'Immolate'"),
|
||||
(22081,0,2,0,9,0,100,0,0,10,8000,11000,11,35373,0,0,0,0,0,1,0,0,0,0,0,0,0,"Shadowmoon Darkweaver - Within 0-10 Range - Cast 'Shadowfury'");
|
||||
|
||||
-- Shadowmoon Chosen
|
||||
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=22084;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=22084 AND `source_type`=0;
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(22084,0,0,0,9,0,100,0,0,5,15000,17000,11,38618,0,0,0,0,0,1,0,0,0,0,0,0,0,"Shadowmoon Chosen - Within 0-5 Range - Cast 'Whirlwind'"),
|
||||
(22084,0,1,0,0,0,100,0,8000,10000,18000,22000,11,10966,0,0,0,0,0,2,0,0,0,0,0,0,0,"Shadowmoon Chosen - In Combat - Cast 'Uppercut'");
|
||||
|
||||
-- Shadowmoon Slayer
|
||||
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=22082;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=22082 AND `source_type`=0;
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(22082,0,0,1,2,0,100,1,0,30,0,0,11,3019,0,0,0,0,0,1,0,0,0,0,0,0,0,"Shadowmoon Slayer - Between 0-30% Health - Cast 'Frenzy'"),
|
||||
(22082,0,1,0,61,0,100,1,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Shadowmoon Slayer - Between 0-30% Health - Say Line 0"),
|
||||
(22082,0,2,0,0,0,100,0,5000,7000,12000,15000,11,37577,0,0,0,0,0,2,0,0,0,0,0,0,0,"Shadowmoon Slayer - In Combat - Cast 'Debilitating Strike'");
|
||||
|
||||
DELETE FROM `creature_text` WHERE `CreatureID`=22082;
|
||||
INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
|
||||
(22082,0,0,"%s goes into a frenzy!",16,0,100,0,0,0,2384,0,"Shadowmoon Slayer");
|
||||
|
||||
-- Shadowsworn Drakonid
|
||||
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=22072;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=22072 AND `source_type`=0;
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(22072,0,0,0,0,0,100,0,5000,7000,11000,13000,11,15496,0,0,0,0,0,2,0,0,0,0,0,0,0,"Shadowsworn Drakonid - In Combat - Cast 'Cleave'"),
|
||||
(22072,0,1,0,0,0,100,0,6000,8000,14000,16000,11,17547,0,0,0,0,0,2,0,0,0,0,0,0,0,"Shadowsworn Drakonid - In Combat - Cast 'Mortal Strike'"),
|
||||
(22072,0,2,0,0,0,100,0,9000,11000,18000,22000,11,16145,0,0,0,0,0,2,0,0,0,0,0,0,0,"Shadowsworn Drakonid - In Combat - Cast 'Sunder Armor'");
|
||||
|
||||
-- Shadowmoon Retainer
|
||||
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=22102;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=22102 AND `source_type`=0;
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(22102,0,0,0,0,0,100,0,0,0,2000,4000,11,15547,64,0,0,0,0,2,0,0,0,0,0,0,0,"Shadowmoon Retainer - In Combat - Cast 'Shoot'");
|
||||
@@ -0,0 +1,2 @@
|
||||
-- Ashtongue Deathsworn
|
||||
UPDATE `smart_scripts` SET `event_type`=54, `comment`="Ashtongue Deathsworn - On Just Summoned - Start Waypoint" WHERE `entryorguid`=21701 AND `source_type`=0 AND `id`=0;
|
||||
@@ -0,0 +1,3 @@
|
||||
--
|
||||
DELETE FROM `gameobject_template_addon` WHERE `entry` BETWEEN 300010 AND 300205;
|
||||
DELETE FROM `gameobject_template` WHERE `entry` BETWEEN 300010 AND 300205;
|
||||
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
-- Rhapsody Shindigger
|
||||
DELETE FROM `creature_text` WHERE `CreatureID`=5634;
|
||||
INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
|
||||
(5634,0,0,"Time to brew up a Kalimdor Kocktail! Hiccup!",12,7,100,4,0,0,1950,0,"Rhapsody Shindigger"),
|
||||
(5634,1,0,"That should do it! Hiccup!",12,7,100,0,0,0,1951,0,"Rhapsody Shindigger"),
|
||||
(5634,2,0,"%s chugs his drink.",16,0,100,92,0,0,1952,0,"Rhapsody Shindigger"),
|
||||
(5634,3,0,"Hiccup!",12,7,100,34,0,0,1953,0,"Rhapsody Shindigger"),
|
||||
(5634,4,0,"Ok, who pushed me down? Was it you, $n? Someone turn the lights back on. Hiccup!",12,7,100,6,0,0,1954,0,"Rhapsody Shindigger"),
|
||||
(5634,5,0,"One more sip of the ol' fire water and I'll be ready to talk. Hiccup! Cheers!",12,7,100,1,0,0,1955,0,"Rhapsody Shindigger"),
|
||||
(5634,6,0,"So, $n, I'm ready to tell you what happened in the Swamp of Sorrows. Hiccup!",12,7,100,1,0,0,1956,0,"Rhapsody Shindigger");
|
||||
|
||||
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=5634;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=5634 AND `source_type`=0;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=563400 AND `source_type`=9;
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(5634,0,0,0,20,0,100,0,1452,0,0,0,80,563400,0,0,0,0,0,1,0,0,0,0,0,0,0,"Rhapsody Shindigger - On Quest 'Rhapsody's Kalimdor Kocktail' Finished - Run Script"),
|
||||
(563400,9,0,0,0,0,100,0,0,0,0,0,83,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Rhapsody Shindigger - On Script - Remove Npc Flag Questgiver"),
|
||||
(563400,9,1,0,0,0,100,0,0,0,0,0,17,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Rhapsody Shindigger - On Script - Set Emote State 0"),
|
||||
(563400,9,2,0,0,0,100,0,1000,1000,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Rhapsody Shindigger - On Script - Say Line 0"),
|
||||
(563400,9,3,0,0,0,100,0,3000,3000,0,0,5,33,0,0,0,0,0,1,0,0,0,0,0,0,0,"Rhapsody Shindigger - On Script - Play Emote 33"),
|
||||
(563400,9,4,0,0,0,100,0,2000,2000,0,0,17,133,0,0,0,0,0,1,0,0,0,0,0,0,0,"Rhapsody Shindigger - On Script - Set Emote State 133"),
|
||||
(563400,9,5,0,0,0,100,0,8000,8000,0,0,17,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Rhapsody Shindigger - On Script - Set Emote State 0"),
|
||||
(563400,9,6,0,0,0,100,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Rhapsody Shindigger - On Script - Say Line 1"),
|
||||
(563400,9,7,0,0,0,100,0,3000,3000,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Rhapsody Shindigger - On Script - Say Line 2"),
|
||||
(563400,9,8,0,0,0,100,0,3000,3000,0,0,1,3,0,0,0,0,0,1,0,0,0,0,0,0,0,"Rhapsody Shindigger - On Script - Say Line 3"),
|
||||
(563400,9,9,0,0,0,100,0,2000,2000,0,0,1,4,0,0,0,0,0,1,0,0,0,0,0,0,0,"Rhapsody Shindigger - On Script - Say Line 4"),
|
||||
(563400,9,10,0,0,0,100,0,3500,3500,0,0,5,33,0,0,0,0,0,1,0,0,0,0,0,0,0,"Rhapsody Shindigger - On Script - Play Emote 33"),
|
||||
(563400,9,11,0,0,0,100,0,1500,1500,0,0,1,5,0,0,0,0,0,1,0,0,0,0,0,0,0,"Rhapsody Shindigger - On Script - Say Line 5"),
|
||||
(563400,9,12,0,0,0,100,0,4500,4500,0,0,5,92,0,0,0,0,0,1,0,0,0,0,0,0,0,"Rhapsody Shindigger - On Script - Play Emote 92"),
|
||||
(563400,9,13,0,0,0,100,0,3000,3000,0,0,5,34,0,0,0,0,0,1,0,0,0,0,0,0,0,"Rhapsody Shindigger - On Script - Play Emote 34"),
|
||||
(563400,9,14,0,0,0,100,0,2000,2000,0,0,1,6,0,0,0,0,0,1,0,0,0,0,0,0,0,"Rhapsody Shindigger - On Script - Say Line 6"),
|
||||
(563400,9,15,0,0,0,100,0,3000,3500,0,0,5,33,0,0,0,0,0,1,0,0,0,0,0,0,0,"Rhapsody Shindigger - On Script - Play Emote 33"),
|
||||
(563400,9,16,0,0,0,100,0,2000,2000,0,0,17,93,0,0,0,0,0,1,0,0,0,0,0,0,0,"Rhapsody Shindigger - On Script - Set Emote State 93"),
|
||||
(563400,9,17,0,0,0,100,0,0,0,0,0,82,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Rhapsody Shindigger - On Script - Add Npc Flag Questgiver");
|
||||
*/
|
||||
@@ -0,0 +1,144 @@
|
||||
/*
|
||||
-- Quest "The Prodigal Lich Returns"
|
||||
UPDATE `creature_template` SET `speed_walk`=1 WHERE `entry`=5666;
|
||||
|
||||
UPDATE `creature_text` SET `Emote`=0 WHERE `CreatureID`=1498 AND `GroupID`=0;
|
||||
UPDATE `creature_text` SET `Emote`=2 WHERE `CreatureID`=5666 AND `GroupID` IN (0,2);
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (149800,566600) AND `source_type`=9;
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(149800,9,0,0,0,0,100,0,0,0,0,0,83,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Bethor Iceshard - On Script - Remove Npc Flag Questgiver"),
|
||||
(149800,9,1,0,0,0,100,0,0,0,0,0,64,1,0,0,0,0,0,7,0,0,0,0,0,0,0,"Bethor Iceshard - On Script - Store Targetlist"),
|
||||
(149800,9,2,0,0,0,100,0,0,0,0,0,11,7762,0,0,0,0,0,1,0,0,0,0,0,0,0,"Bethor Iceshard - On Script - Cast 'Summon Gunther's Visage'"),
|
||||
(149800,9,3,0,0,0,100,0,2000,2000,0,0,12,5666,1,21000,0,0,0,8,0,0,0,1765.81,57.0857,-46.3189,1.591,"Bethor Iceshard - On Script - Summon Creature 'Gunther's Visage'"),
|
||||
(149800,9,4,0,0,0,100,0,0,0,0,0,100,1,0,0,0,0,0,19,5666,0,0,0,0,0,0,"Bethor Iceshard - On Script - Send Targetlist to 'Guther's Visage'"),
|
||||
(149800,9,5,0,0,0,100,0,3000,3000,0,0,66,0,0,0,0,0,0,19,5666,0,0,0,0,0,0,"Bethor Iceshard - On Script - Set Orientation"),
|
||||
(149800,9,6,0,0,0,100,0,18000,18000,0,0,66,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Bethor Iceshard - On Script - Set Orientation"),
|
||||
(149800,9,7,0,0,0,100,0,0,0,0,0,82,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Bethor Iceshard - On Script - Add Npc Flag Questgiver"),
|
||||
(566600,9,0,0,0,0,100,0,0,0,0,0,53,0,5666,0,0,0,0,1,0,0,0,0,0,0,0,"Gunther's Visage - On Script - Start Waypoint"),
|
||||
(566600,9,1,0,0,0,100,0,4000,4000,0,0,1,0,0,0,0,0,0,12,1,0,0,0,0,0,0,"Gunther's Visage - On Script - Say Line 0"),
|
||||
(566600,9,2,0,0,0,100,0,4000,4000,0,0,1,1,0,0,0,0,0,12,1,0,0,0,0,0,0,"Gunther's Visage - On Script - Say Line 1"),
|
||||
(566600,9,3,0,0,0,100,0,5000,5000,0,0,66,0,0,0,0,0,0,12,1,0,0,0,0,0,0,"Gunther's Visage - On Script - Set Orientation"),
|
||||
(566600,9,4,0,0,0,100,0,0,0,0,0,1,2,0,0,0,0,0,12,1,0,0,0,0,0,0,"Gunther's Visage - On Script - Say Line 2"),
|
||||
(566600,9,5,0,0,0,100,0,5000,5000,0,0,1,0,0,0,0,0,0,19,1498,0,0,0,0,0,0,"Gunther's Visage - On Script - Say Line 0 (Bethor Iceshard)");
|
||||
|
||||
DELETE FROM `waypoints` WHERE `entry`=5666;
|
||||
INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES
|
||||
(5666,1,1766.04,62.8454,-46.3213,"");
|
||||
|
||||
-- Quest "Rot Hide Origins"
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=149801 AND `source_type`=9;
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(149801,9,0,0,0,0,100,0,0,0,0,0,83,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Bethor Iceshard - On Script - Remove Npc Flag Questgiver"),
|
||||
(149801,9,1,0,0,0,100,0,0,0,0,0,11,5017,0,0,0,0,0,1,0,0,0,0,0,0,0,"Bethor Iceshard - On Script - Cast 'Divining Trance'"),
|
||||
(149801,9,2,0,0,0,100,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Bethor Iceshard - On Script - Say Line 1"),
|
||||
(149801,9,3,0,0,0,100,0,7000,7000,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Bethor Iceshard - On Script - Say Line 2"),
|
||||
(149801,9,4,0,0,0,100,0,4000,4000,0,0,1,3,0,0,0,0,0,1,0,0,0,0,0,0,0,"Bethor Iceshard - On Script - Say Line 3"),
|
||||
(149801,9,5,0,0,0,100,0,0,0,0,0,82,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Bethor Iceshard - On Script - Add Npc Flag Questgiver");
|
||||
|
||||
-- Quest "The Mind's Eye"
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=251900 AND `source_type`=9;
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `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
|
||||
(251900,9,0,0,0,0,100,0,0,0,0,0,0,83,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kin'weelay - On Script - Remove Npc Flag Questgiver"),
|
||||
(251900,9,1,0,0,0,100,0,0,0,0,0,0,90,8,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kin'weelay - On Script - Set Flag Standstate 'Kneel'"),
|
||||
(251900,9,2,0,0,0,100,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kin'weelay - On Script - Say Line 0"),
|
||||
(251900,9,3,0,0,0,100,0,3000,3000,0,0,0,11,2362,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kin'weelay - On Script - Cast Create Spellstone"),
|
||||
(251900,9,4,0,0,0,100,0,6000,6000,0,0,0,91,8,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kin'weelay - On Script - Remove Flag Standstate 'Kneel'"),
|
||||
(251900,9,5,0,0,0,100,0,2000,2000,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kin'weelay - On Script - Say Line 1"),
|
||||
(251900,9,6,0,0,0,100,0,0,0,0,0,0,82,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kin'weelay - On Script - Add Npc Flag Questgiver");
|
||||
|
||||
-- Quest "Elixir of Suffering (Part 2)"
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=2230 AND `source_type`=0; -- Umpi
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=223000 AND `source_type`=9;
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(2230,0,0,0,20,0,100,512,499,0,0,0,80,223000,0,0,0,0,0,1,0,0,0,0,0,0,0,"Umpi - On Quest 'Elixir of Agony (Part 2)' Rewarded - Run Script"),
|
||||
(2230,0,1,0,20,0,100,512,499,0,0,0,45,1,1,0,0,0,0,19,2216,0,0,0,0,0,0,"Umpi - On Quest 'Elixir of Agony (Part 2)' Rewarded - Set Data to Apothecary Lydon"),
|
||||
(223000,9,0,0,0,0,100,0,1000,1000,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Umpi - On Script - Say Line 0"),
|
||||
(223000,9,1,0,0,0,100,0,0,0,0,0,11,3240,0,0,0,0,0,1,0,0,0,0,0,0,0,"Umpi - On Script - Cast 'Bloody Explosion'");
|
||||
|
||||
DELETE FROM `creature_text` WHERE `CreatureID`=2230;
|
||||
INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
|
||||
(2230,0,0,"Croak!",12,0,100,0,0,0,579,0,"Umpi");
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=2216 AND `source_type`=0 AND `id`=1; -- Apothecary Lydon
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=221601 AND `source_type`=9;
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(2216,0,1,0,38,0,100,512,1,1,0,0,80,221601,0,0,0,0,0,1,0,0,0,0,0,0,0,"Apothecary Lydon - On Data Set - Run Script"),
|
||||
(221601,9,0,0,0,0,100,0,0,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,4.15964,"Apothecary Lydon - On Script - Set Orientation"),
|
||||
(221601,9,1,0,0,0,100,0,2000,2000,0,0,5,11,0,0,0,0,0,1,0,0,0,0,0,0,0,"Apothecary Lydon - On Script - Play Emote 'Laugh'"),
|
||||
(221601,9,2,0,0,0,100,0,5000,5000,0,0,66,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Apothecary Lydon - On Script - Set Orientation");
|
||||
|
||||
-- Quest "Elixir of Pain (Part 2)"
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=2274 AND `source_type`=0 AND `id` IN (0,1,2); -- Stanley
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=227400 AND `source_type`=9;
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(2274,0,0,0,20,0,100,512,502,0,0,0,80,227400,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stanley - On Quest 'Elixir of Pain (Part 2)' Rewarded - Run Script"),
|
||||
(227400,9,0,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stanley - On Script - Say Line 0"),
|
||||
(227400,9,1,0,0,0,100,0,2000,2000,0,0,36,2275,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stanley - On Script - Update Template To 'Enraged Stanley'"),
|
||||
(227400,9,2,0,0,0,100,0,0,0,0,0,3,2275,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stanley - On Script - Morph To Creature 'Enraged Stanley'"),
|
||||
(227400,9,3,0,0,0,100,0,0,0,0,0,49,0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Stanley - On Script - Start Attacking");
|
||||
|
||||
DELETE FROM `creature_text` WHERE `CreatureID`=2274;
|
||||
INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
|
||||
(2274,0,0,"%s sniffs the elixir then eagerly digs in!",16,0,100,0,0,0,580,0,"Stanley");
|
||||
|
||||
-- Quest "Elixir of Agony (Part 5)"
|
||||
DELETE FROM `creature_text` WHERE `CreatureID`=2284 AND `GroupID` IN (2,3,4);
|
||||
INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
|
||||
(2284,2,0,"%s raises his mug to his eye, and frowns.",16,0,100,0,0,0,561,0,"Captured Farmer"),
|
||||
(2284,3,0,"%s swaggers heavily.",16,0,100,0,0,0,559,0,"Captured Farmer"),
|
||||
(2284,4,0,"%s mumbles incoherent words.",16,0,100,1,0,0,560,0,"Captured Farmer");
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (172800,1589100,1589200,1589300) AND `source_type`=9;
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(172800,9,0,0,0,0,100,0,0,0,0,0,50,1729,120,0,0,0,0,8,0,0,0,0.437117,-942.794,61.9384,-2.54818,"Dusty Rug - On Script - Summon Gameobject 'Tainted Keg'"),
|
||||
(172800,9,1,0,0,0,100,0,0,0,0,0,45,1,1,0,0,0,0,9,2284,0,50,0,0,0,0,"Dusty Rug - On Script - Set Data 1 1"),
|
||||
(172800,9,2,0,0,0,100,0,1000,1000,0,0,50,1730,119,0,0,0,0,8,0,0,0,0.437117,-942.794,61.9384,-2.54818,"Dusty Rug - On Script - Summon Gameobject 'Tainted Keg Smoke'"),
|
||||
(1589100,9,0,0,0,0,100,0,3000,3000,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Captured Farmer - On Script - Say Line 0"),
|
||||
(1589100,9,1,0,0,0,100,0,0,0,0,0,69,0,0,0,0,0,0,8,0,0,0,0.426498,-944.53,61.9386,0,"Captured Farmer - On Script - Move To Position"),
|
||||
(1589100,9,2,0,0,0,100,0,3000,3000,0,0,5,16,0,0,0,0,0,1,0,0,0,0,0,0,0,"Captured Farmer - On Script - Play Emote 'Kneel'"),
|
||||
(1589100,9,3,0,0,0,100,0,1000,1000,0,0,5,26,0,0,0,0,0,1,0,0,0,0,0,0,0,"Captured Farmer - On Script - Play Emote 'Stand'"),
|
||||
(1589100,9,4,0,0,0,100,0,3000,3000,0,0,17,418,0,0,0,0,0,1,0,0,0,0,0,0,0,"Captured Farmer - On Script - Set Emote State 'Eat'"),
|
||||
(1589100,9,5,0,0,0,100,0,6000,6000,0,0,17,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Captured Farmer - On Script - Set Emote State 'None'"),
|
||||
(1589100,9,6,0,0,0,100,0,0,0,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Captured Farmer - On Script - Say Line 2"),
|
||||
(1589100,9,7,0,0,0,100,0,2000,2000,0,0,37,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Captured Farmer - On Script - Kill Self"),
|
||||
(1589200,9,0,0,0,0,100,0,3000,3000,0,0,69,0,0,0,0,0,0,8,0,0,0,-1.4032,-942.653,61.9,0,"Captured Farmer - On Script - Move To Position"),
|
||||
(1589200,9,1,0,0,0,100,0,3000,3000,0,0,5,16,0,0,0,0,0,1,0,0,0,0,0,0,0,"Captured Farmer - On Script - Play Emote 'Kneel'"),
|
||||
(1589200,9,2,0,0,0,100,0,1000,1000,0,0,5,26,0,0,0,0,0,1,0,0,0,0,0,0,0,"Captured Farmer - On Script - Play Emote 'Stand'"),
|
||||
(1589200,9,3,0,0,0,100,0,3000,3000,0,0,17,418,0,0,0,0,0,1,0,0,0,0,0,0,0,"Captured Farmer - On Script - Set Emote State 'Eat'"),
|
||||
(1589200,9,4,0,0,0,100,0,6000,6000,0,0,17,64,0,0,0,0,0,1,0,0,0,0,0,0,0,"Captured Farmer - On Script - Set Emote State 'Stun'"),
|
||||
(1589200,9,5,0,0,0,100,0,0,0,0,0,1,3,0,0,0,0,0,1,0,0,0,0,0,0,0,"Captured Farmer - On Script - Say Line 3"),
|
||||
(1589200,9,6,0,0,0,100,0,4000,4000,0,0,37,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Captured Farmer - On Script - Kill Self"),
|
||||
(1589300,9,0,0,0,0,100,0,3000,3000,0,0,69,0,0,0,0,0,0,8,0,0,0,0.446124,-941.072,61.91,0,"Captured Farmer - On Script - Move To Position"),
|
||||
(1589300,9,1,0,0,0,100,0,3000,3000,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Captured Farmer - On Script - Say Line 1"),
|
||||
(1589300,9,2,0,0,0,100,0,0,0,0,0,5,16,0,0,0,0,0,1,0,0,0,0,0,0,0,"Captured Farmer - On Script - Play Emote 'Kneel'"),
|
||||
(1589300,9,3,0,0,0,100,0,1000,1000,0,0,5,26,0,0,0,0,0,1,0,0,0,0,0,0,0,"Captured Farmer - On Script - Play Emote 'Stand'"),
|
||||
(1589300,9,4,0,0,0,100,0,3000,3000,0,0,17,418,0,0,0,0,0,1,0,0,0,0,0,0,0,"Captured Farmer - On Script - Set Emote State 'Eat'"),
|
||||
(1589300,9,5,0,0,0,100,0,7500,7500,0,0,17,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Captured Farmer - On Script - Set Emote State 'None'"),
|
||||
(1589300,9,6,0,0,0,100,0,500,500,0,0,1,4,0,0,0,0,0,1,0,0,0,0,0,0,0,"Captured Farmer - On Script - Say Line 4"),
|
||||
(1589300,9,7,0,0,0,100,0,3000,3000,0,0,37,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Captured Farmer - On Script - Kill Self");
|
||||
|
||||
-- Quest "The Tower of Althalaxx (Part 4)"
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=366300 AND `source_type`=9;
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `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
|
||||
(366300,9,0,0,0,0,100,0,0,0,0,0,0,83,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Delgren the Purifier - On Script - Remove Npc Flag Questgiver"),
|
||||
(366300,9,1,0,0,0,100,0,1000,1000,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Delgren the Purifier - On Script - Say Line 0"),
|
||||
(366300,9,2,0,0,0,100,0,4000,4000,0,0,0,5,61,0,0,0,0,0,1,0,0,0,0,0,0,0,"Delgren the Purifier - On Script - Play Emote 61"),
|
||||
(366300,9,3,0,0,0,100,0,0,0,0,0,0,50,19862,5,0,0,0,0,8,0,0,0,3186.81,189.953,4.57494,3.48778,"Delgren the Purifier - On Script - Summon Object 'Glowing Soulgem'"),
|
||||
(366300,9,4,0,0,0,100,0,1000,1000,0,0,0,12,4509,8,0,0,0,0,8,0,0,0,3188.2,191.026,4.53698,3.6802,"Delgren the Purifier - On Script - Summon Sargath"),
|
||||
(366300,9,5,0,0,0,100,0,3000,3000,0,0,0,1,0,0,0,0,0,0,19,4509,0,0,0,0,0,0,"Delgren the Purifier - On Script - Say Line 0 (Sargath)"),
|
||||
(366300,9,6,0,0,0,100,0,7000,7000,0,0,0,1,1,0,0,0,0,0,19,4509,0,0,0,0,0,0,"Delgren the Purifier - On Script - Say Line 1 (Sargath)"),
|
||||
(366300,9,7,0,0,0,100,0,7000,7000,0,0,0,1,2,0,0,0,0,0,19,4509,0,0,0,0,0,0,"Delgren the Purifier - On Script - Say Line 2 (Sargath)"),
|
||||
(366300,9,8,0,0,0,100,0,7000,7000,0,0,0,1,3,0,0,0,0,0,19,4509,0,0,0,0,0,0,"Delgren the Purifier - On Script - Say Line 3 (Sargath)"),
|
||||
(366300,9,9,0,0,0,100,0,7000,7000,0,0,0,1,4,0,0,0,0,0,19,4509,0,0,0,0,0,0,"Delgren the Purifier - On Script - Say Line 4 (Sargath)"),
|
||||
(366300,9,10,0,0,0,100,0,7000,7000,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Delgren the Purifier - On Script - Say Line 1"),
|
||||
(366300,9,11,0,0,0,100,0,7000,7000,0,0,0,1,5,0,0,0,0,0,19,4509,0,0,0,0,0,0,"Delgren the Purifier - On Script - Say Line 5 (Sargath)"),
|
||||
(366300,9,12,0,0,0,100,0,7000,7000,0,0,0,1,6,0,0,0,0,0,19,4509,0,0,0,0,0,0,"Delgren the Purifier - On Script - Say Line 6 (Sargath)"),
|
||||
(366300,9,13,0,0,0,100,0,0,0,0,0,0,41,0,0,0,0,0,0,19,4509,0,0,0,0,0,0,"Delgren the Purifier - On Script - Despawn (Sargath)"),
|
||||
(366300,9,14,0,0,0,100,0,1000,1000,0,0,0,82,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Delgren the Purifier - On Script - Add Npc Flag Questgiver");
|
||||
|
||||
-- Quest "Fields of Grief (Part 2)"
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=1931 AND `source_type`=0 AND `id`=1;
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(1931,0,1,0,20,0,100,512,407,0,0,0,59,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Captured Scarlet Zealot - On Quest 'Fields of Grief' Finished - Set Run Off");
|
||||
*/
|
||||
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
-- Junior Apothecary Holland
|
||||
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=10665;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=10665 AND `source_type`=0;
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(10665,0,0,0,1,0,100,0,10000,20000,40000,60000,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Junior Apothecary Holland - Out of Combat - Say Line 0");
|
||||
|
||||
DELETE FROM `creature_text` WHERE `CreatureID`=10665;
|
||||
INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
|
||||
(10665,0,0,"What could be taking so long?",12,1,100,0,0,0,5955,0,"Junior Apothecary Holland"),
|
||||
(10665,0,1,"How long can it take to pick a handful of weeds?",12,1,100,0,0,0,5956,0,"Junior Apothecary Holland"),
|
||||
(10665,0,2,"At this rate I could have gathered them myself!",12,1,100,0,0,0,5957,0,"Junior Apothecary Holland"),
|
||||
(10665,0,3,"If you want something done right, do it yourself!",12,1,100,0,0,0,5958,0,"Junior Apothecary Holland"),
|
||||
(10665,0,4,"As if I had all eternity.",12,1,100,0,0,0,5959,0,"Junior Apothecary Holland"),
|
||||
(10665,0,5,"Ah, this must be him now... no? Bah!",12,1,100,0,0,0,5960,0,"Junior Apothecary Holland"),
|
||||
(10665,0,6,"Maybe I should have just bought some off of Faruza?",12,1,100,0,0,0,5961,0,"Junior Apothecary Holland"),
|
||||
(10665,0,7,"I had to go and requisition an Abomination... an Abomination!",12,1,100,0,0,0,5962,0,"Junior Apothecary Holland");
|
||||
|
||||
UPDATE `waypoint_data` SET `action`=0 WHERE `id`=284120;
|
||||
UPDATE `waypoint_data` SET `delay`=0 WHERE `id`=284120 AND `point` IN (8,12);
|
||||
|
||||
DELETE FROM `waypoint_scripts` WHERE `id` IN (22,1002,1003,1004,1005);
|
||||
*/
|
||||
@@ -0,0 +1,3 @@
|
||||
--
|
||||
DELETE FROM `gameobject` WHERE `guid` BETWEEN 99928 AND 99934;
|
||||
DELETE FROM `gameobject_addon` WHERE `guid` BETWEEN 99928 AND 99934;
|
||||
@@ -0,0 +1,125 @@
|
||||
-- Duplicates removed
|
||||
DELETE FROM `creature` WHERE `guid` IN (129516,129555,129532,129520,129556,129545);
|
||||
DELETE FROM `creature_addon` WHERE `guid` IN (129516,129555,129532,129520,129556,129545);
|
||||
|
||||
-- Death Knight Initiate
|
||||
UPDATE `creature` SET `modelid`=0, `spawntimesecs` = 30 WHERE `id` = 28406;
|
||||
UPDATE `creature_addon` SET `auras` = "" WHERE `guid` IN (129492,129493,129494,129495,129496,129497,129498,129499);
|
||||
UPDATE `creature_addon` SET `path_id` = 1295170 WHERE `guid` IN (129517);
|
||||
UPDATE `creature_addon` SET `path_id` = 1295180 WHERE `guid` IN (129518);
|
||||
UPDATE `creature_addon` SET `path_id` = 1295290 WHERE `guid` IN (129529);
|
||||
UPDATE `creature_addon` SET `path_id` = 1295300 WHERE `guid` IN (129530);
|
||||
UPDATE `creature_addon` SET `path_id` = 1295310 WHERE `guid` IN (129531);
|
||||
UPDATE `creature_addon` SET `path_id` = 1295440 WHERE `guid` IN (129544);
|
||||
UPDATE `creature_addon` SET `path_id` = 1295460 WHERE `guid` IN (129546);
|
||||
UPDATE `creature_addon` SET `path_id` = 1295470 WHERE `guid` IN (129547);
|
||||
-- #1
|
||||
UPDATE `creature` SET `position_x` = 2409.489, `position_y` = -5729.18, `position_z` = 153.92, `orientation` = 3.8, `spawndist` = 0, `MovementType` = 2 WHERE `guid` = 129547;
|
||||
DELETE FROM `waypoint_data` WHERE `id`= 1295470;
|
||||
INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `delay`, `action`, `orientation`, `action_chance`, `move_type`) VALUES
|
||||
(1295470,1,2409.489,-5729.18,153.92,2000,0,3.8,100,0),
|
||||
(1295470,2,2398.24,-5738.1,153.923,0,0,3.51732,100,0),
|
||||
(1295470,3,2386.8,-5734.52,153.922,0,0,2.57013,100,0),
|
||||
(1295470,4,2372.86,-5722.17,153.922,0,0,2.26872,100,0),
|
||||
(1295470,5,2366.02,-5712.39,153.922,0,0,1.78963,100,0),
|
||||
(1295470,6,2365.51,-5706.24,153.922,0,0,0.855789,100,0),
|
||||
(1295470,7,2368.78,-5703.15,153.922,10000,0,0.690856,100,0),
|
||||
(1295470,8,2358.21,-5706.16,153.922,0,0,2.85855,100,0),
|
||||
(1295470,9,2341.04,-5689.82,153.922,0,0,2.3292,100,0),
|
||||
(1295470,10,2313.73,-5661.47,152.761,0,0,2.56639,100,0),
|
||||
(1295470,11,2296.29,-5652.93,147.341,0,0,2.88369,100,0),
|
||||
(1295470,12,2278.16,-5647.89,143.137,0,0,2.9638,100,0),
|
||||
(1295470,13,2255.96,-5645.48,136.996,0,0,3.24733,100,0),
|
||||
(1295470,14,2234.36,-5647.77,130.968,0,0,3.42954,100,0),
|
||||
(1295470,15,2209.59,-5657.5,122.594,0,0,3.76412,100,0),
|
||||
(1295470,16,2188.9,-5675.6,113.179,0,0,3.89371,100,0),
|
||||
(1295470,17,2163.24,-5699.88,104.99,1000,0,3.94476,100,0),
|
||||
(1295470,18,2149.23,-5715.65,101.528,1000,1188,3.99581,100,0);
|
||||
-- #2
|
||||
UPDATE `creature` SET `position_x` = 2455.27, `position_y` = -5523.46, `position_z` = 376.892, `orientation` = 5.96, `spawndist` = 0, `MovementType` = 2 WHERE `guid` = 129544;
|
||||
DELETE FROM `waypoint_data` WHERE `id`= 1295440;
|
||||
INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `delay`, `action`, `orientation`, `action_chance`, `move_type`) VALUES
|
||||
(1295440,1,2455.27,-5523.46,376.892,1000,0,5.96,100,0),
|
||||
(1295440,2,2451.31,-5528.92,376.891,0,0,3.66393,100,0),
|
||||
(1295440,3,2424.47,-5542.18,376.905,0,0,3.84064,100,0),
|
||||
(1295440,4,2403.66,-5563.52,377.005,0,0,4.24905,100,0),
|
||||
(1295440,5,2398.1,-5601.44,376.89,0,0,4.6064,100,0),
|
||||
(1295440,6,2397.91,-5614.95,377.018,0,0,4.26946,100,0),
|
||||
(1295440,7,2386.16,-5630.91,377.169,0,0,4.1116,100,0),
|
||||
(1295440,8,2379.33,-5642.43,382.439,0,0,4.2137,100,0),
|
||||
(1295440,9,2349.92,-5690.11,382.241,6000,1188,4.12338,100,0);
|
||||
-- #3
|
||||
UPDATE `creature` SET `position_x` = 2416.227, `position_y` = -5557.54, `position_z` = 376.89, `orientation` = 1.72, `MovementType` = 2, `spawndist` = 0 WHERE `guid` = 129518;
|
||||
DELETE FROM `waypoint_data` WHERE `id`= 1295180;
|
||||
INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `delay`, `action`, `orientation`, `action_chance`, `move_type`) VALUES
|
||||
(1295180,1,2416.227,-5557.54,376.89,1000,0,1.72,100,0),
|
||||
(1295180,2,2411.56,-5553.34,376.887,0,0,4.06137,100,0),
|
||||
(1295180,3,2396.85,-5576.58,376.906,0,0,4.57353,100,0),
|
||||
(1295180,4,2397.55,-5612.24,377.017,0,0,4.15728,100,0),
|
||||
(1295180,5,2377.61,-5641.62,382.439,0,0,3.72139,100,0),
|
||||
(1295180,6,2350.25,-5690.08,382.24,3000,1188,3.64364,100,0);
|
||||
-- #4
|
||||
UPDATE `creature` SET `position_x` = 2523.21, `position_y` = -5628.21, `position_z` = 377.004, `orientation` = 1.93, `MovementType` = 2, `spawndist` = 0 WHERE `guid` = 129529;
|
||||
DELETE FROM `waypoint_data` WHERE `id`= 1295290;
|
||||
INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `delay`, `action`, `orientation`, `action_chance`, `move_type`) VALUES
|
||||
(1295290,1,2523.21,-5628.21,377.004,1000,0,1.93,100,0),
|
||||
(1295290,2,2517.63,-5625.44,377.01,0,0,3.57347,100,0),
|
||||
(1295290,3,2480.55,-5653.1,376.997,0,0,3.48315,100,0),
|
||||
(1295290,4,2454.17,-5656.89,376.903,0,0,3.08653,100,0),
|
||||
(1295290,5,2426.21,-5647.1,377.148,0,0,2.74566,100,0),
|
||||
(1295290,6,2397.13,-5648.46,377.169,0,0,3.41325,100,0),
|
||||
(1295290,7,2385.79,-5652.5,382.439,0,0,3.6638,100,0),
|
||||
(1295290,8,2370,-5666.09,382.256,0,0,3.98424,100,0),
|
||||
(1295290,9,2354.86,-5693.19,382.239,5000,1188,4.18451,100,0);
|
||||
-- #5
|
||||
UPDATE `creature` SET `position_x` = 2477.05, `position_y` = -5647.81, `position_z` = 377.006, `orientation` = 5.92, `MovementType` = 2, `spawndist` = 0 WHERE `guid` = 129517;
|
||||
DELETE FROM `waypoint_data` WHERE `id`= 1295170;
|
||||
INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `delay`, `action`, `orientation`, `action_chance`, `move_type`) VALUES
|
||||
(1295170,1,2477.05,-5647.81,377.006,1000,0,5.92,100,0),
|
||||
(1295170,2,2478.18,-5653.36,377.01,0,0,3.68083,100,0),
|
||||
(1295170,3,2465.83,-5657.38,376.892,0,0,3.28028,100,0),
|
||||
(1295170,4,2420.22,-5645.76,376.89,0,0,3.26536,100,0),
|
||||
(1295170,5,2397.62,-5648.51,377.168,0,0,3.48684,100,0),
|
||||
(1295170,6,2386.39,-5653.11,382.439,0,0,3.7311,100,0),
|
||||
(1295170,7,2369.21,-5667.63,382.253,0,0,4.09474,100,0),
|
||||
(1295170,8,2353.39,-5690.9,382.239,3000,1188,3.8222,100,0);
|
||||
-- #6
|
||||
UPDATE `creature` SET `position_x` = 2413.64, `position_y` = -5737.27, `position_z` = 153.923, `orientation` = 3.86902, `MovementType` = 2, `spawndist` = 0 WHERE `guid` = 129546;
|
||||
DELETE FROM `waypoint_data` WHERE `id`= 1295460;
|
||||
INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `delay`, `action`, `orientation`, `action_chance`, `move_type`) VALUES
|
||||
(1295460,1,2413.64,-5737.27,153.923,1000,0,3.86902,100,0),
|
||||
(1295460,2,2373.33,-5754.69,153.961,0,0,3.34356,100,0),
|
||||
(1295460,3,2349.31,-5761.49,153.922,5000,0,1.76884,100,0),
|
||||
(1295460,4,2367,-5771.87,151.392,0,0,6.06104,100,0),
|
||||
(1295460,5,2380.8,-5774.62,154.028,0,0,6.11209,100,0),
|
||||
(1295460,6,2416.41,-5776.45,148.509,0,0,6.01155,100,0),
|
||||
(1295460,7,2430.24,-5787.44,140.563,0,0,5.40444,100,0),
|
||||
(1295460,8,2437.59,-5808,127.202,0,0,4.96462,100,0),
|
||||
(1295460,9,2441.6,-5832.16,117.571,0,0,4.86645,100,0),
|
||||
(1295460,10,2430.39,-5856.4,107.743,1000,0,4.06142,100,0),
|
||||
(1295460,11,2442.87,-5912.91,102.116,1000,1188,4.90965,100,0);
|
||||
-- #7
|
||||
UPDATE `creature` SET `position_x` = 2352.14, `position_y` = -5757.91, `position_z` = 153.923, `MovementType` = 2, `spawndist` = 0 WHERE `guid` = 129531;
|
||||
DELETE FROM `waypoint_data` WHERE `id`= 1295310;
|
||||
INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `delay`, `action`, `orientation`, `action_chance`, `move_type`) VALUES
|
||||
(1295310,1,2352.14,-5757.91,153.923,1000,0,3.23752,100,0),
|
||||
(1295310,2,2352.14,-5757.91,153.923,4000,0,3.23752,100,0),
|
||||
(1295310,3,2341.61,-5727.9,153.922,0,0,1.55677,100,0),
|
||||
(1295310,4,2342.13,-5697.18,153.922,0,0,1.84658,100,0),
|
||||
(1295310,5,2317.47,-5651.82,151.422,0,0,2.33588,100,0),
|
||||
(1295310,6,2297.54,-5644.36,147.052,0,0,2.94867,100,0),
|
||||
(1295310,7,2245.47,-5638.62,135.882,0,0,3.22356,100,0),
|
||||
(1295310,8,2205.02,-5658.24,121.031,0,0,3.8778,100,0),
|
||||
(1295310,9,2161.18,-5703.33,104.27,1000,0,4.13698,100,0),
|
||||
(1295310,10,2178.08,-5770.89,101.346,1000,1188,5.00484,100,0);
|
||||
-- #8
|
||||
UPDATE `creature` SET `position_x` = 2368.652588, `position_y` = -5703.335449, `position_z` = 153.922272, `orientation` = 0.69, `MovementType` = 2, `spawndist` = 0 WHERE `guid` = 129530;
|
||||
DELETE FROM `waypoint_data` WHERE `id`= 1295300;
|
||||
INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `delay`, `action`, `orientation`, `action_chance`, `move_type`) VALUES
|
||||
(1295300,1,2368.652588,-5703.335449,153.922272,1000,0,0.69,100,0),
|
||||
(1295300,2,2373.52,-5722.48,153.922,0,0,5.28585,100,0),
|
||||
(1295300,3,2411.22,-5764.47,152.347,0,0,5.47748,100,0),
|
||||
(1295300,4,2429.98,-5784.48,142.151,0,0,5.22694,100,0),
|
||||
(1295300,5,2435.23,-5800.88,131.736,0,0,4.99918,100,0),
|
||||
(1295300,6,2431.43,-5850.32,109.292,1000,0,4.36615,100,0),
|
||||
(1295300,7,2417.03,-5895.6,104.705,1000,1188,4.31903,100,0);
|
||||
@@ -0,0 +1,2 @@
|
||||
--
|
||||
DELETE FROM `conditions` WHERE `SourceEntry` IN (52683) AND `SourceTypeOrReferenceId`=13 AND `ConditionValue2`=28897;
|
||||
@@ -0,0 +1,40 @@
|
||||
-- Quest King of the Mountain
|
||||
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=16 AND `SourceEntry` IN (31784,31785);
|
||||
INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorType`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
|
||||
(16,0,31784,0,0,23,0,4513,0,0,0,0,0,'','Geargrinder\'s Jumpbot - Dismount when player is outside intended zone Ymirhein'),
|
||||
(16,0,31785,0,0,23,0,4513,0,0,0,0,0,'','Thunderbomb\'s Jumpbot - Dismount when player is outside intended zone Ymirhein');
|
||||
|
||||
DELETE FROM `creature_template_addon` WHERE `entry` IN(31784,31785);
|
||||
INSERT INTO `creature_template_addon` (`entry`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `auras`) VALUES
|
||||
(31784, 0, 0, 0, 1, 0, 4341),
|
||||
(31785, 0, 0, 0, 1, 0, 4341);
|
||||
|
||||
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry` IN(4338,59643);
|
||||
INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorType`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
|
||||
(13,1,59643,0,0,31,0,3,23837,0,0,0,0,'','Spell Plant Horde Battle Standard targets ELM General Purpose Bunny'),
|
||||
(13,1,4338,0,0,31,0,3,23837,0,0,0,0,'','Spell Plant Alliance Battle Standard targets ELM General Purpose Bunny');
|
||||
|
||||
DELETE FROM `npc_spellclick_spells` WHERE `npc_entry` IN (31784,31785) AND `spell_id`=46598;
|
||||
INSERT INTO `npc_spellclick_spells` (`npc_entry`, `spell_id`, `cast_flags`, `user_type`) VALUES
|
||||
(31784, 46598, 1, 0),
|
||||
(31785, 46598, 1, 0);
|
||||
|
||||
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=18 AND `SourceGroup` IN (31784,31785) AND `SourceEntry` IN(59593,59656,46598);
|
||||
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
|
||||
(18, 31784, 59593, 0, 0, 31, 0, 4, 0, 0, 0, 0, 0, '', 'Only player for SpellClick'),
|
||||
(18, 31784, 46598, 0, 0, 31, 0, 3, 0, 0, 0, 0, 0, '', 'Only unit for SpellClick'),
|
||||
(18, 31785, 59656, 0, 0, 31, 0, 4, 0, 0, 0, 0, 0, '', 'Only player for SpellClick'),
|
||||
(18, 31785, 46598, 0, 0, 31, 0, 3, 0, 0, 0, 0, 0, '', 'Only unit for SpellClick');
|
||||
|
||||
DELETE FROM `vehicle_template_accessory` WHERE `entry` IN(31784, 31785);
|
||||
INSERT INTO `vehicle_template_accessory` (`entry`,`accessory_entry`,`seat_id`,`minion`,`description`,`summontype`,`summontimer`) VALUES
|
||||
(31784,31801,1,1,'Geargrinder\'s Jumpbot',6,30000),
|
||||
(31785,31801,1,1,'Thunderbomb\'s Jumpbot',6,30000);
|
||||
|
||||
DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_q13280_13283_jump_jets';
|
||||
INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
|
||||
(4336,'spell_q13280_13283_jump_jets');
|
||||
|
||||
DELETE FROM `spell_proc` WHERE `SpellId`=4341;
|
||||
INSERT INTO `spell_proc` (`SpellId`,`SchoolMask`,`SpellFamilyName`,`SpellFamilyMask0`,`SpellFamilyMask1`,`SpellFamilyMask2`,`ProcFlags`,`SpellTypeMask`,`SpellPhaseMask`,`HitMask`,`AttributesMask`,`ProcsPerMinute`,`Chance`,`Cooldown`,`Charges`) VALUES
|
||||
(4341,0,0,0,0,0,4096,1,1,0,0,0,0,0,0);
|
||||
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
DELETE FROM `creature_template_movement` WHERE `CreatureId` IN (2673, 2674, 17578, 16111, 24792, 32543, 32546, 32547, 32542, 32545, 30527, 31143, 31144, 31146, 32541, 32666, 32667);
|
||||
INSERT INTO `creature_template_movement` (`CreatureId`, `Ground`, `Swim`, `Flight`, `Rooted`) VALUES
|
||||
(2673, 1, 0, 0, 1),
|
||||
(2674, 1, 0, 0, 1),
|
||||
(17578, 1, 0, 0, 1),
|
||||
(16111, 1, 0, 0, 1),
|
||||
(24792, 1, 0, 0, 1),
|
||||
(32543, 1, 0, 0, 1),
|
||||
(32546, 1, 0, 0, 1),
|
||||
(32547, 1, 0, 0, 1),
|
||||
(32542, 1, 0, 0, 1),
|
||||
(32545, 1, 0, 0, 1),
|
||||
(30527, 1, 0, 0, 1),
|
||||
(31143, 1, 0, 0, 1),
|
||||
(31144, 1, 0, 0, 1),
|
||||
(31146, 1, 0, 0, 1),
|
||||
(32541, 1, 0, 0, 1),
|
||||
(32666, 1, 0, 0, 1),
|
||||
(32667, 1, 0, 0, 1);
|
||||
*/
|
||||
@@ -0,0 +1,2 @@
|
||||
--
|
||||
UPDATE `gameobject` SET `phaseMask`=1, `spawntimesecs`=-1 WHERE `id`=192538;
|
||||
@@ -0,0 +1,11 @@
|
||||
--
|
||||
UPDATE `smart_scripts` SET `event_param5`=1 WHERE event_type=10 AND `source_type`=0;
|
||||
UPDATE `smart_scripts` SET `event_param2`=30, `event_param5`=1 WHERE `entryorguid`=24248 AND `source_type`=0;
|
||||
UPDATE `smart_scripts` SET `event_flags`=0 WHERE `entryorguid`=24938 AND event_type=10 AND `source_type`=0;
|
||||
UPDATE `smart_scripts` SET `event_param1`=1 WHERE `entryorguid`in (27376,27378,27379,27381) AND event_type=10 AND `source_type`=0;
|
||||
UPDATE `smart_scripts` SET `event_param1`=1, `event_param2`=20, `event_param5`=0 WHERE `entryorguid`=30313 AND `event_type`=10 AND `source_type`=0;
|
||||
UPDATE `creature_template` SET `AIName`="" WHERE `entry`=32582;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (32582) AND `source_type`=0;
|
||||
UPDATE `smart_scripts` SET `event_flags`=0, `event_param2`=10, `event_param3`=60000, `event_param4`=60000, `event_param5`=1 WHERE `entryorguid`=5917 AND `source_type`=0 AND `id`=0;
|
||||
UPDATE `smart_scripts` SET `event_flags`=0, `event_param1`=1, `event_param2`=20, `event_param3`=40000, `event_param4`=60000, `event_param5`=1 WHERE `entryorguid`=9021 AND `source_type`=0 AND `id`=0;
|
||||
UPDATE `smart_scripts` SET `event_param5`=0 WHERE `entryorguid` IN (27246, 2775, 23370, 23760, 24845, 23675, 23673, 23672, 24271, 24364, 24468, 24510, 24527, 24718, 24938,24979,25063,30313) AND event_type=10 AND `source_type`=0;
|
||||
@@ -142,11 +142,11 @@ void DynamicMapTree::update(uint32 t_diff)
|
||||
|
||||
struct DynamicTreeIntersectionCallback
|
||||
{
|
||||
DynamicTreeIntersectionCallback(std::set<uint32> const& phases) : _didHit(false), _phases(phases) { }
|
||||
DynamicTreeIntersectionCallback(PhaseShift const& phaseShift) : _didHit(false), _phaseShift(phaseShift) { }
|
||||
|
||||
bool operator()(G3D::Ray const& r, GameObjectModel const& obj, float& distance)
|
||||
{
|
||||
_didHit = obj.intersectRay(r, distance, true, _phases, VMAP::ModelIgnoreFlags::Nothing);
|
||||
_didHit = obj.intersectRay(r, distance, true, _phaseShift, VMAP::ModelIgnoreFlags::Nothing);
|
||||
return _didHit;
|
||||
}
|
||||
|
||||
@@ -154,20 +154,20 @@ struct DynamicTreeIntersectionCallback
|
||||
|
||||
private:
|
||||
bool _didHit;
|
||||
std::set<uint32> _phases;
|
||||
PhaseShift const& _phaseShift;
|
||||
};
|
||||
|
||||
bool DynamicMapTree::getIntersectionTime(std::set<uint32> const& phases, G3D::Ray const& ray, G3D::Vector3 const& endPos, float& maxDist) const
|
||||
bool DynamicMapTree::getIntersectionTime(G3D::Ray const& ray, G3D::Vector3 const& endPos, PhaseShift const& phaseShift, float& maxDist) const
|
||||
{
|
||||
float distance = maxDist;
|
||||
DynamicTreeIntersectionCallback callback(phases);
|
||||
DynamicTreeIntersectionCallback callback(phaseShift);
|
||||
impl->intersectRay(ray, callback, distance, endPos);
|
||||
if (callback.didHit())
|
||||
maxDist = distance;
|
||||
return callback.didHit();
|
||||
}
|
||||
|
||||
bool DynamicMapTree::getObjectHitPos(std::set<uint32> const& phases, G3D::Vector3 const& startPos, G3D::Vector3 const& endPos, G3D::Vector3& resultHitPos, float modifyDist) const
|
||||
bool DynamicMapTree::getObjectHitPos(G3D::Vector3 const& startPos, G3D::Vector3 const& endPos, G3D::Vector3& resultHitPos, float modifyDist, PhaseShift const& phaseShift) const
|
||||
{
|
||||
bool result = false;
|
||||
float maxDist = (endPos - startPos).magnitude();
|
||||
@@ -182,7 +182,7 @@ bool DynamicMapTree::getObjectHitPos(std::set<uint32> const& phases, G3D::Vector
|
||||
G3D::Vector3 dir = (endPos - startPos)/maxDist; // direction with length of 1
|
||||
G3D::Ray ray(startPos, dir);
|
||||
float dist = maxDist;
|
||||
if (getIntersectionTime(phases, ray, endPos, dist))
|
||||
if (getIntersectionTime(ray, endPos, phaseShift, dist))
|
||||
{
|
||||
resultHitPos = startPos + dir * dist;
|
||||
if (modifyDist < 0)
|
||||
@@ -205,7 +205,7 @@ bool DynamicMapTree::getObjectHitPos(std::set<uint32> const& phases, G3D::Vector
|
||||
return result;
|
||||
}
|
||||
|
||||
bool DynamicMapTree::isInLineOfSight(G3D::Vector3 const& startPos, G3D::Vector3 const& endPos, std::set<uint32> const& phases) const
|
||||
bool DynamicMapTree::isInLineOfSight(G3D::Vector3 const& startPos, G3D::Vector3 const& endPos, PhaseShift const& phaseShift) const
|
||||
{
|
||||
float maxDist = (endPos - startPos).magnitude();
|
||||
|
||||
@@ -213,17 +213,17 @@ bool DynamicMapTree::isInLineOfSight(G3D::Vector3 const& startPos, G3D::Vector3
|
||||
return true;
|
||||
|
||||
G3D::Ray r(startPos, (endPos - startPos) / maxDist);
|
||||
DynamicTreeIntersectionCallback callback(phases);
|
||||
DynamicTreeIntersectionCallback callback(phaseShift);
|
||||
impl->intersectRay(r, callback, maxDist, endPos);
|
||||
|
||||
return !callback.didHit();
|
||||
}
|
||||
|
||||
float DynamicMapTree::getHeight(float x, float y, float z, float maxSearchDist, std::set<uint32> const& phases) const
|
||||
float DynamicMapTree::getHeight(float x, float y, float z, float maxSearchDist, PhaseShift const& phaseShift) const
|
||||
{
|
||||
G3D::Vector3 v(x, y, z + 0.5f);
|
||||
G3D::Ray r(v, G3D::Vector3(0, 0, -1));
|
||||
DynamicTreeIntersectionCallback callback(phases);
|
||||
DynamicTreeIntersectionCallback callback(phaseShift);
|
||||
impl->intersectZAllignedRay(r, callback, maxSearchDist);
|
||||
|
||||
if (callback.didHit())
|
||||
|
||||
@@ -29,6 +29,7 @@ namespace G3D
|
||||
}
|
||||
|
||||
class GameObjectModel;
|
||||
class PhaseShift;
|
||||
struct DynTreeImpl;
|
||||
|
||||
class TC_COMMON_API DynamicMapTree
|
||||
@@ -40,11 +41,11 @@ public:
|
||||
DynamicMapTree();
|
||||
~DynamicMapTree();
|
||||
|
||||
bool isInLineOfSight(G3D::Vector3 const& startPos, G3D::Vector3 const& endPos, std::set<uint32> const& phases) const;
|
||||
bool getIntersectionTime(std::set<uint32> const& phases, G3D::Ray const& ray, G3D::Vector3 const& endPos, float& maxDist) const;
|
||||
bool getObjectHitPos(std::set<uint32> const& phases, G3D::Vector3 const& startPos, G3D::Vector3 const& endPos, G3D::Vector3& resultHitPos, float modifyDist) const;
|
||||
bool isInLineOfSight(G3D::Vector3 const& startPos, G3D::Vector3 const& endPos, PhaseShift const& phaseShift) const;
|
||||
bool getIntersectionTime(G3D::Ray const& ray, G3D::Vector3 const& endPos, PhaseShift const& phaseShift, float& maxDist) const;
|
||||
bool getObjectHitPos(G3D::Vector3 const& startPos, G3D::Vector3 const& endPos, G3D::Vector3& resultHitPos, float modifyDist, PhaseShift const& phaseShift) const;
|
||||
|
||||
float getHeight(float x, float y, float z, float maxSearchDist, std::set<uint32> const& phases) const;
|
||||
float getHeight(float x, float y, float z, float maxSearchDist, PhaseShift const& phaseShift) const;
|
||||
|
||||
void insert(const GameObjectModel&);
|
||||
void remove(const GameObjectModel&);
|
||||
|
||||
@@ -126,7 +126,6 @@ namespace VMAP
|
||||
virtual bool GetLiquidLevel(uint32 pMapId, float x, float y, float z, uint8 ReqLiquidType, float &level, float &floor, uint32 &type) const=0;
|
||||
// get both area + liquid data in a single vmap lookup
|
||||
virtual void getAreaAndLiquidData(unsigned int mapId, float x, float y, float z, uint8 reqLiquidType, AreaAndLiquidData& data) const=0;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -19,13 +19,12 @@
|
||||
#include "MMapManager.h"
|
||||
#include "Log.h"
|
||||
#include "MMapFactory.h"
|
||||
#include "Config.h"
|
||||
#include "MapDefines.h"
|
||||
|
||||
namespace MMAP
|
||||
{
|
||||
static char const* const MAP_FILE_NAME_FORMAT = "%s/mmaps/%03i.mmap";
|
||||
static char const* const TILE_FILE_NAME_FORMAT = "%s/mmaps/%03i%02i%02i.mmtile";
|
||||
static char const* const MAP_FILE_NAME_FORMAT = "%smmaps/%03i.mmap";
|
||||
static char const* const TILE_FILE_NAME_FORMAT = "%smmaps/%03i%02i%02i.mmtile";
|
||||
|
||||
// ######################## MMapManager ########################
|
||||
MMapManager::~MMapManager()
|
||||
@@ -37,11 +36,16 @@ namespace MMAP
|
||||
// if we had, tiles in MMapData->mmapLoadedTiles, their actual data is lost!
|
||||
}
|
||||
|
||||
void MMapManager::InitializeThreadUnsafe(const std::vector<uint32>& mapIds)
|
||||
void MMapManager::InitializeThreadUnsafe(std::unordered_map<uint32, std::vector<uint32>> const& mapData)
|
||||
{
|
||||
childMapData = mapData;
|
||||
// the caller must pass the list of all mapIds that will be used in the VMapManager2 lifetime
|
||||
for (uint32 const& mapId : mapIds)
|
||||
loadedMMaps.insert(MMapDataSet::value_type(mapId, nullptr));
|
||||
for (std::pair<uint32 const, std::vector<uint32>> const& mapId : mapData)
|
||||
{
|
||||
loadedMMaps.insert(MMapDataSet::value_type(mapId.first, nullptr));
|
||||
for (uint32 childMapId : mapId.second)
|
||||
parentMapData[childMapId] = mapId.first;
|
||||
}
|
||||
|
||||
thread_safe_environment = false;
|
||||
}
|
||||
@@ -56,7 +60,7 @@ namespace MMAP
|
||||
return itr;
|
||||
}
|
||||
|
||||
bool MMapManager::loadMapData(uint32 mapId)
|
||||
bool MMapManager::loadMapData(std::string const& basePath, uint32 mapId)
|
||||
{
|
||||
// we already have this map loaded?
|
||||
MMapDataSet::iterator itr = loadedMMaps.find(mapId);
|
||||
@@ -74,7 +78,7 @@ namespace MMAP
|
||||
}
|
||||
|
||||
// load and init dtNavMesh - read parameters from file
|
||||
std::string fileName = Trinity::StringFormat(MAP_FILE_NAME_FORMAT, sConfigMgr->GetStringDefault("DataDir", ".").c_str(), mapId);
|
||||
std::string fileName = Trinity::StringFormat(MAP_FILE_NAME_FORMAT, basePath.c_str(), mapId);
|
||||
FILE* file = fopen(fileName.c_str(), "rb");
|
||||
if (!file)
|
||||
{
|
||||
@@ -114,10 +118,25 @@ namespace MMAP
|
||||
return uint32(x << 16 | y);
|
||||
}
|
||||
|
||||
bool MMapManager::loadMap(const std::string& /*basePath*/, uint32 mapId, int32 x, int32 y)
|
||||
bool MMapManager::loadMap(std::string const& basePath, uint32 mapId, int32 x, int32 y)
|
||||
{
|
||||
if (!loadMapImpl(basePath, mapId, x, y))
|
||||
return false;
|
||||
|
||||
bool success = true;
|
||||
auto childMaps = childMapData.find(mapId);
|
||||
if (childMaps != childMapData.end())
|
||||
for (uint32 childMapId : childMaps->second)
|
||||
if (!loadMapImpl(basePath, childMapId, x, y))
|
||||
success = false;
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
bool MMapManager::loadMapImpl(std::string const& basePath, uint32 mapId, int32 x, int32 y)
|
||||
{
|
||||
// make sure the mmap is loaded and ready to load tiles
|
||||
if (!loadMapData(mapId))
|
||||
if (!loadMapData(basePath, mapId))
|
||||
return false;
|
||||
|
||||
// get this mmap data
|
||||
@@ -130,8 +149,18 @@ namespace MMAP
|
||||
return false;
|
||||
|
||||
// load this tile :: mmaps/MMMXXYY.mmtile
|
||||
std::string fileName = Trinity::StringFormat(TILE_FILE_NAME_FORMAT, sConfigMgr->GetStringDefault("DataDir", ".").c_str(), mapId, x, y);
|
||||
std::string fileName = Trinity::StringFormat(TILE_FILE_NAME_FORMAT, basePath.c_str(), mapId, x, y);
|
||||
FILE* file = fopen(fileName.c_str(), "rb");
|
||||
if (!file)
|
||||
{
|
||||
auto parentMapItr = parentMapData.find(mapId);
|
||||
if (parentMapItr != parentMapData.end())
|
||||
{
|
||||
fileName = Trinity::StringFormat(TILE_FILE_NAME_FORMAT, basePath.c_str(), parentMapItr->second, x, y);
|
||||
file = fopen(fileName.c_str(), "rb");
|
||||
}
|
||||
}
|
||||
|
||||
if (!file)
|
||||
{
|
||||
TC_LOG_DEBUG("maps", "MMAP:loadMap: Could not open mmtile file '%s'", fileName.c_str());
|
||||
@@ -192,13 +221,62 @@ namespace MMAP
|
||||
}
|
||||
else
|
||||
{
|
||||
TC_LOG_ERROR("maps", "MMAP:loadMap: Could not load %04u%02i%02i.mmtile into navmesh", mapId, x, y);
|
||||
TC_LOG_ERROR("maps", "MMAP:loadMap: Could not load %03u%02i%02i.mmtile into navmesh", mapId, x, y);
|
||||
dtFree(data);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool MMapManager::loadMapInstance(std::string const& basePath, uint32 mapId, uint32 instanceId)
|
||||
{
|
||||
if (!loadMapInstanceImpl(basePath, mapId, instanceId))
|
||||
return false;
|
||||
|
||||
bool success = true;
|
||||
auto childMaps = childMapData.find(mapId);
|
||||
if (childMaps != childMapData.end())
|
||||
for (uint32 childMapId : childMaps->second)
|
||||
if (!loadMapInstanceImpl(basePath, childMapId, instanceId))
|
||||
success = false;
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
bool MMapManager::loadMapInstanceImpl(std::string const& basePath, uint32 mapId, uint32 instanceId)
|
||||
{
|
||||
if (!loadMapData(basePath, mapId))
|
||||
return false;
|
||||
|
||||
MMapData* mmap = loadedMMaps[mapId];
|
||||
if (mmap->navMeshQueries.find(instanceId) != mmap->navMeshQueries.end())
|
||||
return true;
|
||||
|
||||
// allocate mesh query
|
||||
dtNavMeshQuery* query = dtAllocNavMeshQuery();
|
||||
ASSERT(query);
|
||||
if (dtStatusFailed(query->init(mmap->navMesh, 1024)))
|
||||
{
|
||||
dtFreeNavMeshQuery(query);
|
||||
TC_LOG_ERROR("maps", "MMAP:GetNavMeshQuery: Failed to initialize dtNavMeshQuery for mapId %03u instanceId %u", mapId, instanceId);
|
||||
return false;
|
||||
}
|
||||
|
||||
TC_LOG_DEBUG("maps", "MMAP:GetNavMeshQuery: created dtNavMeshQuery for mapId %03u instanceId %u", mapId, instanceId);
|
||||
mmap->navMeshQueries.insert(std::pair<uint32, dtNavMeshQuery*>(instanceId, query));
|
||||
return true;
|
||||
}
|
||||
|
||||
bool MMapManager::unloadMap(uint32 mapId, int32 x, int32 y)
|
||||
{
|
||||
auto childMaps = childMapData.find(mapId);
|
||||
if (childMaps != childMapData.end())
|
||||
for (uint32 childMapId : childMaps->second)
|
||||
unloadMapImpl(childMapId, x, y);
|
||||
|
||||
return unloadMapImpl(mapId, x, y);
|
||||
}
|
||||
|
||||
bool MMapManager::unloadMapImpl(uint32 mapId, int32 x, int32 y)
|
||||
{
|
||||
// check if we have this map loaded
|
||||
MMapDataSet::const_iterator itr = GetMMapData(mapId);
|
||||
@@ -213,17 +291,16 @@ namespace MMAP
|
||||
|
||||
// check if we have this tile loaded
|
||||
uint32 packedGridPos = packTileID(x, y);
|
||||
if (mmap->loadedTileRefs.find(packedGridPos) == mmap->loadedTileRefs.end())
|
||||
auto tileRefItr = mmap->loadedTileRefs.find(packedGridPos);
|
||||
if (tileRefItr == mmap->loadedTileRefs.end())
|
||||
{
|
||||
// file may not exist, therefore not loaded
|
||||
TC_LOG_DEBUG("maps", "MMAP:unloadMap: Asked to unload not loaded navmesh tile. %03u%02i%02i.mmtile", mapId, x, y);
|
||||
return false;
|
||||
}
|
||||
|
||||
dtTileRef tileRef = mmap->loadedTileRefs[packedGridPos];
|
||||
|
||||
// unload, and mark as non loaded
|
||||
if (dtStatusFailed(mmap->navMesh->removeTile(tileRef, nullptr, nullptr)))
|
||||
if (dtStatusFailed(mmap->navMesh->removeTile(tileRefItr->second, nullptr, nullptr)))
|
||||
{
|
||||
// this is technically a memory leak
|
||||
// if the grid is later reloaded, dtNavMesh::addTile will return error but no extra memory is used
|
||||
@@ -233,7 +310,7 @@ namespace MMAP
|
||||
}
|
||||
else
|
||||
{
|
||||
mmap->loadedTileRefs.erase(packedGridPos);
|
||||
mmap->loadedTileRefs.erase(tileRefItr);
|
||||
--loadedTiles;
|
||||
TC_LOG_DEBUG("maps", "MMAP:unloadMap: Unloaded mmtile %04i[%02i, %02i] from %03i", mapId, x, y, mapId);
|
||||
return true;
|
||||
@@ -243,6 +320,16 @@ namespace MMAP
|
||||
}
|
||||
|
||||
bool MMapManager::unloadMap(uint32 mapId)
|
||||
{
|
||||
auto childMaps = childMapData.find(mapId);
|
||||
if (childMaps != childMapData.end())
|
||||
for (uint32 childMapId : childMaps->second)
|
||||
unloadMapImpl(childMapId);
|
||||
|
||||
return unloadMapImpl(mapId);
|
||||
}
|
||||
|
||||
bool MMapManager::unloadMapImpl(uint32 mapId)
|
||||
{
|
||||
MMapDataSet::iterator itr = loadedMMaps.find(mapId);
|
||||
if (itr == loadedMMaps.end() || !itr->second)
|
||||
@@ -312,27 +399,14 @@ namespace MMAP
|
||||
|
||||
dtNavMeshQuery const* MMapManager::GetNavMeshQuery(uint32 mapId, uint32 instanceId)
|
||||
{
|
||||
MMapDataSet::const_iterator itr = GetMMapData(mapId);
|
||||
auto itr = GetMMapData(mapId);
|
||||
if (itr == loadedMMaps.end())
|
||||
return nullptr;
|
||||
|
||||
MMapData* mmap = itr->second;
|
||||
if (mmap->navMeshQueries.find(instanceId) == mmap->navMeshQueries.end())
|
||||
{
|
||||
// allocate mesh query
|
||||
dtNavMeshQuery* query = dtAllocNavMeshQuery();
|
||||
ASSERT(query);
|
||||
if (dtStatusFailed(query->init(mmap->navMesh, 1024)))
|
||||
{
|
||||
dtFreeNavMeshQuery(query);
|
||||
TC_LOG_ERROR("maps", "MMAP:GetNavMeshQuery: Failed to initialize dtNavMeshQuery for mapId %03u instanceId %u", mapId, instanceId);
|
||||
return nullptr;
|
||||
}
|
||||
auto queryItr = itr->second->navMeshQueries.find(instanceId);
|
||||
if (queryItr == itr->second->navMeshQueries.end())
|
||||
return nullptr;
|
||||
|
||||
TC_LOG_DEBUG("maps", "MMAP:GetNavMeshQuery: created dtNavMeshQuery for mapId %03u instanceId %u", mapId, instanceId);
|
||||
mmap->navMeshQueries.insert(std::pair<uint32, dtNavMeshQuery*>(instanceId, query));
|
||||
}
|
||||
|
||||
return mmap->navMeshQueries[instanceId];
|
||||
return queryItr->second;
|
||||
}
|
||||
}
|
||||
@@ -64,8 +64,9 @@ namespace MMAP
|
||||
MMapManager() : loadedTiles(0), thread_safe_environment(true) {}
|
||||
~MMapManager();
|
||||
|
||||
void InitializeThreadUnsafe(const std::vector<uint32>& mapIds);
|
||||
bool loadMap(const std::string& basePath, uint32 mapId, int32 x, int32 y);
|
||||
void InitializeThreadUnsafe(std::unordered_map<uint32, std::vector<uint32>> const& mapData);
|
||||
bool loadMap(std::string const& basePath, uint32 mapId, int32 x, int32 y);
|
||||
bool loadMapInstance(std::string const& basePath, uint32 mapId, uint32 instanceId);
|
||||
bool unloadMap(uint32 mapId, int32 x, int32 y);
|
||||
bool unloadMap(uint32 mapId);
|
||||
bool unloadMapInstance(uint32 mapId, uint32 instanceId);
|
||||
@@ -77,13 +78,20 @@ namespace MMAP
|
||||
uint32 getLoadedTilesCount() const { return loadedTiles; }
|
||||
uint32 getLoadedMapsCount() const { return uint32(loadedMMaps.size()); }
|
||||
private:
|
||||
bool loadMapData(uint32 mapId);
|
||||
bool loadMapData(std::string const& basePath, uint32 mapId);
|
||||
bool loadMapImpl(std::string const& basePath, uint32 mapId, int32 x, int32 y);
|
||||
bool loadMapInstanceImpl(std::string const& basePath, uint32 mapId, uint32 instanceId);
|
||||
bool unloadMapImpl(uint32 mapId, int32 x, int32 y);
|
||||
bool unloadMapImpl(uint32 mapId);
|
||||
uint32 packTileID(int32 x, int32 y);
|
||||
|
||||
MMapDataSet::const_iterator GetMMapData(uint32 mapId) const;
|
||||
MMapDataSet loadedMMaps;
|
||||
uint32 loadedTiles;
|
||||
bool thread_safe_environment;
|
||||
|
||||
std::unordered_map<uint32, std::vector<uint32>> childMapData;
|
||||
std::unordered_map<uint32, uint32> parentMapData;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -40,23 +40,35 @@ namespace VMAP
|
||||
thread_safe_environment = true;
|
||||
}
|
||||
|
||||
VMapManager2::~VMapManager2(void)
|
||||
VMapManager2::~VMapManager2()
|
||||
{
|
||||
for (InstanceTreeMap::iterator i = iInstanceMapTrees.begin(); i != iInstanceMapTrees.end(); ++i)
|
||||
{
|
||||
for (auto i = iInstanceMapTrees.begin(); i != iInstanceMapTrees.end(); ++i)
|
||||
delete i->second;
|
||||
}
|
||||
for (ModelFileMap::iterator i = iLoadedModelFiles.begin(); i != iLoadedModelFiles.end(); ++i)
|
||||
{
|
||||
|
||||
for (auto i = iLoadedModelFiles.begin(); i != iLoadedModelFiles.end(); ++i)
|
||||
delete i->second.getModel();
|
||||
}
|
||||
}
|
||||
|
||||
void VMapManager2::InitializeThreadUnsafe(const std::vector<uint32>& mapIds)
|
||||
InstanceTreeMap::const_iterator VMapManager2::GetMapTree(uint32 mapId) const
|
||||
{
|
||||
// return the iterator if found or end() if not found/NULL
|
||||
auto itr = iInstanceMapTrees.find(mapId);
|
||||
if (itr != iInstanceMapTrees.cend() && !itr->second)
|
||||
itr = iInstanceMapTrees.cend();
|
||||
|
||||
return itr;
|
||||
}
|
||||
|
||||
void VMapManager2::InitializeThreadUnsafe(std::unordered_map<uint32, std::vector<uint32>> const& mapData)
|
||||
{
|
||||
// the caller must pass the list of all mapIds that will be used in the VMapManager2 lifetime
|
||||
for (uint32 const& mapId : mapIds)
|
||||
iInstanceMapTrees.insert(InstanceTreeMap::value_type(mapId, nullptr));
|
||||
iChildMapData = mapData;
|
||||
for (std::pair<uint32 const, std::vector<uint32>> const& mapId : mapData)
|
||||
{
|
||||
iInstanceMapTrees.insert(InstanceTreeMap::value_type(mapId.first, nullptr));
|
||||
for (uint32 childMapId : mapId.second)
|
||||
iParentMapData[childMapId] = mapId.first;
|
||||
}
|
||||
|
||||
thread_safe_environment = false;
|
||||
}
|
||||
@@ -87,8 +99,15 @@ namespace VMAP
|
||||
int result = VMAP_LOAD_RESULT_IGNORED;
|
||||
if (isMapLoadingEnabled())
|
||||
{
|
||||
if (_loadMap(mapId, basePath, x, y))
|
||||
if (loadSingleMap(mapId, basePath, x, y))
|
||||
{
|
||||
result = VMAP_LOAD_RESULT_OK;
|
||||
auto childMaps = iChildMapData.find(mapId);
|
||||
if (childMaps != iChildMapData.end())
|
||||
for (uint32 childMapId : childMaps->second)
|
||||
if (!loadSingleMap(childMapId, basePath, x, y))
|
||||
result = VMAP_LOAD_RESULT_ERROR;
|
||||
}
|
||||
else
|
||||
result = VMAP_LOAD_RESULT_ERROR;
|
||||
}
|
||||
@@ -96,27 +115,17 @@ namespace VMAP
|
||||
return result;
|
||||
}
|
||||
|
||||
InstanceTreeMap::const_iterator VMapManager2::GetMapTree(uint32 mapId) const
|
||||
{
|
||||
// return the iterator if found or end() if not found/NULL
|
||||
InstanceTreeMap::const_iterator itr = iInstanceMapTrees.find(mapId);
|
||||
if (itr != iInstanceMapTrees.cend() && !itr->second)
|
||||
itr = iInstanceMapTrees.cend();
|
||||
|
||||
return itr;
|
||||
}
|
||||
|
||||
// load one tile (internal use only)
|
||||
bool VMapManager2::_loadMap(uint32 mapId, const std::string& basePath, uint32 tileX, uint32 tileY)
|
||||
bool VMapManager2::loadSingleMap(uint32 mapId, const std::string& basePath, uint32 tileX, uint32 tileY)
|
||||
{
|
||||
InstanceTreeMap::iterator instanceTree = iInstanceMapTrees.find(mapId);
|
||||
auto instanceTree = iInstanceMapTrees.find(mapId);
|
||||
if (instanceTree == iInstanceMapTrees.end())
|
||||
{
|
||||
if (thread_safe_environment)
|
||||
instanceTree = iInstanceMapTrees.insert(InstanceTreeMap::value_type(mapId, nullptr)).first;
|
||||
else
|
||||
ASSERT(false, "Invalid mapId %u tile [%u, %u] passed to VMapManager2 after startup in thread unsafe environment",
|
||||
mapId, tileX, tileY);
|
||||
mapId, tileX, tileY);
|
||||
}
|
||||
|
||||
if (!instanceTree->second)
|
||||
@@ -134,12 +143,22 @@ namespace VMAP
|
||||
return instanceTree->second->LoadMapTile(tileX, tileY, this);
|
||||
}
|
||||
|
||||
void VMapManager2::unloadMap(unsigned int mapId)
|
||||
void VMapManager2::unloadMap(unsigned int mapId, int x, int y)
|
||||
{
|
||||
InstanceTreeMap::iterator instanceTree = iInstanceMapTrees.find(mapId);
|
||||
auto childMaps = iChildMapData.find(mapId);
|
||||
if (childMaps != iChildMapData.end())
|
||||
for (uint32 childMapId : childMaps->second)
|
||||
unloadSingleMap(childMapId, x, y);
|
||||
|
||||
unloadSingleMap(mapId, x, y);
|
||||
}
|
||||
|
||||
void VMapManager2::unloadSingleMap(uint32 mapId, int x, int y)
|
||||
{
|
||||
auto instanceTree = iInstanceMapTrees.find(mapId);
|
||||
if (instanceTree != iInstanceMapTrees.end() && instanceTree->second)
|
||||
{
|
||||
instanceTree->second->UnloadMap(this);
|
||||
instanceTree->second->UnloadMapTile(x, y, this);
|
||||
if (instanceTree->second->numLoadedTiles() == 0)
|
||||
{
|
||||
delete instanceTree->second;
|
||||
@@ -148,12 +167,22 @@ namespace VMAP
|
||||
}
|
||||
}
|
||||
|
||||
void VMapManager2::unloadMap(unsigned int mapId, int x, int y)
|
||||
void VMapManager2::unloadMap(unsigned int mapId)
|
||||
{
|
||||
InstanceTreeMap::iterator instanceTree = iInstanceMapTrees.find(mapId);
|
||||
auto childMaps = iChildMapData.find(mapId);
|
||||
if (childMaps != iChildMapData.end())
|
||||
for (uint32 childMapId : childMaps->second)
|
||||
unloadSingleMap(childMapId);
|
||||
|
||||
unloadSingleMap(mapId);
|
||||
}
|
||||
|
||||
void VMapManager2::unloadSingleMap(uint32 mapId)
|
||||
{
|
||||
auto instanceTree = iInstanceMapTrees.find(mapId);
|
||||
if (instanceTree != iInstanceMapTrees.end() && instanceTree->second)
|
||||
{
|
||||
instanceTree->second->UnloadMapTile(x, y, this);
|
||||
instanceTree->second->UnloadMap(this);
|
||||
if (instanceTree->second->numLoadedTiles() == 0)
|
||||
{
|
||||
delete instanceTree->second;
|
||||
@@ -167,15 +196,13 @@ namespace VMAP
|
||||
if (!isLineOfSightCalcEnabled() || IsVMAPDisabledForPtr(mapId, VMAP_DISABLE_LOS))
|
||||
return true;
|
||||
|
||||
InstanceTreeMap::const_iterator instanceTree = GetMapTree(mapId);
|
||||
auto instanceTree = GetMapTree(mapId);
|
||||
if (instanceTree != iInstanceMapTrees.end())
|
||||
{
|
||||
Vector3 pos1 = convertPositionToInternalRep(x1, y1, z1);
|
||||
Vector3 pos2 = convertPositionToInternalRep(x2, y2, z2);
|
||||
if (pos1 != pos2)
|
||||
{
|
||||
return instanceTree->second->isInLineOfSight(pos1, pos2, ignoreFlags);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -189,7 +216,7 @@ namespace VMAP
|
||||
{
|
||||
if (isLineOfSightCalcEnabled() && !IsVMAPDisabledForPtr(mapId, VMAP_DISABLE_LOS))
|
||||
{
|
||||
InstanceTreeMap::const_iterator instanceTree = GetMapTree(mapId);
|
||||
auto instanceTree = GetMapTree(mapId);
|
||||
if (instanceTree != iInstanceMapTrees.end())
|
||||
{
|
||||
Vector3 pos1 = convertPositionToInternalRep(x1, y1, z1);
|
||||
@@ -219,7 +246,7 @@ namespace VMAP
|
||||
{
|
||||
if (isHeightCalcEnabled() && !IsVMAPDisabledForPtr(mapId, VMAP_DISABLE_HEIGHT))
|
||||
{
|
||||
InstanceTreeMap::const_iterator instanceTree = GetMapTree(mapId);
|
||||
auto instanceTree = GetMapTree(mapId);
|
||||
if (instanceTree != iInstanceMapTrees.end())
|
||||
{
|
||||
Vector3 pos = convertPositionToInternalRep(x, y, z);
|
||||
@@ -238,7 +265,7 @@ namespace VMAP
|
||||
{
|
||||
if (!IsVMAPDisabledForPtr(mapId, VMAP_DISABLE_AREAFLAG))
|
||||
{
|
||||
InstanceTreeMap::const_iterator instanceTree = GetMapTree(mapId);
|
||||
auto instanceTree = GetMapTree(mapId);
|
||||
if (instanceTree != iInstanceMapTrees.end())
|
||||
{
|
||||
Vector3 pos = convertPositionToInternalRep(x, y, z);
|
||||
@@ -256,7 +283,7 @@ namespace VMAP
|
||||
{
|
||||
if (!IsVMAPDisabledForPtr(mapId, VMAP_DISABLE_LIQUIDSTATUS))
|
||||
{
|
||||
InstanceTreeMap::const_iterator instanceTree = GetMapTree(mapId);
|
||||
auto instanceTree = GetMapTree(mapId);
|
||||
if (instanceTree != iInstanceMapTrees.end())
|
||||
{
|
||||
LocationInfo info;
|
||||
@@ -290,7 +317,7 @@ namespace VMAP
|
||||
data.areaInfo = boost::in_place(adtId, rootId, groupId, flags);
|
||||
return;
|
||||
}
|
||||
InstanceTreeMap::const_iterator instanceTree = GetMapTree(mapId);
|
||||
auto instanceTree = GetMapTree(mapId);
|
||||
if (instanceTree != iInstanceMapTrees.end())
|
||||
{
|
||||
LocationInfo info;
|
||||
@@ -317,7 +344,7 @@ namespace VMAP
|
||||
//! Critical section, thread safe access to iLoadedModelFiles
|
||||
std::lock_guard<std::mutex> lock(LoadedModelFilesLock);
|
||||
|
||||
ModelFileMap::iterator model = iLoadedModelFiles.find(filename);
|
||||
auto model = iLoadedModelFiles.find(filename);
|
||||
if (model == iLoadedModelFiles.end())
|
||||
{
|
||||
WorldModel* worldmodel = new WorldModel();
|
||||
@@ -343,7 +370,7 @@ namespace VMAP
|
||||
//! Critical section, thread safe access to iLoadedModelFiles
|
||||
std::lock_guard<std::mutex> lock(LoadedModelFilesLock);
|
||||
|
||||
ModelFileMap::iterator model = iLoadedModelFiles.find(filename);
|
||||
auto model = iLoadedModelFiles.find(filename);
|
||||
if (model == iLoadedModelFiles.end())
|
||||
{
|
||||
VMAP_ERROR_LOG("misc", "VMapManager2: trying to unload non-loaded file '%s'", filename.c_str());
|
||||
@@ -359,7 +386,7 @@ namespace VMAP
|
||||
|
||||
LoadResult VMapManager2::existsMap(const char* basePath, unsigned int mapId, int x, int y)
|
||||
{
|
||||
return StaticMapTree::CanLoadMap(std::string(basePath), mapId, x, y);
|
||||
return StaticMapTree::CanLoadMap(std::string(basePath), mapId, x, y, this);
|
||||
}
|
||||
|
||||
void VMapManager2::getInstanceMapTree(InstanceTreeMap &instanceMapTree)
|
||||
@@ -367,4 +394,13 @@ namespace VMAP
|
||||
instanceMapTree = iInstanceMapTrees;
|
||||
}
|
||||
|
||||
int32 VMapManager2::getParentMapId(uint32 mapId) const
|
||||
{
|
||||
auto itr = iParentMapData.find(mapId);
|
||||
if (itr != iParentMapData.end())
|
||||
return int32(itr->second);
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
} // namespace VMAP
|
||||
@@ -81,13 +81,12 @@ namespace VMAP
|
||||
// Tree to check collision
|
||||
ModelFileMap iLoadedModelFiles;
|
||||
InstanceTreeMap iInstanceMapTrees;
|
||||
std::unordered_map<uint32, std::vector<uint32>> iChildMapData;
|
||||
std::unordered_map<uint32, uint32> iParentMapData;
|
||||
bool thread_safe_environment;
|
||||
// Mutex for iLoadedModelFiles
|
||||
std::mutex LoadedModelFilesLock;
|
||||
|
||||
bool _loadMap(uint32 mapId, const std::string& basePath, uint32 tileX, uint32 tileY);
|
||||
/* void _unloadMap(uint32 pMapId, uint32 x, uint32 y); */
|
||||
|
||||
static uint32 GetLiquidFlagsDummy(uint32) { return 0; }
|
||||
static bool IsVMAPDisabledForDummy(uint32 /*entry*/, uint8 /*flags*/) { return false; }
|
||||
|
||||
@@ -99,13 +98,18 @@ namespace VMAP
|
||||
static std::string getMapFileName(unsigned int mapId);
|
||||
|
||||
VMapManager2();
|
||||
~VMapManager2(void);
|
||||
~VMapManager2();
|
||||
|
||||
void InitializeThreadUnsafe(std::unordered_map<uint32, std::vector<uint32>> const& mapData);
|
||||
|
||||
void InitializeThreadUnsafe(const std::vector<uint32>& mapIds);
|
||||
int loadMap(const char* pBasePath, unsigned int mapId, int x, int y) override;
|
||||
bool loadSingleMap(uint32 mapId, const std::string& basePath, uint32 tileX, uint32 tileY);
|
||||
|
||||
void unloadMap(unsigned int mapId, int x, int y) override;
|
||||
void unloadSingleMap(uint32 mapId, int x, int y);
|
||||
|
||||
void unloadMap(unsigned int mapId) override;
|
||||
void unloadSingleMap(uint32 mapId);
|
||||
|
||||
bool isInLineOfSight(unsigned int mapId, float x1, float y1, float z1, float x2, float y2, float z2, ModelIgnoreFlags ignoreFlags) override ;
|
||||
/**
|
||||
@@ -132,6 +136,8 @@ namespace VMAP
|
||||
|
||||
void getInstanceMapTree(InstanceTreeMap &instanceMapTree);
|
||||
|
||||
int32 getParentMapId(uint32 mapId) const;
|
||||
|
||||
typedef uint32(*GetLiquidFlagsFn)(uint32 liquidType);
|
||||
GetLiquidFlagsFn GetLiquidFlagsPtr;
|
||||
|
||||
|
||||
@@ -236,8 +236,26 @@ namespace VMAP
|
||||
return(height);
|
||||
}
|
||||
|
||||
StaticMapTree::TileFileOpenResult StaticMapTree::OpenMapTileFile(std::string const& basePath, uint32 mapID, uint32 tileX, uint32 tileY, VMapManager2* vm)
|
||||
{
|
||||
TileFileOpenResult result;
|
||||
result.Name = basePath + getTileFileName(mapID, tileX, tileY);
|
||||
result.File = fopen(result.Name.c_str(), "rb");
|
||||
if (!result.File)
|
||||
{
|
||||
int32 parentMapId = vm->getParentMapId(mapID);
|
||||
if (parentMapId != -1)
|
||||
{
|
||||
result.Name = basePath + getTileFileName(parentMapId, tileX, tileY);
|
||||
result.File = fopen(result.Name.c_str(), "rb");
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
//=========================================================
|
||||
LoadResult StaticMapTree::CanLoadMap(const std::string &vmapPath, uint32 mapID, uint32 tileX, uint32 tileY)
|
||||
LoadResult StaticMapTree::CanLoadMap(const std::string &vmapPath, uint32 mapID, uint32 tileX, uint32 tileY, VMapManager2* vm)
|
||||
{
|
||||
std::string basePath = vmapPath;
|
||||
if (basePath.length() > 0 && basePath[basePath.length()-1] != '/' && basePath[basePath.length()-1] != '\\')
|
||||
@@ -259,8 +277,7 @@ namespace VMAP
|
||||
}
|
||||
if (tiled)
|
||||
{
|
||||
std::string tilefile = basePath + getTileFileName(mapID, tileX, tileY);
|
||||
FILE* tf = fopen(tilefile.c_str(), "rb");
|
||||
FILE* tf = OpenMapTileFile(basePath, mapID, tileX, tileY, vm).File;
|
||||
if (!tf)
|
||||
result = LoadResult::FileNotFound;
|
||||
else
|
||||
@@ -321,6 +338,22 @@ namespace VMAP
|
||||
}
|
||||
}
|
||||
|
||||
if (success)
|
||||
{
|
||||
success = readChunk(rf, chunk, "SIDX", 4);
|
||||
uint32 spawnIndicesSize = 0;
|
||||
uint32 spawnId;
|
||||
uint32 spawnIndex;
|
||||
if (success && fread(&spawnIndicesSize, sizeof(uint32), 1, rf) != 1) success = false;
|
||||
for (uint32 i = 0; i < spawnIndicesSize && success; ++i)
|
||||
{
|
||||
if (fread(&spawnId, sizeof(uint32), 1, rf) == 1 && fread(&spawnIndex, sizeof(uint32), 1, rf) == 1)
|
||||
iSpawnIndices[spawnId] = spawnIndex;
|
||||
else
|
||||
success = false;
|
||||
}
|
||||
}
|
||||
|
||||
fclose(rf);
|
||||
return success;
|
||||
}
|
||||
@@ -359,22 +392,21 @@ namespace VMAP
|
||||
}
|
||||
bool result = true;
|
||||
|
||||
std::string tilefile = iBasePath + getTileFileName(iMapID, tileX, tileY);
|
||||
FILE* tf = fopen(tilefile.c_str(), "rb");
|
||||
if (tf)
|
||||
TileFileOpenResult fileResult = OpenMapTileFile(iBasePath, iMapID, tileX, tileY, vm);
|
||||
if (fileResult.File)
|
||||
{
|
||||
char chunk[8];
|
||||
|
||||
if (!readChunk(tf, chunk, VMAP_MAGIC, 8))
|
||||
if (!readChunk(fileResult.File, chunk, VMAP_MAGIC, 8))
|
||||
result = false;
|
||||
uint32 numSpawns = 0;
|
||||
if (result && fread(&numSpawns, sizeof(uint32), 1, tf) != 1)
|
||||
if (result && fread(&numSpawns, sizeof(uint32), 1, fileResult.File) != 1)
|
||||
result = false;
|
||||
for (uint32 i=0; i<numSpawns && result; ++i)
|
||||
{
|
||||
// read model spawns
|
||||
ModelSpawn spawn;
|
||||
result = ModelSpawn::readFromFile(tf, spawn);
|
||||
result = ModelSpawn::readFromFile(fileResult.File, spawn);
|
||||
if (result)
|
||||
{
|
||||
// acquire model instance
|
||||
@@ -383,15 +415,15 @@ namespace VMAP
|
||||
VMAP_ERROR_LOG("misc", "StaticMapTree::LoadMapTile() : could not acquire WorldModel pointer [%u, %u]", tileX, tileY);
|
||||
|
||||
// update tree
|
||||
uint32 referencedVal;
|
||||
|
||||
if (fread(&referencedVal, sizeof(uint32), 1, tf) == 1)
|
||||
auto spawnIndex = iSpawnIndices.find(spawn.ID);
|
||||
if (spawnIndex != iSpawnIndices.end())
|
||||
{
|
||||
uint32 referencedVal = spawnIndex->second;
|
||||
if (!iLoadedSpawns.count(referencedVal))
|
||||
{
|
||||
if (referencedVal > iNTreeValues)
|
||||
if (referencedVal >= iNTreeValues)
|
||||
{
|
||||
VMAP_ERROR_LOG("maps", "StaticMapTree::LoadMapTile() : invalid tree element (%u/%u) referenced in tile %s", referencedVal, iNTreeValues, tilefile.c_str());
|
||||
VMAP_ERROR_LOG("maps", "StaticMapTree::LoadMapTile() : invalid tree element (%u/%u) referenced in tile %s", referencedVal, iNTreeValues, fileResult.Name.c_str());
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -414,7 +446,7 @@ namespace VMAP
|
||||
}
|
||||
}
|
||||
iLoadedTiles[packTileID(tileX, tileY)] = true;
|
||||
fclose(tf);
|
||||
fclose(fileResult.File);
|
||||
}
|
||||
else
|
||||
iLoadedTiles[packTileID(tileX, tileY)] = false;
|
||||
@@ -434,34 +466,33 @@ namespace VMAP
|
||||
}
|
||||
if (tile->second) // file associated with tile
|
||||
{
|
||||
std::string tilefile = iBasePath + getTileFileName(iMapID, tileX, tileY);
|
||||
FILE* tf = fopen(tilefile.c_str(), "rb");
|
||||
if (tf)
|
||||
TileFileOpenResult fileResult = OpenMapTileFile(iBasePath, iMapID, tileX, tileY, vm);
|
||||
if (fileResult.File)
|
||||
{
|
||||
bool result=true;
|
||||
char chunk[8];
|
||||
if (!readChunk(tf, chunk, VMAP_MAGIC, 8))
|
||||
if (!readChunk(fileResult.File, chunk, VMAP_MAGIC, 8))
|
||||
result = false;
|
||||
uint32 numSpawns;
|
||||
if (fread(&numSpawns, sizeof(uint32), 1, tf) != 1)
|
||||
if (fread(&numSpawns, sizeof(uint32), 1, fileResult.File) != 1)
|
||||
result = false;
|
||||
for (uint32 i=0; i<numSpawns && result; ++i)
|
||||
{
|
||||
// read model spawns
|
||||
ModelSpawn spawn;
|
||||
result = ModelSpawn::readFromFile(tf, spawn);
|
||||
result = ModelSpawn::readFromFile(fileResult.File, spawn);
|
||||
if (result)
|
||||
{
|
||||
// release model instance
|
||||
vm->releaseModelInstance(spawn.name);
|
||||
|
||||
// update tree
|
||||
uint32 referencedNode;
|
||||
|
||||
if (fread(&referencedNode, sizeof(uint32), 1, tf) != 1)
|
||||
auto spawnIndex = iSpawnIndices.find(spawn.ID);
|
||||
if (spawnIndex == iSpawnIndices.end())
|
||||
result = false;
|
||||
else
|
||||
{
|
||||
uint32 referencedNode = spawnIndex->second;
|
||||
if (!iLoadedSpawns.count(referencedNode))
|
||||
VMAP_ERROR_LOG("misc", "StaticMapTree::UnloadMapTile() : trying to unload non-referenced model '%s' (ID:%u)", spawn.name.c_str(), spawn.ID);
|
||||
else if (--iLoadedSpawns[referencedNode] == 0)
|
||||
@@ -472,7 +503,7 @@ namespace VMAP
|
||||
}
|
||||
}
|
||||
}
|
||||
fclose(tf);
|
||||
fclose(fileResult.File);
|
||||
}
|
||||
}
|
||||
iLoadedTiles.erase(tile);
|
||||
|
||||
@@ -51,23 +51,32 @@ namespace VMAP
|
||||
BIH iTree;
|
||||
ModelInstance* iTreeValues; // the tree entries
|
||||
uint32 iNTreeValues;
|
||||
std::unordered_map<uint32, uint32> iSpawnIndices;
|
||||
|
||||
// Store all the map tile idents that are loaded for that map
|
||||
// some maps are not splitted into tiles and we have to make sure, not removing the map before all tiles are removed
|
||||
// empty tiles have no tile file, hence map with bool instead of just a set (consistency check)
|
||||
loadedTileMap iLoadedTiles;
|
||||
std::vector<std::pair<int32, int32>> iLoadedPrimaryTiles;
|
||||
// stores <tree_index, reference_count> to invalidate tree values, unload map, and to be able to report errors
|
||||
loadedSpawnMap iLoadedSpawns;
|
||||
std::string iBasePath;
|
||||
|
||||
struct TileFileOpenResult
|
||||
{
|
||||
FILE* File;
|
||||
std::string Name;
|
||||
};
|
||||
|
||||
private:
|
||||
static TileFileOpenResult OpenMapTileFile(std::string const& basePath, uint32 mapID, uint32 tileX, uint32 tileY, VMapManager2* vm);
|
||||
bool getIntersectionTime(const G3D::Ray& pRay, float &pMaxDist, bool pStopAtFirstHit, ModelIgnoreFlags ignoreFlags) const;
|
||||
//bool containsLoadedMapTile(unsigned int pTileIdent) const { return(iLoadedMapTiles.containsKey(pTileIdent)); }
|
||||
public:
|
||||
static std::string getTileFileName(uint32 mapID, uint32 tileX, uint32 tileY);
|
||||
static uint32 packTileID(uint32 tileX, uint32 tileY) { return tileX<<16 | tileY; }
|
||||
static void unpackTileID(uint32 ID, uint32 &tileX, uint32 &tileY) { tileX = ID>>16; tileY = ID&0xFF; }
|
||||
static LoadResult CanLoadMap(const std::string &basePath, uint32 mapID, uint32 tileX, uint32 tileY);
|
||||
static void unpackTileID(uint32 ID, uint32 &tileX, uint32 &tileY) { tileX = ID >> 16; tileY = ID & 0xFF; }
|
||||
static LoadResult CanLoadMap(const std::string &basePath, uint32 mapID, uint32 tileX, uint32 tileY, VMapManager2* vm);
|
||||
|
||||
StaticMapTree(uint32 mapID, const std::string &basePath);
|
||||
~StaticMapTree();
|
||||
|
||||
@@ -84,7 +84,7 @@ namespace VMAP
|
||||
if (entry->second.flags & MOD_M2)
|
||||
{
|
||||
if (!calculateTransformedBound(entry->second))
|
||||
break;
|
||||
continue;
|
||||
}
|
||||
else if (entry->second.flags & MOD_WORLDSPAWN) // WMO maps and terrain maps use different origin, so we need to adapt :/
|
||||
{
|
||||
@@ -92,7 +92,7 @@ namespace VMAP
|
||||
//entry->second.iPos += Vector3(533.33333f*32, 533.33333f*32, 0.f);
|
||||
entry->second.iBound = entry->second.iBound + Vector3(533.33333f*32, 533.33333f*32, 0.f);
|
||||
}
|
||||
mapSpawns.push_back(&(entry->second));
|
||||
mapSpawns.push_back(&entry->second);
|
||||
spawnedModelFiles.insert(entry->second.name);
|
||||
}
|
||||
|
||||
@@ -110,10 +110,6 @@ namespace VMAP
|
||||
}
|
||||
|
||||
// ===> possibly move this code to StaticMapTree class
|
||||
std::map<uint32, uint32> modelNodeIdx;
|
||||
for (uint32 i=0; i<mapSpawns.size(); ++i)
|
||||
modelNodeIdx.insert(pair<uint32, uint32>(mapSpawns[i]->ID, i));
|
||||
|
||||
// write map tree file
|
||||
std::stringstream mapfilename;
|
||||
mapfilename << iDestDir << '/' << std::setfill('0') << std::setw(3) << map_iter->first << ".vmtree";
|
||||
@@ -139,7 +135,17 @@ namespace VMAP
|
||||
|
||||
for (TileMap::iterator glob=globalRange.first; glob != globalRange.second && success; ++glob)
|
||||
{
|
||||
success = ModelSpawn::writeToFile(mapfile, map_iter->second->UniqueEntries[glob->second]);
|
||||
success = ModelSpawn::writeToFile(mapfile, map_iter->second->UniqueEntries[glob->second.Id]);
|
||||
}
|
||||
|
||||
// spawn id to index map
|
||||
if (success && fwrite("SIDX", 4, 1, mapfile) != 1) success = false;
|
||||
uint32 mapSpawnsSize = mapSpawns.size();
|
||||
if (success && fwrite(&mapSpawnsSize, sizeof(uint32), 1, mapfile) != 1) success = false;
|
||||
for (uint32 i = 0; i < mapSpawnsSize; ++i)
|
||||
{
|
||||
if (success && fwrite(&mapSpawns[i]->ID, sizeof(uint32), 1, mapfile) != 1) success = false;
|
||||
if (success && fwrite(&i, sizeof(uint32), 1, mapfile) != 1) success = false;
|
||||
}
|
||||
|
||||
fclose(mapfile);
|
||||
@@ -151,8 +157,9 @@ namespace VMAP
|
||||
TileMap::iterator tile;
|
||||
for (tile = tileEntries.begin(); tile != tileEntries.end(); ++tile)
|
||||
{
|
||||
const ModelSpawn &spawn = map_iter->second->UniqueEntries[tile->second];
|
||||
if (spawn.flags & MOD_WORLDSPAWN) // WDT spawn, saved as tile 65/65 currently...
|
||||
if (tile->second.Flags & MOD_WORLDSPAWN) // WDT spawn, saved as tile 65/65 currently...
|
||||
continue;
|
||||
if (tile->second.Flags & MOD_PARENT_SPAWN) // tile belongs to parent map
|
||||
continue;
|
||||
uint32 nSpawns = tileEntries.count(tile->first);
|
||||
std::stringstream tilefilename;
|
||||
@@ -172,16 +179,12 @@ namespace VMAP
|
||||
{
|
||||
if (s)
|
||||
++tile;
|
||||
const ModelSpawn &spawn2 = map_iter->second->UniqueEntries[tile->second];
|
||||
const ModelSpawn &spawn2 = map_iter->second->UniqueEntries[tile->second.Id];
|
||||
success = success && ModelSpawn::writeToFile(tilefile, spawn2);
|
||||
// MapTree nodes to update when loading tile:
|
||||
std::map<uint32, uint32>::iterator nIdx = modelNodeIdx.find(spawn2.ID);
|
||||
if (success && fwrite(&nIdx->second, sizeof(uint32), 1, tilefile) != 1) success = false;
|
||||
}
|
||||
fclose(tilefile);
|
||||
}
|
||||
}
|
||||
// break; //test, extract only first map; TODO: remvoe this line
|
||||
}
|
||||
|
||||
// add an object models, listed in temp_gameobject_models file
|
||||
@@ -238,9 +241,9 @@ namespace VMAP
|
||||
printf("spawning Map %u\n", mapID);
|
||||
mapData[mapID] = current = new MapSpawns();
|
||||
}
|
||||
else current = (*map_iter).second;
|
||||
else current = map_iter->second;
|
||||
current->UniqueEntries.insert(pair<uint32, ModelSpawn>(spawn.ID, spawn));
|
||||
current->TileEntries.insert(pair<uint32, uint32>(StaticMapTree::packTileID(tileX, tileY), spawn.ID));
|
||||
current->TileEntries.insert(pair<uint32, TileSpawn>(StaticMapTree::packTileID(tileX, tileY), TileSpawn{ spawn.ID, spawn.flags }));
|
||||
}
|
||||
bool success = (ferror(dirf) == 0);
|
||||
fclose(dirf);
|
||||
|
||||
@@ -52,8 +52,14 @@ namespace VMAP
|
||||
void moveToBasePos(const G3D::Vector3& pBasePos) { iPos -= pBasePos; }
|
||||
};
|
||||
|
||||
struct TileSpawn
|
||||
{
|
||||
uint32 Id;
|
||||
uint32 Flags;
|
||||
};
|
||||
|
||||
typedef std::map<uint32, ModelSpawn> UniqueEntryMap;
|
||||
typedef std::multimap<uint32, uint32> TileMap;
|
||||
typedef std::multimap<uint32, TileSpawn> TileMap;
|
||||
|
||||
struct TC_COMMON_API MapSpawns
|
||||
{
|
||||
|
||||
@@ -152,12 +152,12 @@ GameObjectModel* GameObjectModel::Create(std::unique_ptr<GameObjectModelOwnerBas
|
||||
return mdl;
|
||||
}
|
||||
|
||||
bool GameObjectModel::intersectRay(G3D::Ray const& ray, float& maxDist, bool stopAtFirstHit, std::set<uint32> const& phases, VMAP::ModelIgnoreFlags ignoreFlags) const
|
||||
bool GameObjectModel::intersectRay(G3D::Ray const& ray, float& maxDist, bool stopAtFirstHit, PhaseShift const& phaseShift, VMAP::ModelIgnoreFlags ignoreFlags) const
|
||||
{
|
||||
if (!isCollisionEnabled() || !owner->IsSpawned())
|
||||
return false;
|
||||
|
||||
if (!owner->IsInPhase(phases))
|
||||
if (!owner->IsInPhase(phaseShift))
|
||||
return false;
|
||||
|
||||
float time = ray.intersectionTime(iBound);
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
|
||||
#include "Define.h"
|
||||
#include <memory>
|
||||
#include <set>
|
||||
|
||||
namespace VMAP
|
||||
{
|
||||
@@ -35,6 +34,7 @@ namespace VMAP
|
||||
}
|
||||
|
||||
class GameObject;
|
||||
class PhaseShift;
|
||||
struct GameObjectDisplayInfoEntry;
|
||||
|
||||
class TC_COMMON_API GameObjectModelOwnerBase
|
||||
@@ -42,7 +42,7 @@ class TC_COMMON_API GameObjectModelOwnerBase
|
||||
public:
|
||||
virtual bool IsSpawned() const { return false; }
|
||||
virtual uint32 GetDisplayId() const { return 0; }
|
||||
virtual bool IsInPhase(std::set<uint32> const& /*phases*/) const { return false; }
|
||||
virtual bool IsInPhase(PhaseShift const& /*phaseShift*/) const { return false; }
|
||||
virtual G3D::Vector3 GetPosition() const { return G3D::Vector3::zero(); }
|
||||
virtual float GetOrientation() const { return 0.0f; }
|
||||
virtual float GetScale() const { return 1.0f; }
|
||||
@@ -66,7 +66,7 @@ public:
|
||||
void enableCollision(bool enable) { _collisionEnabled = enable; }
|
||||
bool isCollisionEnabled() const { return _collisionEnabled; }
|
||||
|
||||
bool intersectRay(G3D::Ray const& ray, float& maxDist, bool stopAtFirstHit, std::set<uint32> const& phases, VMAP::ModelIgnoreFlags ignoreFlags) const;
|
||||
bool intersectRay(G3D::Ray const& ray, float& maxDist, bool stopAtFirstHit, PhaseShift const& phaseShift, VMAP::ModelIgnoreFlags ignoreFlags) const;
|
||||
|
||||
static GameObjectModel* Create(std::unique_ptr<GameObjectModelOwnerBase> modelOwner, std::string const& dataPath);
|
||||
|
||||
|
||||
@@ -36,8 +36,9 @@ namespace VMAP
|
||||
enum ModelFlags
|
||||
{
|
||||
MOD_M2 = 1,
|
||||
MOD_WORLDSPAWN = 1<<1,
|
||||
MOD_HAS_BOUND = 1<<2
|
||||
MOD_WORLDSPAWN = 1 << 1,
|
||||
MOD_HAS_BOUND = 1 << 2,
|
||||
MOD_PARENT_SPAWN = 1 << 3
|
||||
};
|
||||
|
||||
class TC_COMMON_API ModelSpawn
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
|
||||
namespace VMAP
|
||||
{
|
||||
const char VMAP_MAGIC[] = "VMAP_4.4";
|
||||
const char RAW_VMAP_MAGIC[] = "VMAP044"; // used in extracted vmap files with raw data
|
||||
const char VMAP_MAGIC[] = "VMAP_4.5";
|
||||
const char RAW_VMAP_MAGIC[] = "VMAP045"; // used in extracted vmap files with raw data
|
||||
const char GAMEOBJECT_MODELS[] = "GameObjectModels.dtree";
|
||||
|
||||
// defined in TileAssembler.cpp currently...
|
||||
|
||||
File renamed without changes.
@@ -47,6 +47,13 @@ class TC_SHARED_API DBCFileLoader
|
||||
EndianConvert(val);
|
||||
return val;
|
||||
}
|
||||
int32 getInt(size_t field) const
|
||||
{
|
||||
assert(field < file.fieldCount);
|
||||
int32 val = *reinterpret_cast<int32*>(offset + file.GetOffset(field));
|
||||
EndianConvert(val);
|
||||
return val;
|
||||
}
|
||||
uint8 getUInt8(size_t field) const
|
||||
{
|
||||
assert(field < file.fieldCount);
|
||||
@@ -55,6 +55,7 @@ inline LPTSTR ErrorMessage(DWORD dw)
|
||||
TCHAR WheatyExceptionReport::m_szLogFileName[MAX_PATH];
|
||||
TCHAR WheatyExceptionReport::m_szDumpFileName[MAX_PATH];
|
||||
LPTOP_LEVEL_EXCEPTION_FILTER WheatyExceptionReport::m_previousFilter;
|
||||
_invalid_parameter_handler WheatyExceptionReport::m_previousCrtHandler;
|
||||
HANDLE WheatyExceptionReport::m_hReportFile;
|
||||
HANDLE WheatyExceptionReport::m_hDumpFile;
|
||||
HANDLE WheatyExceptionReport::m_hProcess;
|
||||
@@ -75,6 +76,7 @@ WheatyExceptionReport::WheatyExceptionReport() // Constructor
|
||||
{
|
||||
// Install the unhandled exception filter function
|
||||
m_previousFilter = SetUnhandledExceptionFilter(WheatyUnhandledExceptionFilter);
|
||||
m_previousCrtHandler = _set_invalid_parameter_handler(WheatyCrtHandler);
|
||||
m_hProcess = GetCurrentProcess();
|
||||
stackOverflowException = false;
|
||||
alreadyCrashed = false;
|
||||
@@ -95,6 +97,8 @@ WheatyExceptionReport::~WheatyExceptionReport()
|
||||
{
|
||||
if (m_previousFilter)
|
||||
SetUnhandledExceptionFilter(m_previousFilter);
|
||||
if (m_previousCrtHandler)
|
||||
_set_invalid_parameter_handler(m_previousCrtHandler);
|
||||
ClearSymbols();
|
||||
}
|
||||
|
||||
@@ -183,6 +187,11 @@ PEXCEPTION_POINTERS pExceptionInfo)
|
||||
return EXCEPTION_EXECUTE_HANDLER/*EXCEPTION_CONTINUE_SEARCH*/;
|
||||
}
|
||||
|
||||
void __cdecl WheatyExceptionReport::WheatyCrtHandler(wchar_t const* /*expression*/, wchar_t const* /*function*/, wchar_t const* /*file*/, unsigned int /*line*/, uintptr_t /*pReserved*/)
|
||||
{
|
||||
RaiseException(EXCEPTION_ACCESS_VIOLATION, 0, 0, nullptr);
|
||||
}
|
||||
|
||||
BOOL WheatyExceptionReport::_GetProcessorName(TCHAR* sProcessorName, DWORD maxcount)
|
||||
{
|
||||
if (!sProcessorName)
|
||||
|
||||
@@ -155,6 +155,8 @@ class WheatyExceptionReport
|
||||
static LONG WINAPI WheatyUnhandledExceptionFilter(
|
||||
PEXCEPTION_POINTERS pExceptionInfo);
|
||||
|
||||
static void __cdecl WheatyCrtHandler(wchar_t const* expression, wchar_t const* function, wchar_t const* file, unsigned int line, uintptr_t pReserved);
|
||||
|
||||
static void printTracesForAllThreads(bool);
|
||||
private:
|
||||
// where report info is extracted and generated
|
||||
@@ -192,6 +194,7 @@ class WheatyExceptionReport
|
||||
static TCHAR m_szLogFileName[MAX_PATH];
|
||||
static TCHAR m_szDumpFileName[MAX_PATH];
|
||||
static LPTOP_LEVEL_EXCEPTION_FILTER m_previousFilter;
|
||||
static _invalid_parameter_handler m_previousCrtHandler;
|
||||
static HANDLE m_hReportFile;
|
||||
static HANDLE m_hDumpFile;
|
||||
static HANDLE m_hProcess;
|
||||
|
||||
@@ -21,6 +21,16 @@ char const* GitRevision::GetCMakeCommand()
|
||||
return _CMAKE_COMMAND;
|
||||
}
|
||||
|
||||
char const* GitRevision::GetCMakeVersion()
|
||||
{
|
||||
return _CMAKE_VERSION;
|
||||
}
|
||||
|
||||
char const* GitRevision::GetHostOSVersion()
|
||||
{
|
||||
return _CMAKE_HOST_SYSTEM;
|
||||
}
|
||||
|
||||
char const* GitRevision::GetBuildDirectory()
|
||||
{
|
||||
return _BUILD_DIRECTORY;
|
||||
|
||||
@@ -27,6 +27,8 @@ namespace GitRevision
|
||||
TC_COMMON_API char const* GetDate();
|
||||
TC_COMMON_API char const* GetBranch();
|
||||
TC_COMMON_API char const* GetCMakeCommand();
|
||||
TC_COMMON_API char const* GetCMakeVersion();
|
||||
TC_COMMON_API char const* GetHostOSVersion();
|
||||
TC_COMMON_API char const* GetBuildDirectory();
|
||||
TC_COMMON_API char const* GetSourceDirectory();
|
||||
TC_COMMON_API char const* GetMySQLExecutable();
|
||||
|
||||
@@ -132,7 +132,7 @@ namespace Trinity
|
||||
* Note: container cannot be empty
|
||||
*/
|
||||
template<class C, class Fn>
|
||||
auto SelectRandomWeightedContainerElement(C const& container, Fn weightExtractor) -> decltype(std::begin(container))
|
||||
inline auto SelectRandomWeightedContainerElement(C const& container, Fn weightExtractor) -> decltype(std::begin(container))
|
||||
{
|
||||
std::vector<double> weights;
|
||||
weights.reserve(Size(container));
|
||||
@@ -175,7 +175,7 @@ namespace Trinity
|
||||
* @return true if containers have a common element, false otherwise.
|
||||
*/
|
||||
template<class Iterator1, class Iterator2>
|
||||
bool Intersects(Iterator1 first1, Iterator1 last1, Iterator2 first2, Iterator2 last2)
|
||||
inline bool Intersects(Iterator1 first1, Iterator1 last1, Iterator2 first2, Iterator2 last2)
|
||||
{
|
||||
while (first1 != last1 && first2 != last2)
|
||||
{
|
||||
@@ -190,6 +190,37 @@ namespace Trinity
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @fn bool Trinity::Containers::Intersects(Iterator first1, Iterator last1, Iterator first2, Iterator last2, Predicate&& equalPred)
|
||||
*
|
||||
* @brief Checks if two SORTED containers have a common element
|
||||
*
|
||||
* @param first1 Iterator pointing to start of the first container
|
||||
* @param last1 Iterator pointing to end of the first container
|
||||
* @param first2 Iterator pointing to start of the second container
|
||||
* @param last2 Iterator pointing to end of the second container
|
||||
* @param equalPred Additional predicate to exclude elements
|
||||
*
|
||||
* @return true if containers have a common element, false otherwise.
|
||||
*/
|
||||
template<class Iterator1, class Iterator2, class Predicate>
|
||||
inline bool Intersects(Iterator1 first1, Iterator1 last1, Iterator2 first2, Iterator2 last2, Predicate&& equalPred)
|
||||
{
|
||||
while (first1 != last1 && first2 != last2)
|
||||
{
|
||||
if (*first1 < *first2)
|
||||
++first1;
|
||||
else if (*first2 < *first1)
|
||||
++first2;
|
||||
else if (!equalPred(*first1, *first2))
|
||||
++first1, ++first2;
|
||||
else
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a pointer to mapped value (or the value itself if map stores pointers)
|
||||
*/
|
||||
@@ -201,7 +232,7 @@ namespace Trinity
|
||||
}
|
||||
|
||||
template<class K, class V, template<class, class, class...> class M, class... Rest>
|
||||
void MultimapErasePair(M<K, V, Rest...>& multimap, K const& key, V const& value)
|
||||
inline void MultimapErasePair(M<K, V, Rest...>& multimap, K const& key, V const& value)
|
||||
{
|
||||
auto range = multimap.equal_range(key);
|
||||
for (auto itr = range.first; itr != range.second; )
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2018 TrinityCore <https://www.trinitycore.org/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef EnumClassFlag_h__
|
||||
#define EnumClassFlag_h__
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
template<typename T>
|
||||
class EnumClassFlag
|
||||
{
|
||||
static_assert(std::is_enum<T>::value, "EnumClassFlag must be used only with enums");
|
||||
|
||||
public:
|
||||
/*implicit*/ EnumClassFlag(T value) : _value(value) { }
|
||||
|
||||
EnumClassFlag& operator&=(EnumClassFlag right)
|
||||
{
|
||||
_value = static_cast<T>(static_cast<std::underlying_type_t<T>>(_value) & static_cast<std::underlying_type_t<T>>(right._value));
|
||||
return *this;
|
||||
}
|
||||
|
||||
friend EnumClassFlag operator&(EnumClassFlag left, EnumClassFlag right)
|
||||
{
|
||||
return left &= right;
|
||||
}
|
||||
|
||||
EnumClassFlag operator|=(EnumClassFlag right)
|
||||
{
|
||||
_value = static_cast<T>(static_cast<std::underlying_type_t<T>>(_value) | static_cast<std::underlying_type_t<T>>(right._value));
|
||||
return *this;
|
||||
}
|
||||
|
||||
friend EnumClassFlag operator|(EnumClassFlag left, EnumClassFlag right)
|
||||
{
|
||||
return left |= right;
|
||||
}
|
||||
|
||||
EnumClassFlag operator~() const
|
||||
{
|
||||
return static_cast<T>(~static_cast<std::underlying_type_t<T>>(_value));
|
||||
}
|
||||
|
||||
void RemoveFlag(EnumClassFlag flag)
|
||||
{
|
||||
_value = static_cast<T>(static_cast<std::underlying_type_t<T>>(_value) & ~static_cast<std::underlying_type_t<T>>(flag._value));
|
||||
}
|
||||
|
||||
bool HasFlag(T flag) const
|
||||
{
|
||||
return (static_cast<std::underlying_type_t<T>>(_value) & static_cast<std::underlying_type_t<T>>(flag)) != 0;
|
||||
}
|
||||
|
||||
operator T() const
|
||||
{
|
||||
return _value;
|
||||
}
|
||||
|
||||
std::underlying_type_t<T> AsUnderlyingType() const
|
||||
{
|
||||
return static_cast<std::underlying_type_t<T>>(_value);
|
||||
}
|
||||
|
||||
private:
|
||||
T _value;
|
||||
};
|
||||
|
||||
#endif // EnumClassFlag_h__
|
||||
@@ -29,6 +29,7 @@
|
||||
#include "Language.h"
|
||||
#include "ObjectDefines.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "PhasingHandler.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "ScriptedGossip.h"
|
||||
#include "SmartAI.h"
|
||||
@@ -1130,7 +1131,12 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
break;
|
||||
|
||||
for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
|
||||
(*itr)->SetInPhase(e.action.ingamePhaseId.id, true, e.action.ingamePhaseId.apply == 1);
|
||||
{
|
||||
if (e.action.ingamePhaseId.apply == 1)
|
||||
PhasingHandler::AddPhase(*itr, e.action.ingamePhaseId.id, true);
|
||||
else
|
||||
PhasingHandler::RemovePhase(*itr, e.action.ingamePhaseId.id, true);
|
||||
}
|
||||
|
||||
delete targets;
|
||||
break;
|
||||
@@ -1142,11 +1148,13 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
if (!targets)
|
||||
break;
|
||||
|
||||
std::set<uint32> const& phases = GetPhasesForGroup(e.action.ingamePhaseGroup.groupId);
|
||||
|
||||
for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
|
||||
for (auto phase : phases)
|
||||
(*itr)->SetInPhase(phase, true, e.action.ingamePhaseGroup.apply == 1);
|
||||
{
|
||||
if (e.action.ingamePhaseGroup.apply == 1)
|
||||
PhasingHandler::AddPhaseGroup(*itr, e.action.ingamePhaseGroup.groupId, true);
|
||||
else
|
||||
PhasingHandler::RemovePhaseGroup(*itr, e.action.ingamePhaseGroup.groupId, true);
|
||||
}
|
||||
|
||||
delete targets;
|
||||
break;
|
||||
@@ -3366,6 +3374,8 @@ void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, ui
|
||||
if ((e.event.los.noHostile && !me->IsHostileTo(unit)) ||
|
||||
(!e.event.los.noHostile && me->IsHostileTo(unit)))
|
||||
{
|
||||
if (e.event.los.playerOnly && unit->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
RecalcTimer(e, e.event.los.cooldownMin, e.event.los.cooldownMax);
|
||||
ProcessAction(e, unit);
|
||||
}
|
||||
@@ -3386,6 +3396,8 @@ void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, ui
|
||||
if ((e.event.los.noHostile && !me->IsHostileTo(unit)) ||
|
||||
(!e.event.los.noHostile && me->IsHostileTo(unit)))
|
||||
{
|
||||
if (e.event.los.playerOnly && unit->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
RecalcTimer(e, e.event.los.cooldownMin, e.event.los.cooldownMax);
|
||||
ProcessAction(e, unit);
|
||||
}
|
||||
|
||||
@@ -1326,7 +1326,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (phaseGroup && GetPhasesForGroup(phaseGroup).empty())
|
||||
if (phaseGroup && GetPhasesForGroup(phaseGroup))
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "SmartScript: SMART_ACTION_SET_INGAME_PHASE_GROUP uses invalid phase group id %u for creature %u, skipped", phaseGroup, e.entryOrGuid);
|
||||
return false;
|
||||
|
||||
@@ -226,6 +226,7 @@ struct SmartEvent
|
||||
uint32 maxDist;
|
||||
uint32 cooldownMin;
|
||||
uint32 cooldownMax;
|
||||
uint32 playerOnly;
|
||||
} los;
|
||||
|
||||
struct
|
||||
|
||||
@@ -767,6 +767,9 @@ enum RBACPermissions
|
||||
RBAC_PERM_COMMAND_RELOAD_QUEST_GREETING_LOCALE = 867,
|
||||
RBAC_PERM_COMMAND_MODIFY_POWER = 868, // reserved
|
||||
RBAC_PERM_COMMAND_DEBUG_SEND_PLAYER_CHOICE = 869, // reserved
|
||||
RBAC_PERM_COMMAND_DEBUG_THREATINFO = 870,
|
||||
RBAC_PERM_COMMAND_DEBUG_INSTANCESPAWN = 871,
|
||||
RBAC_PERM_COMMAND_SERVER_DEBUG = 872,
|
||||
//
|
||||
// IF YOU ADD NEW PERMISSIONS, ADD THEM IN MASTER BRANCH AS WELL!
|
||||
//
|
||||
|
||||
@@ -1208,7 +1208,7 @@ LocaleConstant ChatHandler::GetSessionDbcLocale() const
|
||||
return m_session->GetSessionDbcLocale();
|
||||
}
|
||||
|
||||
int ChatHandler::GetSessionDbLocaleIndex() const
|
||||
LocaleConstant ChatHandler::GetSessionDbLocaleIndex() const
|
||||
{
|
||||
return m_session->GetSessionDbLocaleIndex();
|
||||
}
|
||||
@@ -1304,7 +1304,7 @@ LocaleConstant CliHandler::GetSessionDbcLocale() const
|
||||
return sWorld->GetDefaultDbcLocale();
|
||||
}
|
||||
|
||||
int CliHandler::GetSessionDbLocaleIndex() const
|
||||
LocaleConstant CliHandler::GetSessionDbLocaleIndex() const
|
||||
{
|
||||
return sObjectMgr->GetDBCLocaleIndex();
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ class TC_GAME_API ChatHandler
|
||||
virtual std::string GetNameLink() const { return GetNameLink(m_session->GetPlayer()); }
|
||||
virtual bool needReportToTarget(Player* chr) const;
|
||||
virtual LocaleConstant GetSessionDbcLocale() const;
|
||||
virtual int GetSessionDbLocaleIndex() const;
|
||||
virtual LocaleConstant GetSessionDbLocaleIndex() const;
|
||||
|
||||
bool HasLowerSecurity(Player* target, ObjectGuid guid, bool strong = false);
|
||||
bool HasLowerSecurityAccount(WorldSession* target, uint32 account, bool strong = false);
|
||||
@@ -178,7 +178,7 @@ class TC_GAME_API CliHandler : public ChatHandler
|
||||
std::string GetNameLink() const override;
|
||||
bool needReportToTarget(Player* chr) const override;
|
||||
LocaleConstant GetSessionDbcLocale() const override;
|
||||
int GetSessionDbLocaleIndex() const override;
|
||||
LocaleConstant GetSessionDbLocaleIndex() const override;
|
||||
|
||||
private:
|
||||
void* m_callbackArg;
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "GameEventMgr.h"
|
||||
#include "InstanceScript.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "PhasingHandler.h"
|
||||
#include "Player.h"
|
||||
#include "Pet.h"
|
||||
#include "ReputationMgr.h"
|
||||
@@ -402,7 +403,7 @@ bool Condition::Meets(ConditionSourceInfo& sourceInfo) const
|
||||
}
|
||||
case CONDITION_PHASEID:
|
||||
{
|
||||
condMeets = object->IsInPhase(ConditionValue1);
|
||||
condMeets = object->GetPhaseShift().HasPhase(ConditionValue1);
|
||||
break;
|
||||
}
|
||||
case CONDITION_TITLE:
|
||||
@@ -430,7 +431,7 @@ bool Condition::Meets(ConditionSourceInfo& sourceInfo) const
|
||||
}
|
||||
case CONDITION_TERRAIN_SWAP:
|
||||
{
|
||||
condMeets = object->IsInTerrainSwap(ConditionValue1);
|
||||
condMeets = object->GetPhaseShift().HasVisibleMapId(ConditionValue1);
|
||||
break;
|
||||
}
|
||||
case CONDITION_REALM_ACHIEVEMENT:
|
||||
@@ -1040,17 +1041,7 @@ void ConditionMgr::LoadConditions(bool isReload)
|
||||
|
||||
sSpellMgr->UnloadSpellInfoImplicitTargetConditionLists();
|
||||
|
||||
TC_LOG_INFO("misc", "Re-Loading `terrain_phase_info` Table for Conditions!");
|
||||
sObjectMgr->LoadTerrainPhaseInfo();
|
||||
|
||||
TC_LOG_INFO("misc", "Re-Loading `terrain_swap_defaults` Table for Conditions!");
|
||||
sObjectMgr->LoadTerrainSwapDefaults();
|
||||
|
||||
TC_LOG_INFO("misc", "Re-Loading `terrain_worldmap` Table for Conditions!");
|
||||
sObjectMgr->LoadTerrainWorldMaps();
|
||||
|
||||
TC_LOG_INFO("misc", "Re-Loading `phase_area` Table for Conditions!");
|
||||
sObjectMgr->LoadAreaPhases();
|
||||
sObjectMgr->UnloadPhaseConditions();
|
||||
}
|
||||
|
||||
QueryResult result = WorldDatabase.Query("SELECT SourceTypeOrReferenceId, SourceGroup, SourceEntry, SourceId, ElseGroup, ConditionTypeOrReference, ConditionTarget, "
|
||||
@@ -1337,17 +1328,44 @@ bool ConditionMgr::addToSpellImplicitTargetConditions(Condition* cond) const
|
||||
std::list<uint32> sharedMasks;
|
||||
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
|
||||
{
|
||||
// check if effect is already a part of some shared mask
|
||||
bool found = false;
|
||||
for (std::list<uint32>::iterator itr = sharedMasks.begin(); itr != sharedMasks.end(); ++itr)
|
||||
// additional checks by condition type
|
||||
if (conditionEffMask & (1 << i))
|
||||
{
|
||||
if ((1<<i) & *itr)
|
||||
switch (cond->ConditionType)
|
||||
{
|
||||
found = true;
|
||||
break;
|
||||
case CONDITION_OBJECT_ENTRY_GUID:
|
||||
{
|
||||
uint32 implicitTargetMask = GetTargetFlagMask(spellInfo->Effects[i].TargetA.GetObjectType()) | GetTargetFlagMask(spellInfo->Effects[i].TargetB.GetObjectType());
|
||||
if ((implicitTargetMask & TARGET_FLAG_UNIT_MASK) && cond->ConditionValue1 != TYPEID_UNIT && cond->ConditionValue1 != TYPEID_PLAYER)
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "%s in `condition` table - spell %u EFFECT_%u - "
|
||||
"target requires ConditionValue1 to be either TYPEID_UNIT (%u) or TYPEID_PLAYER (%u)", cond->ToString().c_str(), spellInfo->Id, uint32(i), uint32(TYPEID_UNIT), uint32(TYPEID_PLAYER));
|
||||
return false;
|
||||
}
|
||||
|
||||
if ((implicitTargetMask & TARGET_FLAG_GAMEOBJECT_MASK) && cond->ConditionValue1 != TYPEID_GAMEOBJECT)
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "%s in `condition` table - spell %u EFFECT_%u - "
|
||||
"target requires ConditionValue1 to be TYPEID_GAMEOBJECT (%u)", cond->ToString().c_str(), spellInfo->Id, uint32(i), uint32(TYPEID_GAMEOBJECT));
|
||||
return false;
|
||||
}
|
||||
|
||||
if ((implicitTargetMask & TARGET_FLAG_CORPSE_MASK) && cond->ConditionValue1 != TYPEID_CORPSE)
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "%s in `condition` table - spell %u EFFECT_%u - "
|
||||
"target requires ConditionValue1 to be TYPEID_CORPSE (%u)", cond->ToString().c_str(), spellInfo->Id, uint32(i), uint32(TYPEID_CORPSE));
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (found)
|
||||
|
||||
// check if effect is already a part of some shared mask
|
||||
auto itr = std::find_if(sharedMasks.begin(), sharedMasks.end(), [i](uint32 mask) { return !!(mask & (1 << i)); });
|
||||
if (itr != sharedMasks.end())
|
||||
continue;
|
||||
|
||||
// build new shared mask with found effect
|
||||
@@ -1361,14 +1379,14 @@ bool ConditionMgr::addToSpellImplicitTargetConditions(Condition* cond) const
|
||||
sharedMasks.push_back(sharedMask);
|
||||
}
|
||||
|
||||
for (std::list<uint32>::iterator itr = sharedMasks.begin(); itr != sharedMasks.end(); ++itr)
|
||||
for (uint32 effectMask : sharedMasks)
|
||||
{
|
||||
// some effect indexes should have same data
|
||||
if (uint32 commonMask = *itr & conditionEffMask)
|
||||
if (uint32 commonMask = effectMask & conditionEffMask)
|
||||
{
|
||||
uint8 firstEffIndex = 0;
|
||||
for (; firstEffIndex < MAX_SPELL_EFFECTS; ++firstEffIndex)
|
||||
if ((1<<firstEffIndex) & *itr)
|
||||
if ((1 << firstEffIndex) & effectMask)
|
||||
break;
|
||||
|
||||
if (firstEffIndex >= MAX_SPELL_EFFECTS)
|
||||
@@ -1381,7 +1399,7 @@ bool ConditionMgr::addToSpellImplicitTargetConditions(Condition* cond) const
|
||||
if (sharedList)
|
||||
{
|
||||
// we have overlapping masks in db
|
||||
if (conditionEffMask != *itr)
|
||||
if (conditionEffMask != effectMask)
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "%s in `condition` table, has incorrect SourceGroup %u (spell effectMask) set - "
|
||||
"effect masks are overlapping (all SourceGroup values having given bit set must be equal) - ignoring.", cond->ToString().c_str(), cond->SourceGroup);
|
||||
@@ -1396,7 +1414,7 @@ bool ConditionMgr::addToSpellImplicitTargetConditions(Condition* cond) const
|
||||
bool assigned = false;
|
||||
for (uint8 i = firstEffIndex; i < MAX_SPELL_EFFECTS; ++i)
|
||||
{
|
||||
if ((1<<i) & commonMask)
|
||||
if ((1 << i) & commonMask)
|
||||
{
|
||||
spellInfo->Effects[i].ImplicitTargetConditions = sharedList;
|
||||
assigned = true;
|
||||
@@ -1417,24 +1435,32 @@ bool ConditionMgr::addToPhases(Condition* cond) const
|
||||
{
|
||||
if (!cond->SourceEntry)
|
||||
{
|
||||
PhaseInfo& p = sObjectMgr->GetAreaPhasesForLoading();
|
||||
for (auto phaseItr = p.begin(); phaseItr != p.end(); ++phaseItr)
|
||||
if (PhaseInfoStruct const* phaseInfo = sObjectMgr->GetPhaseInfo(cond->SourceGroup))
|
||||
{
|
||||
for (PhaseInfoStruct& phase : phaseItr->second)
|
||||
bool found = false;
|
||||
for (uint32 areaId : phaseInfo->Areas)
|
||||
{
|
||||
if (phase.Id == cond->SourceGroup)
|
||||
if (std::vector<PhaseAreaInfo>* phases = const_cast<std::vector<PhaseAreaInfo>*>(sObjectMgr->GetPhasesForArea(areaId)))
|
||||
{
|
||||
phase.Conditions.push_back(cond);
|
||||
return true;
|
||||
for (PhaseAreaInfo& phase : *phases)
|
||||
{
|
||||
if (phase.PhaseInfo->Id == cond->SourceGroup)
|
||||
{
|
||||
phase.Conditions.push_back(cond);
|
||||
found = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (found)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if (std::vector<PhaseInfoStruct>* phases = sObjectMgr->GetPhasesForAreaForLoading(cond->SourceEntry))
|
||||
else if (std::vector<PhaseAreaInfo>* phases = const_cast<std::vector<PhaseAreaInfo>*>(sObjectMgr->GetPhasesForArea(cond->SourceEntry)))
|
||||
{
|
||||
for (PhaseInfoStruct& phase : *phases)
|
||||
for (PhaseAreaInfo& phase : *phases)
|
||||
{
|
||||
if (phase.Id == cond->SourceGroup)
|
||||
if (phase.PhaseInfo->Id == cond->SourceGroup)
|
||||
{
|
||||
phase.Conditions.push_back(cond);
|
||||
return true;
|
||||
|
||||
@@ -466,6 +466,23 @@ enum MountCapabilityFlags
|
||||
MOUNT_CAPABIILTY_FLAG_IGNORE_RESTRICTIONS = 0x20,
|
||||
};
|
||||
|
||||
enum PhaseEntryFlags : uint16
|
||||
{
|
||||
PHASE_FLAG_NORMAL = 0x08,
|
||||
PHASE_FLAG_COSMETIC = 0x10,
|
||||
PHASE_FLAG_PERSONAL = 0x20
|
||||
};
|
||||
|
||||
// PhaseUseFlags fields in different DBCs
|
||||
enum PhaseUseFlagsValues : uint8
|
||||
{
|
||||
PHASE_USE_FLAGS_NONE = 0x0,
|
||||
PHASE_USE_FLAGS_ALWAYS_VISIBLE = 0x1,
|
||||
PHASE_USE_FLAGS_INVERSE = 0x2,
|
||||
|
||||
PHASE_USE_FLAGS_ALL = PHASE_USE_FLAGS_ALWAYS_VISIBLE | PHASE_USE_FLAGS_INVERSE
|
||||
};
|
||||
|
||||
enum SkillRaceClassInfoFlags
|
||||
{
|
||||
SKILL_FLAG_NO_SKILLUP_MESSAGE = 0x2,
|
||||
|
||||
@@ -558,7 +558,7 @@ void LoadDBCStores(const std::string& dataPath)
|
||||
for (uint32 i = 0; i < sPhaseGroupStore.GetNumRows(); ++i)
|
||||
if (PhaseGroupEntry const* group = sPhaseGroupStore.LookupEntry(i))
|
||||
if (PhaseEntry const* phase = sPhaseStore.LookupEntry(group->PhaseId))
|
||||
sPhasesByGroup[group->GroupId].insert(phase->ID);
|
||||
sPhasesByGroup[group->GroupId].push_back(phase->ID);
|
||||
|
||||
LoadDBC(availableDbcLocales, bad_dbc_files, sPowerDisplayStore, dbcPath, "PowerDisplay.dbc");
|
||||
|
||||
@@ -1360,9 +1360,9 @@ SkillRaceClassInfoEntry const* GetSkillRaceClassInfo(uint32 skill, uint8 race, u
|
||||
return NULL;
|
||||
}
|
||||
|
||||
std::set<uint32> const& GetPhasesForGroup(uint32 group)
|
||||
std::vector<uint32> const* GetPhasesForGroup(uint32 group)
|
||||
{
|
||||
return sPhasesByGroup[group];
|
||||
return &sPhasesByGroup[group];
|
||||
}
|
||||
|
||||
ResponseCodes ValidateName(std::wstring const& name, LocaleConstant locale)
|
||||
|
||||
@@ -81,7 +81,7 @@ TC_GAME_API LFGDungeonEntry const* GetLFGDungeon(uint32 mapId, Difficulty diffic
|
||||
|
||||
uint32 GetDefaultMapLight(uint32 mapId);
|
||||
|
||||
TC_GAME_API std::set<uint32> const& GetPhasesForGroup(uint32 group);
|
||||
TC_GAME_API std::vector<uint32> const* GetPhasesForGroup(uint32 group);
|
||||
|
||||
typedef std::unordered_multimap<uint32, SkillRaceClassInfoEntry const*> SkillRaceClassInfoMap;
|
||||
typedef std::pair<SkillRaceClassInfoMap::iterator, SkillRaceClassInfoMap::iterator> SkillRaceClassInfoBounds;
|
||||
@@ -254,7 +254,7 @@ TC_GAME_API extern DBCStorage <UnitPowerBarEntry> sUnitPowerBarStore;
|
||||
TC_GAME_API extern DBCStorage <VehicleEntry> sVehicleStore;
|
||||
TC_GAME_API extern DBCStorage <VehicleSeatEntry> sVehicleSeatStore;
|
||||
TC_GAME_API extern DBCStorage <WMOAreaTableEntry> sWMOAreaTableStore;
|
||||
//TC_GAME_API extern DBCStorage <WorldMapAreaEntry> sWorldMapAreaStore; -- use Zone2MapCoordinates and Map2ZoneCoordinates
|
||||
TC_GAME_API extern DBCStorage <WorldMapAreaEntry> sWorldMapAreaStore;
|
||||
TC_GAME_API extern DBCStorage <WorldMapOverlayEntry> sWorldMapOverlayStore;
|
||||
TC_GAME_API extern DBCStorage <WorldSafeLocsEntry> sWorldSafeLocsStore;
|
||||
|
||||
|
||||
@@ -1604,7 +1604,7 @@ struct PhaseEntry
|
||||
{
|
||||
uint32 ID; // 0
|
||||
char* Name; // 1
|
||||
uint32 flag; // 2
|
||||
uint32 Flags; // 2
|
||||
};
|
||||
|
||||
struct PhaseGroupEntry
|
||||
@@ -2737,5 +2737,5 @@ typedef std::vector<TaxiPathNodeList> TaxiPathNodesByPath;
|
||||
#define TaxiMaskSize 114
|
||||
typedef uint8 TaxiMask[TaxiMaskSize];
|
||||
|
||||
typedef std::unordered_map<uint32, std::set<uint32>> PhaseGroupContainer;
|
||||
typedef std::unordered_map<uint32, std::vector<uint32>> PhaseGroupContainer;
|
||||
#endif
|
||||
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
|
||||
#include "ObjectAccessor.h"
|
||||
#include "PhasingHandler.h"
|
||||
#include "Unit.h"
|
||||
#include "SpellInfo.h"
|
||||
#include "Log.h"
|
||||
@@ -78,7 +79,7 @@ bool AreaTrigger::CreateAreaTrigger(uint32 guidlow, uint32 triggerEntry, Unit* c
|
||||
SetFloatValue(AREATRIGGER_FINAL_POS + 1, pos.GetPositionY());
|
||||
SetFloatValue(AREATRIGGER_FINAL_POS + 2, pos.GetPositionZ());
|
||||
|
||||
CopyPhaseFrom(caster);
|
||||
PhasingHandler::InheritPhaseShift(this, caster);
|
||||
|
||||
if (!GetMap()->AddToMap(this))
|
||||
return false;
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "Player.h"
|
||||
#include "UpdateMask.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "PhasingHandler.h"
|
||||
#include "DatabaseEnv.h"
|
||||
#include "World.h"
|
||||
|
||||
@@ -86,7 +87,7 @@ bool Corpse::Create(ObjectGuid::LowType guidlow, Player* owner)
|
||||
|
||||
_cellCoord = Trinity::ComputeCellCoord(GetPositionX(), GetPositionY());
|
||||
|
||||
CopyPhaseFrom(owner);
|
||||
PhasingHandler::InheritPhaseShift(this, owner);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -116,12 +117,12 @@ void Corpse::SaveToDB()
|
||||
stmt->setUInt32(index++, GetInstanceId()); // instanceId
|
||||
trans->Append(stmt);
|
||||
|
||||
for (uint32 phaseId : GetPhases())
|
||||
for (PhaseShift::PhaseRef const& phase : GetPhaseShift().GetPhases())
|
||||
{
|
||||
index = 0;
|
||||
stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_CORPSE_PHASES);
|
||||
stmt->setUInt32(index++, GetOwnerGUID().GetCounter()); // OwnerGuid
|
||||
stmt->setUInt32(index++, phaseId); // PhaseId
|
||||
stmt->setUInt32(index++, phase.Id); // PhaseId
|
||||
trans->Append(stmt);
|
||||
}
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
#include "LootMgr.h"
|
||||
#include "MoveSpline.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "PhasingHandler.h"
|
||||
#include "Player.h"
|
||||
#include "PoolMgr.h"
|
||||
#include "QuestDef.h"
|
||||
@@ -897,12 +898,11 @@ bool Creature::Create(ObjectGuid::LowType guidlow, Map* map, uint32 /*phaseMask*
|
||||
ASSERT(map);
|
||||
SetMap(map);
|
||||
|
||||
if (data && data->phaseid)
|
||||
SetInPhase(data->phaseid, false, true);
|
||||
|
||||
if (data && data->phaseGroup)
|
||||
for (auto ph : GetPhasesForGroup(data->phaseGroup))
|
||||
SetInPhase(ph, false, true);
|
||||
if (data)
|
||||
{
|
||||
PhasingHandler::InitDbPhaseShift(GetPhaseShift(), data->phaseUseFlags, data->phaseId, data->phaseGroup);
|
||||
PhasingHandler::InitDbVisibleMapId(GetPhaseShift(), data->terrainSwapMap);
|
||||
}
|
||||
|
||||
CreatureTemplate const* cinfo = sObjectMgr->GetCreatureTemplate(entry);
|
||||
if (!cinfo)
|
||||
@@ -1166,7 +1166,7 @@ void Creature::SaveToDB(uint32 mapid, uint8 spawnMask, uint32 phaseMask)
|
||||
data.unit_flags = unit_flags;
|
||||
data.dynamicflags = dynamicflags;
|
||||
|
||||
data.phaseid = GetDBPhase() > 0 ? GetDBPhase() : 0;
|
||||
data.phaseId = GetDBPhase() > 0 ? GetDBPhase() : 0;
|
||||
data.phaseGroup = GetDBPhase() < 0 ? abs(GetDBPhase()) : 0;
|
||||
|
||||
// update in DB
|
||||
@@ -1185,7 +1185,7 @@ void Creature::SaveToDB(uint32 mapid, uint8 spawnMask, uint32 phaseMask)
|
||||
stmt->setUInt16(index++, uint16(mapid));
|
||||
stmt->setUInt8(index++, spawnMask);
|
||||
stmt->setUInt32(index++, GetPhaseMask());
|
||||
stmt->setUInt32(index++, data.phaseid);
|
||||
stmt->setUInt32(index++, data.phaseId);
|
||||
stmt->setUInt32(index++, data.phaseGroup);
|
||||
stmt->setUInt32(index++, displayId);
|
||||
stmt->setInt32(index++, int32(GetCurrentEquipmentId()));
|
||||
@@ -1446,7 +1446,7 @@ bool Creature::LoadCreatureFromDB(ObjectGuid::LowType spawnId, Map* map, bool ad
|
||||
m_deathState = DEAD;
|
||||
if (CanFly())
|
||||
{
|
||||
float tz = map->GetHeight(GetPhases(), data->posX, data->posY, data->posZ, true, MAX_FALL_DISTANCE);
|
||||
float tz = map->GetHeight(GetPhaseShift(), data->posX, data->posY, data->posZ, true, MAX_FALL_DISTANCE);
|
||||
if (data->posZ - tz > 0.1f && Trinity::IsValidMapCoord(tz))
|
||||
Relocate(data->posX, data->posY, tz);
|
||||
}
|
||||
@@ -2731,7 +2731,7 @@ void Creature::UpdateMovementFlags()
|
||||
return;
|
||||
|
||||
// Set the movement flags if the creature is in that mode. (Only fly if actually in air, only swim if in water, etc)
|
||||
float ground = GetFloorZ();
|
||||
float ground = GetMap()->GetHeight(GetPhaseShift(), GetPositionX(), GetPositionY(), GetPositionZMinusOffset());
|
||||
|
||||
bool isInAir = (G3D::fuzzyGt(GetPositionZMinusOffset(), ground + 0.05f) || G3D::fuzzyLt(GetPositionZMinusOffset(), ground - 0.05f)); // Can be underground too, prevent the falling
|
||||
|
||||
|
||||
@@ -275,7 +275,8 @@ struct CreatureData
|
||||
CreatureData() : id(0), mapid(0), phaseMask(0), displayid(0), equipmentId(0),
|
||||
posX(0.0f), posY(0.0f), posZ(0.0f), orientation(0.0f), spawntimesecs(0),
|
||||
spawndist(0.0f), currentwaypoint(0), curhealth(0), curmana(0), movementType(0),
|
||||
spawnMask(0), npcflag(0), unit_flags(0), dynamicflags(0), phaseid(0), phaseGroup(0), ScriptId(0), dbData(true) { }
|
||||
spawnMask(0), npcflag(0), unit_flags(0), dynamicflags(0), phaseUseFlags(0),
|
||||
phaseId(0), phaseGroup(0), terrainSwapMap(-1), ScriptId(0), dbData(true) { }
|
||||
uint32 id; // entry in creature_template
|
||||
uint16 mapid;
|
||||
uint32 phaseMask;
|
||||
@@ -295,8 +296,10 @@ struct CreatureData
|
||||
uint32 npcflag;
|
||||
uint32 unit_flags; // enum UnitFlags mask values
|
||||
uint32 dynamicflags;
|
||||
uint32 phaseid;
|
||||
uint8 phaseUseFlags;
|
||||
uint32 phaseId;
|
||||
uint32 phaseGroup;
|
||||
int32 terrainSwapMap;
|
||||
uint32 ScriptId;
|
||||
bool dbData;
|
||||
};
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include "GroupMgr.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "OutdoorPvPMgr.h"
|
||||
#include "PhasingHandler.h"
|
||||
#include "PoolMgr.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "SpellMgr.h"
|
||||
@@ -907,15 +908,8 @@ bool GameObject::LoadGameObjectFromDB(ObjectGuid::LowType spawnId, Map* map, boo
|
||||
if (!Create(map->GenerateLowGuid<HighGuid::GameObject>(), entry, map, phaseMask, pos, data->rotation, animprogress, go_state, artKit))
|
||||
return false;
|
||||
|
||||
if (data->phaseid)
|
||||
SetInPhase(data->phaseid, false, true);
|
||||
|
||||
if (data->phaseGroup)
|
||||
{
|
||||
// Set the gameobject in all the phases of the phasegroup
|
||||
for (auto ph : GetPhasesForGroup(data->phaseGroup))
|
||||
SetInPhase(ph, false, true);
|
||||
}
|
||||
PhasingHandler::InitDbPhaseShift(GetPhaseShift(), data->phaseUseFlags, data->phaseId, data->phaseGroup);
|
||||
PhasingHandler::InitDbVisibleMapId(GetPhaseShift(), data->terrainSwapMap);
|
||||
|
||||
if (data->spawntimesecs >= 0)
|
||||
{
|
||||
@@ -2476,7 +2470,6 @@ public:
|
||||
|
||||
virtual bool IsSpawned() const override { return _owner->isSpawned(); }
|
||||
virtual uint32 GetDisplayId() const override { return _owner->GetDisplayId(); }
|
||||
virtual bool IsInPhase(std::set<uint32> const& phases) const override { return _owner->IsInPhase(phases); }
|
||||
virtual G3D::Vector3 GetPosition() const override { return G3D::Vector3(_owner->GetPositionX(), _owner->GetPositionY(), _owner->GetPositionZ()); }
|
||||
virtual float GetOrientation() const override { return _owner->GetOrientation(); }
|
||||
virtual float GetScale() const override { return _owner->GetObjectScale(); }
|
||||
|
||||
@@ -644,7 +644,8 @@ enum GOState
|
||||
struct GameObjectData
|
||||
{
|
||||
explicit GameObjectData() : id(0), mapid(0), phaseMask(0), posX(0.0f), posY(0.0f), posZ(0.0f), orientation(0.0f), spawntimesecs(0),
|
||||
animprogress(0), go_state(GO_STATE_ACTIVE), spawnMask(0), artKit(0), phaseid(0), phaseGroup(0), ScriptId(0), dbData(true) { }
|
||||
animprogress(0), go_state(GO_STATE_ACTIVE), spawnMask(0), artKit(0), phaseUseFlags(0), phaseId(0),
|
||||
phaseGroup(0), terrainSwapMap(-1), ScriptId(0), dbData(true) { }
|
||||
uint32 id; // entry in gamobject_template
|
||||
uint16 mapid;
|
||||
uint32 phaseMask;
|
||||
@@ -658,8 +659,10 @@ struct GameObjectData
|
||||
GOState go_state;
|
||||
uint8 spawnMask;
|
||||
uint8 artKit;
|
||||
uint32 phaseid;
|
||||
uint8 phaseUseFlags;
|
||||
uint32 phaseId;
|
||||
uint32 phaseGroup;
|
||||
int32 terrainSwapMap;
|
||||
uint32 ScriptId;
|
||||
bool dbData;
|
||||
};
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
#include "TemporarySummon.h"
|
||||
#include "Totem.h"
|
||||
#include "OutdoorPvPMgr.h"
|
||||
#include "PhasingHandler.h"
|
||||
#include "MovementPacketBuilder.h"
|
||||
#include "DynamicTree.h"
|
||||
#include "Unit.h"
|
||||
@@ -1298,7 +1299,7 @@ void WorldObject::_Create(ObjectGuid::LowType guidlow, HighGuid guidhigh, uint32
|
||||
void WorldObject::UpdatePositionData()
|
||||
{
|
||||
PositionFullTerrainStatus data;
|
||||
GetMap()->GetFullTerrainStatusForPosition(GetPositionX(), GetPositionY(), GetPositionZ(), data);
|
||||
GetMap()->GetFullTerrainStatusForPosition(GetPhaseShift(), GetPositionX(), GetPositionY(), GetPositionZ(), data);
|
||||
ProcessPositionDataChanged(data);
|
||||
}
|
||||
|
||||
@@ -1314,7 +1315,7 @@ void WorldObject::ProcessPositionDataChanged(PositionFullTerrainStatus const& da
|
||||
void WorldObject::AddToWorld()
|
||||
{
|
||||
Object::AddToWorld();
|
||||
GetBaseMap()->GetZoneAndAreaId(m_zoneId, m_areaId, GetPositionX(), GetPositionY(), GetPositionZ());
|
||||
GetBaseMap()->GetZoneAndAreaId(GetPhaseShift(), m_zoneId, m_areaId, GetPositionX(), GetPositionY(), GetPositionZ());
|
||||
}
|
||||
|
||||
void WorldObject::RemoveFromWorld()
|
||||
@@ -1464,7 +1465,7 @@ bool WorldObject::IsWithinLOS(float ox, float oy, float oz, LineOfSightChecks ch
|
||||
else
|
||||
GetHitSpherePointFor({ ox, oy, oz }, x, y, z);
|
||||
|
||||
return GetMap()->isInLineOfSight(x, y, z + 2.0f, ox, oy, oz + 2.0f, GetPhases(), checks, ignoreFlags);
|
||||
return GetMap()->isInLineOfSight(GetPhaseShift(), x, y, z + 2.0f, ox, oy, oz + 2.0f, checks, ignoreFlags);
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -1639,7 +1640,7 @@ Position WorldObject::GetRandomPoint(const Position &srcPos, float distance) con
|
||||
|
||||
void WorldObject::UpdateGroundPositionZ(float x, float y, float &z) const
|
||||
{
|
||||
float new_z = GetMap()->GetHeight(GetPhases(), x, y, z + 2.0f, true);
|
||||
float new_z = GetMap()->GetHeight(GetPhaseShift(), x, y, z + 2.0f, true);
|
||||
if (new_z > INVALID_HEIGHT)
|
||||
z = new_z + 0.05f; // just to be sure that we are not a few pixel under the surface
|
||||
}
|
||||
@@ -1661,8 +1662,8 @@ void WorldObject::UpdateAllowedPositionZ(float x, float y, float &z) const
|
||||
bool canSwim = ToCreature()->CanSwim();
|
||||
float ground_z = z;
|
||||
float max_z = canSwim
|
||||
? GetMap()->GetWaterOrGroundLevel(GetPhases(), x, y, z, &ground_z, !ToUnit()->HasAuraType(SPELL_AURA_WATER_WALK))
|
||||
: ((ground_z = GetMap()->GetHeight(GetPhases(), x, y, z, true)));
|
||||
? GetMap()->GetWaterOrGroundLevel(GetPhaseShift(), x, y, z, &ground_z, !ToUnit()->HasAuraType(SPELL_AURA_WATER_WALK))
|
||||
: ((ground_z = GetMap()->GetHeight(GetPhaseShift(), x, y, z, true)));
|
||||
if (max_z > INVALID_HEIGHT)
|
||||
{
|
||||
if (z > max_z)
|
||||
@@ -1673,7 +1674,7 @@ void WorldObject::UpdateAllowedPositionZ(float x, float y, float &z) const
|
||||
}
|
||||
else
|
||||
{
|
||||
float ground_z = GetMap()->GetHeight(GetPhases(), x, y, z, true);
|
||||
float ground_z = GetMap()->GetHeight(GetPhaseShift(), x, y, z, true);
|
||||
if (z < ground_z)
|
||||
z = ground_z;
|
||||
}
|
||||
@@ -1685,7 +1686,7 @@ void WorldObject::UpdateAllowedPositionZ(float x, float y, float &z) const
|
||||
if (!ToPlayer()->CanFly())
|
||||
{
|
||||
float ground_z = z;
|
||||
float max_z = GetMap()->GetWaterOrGroundLevel(GetPhases(), x, y, z, &ground_z, !ToUnit()->HasAuraType(SPELL_AURA_WATER_WALK));
|
||||
float max_z = GetMap()->GetWaterOrGroundLevel(GetPhaseShift(), x, y, z, &ground_z, !ToUnit()->HasAuraType(SPELL_AURA_WATER_WALK));
|
||||
if (max_z > INVALID_HEIGHT)
|
||||
{
|
||||
if (z > max_z)
|
||||
@@ -1696,7 +1697,7 @@ void WorldObject::UpdateAllowedPositionZ(float x, float y, float &z) const
|
||||
}
|
||||
else
|
||||
{
|
||||
float ground_z = GetMap()->GetHeight(GetPhases(), x, y, z, true);
|
||||
float ground_z = GetMap()->GetHeight(GetPhaseShift(), x, y, z, true);
|
||||
if (z < ground_z)
|
||||
z = ground_z;
|
||||
}
|
||||
@@ -1704,7 +1705,7 @@ void WorldObject::UpdateAllowedPositionZ(float x, float y, float &z) const
|
||||
}
|
||||
default:
|
||||
{
|
||||
float ground_z = GetMap()->GetHeight(GetPhases(), x, y, z, true);
|
||||
float ground_z = GetMap()->GetHeight(GetPhaseShift(), x, y, z, true);
|
||||
if (ground_z > INVALID_HEIGHT)
|
||||
z = ground_z;
|
||||
break;
|
||||
@@ -2118,7 +2119,8 @@ TempSummon* Map::SummonCreature(uint32 entry, Position const& pos, SummonPropert
|
||||
}
|
||||
|
||||
// Set the summon to the summoner's phase
|
||||
summon->CopyPhaseFrom(summoner);
|
||||
if (summoner)
|
||||
PhasingHandler::InheritPhaseShift(summon, summoner);
|
||||
|
||||
summon->SetUInt32Value(UNIT_CREATED_BY_SPELL, spellId);
|
||||
|
||||
@@ -2222,7 +2224,7 @@ GameObject* WorldObject::SummonGameObject(uint32 entry, Position const& pos, G3D
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
go->CopyPhaseFrom(this);
|
||||
PhasingHandler::InheritPhaseShift(go, this);
|
||||
|
||||
go->SetRespawnTime(respawnTime);
|
||||
if (GetTypeId() == TYPEID_PLAYER || (GetTypeId() == TYPEID_UNIT && summonType == GO_SUMMON_TIMED_OR_CORPSE_DESPAWN)) //not sure how to handle this
|
||||
@@ -2448,8 +2450,8 @@ void WorldObject::MovePosition(Position &pos, float dist, float angle)
|
||||
return;
|
||||
}
|
||||
|
||||
ground = GetMap()->GetHeight(GetPhases(), destx, desty, MAX_HEIGHT, true);
|
||||
floor = GetMap()->GetHeight(GetPhases(), destx, desty, pos.m_positionZ, true);
|
||||
ground = GetMap()->GetHeight(GetPhaseShift(), destx, desty, MAX_HEIGHT, true);
|
||||
floor = GetMap()->GetHeight(GetPhaseShift(), destx, desty, pos.m_positionZ, true);
|
||||
destz = std::fabs(ground - pos.m_positionZ) <= std::fabs(floor - pos.m_positionZ) ? ground : floor;
|
||||
|
||||
float step = dist/10.0f;
|
||||
@@ -2461,8 +2463,8 @@ void WorldObject::MovePosition(Position &pos, float dist, float angle)
|
||||
{
|
||||
destx -= step * std::cos(angle);
|
||||
desty -= step * std::sin(angle);
|
||||
ground = GetMap()->GetHeight(GetPhases(), destx, desty, MAX_HEIGHT, true);
|
||||
floor = GetMap()->GetHeight(GetPhases(), destx, desty, pos.m_positionZ, true);
|
||||
ground = GetMap()->GetHeight(GetPhaseShift(), destx, desty, MAX_HEIGHT, true);
|
||||
floor = GetMap()->GetHeight(GetPhaseShift(), destx, desty, pos.m_positionZ, true);
|
||||
destz = std::fabs(ground - pos.m_positionZ) <= std::fabs(floor - pos.m_positionZ) ? ground : floor;
|
||||
}
|
||||
// we have correct destz now
|
||||
@@ -2482,8 +2484,8 @@ void WorldObject::MovePosition(Position &pos, float dist, float angle)
|
||||
// @todo: replace with WorldObject::UpdateAllowedPositionZ
|
||||
float NormalizeZforCollision(WorldObject* obj, float x, float y, float z)
|
||||
{
|
||||
float ground = obj->GetMap()->GetHeight(obj->GetPhases(), x, y, MAX_HEIGHT, true);
|
||||
float floor = obj->GetMap()->GetHeight(obj->GetPhases(), x, y, z + 2.0f, true);
|
||||
float ground = obj->GetMap()->GetHeight(obj->GetPhaseShift(), x, y, MAX_HEIGHT, true);
|
||||
float floor = obj->GetMap()->GetHeight(obj->GetPhaseShift(), x, y, z + 2.0f, true);
|
||||
float helper = std::fabs(ground - z) <= std::fabs(floor - z) ? ground : floor;
|
||||
if (z > helper) // must be above ground
|
||||
{
|
||||
@@ -2493,7 +2495,7 @@ float NormalizeZforCollision(WorldObject* obj, float x, float y, float z)
|
||||
return z;
|
||||
}
|
||||
LiquidData liquid_status;
|
||||
ZLiquidStatus res = obj->GetMap()->GetLiquidStatus(x, y, z, MAP_ALL_LIQUIDS, &liquid_status);
|
||||
ZLiquidStatus res = obj->GetMap()->GetLiquidStatus(obj->GetPhaseShift(), x, y, z, MAP_ALL_LIQUIDS, &liquid_status);
|
||||
if (res && liquid_status.level > helper) // water must be above ground
|
||||
{
|
||||
if (liquid_status.level > z) // z is underwater
|
||||
@@ -2520,7 +2522,8 @@ void WorldObject::MovePositionToFirstCollision(Position &pos, float dist, float
|
||||
}
|
||||
|
||||
destz = NormalizeZforCollision(this, destx, desty, pos.GetPositionZ());
|
||||
bool col = VMAP::VMapFactory::createOrGetVMapManager()->getObjectHitPos(GetMapId(), pos.m_positionX, pos.m_positionY, pos.m_positionZ + 0.5f, destx, desty, destz + 0.5f, destx, desty, destz, -0.5f);
|
||||
bool col = VMAP::VMapFactory::createOrGetVMapManager()->getObjectHitPos(PhasingHandler::GetTerrainMapId(GetPhaseShift(), GetMap(), pos.m_positionX, pos.m_positionY),
|
||||
pos.m_positionX, pos.m_positionY, pos.m_positionZ + 0.5f, destx, desty, destz + 0.5f, destx, desty, destz, -0.5f);
|
||||
|
||||
// collision occured
|
||||
if (col)
|
||||
@@ -2532,7 +2535,7 @@ void WorldObject::MovePositionToFirstCollision(Position &pos, float dist, float
|
||||
}
|
||||
|
||||
// check dynamic collision
|
||||
col = GetMap()->getObjectHitPos(GetPhases(), pos.m_positionX, pos.m_positionY, pos.m_positionZ + 0.5f, destx, desty, destz + 0.5f, destx, desty, destz, -0.5f);
|
||||
col = GetMap()->getObjectHitPos(GetPhaseShift(), pos.m_positionX, pos.m_positionY, pos.m_positionZ + 0.5f, destx, desty, destz + 0.5f, destx, desty, destz, -0.5f);
|
||||
|
||||
// Collided with a gameobject
|
||||
if (col)
|
||||
@@ -2575,165 +2578,6 @@ void WorldObject::SetPhaseMask(uint32 newPhaseMask, bool update)
|
||||
UpdateObjectVisibility();
|
||||
}
|
||||
|
||||
bool WorldObject::HasInPhaseList(uint32 phase)
|
||||
{
|
||||
return _phases.find(phase) != _phases.end();
|
||||
}
|
||||
|
||||
// Updates Area based phases, does not remove phases from auras
|
||||
// Phases from gm commands are not taken into calculations, they can be lost!!
|
||||
void WorldObject::UpdateAreaPhase()
|
||||
{
|
||||
bool updateNeeded = false;
|
||||
PhaseInfo const& phases = sObjectMgr->GetAreaPhases();
|
||||
for (PhaseInfo::const_iterator itr = phases.begin(); itr != phases.end(); ++itr)
|
||||
{
|
||||
uint32 areaId = itr->first;
|
||||
for (PhaseInfoStruct const& phase : itr->second)
|
||||
{
|
||||
if (areaId == GetAreaId())
|
||||
{
|
||||
if (sConditionMgr->IsObjectMeetToConditions(this, phase.Conditions))
|
||||
{
|
||||
// add new phase if condition passed, true if it wasnt added before
|
||||
bool up = SetInPhase(phase.Id, false, true);
|
||||
if (!updateNeeded && up)
|
||||
updateNeeded = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
// condition failed, remove phase, true if there was something removed
|
||||
bool up = SetInPhase(phase.Id, false, false);
|
||||
if (!updateNeeded && up)
|
||||
updateNeeded = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// not in area, remove phase, true if there was something removed
|
||||
bool up = SetInPhase(phase.Id, false, false);
|
||||
if (!updateNeeded && up)
|
||||
updateNeeded = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// do not remove a phase if it would be removed by an area but we have the same phase from an aura
|
||||
if (Unit* unit = ToUnit())
|
||||
{
|
||||
Unit::AuraEffectList const& auraPhaseList = unit->GetAuraEffectsByType(SPELL_AURA_PHASE);
|
||||
for (Unit::AuraEffectList::const_iterator itr = auraPhaseList.begin(); itr != auraPhaseList.end(); ++itr)
|
||||
{
|
||||
uint32 phase = uint32((*itr)->GetMiscValueB());
|
||||
bool up = SetInPhase(phase, false, true);
|
||||
if (!updateNeeded && up)
|
||||
updateNeeded = true;
|
||||
}
|
||||
Unit::AuraEffectList const& auraPhaseGroupList = unit->GetAuraEffectsByType(SPELL_AURA_PHASE_GROUP);
|
||||
for (Unit::AuraEffectList::const_iterator itr = auraPhaseGroupList.begin(); itr != auraPhaseGroupList.end(); ++itr)
|
||||
{
|
||||
bool up = false;
|
||||
uint32 phaseGroup = uint32((*itr)->GetMiscValueB());
|
||||
std::set<uint32> const& phases = GetPhasesForGroup(phaseGroup);
|
||||
for (uint32 phase : phases)
|
||||
up = SetInPhase(phase, false, true);
|
||||
if (!updateNeeded && up)
|
||||
updateNeeded = true;
|
||||
}
|
||||
}
|
||||
|
||||
// only update visibility and send packets if there was a change in the phase list
|
||||
if (updateNeeded && GetTypeId() == TYPEID_PLAYER && IsInWorld())
|
||||
ToPlayer()->GetSession()->SendSetPhaseShift(GetPhases(), GetTerrainSwaps(), GetWorldMapAreaSwaps());
|
||||
|
||||
// only update visibilty once, to prevent objects appearing for a moment while adding in multiple phases
|
||||
if (updateNeeded && IsInWorld())
|
||||
UpdateObjectVisibility();
|
||||
}
|
||||
|
||||
bool WorldObject::SetInPhase(uint32 id, bool update, bool apply)
|
||||
{
|
||||
if (id)
|
||||
{
|
||||
if (apply)
|
||||
{
|
||||
if (HasInPhaseList(id)) // do not run the updates if we are already in this phase
|
||||
return false;
|
||||
|
||||
_phases.insert(id);
|
||||
}
|
||||
else
|
||||
{
|
||||
// if area phase passes the condition we should not remove it (ie: if remove called from aura remove)
|
||||
// this however breaks the .mod phase command, you wont be able to remove any area based phases with it
|
||||
PhaseInfo const& phases = sObjectMgr->GetAreaPhases();
|
||||
for (PhaseInfo::const_iterator itr = phases.begin(); itr != phases.end(); ++itr)
|
||||
if (itr->first == GetAreaId() || itr->first == GetZoneId())
|
||||
for (PhaseInfoStruct const& phase : itr->second)
|
||||
if (id == phase.Id)
|
||||
if (sConditionMgr->IsObjectMeetToConditions(this, phase.Conditions))
|
||||
return false;
|
||||
|
||||
if (!HasInPhaseList(id)) // do not run the updates if we are not in this phase
|
||||
return false;
|
||||
|
||||
_phases.erase(id);
|
||||
}
|
||||
}
|
||||
|
||||
RebuildTerrainSwaps();
|
||||
|
||||
if (update && IsInWorld())
|
||||
UpdateObjectVisibility();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void WorldObject::CopyPhaseFrom(WorldObject* obj, bool update)
|
||||
{
|
||||
if (!obj)
|
||||
return;
|
||||
|
||||
for (uint32 phase : obj->GetPhases())
|
||||
SetInPhase(phase, false, true);
|
||||
|
||||
if (update && IsInWorld())
|
||||
UpdateObjectVisibility();
|
||||
}
|
||||
|
||||
void WorldObject::ClearPhases(bool update)
|
||||
{
|
||||
_phases.clear();
|
||||
|
||||
RebuildTerrainSwaps();
|
||||
|
||||
if (update && IsInWorld())
|
||||
UpdateObjectVisibility();
|
||||
}
|
||||
|
||||
bool WorldObject::IsInPhase(std::set<uint32> const& phases) const
|
||||
{
|
||||
// PhaseId 169 is the default fallback phase
|
||||
if (_phases.empty() && phases.empty())
|
||||
return true;
|
||||
|
||||
if (_phases.empty() && phases.count(DEFAULT_PHASE) > 0)
|
||||
return true;
|
||||
|
||||
if (phases.empty() && _phases.count(DEFAULT_PHASE) > 0)
|
||||
return true;
|
||||
|
||||
return Trinity::Containers::Intersects(_phases.begin(), _phases.end(), phases.begin(), phases.end());
|
||||
}
|
||||
|
||||
bool WorldObject::IsInPhase(WorldObject const* obj) const
|
||||
{
|
||||
if (GetTypeId() == TYPEID_PLAYER && ToPlayer()->IsGameMaster())
|
||||
return true;
|
||||
|
||||
return IsInPhase(obj->GetPhases());
|
||||
}
|
||||
|
||||
void WorldObject::PlayDistanceSound(uint32 sound_id, Player* target /*= NULL*/)
|
||||
{
|
||||
WorldPacket data(SMSG_PLAY_OBJECT_SOUND, 4 + 8);
|
||||
@@ -2900,7 +2744,7 @@ float WorldObject::GetFloorZ() const
|
||||
{
|
||||
if (!IsInWorld())
|
||||
return m_staticFloorZ;
|
||||
return std::max<float>(m_staticFloorZ, GetMap()->GetGameObjectFloor(GetPhases(), GetPositionX(), GetPositionY(), GetPositionZ()));
|
||||
return std::max<float>(m_staticFloorZ, GetMap()->GetGameObjectFloor(GetPhaseShift(), GetPositionX(), GetPositionY(), GetPositionZ()));
|
||||
}
|
||||
|
||||
template TC_GAME_API void WorldObject::GetGameObjectListWithEntryInGrid(std::list<GameObject*>&, uint32, float) const;
|
||||
@@ -2962,63 +2806,3 @@ void WorldObject::SetMeleeAnimKitId(uint16 animKitId)
|
||||
data << uint16(animKitId);
|
||||
SendMessageToSet(&data, true);
|
||||
}
|
||||
|
||||
void WorldObject::RebuildTerrainSwaps()
|
||||
{
|
||||
// Clear all terrain swaps, will be rebuilt below
|
||||
// Reason for this is, multiple phases can have the same terrain swap, we should not remove the swap if another phase still use it
|
||||
_terrainSwaps.clear();
|
||||
|
||||
// Check all applied phases for terrain swap and add it only once
|
||||
for (uint32 phaseId : _phases)
|
||||
{
|
||||
if (std::vector<uint32> const* swaps = sObjectMgr->GetPhaseTerrainSwaps(phaseId))
|
||||
{
|
||||
for (uint32 const& swap : *swaps)
|
||||
{
|
||||
// only add terrain swaps for current map
|
||||
MapEntry const* mapEntry = sMapStore.LookupEntry(swap);
|
||||
if (!mapEntry || mapEntry->rootPhaseMap != int32(GetMapId()))
|
||||
continue;
|
||||
|
||||
if (sConditionMgr->IsObjectMeetingNotGroupedConditions(CONDITION_SOURCE_TYPE_TERRAIN_SWAP, swap, this))
|
||||
_terrainSwaps.insert(swap);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// get default terrain swaps, only for current map always
|
||||
if (std::vector<uint32> const* mapSwaps = sObjectMgr->GetDefaultTerrainSwaps(GetMapId()))
|
||||
for (uint32 const& swap : *mapSwaps)
|
||||
if (sConditionMgr->IsObjectMeetingNotGroupedConditions(CONDITION_SOURCE_TYPE_TERRAIN_SWAP, swap, this))
|
||||
_terrainSwaps.insert(swap);
|
||||
|
||||
// online players have a game client with world map display
|
||||
if (GetTypeId() == TYPEID_PLAYER)
|
||||
RebuildWorldMapAreaSwaps();
|
||||
}
|
||||
|
||||
void WorldObject::RebuildWorldMapAreaSwaps()
|
||||
{
|
||||
// Clear all world map area swaps, will be rebuilt below
|
||||
_worldMapAreaSwaps.clear();
|
||||
|
||||
// get ALL default terrain swaps, if we are using it (condition is true)
|
||||
// send the worldmaparea for it, to see swapped worldmaparea in client from other maps too, not just from our current
|
||||
TerrainPhaseInfo const& defaults = sObjectMgr->GetDefaultTerrainSwapStore();
|
||||
for (TerrainPhaseInfo::const_iterator itr = defaults.begin(); itr != defaults.end(); ++itr)
|
||||
for (uint32 const& swap : itr->second)
|
||||
if (std::vector<uint32> const* uiMapSwaps = sObjectMgr->GetTerrainWorldMaps(swap))
|
||||
if (sConditionMgr->IsObjectMeetingNotGroupedConditions(CONDITION_SOURCE_TYPE_TERRAIN_SWAP, swap, this))
|
||||
for (uint32 worldMapAreaId : *uiMapSwaps)
|
||||
_worldMapAreaSwaps.insert(worldMapAreaId);
|
||||
|
||||
// Check all applied phases for world map area swaps
|
||||
for (uint32 phaseId : _phases)
|
||||
if (std::vector<uint32> const* swaps = sObjectMgr->GetPhaseTerrainSwaps(phaseId))
|
||||
for (uint32 const& swap : *swaps)
|
||||
if (std::vector<uint32> const* uiMapSwaps = sObjectMgr->GetTerrainWorldMaps(swap))
|
||||
if (sConditionMgr->IsObjectMeetingNotGroupedConditions(CONDITION_SOURCE_TYPE_TERRAIN_SWAP, swap, this))
|
||||
for (uint32 worldMapAreaId : *uiMapSwaps)
|
||||
_worldMapAreaSwaps.insert(worldMapAreaId);
|
||||
}
|
||||
@@ -24,10 +24,10 @@
|
||||
#include "UpdateMask.h"
|
||||
#include "GridReference.h"
|
||||
#include "ObjectDefines.h"
|
||||
#include "PhaseShift.h"
|
||||
#include "Map.h"
|
||||
#include "ModelIgnoreFlags.h"
|
||||
|
||||
#include <set>
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
|
||||
@@ -48,8 +48,6 @@
|
||||
#define NOMINAL_MELEE_RANGE 5.0f
|
||||
#define MELEE_RANGE (NOMINAL_MELEE_RANGE - MIN_MELEE_REACH * 2) //center to center for players
|
||||
|
||||
#define DEFAULT_PHASE 169
|
||||
|
||||
enum TempSummonType
|
||||
{
|
||||
TEMPSUMMON_TIMED_OR_DEAD_DESPAWN = 1, // despawns after a specified time OR when the creature disappears
|
||||
@@ -486,21 +484,16 @@ class TC_GAME_API WorldObject : public Object, public WorldLocation
|
||||
uint32 GetInstanceId() const { return m_InstanceId; }
|
||||
|
||||
virtual void SetPhaseMask(uint32 newPhaseMask, bool update);
|
||||
virtual bool SetInPhase(uint32 id, bool update, bool apply);
|
||||
void CopyPhaseFrom(WorldObject* obj, bool update = false);
|
||||
void UpdateAreaPhase();
|
||||
void ClearPhases(bool update = false);
|
||||
void RebuildTerrainSwaps();
|
||||
void RebuildWorldMapAreaSwaps();
|
||||
bool HasInPhaseList(uint32 phase);
|
||||
bool IsInPhase(WorldObject const* obj) const
|
||||
{
|
||||
return GetPhaseShift().CanSee(obj->GetPhaseShift());
|
||||
}
|
||||
|
||||
PhaseShift& GetPhaseShift() { return _phaseShift; }
|
||||
PhaseShift const& GetPhaseShift() const { return _phaseShift; }
|
||||
PhaseShift& GetSuppressedPhaseShift() { return _suppressedPhaseShift; }
|
||||
PhaseShift const& GetSuppressedPhaseShift() const { return _suppressedPhaseShift; }
|
||||
uint32 GetPhaseMask() const { return m_phaseMask; }
|
||||
bool IsInPhase(uint32 phase) const { return _phases.find(phase) != _phases.end(); }
|
||||
bool IsInPhase(std::set<uint32> const& phases) const;
|
||||
bool IsInPhase(WorldObject const* obj) const;
|
||||
bool IsInTerrainSwap(uint32 terrainSwap) const { return _terrainSwaps.find(terrainSwap) != _terrainSwaps.end(); }
|
||||
std::set<uint32> const& GetPhases() const { return _phases; }
|
||||
std::set<uint32> const& GetTerrainSwaps() const { return _terrainSwaps; }
|
||||
std::set<uint32> const& GetWorldMapAreaSwaps() const { return _worldMapAreaSwaps; }
|
||||
int32 GetDBPhase() { return _dbPhase; }
|
||||
|
||||
// if negative it is used as PhaseGroupId
|
||||
@@ -700,9 +693,8 @@ class TC_GAME_API WorldObject : public Object, public WorldLocation
|
||||
//uint32 m_mapId; // object at map with map_id
|
||||
uint32 m_InstanceId; // in map copy with instance id
|
||||
uint32 m_phaseMask; // in area phase state
|
||||
std::set<uint32> _phases;
|
||||
std::set<uint32> _terrainSwaps;
|
||||
std::set<uint32> _worldMapAreaSwaps;
|
||||
PhaseShift _phaseShift;
|
||||
PhaseShift _suppressedPhaseShift; // contains phases for current area but not applied due to conditions
|
||||
int32 _dbPhase;
|
||||
|
||||
uint16 m_notifyflags;
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "Log.h"
|
||||
#include "WorldPacket.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "PhasingHandler.h"
|
||||
#include "SpellMgr.h"
|
||||
#include "Pet.h"
|
||||
#include "Formulas.h"
|
||||
@@ -159,7 +160,7 @@ bool Pet::LoadPetData(Player* owner, uint32 petEntry, uint32 petnumber, bool cur
|
||||
if (!Create(guid, map, petEntry, petId))
|
||||
return false;
|
||||
|
||||
CopyPhaseFrom(owner);
|
||||
PhasingHandler::InheritPhaseShift(this, owner);
|
||||
|
||||
setPetType(petType);
|
||||
SetFaction(owner->GetFaction());
|
||||
|
||||
@@ -65,6 +65,7 @@
|
||||
#include "OutdoorPvP.h"
|
||||
#include "OutdoorPvPMgr.h"
|
||||
#include "Pet.h"
|
||||
#include "PhasingHandler.h"
|
||||
#include "QueryCallback.h"
|
||||
#include "QuestDef.h"
|
||||
#include "ReputationMgr.h"
|
||||
@@ -1957,7 +1958,7 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
|
||||
}
|
||||
|
||||
// remove arena spell coldowns/buffs now to also remove pet's cooldowns before it's temporarily unsummoned
|
||||
if (mEntry->IsBattleArena())
|
||||
if (mEntry->IsBattleArena() && !IsGameMaster())
|
||||
{
|
||||
RemoveArenaSpellCooldowns(true);
|
||||
RemoveArenaAuras();
|
||||
@@ -2599,7 +2600,7 @@ GameObject* Player::GetGameObjectIfCanInteractWith(ObjectGuid const& guid, Gameo
|
||||
bool Player::IsUnderWater() const
|
||||
{
|
||||
return IsInWater() &&
|
||||
GetPositionZ() < (GetBaseMap()->GetWaterLevel(GetPositionX(), GetPositionY())-2);
|
||||
GetPositionZ() < (GetBaseMap()->GetWaterLevel(GetPhaseShift(), GetPositionX(), GetPositionY())-2);
|
||||
}
|
||||
|
||||
void Player::SetInWater(bool apply)
|
||||
@@ -2663,10 +2664,13 @@ void Player::SetGameMaster(bool on)
|
||||
getHostileRefManager().setOnlineOfflineState(false);
|
||||
CombatStopWithPets();
|
||||
|
||||
PhasingHandler::SetAlwaysVisible(GetPhaseShift(), true);
|
||||
m_serverSideVisibilityDetect.SetValue(SERVERSIDE_VISIBILITY_GM, GetSession()->GetSecurity());
|
||||
}
|
||||
else
|
||||
{
|
||||
PhasingHandler::SetAlwaysVisible(GetPhaseShift(), false);
|
||||
|
||||
m_ExtraFlags &= ~ PLAYER_EXTRA_GM_ON;
|
||||
SetFactionForRace(getRace());
|
||||
RemoveFlag(PLAYER_FLAGS, PLAYER_FLAGS_GM);
|
||||
@@ -6509,7 +6513,7 @@ void Player::CheckAreaExploreAndOutdoor()
|
||||
return;
|
||||
|
||||
bool isOutdoor;
|
||||
uint32 areaId = GetBaseMap()->GetAreaId(GetPositionX(), GetPositionY(), GetPositionZ(), &isOutdoor);
|
||||
uint32 areaId = GetBaseMap()->GetAreaId(GetPhaseShift(), GetPositionX(), GetPositionY(), GetPositionZ(), &isOutdoor);
|
||||
AreaTableEntry const* areaEntry = sAreaTableStore.LookupEntry(areaId);
|
||||
|
||||
if (sWorld->getBoolConfig(CONFIG_VMAP_INDOOR_CHECK) && !isOutdoor)
|
||||
@@ -7454,7 +7458,7 @@ uint32 Player::GetZoneIdFromDB(ObjectGuid guid)
|
||||
if (!sMapStore.LookupEntry(map))
|
||||
return 0;
|
||||
|
||||
zone = sMapMgr->GetZoneId(map, posx, posy, posz);
|
||||
zone = sMapMgr->GetZoneId(PhasingHandler::GetEmptyPhaseShift(), map, posx, posy, posz);
|
||||
|
||||
if (zone > 0)
|
||||
{
|
||||
@@ -7481,7 +7485,7 @@ void Player::UpdateArea(uint32 newArea)
|
||||
UpdatePvPState(true);
|
||||
|
||||
UpdateAreaDependentAuras(newArea);
|
||||
UpdateAreaPhase();
|
||||
PhasingHandler::OnAreaChange(this);
|
||||
|
||||
// previously this was in UpdateZone (but after UpdateArea) so nothing will break
|
||||
pvpInfo.IsInNoPvPArea = false;
|
||||
@@ -7581,8 +7585,6 @@ void Player::UpdateZone(uint32 newZone, uint32 newArea)
|
||||
UpdateLocalChannels(newZone);
|
||||
|
||||
UpdateZoneDependentAuras(newZone);
|
||||
|
||||
UpdateAreaPhase();
|
||||
}
|
||||
|
||||
//If players are too far away from the duel flag... they lose the duel
|
||||
@@ -16148,7 +16150,7 @@ void Player::SendQuestUpdate(uint32 questId)
|
||||
}
|
||||
|
||||
UpdateForQuestWorldObjects();
|
||||
SendUpdatePhasing();
|
||||
PhasingHandler::OnConditionChange(this);
|
||||
}
|
||||
|
||||
QuestGiverStatus Player::GetQuestDialogStatus(Object* questgiver)
|
||||
@@ -23573,6 +23575,8 @@ void Player::SendInitialPacketsAfterAddToMap()
|
||||
else
|
||||
ClearQuestSharingInfo();
|
||||
}
|
||||
|
||||
PhasingHandler::OnMapChange(this);
|
||||
}
|
||||
|
||||
void Player::SendUpdateToOutOfRangeGroupMembers()
|
||||
@@ -27670,6 +27674,7 @@ Pet* Player::SummonPet(uint32 entry, float x, float y, float z, float ang, PetTy
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
PhasingHandler::InheritPhaseShift(pet, this);
|
||||
if (!hasPetData)
|
||||
{
|
||||
Map* map = GetMap();
|
||||
@@ -28043,16 +28048,6 @@ void Player::ReadMovementInfo(WorldPacket& data, MovementInfo* mi, Movement::Ext
|
||||
#undef REMOVE_VIOLATING_FLAGS
|
||||
}
|
||||
|
||||
void Player::SendUpdatePhasing()
|
||||
{
|
||||
if (!IsInWorld())
|
||||
return;
|
||||
|
||||
RebuildTerrainSwaps(); // to set default map swaps
|
||||
|
||||
GetSession()->SendSetPhaseShift(GetPhases(), GetTerrainSwaps(), GetWorldMapAreaSwaps());
|
||||
}
|
||||
|
||||
void Player::SendSupercededSpell(uint32 oldSpell, uint32 newSpell) const
|
||||
{
|
||||
WorldPacket data(SMSG_SUPERCEDED_SPELL, 8);
|
||||
|
||||
@@ -2380,6 +2380,7 @@ class TC_GAME_API Player : public Unit, public GridObject<Player>
|
||||
|
||||
// currently visible objects at player client
|
||||
GuidUnorderedSet m_clientGUIDs;
|
||||
GuidUnorderedSet m_visibleTransports;
|
||||
|
||||
bool HaveAtClient(Object const* u) const;
|
||||
|
||||
@@ -2393,8 +2394,6 @@ class TC_GAME_API Player : public Unit, public GridObject<Player>
|
||||
void UpdateVisibilityOf(WorldObject* target);
|
||||
void UpdateTriggerVisibility();
|
||||
|
||||
void SendUpdatePhasing();
|
||||
|
||||
template<class T>
|
||||
void UpdateVisibilityOf(T* target, UpdateData& data, std::set<Unit*>& visibleNow);
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "Transport.h"
|
||||
#include "MapManager.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "PhasingHandler.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "DBCStores.h"
|
||||
#include "GameObjectAI.h"
|
||||
@@ -326,13 +327,8 @@ Creature* Transport::CreateNPCPassenger(ObjectGuid::LowType guid, CreatureData c
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (data->phaseid)
|
||||
creature->SetInPhase(data->phaseid, false, true);
|
||||
else if (data->phaseGroup)
|
||||
for (auto phase : GetPhasesForGroup(data->phaseGroup))
|
||||
creature->SetInPhase(phase, false, true);
|
||||
else
|
||||
creature->CopyPhaseFrom(this);
|
||||
PhasingHandler::InitDbPhaseShift(creature->GetPhaseShift(), data->phaseUseFlags, data->phaseId, data->phaseGroup);
|
||||
PhasingHandler::InitDbVisibleMapId(creature->GetPhaseShift(), data->terrainSwapMap);
|
||||
|
||||
if (!map->AddToMap(creature))
|
||||
{
|
||||
@@ -377,6 +373,9 @@ GameObject* Transport::CreateGOPassenger(ObjectGuid::LowType guid, GameObjectDat
|
||||
return NULL;
|
||||
}
|
||||
|
||||
PhasingHandler::InitDbPhaseShift(go->GetPhaseShift(), data->phaseUseFlags, data->phaseId, data->phaseGroup);
|
||||
PhasingHandler::InitDbVisibleMapId(go->GetPhaseShift(), data->terrainSwapMap);
|
||||
|
||||
if (!map->AddToMap(go))
|
||||
{
|
||||
delete go;
|
||||
@@ -441,12 +440,6 @@ TempSummon* Transport::SummonPassenger(uint32 entry, Position const& pos, TempSu
|
||||
}
|
||||
}
|
||||
|
||||
std::set<uint32> phases;
|
||||
if (summoner)
|
||||
phases = summoner->GetPhases();
|
||||
else
|
||||
phases = GetPhases(); // If there was no summoner, try to use the transport phases
|
||||
|
||||
TempSummon* summon = NULL;
|
||||
switch (mask)
|
||||
{
|
||||
@@ -477,8 +470,7 @@ TempSummon* Transport::SummonPassenger(uint32 entry, Position const& pos, TempSu
|
||||
return NULL;
|
||||
}
|
||||
|
||||
for (uint32 phase : phases)
|
||||
summon->SetInPhase(phase, false, true);
|
||||
PhasingHandler::InheritPhaseShift(summon, summoner ? static_cast<WorldObject*>(summoner) : static_cast<WorldObject*>(this));
|
||||
|
||||
summon->SetUInt32Value(UNIT_CREATED_BY_SPELL, spellId);
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ struct CreatureData;
|
||||
|
||||
class TC_GAME_API Transport : public GameObject, public TransportBase
|
||||
{
|
||||
friend Transport* TransportMgr::CreateTransport(uint32, ObjectGuid::LowType, Map*, uint32, uint32);
|
||||
friend Transport* TransportMgr::CreateTransport(uint32, ObjectGuid::LowType, Map*, uint8, uint32, uint32);
|
||||
|
||||
Transport();
|
||||
public:
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
#include "PassiveAI.h"
|
||||
#include "PetAI.h"
|
||||
#include "Pet.h"
|
||||
#include "PhasingHandler.h"
|
||||
#include "Player.h"
|
||||
#include "PlayerAI.h"
|
||||
#include "QuestDef.h"
|
||||
@@ -3147,12 +3148,12 @@ bool Unit::isInAccessiblePlaceFor(Creature const* c) const
|
||||
|
||||
bool Unit::IsInWater() const
|
||||
{
|
||||
return GetBaseMap()->IsInWater(GetPositionX(), GetPositionY(), GetPositionZ());
|
||||
return GetBaseMap()->IsInWater(GetPhaseShift(), GetPositionX(), GetPositionY(), GetPositionZ());
|
||||
}
|
||||
|
||||
bool Unit::IsUnderWater() const
|
||||
{
|
||||
return GetBaseMap()->IsUnderWater(GetPositionX(), GetPositionY(), GetPositionZ());
|
||||
return GetBaseMap()->IsUnderWater(GetPhaseShift(), GetPositionX(), GetPositionY(), GetPositionZ());
|
||||
}
|
||||
|
||||
void Unit::ProcessPositionDataChanged(PositionFullTerrainStatus const& data)
|
||||
@@ -3928,7 +3929,7 @@ void Unit::RemoveAurasWithAttribute(uint32 flags)
|
||||
}
|
||||
}
|
||||
|
||||
void Unit::RemoveNotOwnSingleTargetAuras(uint32 newPhase, bool phaseid)
|
||||
void Unit::RemoveNotOwnSingleTargetAuras(bool onPhaseChange /*= false*/)
|
||||
{
|
||||
// single target auras from other casters
|
||||
// Iterate m_ownedAuras - aura is marked as single target in Unit::AddAura (and pushed to m_ownedAuras).
|
||||
@@ -3945,12 +3946,12 @@ void Unit::RemoveNotOwnSingleTargetAuras(uint32 newPhase, bool phaseid)
|
||||
|
||||
if (aura->GetCasterGUID() != GetGUID() && aura->IsSingleTarget())
|
||||
{
|
||||
if (!newPhase && !phaseid)
|
||||
if (!onPhaseChange)
|
||||
RemoveOwnedAura(iter);
|
||||
else
|
||||
{
|
||||
Unit* caster = aura->GetCaster();
|
||||
if (!caster || (newPhase && !caster->IsInPhase(newPhase)) || (!newPhase && !caster->IsInPhase(this)))
|
||||
if (!caster || !caster->IsInPhase(this))
|
||||
RemoveOwnedAura(iter);
|
||||
else
|
||||
++iter;
|
||||
@@ -3965,7 +3966,7 @@ void Unit::RemoveNotOwnSingleTargetAuras(uint32 newPhase, bool phaseid)
|
||||
for (AuraList::iterator iter = scAuras.begin(); iter != scAuras.end();)
|
||||
{
|
||||
Aura* aura = *iter;
|
||||
if (aura->GetUnitOwner() != this && !aura->GetUnitOwner()->IsInPhase(newPhase))
|
||||
if (aura->GetUnitOwner() != this && !aura->GetUnitOwner()->IsInPhase(this))
|
||||
{
|
||||
aura->Remove();
|
||||
iter = scAuras.begin();
|
||||
@@ -5576,7 +5577,7 @@ bool Unit::Attack(Unit* victim, bool meleeAttack)
|
||||
//if (GetTypeId() == TYPEID_UNIT)
|
||||
// ToCreature()->SetCombatStartPosition(GetPositionX(), GetPositionY(), GetPositionZ());
|
||||
|
||||
if (creature && !IsPet())
|
||||
if (creature && !IsControlledByPlayer())
|
||||
{
|
||||
// should not let player enter combat by right clicking target - doesn't helps
|
||||
AddThreat(victim, 0.0f);
|
||||
@@ -8171,7 +8172,7 @@ MountCapabilityEntry const* Unit::GetMountCapability(uint32 mountType) const
|
||||
mountFlags = areaTable->MountFlags;
|
||||
|
||||
LiquidData liquid;
|
||||
ZLiquidStatus liquidStatus = GetMap()->GetLiquidStatus(GetPositionX(), GetPositionY(), GetPositionZ(), MAP_ALL_LIQUIDS, &liquid);
|
||||
ZLiquidStatus liquidStatus = GetMap()->GetLiquidStatus(GetPhaseShift(), GetPositionX(), GetPositionY(), GetPositionZ(), MAP_ALL_LIQUIDS, &liquid);
|
||||
isSubmerged = (liquidStatus & LIQUID_MAP_UNDER_WATER) != 0 || HasUnitMovementFlag(MOVEMENTFLAG_SWIMMING);
|
||||
isInWater = (liquidStatus & (LIQUID_MAP_IN_WATER | LIQUID_MAP_UNDER_WATER)) != 0;
|
||||
|
||||
@@ -10089,15 +10090,6 @@ int32 Unit::GetCreatePowers(Powers power) const
|
||||
return 0;
|
||||
}
|
||||
|
||||
void Unit::AddToWorld()
|
||||
{
|
||||
if (!IsInWorld())
|
||||
{
|
||||
WorldObject::AddToWorld();
|
||||
}
|
||||
RebuildTerrainSwaps();
|
||||
}
|
||||
|
||||
void Unit::RemoveFromWorld()
|
||||
{
|
||||
// cleanup
|
||||
@@ -11419,7 +11411,7 @@ bool Unit::InitTamedPet(Pet* pet, uint8 level, uint32 spell_id)
|
||||
return false;
|
||||
}
|
||||
|
||||
pet->CopyPhaseFrom(this);
|
||||
PhasingHandler::InheritPhaseShift(pet, this);
|
||||
|
||||
pet->GetCharmInfo()->SetPetNumber(sObjectMgr->GeneratePetNumber(), true);
|
||||
// this enables pet details window (Shift+P)
|
||||
@@ -12526,14 +12518,12 @@ float Unit::MeleeSpellMissChance(const Unit* victim, WeaponAttackType attType, u
|
||||
return missChance;
|
||||
}
|
||||
|
||||
bool Unit::SetInPhase(uint32 id, bool update, bool apply)
|
||||
void Unit::OnPhaseChange()
|
||||
{
|
||||
bool res = WorldObject::SetInPhase(id, update, apply);
|
||||
|
||||
if (!IsInWorld())
|
||||
return res;
|
||||
return;
|
||||
|
||||
if (GetTypeId() == TYPEID_UNIT || (!ToPlayer()->IsGameMaster() && !ToPlayer()->GetSession()->PlayerLogout()))
|
||||
if (GetTypeId() == TYPEID_UNIT || !ToPlayer()->GetSession()->PlayerLogout())
|
||||
{
|
||||
HostileRefManager& refManager = getHostileRefManager();
|
||||
HostileReference* ref = refManager.getFirst();
|
||||
@@ -12563,19 +12553,6 @@ bool Unit::SetInPhase(uint32 id, bool update, bool apply)
|
||||
unit->getHostileRefManager().setOnlineOfflineState(ToCreature(), unit->IsInPhase(this));
|
||||
}
|
||||
}
|
||||
|
||||
for (ControlList::const_iterator itr = m_Controlled.begin(); itr != m_Controlled.end(); ++itr)
|
||||
if ((*itr)->GetTypeId() == TYPEID_UNIT)
|
||||
(*itr)->SetInPhase(id, true, apply);
|
||||
|
||||
for (uint8 i = 0; i < MAX_SUMMON_SLOT; ++i)
|
||||
if (m_SummonSlot[i])
|
||||
if (Creature* summon = GetMap()->GetCreature(m_SummonSlot[i]))
|
||||
summon->SetInPhase(id, true, apply);
|
||||
|
||||
RemoveNotOwnSingleTargetAuras(0, true);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
void Unit::UpdateObjectVisibility(bool forced)
|
||||
@@ -13356,7 +13333,7 @@ void Unit::_ExitVehicle(Position const* exitPosition)
|
||||
Movement::MoveSplineInit init(this);
|
||||
|
||||
// Creatures without inhabit type air should begin falling after exiting the vehicle
|
||||
if (GetTypeId() == TYPEID_UNIT && !CanFly() && height > GetMap()->GetWaterOrGroundLevel(GetPhases(), pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), &height) + 0.1f)
|
||||
if (GetTypeId() == TYPEID_UNIT && !CanFly() && height > GetMap()->GetWaterOrGroundLevel(GetPhaseShift(), pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), &height) + 0.1f)
|
||||
init.SetFall();
|
||||
|
||||
init.MoveTo(pos.GetPositionX(), pos.GetPositionY(), height, false);
|
||||
|
||||
@@ -1316,7 +1316,6 @@ class TC_GAME_API Unit : public WorldObject
|
||||
UnitAI* GetAI() { return i_AI; }
|
||||
void SetAI(UnitAI* newAI) { i_AI = newAI; }
|
||||
|
||||
void AddToWorld() override;
|
||||
void RemoveFromWorld() override;
|
||||
|
||||
void CleanupBeforeRemoveFromMap(bool finalCleanup);
|
||||
@@ -1801,7 +1800,7 @@ class TC_GAME_API Unit : public WorldObject
|
||||
void RemoveAurasDueToSpellBySteal(uint32 spellId, ObjectGuid casterGUID, Unit* stealer);
|
||||
void RemoveAurasDueToItemSpell(uint32 spellId, ObjectGuid castItemGuid);
|
||||
void RemoveAurasByType(AuraType auraType, ObjectGuid casterGUID = ObjectGuid::Empty, Aura* except = NULL, bool negative = true, bool positive = true);
|
||||
void RemoveNotOwnSingleTargetAuras(uint32 newPhase = 0x0, bool phaseid = false);
|
||||
void RemoveNotOwnSingleTargetAuras(bool onPhaseChange = false);
|
||||
void RemoveAurasWithInterruptFlags(uint32 flag, uint32 except = 0);
|
||||
void RemoveAurasWithAttribute(uint32 flags);
|
||||
void RemoveAurasWithFamily(SpellFamilyNames family, uint32 familyFlag1, uint32 familyFlag2, uint32 familyFlag3, ObjectGuid casterGUID);
|
||||
@@ -1983,7 +1982,7 @@ class TC_GAME_API Unit : public WorldObject
|
||||
void SetVisible(bool x);
|
||||
|
||||
// common function for visibility checks for player/creatures with detection code
|
||||
bool SetInPhase(uint32 id, bool update, bool apply) override;
|
||||
void OnPhaseChange();
|
||||
void UpdateObjectVisibility(bool forced = true) override;
|
||||
|
||||
SpellImmuneContainer m_spellImmune[MAX_SPELL_IMMUNITY];
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "BattlegroundMgr.h"
|
||||
#include "Chat.h"
|
||||
#include "Common.h"
|
||||
#include "Containers.h"
|
||||
#include "CreatureAIFactory.h"
|
||||
#include "DatabaseEnv.h"
|
||||
#include "DB2Structure.h"
|
||||
@@ -39,6 +40,7 @@
|
||||
#include "MapManager.h"
|
||||
#include "Object.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "PhasingHandler.h"
|
||||
#include "PoolMgr.h"
|
||||
#include "ReputationMgr.h"
|
||||
#include "ScriptMgr.h"
|
||||
@@ -1880,9 +1882,9 @@ void ObjectMgr::LoadCreatures()
|
||||
// 0 1 2 3 4 5 6 7 8 9 10
|
||||
QueryResult result = WorldDatabase.Query("SELECT creature.guid, id, map, modelid, equipment_id, position_x, position_y, position_z, orientation, spawntimesecs, spawndist, "
|
||||
// 11 12 13 14 15 16 17 18 19 20 21 22
|
||||
"currentwaypoint, curhealth, curmana, MovementType, spawnMask, phaseMask, eventEntry, pool_entry, creature.npcflag, creature.unit_flags, creature.dynamicflags, creature.phaseid, "
|
||||
// 23 24
|
||||
"creature.phasegroup, creature.ScriptName "
|
||||
"currentwaypoint, curhealth, curmana, MovementType, spawnMask, phaseMask, eventEntry, pool_entry, creature.npcflag, creature.unit_flags, creature.dynamicflags, creature.phaseUseFlags, "
|
||||
// 23 24 25 26
|
||||
"creature.phaseid, creature.phasegroup, creature.terrainSwapMap, creature.ScriptName "
|
||||
"FROM creature "
|
||||
"LEFT OUTER JOIN game_event_creature ON creature.guid = game_event_creature.guid "
|
||||
"LEFT OUTER JOIN pool_creature ON creature.guid = pool_creature.guid");
|
||||
@@ -1901,7 +1903,9 @@ void ObjectMgr::LoadCreatures()
|
||||
if (GetMapDifficultyData(i, Difficulty(k)))
|
||||
spawnMasks[i] |= (1 << k);
|
||||
|
||||
_creatureDataStore.rehash(result->GetRowCount());
|
||||
PhaseShift phaseShift;
|
||||
|
||||
_creatureDataStore.reserve(result->GetRowCount());
|
||||
|
||||
do
|
||||
{
|
||||
@@ -1939,9 +1943,11 @@ void ObjectMgr::LoadCreatures()
|
||||
data.npcflag = fields[19].GetUInt32();
|
||||
data.unit_flags = fields[20].GetUInt32();
|
||||
data.dynamicflags = fields[21].GetUInt32();
|
||||
data.phaseid = fields[22].GetUInt32();
|
||||
data.phaseGroup = fields[23].GetUInt32();
|
||||
data.ScriptId = GetScriptId(fields[24].GetString());
|
||||
data.phaseUseFlags = fields[22].GetUInt8();
|
||||
data.phaseId = fields[23].GetUInt32();
|
||||
data.phaseGroup = fields[24].GetUInt32();
|
||||
data.terrainSwapMap = fields[25].GetInt32();
|
||||
data.ScriptId = GetScriptId(fields[26].GetString());
|
||||
|
||||
MapEntry const* mapEntry = sMapStore.LookupEntry(data.mapid);
|
||||
if (!mapEntry)
|
||||
@@ -2013,7 +2019,7 @@ void ObjectMgr::LoadCreatures()
|
||||
|
||||
if (std::abs(data.orientation) > 2 * float(M_PI))
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "Table `creature` has creature (GUID: %u Entry: %u) with abs(`orientation`) > 2*PI (orientation is expressed in radians), normalized.", guid, data.id);
|
||||
TC_LOG_ERROR("sql.sql", "Table `creature` has creature (GUID: %%u Entry: %u) with abs(`orientation`) > 2*PI (orientation is expressed in radians), normalized.", guid, data.id);
|
||||
data.orientation = Position::NormalizeOrientation(data.orientation);
|
||||
}
|
||||
|
||||
@@ -2023,23 +2029,52 @@ void ObjectMgr::LoadCreatures()
|
||||
data.phaseMask = 1;
|
||||
}
|
||||
|
||||
if (data.phaseGroup && GetPhasesForGroup(data.phaseGroup).empty())
|
||||
if (data.phaseUseFlags & ~PHASE_USE_FLAGS_ALL)
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "Table `creature` have creature (GUID: %u Entry: %u) has unknown `phaseUseFlags` set, removed unknown value.", guid, data.id);
|
||||
data.phaseUseFlags &= PHASE_USE_FLAGS_ALL;
|
||||
}
|
||||
|
||||
if (data.phaseUseFlags & PHASE_USE_FLAGS_ALWAYS_VISIBLE && data.phaseUseFlags & PHASE_USE_FLAGS_INVERSE)
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "Table `creature` have creature (GUID: %u Entry: %u) has both `phaseUseFlags` PHASE_USE_FLAGS_ALWAYS_VISIBLE and PHASE_USE_FLAGS_INVERSE,"
|
||||
" removing PHASE_USE_FLAGS_INVERSE.", guid, data.id);
|
||||
data.phaseUseFlags &= ~PHASE_USE_FLAGS_INVERSE;
|
||||
}
|
||||
|
||||
if (data.phaseGroup && !GetPhasesForGroup(data.phaseGroup))
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "Table `creature` has creature (GUID: %u Entry: %u) with non-existing `phasegroup` (%u) set, `phasegroup` set to 0", guid, data.id, data.phaseGroup);
|
||||
data.phaseGroup = 0;
|
||||
}
|
||||
|
||||
if (data.phaseGroup && data.phaseid)
|
||||
if (data.phaseGroup && data.phaseId)
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "Table `creature` have creature (GUID: %u Entry: %u) with both `phaseid` and `phasegroup` set, `phasegroup` set to 0", guid, data.id);
|
||||
data.phaseGroup = 0;
|
||||
}
|
||||
|
||||
if (data.terrainSwapMap != -1)
|
||||
{
|
||||
MapEntry const* terrainSwapEntry = sMapStore.LookupEntry(data.terrainSwapMap);
|
||||
if (!terrainSwapEntry)
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "Table `creature` have creature (GUID: % Entry: %u) with `terrainSwapMap` %u does not exist, set to -1", guid, data.id, data.terrainSwapMap);
|
||||
data.terrainSwapMap = -1;
|
||||
}
|
||||
else if (terrainSwapEntry->rootPhaseMap != data.mapid)
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "Table `creature` have creature (GUID: % Entry: %u) with `terrainSwapMap` %u which cannot be used on spawn map, set to -1", guid, data.id, data.terrainSwapMap);
|
||||
data.terrainSwapMap = -1;
|
||||
}
|
||||
}
|
||||
|
||||
if (sWorld->getBoolConfig(CONFIG_CALCULATE_CREATURE_ZONE_AREA_DATA))
|
||||
{
|
||||
uint32 zoneId = 0;
|
||||
uint32 areaId = 0;
|
||||
sMapMgr->GetZoneAndAreaId(zoneId, areaId, data.mapid, data.posX, data.posY, data.posZ);
|
||||
PhasingHandler::InitDbVisibleMapId(phaseShift, data.terrainSwapMap);
|
||||
sMapMgr->GetZoneAndAreaId(phaseShift, zoneId, areaId, data.mapid, data.posX, data.posY, data.posZ);
|
||||
|
||||
PreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_UPD_CREATURE_ZONE_AREA_DATA);
|
||||
|
||||
@@ -2193,8 +2228,8 @@ void ObjectMgr::LoadGameobjects()
|
||||
QueryResult result = WorldDatabase.Query("SELECT gameobject.guid, id, map, position_x, position_y, position_z, orientation, "
|
||||
// 7 8 9 10 11 12 13 14 15 16 17
|
||||
"rotation0, rotation1, rotation2, rotation3, spawntimesecs, animprogress, state, spawnMask, phaseMask, eventEntry, pool_entry, "
|
||||
// 18 19 20
|
||||
"phaseid, phasegroup, ScriptName "
|
||||
// 18 19 20 21 22
|
||||
"phaseUseFlags, phaseid, phasegroup, terrainSwapMap, ScriptName "
|
||||
"FROM gameobject LEFT OUTER JOIN game_event_gameobject ON gameobject.guid = game_event_gameobject.guid "
|
||||
"LEFT OUTER JOIN pool_gameobject ON gameobject.guid = pool_gameobject.guid");
|
||||
|
||||
@@ -2212,7 +2247,9 @@ void ObjectMgr::LoadGameobjects()
|
||||
if (GetMapDifficultyData(i, Difficulty(k)))
|
||||
spawnMasks[i] |= (1 << k);
|
||||
|
||||
_gameObjectDataStore.rehash(result->GetRowCount());
|
||||
PhaseShift phaseShift;
|
||||
|
||||
_gameObjectDataStore.reserve(result->GetRowCount());
|
||||
|
||||
do
|
||||
{
|
||||
@@ -2295,22 +2332,52 @@ void ObjectMgr::LoadGameobjects()
|
||||
data.phaseMask = fields[15].GetUInt32();
|
||||
int16 gameEvent = fields[16].GetInt8();
|
||||
uint32 PoolId = fields[17].GetUInt32();
|
||||
data.phaseid = fields[18].GetUInt32();
|
||||
data.phaseGroup = fields[19].GetUInt32();
|
||||
data.phaseUseFlags = fields[18].GetUInt8();
|
||||
data.phaseId = fields[19].GetUInt32();
|
||||
data.phaseGroup = fields[20].GetUInt32();
|
||||
|
||||
if (data.phaseGroup && GetPhasesForGroup(data.phaseGroup).empty())
|
||||
if (data.phaseUseFlags & ~PHASE_USE_FLAGS_ALL)
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "Table `gameobject` have gameobject (GUID: " UI64FMTD " Entry: %u) has unknown `phaseUseFlags` set, removed unknown value.", guid, data.id);
|
||||
data.phaseUseFlags &= PHASE_USE_FLAGS_ALL;
|
||||
}
|
||||
|
||||
if (data.phaseUseFlags & PHASE_USE_FLAGS_ALWAYS_VISIBLE && data.phaseUseFlags & PHASE_USE_FLAGS_INVERSE)
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "Table `gameobject` have gameobject (GUID: " UI64FMTD " Entry: %u) has both `phaseUseFlags` PHASE_USE_FLAGS_ALWAYS_VISIBLE and PHASE_USE_FLAGS_INVERSE,"
|
||||
" removing PHASE_USE_FLAGS_INVERSE.", guid, data.id);
|
||||
data.phaseUseFlags &= ~PHASE_USE_FLAGS_INVERSE;
|
||||
}
|
||||
|
||||
if (data.phaseGroup && !GetPhasesForGroup(data.phaseGroup))
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "Table `gameobject` has gameobject (GUID: %u Entry: %u) with non-existing `phasegroup` (%u) set, `phasegroup` set to 0", guid, data.id, data.phaseGroup);
|
||||
data.phaseGroup = 0;
|
||||
}
|
||||
|
||||
if (data.phaseGroup && data.phaseid)
|
||||
if (data.phaseGroup && data.phaseId)
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "Table `gameobject` have gameobject (GUID: %u Entry: %u) with both `phaseid` and `phasegroup` set, `phasegroup` set to 0", guid, data.id);
|
||||
data.phaseGroup = 0;
|
||||
}
|
||||
|
||||
data.ScriptId = GetScriptId(fields[20].GetString());
|
||||
data.terrainSwapMap = fields[21].GetInt32();
|
||||
if (data.terrainSwapMap != -1)
|
||||
{
|
||||
MapEntry const* terrainSwapEntry = sMapStore.LookupEntry(data.terrainSwapMap);
|
||||
if (!terrainSwapEntry)
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "Table `gameobject` have gameobject (GUID: " UI64FMTD " Entry: %u) with `terrainSwapMap` %u does not exist, set to -1", guid, data.id, data.terrainSwapMap);
|
||||
data.terrainSwapMap = -1;
|
||||
}
|
||||
else if (terrainSwapEntry->rootPhaseMap != data.mapid)
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "Table `gameobject` have gameobject (GUID: " UI64FMTD " Entry: %u) with `terrainSwapMap` %u which cannot be used on spawn map, set to -1", guid, data.id, data.terrainSwapMap);
|
||||
data.terrainSwapMap = -1;
|
||||
}
|
||||
}
|
||||
|
||||
data.ScriptId = GetScriptId(fields[22].GetString());
|
||||
|
||||
if (std::abs(data.orientation) > 2 * float(M_PI))
|
||||
{
|
||||
@@ -2358,7 +2425,8 @@ void ObjectMgr::LoadGameobjects()
|
||||
{
|
||||
uint32 zoneId = 0;
|
||||
uint32 areaId = 0;
|
||||
sMapMgr->GetZoneAndAreaId(zoneId, areaId, data.mapid, data.posX, data.posY, data.posZ);
|
||||
PhasingHandler::InitDbVisibleMapId(phaseShift, data.terrainSwapMap);
|
||||
sMapMgr->GetZoneAndAreaId(phaseShift, zoneId, areaId, data.mapid, data.posX, data.posY, data.posZ);
|
||||
|
||||
PreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_UPD_GAMEOBJECT_ZONE_AREA_DATA);
|
||||
|
||||
@@ -6332,7 +6400,7 @@ WorldSafeLocsEntry const* ObjectMgr::GetDefaultGraveYard(uint32 team) const
|
||||
WorldSafeLocsEntry const* ObjectMgr::GetClosestGraveYard(float x, float y, float z, uint32 MapId, uint32 team) const
|
||||
{
|
||||
// search for zone associated closest graveyard
|
||||
uint32 zoneId = sMapMgr->GetZoneId(MapId, x, y, z);
|
||||
uint32 zoneId = sMapMgr->GetZoneId(PhasingHandler::GetEmptyPhaseShift(), MapId, x, y, z);
|
||||
|
||||
if (!zoneId)
|
||||
{
|
||||
@@ -9598,10 +9666,78 @@ void ObjectMgr::LoadFactionChangeTitles()
|
||||
TC_LOG_INFO("server.loading", ">> Loaded %u faction change title pairs in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
}
|
||||
|
||||
void ObjectMgr::LoadPhases()
|
||||
{
|
||||
for (PhaseEntry const* phase : sPhaseStore)
|
||||
_phaseInfoById.emplace(std::make_pair(phase->ID, PhaseInfoStruct{ phase->ID, std::unordered_set<uint32>{} }));
|
||||
|
||||
for (MapEntry const* map : sMapStore)
|
||||
if (map->rootPhaseMap != -1)
|
||||
_terrainSwapInfoById.emplace(std::make_pair(map->MapID, TerrainSwapInfo{ map->MapID, std::vector<uint32>{} }));
|
||||
|
||||
TC_LOG_INFO("server.loading", "Loading Terrain World Map definitions...");
|
||||
LoadTerrainWorldMaps();
|
||||
|
||||
TC_LOG_INFO("server.loading", "Loading Terrain Swap Default definitions...");
|
||||
LoadTerrainSwapDefaults();
|
||||
|
||||
TC_LOG_INFO("server.loading", "Loading Phase Area definitions...");
|
||||
LoadAreaPhases();
|
||||
}
|
||||
|
||||
void ObjectMgr::UnloadPhaseConditions()
|
||||
{
|
||||
for (auto itr = _phaseInfoByArea.begin(); itr != _phaseInfoByArea.end(); ++itr)
|
||||
for (PhaseAreaInfo& phase : itr->second)
|
||||
phase.Conditions.clear();
|
||||
}
|
||||
|
||||
void ObjectMgr::LoadTerrainWorldMaps()
|
||||
{
|
||||
uint32 oldMSTime = getMSTime();
|
||||
|
||||
// 0 1
|
||||
QueryResult result = WorldDatabase.Query("SELECT TerrainSwapMap, WorldMapArea FROM `terrain_worldmap`");
|
||||
|
||||
|
||||
if (!result)
|
||||
{
|
||||
TC_LOG_INFO("server.loading", ">> Loaded 0 terrain world maps. DB table `terrain_worldmap` is empty.");
|
||||
return;
|
||||
}
|
||||
|
||||
uint32 count = 0;
|
||||
do
|
||||
{
|
||||
Field* fields = result->Fetch();
|
||||
|
||||
uint32 mapId = fields[0].GetUInt32();
|
||||
uint32 worldMapArea = fields[1].GetUInt32();
|
||||
|
||||
if (!sMapStore.LookupEntry(mapId))
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "TerrainSwapMap %u defined in `terrain_worldmap` does not exist, skipped.", mapId);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!sWorldMapAreaStore.LookupEntry(worldMapArea))
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "WorldMapArea %u defined in `terrain_worldmap` does not exist, skipped.", worldMapArea);
|
||||
continue;
|
||||
}
|
||||
|
||||
TerrainSwapInfo* terrainSwapInfo = &_terrainSwapInfoById[mapId];
|
||||
terrainSwapInfo->Id = mapId;
|
||||
terrainSwapInfo->UiWorldMapAreaIDSwaps.push_back(worldMapArea);
|
||||
|
||||
++count;
|
||||
} while (result->NextRow());
|
||||
|
||||
TC_LOG_INFO("server.loading", ">> Loaded %u terrain world maps in %u ms.", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
}
|
||||
|
||||
void ObjectMgr::LoadTerrainSwapDefaults()
|
||||
{
|
||||
_terrainMapDefaultStore.clear();
|
||||
|
||||
uint32 oldMSTime = getMSTime();
|
||||
|
||||
// 0 1
|
||||
@@ -9634,7 +9770,9 @@ void ObjectMgr::LoadTerrainSwapDefaults()
|
||||
continue;
|
||||
}
|
||||
|
||||
_terrainMapDefaultStore[mapId].push_back(terrainSwap);
|
||||
TerrainSwapInfo* terrainSwapInfo = &_terrainSwapInfoById[terrainSwap];
|
||||
terrainSwapInfo->Id = terrainSwap;
|
||||
_terrainSwapInfoByMap[mapId].push_back(terrainSwapInfo);
|
||||
|
||||
++count;
|
||||
} while (result->NextRow());
|
||||
@@ -9642,88 +9780,8 @@ void ObjectMgr::LoadTerrainSwapDefaults()
|
||||
TC_LOG_INFO("server.loading", ">> Loaded %u terrain swap defaults in %u ms.", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
}
|
||||
|
||||
void ObjectMgr::LoadTerrainPhaseInfo()
|
||||
{
|
||||
_terrainPhaseInfoStore.clear();
|
||||
|
||||
uint32 oldMSTime = getMSTime();
|
||||
|
||||
// 0 1
|
||||
QueryResult result = WorldDatabase.Query("SELECT Id, TerrainSwapMap FROM `terrain_phase_info`");
|
||||
|
||||
if (!result)
|
||||
{
|
||||
TC_LOG_INFO("server.loading", ">> Loaded 0 terrain phase infos. DB table `terrain_phase_info` is empty.");
|
||||
return;
|
||||
}
|
||||
|
||||
uint32 count = 0;
|
||||
do
|
||||
{
|
||||
Field* fields = result->Fetch();
|
||||
|
||||
uint32 phaseId = fields[0].GetUInt32();
|
||||
|
||||
PhaseEntry const* phase = sPhaseStore.LookupEntry(phaseId);
|
||||
if (!phase)
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "Phase %u defined in `terrain_phase_info` does not exist, skipped.", phaseId);
|
||||
continue;
|
||||
}
|
||||
|
||||
uint32 terrainSwap = fields[1].GetUInt32();
|
||||
|
||||
_terrainPhaseInfoStore[phaseId].push_back(terrainSwap);
|
||||
|
||||
++count;
|
||||
}
|
||||
while (result->NextRow());
|
||||
|
||||
TC_LOG_INFO("server.loading", ">> Loaded %u terrain phase infos in %u ms.", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
}
|
||||
|
||||
void ObjectMgr::LoadTerrainWorldMaps()
|
||||
{
|
||||
_terrainWorldMapStore.clear();
|
||||
|
||||
uint32 oldMSTime = getMSTime();
|
||||
|
||||
// 0 1
|
||||
QueryResult result = WorldDatabase.Query("SELECT TerrainSwapMap, WorldMapArea FROM `terrain_worldmap`");
|
||||
|
||||
if (!result)
|
||||
{
|
||||
TC_LOG_INFO("server.loading", ">> Loaded 0 terrain world maps. DB table `terrain_worldmap` is empty.");
|
||||
return;
|
||||
}
|
||||
|
||||
uint32 count = 0;
|
||||
do
|
||||
{
|
||||
Field* fields = result->Fetch();
|
||||
|
||||
uint32 mapId = fields[0].GetUInt32();
|
||||
|
||||
if (!sMapStore.LookupEntry(mapId))
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "TerrainSwapMap %u defined in `terrain_worldmap` does not exist, skipped.", mapId);
|
||||
continue;
|
||||
}
|
||||
|
||||
uint32 worldMapArea = fields[1].GetUInt32();
|
||||
|
||||
_terrainWorldMapStore[mapId].push_back(worldMapArea);
|
||||
|
||||
++count;
|
||||
} while (result->NextRow());
|
||||
|
||||
TC_LOG_INFO("server.loading", ">> Loaded %u terrain world maps in %u ms.", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
}
|
||||
|
||||
void ObjectMgr::LoadAreaPhases()
|
||||
{
|
||||
_phases.clear();
|
||||
|
||||
uint32 oldMSTime = getMSTime();
|
||||
|
||||
// 0 1
|
||||
@@ -9735,23 +9793,93 @@ void ObjectMgr::LoadAreaPhases()
|
||||
return;
|
||||
}
|
||||
|
||||
auto getOrCreatePhaseIfMissing = [this](uint32 phaseId)
|
||||
{
|
||||
PhaseInfoStruct* phaseInfo = &_phaseInfoById[phaseId];
|
||||
phaseInfo->Id = phaseId;
|
||||
return phaseInfo;
|
||||
};
|
||||
|
||||
uint32 count = 0;
|
||||
do
|
||||
{
|
||||
Field* fields = result->Fetch();
|
||||
|
||||
PhaseInfoStruct phase;
|
||||
uint32 area = fields[0].GetUInt32();
|
||||
uint32 phaseId = fields[1].GetUInt32();
|
||||
if (!sAreaTableStore.LookupEntry(area))
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "Area %u defined in `phase_area` does not exist, skipped.", area);
|
||||
continue;
|
||||
}
|
||||
|
||||
phase.Id = fields[1].GetUInt32();
|
||||
_phases[area].push_back(phase);
|
||||
if (!sPhaseStore.LookupEntry(phaseId))
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "Phase %u defined in `phase_area` does not exist, skipped.", phaseId);
|
||||
continue;
|
||||
}
|
||||
|
||||
PhaseInfoStruct* phase = getOrCreatePhaseIfMissing(phaseId);
|
||||
phase->Areas.insert(area);
|
||||
_phaseInfoByArea[area].emplace_back(phase);
|
||||
|
||||
++count;
|
||||
} while (result->NextRow());
|
||||
|
||||
for (auto itr = _phaseInfoByArea.begin(); itr != _phaseInfoByArea.end(); ++itr)
|
||||
{
|
||||
for (PhaseAreaInfo& phase : itr->second)
|
||||
{
|
||||
uint32 parentAreaId = itr->first;
|
||||
do
|
||||
{
|
||||
AreaTableEntry const* area = sAreaTableStore.LookupEntry(parentAreaId);
|
||||
if (!area)
|
||||
break;
|
||||
|
||||
parentAreaId = area->zone;
|
||||
if (!parentAreaId)
|
||||
break;
|
||||
|
||||
if (std::vector<PhaseAreaInfo>* parentAreaPhases = Trinity::Containers::MapGetValuePtr(_phaseInfoByArea, parentAreaId))
|
||||
for (PhaseAreaInfo& parentAreaPhase : *parentAreaPhases)
|
||||
if (parentAreaPhase.PhaseInfo->Id == phase.PhaseInfo->Id)
|
||||
parentAreaPhase.SubAreaExclusions.insert(itr->first);
|
||||
|
||||
} while (true);
|
||||
}
|
||||
}
|
||||
|
||||
TC_LOG_INFO("server.loading", ">> Loaded %u phase areas in %u ms.", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
}
|
||||
|
||||
bool PhaseInfoStruct::IsAllowedInArea(uint32 areaId) const
|
||||
{
|
||||
return std::any_of(Areas.begin(), Areas.end(), [areaId](uint32 areaToCheck)
|
||||
{
|
||||
return IsInArea(areaId, areaToCheck);
|
||||
});
|
||||
}
|
||||
|
||||
PhaseInfoStruct const* ObjectMgr::GetPhaseInfo(uint32 phaseId) const
|
||||
{
|
||||
return Trinity::Containers::MapGetValuePtr(_phaseInfoById, phaseId);
|
||||
}
|
||||
|
||||
std::vector<PhaseAreaInfo> const* ObjectMgr::GetPhasesForArea(uint32 areaId) const
|
||||
{
|
||||
return Trinity::Containers::MapGetValuePtr(_phaseInfoByArea, areaId);
|
||||
}
|
||||
|
||||
TerrainSwapInfo const* ObjectMgr::GetTerrainSwapInfo(uint32 terrainSwapId) const
|
||||
{
|
||||
return Trinity::Containers::MapGetValuePtr(_terrainSwapInfoById, terrainSwapId);
|
||||
}
|
||||
|
||||
std::vector<TerrainSwapInfo*> const* ObjectMgr::GetTerrainSwapsForMap(uint32 mapId) const
|
||||
{
|
||||
return Trinity::Containers::MapGetValuePtr(_terrainSwapInfoByMap, mapId);
|
||||
}
|
||||
|
||||
GameObjectTemplate const* ObjectMgr::GetGameObjectTemplate(uint32 entry) const
|
||||
{
|
||||
GameObjectTemplateContainer::const_iterator itr = _gameObjectTemplateStore.find(entry);
|
||||
|
||||
@@ -716,15 +716,28 @@ struct HotfixInfo
|
||||
|
||||
typedef std::vector<HotfixInfo> HotfixData;
|
||||
|
||||
struct TerrainSwapInfo
|
||||
{
|
||||
uint32 Id;
|
||||
std::vector<uint32> UiWorldMapAreaIDSwaps;
|
||||
};
|
||||
|
||||
struct PhaseInfoStruct
|
||||
{
|
||||
uint32 Id;
|
||||
ConditionContainer Conditions;
|
||||
std::unordered_set<uint32> Areas;
|
||||
|
||||
bool IsAllowedInArea(uint32 areaId) const;
|
||||
};
|
||||
|
||||
typedef std::unordered_map<uint32, std::vector<uint32 /*id*/>> TerrainPhaseInfo; // terrain swap
|
||||
typedef std::unordered_map<uint32, std::vector<uint32>> TerrainUIPhaseInfo; // worldmaparea swap
|
||||
typedef std::unordered_map<uint32, std::vector<PhaseInfoStruct>> PhaseInfo; // phase
|
||||
struct PhaseAreaInfo
|
||||
{
|
||||
PhaseAreaInfo(PhaseInfoStruct const* phaseInfo) : PhaseInfo(phaseInfo) { }
|
||||
|
||||
PhaseInfoStruct const* PhaseInfo;
|
||||
std::unordered_set<uint32> SubAreaExclusions;
|
||||
ConditionContainer Conditions;
|
||||
};
|
||||
|
||||
class PlayerDumpReader;
|
||||
|
||||
@@ -1073,7 +1086,8 @@ class TC_GAME_API ObjectMgr
|
||||
void LoadTrainerSpell();
|
||||
void AddSpellToTrainer(uint32 ID, uint32 SpellID, uint32 MoneyCost, uint32 ReqSkillLine, uint32 ReqSkillRank, uint32 ReqLevel, uint32 Index);
|
||||
|
||||
void LoadTerrainPhaseInfo();
|
||||
void LoadPhases();
|
||||
void UnloadPhaseConditions();
|
||||
void LoadTerrainSwapDefaults();
|
||||
void LoadTerrainWorldMaps();
|
||||
void LoadAreaPhases();
|
||||
@@ -1358,36 +1372,6 @@ class TC_GAME_API ObjectMgr
|
||||
return _gossipMenuItemsStore.equal_range(uiMenuId);
|
||||
}
|
||||
|
||||
std::vector<uint32> const* GetPhaseTerrainSwaps(uint32 phaseid) const
|
||||
{
|
||||
auto itr = _terrainPhaseInfoStore.find(phaseid);
|
||||
return itr != _terrainPhaseInfoStore.end() ? &itr->second : nullptr;
|
||||
}
|
||||
std::vector<uint32> const* GetDefaultTerrainSwaps(uint32 mapid) const
|
||||
{
|
||||
auto itr = _terrainMapDefaultStore.find(mapid);
|
||||
return itr != _terrainMapDefaultStore.end() ? &itr->second : nullptr;
|
||||
}
|
||||
std::vector<uint32> const* GetTerrainWorldMaps(uint32 terrainId) const
|
||||
{
|
||||
auto itr = _terrainWorldMapStore.find(terrainId);
|
||||
return itr != _terrainWorldMapStore.end() ? &itr->second : nullptr;
|
||||
}
|
||||
std::vector<PhaseInfoStruct> const* GetPhasesForArea(uint32 area) const
|
||||
{
|
||||
auto itr = _phases.find(area);
|
||||
return itr != _phases.end() ? &itr->second : nullptr;
|
||||
}
|
||||
TerrainPhaseInfo const& GetDefaultTerrainSwapStore() const { return _terrainMapDefaultStore; }
|
||||
PhaseInfo const& GetAreaPhases() const { return _phases; }
|
||||
// condition loading helpers
|
||||
std::vector<PhaseInfoStruct>* GetPhasesForAreaForLoading(uint32 area)
|
||||
{
|
||||
auto itr = _phases.find(area);
|
||||
return itr != _phases.end() ? &itr->second : nullptr;
|
||||
}
|
||||
PhaseInfo& GetAreaPhasesForLoading() { return _phases; }
|
||||
|
||||
// for wintergrasp only
|
||||
GraveYardContainer GraveYardStore;
|
||||
|
||||
@@ -1506,10 +1490,18 @@ class TC_GAME_API ObjectMgr
|
||||
PageTextContainer _pageTextStore;
|
||||
InstanceTemplateContainer _instanceTemplateStore;
|
||||
|
||||
TerrainPhaseInfo _terrainPhaseInfoStore;
|
||||
TerrainPhaseInfo _terrainMapDefaultStore;
|
||||
TerrainUIPhaseInfo _terrainWorldMapStore;
|
||||
PhaseInfo _phases;
|
||||
public:
|
||||
PhaseInfoStruct const* GetPhaseInfo(uint32 phaseId) const;
|
||||
std::vector<PhaseAreaInfo> const* GetPhasesForArea(uint32 areaId) const;
|
||||
TerrainSwapInfo const* GetTerrainSwapInfo(uint32 terrainSwapId) const;
|
||||
std::vector<TerrainSwapInfo*> const* GetTerrainSwapsForMap(uint32 mapId) const;
|
||||
|
||||
private:
|
||||
std::unordered_map<uint32, PhaseInfoStruct> _phaseInfoById;
|
||||
std::unordered_map<uint32, TerrainSwapInfo> _terrainSwapInfoById;
|
||||
std::unordered_map<uint32, std::vector<PhaseAreaInfo>> _phaseInfoByArea;
|
||||
std::unordered_map<uint32, std::vector<TerrainSwapInfo*>> _terrainSwapInfoByMap;
|
||||
|
||||
|
||||
private:
|
||||
void LoadScripts(ScriptsType type);
|
||||
|
||||
@@ -324,7 +324,7 @@ void MessageDistDelivererToHostile::Visit(PlayerMapType &m)
|
||||
for (PlayerMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
|
||||
{
|
||||
Player* target = iter->GetSource();
|
||||
if (!target->IsInPhase(i_phaseMask))
|
||||
if (!target->IsInPhase(i_source))
|
||||
continue;
|
||||
|
||||
if (target->GetExactDist2dSq(i_source) > i_distSq)
|
||||
@@ -349,7 +349,7 @@ void MessageDistDelivererToHostile::Visit(CreatureMapType &m)
|
||||
for (CreatureMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
|
||||
{
|
||||
Creature* target = iter->GetSource();
|
||||
if (!target->IsInPhase(i_phaseMask))
|
||||
if (!target->IsInPhase(i_source))
|
||||
continue;
|
||||
|
||||
if (target->GetExactDist2dSq(i_source) > i_distSq)
|
||||
@@ -371,7 +371,7 @@ void MessageDistDelivererToHostile::Visit(DynamicObjectMapType &m)
|
||||
for (DynamicObjectMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
|
||||
{
|
||||
DynamicObject* target = iter->GetSource();
|
||||
if (!target->IsInPhase(i_phaseMask))
|
||||
if (!target->IsInPhase(i_source))
|
||||
continue;
|
||||
|
||||
if (target->GetExactDist2dSq(i_source) > i_distSq)
|
||||
|
||||
Loaded 100 of 172 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user